youverify-liveness-web 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ declare interface LivenessData {
26
26
  }
27
27
 
28
28
  declare interface LivenessWebSdkProps {
29
- publicKey: string;
29
+ publicKey?: string;
30
30
  presentation?: Presentation;
31
31
  tasks?: Array<Task>;
32
32
  user?: User;
package/dist/index.js CHANGED
@@ -2519,14 +2519,7 @@ const qa = "https://cdn.svc.youverify.co", Ya = (e) => e ? "https://identity.sta
2519
2519
  function Ga(e) {
2520
2520
  const t = Ya(e);
2521
2521
  return { postData: async (i) => {
2522
- const {
2523
- faceImage: s,
2524
- publicKey: a,
2525
- passed: l,
2526
- metadata: u,
2527
- video: d,
2528
- sessionId: c
2529
- } = i, f = new FormData();
2522
+ const { faceImage: s, publicKey: a, passed: l, metadata: u, video: d, sessionId: c } = i, f = new FormData();
2530
2523
  f.append("files", s), f.append("files", d);
2531
2524
  const p = await fetch(
2532
2525
  `${qa}/v1/uploads/media`,
@@ -2540,24 +2533,25 @@ function Ga(e) {
2540
2533
  );
2541
2534
  if (!p.ok)
2542
2535
  throw p;
2543
- const _ = (await p.json()).data, y = await fetch(`${t}/v1/sdk/identity/liveness/`, {
2536
+ const _ = (await p.json()).data, y = {
2537
+ sessionId: c,
2538
+ components: ["liveness"],
2539
+ faceImage: _[0].cachedLocation,
2540
+ livenessClip: _[1].cachedLocation,
2541
+ passed: l,
2542
+ metadata: u
2543
+ };
2544
+ a && (y.publicMerchantID = a);
2545
+ const m = await fetch(`${t}/v1/sdk/identity/liveness/`, {
2544
2546
  method: "POST",
2545
2547
  headers: {
2546
2548
  "Content-Type": "application/json"
2547
2549
  },
2548
- body: JSON.stringify({
2549
- publicMerchantID: a,
2550
- sessionId: c,
2551
- components: ["liveness"],
2552
- faceImage: _[0].cachedLocation,
2553
- livenessClip: _[1].cachedLocation,
2554
- passed: l,
2555
- metadata: u
2556
- })
2550
+ body: JSON.stringify(y)
2557
2551
  });
2558
- if (!y.ok)
2559
- throw y;
2560
- return (await y.json()).data;
2552
+ if (!m.ok)
2553
+ throw m;
2554
+ return (await m.json()).data;
2561
2555
  }, fetchSessionToken: async () => {
2562
2556
  throw new Error(
2563
2557
  "fetchSessionToken is deprecated. Provide sessionToken from your backend."
@@ -2678,7 +2672,6 @@ const Ka = 360, Xa = "#125766", Za = "https://cdn.youverify.co/1721901834404-q2n
2678
2672
  setImageCaptured: () => {
2679
2673
  },
2680
2674
  sandboxEnvironment: !0,
2681
- publicKey: "",
2682
2675
  isMobileAppWebView: !1
2683
2676
  });
2684
2677
  let pr, hr = !1;
@@ -4578,8 +4571,6 @@ class gc {
4578
4571
  validateOptions() {
4579
4572
  if (!this.tasks)
4580
4573
  throw new Error("Tasks cannot be empty");
4581
- if (!this.props.publicKey)
4582
- throw new Error("A Public Key is required");
4583
4574
  if (this.props.user && !this.props.user.firstName)
4584
4575
  throw new Error("First Name is required when User object is supplied");
4585
4576
  if (!this.props.sessionId)
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.yvlw-absolute{position:absolute}.yvlw-m-0{margin:0}.yvlw-mx-auto{margin-left:auto;margin-right:auto}.yvlw-mb-12{margin-bottom:3rem}.yvlw-mt-12{margin-top:3rem}.yvlw-mt-3{margin-top:.75rem}.yvlw-flex{display:flex}.yvlw-hidden{display:none}.yvlw-h-10{height:2.5rem}.yvlw-h-20{height:5rem}.yvlw-h-4{height:1rem}.yvlw-h-5{height:1.25rem}.yvlw-h-6{height:1.5rem}.yvlw-h-7{height:1.75rem}.yvlw-h-full{height:100%}.yvlw-w-10{width:2.5rem}.yvlw-w-4{width:1rem}.yvlw-w-5{width:1.25rem}.yvlw-w-7{width:1.75rem}.yvlw-w-full{width:100%}.yvlw-flex-1{flex:1 1 0%}.yvlw--translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw--translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-125{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.yvlw-flex-col{flex-direction:column}.yvlw-items-center{align-items:center}.yvlw-justify-center{justify-content:center}.yvlw-gap-1{gap:.25rem}.yvlw-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.yvlw-space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.yvlw-rounded{border-radius:.25rem}.yvlw-border{border-width:1px}.yvlw-border-t{border-top-width:1px}.yvlw-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.yvlw-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.yvlw-bg-black\\/20{background-color:#0003}.yvlw-p-0{padding:0}.yvlw-px-3{padding-left:.75rem;padding-right:.75rem}.yvlw-px-4{padding-left:1rem;padding-right:1rem}.yvlw-py-2{padding-top:.5rem;padding-bottom:.5rem}.yvlw-pb-6{padding-bottom:1.5rem}.yvlw-pt-4{padding-top:1rem}.yvlw-text-center{text-align:center}.yvlw-text-sm{font-size:.875rem;line-height:1.25rem}.yvlw-text-xs{font-size:.75rem;line-height:1rem}.yvlw-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.yvlw-opacity-0{opacity:0}.yvlw-opacity-100{opacity:1}.yvlw-transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.yvlw-duration-200{transition-duration:.2s}.yvlw-duration-300{transition-duration:.3s}.yvlw-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.subtext{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.subtext:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.divider{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.divider:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\\:yvlw-block:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){display:block}.dark\\:yvlw-hidden:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){display:none}.dark\\:yvlw-border-gray-700:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\\:yvlw-border-gray-800:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_1duny_1{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:DM Sans,sans-serif;position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;min-height:100vh;min-height:-webkit-fill-available;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1)}._root_1duny_1[data-closed]{opacity:0}._root_1duny_1._modal_1duny_10{background-color:#0000004d}@media (min-width: 768px){._root_1duny_1._modal_1duny_10{padding:1rem}._root_1duny_1._modal_1duny_10 ._container_1duny_13{border-radius:.75rem}}._root_1duny_1._modal_1duny_10 ._container_1duny_13{max-width:1500px;max-height:700px}@media (min-width: 768px){._root_1duny_1._page_1duny_18{padding:0}}._root_1duny_1 ._close_1duny_21{position:absolute;top:.5rem;left:.5rem;display:flex;align-items:center;justify-content:center;z-index:20;height:1.5rem;width:1.5rem;border-radius:9999px;background-color:#00000080}._root_1duny_1 ._close_1duny_21 svg{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}._root_1duny_1 ._close_1duny_21 svg:hover{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}._root_1duny_1 ._container_1duny_13{height:100%;width:100%;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}._root_1duny_1 ._container_1duny_13:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_1h6qm_1 *,._root_1h6qm_1 :before,._root_1h6qm_1 :after{box-sizing:border-box;border-width:0;border-style:solid}._root_1h6qm_1 :before,._root_1h6qm_1 :after{--tw-content: ""}._root_1h6qm_1 html,._root_1h6qm_1 :host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";-webkit-tap-highlight-color:transparent}._root_1h6qm_1 body{margin:0;line-height:inherit}._root_1h6qm_1 hr{height:0;color:inherit;border-top-width:1px}._root_1h6qm_1 abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}._root_1h6qm_1 h1,._root_1h6qm_1 h2,._root_1h6qm_1 h3,._root_1h6qm_1 h4,._root_1h6qm_1 h5,._root_1h6qm_1 h6{font-size:inherit;font-weight:inherit}._root_1h6qm_1 a{color:inherit;text-decoration:inherit}._root_1h6qm_1 b,._root_1h6qm_1 strong{font-weight:bolder}._root_1h6qm_1 code,._root_1h6qm_1 kbd,._root_1h6qm_1 samp,._root_1h6qm_1 pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}._root_1h6qm_1 small{font-size:80%}._root_1h6qm_1 sub,._root_1h6qm_1 sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}._root_1h6qm_1 sub{bottom:-.25em}._root_1h6qm_1 sup{top:-.5em}._root_1h6qm_1 table{text-indent:0;border-color:inherit;border-collapse:collapse}._root_1h6qm_1 button,._root_1h6qm_1 input,._root_1h6qm_1 optgroup,._root_1h6qm_1 select,._root_1h6qm_1 textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}._root_1h6qm_1 button,._root_1h6qm_1 select{text-transform:none}._root_1h6qm_1 button,._root_1h6qm_1 input:where([type=button]),._root_1h6qm_1 input:where([type=reset]),._root_1h6qm_1 input:where([type=submit]){-moz-appearance:button;appearance:button;-webkit-appearance:button;background-color:transparent;background-image:none}._root_1h6qm_1 :-moz-focusring{outline:auto}._root_1h6qm_1 :-moz-ui-invalid{box-shadow:none}._root_1h6qm_1 progress{vertical-align:baseline}._root_1h6qm_1 ::-webkit-inner-spin-button,._root_1h6qm_1 ::-webkit-outer-spin-button{height:auto}._root_1h6qm_1 [type=search]{-moz-appearance:textfield;appearance:textfield;-webkit-appearance:textfield;outline-offset:-2px}._root_1h6qm_1 ::-webkit-search-decoration{-webkit-appearance:none}._root_1h6qm_1 ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}._root_1h6qm_1 summary{display:list-item}._root_1h6qm_1 blockquote,._root_1h6qm_1 dl,._root_1h6qm_1 dd,._root_1h6qm_1 h1,._root_1h6qm_1 h2,._root_1h6qm_1 h3,._root_1h6qm_1 h4,._root_1h6qm_1 h5,._root_1h6qm_1 h6,._root_1h6qm_1 hr,._root_1h6qm_1 figure,._root_1h6qm_1 p,._root_1h6qm_1 pre{margin:0}._root_1h6qm_1 fieldset{margin:0;padding:0}._root_1h6qm_1 legend{padding:0}._root_1h6qm_1 ol,._root_1h6qm_1 ul,._root_1h6qm_1 menu{list-style:none;margin:0;padding:0}._root_1h6qm_1 dialog{padding:0}._root_1h6qm_1 textarea{resize:vertical}._root_1h6qm_1 input::-moz-placeholder,._root_1h6qm_1 textarea::-moz-placeholder{opacity:1;color:#9ca3af}._root_1h6qm_1 input::placeholder,._root_1h6qm_1 textarea::placeholder{opacity:1;color:#9ca3af}._root_1h6qm_1 button,._root_1h6qm_1 [role=button]{cursor:pointer}._root_1h6qm_1 :disabled{cursor:default}._root_1h6qm_1 img,._root_1h6qm_1 svg,._root_1h6qm_1 video,._root_1h6qm_1 canvas,._root_1h6qm_1 audio,._root_1h6qm_1 iframe,._root_1h6qm_1 embed,._root_1h6qm_1 object{display:block}._root_1h6qm_1 [hidden]{display:none}._root_vqy7d_1{height:100%}._root_vqy7d_1 ._container_vqy7d_4{display:flex;height:100%}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{display:none;width:20%;flex-direction:column;justify-content:space-between}@media (min-width: 1280px){._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{display:flex}}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7{padding-top:.75rem;padding-bottom:.75rem}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11{padding-left:1.5rem;padding-right:1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol{position:relative;margin:0;list-style-type:none;padding:0}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li{counter-increment:item;margin-bottom:24px;position:relative;font-size:.875rem;line-height:1.25rem;display:flex;align-items:center}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{width:28px;height:28px;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{margin-right:1rem;display:flex;align-items:center;justify-content:center;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:before{content:counter(item);flex-shrink:0}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32{font-weight:500}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._active_vqy7d_32:before{background-color:var(--branding-color);border-style:none;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39{font-weight:500;text-decoration-line:line-through}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li._completed_vqy7d_39:before{background-color:var(--branding-color);border-style:none;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:after{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):after{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:after{top:28px;bottom:-24px;left:14px;content:"";position:absolute;width:1px}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 ._info_vqy7d_11 ol li:last-child:after{content:none}._root_vqy7d_1 ._container_vqy7d_4 ._lhs_vqy7d_7 footer{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{display:none;width:20%}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{padding-top:.75rem;padding-bottom:.75rem}@media (min-width: 1280px){._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62{display:block}}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65{display:flex;align-items:center;gap:.5rem;padding:1rem 1.5rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68{height:2.5rem;width:2.5rem;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 ._avatar_vqy7d_68{display:flex;align-items:center;justify-content:center;font-size:1.125rem;line-height:1.75rem;font-weight:500}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 h4{margin-bottom:-.25rem;text-overflow:ellipsis;font-weight:600;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 h4:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 ._profile_vqy7d_65 p{margin-top:0;margin-bottom:0;font-size:.75rem;line-height:1rem}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 footer>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}._root_vqy7d_1 ._container_vqy7d_4 ._rhs_vqy7d_62 footer{padding-left:1.5rem;padding-right:1.5rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81{flex:1 1 0%}@media (min-width: 768px){._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81{padding-top:1rem;padding-bottom:1rem}}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84{margin-left:auto;margin-right:auto;height:100%;width:100%;overflow:hidden;border-radius:1rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._content_vqy7d_84{max-width:500px}._root_vqy7d_1 ._container_vqy7d_4 ._main_vqy7d_81 ._completed_vqy7d_39{display:flex;height:100%;width:100%;align-items:center;justify-content:center}._root_lryhb_1 ._container_lryhb_1{display:flex;align-items:center;justify-content:space-between}._root_lryhb_1 ._container_lryhb_1 ._brand_lryhb_6{display:flex;align-items:center;gap:7px;font-weight:600}._root_bcsvc_1{position:relative;height:100%;width:100%}._root_bcsvc_1 video{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;transform:scaleX(-1)}._container_mcmsr_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(255,255,255,0) 100%)}._container_mcmsr_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(0,0,0,0) 100%)}._container_mcmsr_1{z-index:1}._container_mcmsr_1:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(255,255,255,.5) 101px)}._container_mcmsr_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(0,0,0,.8) 101px)}._container_mcmsr_1:before{transition:opacity .3s linear}._container_mcmsr_1._focused_mcmsr_12:before{opacity:1}._container_mcmsr_1 ._progress_mcmsr_15{position:relative;height:280px;width:280px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid gray}._container_mcmsr_1 ._progress_mcmsr_15 div{position:absolute;height:3px;transform-origin:50%;border-radius:2px;width:5px;background-color:gray;transition-property:background-color,transform,width;transition-duration:.3s;transition-timing-function:ease-in-out}._container_mcmsr_1 ._progress_mcmsr_15 div._completed_mcmsr_36{width:20px;background-color:#07da63}._container_mcmsr_1 ._marker_mcmsr_40{position:relative;width:280px;height:280px}._container_mcmsr_1 ._marker_mcmsr_40>div{position:absolute;height:1.75rem;width:1.75rem;border-width:2px;--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._container_mcmsr_1 ._marker_mcmsr_40>div:first-child{top:-.25rem;left:-.25rem;border-top-left-radius:50%;border-bottom-width:0px;border-right-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:nth-child(2){top:-.25rem;right:-.25rem;border-top-right-radius:50%;border-bottom-width:0px;border-left-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:nth-child(3){bottom:-.25rem;left:-.25rem;border-bottom-left-radius:50%;border-top-width:0px;border-right-width:0px}._container_mcmsr_1 ._marker_mcmsr_40>div:last-child{bottom:-.25rem;right:-.25rem;border-bottom-right-radius:50%;border-top-width:0px;border-left-width:0px}._root_5hgaj_1{height:100%;text-align:center}._root_5hgaj_1 ._container_5hgaj_4{position:relative;height:100%}._root_5hgaj_1 ._container_5hgaj_4 ._progress_5hgaj_7{background-color:var(--branding-color);position:absolute;top:0;left:0;height:4px;border-radius:.5rem;z-index:2}._root_5hgaj_1 ._container_5hgaj_4 ._intro_5hgaj_12{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem 1rem}._root_5hgaj_1 ._container_5hgaj_4 ._content_5hgaj_15{height:70%;width:100%}._root_5hgaj_1 ._container_5hgaj_4 ._branding_5hgaj_18{position:absolute;left:0;right:0;bottom:1.5rem;text-align:center;font-size:.75rem;line-height:1rem;font-weight:500;display:flex;align-items:center;justify-content:center}._root_5hgaj_1 ._container_5hgaj_4 ._branding_5hgaj_18>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}._root_5hgaj_1 ._container_5hgaj_4 ._instructionsContainer_5hgaj_22{border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}._root_5hgaj_1 ._container_5hgaj_4 ._instructionsContainer_5hgaj_22:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}._root_5hgaj_1 ._container_5hgaj_4 ._instructions_5hgaj_22{margin-left:auto;margin-right:auto;padding:1rem 1rem 1.5rem;text-align:center;max-width:400px}._root_5hgaj_1 ._container_5hgaj_4 h2{margin-top:.5rem;margin-bottom:.5rem;font-size:1.5rem;line-height:2rem;font-weight:900}._root_5hgaj_1 ._container_5hgaj_4 h2:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}._root_5hgaj_1 ._container_5hgaj_4 p{font-size:.875rem;line-height:1.25rem;font-weight:300;max-width:400px}._root_5hgaj_1 ._container_5hgaj_4 button{color:var(--branding-color);border-color:var(--branding-color);border-radius:9999px;border-width:2px;padding:.5rem 2rem;font-weight:500}._root_5hgaj_1 ._container_5hgaj_4 button:hover{background-color:var(--branding-color);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_h5elg_1{text-align:center;display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem .75rem}._root_h5elg_1 h2{margin-top:.5rem;margin-bottom:.5rem;font-size:1.5rem;line-height:2rem;font-weight:900}._root_h5elg_1 h2:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}._root_h5elg_1 p{font-size:.875rem;line-height:1.25rem;font-weight:300;max-width:400px}._root_h5elg_1 button{color:var(--branding-color);border-color:var(--branding-color);border-radius:9999px;border-width:2px;padding:.5rem 2rem;font-weight:500}._root_h5elg_1 button:hover{background-color:var(--branding-color);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._root_h5elg_1 button:hover ._spinner_h5elg_22{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity));border-left-color:transparent}._container_1vep2_1{height:100%;width:100%;border-radius:50%;border-width:2px;border-color:var(--branding-color);border-left-color:transparent;animation:_spin_1vep2_1 .7s linear infinite}._container_1vep2_1._md_1vep2_7{height:1rem;width:1rem}._container_1vep2_1._lg_1vep2_10{height:1.75rem;width:1.75rem}@keyframes _spin_1vep2_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._root_thujo_1{position:absolute;top:0;right:0;bottom:0;left:0}._root_thujo_1 ._sticker_thujo_4{position:absolute}._root_thujo_1 ._sticker_thujo_4._no_thujo_7{top:2.5rem;left:1.5rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity));padding:.5rem 1rem;--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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);stroke:#fff;font-size:2.25rem;line-height:2.5rem;font-weight:900;letter-spacing:.1em;--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity));transform:rotate(335deg)}._root_thujo_1 ._sticker_thujo_4._yes_thujo_12{top:2.5rem;right:1.5rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity));padding:.5rem 1rem;--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));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);stroke:#fff;font-size:2.25rem;line-height:2.5rem;font-weight:900;letter-spacing:.1em;--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity));transform:rotate(45deg)}._container_1ej18_1{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(255,255,255,0) 100%)}._container_1ej18_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *){background-image:radial-gradient(circle at 50% 50%,transparent 1400px,rgba(0,0,0,0) 100%)}._container_1ej18_1{z-index:1}._container_1ej18_1:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(255,255,255,.5) 101px)}._container_1ej18_1:where([liveness-web-sdk-color-scheme=dark],[liveness-web-sdk-color-scheme=dark] *):before{background-image:radial-gradient(circle at 50% 50%,transparent 140px,rgba(0,0,0,.8) 101px)}._container_1ej18_1:before{transition:opacity .3s linear}._container_1ej18_1 ._progress_1ej18_12{position:relative;height:240px;width:240px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:1px solid gray}._container_1ej18_1 ._progress_1ej18_12 div{position:absolute;height:3px;transform-origin:50%;border-radius:2px;width:5px;background-color:gray;transition-property:background-color,transform,width;transition-duration:.3s;transition-timing-function:ease-in-out}._container_1ej18_1 ._progress_1ej18_12 div._completed_1ej18_33{width:20px;background-color:#07da63}._container_1ej18_1 ._marker_1ej18_37{position:relative;width:240px;height:240px}._container_1ej18_1 ._marker_1ej18_37>div{position:absolute;height:1.75rem;width:1.75rem;border-width:4px;--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._container_1ej18_1 ._marker_1ej18_37>div:first-child{top:-.25rem;left:-.25rem;border-top-left-radius:50%;border-bottom-width:0px;border-right-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:nth-child(2){top:-.25rem;right:-.25rem;border-top-right-radius:50%;border-bottom-width:0px;border-left-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:nth-child(3){bottom:-.25rem;left:-.25rem;border-bottom-left-radius:50%;border-top-width:0px;border-right-width:0px}._container_1ej18_1 ._marker_1ej18_37>div:last-child{bottom:-.25rem;right:-.25rem;border-bottom-right-radius:50%;border-top-width:0px;border-left-width:0px}')),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- (function(me,A){typeof exports=="object"&&typeof module<"u"?module.exports=A():typeof define=="function"&&define.amd?define(A):(me=typeof globalThis<"u"?globalThis:me||self,me.YouverifyLiveness=A())})(this,function(){"use strict";var me,A,Rn,Ce,Dn,On,Ht,Wt,zt,Ut,Hn,Ye={},Wn=[],Ko=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,dt=Array.isArray;function ve(e,t){for(var n in t)e[n]=t[n];return e}function zn(e){var t=e.parentNode;t&&t.removeChild(e)}function ce(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ge(e,s,r,o,null)}function Ge(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Rn,__i:-1,__u:0};return o==null&&A.vnode!=null&&A.vnode(i),i}function jt(){return{current:null}}function V(e){return e.children}function ue(e,t){this.props=e,this.context=t}function xe(e,t){if(t==null)return e.__?xe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?xe(e):null}function Un(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Un(e)}}function Vt(e){(!e.__d&&(e.__d=!0)&&Ce.push(e)&&!ft.__r++||Dn!==A.debounceRendering)&&((Dn=A.debounceRendering)||On)(ft)}function ft(){var e,t,n,r,o,i,s,a;for(Ce.sort(Ht);e=Ce.shift();)e.__d&&(t=Ce.length,r=void 0,i=(o=(n=e).__v).__e,s=[],a=[],n.__P&&((r=ve({},o)).__v=o.__v+1,A.vnode&&A.vnode(r),Bt(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,s,i??xe(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Yn(s,r,a),r.__e!=i&&Un(r)),Ce.length>t&&Ce.sort(Ht));ft.__r=0}function jn(e,t,n,r,o,i,s,a,l,u,d){var c,f,p,_,y,v=r&&r.__k||Wn,m=t.length;for(n.__d=l,Xo(n,t,v),l=n.__d,c=0;c<m;c++)(p=n.__k[c])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?Ye:v[p.__i]||Ye,p.__i=c,Bt(e,p,f,o,i,s,a,l,u,d),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&qt(f.ref,null,p),d.push(p.ref,p.__c||_,p)),y==null&&_!=null&&(y=_),65536&p.__u||f.__k===p.__k?l=Vn(p,l,e):typeof p.type=="function"&&p.__d!==void 0?l=p.__d:_&&(l=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=y}function Xo(e,t,n){var r,o,i,s,a,l=t.length,u=n.length,d=u,c=0;for(e.__k=[],r=0;r<l;r++)s=r+c,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ge(null,o,null,null,null):dt(o)?Ge(V,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ge(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Zo(o,n,s,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a==s-1?c=a-s:a==s+1?c++:a>s?d>l-s?c+=a-s:c--:a<s&&c++,a!==r+c&&(o.__u|=65536))):(i=n[s])&&i.key==null&&i.__e&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i,!1),n[s]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i))}function Vn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Vn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xe(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function _e(e,t){return t=t||[],e==null||typeof e=="boolean"||(dt(e)?e.some(function(n){_e(n,t)}):t.push(e)),t}function Zo(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,l=t[n];if(l===null||l&&o==l.key&&i===l.type&&!(131072&l.__u))return n;if(r>(l!=null&&!(131072&l.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&o==l.key&&i===l.type)return a;a++}}return-1}function Bn(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ko.test(t)?n:n+"px"}function pt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Bn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Bn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Wt,e.addEventListener(t,i?Ut:zt,i)):e.removeEventListener(t,i?Ut:zt,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function qn(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Wt++;else if(t.t<n.u)return;return n(A.event?A.event(t):t)}}}function Bt(e,t,n,r,o,i,s,a,l,u){var d,c,f,p,_,y,v,m,g,$,T,S,x,L,W,F,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=A.__b)&&d(t);e:if(typeof E=="function")try{if(m=t.props,g="prototype"in E&&E.prototype.render,$=(d=E.contextType)&&r[d.__c],T=d?$?$.props.value:d.__:r,n.__c?v=(c=t.__c=n.__c).__=c.__E:(g?t.__c=c=new E(m,T):(t.__c=c=new ue(m,T),c.constructor=E,c.render=Qo),$&&$.sub(c),c.props=m,c.state||(c.state={}),c.context=T,c.__n=r,f=c.__d=!0,c.__h=[],c._sb=[]),g&&c.__s==null&&(c.__s=c.state),g&&E.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ve({},c.__s)),ve(c.__s,E.getDerivedStateFromProps(m,c.__s))),p=c.props,_=c.state,c.__v=t,f)g&&E.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),g&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(g&&E.getDerivedStateFromProps==null&&m!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,T),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=m,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(I){I&&(I.__=t)}),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(m,c.__s,T),g&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,_,y)})}if(c.context=T,c.props=m,c.__P=e,c.__e=!1,x=A.__r,L=0,g){for(c.state=c.__s,c.__d=!1,x&&x(t),d=c.render(c.props,c.state,c.context),W=0;W<c._sb.length;W++)c.__h.push(c._sb[W]);c._sb=[]}else do c.__d=!1,x&&x(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++L<25);c.state=c.__s,c.getChildContext!=null&&(r=ve(ve({},r),c.getChildContext())),g&&!f&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(p,_)),jn(e,dt(F=d!=null&&d.type===V&&d.key==null?d.props.children:d)?F:[F],t,n,r,o,i,s,a,l,u),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),v&&(c.__E=c.__=null)}catch(I){if(t.__v=null,l||i!=null){for(t.__u|=l?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;A.__e(I,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Jo(n.__e,t,n,r,o,i,s,l,u);(d=A.diffed)&&d(t)}function Yn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)qt(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){A.__e(i,o.__v)}})}function Jo(e,t,n,r,o,i,s,a,l){var u,d,c,f,p,_,y,v=n.props,m=t.props,g=t.type;if(g==="svg"?o="http://www.w3.org/2000/svg":g==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!g&&(g?p.localName===g:p.nodeType===3)){e=p,i[u]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=document.createElementNS(o,g,m.is&&m),i=null,a=!1}if(g===null)v===m||a&&e.data===m||(e.data=m);else{if(i=i&&me.call(e.childNodes),v=n.props||Ye,!a&&i!=null)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],u!="children"){if(u=="dangerouslySetInnerHTML")c=p;else if(u!=="key"&&!(u in m)){if(u=="value"&&"defaultValue"in m||u=="checked"&&"defaultChecked"in m)continue;pt(e,u,null,p,o)}}for(u in m)p=m[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?_=p:u=="checked"?y=p:u==="key"||a&&typeof p!="function"||v[u]===p||pt(e,u,p,v[u],o);if(d)a||c&&(d.__html===c.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),jn(e,dt(f)?f:[f],t,n,r,g==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&xe(n,0),a,l),i!=null)for(u=i.length;u--;)i[u]!=null&&zn(i[u]);a||(u="value",_!==void 0&&(_!==e[u]||g==="progress"&&!_||g==="option"&&_!==v[u])&&pt(e,u,_,v[u],o),u="checked",y!==void 0&&y!==e[u]&&pt(e,u,y,v[u],o))}return e}function qt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){A.__e(o,n)}}function Yt(e,t,n){var r,o;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){A.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Yt(r[o],t,n||typeof e.type!="function");n||e.__e==null||zn(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Qo(e,t,n){return this.constructor(e,n)}function We(e,t,n){var r,o,i,s;A.__&&A.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Bt(t,e=(!r&&n||t).__k=ce(V,null,[e]),o||Ye,Ye,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Yn(i,e,s)}function Gn(e,t){We(e,t,Gn)}function ei(e,t,n){var r,o,i,s,a=ve({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?me.call(arguments,2):n),Ge(e.type,a,r||e.key,o||e.ref,null)}function ie(e,t){var n={__c:t="__cC"+Hn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Vt(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}me=Wn.slice,A={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Rn=0,ue.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ve({},this.state),typeof e=="function"&&(e=e(ve({},n),this.props)),e&&ve(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vt(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vt(this))},ue.prototype.render=V,Ce=[],On=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ht=function(e,t){return e.__v.__b-t.__v.__b},ft.__r=0,Wt=0,zt=qn(!1),Ut=qn(!0),Hn=0;var ti=0;function h(e,t,n,r,o,i){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ti,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return A.vnode&&A.vnode(u),u}var ye,B,Gt,Kn,ze=0,Xn=[],Z=A,Zn=Z.__b,Jn=Z.__r,Qn=Z.diffed,er=Z.__c,tr=Z.unmount,nr=Z.__;function Me(e,t){Z.__h&&Z.__h(B,e,ze||t),ze=0;var n=B.__H||(B.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function C(e){return ze=1,Ke(or,e)}function Ke(e,t,n){var r=Me(ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):or(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=B,!B.u)){var o=function(a,l,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,a,l,u);var c=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(c=!0)}}),!(!c&&r.__c.props===a)&&(!i||i.call(this,a,l,u))};B.u=!0;var i=B.shouldComponentUpdate,s=B.componentWillUpdate;B.componentWillUpdate=function(a,l,u){if(this.__e){var d=i;i=void 0,o(a,l,u),i=d}s&&s.call(this,a,l,u)},B.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=Me(ye++,3);!Z.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__H.__h.push(n))}function Pe(e,t){var n=Me(ye++,4);!Z.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__h.push(n))}function w(e){return ze=5,U(function(){return{current:e}},[])}function Kt(e,t,n){ze=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function U(e,t){var n=Me(ye++,7);return Jt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function j(e,t){return ze=8,U(function(){return e},t)}function te(e){var t=B.context[e.__c],n=Me(ye++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(B)),t.props.value):e.__}function Xt(e,t){Z.useDebugValue&&Z.useDebugValue(t?t(e):e)}function ni(e){var t=Me(ye++,10),n=C();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=Me(ye++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ri(){for(var e;e=Xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ht),e.__H.__h.forEach(Zt),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){B=null,Zn&&Zn(e)},Z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nr&&nr(e,t)},Z.__r=function(e){Jn&&Jn(e),ye=0;var t=(B=e.__c).__H;t&&(Gt===B?(t.__h=[],B.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(ht),t.__h.forEach(Zt),t.__h=[],ye=0)),Gt=B},Z.diffed=function(e){Qn&&Qn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xn.push(t)!==1&&Kn===Z.requestAnimationFrame||((Kn=Z.requestAnimationFrame)||oi)(ri)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Gt=B=null},Z.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ht),n.__h=n.__h.filter(function(r){return!r.__||Zt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Z.__e(r,n.__v)}}),er&&er(e,t)},Z.unmount=function(e){tr&&tr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ht(r)}catch(o){t=o}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var rr=typeof requestAnimationFrame=="function";function oi(e){var t,n=function(){clearTimeout(r),rr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);rr&&(t=requestAnimationFrame(n))}function ht(e){var t=B,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),B=t}function Zt(e){var t=B;e.__c=e.__(),B=t}function Jt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function or(e,t){return typeof t=="function"?t(e):t}function ir(e,t){for(var n in t)e[n]=t[n];return e}function Qt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function mt(e,t){this.props=e,this.context=t}function sr(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Qt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,ce(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(mt.prototype=new ue).isPureReactComponent=!0,mt.prototype.shouldComponentUpdate=function(e,t){return Qt(this.props,e)||Qt(this.state,t)};var ar=A.__b;A.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ar&&ar(e)};var ii=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function en(e){function t(n){var r=ir({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ii,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var lr=function(e,t){return e==null?null:_e(_e(e).map(t))},cr={map:lr,forEach:lr,count:function(e){return e?_e(e).length:0},only:function(e){var t=_e(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_e},si=A.__e;A.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}si(e,t,n,r)};var ur=A.unmount;function dr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ir({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return dr(r,t,n)})),e}function fr(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return fr(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Xe(){this.__u=0,this.t=null,this.__b=null}function pr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return ce(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Ue(){this.u=null,this.o=null}A.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ur&&ur(e)},(Xe.prototype=new ue).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=pr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=fr(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Xe.prototype.componentWillUnmount=function(){this.t=[]},Xe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=dr(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&ce(V,null,e.fallback);return o&&(o.__u&=-33),[ce(V,null,t.__a?null:e.children),o]};var mr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ai(e){return this.getChildContext=function(){return e.context},e.children}function li(e){var t=this,n=e.i;t.componentWillUnmount=function(){We(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),We(ce(ai,{context:t.context},e.__v),t.l)}function vt(e,t){var n=ce(li,{__v:e,i:t});return n.containerInfo=t,n}(Ue.prototype=new ue).__a=function(e){var t=this,n=pr(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),mr(t,e,r)):o()};n?n(i):i()}},Ue.prototype.render=function(e){this.u=null,this.o=new Map;var t=_e(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ue.prototype.componentDidUpdate=Ue.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){mr(e,n,t)})};var vr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,ci=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ui=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,di=/[A-Z0-9]/g,fi=typeof document<"u",pi=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,n){return t.__k==null&&(t.textContent=""),We(e,t),typeof n=="function"&&n(),e?e.__c:null}function yr(e,t,n){return Gn(e,t),typeof n=="function"&&n(),e?e.__c:null}ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gr=A.event;function hi(){}function mi(){return this.cancelBubble}function vi(){return this.defaultPrevented}A.event=function(e){return gr&&(e=gr(e)),e.persist=hi,e.isPropagationStopped=mi,e.isDefaultPrevented=vi,e.nativeEvent=e};var tn,_i={enumerable:!1,configurable:!0,get:function(){return this.class}},wr=A.vnode;A.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||fi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||pi(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":ui.test(i)?i=a:r.indexOf("-")===-1&&ci.test(i)?i=i.replace(di,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=_e(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=_e(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",_i)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=vr,wr&&wr(e)};var br=A.__r;A.__r=function(e){br&&br(e),tn=e.__c};var Er=A.diffed;A.diffed=function(e){Er&&Er(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),tn=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return tn.__n[e.__c].props.value},useCallback:j,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:U,useReducer:Ke,useRef:w,useState:C,useSyncExternalStore:_t,useTransition:sn}}},yi="17.0.2";function Tr(e){return ce.bind(null,e)}function je(e){return!!e&&e.$$typeof===vr}function kr(e){return je(e)&&e.type===V}function Sr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function nn(e){return je(e)?ei.apply(null,arguments):e}function Fr(e){return!!e.__k&&(We(null,e),!0)}function Cr(e){return e&&(e.base||e.nodeType===1&&e)||null}var xr=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Pr=V;function rn(e){e()}function on(e){return e}function sn(){return[!1,rn]}var an=Pe,Nr=je;function _t(e,t){var n=t(),r=C({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Pe(function(){o.__=n,o.v=t,ln(o)&&i({h:o})},[e,n,t]),H(function(){return ln(o)&&i({h:o}),e(function(){ln(o)&&i({h:o})})},[e]),n}function ln(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var P={useState:C,useId:Ee,useReducer:Ke,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:an,useTransition:sn,useDeferredValue:on,useSyncExternalStore:_t,startTransition:rn,useRef:w,useImperativeHandle:Kt,useMemo:U,useCallback:j,useContext:te,useDebugValue:Xt,version:"17.0.2",Children:cr,render:_r,hydrate:yr,unmountComponentAtNode:Fr,createPortal:vt,createElement:ce,createContext:ie,createFactory:Tr,cloneElement:nn,createRef:jt,Fragment:V,isValidElement:je,isElement:Nr,isFragment:kr,isMemo:Sr,findDOMNode:Cr,Component:ue,PureComponent:mt,memo:sr,forwardRef:en,flushSync:Mr,unstable_batchedUpdates:xr,StrictMode:Pr,Suspense:Xe,SuspenseList:Ue,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};const Lr=Object.freeze(Object.defineProperty({__proto__:null,Children:cr,Component:ue,Fragment:V,PureComponent:mt,StrictMode:Pr,Suspense:Xe,SuspenseList:Ue,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r,cloneElement:nn,createContext:ie,createElement:ce,createFactory:Tr,createPortal:vt,createRef:jt,default:P,findDOMNode:Cr,flushSync:Mr,forwardRef:en,hydrate:yr,isElement:Nr,isFragment:kr,isMemo:Sr,isValidElement:je,lazy:hr,memo:sr,render:_r,startTransition:rn,unmountComponentAtNode:Fr,unstable_batchedUpdates:xr,useCallback:j,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useErrorBoundary:ni,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:U,useReducer:Ke,useRef:w,useState:C,useSyncExternalStore:_t,useTransition:sn,version:yi},Symbol.toStringTag,{value:"Module"})),Ar=typeof document<"u"?P.useLayoutEffect:()=>{};function gi(e){const t=w(null);return Ar(()=>{t.current=e},[e]),j((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Ze=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Ne=e=>e&&"window"in e&&e.window===e?e:Ze(e).defaultView||window;function wi(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function bi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ei(){return bi(/^Mac/i)}function $i(){return wi(/Android/i)}function Ti(e){return e.mozInputSource===0&&e.isTrusted?!0:$i()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class ki{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Ir(e){let t=w({isFocused:!1,observer:null});Ar(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gi(r=>{e==null||e(r)});return j(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new ki("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Si(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=j(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=Ir(i),a=j(l=>{const u=Ze(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Je=null,cn=new Set,Qe=new Map,Le=!1,un=!1;const Fi={Tab:!0,Escape:!0};function dn(e,t){for(let n of cn)n(e,t)}function Ci(e){return!(e.metaKey||!Ei()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function yt(e){Le=!0,Ci(e)&&(Je="keyboard",dn("keyboard",e))}function le(e){Je="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Le=!0,dn("pointer",e))}function Rr(e){Ti(e)&&(Le=!0,Je="virtual")}function Dr(e){e.target===window||e.target===document||(!Le&&!un&&(Je="virtual",dn("virtual",e)),Le=!1,un=!1)}function Or(){Le=!1,un=!0}function fn(e){if(typeof window>"u"||Qe.get(Ne(e)))return;const t=Ne(e),n=Ze(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Le=!0,r.apply(this,arguments)},n.addEventListener("keydown",yt,!0),n.addEventListener("keyup",yt,!0),n.addEventListener("click",Rr,!0),t.addEventListener("focus",Dr,!0),t.addEventListener("blur",Or,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",le,!0),n.addEventListener("pointermove",le,!0),n.addEventListener("pointerup",le,!0)):(n.addEventListener("mousedown",le,!0),n.addEventListener("mousemove",le,!0),n.addEventListener("mouseup",le,!0)),t.addEventListener("beforeunload",()=>{Hr(e)},{once:!0}),Qe.set(t,{focus:r})}const Hr=(e,t)=>{const n=Ne(e),r=Ze(e);t&&r.removeEventListener("DOMContentLoaded",t),Qe.has(n)&&(n.HTMLElement.prototype.focus=Qe.get(n).focus,r.removeEventListener("keydown",yt,!0),r.removeEventListener("keyup",yt,!0),r.removeEventListener("click",Rr,!0),n.removeEventListener("focus",Dr,!0),n.removeEventListener("blur",Or,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",le,!0),r.removeEventListener("pointermove",le,!0),r.removeEventListener("pointerup",le,!0)):(r.removeEventListener("mousedown",le,!0),r.removeEventListener("mousemove",le,!0),r.removeEventListener("mouseup",le,!0)),Qe.delete(n))};function xi(e){const t=Ze(e);let n;return t.readyState!=="loading"?fn(e):(n=()=>{fn(e)},t.addEventListener("DOMContentLoaded",n)),()=>Hr(e,n)}typeof document<"u"&&xi();function Wr(){return Je!=="pointer"}const Mi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Pi(e,t,n){var r;const o=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Ne(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof o&&!Mi.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof a&&!Fi[n.key])}function Ni(e,t,n){fn(),H(()=>{let r=(o,i)=>{Pi(!!(n!=null&&n.isTextInput),o,i)&&e(Wr())};return cn.add(r),()=>{cn.delete(r)}},t)}function Li(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=w({isFocusWithin:!1}),s=j(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Ir(s),l=j(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let gt=!1,pn=0;function hn(){gt=!0,setTimeout(()=>{gt=!1},50)}function zr(e){e.pointerType==="touch"&&hn()}function Ai(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",zr):document.addEventListener("touchend",hn),pn++,()=>{pn--,!(pn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",zr):document.removeEventListener("touchend",hn))}}function Ii(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=C(!1),a=w({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;H(Ai,[]);let{hoverProps:l,triggerHoverEnd:u}=U(()=>{let d=(p,_)=>{if(a.pointerType=_,o||_==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let y=p.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:_}),n&&n(!0),s(!0)},c=(p,_)=>{if(a.pointerType="",a.target=null,_==="touch"||!a.isHovered)return;a.isHovered=!1;let y=p.currentTarget;r&&r({type:"hoverend",target:y,pointerType:_}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{gt&&p.pointerType==="mouse"||d(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&c(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!gt&&d(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&c(p,"mouse")}),{hoverProps:f,triggerHoverEnd:c}},[t,n,r,o,a]);return H(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function Ri(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=w({isFocused:!1,isFocusVisible:t||Wr()}),[i,s]=C(!1),[a,l]=C(()=>o.current.isFocused&&o.current.isFocusVisible),u=j(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),d=j(p=>{o.current.isFocused=p,s(p),u()},[u]);Ni(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:c}=Si({isDisabled:r,onFocusChange:d}),{focusWithinProps:f}=Li({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?f:c}}var Di=Object.defineProperty,Oi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mn=(e,t,n)=>(Oi(e,typeof t!="symbol"?t+"":t,n),n);let Hi=class{constructor(){mn(this,"current",this.detect()),mn(this,"handoffState","pending"),mn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ae=new Hi;function wt(e){return Ae.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function bt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $e(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return bt(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=$e();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Et(){let[e]=C($e);return H(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{Ae.isServer?H(e,t):Pe(e,t)};function Ie(e){let t=w(e);return ne(()=>{t.current=e},[e]),t}let G=function(e){let t=Ie(e);return P.useCallback((...n)=>t.current(...n),[t])};function Wi(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function zi(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ui({disabled:e=!1}={}){let t=w(null),[n,r]=C(!1),o=Et(),i=G(()=>{t.current=null,r(!1),o.dispose()}),s=G(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let l=wt(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",u=>{if(t.current){let d=Wi(u);r(zi(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let ji=ie(void 0);function Ur(){return te(ji)}function vn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Te(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}var $t=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($t||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function se({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??Vi;let l=jr(t,e);if(i)return Tt(l,n,r,s,a);let u=o??0;if(u&2){let{static:d=!1,...c}=l;if(d)return Tt(c,n,r,s,a)}if(u&1){let{unmount:d=!0,...c}=l;return Te(d?0:1,{0(){return null},1(){return Tt({...c,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return Tt(l,n,r,s,a)}function Tt(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...l}=_n(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let c={};if(t){let f=!1,p=[];for(let[_,y]of Object.entries(t))typeof y=="boolean"&&(f=!0),y===!0&&p.push(_.replace(/([A-Z])/g,v=>`-${v.toLowerCase()}`));if(f){c["data-headlessui-state"]=p.join(" ");for(let _ of p)c[`data-${_}`]=""}}if(i===V&&(Object.keys(Re(l)).length>0||Object.keys(Re(c)).length>0))if(!je(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Re(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Re(l)).concat(Object.keys(Re(c))).map(f=>` - ${f}`).join(`
2
+ (function(me,A){typeof exports=="object"&&typeof module<"u"?module.exports=A():typeof define=="function"&&define.amd?define(A):(me=typeof globalThis<"u"?globalThis:me||self,me.YouverifyLiveness=A())})(this,function(){"use strict";var me,A,Rn,Ce,Dn,On,Ht,Wt,zt,Ut,Hn,Ye={},Wn=[],Ko=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,dt=Array.isArray;function ve(e,t){for(var n in t)e[n]=t[n];return e}function zn(e){var t=e.parentNode;t&&t.removeChild(e)}function le(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ge(e,s,r,o,null)}function Ge(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Rn,__i:-1,__u:0};return o==null&&A.vnode!=null&&A.vnode(i),i}function jt(){return{current:null}}function V(e){return e.children}function ue(e,t){this.props=e,this.context=t}function xe(e,t){if(t==null)return e.__?xe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?xe(e):null}function Un(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Un(e)}}function Vt(e){(!e.__d&&(e.__d=!0)&&Ce.push(e)&&!ft.__r++||Dn!==A.debounceRendering)&&((Dn=A.debounceRendering)||On)(ft)}function ft(){var e,t,n,r,o,i,s,a;for(Ce.sort(Ht);e=Ce.shift();)e.__d&&(t=Ce.length,r=void 0,i=(o=(n=e).__v).__e,s=[],a=[],n.__P&&((r=ve({},o)).__v=o.__v+1,A.vnode&&A.vnode(r),Bt(n.__P,r,o,n.__n,n.__P.namespaceURI,32&o.__u?[i]:null,s,i??xe(o),!!(32&o.__u),a),r.__v=o.__v,r.__.__k[r.__i]=r,Yn(s,r,a),r.__e!=i&&Un(r)),Ce.length>t&&Ce.sort(Ht));ft.__r=0}function jn(e,t,n,r,o,i,s,a,c,u,d){var l,f,p,_,y,v=r&&r.__k||Wn,m=t.length;for(n.__d=c,Xo(n,t,v),c=n.__d,l=0;l<m;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?Ye:v[p.__i]||Ye,p.__i=l,Bt(e,p,f,o,i,s,a,c,u,d),_=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&qt(f.ref,null,p),d.push(p.ref,p.__c||_,p)),y==null&&_!=null&&(y=_),65536&p.__u||f.__k===p.__k?c=Vn(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:_&&(c=_.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=y}function Xo(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)s=r+l,(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ge(null,o,null,null,null):dt(o)?Ge(V,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ge(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Zo(o,n,s,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a==s-1?l=a-s:a==s+1?l++:a>s?d>c-s?l+=a-s:l--:a<s&&l++,a!==r+l&&(o.__u|=65536))):(i=n[s])&&i.key==null&&i.__e&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i,!1),n[s]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=xe(i)),Yt(i,i))}function Vn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Vn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xe(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function _e(e,t){return t=t||[],e==null||typeof e=="boolean"||(dt(e)?e.some(function(n){_e(n,t)}):t.push(e)),t}function Zo(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type&&!(131072&c.__u))return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function Bn(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ko.test(t)?n:n+"px"}function pt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Bn(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Bn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Wt,e.addEventListener(t,i?Ut:zt,i)):e.removeEventListener(t,i?Ut:zt,i);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function qn(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Wt++;else if(t.t<n.u)return;return n(A.event?A.event(t):t)}}}function Bt(e,t,n,r,o,i,s,a,c,u){var d,l,f,p,_,y,v,m,g,$,T,S,x,L,W,F,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=A.__b)&&d(t);e:if(typeof E=="function")try{if(m=t.props,g="prototype"in E&&E.prototype.render,$=(d=E.contextType)&&r[d.__c],T=d?$?$.props.value:d.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:(g?t.__c=l=new E(m,T):(t.__c=l=new ue(m,T),l.constructor=E,l.render=Qo),$&&$.sub(l),l.props=m,l.state||(l.state={}),l.context=T,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ve({},l.__s)),ve(l.__s,E.getDerivedStateFromProps(m,l.__s))),p=l.props,_=l.state,l.__v=t,f)g&&E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&E.getDerivedStateFromProps==null&&m!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(m,T),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(m,l.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=m,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(I){I&&(I.__=t)}),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(m,l.__s,T),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,_,y)})}if(l.context=T,l.props=m,l.__P=e,l.__e=!1,x=A.__r,L=0,g){for(l.state=l.__s,l.__d=!1,x&&x(t),d=l.render(l.props,l.state,l.context),W=0;W<l._sb.length;W++)l.__h.push(l._sb[W]);l._sb=[]}else do l.__d=!1,x&&x(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++L<25);l.state=l.__s,l.getChildContext!=null&&(r=ve(ve({},r),l.getChildContext())),g&&!f&&l.getSnapshotBeforeUpdate!=null&&(y=l.getSnapshotBeforeUpdate(p,_)),jn(e,dt(F=d!=null&&d.type===V&&d.key==null?d.props.children:d)?F:[F],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),v&&(l.__E=l.__=null)}catch(I){if(t.__v=null,c||i!=null){for(t.__u|=c?160:32;a&&a.nodeType===8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else t.__e=n.__e,t.__k=n.__k;A.__e(I,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Jo(n.__e,t,n,r,o,i,s,c,u);(d=A.diffed)&&d(t)}function Yn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)qt(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){A.__e(i,o.__v)}})}function Jo(e,t,n,r,o,i,s,a,c){var u,d,l,f,p,_,y,v=n.props,m=t.props,g=t.type;if(g==="svg"?o="http://www.w3.org/2000/svg":g==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!g&&(g?p.localName===g:p.nodeType===3)){e=p,i[u]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=document.createElementNS(o,g,m.is&&m),i=null,a=!1}if(g===null)v===m||a&&e.data===m||(e.data=m);else{if(i=i&&me.call(e.childNodes),v=n.props||Ye,!a&&i!=null)for(v={},u=0;u<e.attributes.length;u++)v[(p=e.attributes[u]).name]=p.value;for(u in v)if(p=v[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=p;else if(u!=="key"&&!(u in m)){if(u=="value"&&"defaultValue"in m||u=="checked"&&"defaultChecked"in m)continue;pt(e,u,null,p,o)}}for(u in m)p=m[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?_=p:u=="checked"?y=p:u==="key"||a&&typeof p!="function"||v[u]===p||pt(e,u,p,v[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),jn(e,dt(f)?f:[f],t,n,r,g==="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&xe(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&zn(i[u]);a||(u="value",_!==void 0&&(_!==e[u]||g==="progress"&&!_||g==="option"&&_!==v[u])&&pt(e,u,_,v[u],o),u="checked",y!==void 0&&y!==e[u]&&pt(e,u,y,v[u],o))}return e}function qt(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){A.__e(o,n)}}function Yt(e,t,n){var r,o;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){A.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Yt(r[o],t,n||typeof e.type!="function");n||e.__e==null||zn(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Qo(e,t,n){return this.constructor(e,n)}function We(e,t,n){var r,o,i,s;A.__&&A.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Bt(t,e=(!r&&n||t).__k=le(V,null,[e]),o||Ye,Ye,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Yn(i,e,s)}function Gn(e,t){We(e,t,Gn)}function ei(e,t,n){var r,o,i,s,a=ve({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?me.call(arguments,2):n),Ge(e.type,a,r||e.key,o||e.ref,null)}function ie(e,t){var n={__c:t="__cC"+Hn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(a){a.__e=!0,Vt(a)})},this.sub=function(s){o.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){o&&o.splice(o.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}me=Wn.slice,A={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Rn=0,ue.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ve({},this.state),typeof e=="function"&&(e=e(ve({},n),this.props)),e&&ve(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vt(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vt(this))},ue.prototype.render=V,Ce=[],On=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ht=function(e,t){return e.__v.__b-t.__v.__b},ft.__r=0,Wt=0,zt=qn(!1),Ut=qn(!0),Hn=0;var ti=0;function h(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--ti,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return A.vnode&&A.vnode(u),u}var ye,B,Gt,Kn,ze=0,Xn=[],Z=A,Zn=Z.__b,Jn=Z.__r,Qn=Z.diffed,er=Z.__c,tr=Z.unmount,nr=Z.__;function Me(e,t){Z.__h&&Z.__h(B,e,ze||t),ze=0;var n=B.__H||(B.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function C(e){return ze=1,Ke(or,e)}function Ke(e,t,n){var r=Me(ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):or(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=B,!B.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};B.u=!0;var i=B.shouldComponentUpdate,s=B.componentWillUpdate;B.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},B.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=Me(ye++,3);!Z.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__H.__h.push(n))}function Pe(e,t){var n=Me(ye++,4);!Z.__s&&Jt(n.__H,t)&&(n.__=e,n.i=t,B.__h.push(n))}function w(e){return ze=5,U(function(){return{current:e}},[])}function Kt(e,t,n){ze=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function U(e,t){var n=Me(ye++,7);return Jt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function j(e,t){return ze=8,U(function(){return e},t)}function te(e){var t=B.context[e.__c],n=Me(ye++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(B)),t.props.value):e.__}function Xt(e,t){Z.useDebugValue&&Z.useDebugValue(t?t(e):e)}function ni(e){var t=Me(ye++,10),n=C();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=Me(ye++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ri(){for(var e;e=Xn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ht),e.__H.__h.forEach(Zt),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){B=null,Zn&&Zn(e)},Z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nr&&nr(e,t)},Z.__r=function(e){Jn&&Jn(e),ye=0;var t=(B=e.__c).__H;t&&(Gt===B?(t.__h=[],B.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(ht),t.__h.forEach(Zt),t.__h=[],ye=0)),Gt=B},Z.diffed=function(e){Qn&&Qn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xn.push(t)!==1&&Kn===Z.requestAnimationFrame||((Kn=Z.requestAnimationFrame)||oi)(ri)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Gt=B=null},Z.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ht),n.__h=n.__h.filter(function(r){return!r.__||Zt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Z.__e(r,n.__v)}}),er&&er(e,t)},Z.unmount=function(e){tr&&tr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ht(r)}catch(o){t=o}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var rr=typeof requestAnimationFrame=="function";function oi(e){var t,n=function(){clearTimeout(r),rr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);rr&&(t=requestAnimationFrame(n))}function ht(e){var t=B,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),B=t}function Zt(e){var t=B;e.__c=e.__(),B=t}function Jt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function or(e,t){return typeof t=="function"?t(e):t}function ir(e,t){for(var n in t)e[n]=t[n];return e}function Qt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function mt(e,t){this.props=e,this.context=t}function sr(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:Qt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,le(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(mt.prototype=new ue).isPureReactComponent=!0,mt.prototype.shouldComponentUpdate=function(e,t){return Qt(this.props,e)||Qt(this.state,t)};var ar=A.__b;A.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ar&&ar(e)};var ii=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function en(e){function t(n){var r=ir({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=ii,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var cr=function(e,t){return e==null?null:_e(_e(e).map(t))},lr={map:cr,forEach:cr,count:function(e){return e?_e(e).length:0},only:function(e){var t=_e(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:_e},si=A.__e;A.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}si(e,t,n,r)};var ur=A.unmount;function dr(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ir({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return dr(r,t,n)})),e}function fr(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return fr(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Xe(){this.__u=0,this.t=null,this.__b=null}function pr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function hr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return le(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Ue(){this.u=null,this.o=null}A.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ur&&ur(e)},(Xe.prototype=new ue).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=pr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=fr(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Xe.prototype.componentWillUnmount=function(){this.t=[]},Xe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=dr(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&le(V,null,e.fallback);return o&&(o.__u&=-33),[le(V,null,t.__a?null:e.children),o]};var mr=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ai(e){return this.getChildContext=function(){return e.context},e.children}function ci(e){var t=this,n=e.i;t.componentWillUnmount=function(){We(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),We(le(ai,{context:t.context},e.__v),t.l)}function vt(e,t){var n=le(ci,{__v:e,i:t});return n.containerInfo=t,n}(Ue.prototype=new ue).__a=function(e){var t=this,n=pr(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),mr(t,e,r)):o()};n?n(i):i()}},Ue.prototype.render=function(e){this.u=null,this.o=new Map;var t=_e(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Ue.prototype.componentDidUpdate=Ue.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){mr(e,n,t)})};var vr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,li=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ui=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,di=/[A-Z0-9]/g,fi=typeof document<"u",pi=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function _r(e,t,n){return t.__k==null&&(t.textContent=""),We(e,t),typeof n=="function"&&n(),e?e.__c:null}function yr(e,t,n){return Gn(e,t),typeof n=="function"&&n(),e?e.__c:null}ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var gr=A.event;function hi(){}function mi(){return this.cancelBubble}function vi(){return this.defaultPrevented}A.event=function(e){return gr&&(e=gr(e)),e.persist=hi,e.isPropagationStopped=mi,e.isDefaultPrevented=vi,e.nativeEvent=e};var tn,_i={enumerable:!1,configurable:!0,get:function(){return this.class}},wr=A.vnode;A.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||fi&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var a=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":a==="translate"&&s==="no"?s=!1:a==="ondoubleclick"?i="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||pi(n.type)?a==="onfocus"?i="onfocusin":a==="onblur"?i="onfocusout":ui.test(i)?i=a:r.indexOf("-")===-1&&li.test(i)?i=i.replace(di,"-$&").toLowerCase():s===null&&(s=void 0):a=i="oninput",a==="oninput"&&o[i=a]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=_e(n.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",_i)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=vr,wr&&wr(e)};var br=A.__r;A.__r=function(e){br&&br(e),tn=e.__c};var Er=A.diffed;A.diffed=function(e){Er&&Er(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),tn=null};var $r={ReactCurrentDispatcher:{current:{readContext:function(e){return tn.__n[e.__c].props.value},useCallback:j,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:U,useReducer:Ke,useRef:w,useState:C,useSyncExternalStore:_t,useTransition:sn}}},yi="17.0.2";function Tr(e){return le.bind(null,e)}function je(e){return!!e&&e.$$typeof===vr}function kr(e){return je(e)&&e.type===V}function Sr(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function nn(e){return je(e)?ei.apply(null,arguments):e}function Fr(e){return!!e.__k&&(We(null,e),!0)}function Cr(e){return e&&(e.base||e.nodeType===1&&e)||null}var xr=function(e,t){return e(t)},Mr=function(e,t){return e(t)},Pr=V;function rn(e){e()}function on(e){return e}function sn(){return[!1,rn]}var an=Pe,Nr=je;function _t(e,t){var n=t(),r=C({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Pe(function(){o.__=n,o.v=t,cn(o)&&i({h:o})},[e,n,t]),H(function(){return cn(o)&&i({h:o}),e(function(){cn(o)&&i({h:o})})},[e]),n}function cn(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var P={useState:C,useId:Ee,useReducer:Ke,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:an,useTransition:sn,useDeferredValue:on,useSyncExternalStore:_t,startTransition:rn,useRef:w,useImperativeHandle:Kt,useMemo:U,useCallback:j,useContext:te,useDebugValue:Xt,version:"17.0.2",Children:lr,render:_r,hydrate:yr,unmountComponentAtNode:Fr,createPortal:vt,createElement:le,createContext:ie,createFactory:Tr,cloneElement:nn,createRef:jt,Fragment:V,isValidElement:je,isElement:Nr,isFragment:kr,isMemo:Sr,findDOMNode:Cr,Component:ue,PureComponent:mt,memo:sr,forwardRef:en,flushSync:Mr,unstable_batchedUpdates:xr,StrictMode:Pr,Suspense:Xe,SuspenseList:Ue,lazy:hr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r};const Lr=Object.freeze(Object.defineProperty({__proto__:null,Children:lr,Component:ue,Fragment:V,PureComponent:mt,StrictMode:Pr,Suspense:Xe,SuspenseList:Ue,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$r,cloneElement:nn,createContext:ie,createElement:le,createFactory:Tr,createPortal:vt,createRef:jt,default:P,findDOMNode:Cr,flushSync:Mr,forwardRef:en,hydrate:yr,isElement:Nr,isFragment:kr,isMemo:Sr,isValidElement:je,lazy:hr,memo:sr,render:_r,startTransition:rn,unmountComponentAtNode:Fr,unstable_batchedUpdates:xr,useCallback:j,useContext:te,useDebugValue:Xt,useDeferredValue:on,useEffect:H,useErrorBoundary:ni,useId:Ee,useImperativeHandle:Kt,useInsertionEffect:an,useLayoutEffect:Pe,useMemo:U,useReducer:Ke,useRef:w,useState:C,useSyncExternalStore:_t,useTransition:sn,version:yi},Symbol.toStringTag,{value:"Module"})),Ar=typeof document<"u"?P.useLayoutEffect:()=>{};function gi(e){const t=w(null);return Ar(()=>{t.current=e},[e]),j((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Ze=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Ne=e=>e&&"window"in e&&e.window===e?e:Ze(e).defaultView||window;function wi(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function bi(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ei(){return bi(/^Mac/i)}function $i(){return wi(/Android/i)}function Ti(e){return e.mozInputSource===0&&e.isTrusted?!0:$i()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}class ki{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Ir(e){let t=w({isFocused:!1,observer:null});Ar(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gi(r=>{e==null||e(r)});return j(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new ki("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function Si(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=j(c=>{if(c.target===c.currentTarget)return r&&r(c),o&&o(!1),!0},[r,o]),s=Ir(i),a=j(c=>{const u=Ze(c.target);c.target===c.currentTarget&&u.activeElement===c.target&&(n&&n(c),o&&o(!0),s(c))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let Je=null,ln=new Set,Qe=new Map,Le=!1,un=!1;const Fi={Tab:!0,Escape:!0};function dn(e,t){for(let n of ln)n(e,t)}function Ci(e){return!(e.metaKey||!Ei()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function yt(e){Le=!0,Ci(e)&&(Je="keyboard",dn("keyboard",e))}function ce(e){Je="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Le=!0,dn("pointer",e))}function Rr(e){Ti(e)&&(Le=!0,Je="virtual")}function Dr(e){e.target===window||e.target===document||(!Le&&!un&&(Je="virtual",dn("virtual",e)),Le=!1,un=!1)}function Or(){Le=!1,un=!0}function fn(e){if(typeof window>"u"||Qe.get(Ne(e)))return;const t=Ne(e),n=Ze(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Le=!0,r.apply(this,arguments)},n.addEventListener("keydown",yt,!0),n.addEventListener("keyup",yt,!0),n.addEventListener("click",Rr,!0),t.addEventListener("focus",Dr,!0),t.addEventListener("blur",Or,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ce,!0),n.addEventListener("pointermove",ce,!0),n.addEventListener("pointerup",ce,!0)):(n.addEventListener("mousedown",ce,!0),n.addEventListener("mousemove",ce,!0),n.addEventListener("mouseup",ce,!0)),t.addEventListener("beforeunload",()=>{Hr(e)},{once:!0}),Qe.set(t,{focus:r})}const Hr=(e,t)=>{const n=Ne(e),r=Ze(e);t&&r.removeEventListener("DOMContentLoaded",t),Qe.has(n)&&(n.HTMLElement.prototype.focus=Qe.get(n).focus,r.removeEventListener("keydown",yt,!0),r.removeEventListener("keyup",yt,!0),r.removeEventListener("click",Rr,!0),n.removeEventListener("focus",Dr,!0),n.removeEventListener("blur",Or,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ce,!0),r.removeEventListener("pointermove",ce,!0),r.removeEventListener("pointerup",ce,!0)):(r.removeEventListener("mousedown",ce,!0),r.removeEventListener("mousemove",ce,!0),r.removeEventListener("mouseup",ce,!0)),Qe.delete(n))};function xi(e){const t=Ze(e);let n;return t.readyState!=="loading"?fn(e):(n=()=>{fn(e)},t.addEventListener("DOMContentLoaded",n)),()=>Hr(e,n)}typeof document<"u"&&xi();function Wr(){return Je!=="pointer"}const Mi=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Pi(e,t,n){var r;const o=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Ne(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?Ne(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof o&&!Mi.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof i||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof a&&!Fi[n.key])}function Ni(e,t,n){fn(),H(()=>{let r=(o,i)=>{Pi(!!(n!=null&&n.isTextInput),o,i)&&e(Wr())};return ln.add(r),()=>{ln.delete(r)}},t)}function Li(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=w({isFocusWithin:!1}),s=j(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Ir(s),c=j(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:s}}}let gt=!1,pn=0;function hn(){gt=!0,setTimeout(()=>{gt=!1},50)}function zr(e){e.pointerType==="touch"&&hn()}function Ai(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",zr):document.addEventListener("touchend",hn),pn++,()=>{pn--,!(pn>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",zr):document.removeEventListener("touchend",hn))}}function Ii(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=C(!1),a=w({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;H(Ai,[]);let{hoverProps:c,triggerHoverEnd:u}=U(()=>{let d=(p,_)=>{if(a.pointerType=_,o||_==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let y=p.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:_}),n&&n(!0),s(!0)},l=(p,_)=>{if(a.pointerType="",a.target=null,_==="touch"||!a.isHovered)return;a.isHovered=!1;let y=p.currentTarget;r&&r({type:"hoverend",target:y,pointerType:_}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{gt&&p.pointerType==="mouse"||d(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!gt&&d(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&l(p,"mouse")}),{hoverProps:f,triggerHoverEnd:l}},[t,n,r,o,a]);return H(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:c,isHovered:i}}function Ri(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=w({isFocused:!1,isFocusVisible:t||Wr()}),[i,s]=C(!1),[a,c]=C(()=>o.current.isFocused&&o.current.isFocusVisible),u=j(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),d=j(p=>{o.current.isFocused=p,s(p),u()},[u]);Ni(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:l}=Si({isDisabled:r,onFocusChange:d}),{focusWithinProps:f}=Li({isDisabled:!r,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:a,focusProps:r?f:l}}var Di=Object.defineProperty,Oi=(e,t,n)=>t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mn=(e,t,n)=>(Oi(e,typeof t!="symbol"?t+"":t,n),n);let Hi=class{constructor(){mn(this,"current",this.detect()),mn(this,"handoffState","pending"),mn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ae=new Hi;function wt(e){return Ae.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}function bt(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function $e(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return bt(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=$e();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Et(){let[e]=C($e);return H(()=>()=>e.dispose(),[e]),e}let ne=(e,t)=>{Ae.isServer?H(e,t):Pe(e,t)};function Ie(e){let t=w(e);return ne(()=>{t.current=e},[e]),t}let G=function(e){let t=Ie(e);return P.useCallback((...n)=>t.current(...n),[t])};function Wi(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function zi(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ui({disabled:e=!1}={}){let t=w(null),[n,r]=C(!1),o=Et(),i=G(()=>{t.current=null,r(!1),o.dispose()}),s=G(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let c=wt(a.currentTarget);o.addEventListener(c,"pointerup",i,!1),o.addEventListener(c,"pointermove",u=>{if(t.current){let d=Wi(u);r(zi(d,t.current.getBoundingClientRect()))}},!1),o.addEventListener(c,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}let ji=ie(void 0);function Ur(){return te(ji)}function vn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function Te(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Te),r}var $t=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($t||{}),ke=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ke||{});function se({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??Vi;let c=jr(t,e);if(i)return Tt(c,n,r,s,a);let u=o??0;if(u&2){let{static:d=!1,...l}=c;if(d)return Tt(l,n,r,s,a)}if(u&1){let{unmount:d=!0,...l}=c;return Te(d?0:1,{0(){return null},1(){return Tt({...l,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return Tt(c,n,r,s,a)}function Tt(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...c}=_n(e,["unmount","static"]),u=e.ref!==void 0?{[a]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let l={};if(t){let f=!1,p=[];for(let[_,y]of Object.entries(t))typeof y=="boolean"&&(f=!0),y===!0&&p.push(_.replace(/([A-Z])/g,v=>`-${v.toLowerCase()}`));if(f){l["data-headlessui-state"]=p.join(" ");for(let _ of p)l[`data-${_}`]=""}}if(i===V&&(Object.keys(Re(c)).length>0||Object.keys(Re(l)).length>0))if(!je(d)||Array.isArray(d)&&d.length>1){if(Object.keys(Re(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Re(c)).concat(Object.keys(Re(l))).map(f=>` - ${f}`).join(`
3
3
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
4
4
  `)].join(`
5
- `))}else{let f=d.props,p=f==null?void 0:f.className,_=typeof p=="function"?(...m)=>vn(p(...m),l.className):vn(p,l.className),y=_?{className:_}:{},v=jr(d.props,Re(_n(l,["ref"])));for(let m in c)m in v&&delete c[m];return nn(d,Object.assign({},v,c,u,{ref:o(d.ref,u.ref)},y))}return ce(i,Object.assign({},_n(l,["ref"]),i!==V&&u,i!==V&&c),d)}function Vi(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function jr(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Bi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function re(e){var t;return Object.assign(en(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Re(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _n(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let qi="button";function Yi(e,t){var n;let r=Ur(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:a,focusProps:l}=Ri({autoFocus:i}),{isHovered:u,hoverProps:d}=Ii({isDisabled:o}),{pressed:c,pressProps:f}=Ui({disabled:o}),p=Bi({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},l,d,f),_=U(()=>({disabled:o,hover:u,focus:a,active:c,autofocus:i}),[o,u,a,c,i]);return se({ourProps:p,theirProps:s,slot:_,defaultTag:qi,name:"Button"})}let Gi=re(Yi),Ki="div";var kt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kt||{});function Xi(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return se({ourProps:i,theirProps:o,slot:{},defaultTag:Ki,name:"Hidden"})}let yn=re(Xi),Zi=ie(null);function Ji({children:e}){let t=te(Zi);if(!t)return P.createElement(P.Fragment,null,e);let{target:n}=t;return n?vt(P.createElement(P.Fragment,null,e),n):null}let Vr=Symbol();function Qi(e,t=!0){return Object.assign(e,{[Vr]:t})}function pe(...e){let t=w(e);H(()=>{t.current=e},[e]);let n=G(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Vr]))?void 0:n}let gn=ie(null);gn.displayName="DescriptionContext";function Br(){let e=te(gn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Br),t}return e}function es(){let[e,t]=C([]);return[e.length>0?e.join(" "):void 0,U(()=>function(n){let r=G(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}))),o=U(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return P.createElement(gn.Provider,{value:o},n.children)},[t])]}let ts="p";function ns(e,t){let n=Ee(),r=Ur(),{id:o=`headlessui-description-${n}`,...i}=e,s=Br(),a=pe(t);ne(()=>s.register(o),[o,s.register]);let l=r||!1,u=U(()=>({...s.slot,disabled:l}),[s.slot,l]),d={ref:a,...s.props,id:o};return se({ourProps:d,theirProps:i,slot:u,defaultTag:ts,name:s.name||"Description"})}let rs=re(ns),os=Object.assign(rs,{});var qr=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qr||{});let is=ie(()=>{});function ss({value:e,children:t}){return P.createElement(is.Provider,{value:e},t)}let as=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Yr(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Gr(e){return _t(e.subscribe,e.getSnapshot,e.getSnapshot)}let ls=new as(()=>Yr(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Ve(e,t){let n=ls.get(t),r=Ee(),o=Gr(n);if(ne(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let wn=new Map,et=new Map;function Kr(e){var t;let n=(t=et.get(e))!=null?t:0;return et.set(e,n+1),n!==0?()=>Xr(e):(wn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Xr(e))}function Xr(e){var t;let n=(t=et.get(e))!=null?t:1;if(n===1?et.delete(e):et.set(e,n-1),n!==1)return;let r=wn.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,wn.delete(e))}function cs(e,{allowed:t,disallowed:n}={}){let r=Ve(e,"inert-others");ne(()=>{var o,i;if(!r)return;let s=$e();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&s.add(Kr(l));let a=(i=t==null?void 0:t())!=null?i:[];for(let l of a){if(!l)continue;let u=wt(l);if(!u)continue;let d=l.parentElement;for(;d&&d!==u.body;){for(let c of d.children)a.some(f=>c.contains(f))||s.add(Kr(c));d=d.parentElement}}return s.dispose},[r,t,n])}function Zr(e,t,n){let r=Ie(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});H(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=$e();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let bn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),us=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ge||{}),En=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(En||{}),ds=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ds||{});function fs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(bn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function ps(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(us)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Jr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Jr||{});function hs(e,t=0){var n;return e===((n=wt(e))==null?void 0:n.body)?!1:Te(t,{0(){return e.matches(bn)},1(){let r=e;for(;r!==null;){if(r.matches(bn))return!0;r=r.parentElement}return!1}})}var ms=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ms||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function we(e){e==null||e.focus({preventScroll:!0})}let vs=["textarea","input"].join(",");function _s(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,vs))!=null?n:!1}function ys(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function tt(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?ys(e):e:t&64?ps(e):fs(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(_=>_!=null&&"current"in _?(_==null?void 0:_.current)===p:_===p))),r=r??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,c=s.length,f;do{if(d>=c||d+c<=0)return 0;let p=l+d;if(t&16)p=(p+c)%c;else{if(p<0)return 3;if(p>=c)return 1}f=s[p],f==null||f.focus(u),d+=a}while(f!==i.activeElement);return t&6&&_s(f)&&f.select(),2}function Qr(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gs(){return/Android/gi.test(window.navigator.userAgent)}function ws(){return Qr()||gs()}function nt(e,t,n,r){let o=Ie(n);H(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function eo(e,t,n,r){let o=Ie(n);H(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const to=30;function bs(e,t,n){let r=Ve(e,"outside-click"),o=Ie(n),i=j(function(l,u){if(l.defaultPrevented)return;let d=u(l);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let c=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of c){if(f===null)continue;let p=f instanceof HTMLElement?f:f.current;if(p!=null&&p.contains(d)||l.composed&&l.composedPath().includes(p))return}return!hs(d,Jr.Loose)&&d.tabIndex!==-1&&l.preventDefault(),o.current(l,d)},[o]),s=w(null);nt(r,"pointerdown",l=>{var u,d;s.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),nt(r,"mousedown",l=>{var u,d;s.current=((d=(u=l.composedPath)==null?void 0:u.call(l))==null?void 0:d[0])||l.target},!0),nt(r,"click",l=>{ws()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=w({x:0,y:0});nt(r,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),nt(r,"touchend",l=>{let u={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=to||Math.abs(u.y-a.current.y)>=to))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),eo(r,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rt(...e){return U(()=>wt(...e),[...e])}function no(e,t,n,r){let o=Ie(n);H(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Es(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function $s(){return Qr()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=$e();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:u}=new URL(l.href),d=e.querySelector(u);d&&!r(d)&&(s=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let l=a.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ts(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ks(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let De=Yr(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:$e(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ks(n)},o=[$s(),Es(),Ts()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});De.subscribe(()=>{let e=De.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&De.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&De.dispatch("TEARDOWN",n)}});function Ss(e,t,n=()=>({containers:[]})){let r=Gr(De),o=t?r.get(t):void 0,i=o?o.count>0:!1;return ne(()=>{if(!(!t||!e))return De.dispatch("PUSH",t,n),()=>De.dispatch("POP",t,n)},[e,t]),i}function Fs(e,t,n=()=>[document.body]){let r=Ve(e,"scroll-lock");Ss(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Cs(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function xs(e=0){let[t,n]=C(e),r=j(l=>n(l),[t]),o=j(l=>n(u=>u|l),[t]),i=j(l=>(t&l)===l,[t]),s=j(l=>n(u=>u&~l),[n]),a=j(l=>n(u=>u^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ms=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ms||{});function Ps(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Ns(e,t,n,r){let[o,i]=C(n),{hasFlag:s,addFlag:a,removeFlag:l}=xs(e&&o?3:0),u=w(!1),d=w(!1),c=Et();return ne(function f(){var p;if(!e)return;n&&i(!0);let _=t.current;return _?((p=r==null?void 0:r.start)==null||p.call(r,n),Ls(_,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),l(4)):(a(4),l(2)))},run(){d.current?n?(l(3),a(4)):(l(4),a(3)):n?l(1):a(1)},done(){var y;d.current&&typeof _.getAnimations=="function"&&_.getAnimations().length>0||(u.current=!1,l(7),n||i(!1),(y=r==null?void 0:r.end)==null||y.call(r,n))}})):n?(a(3),c.nextFrame(()=>f())):void 0},[e,n,t,c]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Ls(e,{prepare:t,run:n,done:r,inFlight:o}){let i=$e();return Is(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{i.add(As(e,r)),n()}),i.dispose}function As(e,t){let n=Cs(t),r=$e();if(!e)return r.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,f)=>f-c);return d}),l=s+a;if(l!==0){let u=r.group(d=>{let c=d.setTimeout(()=>{n(),d.dispose()},l);d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(c(),d.addEventListener(e,"transitioncancel",p=>{p.target===p.currentTarget&&(n(),u())}))})});r.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Is(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function $n(e,t){let n=w([]),r=G(e);H(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}let St=ie(null);St.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Ft(){return te(St)}function Rs({value:e,children:t}){return P.createElement(St.Provider,{value:e},t)}function Ds({children:e}){return P.createElement(St.Provider,{value:null},e)}function Os(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Se=[];Os(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Se[0]!==t.target&&(Se.unshift(t.target),Se=Se.filter(n=>n!=null&&n.isConnected),Se.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ro(e){let t=G(e),n=w(!1);H(()=>(n.current=!1,()=>{n.current=!0,bt(()=>{n.current&&t()})}),[t])}function Hs(){let e=typeof document>"u";return"useSyncExternalStore"in Lr?(t=>t.useSyncExternalStore)(Lr)(()=>()=>{},()=>!1,()=>!e):!1}function ot(){let e=Hs(),[t,n]=C(Ae.isHandoffComplete);return t&&Ae.isHandoffComplete===!1&&n(!1),H(()=>{t!==!0&&n(!0)},[t]),H(()=>Ae.handoff(),[]),e?!1:t}let oo=ie(!1);function Ws(){return te(oo)}function io(e){return P.createElement(oo.Provider,{value:e.force},e.children)}function zs(e){let t=Ws(),n=te(ao),r=rt(e),[o,i]=C(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Ae.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return H(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),H(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let so=V,Us=re(function(e,t){let n=e,r=w(null),o=pe(Qi(d=>{r.current=d}),t),i=rt(r),s=zs(r),[a]=C(()=>{var d;return Ae.isServer?null:(d=i==null?void 0:i.createElement("div"))!=null?d:null}),l=te(Tn),u=ot();return ne(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),ne(()=>{if(a&&l)return l.register(a)},[l,a]),ro(()=>{var d;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((d=s.parentElement)==null||d.removeChild(s)))}),u?!s||!a?null:vt(se({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:so,name:"Portal"}),a):null});function js(e,t){let n=pe(t),{enabled:r=!0,...o}=e;return r?P.createElement(Us,{...o,ref:n}):se({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:so,name:"Portal"})}let Vs=V,ao=ie(null);function Bs(e,t){let{target:n,...r}=e,o={ref:pe(t)};return P.createElement(ao.Provider,{value:n},se({ourProps:o,theirProps:r,defaultTag:Vs,name:"Popover.Group"}))}let Tn=ie(null);function qs(){let e=te(Tn),t=w([]),n=G(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=G(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=U(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,U(()=>function({children:i}){return P.createElement(Tn.Provider,{value:o},i)},[o])]}let Ys=re(js),lo=re(Bs),Gs=Object.assign(Ys,{Group:lo});function Ks(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ve(e,"escape");no(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===qr.Escape&&n(o))})}function Xs(){var e;let[t]=C(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=C((e=t==null?void 0:t.matches)!=null?e:!1);return ne(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Zs({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=w((r=n==null?void 0:n.current)!=null?r:null),i=rt(o),s=G(()=>{var a,l,u;let d=[];for(let c of e)c!==null&&(c instanceof HTMLElement?d.push(c):"current"in c&&c.current instanceof HTMLElement&&d.push(c.current));if(t!=null&&t.current)for(let c of t.current)d.push(c);for(let c of(a=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?a:[])c!==document.body&&c!==document.head&&c instanceof HTMLElement&&c.id!=="headlessui-portal-root"&&(c.contains(o.current)||c.contains((u=(l=o.current)==null?void 0:l.getRootNode())==null?void 0:u.host)||d.some(f=>c.contains(f))||d.push(c));return d});return{resolveContainers:s,contains:G(a=>s().some(l=>l.contains(a))),mainTreeNodeRef:o,MainTreeNode:U(()=>function(){return n!=null?null:P.createElement(yn,{features:kt.Hidden,ref:o})},[o,n])}}function kn(){let e=w(!1);return ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var it=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(it||{});function Js(){let e=w(0);return eo(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function co(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Qs="div";var Oe=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Oe||{});function ea(e,t){let n=w(null),r=pe(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...l}=e;ot()||(a=0);let u=rt(n);oa(a,{ownerDocument:u});let d=ia(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});sa(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let c=Js(),f=G(m=>{let g=n.current;g&&($=>$())(()=>{Te(c.current,{[it.Forwards]:()=>{tt(g,ge.First,{skipElements:[m.relatedTarget,i]})},[it.Backwards]:()=>{tt(g,ge.Last,{skipElements:[m.relatedTarget,i]})}})})}),p=Ve(!!(a&2),"focus-trap#tab-lock"),_=Et(),y=w(!1),v={ref:r,onKeyDown(m){m.key=="Tab"&&(y.current=!0,_.requestAnimationFrame(()=>{y.current=!1}))},onBlur(m){if(!(a&4))return;let g=co(s);n.current instanceof HTMLElement&&g.add(n.current);let $=m.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(uo(g,$)||(y.current?tt(n.current,Te(c.current,{[it.Forwards]:()=>ge.Next,[it.Backwards]:()=>ge.Previous})|ge.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&we(m.target)))}};return P.createElement(P.Fragment,null,p&&P.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}),se({ourProps:v,theirProps:l,defaultTag:Qs,name:"FocusTrap"}),p&&P.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}))}let ta=re(ea),na=Object.assign(ta,{features:Oe});function ra(e=!0){let t=w(Se.slice());return $n(([n],[r])=>{r===!0&&n===!1&&bt(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Se.slice())},[e,Se,t]),G(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function oa(e,{ownerDocument:t}){let n=!!(e&8),r=ra(n);$n(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&we(r())},[n]),ro(()=>{n&&we(r())})}function ia(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=w(null),s=Ve(!!(e&1),"focus-trap#initial-focus"),a=kn();return $n(()=>{if(e===0)return;if(!s){o!=null&&o.current&&we(o.current);return}let l=n.current;l&&bt(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(l.contains(u)){i.current=u;return}if(r!=null&&r.current)we(r.current);else{if(e&16){if(tt(l,ge.First|ge.AutoFocus)!==En.Error)return}else if(tt(l,ge.First)!==En.Error)return;if(o!=null&&o.current&&(we(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function sa(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=kn(),s=!!(e&4);no(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let l=co(r);n.current instanceof HTMLElement&&l.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?uo(l,d)?(o.current=d,we(d)):(a.preventDefault(),a.stopPropagation(),we(u)):we(o.current)},!0)}function uo(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fo(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:ho)!==V||P.Children.count(e.children)===1}let Ct=ie(null);Ct.displayName="TransitionContext";var aa=(e=>(e.Visible="visible",e.Hidden="hidden",e))(aa||{});function la(){let e=te(Ct);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ca(){let e=te(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=ie(null);xt.displayName="NestingContext";function Mt(e){return"children"in e?Mt(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function po(e,t){let n=Ie(e),r=w([]),o=kn(),i=Et(),s=G((p,_=ke.Hidden)=>{let y=r.current.findIndex(({el:v})=>v===p);y!==-1&&(Te(_,{[ke.Unmount](){r.current.splice(y,1)},[ke.Hidden](){r.current[y].state="hidden"}}),i.microTask(()=>{var v;!Mt(r)&&o.current&&((v=n.current)==null||v.call(n))}))}),a=G(p=>{let _=r.current.find(({el:y})=>y===p);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:p,state:"visible"}),()=>s(p,ke.Unmount)}),l=w([]),u=w(Promise.resolve()),d=w({enter:[],leave:[]}),c=G((p,_,y)=>{l.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([v])=>v!==p)),t==null||t.chains.current[_].push([p,new Promise(v=>{l.current.push(v)})]),t==null||t.chains.current[_].push([p,new Promise(v=>{Promise.all(d.current[_].map(([m,g])=>g)).then(()=>v())})]),_==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(_)):y(_)}),f=G((p,_,y)=>{Promise.all(d.current[_].splice(0).map(([v,m])=>m)).then(()=>{var v;(v=l.current.shift())==null||v()}).then(()=>y(_))});return U(()=>({children:r,register:a,unregister:s,onStart:c,onStop:f,wait:u,chains:d}),[a,s,r,c,f,d,u])}let ho=V,mo=$t.RenderStrategy;function ua(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:l,enter:u,enterFrom:d,enterTo:c,entered:f,leave:p,leaveFrom:_,leaveTo:y,...v}=e,m=w(null),g=fo(e),$=pe(...g?[m,t]:t===null?[]:[t]),T=(n=v.unmount)==null||n?ke.Unmount:ke.Hidden,{show:S,appear:x,initial:L}=la(),[W,F]=C(S?"visible":"hidden"),E=ca(),{register:I,unregister:Y}=E;ne(()=>I(m),[I,m]),ne(()=>{if(T===ke.Hidden&&m.current){if(S&&W!=="visible"){F("visible");return}return Te(W,{hidden:()=>Y(m),visible:()=>I(m)})}},[W,m,I,Y,S,T]);let R=ot();ne(()=>{if(g&&R&&W==="visible"&&m.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,W,R,g]);let q=L&&!x,D=x&&S&&L,K=w(!1),M=po(()=>{K.current||(F("hidden"),Y(m))},E),N=G(Q=>{K.current=!0;let J=Q?"enter":"leave";M.onStart(m,J,ee=>{ee==="enter"?i==null||i():ee==="leave"&&(a==null||a())})}),O=G(Q=>{let J=Q?"enter":"leave";K.current=!1,M.onStop(m,J,ee=>{ee==="enter"?s==null||s():ee==="leave"&&(l==null||l())}),J==="leave"&&!Mt(M)&&(F("hidden"),Y(m))});H(()=>{g&&o||(N(S),O(S))},[S,g,o]);let k=!(!o||!g||!R||q),[,b]=Ns(k,m,S,{start:N,end:O}),z=Re({ref:$,className:((r=vn(v.className,D&&u,D&&d,b.enter&&u,b.enter&&b.closed&&d,b.enter&&!b.closed&&c,b.leave&&p,b.leave&&!b.closed&&_,b.leave&&b.closed&&y,!b.transition&&S&&f))==null?void 0:r.trim())||void 0,...Ps(b)}),X=0;return W==="visible"&&(X|=de.Open),W==="hidden"&&(X|=de.Closed),b.enter&&(X|=de.Opening),b.leave&&(X|=de.Closing),P.createElement(xt.Provider,{value:M},P.createElement(Rs,{value:X},se({ourProps:z,theirProps:v,defaultTag:ho,features:mo,visible:W==="visible",name:"Transition.Child"})))}function da(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=w(null),a=fo(e),l=pe(...a?[s,t]:t===null?[]:[t]);ot();let u=Ft();if(n===void 0&&u!==null&&(n=(u&de.Open)===de.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,c]=C(n?"visible":"hidden"),f=po(()=>{n||c("hidden")}),[p,_]=C(!0),y=w([n]);ne(()=>{p!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),_(!1))},[y,n]);let v=U(()=>({show:n,appear:r,initial:p}),[n,r,p]);Zr(n,s,()=>c("hidden")),ne(()=>{n?c("visible"):!Mt(f)&&s.current!==null&&c("hidden")},[n,f]);let m={unmount:o},g=G(()=>{var T;p&&_(!1),(T=e.beforeEnter)==null||T.call(e)}),$=G(()=>{var T;p&&_(!1),(T=e.beforeLeave)==null||T.call(e)});return P.createElement(xt.Provider,{value:f},P.createElement(Ct.Provider,{value:v},se({ourProps:{...m,as:V,children:P.createElement(vo,{ref:l,...m,...i,beforeEnter:g,beforeLeave:$})},theirProps:{},defaultTag:V,features:mo,visible:d==="visible",name:"Transition"})))}function fa(e,t){let n=te(Ct)!==null,r=Ft()!==null;return P.createElement(P.Fragment,null,!n&&r?P.createElement(Sn,{ref:t,...e}):P.createElement(vo,{ref:t,...e}))}let Sn=re(da),vo=re(ua),Fn=re(fa),he=Object.assign(Sn,{Child:Fn,Root:Sn});var pa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pa||{}),ha=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ha||{});let ma={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Cn=ie(null);Cn.displayName="DialogContext";function Pt(e){let t=te(Cn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pt),n}return t}function va(e,t){return Te(t.type,ma,e,t)}let _o=re(function(e,t){let n=Ee(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:l=!0,__demoMode:u=!1,...d}=e,c=w(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(c.current||(c.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Ft();o===void 0&&f!==null&&(o=(f&de.Open)===de.Open);let p=w(null),_=pe(p,t),y=rt(p),v=o?0:1,[m,g]=Ke(va,{titleId:null,descriptionId:null,panelRef:jt()}),$=G(()=>i(!1)),T=G(k=>g({type:0,id:k})),S=ot()?v===0:!1,[x,L]=qs(),W={get current(){var k;return(k=m.panelRef.current)!=null?k:p.current}},{resolveContainers:F,mainTreeNodeRef:E,MainTreeNode:I}=Zs({portals:x,defaultContainers:[W]}),Y=f!==null?(f&de.Closing)===de.Closing:!1;cs(u||Y?!1:S,{allowed:G(()=>{var k,b;return[(b=(k=p.current)==null?void 0:k.closest("[data-headlessui-portal]"))!=null?b:null]}),disallowed:G(()=>{var k,b;return[(b=(k=E.current)==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?b:null]})}),bs(S,F,k=>{k.preventDefault(),$()}),Ks(S,y==null?void 0:y.defaultView,k=>{k.preventDefault(),k.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Fs(u||Y?!1:S,y,F),Zr(S,p,$);let[R,q]=es(),D=U(()=>[{dialogState:v,close:$,setTitleId:T},m],[v,m,$,T]),K=U(()=>({open:v===0}),[v]),M={ref:_,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":m.titleId,"aria-describedby":R},N=!Xs(),O=Oe.None;return S&&!u&&(O|=Oe.RestoreFocus,O|=Oe.TabLock,l&&(O|=Oe.AutoFocus),N&&(O|=Oe.InitialFocus)),P.createElement(Ds,null,P.createElement(io,{force:!0},P.createElement(Gs,null,P.createElement(Cn.Provider,{value:D},P.createElement(lo,{target:p},P.createElement(io,{force:!1},P.createElement(q,{slot:K},P.createElement(L,null,P.createElement(na,{initialFocus:s,initialFocusFallback:p,containers:F,features:O},P.createElement(ss,{value:$},se({ourProps:M,theirProps:d,slot:K,defaultTag:_a,features:ya,visible:v===0,name:"Dialog"})))))))))),P.createElement(Ji,null,P.createElement(I,null)))}),_a="div",ya=$t.RenderStrategy|$t.Static;function ga(e,t){let{transition:n=!1,open:r,...o}=e,i=Ft(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?P.createElement(he,{show:r,transition:n,unmount:o.unmount},P.createElement(_o,{ref:t,...o})):P.createElement(_o,{ref:t,open:r,...o})}let wa="div";function ba(e,t){let n=Ee(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s},a]=Pt("Dialog.Panel"),l=pe(t,a.panelRef),u=U(()=>({open:s===0}),[s]),d=G(c=>{c.stopPropagation()});return P.createElement(o?Fn:V,null,se({ourProps:{ref:l,id:r,onClick:d},theirProps:i,slot:u,defaultTag:wa,name:"Dialog.Panel"}))}let Ea="div";function $a(e,t){let{transition:n=!1,...r}=e,[{dialogState:o}]=Pt("Dialog.Backdrop"),i=U(()=>({open:o===0}),[o]);return P.createElement(n?Fn:V,null,se({ourProps:{ref:t,"aria-hidden":!0},theirProps:r,slot:i,defaultTag:Ea,name:"Dialog.Backdrop"}))}let Ta="h2";function ka(e,t){let n=Ee(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Pt("Dialog.Title"),a=pe(t);H(()=>(s(r),()=>s(null)),[r,s]);let l=U(()=>({open:i===0}),[i]);return se({ourProps:{ref:a,id:r},theirProps:o,slot:l,defaultTag:Ta,name:"Dialog.Title"})}let Sa=re(ga),yo=re(ba);re($a);let Fa=re(ka),Ca=Object.assign(Sa,{Panel:yo,Title:Fa,Description:os});const Nt={root:"_root_1duny_1",modal:"_modal_1duny_10",container:"_container_1duny_13",page:"_page_1duny_18",close:"_close_1duny_21"},xa={root:"_root_1h6qm_1"},be=e=>{const{children:t,size:n="md",fill:r="currentColor",stroke:o,strokeWidth:i,className:s="",viewBox:a="0 0 20 20"}=e,l=U(()=>{switch(n){case"sm":return"yvlw-w-4 yvlw-h-4";case"lg":return"yvlw-w-7 yvlw-h-7";case"xl":return"yvlw-w-10 yvlw-h-10";case"custom":return"";default:return"yvlw-w-5 yvlw-h-5"}},[n]);return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:a,fill:r,stroke:o,strokeWidth:i,className:`${l} ${s}`,children:t})},Ma=()=>h(be,{children:h("path",{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"})}),go=e=>h(be,{...e,children:h("path",{fillRule:"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z",clipRule:"evenodd"})}),Pa=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"})]}),Na=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),wo=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),La=e=>h(be,{...e,children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v2c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-2c0-2.66-5.33-4-8-4zm6 5H6v-.99c.2-.72 3.3-2.01 6-2.01s5.8 1.29 6 2v1z"})]}),Aa=e=>h(be,{...e,children:h("path",{d:"M18,10l-1.77-2.03l0.25-2.69l-2.63-0.6l-1.37-2.32L10,3.43L7.53,2.36L6.15,4.68L3.53,5.28l0.25,2.69L2,10l1.77,2.03 l-0.25,2.69l2.63,0.6l1.37,2.32L10,16.56l2.47,1.07l1.37-2.32l2.63-0.6l-0.25-2.69L18,10z M13.18,8.47l-4.24,4.24 c-0.2,0.2-0.51,0.2-0.71,0L6.82,11.3c-0.2-0.2-0.2-0.51,0-0.71s0.51-0.2,0.71,0l1.06,1.06l3.89-3.89c0.2-0.2,0.51-0.2,0.71,0 S13.38,8.28,13.18,8.47z"})}),bo=e=>h(be,{...e,viewBox:"0 0 24 24",children:h("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Ia=e=>h(be,{...e,children:h("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});class Fe{static loadVision(){return import("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12")}static async loadDetector(){try{const{FaceLandmarker:t,FilesetResolver:n}=await Fe.loadVision(),r=await n.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12/wasm");return await t.createFromOptions(r,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},outputFaceBlendshapes:!0,runningMode:"IMAGE",numFaces:1})}catch(t){return Promise.reject(t)}}static denormalizeKeypoints(t,n,r){return t.map(o=>({x:o.x*n,y:o.y*r,z:o.z}))}static getBoundingBox(t,n,r){const o={width:n*.6,height:r*.8,x:0,y:0};o.x=(n-o.width)/2,o.y=(r-o.height)/2;let i=1/0,s=-1/0,a=1/0,l=-1/0;t.forEach(d=>{i=Math.min(i,d.x),s=Math.max(s,d.x),a=Math.min(a,d.y),l=Math.max(l,d.y)});const u={xMin:i,xMax:s,yMin:a,yMax:l};return u.xMin<o.x||u.xMax>o.x+o.width||u.yMin<o.y||u.yMax>o.y+o.height?{box:{xMin:i,xMax:s,yMin:a,yMax:l,width:s-i,height:l-a},inBox:!1}:{box:{xMin:i,xMax:s,yMin:a,yMax:l,width:s-i,height:l-a},inBox:!0}}static async detectFaces(t,n){var r;try{const{width:o,height:i}=n,{faceLandmarks:s,faceBlendshapes:a}=await t.detect(n);if(s.length===0)return{faces:[],blendShapes:[],inBox:!1};const l=Fe.denormalizeKeypoints(s[0],o,i),{box:u,inBox:d}=Fe.getBoundingBox(l,o,i);return{faces:[{keypoints:l,box:u}],blendShapes:((r=a==null?void 0:a[0])==null?void 0:r.categories)??[],inBox:d}}catch(o){return Promise.reject(o)}}}const Ra=(e,t)=>{let n;return typeof OffscreenCanvas<"u"?n=new OffscreenCanvas(e,t):(n=document.createElement("canvas"),n.width=e,n.height=t),n},xn=(e,t,n,r,o)=>{let i=0,s=0,a=t,l=n;const d=Ra(t,n).getContext("2d",o);return d.drawImage(e,0,0),d.getImageData(i,s,a,l)},Da=e=>new Promise(t=>{const n=document.createElement("canvas");let{width:r}=e,{height:o}=e;e instanceof HTMLVideoElement&&(r=e.videoWidth,o=e.videoHeight),n.width=r,n.height=o,n.getContext("2d").drawImage(e,0,0),n.toBlob(s=>t(s))});function Oa(e){const{width:t,height:n,data:r}=e;let o=0,i=0;const s=[0,-1,0,-1,4,-1,0,-1,0];for(let d=1;d<n-1;d++)for(let c=1;c<t-1;c++){let f=0,p=0,_=0,y=0;for(let m=-1;m<=1;m++)for(let g=-1;g<=1;g++){const $=((d+m)*t+(c+g))*4,T=s[y++];f+=r[$]*T,p+=r[$+1]*T,_+=r[$+2]*T}const v=.299*f+.587*p+.114*_;o+=v,i+=v*v}const a=(t-2)*(n-2);if(a===0)return 0;const l=o/a;return i/a-l*l}function Ha(){if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9"))return{mimeType:"video/webm; codecs=vp9",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/webm"))return{mimeType:"video/webm",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/mp4"))return{mimeType:"video/mp4",videoBitsPerSecond:25e4}}function Eo(e={}){const{onRecord:t=()=>{},onStop:n=()=>{}}=e,r=w([]),o=w(null),i=w(null),s=j(f=>{r.current.push(f)},[]),a=j(async f=>{if(o.current)return;let p=null;f instanceof ImageData?p=await new Promise(_=>{const y=document.createElement("canvas");y.width=f.width,y.height=f.height;const v=y.getContext("2d");v?(v.putImageData(f,0,0),y.toBlob(m=>{_(m)},"image/jpeg",.95)):_(null)}):p=await Da(f),p&&(o.current=p)},[]),l=j(()=>{o.current=null},[]),u=j(f=>{f.data.size>0&&t(f.data)},[]),d=j(()=>{!i.current||i.current.state==="inactive"||(i.current.stop(),i.current.stream.getTracks().forEach(f=>f.stop()),n())},[]),c=j(f=>{i.current||(i.current=new MediaRecorder(f,Ha()),i.current.ondataavailable=u,i.current.onstop=d,i.current.start(1e3))},[]);return{saveStream:s,savePhoto:a,start:c,stop:d,savedStreams:r,savedPhoto:o,clearSavedPhoto:l}}const Wa="https://cdn.svc.youverify.co",za=e=>e?"https://identity.staging.svc.youverify.co":"https://identity.svc.youverify.co";function Ua(e){const t=za(e);return{postData:async i=>{const{faceImage:s,publicKey:a,passed:l,metadata:u,video:d,sessionId:c}=i,f=new FormData;f.append("files",s),f.append("files",d);const p=await fetch(`${Wa}/v1/uploads/media`,{method:"POST",headers:{},body:f});if(!p.ok)throw p;const _=(await p.json()).data,y=await fetch(`${t}/v1/sdk/identity/liveness/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publicMerchantID:a,sessionId:c,components:["liveness"],faceImage:_[0].cachedLocation,livenessClip:_[1].cachedLocation,passed:l,metadata:u})});if(!y.ok)throw y;return(await y.json()).data},fetchSessionToken:async()=>{throw new Error("fetchSessionToken is deprecated. Provide sessionToken from your backend.")},validateSessionId:async i=>{const s=await fetch(`${t}/v1/sdk/session/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:i})}),a=await s.json().catch(()=>({}));if(!s.ok){const l=(a==null?void 0:a.message)||"Session validation failed";throw new Error(l)}return!0}}}const ja=360,Va="#125766",Ba="https://cdn.youverify.co/1721901834404-q2nxqyng5klm918b3BDVU.jpg",$o="https://cdn.youverify.co",st={js:{default:"1731681780468-ttgfiK6Sl1GKegUe-wm4v.js",simd:"1731681609027-RTOweJqdl8Tt39aAdyie9.js"},wasm:{default:"1731681817302-aVNwDW6DP2MsDNTbiav_V.wasm",simd:"1731681739675-nvF1En4g5rAW4daq5g5DH.wasm"}},qa=[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11],To={spoofing:{key:"GLARE_DETECTION_ERROR",message:"We detected a screen recording or photo during your liveness."},"no face":{key:"LIVENESS_FACE_NOT_FOUND",message:"We could not detect a face in your test."},lighting:{key:"LIGHTING_ERROR",message:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face."}},Ya={"complete-the-circle":{Icon:Pa,name:"Complete The Circle ⭕️",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"},"yes-or-no":{Icon:Na,name:"Yes or No ❓",description:"First position your face in the camera. Then tilt your head to the left to answer No and to the right to answer Yes"},motions:{Icon:wo,name:"Motions 💫",description:"First position your face in the camera frame, then follow the instructions"},blink:{Icon:wo,name:"Blink 💫",description:"First position your face in the camera frame, then follow the instructions"},"facial-expressions":{Icon:go,name:"Facial Expressions 🤪",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"}},ko=ie({tasks:[],namespace:"",user:void 0,currentTaskIndex:0,completedCount:0,nextTask:()=>{},completed:!1,onRequestClose:()=>{},faceDetector:null,saveStream:()=>{},savePhoto:()=>{},clearSavedPhoto:()=>{},onComplete:()=>Promise.resolve(),onFailure:()=>{},imageCaptured:!1,setImageCaptured:()=>{},sandboxEnvironment:!0,publicKey:"",isMobileAppWebView:!1});let So,Fo=!1;function Ga(e){const{publicKey:t,tasks:n,children:r,namespace:o,user:i,branding:s,onRequestClose:a,onSuccess:l=()=>{},onFailure:u=()=>{},metadata:d,presentation:c,sandboxEnvironment:f=!0,isMobileAppWebView:p=!1,sessionId:_,sessionToken:y}=e,[v,m]=C(0),[g,$]=C(0),[T,S]=C(null),[x,L]=C(!1),{saveStream:W,savePhoto:F,savedPhoto:E,clearSavedPhoto:I,savedStreams:Y}=Eo(),{postData:R,validateSessionId:q}=Ua(f),D=U(()=>g===n.length,[n,g]),K=()=>{$(k=>k+1),m(k=>k+1)},M=k=>{const b=new Image;b.crossOrigin="Anonymous",b.src=Ba,b.onload=()=>{const z=xn(b,b.width,b.height);Fe.detectFaces(k,z)}},N=async()=>{if(!E.current){u({faceImage:"",passed:!1,metadata:d,error:{key:"image_capture_failed",message:"No face image captured. Image capture failed. Please try again."}}),a();return}try{const k=await R({faceImage:E.current,video:new Blob(Y.current,{type:"video/mp4"}),publicKey:t,passed:!0,metadata:d,sessionId:_});l(k),a()}catch{u({faceImage:"",passed:!1,metadata:d,error:{key:"API_ERROR",message:"Failed to process liveness check. Please try again."}}),a()}},O=async()=>{try{if(!_)throw new Error("sessionId is required. Provide it from your backend.");if(!y)throw new Error("sessionToken is required. Provide it from your backend.");await q(_)}catch(b){const z=b instanceof Error?b.message:"Invalid or expired sessionId";u({faceImage:"",passed:!1,metadata:d,error:{key:"invalid_or_expired_session",message:z}});return}const k=await Fe.loadDetector();So=k,M(k),S(k)};return H(()=>{if(Fo){S(So);return}O(),Fo=!0},[]),h(ko.Provider,{value:{tasks:n,namespace:o,user:i,currentTaskIndex:v,completed:D,completedCount:g,nextTask:K,branding:{name:(s==null?void 0:s.name)??"Youverify",color:(s==null?void 0:s.color)??void 0,logo:(s==null?void 0:s.logo)??"/yv_logo.svg",logoAlt:(s==null?void 0:s.logoAlt)??`${(s==null?void 0:s.name)??"Youverify"} logo`,hideLogoOnMobile:(s==null?void 0:s.hideLogoOnMobile)??!0,showPoweredBy:(s==null?void 0:s.showPoweredBy)??!0,poweredByText:(s==null?void 0:s.poweredByText)??"Powered by Youverify",poweredByLogo:(s==null?void 0:s.poweredByLogo)??"/yv_logo.svg"},onRequestClose:a,faceDetector:T,saveStream:W,savePhoto:F,clearSavedPhoto:I,onComplete:N,onFailure:u,presentation:c,imageCaptured:x,setImageCaptured:L,sandboxEnvironment:f,publicKey:t,isMobileAppWebView:p,sessionId:_,sessionToken:y},children:r})}function fe(){return te(ko)}const oe={root:"_root_vqy7d_1",container:"_container_vqy7d_4",lhs:"_lhs_vqy7d_7",info:"_info_vqy7d_11",active:"_active_vqy7d_32",completed:"_completed_vqy7d_39",rhs:"_rhs_vqy7d_62",profile:"_profile_vqy7d_65",avatar:"_avatar_vqy7d_68",main:"_main_vqy7d_81",content:"_content_vqy7d_84"},Mn={root:"_root_lryhb_1",container:"_container_lryhb_1",brand:"_brand_lryhb_6"};function Ka(){const{branding:e,isMobileAppWebView:t,onRequestClose:n,presentation:r}=fe();return h("div",{className:Mn.root,children:h("div",{className:Mn.container,children:[h("div",{className:Mn.brand,children:(e==null?void 0:e.logo)&&!(e.hideLogoOnMobile&&t)&&h("img",{className:"yvlw-h-10",src:e.logo,alt:e.logoAlt||"Logo"})}),(t||r==="page")&&h("button",{type:"button",className:"yvlw-text-sm yvlw-rounded yvlw-px-3 yvlw-py-2 yvlw-border yvlw-border-gray-300 dark:yvlw-border-gray-700",onClick:()=>n(),children:"Close"})]})})}const Co="colorScheme";function xo(){const{namespace:e}=fe(),t=()=>{const o=localStorage.getItem(Co);return!o&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":o},n=(o=null)=>{o&&localStorage.setItem(Co,o);const i=`${e}-color-scheme`,s=document.documentElement;o&&o==="dark"?s==null||s.setAttribute(i,"dark"):s==null||s.removeAttribute(i)};return{setColorScheme:n,toggleColorScheme:()=>{const o=t();return n(o==="dark"?"light":"dark")},getColorScheme:t}}const Xa={root:"_root_bcsvc_1"};function Za(){if(!(window.screen.width>=900))return 10/9}function at(e){const{children:t,onStream:n=()=>{},onRecord:r=()=>{}}=e,o=w(null),i=w(0),s=w(null),{start:a,stop:l}=Eo({onRecord:r}),u=async()=>{try{const f=await navigator.mediaDevices.getUserMedia({video:{aspectRatio:{exact:Za()}}});s.current=f,a(f),o.current&&(o.current.srcObject=f)}catch{}},d=()=>{s.current&&(s.current.getTracks().forEach(f=>f.stop()),s.current=null,l(),o.current&&(o.current.srcObject=null))},c=()=>{n(o),i.current=requestAnimationFrame(c)};return H(()=>{const f=o.current;if(!f)return;const p=()=>{i.current=requestAnimationFrame(c)};return u(),f.addEventListener("canplay",p),()=>{f.removeEventListener("canplay",p),cancelAnimationFrame(i.current),d()}},[]),h("div",{className:Xa.root,children:[h("video",{ref:o,autoPlay:!0,loop:!0,playsInline:!0}),t]})}const lt={container:"_container_mcmsr_1",focused:"_focused_mcmsr_12",progress:"_progress_mcmsr_15",completed:"_completed_mcmsr_36",marker:"_marker_mcmsr_40"},Mo=360,Ja=50;function Qa(e){const{visitedSections:t,sectionsCount:n,faceDetected:r,divisions:o=Ja}=e,i=U(()=>{const s=[lt.container];return r&&s.push(lt.focused),s.join(" ")},[r]);return h("div",{className:i,children:[h(he,{as:"div",show:r,leave:"yvlw-transition yvlw-linear yvlw-duration-300",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-125 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-300",enterFrom:"yvlw-scale-125 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:lt.progress,children:Array.from(Array(o).keys()).map(s=>{const a=s*Mo/o,l=Math.ceil((a+1)*n/Mo),u=t.includes(l),d=u?s-(l-1)*(o/n):0,c=[];u&&c.push(lt.completed);const f=u?"translateX(158px)":"translateX(150px)";return h("div",{className:c.join(" "),style:{transform:`rotate(${a}deg) ${f}`,transitionDelay:`${d*20}ms`}},`key-${s}`)})})}),h(he,{as:"div",show:!r,leave:"yvlw-transition yvlw-linear yvlw-duration-200",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-75 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-200",enterFrom:"yvlw-scale-75 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:lt.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})]})}function Po(){return{checkZoomLevel:(r,o)=>{const{box:i}=r,{width:s,height:a}=i,l=s*a,u=o**2,d=l/u;if(d>.9)throw new Error("Move face farther from camera");if(d<.05)throw new Error("Move face closer to camera")},checkFacialFeatures:(r,o)=>{},checkInFrame:(r,o)=>{const{offsetX:i,offsetY:s}=o,{box:a}=r;if(!(a.xMin-i>=o.x&&a.yMin-s>=o.y&&a.xMax-i<=o.x+o.width&&a.yMax-s<=o.y+o.height))throw new Error("Position head in frame")}}}function Lt(e={}){const{validations:t=["zoom"],frameSize:n,onFace:r=()=>{},onError:o=()=>{}}=e,{faceDetector:i}=fe(),{checkFacialFeatures:s,checkZoomLevel:a,checkInFrame:l}=Po(),u=w(null),d=f=>{var p;try{if(f.length===0)throw new Error("Detecting face...");if(f.length>1)throw new Error("A maximum of 1 face is allowed");const _=u.current,y=(p=u.current)==null?void 0:p.parentElement;if(!_||!y)return;const v=f[0];for(const m of t)switch(m){case"zoom":a(v,Math.min(y.clientHeight,y.clientWidth));break;case"features":s(v,Math.min(y.clientHeight,y.clientWidth));break;case"in-frame":if(!n)throw new Error("Frame size is required to check if face is in frame");const g=n+200;l(v,{x:(y.clientWidth-g)/2,y:(y.clientHeight-g)/2,width:g,height:g,offsetX:(_.videoWidth-y.clientWidth)/2,offsetY:(_.videoHeight-y.clientHeight)/2});break;default:break}r(v)}catch(_){const{message:y}=_;o(y)}};return{detectFaces:async f=>{if(!i)return;const{ref:p}=f;u.current=p.current;const _=u.current;if(!_)throw new Error("No Video Source detected");const{videoWidth:y,videoHeight:v}=_;if(y===0||v===0)return;const m=xn(_,y,v),g=await Fe.detectFaces(i,m);d(g.faces)}}}const ae={root:"_root_5hgaj_1",container:"_container_5hgaj_4",progress:"_progress_5hgaj_7",intro:"_intro_5hgaj_12",content:"_content_5hgaj_15",branding:"_branding_5hgaj_18",instructionsContainer:"_instructionsContainer_5hgaj_22",instructions:"_instructions_5hgaj_22"},No={root:"_root_h5elg_1",spinner:"_spinner_h5elg_22"},Lo={container:"_container_1vep2_1",spin:"_spin_1vep2_1",md:"_md_1vep2_7",lg:"_lg_1vep2_10"};function Ao(e){const{size:t="md",message:n,className:r=""}=e;return h("span",{className:`${Lo.container} ${Lo[t]} ${r}`,children:n})}function At(e){const{Icon:t,description:n,title:r,actionText:o="Okay, got it",onActionClick:i=()=>{},loading:s=!1,children:a,hideButton:l=!1}=e;return h("div",{className:No.root,children:[h(t,{size:"custom",className:"yvlw-h-20 yvlw-mx-auto yvlw-mb-12"}),h("h2",{children:r}),h("p",{className:"subtext",children:n}),!l&&h("div",{className:"yvlw-mt-12",children:h(Gi,{onClick:()=>i(),className:"yvlw-flex yvlw-items-center yvlw-space-x-3",disabled:s,children:[h("span",{className:"yvlw-flex-1 yvlw-flex yvlw-items-center yvlw-space-x-1 yvlw-justify-center",children:o}),s&&h(Ao,{className:No.spinner})]})}),a]})}const Io="yvlw-absolute yvlw-w-full yvlw-h-full",Ro="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300",Do="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300";function It(e){const{children:t,instruction:n,completed:r,failed:o,onStart:i=()=>{},onReset:s=()=>{}}=e,[a,l]=C(!1),{completedCount:u,tasks:d,nextTask:c,branding:f,isMobileAppWebView:p}=fe(),_=U(()=>u*100/d.length,[u,d.length]);return H(()=>{!r&&!o&&(async()=>{await i(),l(!0)})()},[]),H(()=>{r&&(()=>{c()})()},[r]),h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:[h("div",{style:{width:`${_}%`},className:ae.progress}),h(he,{as:"div",show:a&&!r&&!o,enter:Ro,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Io,children:[h("div",{className:`${ae.content}`,children:t}),h("div",{className:ae.instructionsContainer,children:[h("div",{className:ae.instructions,children:[h("h2",{children:n.title}),h("p",{className:"subtext",children:n.description})]}),h("div",{className:ae.branding,children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})})]})]}),h(he,{show:o,as:"div",enter:Ro,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Io,children:h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:"Could not confirm liveness on this task. Click on the button below to go again",onActionClick:s,actionText:"Try Again"})})})]})})}function Rt(e={}){const{timeout:t,onTimeout:n=()=>{}}=e,[r,o]=C(!1),i=w(null),s=j(()=>{t&&i.current&&clearTimeout(i.current)},[]),a=j(()=>{t&&(i.current=setTimeout(()=>{o(!0),n()},t))},[]),l=j(()=>{o(!1),a()},[]);return H(()=>s,[]),{timedOut:r,reset:l,start:a,stop:s}}const el=1,Pn=8,Oo="Place face in frame";function tl(e){const{difficulty:t,timeout:n}=e,{saveStream:r}=fe(),[o,i]=C([]),[s,a]=C(Oo),[l,u]=C(!1),[d,c]=C(!1),f=w(new Set),p=w(!1),_=w(null),{reset:y,start:v,stop:m,timedOut:g}=Rt({timeout:n}),$=()=>{i([]),a(Oo),u(!1),c(!1),f.current=new Set,p.current=!1,_.current=null,y()},T=E=>{const I=E*Pn,Y=Math.ceil((I+1)/ja);f.current.has(Y)||(f.current.add(Y),i(Array.from(f.current))),f.current.size>=Pn&&(m(),setTimeout(()=>{c(!0)},1e3))},S=(E,I)=>{let R=Math.atan2(I,E)*(180/Math.PI);return R<0&&(R+=360),R},x=j(()=>{if(f.current.size===0)return 25;switch(t){case"easy":return 5;case"hard":return 15;default:return 10}},[]),L=E=>{const{keypoints:I,box:Y}=E,R={x:Y.width*.5,y:Y.height*.5},q=I[el],D={y:q.y-Y.yMin,x:q.x-Y.xMin},K=R.x-D.x,M=D.y-R.y,N=x();return Math.abs(K)<N&&Math.abs(M)<N?null:S(K,M)},{detectFaces:W}=Lt({frameSize:280,validations:["zoom","in-frame"],onFace:E=>{u(!0),a("Slowly move head around to complete circle");const I=L(E);I&&T(I)},onError:E=>{a(E),i([]),f.current.clear(),_.current=null,p.current=!1}});return h(V,{children:h(It,{instruction:{title:s,description:l?void 0:"Always ensure face is in frame"},name:"complete-the-circle",completed:d,failed:g,onReset:$,onStart:v,children:h(at,{onStream:E=>{try{if(!E.current||d)return;const{videoWidth:I}=E.current;W({ref:E,frameSize:I})}catch{}},onRecord:r,children:h(Qa,{faceDetected:l,sectionsCount:Pn,visitedSections:o})})})})}const Nn={root:"_root_thujo_1",sticker:"_sticker_thujo_4",no:"_no_thujo_7",yes:"_yes_thujo_12"};function nl(e){const{show:t,stickers:n}=e;return h(V,{children:t&&h("div",{className:Nn.root,children:n.map(r=>h("div",{className:`${Nn.sticker} ${Nn[r]}`,children:r.toUpperCase()},`sticker-${r}`))})})}const rl={question:"Are you alive?",errorMessage:"You have to be alive to proceed though",answer:!0},ol="Wrong answer. Try again",Ho="Keep face in camera";function il(e){const{difficulty:t,questions:n=[rl],timeout:r}=e,[o,i]=C(Ho),[s,a]=C(!1),[l,u]=C(!1),{saveStream:d}=fe(),c=w("inactive"),f=w(0),p=w(!1),_=w(null),y=w(null),v=w(null),m=()=>{_.current&&clearTimeout(_.current),y.current&&clearTimeout(y.current)},{reset:g,start:$,stop:T,timedOut:S}=Rt({timeout:r,onTimeout:m}),x=()=>{i(Ho),a(!1),u(!1),c.current="inactive",f.current=0,p.current=!1,g()},L=R=>{const{keypoints:q}=R,D=q[1],K=q[9],M=D.x-K.x,N=D.y-K.y;return 90-Math.atan2(N,M)*(180/Math.PI)},W=R=>{c.current="inactive",i(n[R].question),_.current=setTimeout(()=>{c.current="active"},2e3)},F=U(()=>{switch(t){case"easy":return 2;case"hard":return 6;default:return 4}},[]),E=R=>{try{if(c.current="inactive",Math.abs(R)<F)throw new Error("Tilt head further to answer");const q=R>0,D=n[f.current].answer;if(q===D)f.current+=1,f.current===n.length?(u(!0),T()):W(f.current);else throw new Error(n[f.current].errorMessage||ol)}catch(q){i(q.message),y.current=setTimeout(()=>{W(f.current)},2e3)}},{detectFaces:I}=Lt({onFace:R=>{if(p.current||(a(!0),p.current=!0,W(f.current)),c.current==="inactive")return;const q=L(R);E(q)},onError:R=>{i(R)}}),Y=R=>{try{if(!R.current||l)return;v.current=R.current;const{videoWidth:q}=R.current;I({ref:R,frameSize:q})}catch{}};return H(()=>m,[]),h(It,{instruction:{title:o,description:s?"":"Move head left for No and right for Yes"},name:"yes-or-no",failed:S,onReset:x,onStart:$,completed:l,children:h(at,{onStream:Y,onRecord:d,children:h(nl,{show:s,stickers:["yes","no"]})})})}function sl(e={}){const{onChange:t=()=>{}}=e,n=!!window.DeviceOrientationEvent,r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma})};return H(()=>(window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r)}),[]),{canUse:n}}function Be(e,t){return Math.sqrt(e**2+t**2)}function al(e){const t=e.slice();for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}const He=(e,t)=>{for(const[n,r]of Object.entries(e))if(r===t)return n;return null},ll=e=>{const t=Object.keys(To);for(const n of t)if(new RegExp(`\\b${n}\\b`,"i").test(e))return To[n];return{key:"VALIDATION_ERROR",message:"We detected an error during your test. Please TRY AGAIN"}};function cl(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(null),s=w(!0),a=w(null),l=w(null),u=w(0),d=w(!1),c=U(()=>{switch(o){case"easy":return 6;case"hard":return 10;default:return 8}},[]),f=()=>{if(u.current<t){const v=t-u.current;let m=`Nod head ${v} `;v<t&&(m+="more "),m+=v>1?"times":"time",n(m);return}d.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)},{canUse:p}=sl({onChange:v=>{l.current=v}});return{evaluate:v=>{if(!p){n("Cannot perform task. Transfer to mobile device to complete");return}if(!l.current||!l.current.beta){n("Cannot perform task. Transfer to mobile device to complete");return}if(l.current.beta<60||l.current.beta>100){n("Keep phone in upright position to continue");return}if(d.current)return;const{keypoints:m}=v,g=Be(m[6].x-m[8].x,m[6].y-m[8].y),T=Be(m[2].x-m[1].x,m[2].y-m[1].y)/g*10;if(T>c){if(i.current||!s.current)return;i.current=T,s.current=!1,a.current=setTimeout(()=>{i.current=null},3e3)}else i.current&&i.current-T>c/2&&(u.current+=1,i.current=null,a.current&&clearTimeout(a.current)),s.current=!0;f()},reset:()=>{i.current=null,s.current=!0,a.current=null,l.current=null,u.current=0,d.current=!1}}}function ul(e){const{onMessage:t,onComplete:n,difficulty:r}=e,o=w(!1),i=U(()=>{switch(r){case"easy":return 80;case"hard":return 120;default:return 100}},[]);return{evaluate:l=>{if(o.current)return;const{keypoints:u}=l,d=Be(u[6].x-u[8].x,u[6].y-u[8].y);if(Be(u[14].x-u[13].x,u[14].y-u[13].y)/d*100>i){o.current=!0,t("Awesome!"),setTimeout(()=>{n()},500);return}t("Open your mouth wide")},reset:()=>{o.current=!1}}}function Wo(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(!0),s=w(!1),a=w(null),l=w(0),u=U(()=>{switch(o){case"easy":return{closed:20,open:30};case"hard":return{closed:10,open:30};default:return{closed:15,open:30}}},[]),d=y=>{i.current&&(y>=u.closed||(i.current=!1,a.current=Date.now()))},c=y=>{if(!i.current&&!(y<u.open)&&(i.current=!0,a.current)){const v=Date.now(),m=a.current;(v-m)/1e3<=2&&(l.current+=1)}},f=()=>{if(l.current<t){const y=t-l.current;let v=`Blink right eye ${y} `;y<t&&(v+="more "),v+=y>1?"times":"time",n(v);return}s.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)};return{evaluate:y=>{if(s.current)return;const{keypoints:v}=y,m=Be(v[6].x-v[8].x,v[6].y-v[8].y),$=Be(v[145].x-v[159].x,v[145].y-v[159].y)/m*100;d($),c($),f()},reset:()=>{i.current=!0,s.current=!1,a.current=null,l.current=0}}}var zo=(e=>(e.open_mouth="open_mouth",e.blink="blink",e))(zo||{});const Uo=al(Object.keys(zo)),jo="Keep face in camera";function dl(e){const{difficulty:t,maxBlinks:n=3,maxNods:r=3,timeout:o}=e,i=w(0),[s,a]=C(jo),[l,u]=C(!1),[d,c]=C(null),f=w(!1),{saveStream:p}=fe(),{reset:_,start:y,stop:v,timedOut:m}=Rt({timeout:o}),g=()=>{if(i.current===Uo.length-1){u(!0),v();return}i.current+=1},$=cl({total:Math.floor(Math.random()*r+1),difficulty:t,onMessage:E=>a(E),onComplete:g}),T=ul({difficulty:t,onMessage:E=>a(E),onComplete:g}),S=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:E=>a(E),onComplete:g}),{detectFaces:x}=Lt({onFace:E=>{switch(f.current||(f.current=!0),Uo[i.current]){case"open_mouth":T.evaluate(E);break;case"blink":S.evaluate(E);break}},onError:E=>{a(E)}}),L=()=>{i.current=0,a(jo),u(!1),f.current=!1,S.reset(),$.reset(),T.reset(),_()},W=async E=>{try{if(!E.current||l)return;const{videoWidth:I}=E.current;await x({ref:E,frameSize:I,throttleInterval:500})}catch{}},F=async()=>{};return h(It,{instruction:{title:s,description:"Follow the directives as instructed"},name:"motions",failed:m,onReset:L,completed:l,onStart:async()=>{await F(),y()},children:d?h(V,{}):h(at,{onStream:W,onRecord:p})})}const Vo="Keep face in camera";function fl(e){const{difficulty:t,maxBlinks:n=3,timeout:r}=e,[o,i]=C(Vo),[s,a]=C(!1),[l,u]=C(null),d=w(!1),{saveStream:c}=fe(),{reset:f,start:p,stop:_,timedOut:y}=Rt({timeout:r}),v=()=>{a(!0),_()},m=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:x=>i(x),onComplete:v}),{detectFaces:g}=Lt({onFace:x=>{d.current||(d.current=!0),m.evaluate(x)},onError:x=>{i(x)}}),$=()=>{i(Vo),a(!1),d.current=!1,m.reset(),f()},T=async x=>{try{if(!x.current||s)return;const{videoWidth:L}=x.current;await g({ref:x,frameSize:L})}catch{}},S=async()=>{};return h(It,{instruction:{title:o,description:"Follow the directives as instructed"},name:"blink",failed:y,onReset:$,completed:s,onStart:async()=>{await S(),p()},children:l?h(V,{}):h(at,{onStream:T,onRecord:c})})}const Ln={LEFT_EYE:[36,37,38,39,40,41],RIGHT_EYE:[42,43,44,45,46,47],MOUTH:[48,49,50,51,52,53,54,55,56,57,58,59]},Dt=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),Bo=e=>{if(e.length!==6)return 0;const t=Dt(e[1],e[5]),n=Dt(e[2],e[4]),r=Dt(e[0],e[3]);return(t+n)/(2*r)},pl=e=>{if(e.length<12)return 0;const t=e[9],n=e[3];return Dt(t,n)},hl=(e,t,n,r)=>{var c,f,p;let o=!0,i=!0;if(!r){const v=Ln.LEFT_EYE.map(L=>e[L]),m=Ln.RIGHT_EYE.map(L=>e[L]),g=Ln.MOUTH.map(L=>e[L]),$=Bo(v),T=Bo(m),S=pl(g);o=($+T)/2>1,i=S<73.24,o||t("Please look at the camera!"),i||t("Please close your mouth!")}const s=.5,a=.12,l=((c=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkLeft"))==null?void 0:c.score)??0,u=((f=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkRight"))==null?void 0:f.score)??0,d=((p=r==null?void 0:r.find(_=>_.categoryName==="jawOpen"))==null?void 0:p.score)??0;return o=l<s&&u<s,o||t("Please look at the camera!"),i=d<a,i||t("Please close your mouth!"),{eyesOpen:o,mouthClosed:i}};function ml(e={}){const{validations:t=["zoom","in-frame"],frameSize:n,onFace:r=()=>{},onError:o=()=>{},onMessage:i=()=>{},livenessTimeout:s}=e,{faceDetector:a,savePhoto:l}=fe(),{checkFacialFeatures:u,checkZoomLevel:d,checkInFrame:c}=Po(),f=w(null),p=w(null),_=w(!1),y=w(null),v=w(!1),m=w([]),g=j(()=>{p.current&&clearTimeout(p.current),y.current&&clearTimeout(y.current),m.current.forEach(clearTimeout),v.current=!1,_.current=!0},[]),$=w(null),T=w(null),S=w([]),x=10,L=7.5,W=2,F=w({sharpness:0,data:null}),E=(M,N)=>{const O=M.getContext("2d");if(!O||N.width===0||N.height===0||!O||N.width===0||N.height===0)return!1;const k=O.getImageData(N.xMin,N.yMin,N.width,N.height),{data:b}=k;let z=0,X=0;for(let J=0;J<b.length;J+=4).299*b[J]+.587*b[J+1]+.114*b[J+2]>250&&X++;const Q=b.length/4;return z=X/Q,z>.01},I=(M,N,O,k)=>{const b=N.current,z=b==null?void 0:b.parentElement;if(!(!b||!z))for(const X of k)switch(X){case"zoom":d(M,Math.min(z.clientHeight,z.clientWidth));break;case"features":u(M,Math.min(z.clientHeight,z.clientWidth));break;case"in-frame":let Q=O;Q||(Q=Math.min(z.clientHeight,z.clientWidth)*.7);const J=Q+200;c(M,{x:(z.clientWidth-J)/2,y:(z.clientHeight-J)/2,width:J,height:J,offsetX:(b.videoWidth-z.clientWidth)/2,offsetY:(b.videoHeight-z.clientHeight)/2});break}},Y=M=>{const N=[33,133,159,362,263,386],O=.5;for(const k of N){const b=M[k];if(!b||b.score&&b.score<O)return!1}return!0},R=(M,N)=>{const O=M.getContext("2d");if(!O||N.width===0||N.height===0)return!1;const k=O.getImageData(N.xMin,N.yMin,N.width,N.height),{data:b}=k;let z=0;for(let Q=0;Q<b.length;Q+=4){const J=b[Q],ee=b[Q+1],qe=b[Q+2],Ot=.299*J+.587*ee+.114*qe;z+=Ot}return z/(b.length/4)<60},q=M=>{const N={x:M.box.xMin+(M.box.width??0)/2,y:M.box.yMin+(M.box.height??0)/2};if(S.current.push(N),S.current.length>x&&S.current.shift(),S.current.length<x)return!1;let O=0,k=0,b=0;for(let ee=1;ee<S.current.length;ee++){const qe=S.current[ee-1],Ot=S.current[ee],ut=Ot.x-qe.x,Yo=Ot.y-qe.y,Go=Math.sqrt(ut*ut+Yo*Yo);Go>=2&&(O+=Go,ee>1&&Math.sign(ut)!==Math.sign(b)&&Math.abs(ut)>3&&k++,b=ut)}const X=O/(x-1)>L,Q=k>=W,J=X||Q;return J&&i("🚨 Head shake detected!"),J},D=(M,N,O,k)=>{try{if(M.length===0||M.length>1){p.current&&(clearTimeout(p.current),p.current=null),i(M.length>1?"Please ensure only one face is visible":"Detecting face...");return}const b=M[0];let z="",X=!0;try{I(b,f,n,t)}catch(ee){z=ee.message,X=!1}q(b)&&(z="Please hold your head steady",X=!1),k||(z="Center your face in the frame",X=!1),Y(b.keypoints)||(z="Please ensure your eyes are clearly visible. Remove glasses if necessary.",X=!1);const{eyesOpen:Q,mouthClosed:J}=hl(b.keypoints,i,!1,O);if(Q?J||(z="Please close your mouth",X=!1):(p.current&&(clearTimeout(p.current),p.current=null),X=!1),!X){p.current&&(clearTimeout(p.current),p.current=null,m.current.forEach(clearTimeout)),i(z),r(b,!1,O,!1);return}if(!p.current){if(R($.current,b.box)){i("Too dark – move to a well-lit area");return}if(E($.current,b.box)){i("Too much glare. Please avoid direct light on your face.");return}i("Hold still..."),F.current={sharpness:0,data:null},m.current.forEach(clearTimeout);const ee=setTimeout(()=>i("Almost there..."),400),qe=setTimeout(()=>i("Detecting liveness..."),700);m.current=[ee,qe],p.current=setTimeout(()=>{F.current.data?(l(F.current.data),r(b,!0,O,!0)):o("Could not capture a clear photo. Please try again.")},1e3)}if(p.current){const ee=Oa(N);ee>F.current.sharpness&&(F.current={sharpness:ee,data:N})}}catch(b){o(b.message),M.length>0&&r(M[0],!1,O,!1)}};return{detectFaces:async M=>{if(!a)return;f.current=M.ref.current;const N=f.current;if(!N||N.videoWidth===0)return;$.current||($.current=document.createElement("canvas"),T.current=$.current.getContext("2d",{willReadFrequently:!0}));const O=$.current,k=T.current;if(!O||!k)return;O.width=N.videoWidth,O.height=N.videoHeight,k.drawImage(N,0,0,O.width,O.height);const b=k.getImageData(0,0,O.width,O.height);!v.current&&N.readyState>=2&&!_.current&&(v.current=!0,y.current=setTimeout(()=>{o("Liveness check TIMED OUT. Please try again."),g()},s));const{faces:z,blendShapes:X,inBox:Q}=await Fe.detectFaces(a,b);D(z,b,X,Q)},cleanup:g}}const An={container:"_container_1ej18_1",progress:"_progress_1ej18_12",completed:"_completed_1ej18_33",marker:"_marker_1ej18_37"};function vl(e){const{faceDetected:t}=e,n=U(()=>{const r=[An.container];return t&&r.push(An.focused),r.join(" ")},[t]);return h("div",{className:n,children:h(he,{as:"div",className:"yvlw-absolute",children:h("div",{className:An.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})})}const In={EnvironmentNotSupported:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face.",SpoofFace:"We detected a spoofing attempt",FaceTrackingFailed:"We could not detect your face",ExcessiveFaceBrightnessDetected:"We detected excessive light during the test, please wipe any oil or sweat that might cause a reflection on your face."},_l={None:"Processing...",LookAtCamera:"Look at camera.",FaceNotCentered:"Center your face in the camera.",MoveCloser:"Too far away! Move in closer.",ContinueToMoveCloser:"Continue to move closer.",MoveBack:"Too close! Move farther away.",TooMuchMovement:"Too much movement.",AttentionNotNeeded:"Finalizing check...",LookInFront:"Look in front.",TimedOut:"Timed out.",IncreaseBrightnessToMax:"Increase your screen brightness to maximum.",Tip1Title:"Tip 1:",Tip2Title:"Tip 2:",Tip3Title:"Tip 3:",Tip1:"Center your face in the preview. Make sure your eyes and mouth are visible, remove any obstructions like headphones.",Tip2:"You may be asked to smile.",Tip3:"You may be asked to turn your nose towards the green color.",Continue:"Continue"};function yl(e){const{onComplete:t=()=>{},onMessage:n=()=>{},onError:r=()=>{}}=e,{setColorScheme:o,getColorScheme:i}=xo(),s=w(null),a=w(!1),l=()=>{s.current&&(s.current.callAttemptEnd(),s.current.delete(),s.current=null)},u=j(()=>{l()},[]),d=()=>{s.current&&l(),s.current=null,a.current=!1},c=v=>{var L,W;const m=v.split(".");let g=!1;s.current.setToken(v);let $="",T="",S,x=0;if(m.length===3){const F=JSON.parse(atob(m[1]));if(F.face){const E=JSON.parse(F.face),I=/^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;if(E.endpoint&&(I.test(E.endpoint)||E.endpoint==="https://virginia.api.cognitive.microsoft.us")){s.current.setEndpoint(E.endpoint);const R=JSON.parse(F["allowed-paths"]);if(R){const q=(L=R.find(k=>k.path.toLocaleLowerCase().endsWith("/session/start")))==null?void 0:L.path;s.current.setSessionStartPath(q);const D=(W=R.find(k=>k.path.toLocaleLowerCase().endsWith("/session/attempt/end")))==null?void 0:W.path;s.current.setAttemptEndPath(D);const K=R.find(k=>k.path.endsWith("/detectLiveness/singleModal"));K&&({path:$,quota:x}=K,s.current.setLivenessPath($));const M=R.find(k=>k.path.endsWith("/detectLivenessWithVerify/singleModal"));M&&({path:T,quota:x}=M,s.current.setLivenessWithVerifyPath(T));const N=new Set(R.map(k=>{var b;return(b=k.path)==null?void 0:b.split("/")[1]}));if(N.size===1&&(K||M)){const k=N.values().next().value;s.current.setApiVersion(k),g=!0,S=E.clientClaims.livenessOperationMode}}}}s.current.setOperationQuota(x),s.current.setOperationMode(window.Module.LivenessOperationMode[S]),F.sid&&s.current.setSid(F.sid),F["azure-resource-id"]&&s.current.setResourceId(F["azure-resource-id"])}if(g)s.current.initialize();else{const F={livenessError:He(window.Module.LivenessFailureReason,window.Module.LivenessFailureReason.InvalidToken),recognitionError:He(window.Module.RecognitionFailureReason,window.Module.RecognitionFailureReason.None)};r(F.livenessError?In[F.livenessError]||F.livenessError:"Something went wrong"),u()}},f=v=>{try{s.current=new window.Module.FaceRecoEngineAdapter,c(v)}catch(m){r(`Could not start liveness test: ${m.message}`),l()}},p=v=>{const{isActionValid:m,isFeedbackValid:g,feedback:$}=v;if(m)switch(v.action){case window.Module.ActionRequiredFromApplication.BrightenDisplay:o("light");break;case window.Module.ActionRequiredFromApplication.DarkenDisplay:o("dark");break;case window.Module.ActionRequiredFromApplication.StopCamera:break}if(!a.current&&g){const T=He(window.Module.FeedbackForFace,$);n(T&&(_l[T]||""))}if($===window.Module.FeedbackForFace.AttentionNotNeeded){a.current=!0;const T=i();o(T)}},_=v=>{var S,x;const{livenessResult:m,recognitionResult:g}=v,$=((S=m.failureReason)==null?void 0:S.value)!==0||((x=g.failureReason)==null?void 0:x.value)!==0,T=new Set(["EnvironmentNotSupported","ExcessiveFaceBrightnessDetected","FaceEyeRegionNotVisible"]);if($){const L={livenessError:He(window.Module.LivenessFailureReason,m.failureReason),recognitionError:He(window.Module.RecognitionFailureReason,g.failureReason)};L.livenessError&&T.has(L.livenessError)?t():r(L.livenessError?In[L.livenessError]||L.livenessError:"Something went wrong")}else{const L={livenessStatus:He(window.Module.LivenessStatus,m.status),recognitionResult:{status:He(window.Module.RecognitionStatus,g.status),matchConfidence:g.confidence},resultId:m.resultId,digest:m.digest};L.livenessStatus==="RealFace"?t():L.livenessStatus==="SpoofFace"?r(In[L.livenessStatus]):r("Could not validate request")}u()};return{start:f,analyze:p,processFrame:v=>{let m=!1;if(a.current)m=s.current.generatePayloadAndResult();else{const{videoWidth:g,videoHeight:$}=v,T=xn(v,g,$,void 0,{willReadFrequently:!0}),S=window.Module._malloc(T.data.byteLength);try{window.Module.HEAPU8.set(T.data,S);const x=s.current.processFrame(g,$,T.data.byteLength,S);x.terminate?m=!0:x.isValid&&p(x)}finally{window.Module._free(S)}}m&&_(s.current.getFaceAnalyzerResult())},reset:d,destroy:u}}const qo="Detecting face...";function gl({onImageCaptured:e,fetchAzureSessionToken:t,loadAzureSdk:n,onError:r,onReset:o,onFailure:i}){const[s,a]=C(qo),[l,u]=C(!1),d=w("findingFace"),c=w(null),f=w(),p=w(!1),[_,y]=C(0),v=w(!1),[m,g]=C(!1);H(()=>{y(Math.min(window.innerWidth,window.innerHeight)*.6)},[]),H(()=>{n(),t()},[]);const $=yl({onMessage:F=>{d.current==="analyzingLiveness"&&a(F)},onComplete:()=>{d.current="done",e(!0)},onError:F=>{const E=ll(F);a(E.message),d.current="done",u(!0),r&&r(F),i({faceImage:"",passed:!1,metadata:{},error:E})}}),T=()=>{v.current=!1,a(qo),d.current="findingFace",c.current=null,$.reset(),f.current&&cancelAnimationFrame(f.current),u(!1),o()},{detectFaces:S,cleanup:x}=ml({validations:["zoom","features"],frameSize:_,livenessTimeout:1e4,onFace:async(F,E,I)=>{p.current=E,E&&d.current==="findingFace"&&!v.current&&I&&(v.current=!0,g(!0))},onPhotoSaved:()=>{},onMessage:F=>{d.current==="findingFace"&&a(F)},onError:F=>{a(F),u(!0),r&&r(F)}});H(()=>()=>{x()},[]);const L=()=>{!c.current||c.current.paused||c.current.ended||(d.current==="findingFace"?S({ref:c}):d.current==="analyzingLiveness"&&$.processFrame(c.current),d.current!=="done"&&(f.current=requestAnimationFrame(L)))};H(()=>{(async()=>{if(m){g(!1),x();try{await n();const E=await t();if(E)$.start(E),d.current="analyzingLiveness";else throw new Error("Session token could not be retrieved.")}catch(E){const I=E instanceof Error?E.message:"Failed to start liveness check.";r&&r(I),i({faceImage:"",passed:!1,metadata:{},error:{key:"session_token_error",message:I}}),u(!0)}}})()},[m]);const W=F=>{F.current&&(c.current=F.current,L())};return H(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[]),h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col yvlw-items-center yvlw-justify-center",children:l?h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:s,onActionClick:T,actionText:"Try Again"})}):h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col",children:[h("div",{children:h(at,{onStream:W,children:h(V,{children:[h(vl,{faceDetected:p.current}),d.current==="analyzingLiveness"&&h("div",{className:"yvlw-bg-black/20 yvlw-z-5"})]})})}),h("div",{className:"yvlw-border-t dark:yvlw-border-gray-800 yvlw-border-gray-200",children:h("div",{className:"yvlw-text-center yvlw-mx-auto yvlw-pt-4 yvlw-pb-6 yvlw-px-4",children:[h("div",{className:ae.instructions,children:[h("h2",{children:s}),h("p",{className:"subtext",children:"Position your face in the camera frame and hold still."})]}),h("div",{className:ae.branding})]})})]})})})})}const wl=()=>{if(window.isAzureSdkLoading)return window.azureSdkLoadPromise;window.isAzureSdkLoading=!0;const e=new Promise((t,n)=>{let r=st.js.simd;try{WebAssembly.validate(new Uint8Array(qa))||(r=st.js.default)}catch{r=st.js.simd}window.Module=window.Module||{},window.Module.onRuntimeInitialized=()=>{t()},Object.assign(window.Module,{locateFile(i,s){if(i.includes("AzureAIVisionFace")&&i.endsWith(".wasm")){const a=i.includes("SIMD")?st.wasm.simd:st.wasm.default;return`${$o}/${a}`}return`${s}${i}`}});const o=document.createElement("script");o.src=`${$o}/${r}`,o.async=!0,o.onerror=()=>{n(new Error("Network error: Failed to load SDK script."))},document.head.appendChild(o)});return window.azureSdkLoadPromise=e,e};let ct=null;function bl(){var q;const{toggleColorScheme:e,getColorScheme:t,setColorScheme:n}=xo(),{user:r,tasks:o,currentTaskIndex:i,completed:s,onComplete:a,onFailure:l,faceDetector:u,presentation:d,clearSavedPhoto:c,branding:f,isMobileAppWebView:p}=fe(),[_,y]=C(!1),[v,m]=C(!1),[g,$]=C(null),[T,S]=C(!1),[x,L]=C(!1),[W,F]=C(0);H(()=>{const D=t();n(D)},[]);const{sessionToken:E}=fe(),I=async()=>(!E&&!ct&&(ct=Promise.reject(new Error("sessionToken not provided. Generate a sessionToken on your backend and pass it to the SDK."))),E??ct),Y=async()=>{try{y(!0),$(null),await a(),ct=null,d==="page"&&S(!0)}catch(D){$(D.message)}finally{y(!1)}},R=j(D=>D===i?oe.active:i>D?oe.completed:"subtext",[i]);return h("div",{className:oe.root,children:h("div",{className:oe.container,children:[h("div",{className:`${oe.lhs} divider`,children:[h("div",{className:oe.info,children:[h(Ka,{}),h("div",{children:h("p",{className:"yvlw-text-xs yvlw-m-0 yvlw-p-0 subtext",children:"You have been given this set of tasks to complete. They are pretty easy to do but we will be guiding you every step of the way."})}),h("ol",{children:[o.map((D,K)=>h("li",{className:R(K),children:Ya[D.id].name},`task-${K}`)),h("li",{className:s?oe.active:"",children:"Complete! 🎉"})]})]}),h("footer",{className:"divider",children:[h("div",{children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})}),h("div",{onClick:()=>e(),role:"button",children:[h("div",{className:"dark:yvlw-hidden",children:h(go,{})}),h("div",{className:"yvlw-hidden dark:yvlw-block",children:h(Ma,{})})]})]})]}),h("div",{className:oe.main,children:h("div",{className:oe.content,children:[h(he,{show:!v,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:u?h(At,{Icon:La,title:"Liveness Check",description:"To ensure the security of your identity, we conduct a liveness check to verify that you are a real person actively engaging with the process. Please ensure to stay in a well lit area.",actionText:"Start Liveness Test",onActionClick:()=>m(!0)}):h(Ao,{size:"lg"})})}),h(he,{show:v&&!x,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(gl,{fetchAzureSessionToken:I,loadAzureSdk:wl,onImageCaptured:D=>{$(null),D&&L(!0)},onError:D=>$(D),onReset:()=>{ct=null,L(!1),F(D=>D+1),c()},onFailure:l},W)})}),o.map((D,K)=>{let M;switch(D.id){case"complete-the-circle":M=h(tl,{...D});break;case"yes-or-no":M=h(il,{...D});break;case"motions":M=h(dl,{...D});break;case"blink":M=h(fl,{...D});break;default:M=h(V,{});break}return h(he,{show:v&&x&&!s&&i===K,appear:!0,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full",children:M},`task-${K}`)}),h(he,{show:v&&s,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(At,{Icon:Aa,title:T?"All Set!":"Completed",description:T?"You can now close or exit the window":"Your Identity verification has been completed successfully. Thanks for your patience",actionText:"Finish",loading:_,onActionClick:Y,hideButton:T,children:g&&h("div",{className:"yvlw-mt-3",children:g})})})})]})}),h("div",{className:`${oe.rhs} divider`,children:r&&h("div",{className:`${oe.profile} divider`,children:[h("div",{children:h("div",{className:oe.avatar,children:[r.firstName.charAt(0).toUpperCase(),(q=r.lastName)==null?void 0:q.charAt(0).toUpperCase()]})}),h("div",{children:[h("h4",{children:[r.firstName," ",r.lastName]}),r.email&&h("p",{className:"subtext",children:r.email})]})]})})]})})}function El(e){const{tasks:t,namespace:n,user:r,branding:o,isMobileAppWebView:i,onClose:s=()=>{},onSuccess:a,onFailure:l,presentation:u="modal",publicKey:d,metadata:c,sandboxEnvironment:f,sessionId:p,sessionToken:_}=e,[y,v]=C(e.show),m=()=>{v(!1),s()};return h(Ga,{namespace:n,publicKey:d,tasks:t,user:r,branding:o,isMobileAppWebView:i,onRequestClose:m,onSuccess:a,onFailure:l,metadata:c,presentation:u,sandboxEnvironment:f,sessionId:p,sessionToken:_,children:h(Ca,{id:n,open:u==="page"?!0:y,onClose:m,transition:!0,className:`${xa.root} ${Nt.root} ${Nt[u]}`,style:{"--branding-color":(o==null?void 0:o.color)??Va},children:[u==="modal"&&h("div",{onClick:m,role:"button",className:Nt.close,children:h(Ia,{className:"yvlw-text-white"})}),h(yo,{className:`${Nt.container}`,children:h(bl,{})})]})})}class $l{constructor(t){this.tasks=[],this.container=null,this.namespace="liveness-web-sdk",this.loadedScripts=[];const{presentation:n="modal"}=t;this.presentation=n,this.props=t,t.tasks&&(this.tasks=t.tasks),n==="page"&&this.start()}validateOptions(){if(!this.tasks)throw new Error("Tasks cannot be empty");if(!this.props.publicKey)throw new Error("A Public Key is required");if(this.props.user&&!this.props.user.firstName)throw new Error("First Name is required when User object is supplied");if(!this.props.sessionId)throw new Error("A sessionId is required. Generate it on your backend and pass it in.");if(!this.props.sessionToken)throw new Error("A sessionToken is required for passive liveness. Generate it on your backend and pass it in.")}async start(t){t&&(this.tasks=t),this.validateOptions(),this.container=document.createElement("div"),document.body.appendChild(this.container),We(h(El,{namespace:this.namespace,publicKey:this.props.publicKey,sandboxEnvironment:this.props.sandboxEnvironment,presentation:this.props.presentation,show:!0,tasks:this.tasks,user:this.props.user,branding:this.props.branding,isMobileAppWebView:this.props.isMobileAppWebView,onClose:()=>this.close(),onSuccess:this.props.onSuccess,onFailure:this.props.onFailure,metadata:this.props.metadata,sessionId:this.props.sessionId,sessionToken:this.props.sessionToken}),this.container)}close(){if(this.container&&this.presentation!=="page"){if(!document.body.contains(this.container))return;document.body.removeChild(this.container),this.props.onClose&&this.props.onClose()}}}return $l});
5
+ `))}else{let f=d.props,p=f==null?void 0:f.className,_=typeof p=="function"?(...m)=>vn(p(...m),c.className):vn(p,c.className),y=_?{className:_}:{},v=jr(d.props,Re(_n(c,["ref"])));for(let m in l)m in v&&delete l[m];return nn(d,Object.assign({},v,l,u,{ref:o(d.ref,u.ref)},y))}return le(i,Object.assign({},_n(c,["ref"]),i!==V&&u,i!==V&&l),d)}function Vi(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function jr(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o==null?void 0:o.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Bi(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s==null||s(...o)}});return t}function re(e){var t;return Object.assign(en(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Re(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function _n(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let qi="button";function Yi(e,t){var n;let r=Ur(),{disabled:o=r||!1,autoFocus:i=!1,...s}=e,{isFocusVisible:a,focusProps:c}=Ri({autoFocus:i}),{isHovered:u,hoverProps:d}=Ii({isDisabled:o}),{pressed:l,pressProps:f}=Ui({disabled:o}),p=Bi({ref:t,type:(n=s.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},c,d,f),_=U(()=>({disabled:o,hover:u,focus:a,active:l,autofocus:i}),[o,u,a,l,i]);return se({ourProps:p,theirProps:s,slot:_,defaultTag:qi,name:"Button"})}let Gi=re(Yi),Ki="div";var kt=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(kt||{});function Xi(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return se({ourProps:i,theirProps:o,slot:{},defaultTag:Ki,name:"Hidden"})}let yn=re(Xi),Zi=ie(null);function Ji({children:e}){let t=te(Zi);if(!t)return P.createElement(P.Fragment,null,e);let{target:n}=t;return n?vt(P.createElement(P.Fragment,null,e),n):null}let Vr=Symbol();function Qi(e,t=!0){return Object.assign(e,{[Vr]:t})}function pe(...e){let t=w(e);H(()=>{t.current=e},[e]);let n=G(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Vr]))?void 0:n}let gn=ie(null);gn.displayName="DescriptionContext";function Br(){let e=te(gn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Br),t}return e}function es(){let[e,t]=C([]);return[e.length>0?e.join(" "):void 0,U(()=>function(n){let r=G(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),c=a.indexOf(i);return c!==-1&&a.splice(c,1),a}))),o=U(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return P.createElement(gn.Provider,{value:o},n.children)},[t])]}let ts="p";function ns(e,t){let n=Ee(),r=Ur(),{id:o=`headlessui-description-${n}`,...i}=e,s=Br(),a=pe(t);ne(()=>s.register(o),[o,s.register]);let c=r||!1,u=U(()=>({...s.slot,disabled:c}),[s.slot,c]),d={ref:a,...s.props,id:o};return se({ourProps:d,theirProps:i,slot:u,defaultTag:ts,name:s.name||"Description"})}let rs=re(ns),os=Object.assign(rs,{});var qr=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(qr||{});let is=ie(()=>{});function ss({value:e,children:t}){return P.createElement(is.Provider,{value:e},t)}let as=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function Yr(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Gr(e){return _t(e.subscribe,e.getSnapshot,e.getSnapshot)}let cs=new as(()=>Yr(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Ve(e,t){let n=cs.get(t),r=Ee(),o=Gr(n);if(ne(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let i=o.indexOf(r),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}let wn=new Map,et=new Map;function Kr(e){var t;let n=(t=et.get(e))!=null?t:0;return et.set(e,n+1),n!==0?()=>Xr(e):(wn.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Xr(e))}function Xr(e){var t;let n=(t=et.get(e))!=null?t:1;if(n===1?et.delete(e):et.set(e,n-1),n!==1)return;let r=wn.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,wn.delete(e))}function ls(e,{allowed:t,disallowed:n}={}){let r=Ve(e,"inert-others");ne(()=>{var o,i;if(!r)return;let s=$e();for(let c of(o=n==null?void 0:n())!=null?o:[])c&&s.add(Kr(c));let a=(i=t==null?void 0:t())!=null?i:[];for(let c of a){if(!c)continue;let u=wt(c);if(!u)continue;let d=c.parentElement;for(;d&&d!==u.body;){for(let l of d.children)a.some(f=>l.contains(f))||s.add(Kr(l));d=d.parentElement}}return s.dispose},[r,t,n])}function Zr(e,t,n){let r=Ie(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});H(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=$e();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let bn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),us=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ge=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ge||{}),En=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(En||{}),ds=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ds||{});function fs(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(bn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function ps(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(us)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Jr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Jr||{});function hs(e,t=0){var n;return e===((n=wt(e))==null?void 0:n.body)?!1:Te(t,{0(){return e.matches(bn)},1(){let r=e;for(;r!==null;){if(r.matches(bn))return!0;r=r.parentElement}return!1}})}var ms=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ms||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function we(e){e==null||e.focus({preventScroll:!0})}let vs=["textarea","input"].join(",");function _s(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,vs))!=null?n:!1}function ys(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function tt(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?ys(e):e:t&64?ps(e):fs(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(_=>_!=null&&"current"in _?(_==null?void 0:_.current)===p:_===p))),r=r??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},d=0,l=s.length,f;do{if(d>=l||d+l<=0)return 0;let p=c+d;if(t&16)p=(p+l)%l;else{if(p<0)return 3;if(p>=l)return 1}f=s[p],f==null||f.focus(u),d+=a}while(f!==i.activeElement);return t&6&&_s(f)&&f.select(),2}function Qr(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function gs(){return/Android/gi.test(window.navigator.userAgent)}function ws(){return Qr()||gs()}function nt(e,t,n,r){let o=Ie(n);H(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function eo(e,t,n,r){let o=Ie(n);H(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const to=30;function bs(e,t,n){let r=Ve(e,"outside-click"),o=Ie(n),i=j(function(c,u){if(c.defaultPrevented)return;let d=u(c);if(d===null||!d.getRootNode().contains(d)||!d.isConnected)return;let l=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of l){if(f===null)continue;let p=f instanceof HTMLElement?f:f.current;if(p!=null&&p.contains(d)||c.composed&&c.composedPath().includes(p))return}return!hs(d,Jr.Loose)&&d.tabIndex!==-1&&c.preventDefault(),o.current(c,d)},[o]),s=w(null);nt(r,"pointerdown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"mousedown",c=>{var u,d;s.current=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target},!0),nt(r,"click",c=>{ws()||s.current&&(i(c,()=>s.current),s.current=null)},!0);let a=w({x:0,y:0});nt(r,"touchstart",c=>{a.current.x=c.touches[0].clientX,a.current.y=c.touches[0].clientY},!0),nt(r,"touchend",c=>{let u={x:c.changedTouches[0].clientX,y:c.changedTouches[0].clientY};if(!(Math.abs(u.x-a.current.x)>=to||Math.abs(u.y-a.current.y)>=to))return i(c,()=>c.target instanceof HTMLElement?c.target:null)},!0),eo(r,"blur",c=>i(c,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function rt(...e){return U(()=>wt(...e),[...e])}function no(e,t,n,r){let o=Ie(n);H(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function Es(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function $s(){return Qr()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=$e();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let c=a.target.closest("a");if(!c)return;let{hash:u}=new URL(c.href),d=e.querySelector(u);d&&!r(d)&&(s=d)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(r(a.target)){let c=a.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let c=(a=window.scrollY)!=null?a:window.pageYOffset;i!==c&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function Ts(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function ks(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let De=Yr(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:$e(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:ks(n)},o=[$s(),Es(),Ts()];o.forEach(({before:i})=>i==null?void 0:i(r)),o.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});De.subscribe(()=>{let e=De.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&De.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&De.dispatch("TEARDOWN",n)}});function Ss(e,t,n=()=>({containers:[]})){let r=Gr(De),o=t?r.get(t):void 0,i=o?o.count>0:!1;return ne(()=>{if(!(!t||!e))return De.dispatch("PUSH",t,n),()=>De.dispatch("POP",t,n)},[e,t]),i}function Fs(e,t,n=()=>[document.body]){let r=Ve(e,"scroll-lock");Ss(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Cs(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function xs(e=0){let[t,n]=C(e),r=j(c=>n(c),[t]),o=j(c=>n(u=>u|c),[t]),i=j(c=>(t&c)===c,[t]),s=j(c=>n(u=>u&~c),[n]),a=j(c=>n(u=>u^c),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var Ms=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ms||{});function Ps(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Ns(e,t,n,r){let[o,i]=C(n),{hasFlag:s,addFlag:a,removeFlag:c}=xs(e&&o?3:0),u=w(!1),d=w(!1),l=Et();return ne(function f(){var p;if(!e)return;n&&i(!0);let _=t.current;return _?((p=r==null?void 0:r.start)==null||p.call(r,n),Ls(_,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(a(3),c(4)):(a(4),c(2)))},run(){d.current?n?(c(3),a(4)):(c(4),a(3)):n?c(1):a(1)},done(){var y;d.current&&typeof _.getAnimations=="function"&&_.getAnimations().length>0||(u.current=!1,c(7),n||i(!1),(y=r==null?void 0:r.end)==null||y.call(r,n))}})):n?(a(3),l.nextFrame(()=>f())):void 0},[e,n,t,l]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Ls(e,{prepare:t,run:n,done:r,inFlight:o}){let i=$e();return Is(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{i.add(As(e,r)),n()}),i.dispose}function As(e,t){let n=Cs(t),r=$e();if(!e)return r.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(l=>l.includes("ms")?parseFloat(l):parseFloat(l)*1e3).sort((l,f)=>f-l);return d}),c=s+a;if(c!==0){let u=r.group(d=>{let l=d.setTimeout(()=>{n(),d.dispose()},c);d.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(l(),d.addEventListener(e,"transitioncancel",p=>{p.target===p.currentTarget&&(n(),u())}))})});r.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(n(),r.dispose())})}else n();return r.dispose}function Is(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function $n(e,t){let n=w([]),r=G(e);H(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}let St=ie(null);St.displayName="OpenClosedContext";var de=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(de||{});function Ft(){return te(St)}function Rs({value:e,children:t}){return P.createElement(St.Provider,{value:e},t)}function Ds({children:e}){return P.createElement(St.Provider,{value:null},e)}function Os(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Se=[];Os(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Se[0]!==t.target&&(Se.unshift(t.target),Se=Se.filter(n=>n!=null&&n.isConnected),Se.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ro(e){let t=G(e),n=w(!1);H(()=>(n.current=!1,()=>{n.current=!0,bt(()=>{n.current&&t()})}),[t])}function Hs(){let e=typeof document>"u";return"useSyncExternalStore"in Lr?(t=>t.useSyncExternalStore)(Lr)(()=>()=>{},()=>!1,()=>!e):!1}function ot(){let e=Hs(),[t,n]=C(Ae.isHandoffComplete);return t&&Ae.isHandoffComplete===!1&&n(!1),H(()=>{t!==!0&&n(!0)},[t]),H(()=>Ae.handoff(),[]),e?!1:t}let oo=ie(!1);function Ws(){return te(oo)}function io(e){return P.createElement(oo.Provider,{value:e.force},e.children)}function zs(e){let t=Ws(),n=te(ao),r=rt(e),[o,i]=C(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Ae.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let c=r.createElement("div");return c.setAttribute("id","headlessui-portal-root"),r.body.appendChild(c)});return H(()=>{o!==null&&(r!=null&&r.body.contains(o)||r==null||r.body.appendChild(o))},[o,r]),H(()=>{t||n!==null&&i(n.current)},[n,i,t]),o}let so=V,Us=re(function(e,t){let n=e,r=w(null),o=pe(Qi(d=>{r.current=d}),t),i=rt(r),s=zs(r),[a]=C(()=>{var d;return Ae.isServer?null:(d=i==null?void 0:i.createElement("div"))!=null?d:null}),c=te(Tn),u=ot();return ne(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),ne(()=>{if(a&&c)return c.register(a)},[c,a]),ro(()=>{var d;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((d=s.parentElement)==null||d.removeChild(s)))}),u?!s||!a?null:vt(se({ourProps:{ref:o},theirProps:n,slot:{},defaultTag:so,name:"Portal"}),a):null});function js(e,t){let n=pe(t),{enabled:r=!0,...o}=e;return r?P.createElement(Us,{...o,ref:n}):se({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:so,name:"Portal"})}let Vs=V,ao=ie(null);function Bs(e,t){let{target:n,...r}=e,o={ref:pe(t)};return P.createElement(ao.Provider,{value:n},se({ourProps:o,theirProps:r,defaultTag:Vs,name:"Popover.Group"}))}let Tn=ie(null);function qs(){let e=te(Tn),t=w([]),n=G(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=G(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=U(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,U(()=>function({children:i}){return P.createElement(Tn.Provider,{value:o},i)},[o])]}let Ys=re(js),co=re(Bs),Gs=Object.assign(Ys,{Group:co});function Ks(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ve(e,"escape");no(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===qr.Escape&&n(o))})}function Xs(){var e;let[t]=C(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=C((e=t==null?void 0:t.matches)!=null?e:!1);return ne(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Zs({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let o=w((r=n==null?void 0:n.current)!=null?r:null),i=rt(o),s=G(()=>{var a,c,u;let d=[];for(let l of e)l!==null&&(l instanceof HTMLElement?d.push(l):"current"in l&&l.current instanceof HTMLElement&&d.push(l.current));if(t!=null&&t.current)for(let l of t.current)d.push(l);for(let l of(a=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?a:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(o.current)||l.contains((u=(c=o.current)==null?void 0:c.getRootNode())==null?void 0:u.host)||d.some(f=>l.contains(f))||d.push(l));return d});return{resolveContainers:s,contains:G(a=>s().some(c=>c.contains(a))),mainTreeNodeRef:o,MainTreeNode:U(()=>function(){return n!=null?null:P.createElement(yn,{features:kt.Hidden,ref:o})},[o,n])}}function kn(){let e=w(!1);return ne(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var it=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(it||{});function Js(){let e=w(0);return eo(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function lo(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let Qs="div";var Oe=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Oe||{});function ea(e,t){let n=w(null),r=pe(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...c}=e;ot()||(a=0);let u=rt(n);oa(a,{ownerDocument:u});let d=ia(a,{ownerDocument:u,container:n,initialFocus:o,initialFocusFallback:i});sa(a,{ownerDocument:u,container:n,containers:s,previousActiveElement:d});let l=Js(),f=G(m=>{let g=n.current;g&&($=>$())(()=>{Te(l.current,{[it.Forwards]:()=>{tt(g,ge.First,{skipElements:[m.relatedTarget,i]})},[it.Backwards]:()=>{tt(g,ge.Last,{skipElements:[m.relatedTarget,i]})}})})}),p=Ve(!!(a&2),"focus-trap#tab-lock"),_=Et(),y=w(!1),v={ref:r,onKeyDown(m){m.key=="Tab"&&(y.current=!0,_.requestAnimationFrame(()=>{y.current=!1}))},onBlur(m){if(!(a&4))return;let g=lo(s);n.current instanceof HTMLElement&&g.add(n.current);let $=m.relatedTarget;$ instanceof HTMLElement&&$.dataset.headlessuiFocusGuard!=="true"&&(uo(g,$)||(y.current?tt(n.current,Te(l.current,{[it.Forwards]:()=>ge.Next,[it.Backwards]:()=>ge.Previous})|ge.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&we(m.target)))}};return P.createElement(P.Fragment,null,p&&P.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}),se({ourProps:v,theirProps:c,defaultTag:Qs,name:"FocusTrap"}),p&&P.createElement(yn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:kt.Focusable}))}let ta=re(ea),na=Object.assign(ta,{features:Oe});function ra(e=!0){let t=w(Se.slice());return $n(([n],[r])=>{r===!0&&n===!1&&bt(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Se.slice())},[e,Se,t]),G(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function oa(e,{ownerDocument:t}){let n=!!(e&8),r=ra(n);$n(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&we(r())},[n]),ro(()=>{n&&we(r())})}function ia(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=w(null),s=Ve(!!(e&1),"focus-trap#initial-focus"),a=kn();return $n(()=>{if(e===0)return;if(!s){o!=null&&o.current&&we(o.current);return}let c=n.current;c&&bt(()=>{if(!a.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){i.current=u;return}}else if(c.contains(u)){i.current=u;return}if(r!=null&&r.current)we(r.current);else{if(e&16){if(tt(c,ge.First|ge.AutoFocus)!==En.Error)return}else if(tt(c,ge.First)!==En.Error)return;if(o!=null&&o.current&&(we(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t==null?void 0:t.activeElement})},[o,s,e]),i}function sa(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=kn(),s=!!(e&4);no(t==null?void 0:t.defaultView,"focus",a=>{if(!s||!i.current)return;let c=lo(r);n.current instanceof HTMLElement&&c.add(n.current);let u=o.current;if(!u)return;let d=a.target;d&&d instanceof HTMLElement?uo(c,d)?(o.current=d,we(d)):(a.preventDefault(),a.stopPropagation(),we(u)):we(o.current)},!0)}function uo(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fo(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:ho)!==V||P.Children.count(e.children)===1}let Ct=ie(null);Ct.displayName="TransitionContext";var aa=(e=>(e.Visible="visible",e.Hidden="hidden",e))(aa||{});function ca(){let e=te(Ct);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function la(){let e=te(xt);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let xt=ie(null);xt.displayName="NestingContext";function Mt(e){return"children"in e?Mt(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function po(e,t){let n=Ie(e),r=w([]),o=kn(),i=Et(),s=G((p,_=ke.Hidden)=>{let y=r.current.findIndex(({el:v})=>v===p);y!==-1&&(Te(_,{[ke.Unmount](){r.current.splice(y,1)},[ke.Hidden](){r.current[y].state="hidden"}}),i.microTask(()=>{var v;!Mt(r)&&o.current&&((v=n.current)==null||v.call(n))}))}),a=G(p=>{let _=r.current.find(({el:y})=>y===p);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:p,state:"visible"}),()=>s(p,ke.Unmount)}),c=w([]),u=w(Promise.resolve()),d=w({enter:[],leave:[]}),l=G((p,_,y)=>{c.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([v])=>v!==p)),t==null||t.chains.current[_].push([p,new Promise(v=>{c.current.push(v)})]),t==null||t.chains.current[_].push([p,new Promise(v=>{Promise.all(d.current[_].map(([m,g])=>g)).then(()=>v())})]),_==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>y(_)):y(_)}),f=G((p,_,y)=>{Promise.all(d.current[_].splice(0).map(([v,m])=>m)).then(()=>{var v;(v=c.current.shift())==null||v()}).then(()=>y(_))});return U(()=>({children:r,register:a,unregister:s,onStart:l,onStop:f,wait:u,chains:d}),[a,s,r,l,f,d,u])}let ho=V,mo=$t.RenderStrategy;function ua(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:c,enter:u,enterFrom:d,enterTo:l,entered:f,leave:p,leaveFrom:_,leaveTo:y,...v}=e,m=w(null),g=fo(e),$=pe(...g?[m,t]:t===null?[]:[t]),T=(n=v.unmount)==null||n?ke.Unmount:ke.Hidden,{show:S,appear:x,initial:L}=ca(),[W,F]=C(S?"visible":"hidden"),E=la(),{register:I,unregister:Y}=E;ne(()=>I(m),[I,m]),ne(()=>{if(T===ke.Hidden&&m.current){if(S&&W!=="visible"){F("visible");return}return Te(W,{hidden:()=>Y(m),visible:()=>I(m)})}},[W,m,I,Y,S,T]);let R=ot();ne(()=>{if(g&&R&&W==="visible"&&m.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,W,R,g]);let q=L&&!x,D=x&&S&&L,K=w(!1),M=po(()=>{K.current||(F("hidden"),Y(m))},E),N=G(Q=>{K.current=!0;let J=Q?"enter":"leave";M.onStart(m,J,ee=>{ee==="enter"?i==null||i():ee==="leave"&&(a==null||a())})}),O=G(Q=>{let J=Q?"enter":"leave";K.current=!1,M.onStop(m,J,ee=>{ee==="enter"?s==null||s():ee==="leave"&&(c==null||c())}),J==="leave"&&!Mt(M)&&(F("hidden"),Y(m))});H(()=>{g&&o||(N(S),O(S))},[S,g,o]);let k=!(!o||!g||!R||q),[,b]=Ns(k,m,S,{start:N,end:O}),z=Re({ref:$,className:((r=vn(v.className,D&&u,D&&d,b.enter&&u,b.enter&&b.closed&&d,b.enter&&!b.closed&&l,b.leave&&p,b.leave&&!b.closed&&_,b.leave&&b.closed&&y,!b.transition&&S&&f))==null?void 0:r.trim())||void 0,...Ps(b)}),X=0;return W==="visible"&&(X|=de.Open),W==="hidden"&&(X|=de.Closed),b.enter&&(X|=de.Opening),b.leave&&(X|=de.Closing),P.createElement(xt.Provider,{value:M},P.createElement(Rs,{value:X},se({ourProps:z,theirProps:v,defaultTag:ho,features:mo,visible:W==="visible",name:"Transition.Child"})))}function da(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=w(null),a=fo(e),c=pe(...a?[s,t]:t===null?[]:[t]);ot();let u=Ft();if(n===void 0&&u!==null&&(n=(u&de.Open)===de.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,l]=C(n?"visible":"hidden"),f=po(()=>{n||l("hidden")}),[p,_]=C(!0),y=w([n]);ne(()=>{p!==!1&&y.current[y.current.length-1]!==n&&(y.current.push(n),_(!1))},[y,n]);let v=U(()=>({show:n,appear:r,initial:p}),[n,r,p]);Zr(n,s,()=>l("hidden")),ne(()=>{n?l("visible"):!Mt(f)&&s.current!==null&&l("hidden")},[n,f]);let m={unmount:o},g=G(()=>{var T;p&&_(!1),(T=e.beforeEnter)==null||T.call(e)}),$=G(()=>{var T;p&&_(!1),(T=e.beforeLeave)==null||T.call(e)});return P.createElement(xt.Provider,{value:f},P.createElement(Ct.Provider,{value:v},se({ourProps:{...m,as:V,children:P.createElement(vo,{ref:c,...m,...i,beforeEnter:g,beforeLeave:$})},theirProps:{},defaultTag:V,features:mo,visible:d==="visible",name:"Transition"})))}function fa(e,t){let n=te(Ct)!==null,r=Ft()!==null;return P.createElement(P.Fragment,null,!n&&r?P.createElement(Sn,{ref:t,...e}):P.createElement(vo,{ref:t,...e}))}let Sn=re(da),vo=re(ua),Fn=re(fa),he=Object.assign(Sn,{Child:Fn,Root:Sn});var pa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(pa||{}),ha=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ha||{});let ma={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Cn=ie(null);Cn.displayName="DialogContext";function Pt(e){let t=te(Cn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pt),n}return t}function va(e,t){return Te(t.type,ma,e,t)}let _o=re(function(e,t){let n=Ee(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:c=!0,__demoMode:u=!1,...d}=e,l=w(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(l.current||(l.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let f=Ft();o===void 0&&f!==null&&(o=(f&de.Open)===de.Open);let p=w(null),_=pe(p,t),y=rt(p),v=o?0:1,[m,g]=Ke(va,{titleId:null,descriptionId:null,panelRef:jt()}),$=G(()=>i(!1)),T=G(k=>g({type:0,id:k})),S=ot()?v===0:!1,[x,L]=qs(),W={get current(){var k;return(k=m.panelRef.current)!=null?k:p.current}},{resolveContainers:F,mainTreeNodeRef:E,MainTreeNode:I}=Zs({portals:x,defaultContainers:[W]}),Y=f!==null?(f&de.Closing)===de.Closing:!1;ls(u||Y?!1:S,{allowed:G(()=>{var k,b;return[(b=(k=p.current)==null?void 0:k.closest("[data-headlessui-portal]"))!=null?b:null]}),disallowed:G(()=>{var k,b;return[(b=(k=E.current)==null?void 0:k.closest("body > *:not(#headlessui-portal-root)"))!=null?b:null]})}),bs(S,F,k=>{k.preventDefault(),$()}),Ks(S,y==null?void 0:y.defaultView,k=>{k.preventDefault(),k.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),$()}),Fs(u||Y?!1:S,y,F),Zr(S,p,$);let[R,q]=es(),D=U(()=>[{dialogState:v,close:$,setTitleId:T},m],[v,m,$,T]),K=U(()=>({open:v===0}),[v]),M={ref:_,id:r,role:a,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":m.titleId,"aria-describedby":R},N=!Xs(),O=Oe.None;return S&&!u&&(O|=Oe.RestoreFocus,O|=Oe.TabLock,c&&(O|=Oe.AutoFocus),N&&(O|=Oe.InitialFocus)),P.createElement(Ds,null,P.createElement(io,{force:!0},P.createElement(Gs,null,P.createElement(Cn.Provider,{value:D},P.createElement(co,{target:p},P.createElement(io,{force:!1},P.createElement(q,{slot:K},P.createElement(L,null,P.createElement(na,{initialFocus:s,initialFocusFallback:p,containers:F,features:O},P.createElement(ss,{value:$},se({ourProps:M,theirProps:d,slot:K,defaultTag:_a,features:ya,visible:v===0,name:"Dialog"})))))))))),P.createElement(Ji,null,P.createElement(I,null)))}),_a="div",ya=$t.RenderStrategy|$t.Static;function ga(e,t){let{transition:n=!1,open:r,...o}=e,i=Ft(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?P.createElement(he,{show:r,transition:n,unmount:o.unmount},P.createElement(_o,{ref:t,...o})):P.createElement(_o,{ref:t,open:r,...o})}let wa="div";function ba(e,t){let n=Ee(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s},a]=Pt("Dialog.Panel"),c=pe(t,a.panelRef),u=U(()=>({open:s===0}),[s]),d=G(l=>{l.stopPropagation()});return P.createElement(o?Fn:V,null,se({ourProps:{ref:c,id:r,onClick:d},theirProps:i,slot:u,defaultTag:wa,name:"Dialog.Panel"}))}let Ea="div";function $a(e,t){let{transition:n=!1,...r}=e,[{dialogState:o}]=Pt("Dialog.Backdrop"),i=U(()=>({open:o===0}),[o]);return P.createElement(n?Fn:V,null,se({ourProps:{ref:t,"aria-hidden":!0},theirProps:r,slot:i,defaultTag:Ea,name:"Dialog.Backdrop"}))}let Ta="h2";function ka(e,t){let n=Ee(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=Pt("Dialog.Title"),a=pe(t);H(()=>(s(r),()=>s(null)),[r,s]);let c=U(()=>({open:i===0}),[i]);return se({ourProps:{ref:a,id:r},theirProps:o,slot:c,defaultTag:Ta,name:"Dialog.Title"})}let Sa=re(ga),yo=re(ba);re($a);let Fa=re(ka),Ca=Object.assign(Sa,{Panel:yo,Title:Fa,Description:os});const Nt={root:"_root_1duny_1",modal:"_modal_1duny_10",container:"_container_1duny_13",page:"_page_1duny_18",close:"_close_1duny_21"},xa={root:"_root_1h6qm_1"},be=e=>{const{children:t,size:n="md",fill:r="currentColor",stroke:o,strokeWidth:i,className:s="",viewBox:a="0 0 20 20"}=e,c=U(()=>{switch(n){case"sm":return"yvlw-w-4 yvlw-h-4";case"lg":return"yvlw-w-7 yvlw-h-7";case"xl":return"yvlw-w-10 yvlw-h-10";case"custom":return"";default:return"yvlw-w-5 yvlw-h-5"}},[n]);return h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:a,fill:r,stroke:o,strokeWidth:i,className:`${c} ${s}`,children:t})},Ma=()=>h(be,{children:h("path",{d:"M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z"})}),go=e=>h(be,{...e,children:h("path",{fillRule:"evenodd",d:"M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z",clipRule:"evenodd"})}),Pa=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"})]}),Na=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),wo=e=>h(be,{...e,viewBox:"0 0 24 24",children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M3.72 6.04c.47.46 1.21.48 1.71.06.37-.32.69-.51.87-.43.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1h1.21c.69 0 1.25-.56 1.25-1.25s-.56-1.25-1.25-1.25h-1.22c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3c-1.09 0-2.04.63-2.7 1.22-.53.48-.53 1.32-.02 1.82zm10.16 12.51c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"})]}),La=e=>h(be,{...e,children:[h("path",{d:"M0 0h24v24H0V0z",fill:"none"}),h("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v2c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-2c0-2.66-5.33-4-8-4zm6 5H6v-.99c.2-.72 3.3-2.01 6-2.01s5.8 1.29 6 2v1z"})]}),Aa=e=>h(be,{...e,children:h("path",{d:"M18,10l-1.77-2.03l0.25-2.69l-2.63-0.6l-1.37-2.32L10,3.43L7.53,2.36L6.15,4.68L3.53,5.28l0.25,2.69L2,10l1.77,2.03 l-0.25,2.69l2.63,0.6l1.37,2.32L10,16.56l2.47,1.07l1.37-2.32l2.63-0.6l-0.25-2.69L18,10z M13.18,8.47l-4.24,4.24 c-0.2,0.2-0.51,0.2-0.71,0L6.82,11.3c-0.2-0.2-0.2-0.51,0-0.71s0.51-0.2,0.71,0l1.06,1.06l3.89-3.89c0.2-0.2,0.51-0.2,0.71,0 S13.38,8.28,13.18,8.47z"})}),bo=e=>h(be,{...e,viewBox:"0 0 24 24",children:h("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),Ia=e=>h(be,{...e,children:h("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});class Fe{static loadVision(){return import("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12")}static async loadDetector(){try{const{FaceLandmarker:t,FilesetResolver:n}=await Fe.loadVision(),r=await n.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.12/wasm");return await t.createFromOptions(r,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task",delegate:"GPU"},outputFaceBlendshapes:!0,runningMode:"IMAGE",numFaces:1})}catch(t){return Promise.reject(t)}}static denormalizeKeypoints(t,n,r){return t.map(o=>({x:o.x*n,y:o.y*r,z:o.z}))}static getBoundingBox(t,n,r){const o={width:n*.6,height:r*.8,x:0,y:0};o.x=(n-o.width)/2,o.y=(r-o.height)/2;let i=1/0,s=-1/0,a=1/0,c=-1/0;t.forEach(d=>{i=Math.min(i,d.x),s=Math.max(s,d.x),a=Math.min(a,d.y),c=Math.max(c,d.y)});const u={xMin:i,xMax:s,yMin:a,yMax:c};return u.xMin<o.x||u.xMax>o.x+o.width||u.yMin<o.y||u.yMax>o.y+o.height?{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!1}:{box:{xMin:i,xMax:s,yMin:a,yMax:c,width:s-i,height:c-a},inBox:!0}}static async detectFaces(t,n){var r;try{const{width:o,height:i}=n,{faceLandmarks:s,faceBlendshapes:a}=await t.detect(n);if(s.length===0)return{faces:[],blendShapes:[],inBox:!1};const c=Fe.denormalizeKeypoints(s[0],o,i),{box:u,inBox:d}=Fe.getBoundingBox(c,o,i);return{faces:[{keypoints:c,box:u}],blendShapes:((r=a==null?void 0:a[0])==null?void 0:r.categories)??[],inBox:d}}catch(o){return Promise.reject(o)}}}const Ra=(e,t)=>{let n;return typeof OffscreenCanvas<"u"?n=new OffscreenCanvas(e,t):(n=document.createElement("canvas"),n.width=e,n.height=t),n},xn=(e,t,n,r,o)=>{let i=0,s=0,a=t,c=n;const d=Ra(t,n).getContext("2d",o);return d.drawImage(e,0,0),d.getImageData(i,s,a,c)},Da=e=>new Promise(t=>{const n=document.createElement("canvas");let{width:r}=e,{height:o}=e;e instanceof HTMLVideoElement&&(r=e.videoWidth,o=e.videoHeight),n.width=r,n.height=o,n.getContext("2d").drawImage(e,0,0),n.toBlob(s=>t(s))});function Oa(e){const{width:t,height:n,data:r}=e;let o=0,i=0;const s=[0,-1,0,-1,4,-1,0,-1,0];for(let d=1;d<n-1;d++)for(let l=1;l<t-1;l++){let f=0,p=0,_=0,y=0;for(let m=-1;m<=1;m++)for(let g=-1;g<=1;g++){const $=((d+m)*t+(l+g))*4,T=s[y++];f+=r[$]*T,p+=r[$+1]*T,_+=r[$+2]*T}const v=.299*f+.587*p+.114*_;o+=v,i+=v*v}const a=(t-2)*(n-2);if(a===0)return 0;const c=o/a;return i/a-c*c}function Ha(){if(MediaRecorder.isTypeSupported("video/webm; codecs=vp9"))return{mimeType:"video/webm; codecs=vp9",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/webm"))return{mimeType:"video/webm",videoBitsPerSecond:25e4};if(MediaRecorder.isTypeSupported("video/mp4"))return{mimeType:"video/mp4",videoBitsPerSecond:25e4}}function Eo(e={}){const{onRecord:t=()=>{},onStop:n=()=>{}}=e,r=w([]),o=w(null),i=w(null),s=j(f=>{r.current.push(f)},[]),a=j(async f=>{if(o.current)return;let p=null;f instanceof ImageData?p=await new Promise(_=>{const y=document.createElement("canvas");y.width=f.width,y.height=f.height;const v=y.getContext("2d");v?(v.putImageData(f,0,0),y.toBlob(m=>{_(m)},"image/jpeg",.95)):_(null)}):p=await Da(f),p&&(o.current=p)},[]),c=j(()=>{o.current=null},[]),u=j(f=>{f.data.size>0&&t(f.data)},[]),d=j(()=>{!i.current||i.current.state==="inactive"||(i.current.stop(),i.current.stream.getTracks().forEach(f=>f.stop()),n())},[]),l=j(f=>{i.current||(i.current=new MediaRecorder(f,Ha()),i.current.ondataavailable=u,i.current.onstop=d,i.current.start(1e3))},[]);return{saveStream:s,savePhoto:a,start:l,stop:d,savedStreams:r,savedPhoto:o,clearSavedPhoto:c}}const Wa="https://cdn.svc.youverify.co",za=e=>e?"https://identity.staging.svc.youverify.co":"https://identity.svc.youverify.co";function Ua(e){const t=za(e);return{postData:async i=>{const{faceImage:s,publicKey:a,passed:c,metadata:u,video:d,sessionId:l}=i,f=new FormData;f.append("files",s),f.append("files",d);const p=await fetch(`${Wa}/v1/uploads/media`,{method:"POST",headers:{},body:f});if(!p.ok)throw p;const _=(await p.json()).data,y={sessionId:l,components:["liveness"],faceImage:_[0].cachedLocation,livenessClip:_[1].cachedLocation,passed:c,metadata:u};a&&(y.publicMerchantID=a);const v=await fetch(`${t}/v1/sdk/identity/liveness/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(!v.ok)throw v;return(await v.json()).data},fetchSessionToken:async()=>{throw new Error("fetchSessionToken is deprecated. Provide sessionToken from your backend.")},validateSessionId:async i=>{const s=await fetch(`${t}/v1/sdk/session/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:i})}),a=await s.json().catch(()=>({}));if(!s.ok){const c=(a==null?void 0:a.message)||"Session validation failed";throw new Error(c)}return!0}}}const ja=360,Va="#125766",Ba="https://cdn.youverify.co/1721901834404-q2nxqyng5klm918b3BDVU.jpg",$o="https://cdn.youverify.co",st={js:{default:"1731681780468-ttgfiK6Sl1GKegUe-wm4v.js",simd:"1731681609027-RTOweJqdl8Tt39aAdyie9.js"},wasm:{default:"1731681817302-aVNwDW6DP2MsDNTbiav_V.wasm",simd:"1731681739675-nvF1En4g5rAW4daq5g5DH.wasm"}},qa=[0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11],To={spoofing:{key:"GLARE_DETECTION_ERROR",message:"We detected a screen recording or photo during your liveness."},"no face":{key:"LIVENESS_FACE_NOT_FOUND",message:"We could not detect a face in your test."},lighting:{key:"LIGHTING_ERROR",message:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face."}},Ya={"complete-the-circle":{Icon:Pa,name:"Complete The Circle ⭕️",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"},"yes-or-no":{Icon:Na,name:"Yes or No ❓",description:"First position your face in the camera. Then tilt your head to the left to answer No and to the right to answer Yes"},motions:{Icon:wo,name:"Motions 💫",description:"First position your face in the camera frame, then follow the instructions"},blink:{Icon:wo,name:"Blink 💫",description:"First position your face in the camera frame, then follow the instructions"},"facial-expressions":{Icon:go,name:"Facial Expressions 🤪",description:"First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"}},ko=ie({tasks:[],namespace:"",user:void 0,currentTaskIndex:0,completedCount:0,nextTask:()=>{},completed:!1,onRequestClose:()=>{},faceDetector:null,saveStream:()=>{},savePhoto:()=>{},clearSavedPhoto:()=>{},onComplete:()=>Promise.resolve(),onFailure:()=>{},imageCaptured:!1,setImageCaptured:()=>{},sandboxEnvironment:!0,isMobileAppWebView:!1});let So,Fo=!1;function Ga(e){const{publicKey:t,tasks:n,children:r,namespace:o,user:i,branding:s,onRequestClose:a,onSuccess:c=()=>{},onFailure:u=()=>{},metadata:d,presentation:l,sandboxEnvironment:f=!0,isMobileAppWebView:p=!1,sessionId:_,sessionToken:y}=e,[v,m]=C(0),[g,$]=C(0),[T,S]=C(null),[x,L]=C(!1),{saveStream:W,savePhoto:F,savedPhoto:E,clearSavedPhoto:I,savedStreams:Y}=Eo(),{postData:R,validateSessionId:q}=Ua(f),D=U(()=>g===n.length,[n,g]),K=()=>{$(k=>k+1),m(k=>k+1)},M=k=>{const b=new Image;b.crossOrigin="Anonymous",b.src=Ba,b.onload=()=>{const z=xn(b,b.width,b.height);Fe.detectFaces(k,z)}},N=async()=>{if(!E.current){u({faceImage:"",passed:!1,metadata:d,error:{key:"image_capture_failed",message:"No face image captured. Image capture failed. Please try again."}}),a();return}try{const k=await R({faceImage:E.current,video:new Blob(Y.current,{type:"video/mp4"}),publicKey:t,passed:!0,metadata:d,sessionId:_});c(k),a()}catch{u({faceImage:"",passed:!1,metadata:d,error:{key:"API_ERROR",message:"Failed to process liveness check. Please try again."}}),a()}},O=async()=>{try{if(!_)throw new Error("sessionId is required. Provide it from your backend.");if(!y)throw new Error("sessionToken is required. Provide it from your backend.");await q(_)}catch(b){const z=b instanceof Error?b.message:"Invalid or expired sessionId";u({faceImage:"",passed:!1,metadata:d,error:{key:"invalid_or_expired_session",message:z}});return}const k=await Fe.loadDetector();So=k,M(k),S(k)};return H(()=>{if(Fo){S(So);return}O(),Fo=!0},[]),h(ko.Provider,{value:{tasks:n,namespace:o,user:i,currentTaskIndex:v,completed:D,completedCount:g,nextTask:K,branding:{name:(s==null?void 0:s.name)??"Youverify",color:(s==null?void 0:s.color)??void 0,logo:(s==null?void 0:s.logo)??"/yv_logo.svg",logoAlt:(s==null?void 0:s.logoAlt)??`${(s==null?void 0:s.name)??"Youverify"} logo`,hideLogoOnMobile:(s==null?void 0:s.hideLogoOnMobile)??!0,showPoweredBy:(s==null?void 0:s.showPoweredBy)??!0,poweredByText:(s==null?void 0:s.poweredByText)??"Powered by Youverify",poweredByLogo:(s==null?void 0:s.poweredByLogo)??"/yv_logo.svg"},onRequestClose:a,faceDetector:T,saveStream:W,savePhoto:F,clearSavedPhoto:I,onComplete:N,onFailure:u,presentation:l,imageCaptured:x,setImageCaptured:L,sandboxEnvironment:f,publicKey:t,isMobileAppWebView:p,sessionId:_,sessionToken:y},children:r})}function fe(){return te(ko)}const oe={root:"_root_vqy7d_1",container:"_container_vqy7d_4",lhs:"_lhs_vqy7d_7",info:"_info_vqy7d_11",active:"_active_vqy7d_32",completed:"_completed_vqy7d_39",rhs:"_rhs_vqy7d_62",profile:"_profile_vqy7d_65",avatar:"_avatar_vqy7d_68",main:"_main_vqy7d_81",content:"_content_vqy7d_84"},Mn={root:"_root_lryhb_1",container:"_container_lryhb_1",brand:"_brand_lryhb_6"};function Ka(){const{branding:e,isMobileAppWebView:t,onRequestClose:n,presentation:r}=fe();return h("div",{className:Mn.root,children:h("div",{className:Mn.container,children:[h("div",{className:Mn.brand,children:(e==null?void 0:e.logo)&&!(e.hideLogoOnMobile&&t)&&h("img",{className:"yvlw-h-10",src:e.logo,alt:e.logoAlt||"Logo"})}),(t||r==="page")&&h("button",{type:"button",className:"yvlw-text-sm yvlw-rounded yvlw-px-3 yvlw-py-2 yvlw-border yvlw-border-gray-300 dark:yvlw-border-gray-700",onClick:()=>n(),children:"Close"})]})})}const Co="colorScheme";function xo(){const{namespace:e}=fe(),t=()=>{const o=localStorage.getItem(Co);return!o&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":o},n=(o=null)=>{o&&localStorage.setItem(Co,o);const i=`${e}-color-scheme`,s=document.documentElement;o&&o==="dark"?s==null||s.setAttribute(i,"dark"):s==null||s.removeAttribute(i)};return{setColorScheme:n,toggleColorScheme:()=>{const o=t();return n(o==="dark"?"light":"dark")},getColorScheme:t}}const Xa={root:"_root_bcsvc_1"};function Za(){if(!(window.screen.width>=900))return 10/9}function at(e){const{children:t,onStream:n=()=>{},onRecord:r=()=>{}}=e,o=w(null),i=w(0),s=w(null),{start:a,stop:c}=Eo({onRecord:r}),u=async()=>{try{const f=await navigator.mediaDevices.getUserMedia({video:{aspectRatio:{exact:Za()}}});s.current=f,a(f),o.current&&(o.current.srcObject=f)}catch{}},d=()=>{s.current&&(s.current.getTracks().forEach(f=>f.stop()),s.current=null,c(),o.current&&(o.current.srcObject=null))},l=()=>{n(o),i.current=requestAnimationFrame(l)};return H(()=>{const f=o.current;if(!f)return;const p=()=>{i.current=requestAnimationFrame(l)};return u(),f.addEventListener("canplay",p),()=>{f.removeEventListener("canplay",p),cancelAnimationFrame(i.current),d()}},[]),h("div",{className:Xa.root,children:[h("video",{ref:o,autoPlay:!0,loop:!0,playsInline:!0}),t]})}const ct={container:"_container_mcmsr_1",focused:"_focused_mcmsr_12",progress:"_progress_mcmsr_15",completed:"_completed_mcmsr_36",marker:"_marker_mcmsr_40"},Mo=360,Ja=50;function Qa(e){const{visitedSections:t,sectionsCount:n,faceDetected:r,divisions:o=Ja}=e,i=U(()=>{const s=[ct.container];return r&&s.push(ct.focused),s.join(" ")},[r]);return h("div",{className:i,children:[h(he,{as:"div",show:r,leave:"yvlw-transition yvlw-linear yvlw-duration-300",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-125 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-300",enterFrom:"yvlw-scale-125 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.progress,children:Array.from(Array(o).keys()).map(s=>{const a=s*Mo/o,c=Math.ceil((a+1)*n/Mo),u=t.includes(c),d=u?s-(c-1)*(o/n):0,l=[];u&&l.push(ct.completed);const f=u?"translateX(158px)":"translateX(150px)";return h("div",{className:l.join(" "),style:{transform:`rotate(${a}deg) ${f}`,transitionDelay:`${d*20}ms`}},`key-${s}`)})})}),h(he,{as:"div",show:!r,leave:"yvlw-transition yvlw-linear yvlw-duration-200",leaveFrom:"yvlw-scale-100 yvlw-opacity-100",leaveTo:"yvlw-scale-75 yvlw-opacity-0",enter:"yvlw-transition yvlw-linear yvlw-duration-200",enterFrom:"yvlw-scale-75 yvlw-opacity-0",enterTo:"yvlw-scale-100 yvlw-opacity-100",className:"yvlw-absolute",children:h("div",{className:ct.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})]})}function Po(){return{checkZoomLevel:(r,o)=>{const{box:i}=r,{width:s,height:a}=i,c=s*a,u=o**2,d=c/u;if(d>.9)throw new Error("Move face farther from camera");if(d<.05)throw new Error("Move face closer to camera")},checkFacialFeatures:(r,o)=>{},checkInFrame:(r,o)=>{const{offsetX:i,offsetY:s}=o,{box:a}=r;if(!(a.xMin-i>=o.x&&a.yMin-s>=o.y&&a.xMax-i<=o.x+o.width&&a.yMax-s<=o.y+o.height))throw new Error("Position head in frame")}}}function Lt(e={}){const{validations:t=["zoom"],frameSize:n,onFace:r=()=>{},onError:o=()=>{}}=e,{faceDetector:i}=fe(),{checkFacialFeatures:s,checkZoomLevel:a,checkInFrame:c}=Po(),u=w(null),d=f=>{var p;try{if(f.length===0)throw new Error("Detecting face...");if(f.length>1)throw new Error("A maximum of 1 face is allowed");const _=u.current,y=(p=u.current)==null?void 0:p.parentElement;if(!_||!y)return;const v=f[0];for(const m of t)switch(m){case"zoom":a(v,Math.min(y.clientHeight,y.clientWidth));break;case"features":s(v,Math.min(y.clientHeight,y.clientWidth));break;case"in-frame":if(!n)throw new Error("Frame size is required to check if face is in frame");const g=n+200;c(v,{x:(y.clientWidth-g)/2,y:(y.clientHeight-g)/2,width:g,height:g,offsetX:(_.videoWidth-y.clientWidth)/2,offsetY:(_.videoHeight-y.clientHeight)/2});break;default:break}r(v)}catch(_){const{message:y}=_;o(y)}};return{detectFaces:async f=>{if(!i)return;const{ref:p}=f;u.current=p.current;const _=u.current;if(!_)throw new Error("No Video Source detected");const{videoWidth:y,videoHeight:v}=_;if(y===0||v===0)return;const m=xn(_,y,v),g=await Fe.detectFaces(i,m);d(g.faces)}}}const ae={root:"_root_5hgaj_1",container:"_container_5hgaj_4",progress:"_progress_5hgaj_7",intro:"_intro_5hgaj_12",content:"_content_5hgaj_15",branding:"_branding_5hgaj_18",instructionsContainer:"_instructionsContainer_5hgaj_22",instructions:"_instructions_5hgaj_22"},No={root:"_root_h5elg_1",spinner:"_spinner_h5elg_22"},Lo={container:"_container_1vep2_1",spin:"_spin_1vep2_1",md:"_md_1vep2_7",lg:"_lg_1vep2_10"};function Ao(e){const{size:t="md",message:n,className:r=""}=e;return h("span",{className:`${Lo.container} ${Lo[t]} ${r}`,children:n})}function At(e){const{Icon:t,description:n,title:r,actionText:o="Okay, got it",onActionClick:i=()=>{},loading:s=!1,children:a,hideButton:c=!1}=e;return h("div",{className:No.root,children:[h(t,{size:"custom",className:"yvlw-h-20 yvlw-mx-auto yvlw-mb-12"}),h("h2",{children:r}),h("p",{className:"subtext",children:n}),!c&&h("div",{className:"yvlw-mt-12",children:h(Gi,{onClick:()=>i(),className:"yvlw-flex yvlw-items-center yvlw-space-x-3",disabled:s,children:[h("span",{className:"yvlw-flex-1 yvlw-flex yvlw-items-center yvlw-space-x-1 yvlw-justify-center",children:o}),s&&h(Ao,{className:No.spinner})]})}),a]})}const Io="yvlw-absolute yvlw-w-full yvlw-h-full",Ro="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300",Do="yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300";function It(e){const{children:t,instruction:n,completed:r,failed:o,onStart:i=()=>{},onReset:s=()=>{}}=e,[a,c]=C(!1),{completedCount:u,tasks:d,nextTask:l,branding:f,isMobileAppWebView:p}=fe(),_=U(()=>u*100/d.length,[u,d.length]);return H(()=>{!r&&!o&&(async()=>{await i(),c(!0)})()},[]),H(()=>{r&&(()=>{l()})()},[r]),h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:[h("div",{style:{width:`${_}%`},className:ae.progress}),h(he,{as:"div",show:a&&!r&&!o,enter:Ro,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Io,children:[h("div",{className:`${ae.content}`,children:t}),h("div",{className:ae.instructionsContainer,children:[h("div",{className:ae.instructions,children:[h("h2",{children:n.title}),h("p",{className:"subtext",children:n.description})]}),h("div",{className:ae.branding,children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})})]})]}),h(he,{show:o,as:"div",enter:Ro,enterFrom:"yvlw-translate-x-full",enterTo:"yvlw-translate-x-0",leave:Do,leaveFrom:"yvlw-translate-x-0",leaveTo:"yvlw-translate-x-full",className:Io,children:h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:"Could not confirm liveness on this task. Click on the button below to go again",onActionClick:s,actionText:"Try Again"})})})]})})}function Rt(e={}){const{timeout:t,onTimeout:n=()=>{}}=e,[r,o]=C(!1),i=w(null),s=j(()=>{t&&i.current&&clearTimeout(i.current)},[]),a=j(()=>{t&&(i.current=setTimeout(()=>{o(!0),n()},t))},[]),c=j(()=>{o(!1),a()},[]);return H(()=>s,[]),{timedOut:r,reset:c,start:a,stop:s}}const ec=1,Pn=8,Oo="Place face in frame";function tc(e){const{difficulty:t,timeout:n}=e,{saveStream:r}=fe(),[o,i]=C([]),[s,a]=C(Oo),[c,u]=C(!1),[d,l]=C(!1),f=w(new Set),p=w(!1),_=w(null),{reset:y,start:v,stop:m,timedOut:g}=Rt({timeout:n}),$=()=>{i([]),a(Oo),u(!1),l(!1),f.current=new Set,p.current=!1,_.current=null,y()},T=E=>{const I=E*Pn,Y=Math.ceil((I+1)/ja);f.current.has(Y)||(f.current.add(Y),i(Array.from(f.current))),f.current.size>=Pn&&(m(),setTimeout(()=>{l(!0)},1e3))},S=(E,I)=>{let R=Math.atan2(I,E)*(180/Math.PI);return R<0&&(R+=360),R},x=j(()=>{if(f.current.size===0)return 25;switch(t){case"easy":return 5;case"hard":return 15;default:return 10}},[]),L=E=>{const{keypoints:I,box:Y}=E,R={x:Y.width*.5,y:Y.height*.5},q=I[ec],D={y:q.y-Y.yMin,x:q.x-Y.xMin},K=R.x-D.x,M=D.y-R.y,N=x();return Math.abs(K)<N&&Math.abs(M)<N?null:S(K,M)},{detectFaces:W}=Lt({frameSize:280,validations:["zoom","in-frame"],onFace:E=>{u(!0),a("Slowly move head around to complete circle");const I=L(E);I&&T(I)},onError:E=>{a(E),i([]),f.current.clear(),_.current=null,p.current=!1}});return h(V,{children:h(It,{instruction:{title:s,description:c?void 0:"Always ensure face is in frame"},name:"complete-the-circle",completed:d,failed:g,onReset:$,onStart:v,children:h(at,{onStream:E=>{try{if(!E.current||d)return;const{videoWidth:I}=E.current;W({ref:E,frameSize:I})}catch{}},onRecord:r,children:h(Qa,{faceDetected:c,sectionsCount:Pn,visitedSections:o})})})})}const Nn={root:"_root_thujo_1",sticker:"_sticker_thujo_4",no:"_no_thujo_7",yes:"_yes_thujo_12"};function nc(e){const{show:t,stickers:n}=e;return h(V,{children:t&&h("div",{className:Nn.root,children:n.map(r=>h("div",{className:`${Nn.sticker} ${Nn[r]}`,children:r.toUpperCase()},`sticker-${r}`))})})}const rc={question:"Are you alive?",errorMessage:"You have to be alive to proceed though",answer:!0},oc="Wrong answer. Try again",Ho="Keep face in camera";function ic(e){const{difficulty:t,questions:n=[rc],timeout:r}=e,[o,i]=C(Ho),[s,a]=C(!1),[c,u]=C(!1),{saveStream:d}=fe(),l=w("inactive"),f=w(0),p=w(!1),_=w(null),y=w(null),v=w(null),m=()=>{_.current&&clearTimeout(_.current),y.current&&clearTimeout(y.current)},{reset:g,start:$,stop:T,timedOut:S}=Rt({timeout:r,onTimeout:m}),x=()=>{i(Ho),a(!1),u(!1),l.current="inactive",f.current=0,p.current=!1,g()},L=R=>{const{keypoints:q}=R,D=q[1],K=q[9],M=D.x-K.x,N=D.y-K.y;return 90-Math.atan2(N,M)*(180/Math.PI)},W=R=>{l.current="inactive",i(n[R].question),_.current=setTimeout(()=>{l.current="active"},2e3)},F=U(()=>{switch(t){case"easy":return 2;case"hard":return 6;default:return 4}},[]),E=R=>{try{if(l.current="inactive",Math.abs(R)<F)throw new Error("Tilt head further to answer");const q=R>0,D=n[f.current].answer;if(q===D)f.current+=1,f.current===n.length?(u(!0),T()):W(f.current);else throw new Error(n[f.current].errorMessage||oc)}catch(q){i(q.message),y.current=setTimeout(()=>{W(f.current)},2e3)}},{detectFaces:I}=Lt({onFace:R=>{if(p.current||(a(!0),p.current=!0,W(f.current)),l.current==="inactive")return;const q=L(R);E(q)},onError:R=>{i(R)}}),Y=R=>{try{if(!R.current||c)return;v.current=R.current;const{videoWidth:q}=R.current;I({ref:R,frameSize:q})}catch{}};return H(()=>m,[]),h(It,{instruction:{title:o,description:s?"":"Move head left for No and right for Yes"},name:"yes-or-no",failed:S,onReset:x,onStart:$,completed:c,children:h(at,{onStream:Y,onRecord:d,children:h(nc,{show:s,stickers:["yes","no"]})})})}function sc(e={}){const{onChange:t=()=>{}}=e,n=!!window.DeviceOrientationEvent,r=o=>{t({alpha:o.alpha,beta:o.beta,gamma:o.gamma})};return H(()=>(window.addEventListener("deviceorientation",r),()=>{window.removeEventListener("deviceorientation",r)}),[]),{canUse:n}}function Be(e,t){return Math.sqrt(e**2+t**2)}function ac(e){const t=e.slice();for(let n=t.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}const He=(e,t)=>{for(const[n,r]of Object.entries(e))if(r===t)return n;return null},cc=e=>{const t=Object.keys(To);for(const n of t)if(new RegExp(`\\b${n}\\b`,"i").test(e))return To[n];return{key:"VALIDATION_ERROR",message:"We detected an error during your test. Please TRY AGAIN"}};function lc(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(null),s=w(!0),a=w(null),c=w(null),u=w(0),d=w(!1),l=U(()=>{switch(o){case"easy":return 6;case"hard":return 10;default:return 8}},[]),f=()=>{if(u.current<t){const v=t-u.current;let m=`Nod head ${v} `;v<t&&(m+="more "),m+=v>1?"times":"time",n(m);return}d.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)},{canUse:p}=sc({onChange:v=>{c.current=v}});return{evaluate:v=>{if(!p){n("Cannot perform task. Transfer to mobile device to complete");return}if(!c.current||!c.current.beta){n("Cannot perform task. Transfer to mobile device to complete");return}if(c.current.beta<60||c.current.beta>100){n("Keep phone in upright position to continue");return}if(d.current)return;const{keypoints:m}=v,g=Be(m[6].x-m[8].x,m[6].y-m[8].y),T=Be(m[2].x-m[1].x,m[2].y-m[1].y)/g*10;if(T>l){if(i.current||!s.current)return;i.current=T,s.current=!1,a.current=setTimeout(()=>{i.current=null},3e3)}else i.current&&i.current-T>l/2&&(u.current+=1,i.current=null,a.current&&clearTimeout(a.current)),s.current=!0;f()},reset:()=>{i.current=null,s.current=!0,a.current=null,c.current=null,u.current=0,d.current=!1}}}function uc(e){const{onMessage:t,onComplete:n,difficulty:r}=e,o=w(!1),i=U(()=>{switch(r){case"easy":return 80;case"hard":return 120;default:return 100}},[]);return{evaluate:c=>{if(o.current)return;const{keypoints:u}=c,d=Be(u[6].x-u[8].x,u[6].y-u[8].y);if(Be(u[14].x-u[13].x,u[14].y-u[13].y)/d*100>i){o.current=!0,t("Awesome!"),setTimeout(()=>{n()},500);return}t("Open your mouth wide")},reset:()=>{o.current=!1}}}function Wo(e){const{total:t,onMessage:n,onComplete:r,difficulty:o}=e,i=w(!0),s=w(!1),a=w(null),c=w(0),u=U(()=>{switch(o){case"easy":return{closed:20,open:30};case"hard":return{closed:10,open:30};default:return{closed:15,open:30}}},[]),d=y=>{i.current&&(y>=u.closed||(i.current=!1,a.current=Date.now()))},l=y=>{if(!i.current&&!(y<u.open)&&(i.current=!0,a.current)){const v=Date.now(),m=a.current;(v-m)/1e3<=2&&(c.current+=1)}},f=()=>{if(c.current<t){const y=t-c.current;let v=`Blink right eye ${y} `;y<t&&(v+="more "),v+=y>1?"times":"time",n(v);return}s.current=!0,n("Great, hang on..."),setTimeout(()=>{r()},500)};return{evaluate:y=>{if(s.current)return;const{keypoints:v}=y,m=Be(v[6].x-v[8].x,v[6].y-v[8].y),$=Be(v[145].x-v[159].x,v[145].y-v[159].y)/m*100;d($),l($),f()},reset:()=>{i.current=!0,s.current=!1,a.current=null,c.current=0}}}var zo=(e=>(e.open_mouth="open_mouth",e.blink="blink",e))(zo||{});const Uo=ac(Object.keys(zo)),jo="Keep face in camera";function dc(e){const{difficulty:t,maxBlinks:n=3,maxNods:r=3,timeout:o}=e,i=w(0),[s,a]=C(jo),[c,u]=C(!1),[d,l]=C(null),f=w(!1),{saveStream:p}=fe(),{reset:_,start:y,stop:v,timedOut:m}=Rt({timeout:o}),g=()=>{if(i.current===Uo.length-1){u(!0),v();return}i.current+=1},$=lc({total:Math.floor(Math.random()*r+1),difficulty:t,onMessage:E=>a(E),onComplete:g}),T=uc({difficulty:t,onMessage:E=>a(E),onComplete:g}),S=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:E=>a(E),onComplete:g}),{detectFaces:x}=Lt({onFace:E=>{switch(f.current||(f.current=!0),Uo[i.current]){case"open_mouth":T.evaluate(E);break;case"blink":S.evaluate(E);break}},onError:E=>{a(E)}}),L=()=>{i.current=0,a(jo),u(!1),f.current=!1,S.reset(),$.reset(),T.reset(),_()},W=async E=>{try{if(!E.current||c)return;const{videoWidth:I}=E.current;await x({ref:E,frameSize:I,throttleInterval:500})}catch{}},F=async()=>{};return h(It,{instruction:{title:s,description:"Follow the directives as instructed"},name:"motions",failed:m,onReset:L,completed:c,onStart:async()=>{await F(),y()},children:d?h(V,{}):h(at,{onStream:W,onRecord:p})})}const Vo="Keep face in camera";function fc(e){const{difficulty:t,maxBlinks:n=3,timeout:r}=e,[o,i]=C(Vo),[s,a]=C(!1),[c,u]=C(null),d=w(!1),{saveStream:l}=fe(),{reset:f,start:p,stop:_,timedOut:y}=Rt({timeout:r}),v=()=>{a(!0),_()},m=Wo({total:Math.floor(Math.random()*n+1),difficulty:t,onMessage:x=>i(x),onComplete:v}),{detectFaces:g}=Lt({onFace:x=>{d.current||(d.current=!0),m.evaluate(x)},onError:x=>{i(x)}}),$=()=>{i(Vo),a(!1),d.current=!1,m.reset(),f()},T=async x=>{try{if(!x.current||s)return;const{videoWidth:L}=x.current;await g({ref:x,frameSize:L})}catch{}},S=async()=>{};return h(It,{instruction:{title:o,description:"Follow the directives as instructed"},name:"blink",failed:y,onReset:$,completed:s,onStart:async()=>{await S(),p()},children:c?h(V,{}):h(at,{onStream:T,onRecord:l})})}const Ln={LEFT_EYE:[36,37,38,39,40,41],RIGHT_EYE:[42,43,44,45,46,47],MOUTH:[48,49,50,51,52,53,54,55,56,57,58,59]},Dt=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),Bo=e=>{if(e.length!==6)return 0;const t=Dt(e[1],e[5]),n=Dt(e[2],e[4]),r=Dt(e[0],e[3]);return(t+n)/(2*r)},pc=e=>{if(e.length<12)return 0;const t=e[9],n=e[3];return Dt(t,n)},hc=(e,t,n,r)=>{var l,f,p;let o=!0,i=!0;if(!r){const v=Ln.LEFT_EYE.map(L=>e[L]),m=Ln.RIGHT_EYE.map(L=>e[L]),g=Ln.MOUTH.map(L=>e[L]),$=Bo(v),T=Bo(m),S=pc(g);o=($+T)/2>1,i=S<73.24,o||t("Please look at the camera!"),i||t("Please close your mouth!")}const s=.5,a=.12,c=((l=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkLeft"))==null?void 0:l.score)??0,u=((f=r==null?void 0:r.find(_=>_.categoryName==="eyeBlinkRight"))==null?void 0:f.score)??0,d=((p=r==null?void 0:r.find(_=>_.categoryName==="jawOpen"))==null?void 0:p.score)??0;return o=c<s&&u<s,o||t("Please look at the camera!"),i=d<a,i||t("Please close your mouth!"),{eyesOpen:o,mouthClosed:i}};function mc(e={}){const{validations:t=["zoom","in-frame"],frameSize:n,onFace:r=()=>{},onError:o=()=>{},onMessage:i=()=>{},livenessTimeout:s}=e,{faceDetector:a,savePhoto:c}=fe(),{checkFacialFeatures:u,checkZoomLevel:d,checkInFrame:l}=Po(),f=w(null),p=w(null),_=w(!1),y=w(null),v=w(!1),m=w([]),g=j(()=>{p.current&&clearTimeout(p.current),y.current&&clearTimeout(y.current),m.current.forEach(clearTimeout),v.current=!1,_.current=!0},[]),$=w(null),T=w(null),S=w([]),x=10,L=7.5,W=2,F=w({sharpness:0,data:null}),E=(M,N)=>{const O=M.getContext("2d");if(!O||N.width===0||N.height===0||!O||N.width===0||N.height===0)return!1;const k=O.getImageData(N.xMin,N.yMin,N.width,N.height),{data:b}=k;let z=0,X=0;for(let J=0;J<b.length;J+=4).299*b[J]+.587*b[J+1]+.114*b[J+2]>250&&X++;const Q=b.length/4;return z=X/Q,z>.01},I=(M,N,O,k)=>{const b=N.current,z=b==null?void 0:b.parentElement;if(!(!b||!z))for(const X of k)switch(X){case"zoom":d(M,Math.min(z.clientHeight,z.clientWidth));break;case"features":u(M,Math.min(z.clientHeight,z.clientWidth));break;case"in-frame":let Q=O;Q||(Q=Math.min(z.clientHeight,z.clientWidth)*.7);const J=Q+200;l(M,{x:(z.clientWidth-J)/2,y:(z.clientHeight-J)/2,width:J,height:J,offsetX:(b.videoWidth-z.clientWidth)/2,offsetY:(b.videoHeight-z.clientHeight)/2});break}},Y=M=>{const N=[33,133,159,362,263,386],O=.5;for(const k of N){const b=M[k];if(!b||b.score&&b.score<O)return!1}return!0},R=(M,N)=>{const O=M.getContext("2d");if(!O||N.width===0||N.height===0)return!1;const k=O.getImageData(N.xMin,N.yMin,N.width,N.height),{data:b}=k;let z=0;for(let Q=0;Q<b.length;Q+=4){const J=b[Q],ee=b[Q+1],qe=b[Q+2],Ot=.299*J+.587*ee+.114*qe;z+=Ot}return z/(b.length/4)<60},q=M=>{const N={x:M.box.xMin+(M.box.width??0)/2,y:M.box.yMin+(M.box.height??0)/2};if(S.current.push(N),S.current.length>x&&S.current.shift(),S.current.length<x)return!1;let O=0,k=0,b=0;for(let ee=1;ee<S.current.length;ee++){const qe=S.current[ee-1],Ot=S.current[ee],ut=Ot.x-qe.x,Yo=Ot.y-qe.y,Go=Math.sqrt(ut*ut+Yo*Yo);Go>=2&&(O+=Go,ee>1&&Math.sign(ut)!==Math.sign(b)&&Math.abs(ut)>3&&k++,b=ut)}const X=O/(x-1)>L,Q=k>=W,J=X||Q;return J&&i("🚨 Head shake detected!"),J},D=(M,N,O,k)=>{try{if(M.length===0||M.length>1){p.current&&(clearTimeout(p.current),p.current=null),i(M.length>1?"Please ensure only one face is visible":"Detecting face...");return}const b=M[0];let z="",X=!0;try{I(b,f,n,t)}catch(ee){z=ee.message,X=!1}q(b)&&(z="Please hold your head steady",X=!1),k||(z="Center your face in the frame",X=!1),Y(b.keypoints)||(z="Please ensure your eyes are clearly visible. Remove glasses if necessary.",X=!1);const{eyesOpen:Q,mouthClosed:J}=hc(b.keypoints,i,!1,O);if(Q?J||(z="Please close your mouth",X=!1):(p.current&&(clearTimeout(p.current),p.current=null),X=!1),!X){p.current&&(clearTimeout(p.current),p.current=null,m.current.forEach(clearTimeout)),i(z),r(b,!1,O,!1);return}if(!p.current){if(R($.current,b.box)){i("Too dark – move to a well-lit area");return}if(E($.current,b.box)){i("Too much glare. Please avoid direct light on your face.");return}i("Hold still..."),F.current={sharpness:0,data:null},m.current.forEach(clearTimeout);const ee=setTimeout(()=>i("Almost there..."),400),qe=setTimeout(()=>i("Detecting liveness..."),700);m.current=[ee,qe],p.current=setTimeout(()=>{F.current.data?(c(F.current.data),r(b,!0,O,!0)):o("Could not capture a clear photo. Please try again.")},1e3)}if(p.current){const ee=Oa(N);ee>F.current.sharpness&&(F.current={sharpness:ee,data:N})}}catch(b){o(b.message),M.length>0&&r(M[0],!1,O,!1)}};return{detectFaces:async M=>{if(!a)return;f.current=M.ref.current;const N=f.current;if(!N||N.videoWidth===0)return;$.current||($.current=document.createElement("canvas"),T.current=$.current.getContext("2d",{willReadFrequently:!0}));const O=$.current,k=T.current;if(!O||!k)return;O.width=N.videoWidth,O.height=N.videoHeight,k.drawImage(N,0,0,O.width,O.height);const b=k.getImageData(0,0,O.width,O.height);!v.current&&N.readyState>=2&&!_.current&&(v.current=!0,y.current=setTimeout(()=>{o("Liveness check TIMED OUT. Please try again."),g()},s));const{faces:z,blendShapes:X,inBox:Q}=await Fe.detectFaces(a,b);D(z,b,X,Q)},cleanup:g}}const An={container:"_container_1ej18_1",progress:"_progress_1ej18_12",completed:"_completed_1ej18_33",marker:"_marker_1ej18_37"};function vc(e){const{faceDetected:t}=e,n=U(()=>{const r=[An.container];return t&&r.push(An.focused),r.join(" ")},[t]);return h("div",{className:n,children:h(he,{as:"div",className:"yvlw-absolute",children:h("div",{className:An.marker,children:[h("div",{}),h("div",{}),h("div",{}),h("div",{})]})})})}const In={EnvironmentNotSupported:"Please check your lighting. Move to a well-lit area, but avoid harsh light or strong reflections on your face.",SpoofFace:"We detected a spoofing attempt",FaceTrackingFailed:"We could not detect your face",ExcessiveFaceBrightnessDetected:"We detected excessive light during the test, please wipe any oil or sweat that might cause a reflection on your face."},_c={None:"Processing...",LookAtCamera:"Look at camera.",FaceNotCentered:"Center your face in the camera.",MoveCloser:"Too far away! Move in closer.",ContinueToMoveCloser:"Continue to move closer.",MoveBack:"Too close! Move farther away.",TooMuchMovement:"Too much movement.",AttentionNotNeeded:"Finalizing check...",LookInFront:"Look in front.",TimedOut:"Timed out.",IncreaseBrightnessToMax:"Increase your screen brightness to maximum.",Tip1Title:"Tip 1:",Tip2Title:"Tip 2:",Tip3Title:"Tip 3:",Tip1:"Center your face in the preview. Make sure your eyes and mouth are visible, remove any obstructions like headphones.",Tip2:"You may be asked to smile.",Tip3:"You may be asked to turn your nose towards the green color.",Continue:"Continue"};function yc(e){const{onComplete:t=()=>{},onMessage:n=()=>{},onError:r=()=>{}}=e,{setColorScheme:o,getColorScheme:i}=xo(),s=w(null),a=w(!1),c=()=>{s.current&&(s.current.callAttemptEnd(),s.current.delete(),s.current=null)},u=j(()=>{c()},[]),d=()=>{s.current&&c(),s.current=null,a.current=!1},l=v=>{var L,W;const m=v.split(".");let g=!1;s.current.setToken(v);let $="",T="",S,x=0;if(m.length===3){const F=JSON.parse(atob(m[1]));if(F.face){const E=JSON.parse(F.face),I=/^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;if(E.endpoint&&(I.test(E.endpoint)||E.endpoint==="https://virginia.api.cognitive.microsoft.us")){s.current.setEndpoint(E.endpoint);const R=JSON.parse(F["allowed-paths"]);if(R){const q=(L=R.find(k=>k.path.toLocaleLowerCase().endsWith("/session/start")))==null?void 0:L.path;s.current.setSessionStartPath(q);const D=(W=R.find(k=>k.path.toLocaleLowerCase().endsWith("/session/attempt/end")))==null?void 0:W.path;s.current.setAttemptEndPath(D);const K=R.find(k=>k.path.endsWith("/detectLiveness/singleModal"));K&&({path:$,quota:x}=K,s.current.setLivenessPath($));const M=R.find(k=>k.path.endsWith("/detectLivenessWithVerify/singleModal"));M&&({path:T,quota:x}=M,s.current.setLivenessWithVerifyPath(T));const N=new Set(R.map(k=>{var b;return(b=k.path)==null?void 0:b.split("/")[1]}));if(N.size===1&&(K||M)){const k=N.values().next().value;s.current.setApiVersion(k),g=!0,S=E.clientClaims.livenessOperationMode}}}}s.current.setOperationQuota(x),s.current.setOperationMode(window.Module.LivenessOperationMode[S]),F.sid&&s.current.setSid(F.sid),F["azure-resource-id"]&&s.current.setResourceId(F["azure-resource-id"])}if(g)s.current.initialize();else{const F={livenessError:He(window.Module.LivenessFailureReason,window.Module.LivenessFailureReason.InvalidToken),recognitionError:He(window.Module.RecognitionFailureReason,window.Module.RecognitionFailureReason.None)};r(F.livenessError?In[F.livenessError]||F.livenessError:"Something went wrong"),u()}},f=v=>{try{s.current=new window.Module.FaceRecoEngineAdapter,l(v)}catch(m){r(`Could not start liveness test: ${m.message}`),c()}},p=v=>{const{isActionValid:m,isFeedbackValid:g,feedback:$}=v;if(m)switch(v.action){case window.Module.ActionRequiredFromApplication.BrightenDisplay:o("light");break;case window.Module.ActionRequiredFromApplication.DarkenDisplay:o("dark");break;case window.Module.ActionRequiredFromApplication.StopCamera:break}if(!a.current&&g){const T=He(window.Module.FeedbackForFace,$);n(T&&(_c[T]||""))}if($===window.Module.FeedbackForFace.AttentionNotNeeded){a.current=!0;const T=i();o(T)}},_=v=>{var S,x;const{livenessResult:m,recognitionResult:g}=v,$=((S=m.failureReason)==null?void 0:S.value)!==0||((x=g.failureReason)==null?void 0:x.value)!==0,T=new Set(["EnvironmentNotSupported","ExcessiveFaceBrightnessDetected","FaceEyeRegionNotVisible"]);if($){const L={livenessError:He(window.Module.LivenessFailureReason,m.failureReason),recognitionError:He(window.Module.RecognitionFailureReason,g.failureReason)};L.livenessError&&T.has(L.livenessError)?t():r(L.livenessError?In[L.livenessError]||L.livenessError:"Something went wrong")}else{const L={livenessStatus:He(window.Module.LivenessStatus,m.status),recognitionResult:{status:He(window.Module.RecognitionStatus,g.status),matchConfidence:g.confidence},resultId:m.resultId,digest:m.digest};L.livenessStatus==="RealFace"?t():L.livenessStatus==="SpoofFace"?r(In[L.livenessStatus]):r("Could not validate request")}u()};return{start:f,analyze:p,processFrame:v=>{let m=!1;if(a.current)m=s.current.generatePayloadAndResult();else{const{videoWidth:g,videoHeight:$}=v,T=xn(v,g,$,void 0,{willReadFrequently:!0}),S=window.Module._malloc(T.data.byteLength);try{window.Module.HEAPU8.set(T.data,S);const x=s.current.processFrame(g,$,T.data.byteLength,S);x.terminate?m=!0:x.isValid&&p(x)}finally{window.Module._free(S)}}m&&_(s.current.getFaceAnalyzerResult())},reset:d,destroy:u}}const qo="Detecting face...";function gc({onImageCaptured:e,fetchAzureSessionToken:t,loadAzureSdk:n,onError:r,onReset:o,onFailure:i}){const[s,a]=C(qo),[c,u]=C(!1),d=w("findingFace"),l=w(null),f=w(),p=w(!1),[_,y]=C(0),v=w(!1),[m,g]=C(!1);H(()=>{y(Math.min(window.innerWidth,window.innerHeight)*.6)},[]),H(()=>{n(),t()},[]);const $=yc({onMessage:F=>{d.current==="analyzingLiveness"&&a(F)},onComplete:()=>{d.current="done",e(!0)},onError:F=>{const E=cc(F);a(E.message),d.current="done",u(!0),r&&r(F),i({faceImage:"",passed:!1,metadata:{},error:E})}}),T=()=>{v.current=!1,a(qo),d.current="findingFace",l.current=null,$.reset(),f.current&&cancelAnimationFrame(f.current),u(!1),o()},{detectFaces:S,cleanup:x}=mc({validations:["zoom","features"],frameSize:_,livenessTimeout:1e4,onFace:async(F,E,I)=>{p.current=E,E&&d.current==="findingFace"&&!v.current&&I&&(v.current=!0,g(!0))},onPhotoSaved:()=>{},onMessage:F=>{d.current==="findingFace"&&a(F)},onError:F=>{a(F),u(!0),r&&r(F)}});H(()=>()=>{x()},[]);const L=()=>{!l.current||l.current.paused||l.current.ended||(d.current==="findingFace"?S({ref:l}):d.current==="analyzingLiveness"&&$.processFrame(l.current),d.current!=="done"&&(f.current=requestAnimationFrame(L)))};H(()=>{(async()=>{if(m){g(!1),x();try{await n();const E=await t();if(E)$.start(E),d.current="analyzingLiveness";else throw new Error("Session token could not be retrieved.")}catch(E){const I=E instanceof Error?E.message:"Failed to start liveness check.";r&&r(I),i({faceImage:"",passed:!1,metadata:{},error:{key:"session_token_error",message:I}}),u(!0)}}})()},[m]);const W=F=>{F.current&&(l.current=F.current,L())};return H(()=>()=>{f.current&&cancelAnimationFrame(f.current)},[]),h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col yvlw-items-center yvlw-justify-center",children:c?h("div",{className:`${ae.intro}`,children:h(At,{Icon:bo,title:"Oops, task failed!",description:s,onActionClick:T,actionText:"Try Again"})}):h("div",{className:ae.root,children:h("div",{className:`${ae.container} view`,children:h("div",{className:"yvlw-h-full yvlw-flex yvlw-flex-col",children:[h("div",{children:h(at,{onStream:W,children:h(V,{children:[h(vc,{faceDetected:p.current}),d.current==="analyzingLiveness"&&h("div",{className:"yvlw-bg-black/20 yvlw-z-5"})]})})}),h("div",{className:"yvlw-border-t dark:yvlw-border-gray-800 yvlw-border-gray-200",children:h("div",{className:"yvlw-text-center yvlw-mx-auto yvlw-pt-4 yvlw-pb-6 yvlw-px-4",children:[h("div",{className:ae.instructions,children:[h("h2",{children:s}),h("p",{className:"subtext",children:"Position your face in the camera frame and hold still."})]}),h("div",{className:ae.branding})]})})]})})})})}const wc=()=>{if(window.isAzureSdkLoading)return window.azureSdkLoadPromise;window.isAzureSdkLoading=!0;const e=new Promise((t,n)=>{let r=st.js.simd;try{WebAssembly.validate(new Uint8Array(qa))||(r=st.js.default)}catch{r=st.js.simd}window.Module=window.Module||{},window.Module.onRuntimeInitialized=()=>{t()},Object.assign(window.Module,{locateFile(i,s){if(i.includes("AzureAIVisionFace")&&i.endsWith(".wasm")){const a=i.includes("SIMD")?st.wasm.simd:st.wasm.default;return`${$o}/${a}`}return`${s}${i}`}});const o=document.createElement("script");o.src=`${$o}/${r}`,o.async=!0,o.onerror=()=>{n(new Error("Network error: Failed to load SDK script."))},document.head.appendChild(o)});return window.azureSdkLoadPromise=e,e};let lt=null;function bc(){var q;const{toggleColorScheme:e,getColorScheme:t,setColorScheme:n}=xo(),{user:r,tasks:o,currentTaskIndex:i,completed:s,onComplete:a,onFailure:c,faceDetector:u,presentation:d,clearSavedPhoto:l,branding:f,isMobileAppWebView:p}=fe(),[_,y]=C(!1),[v,m]=C(!1),[g,$]=C(null),[T,S]=C(!1),[x,L]=C(!1),[W,F]=C(0);H(()=>{const D=t();n(D)},[]);const{sessionToken:E}=fe(),I=async()=>(!E&&!lt&&(lt=Promise.reject(new Error("sessionToken not provided. Generate a sessionToken on your backend and pass it to the SDK."))),E??lt),Y=async()=>{try{y(!0),$(null),await a(),lt=null,d==="page"&&S(!0)}catch(D){$(D.message)}finally{y(!1)}},R=j(D=>D===i?oe.active:i>D?oe.completed:"subtext",[i]);return h("div",{className:oe.root,children:h("div",{className:oe.container,children:[h("div",{className:`${oe.lhs} divider`,children:[h("div",{className:oe.info,children:[h(Ka,{}),h("div",{children:h("p",{className:"yvlw-text-xs yvlw-m-0 yvlw-p-0 subtext",children:"You have been given this set of tasks to complete. They are pretty easy to do but we will be guiding you every step of the way."})}),h("ol",{children:[o.map((D,K)=>h("li",{className:R(K),children:Ya[D.id].name},`task-${K}`)),h("li",{className:s?oe.active:"",children:"Complete! 🎉"})]})]}),h("footer",{className:"divider",children:[h("div",{children:(f==null?void 0:f.showPoweredBy)!==!1&&h("div",{className:"yvlw-flex yvlw-items-center yvlw-gap-1",children:[h("span",{children:(f==null?void 0:f.poweredByText)||"Powered by Youverify"}),(f==null?void 0:f.poweredByLogo)&&!(f!=null&&f.hideLogoOnMobile&&p)&&h("img",{src:f.poweredByLogo,alt:`${(f==null?void 0:f.name)||"Brand"} logo`,className:"yvlw-h-6"})]})}),h("div",{onClick:()=>e(),role:"button",children:[h("div",{className:"dark:yvlw-hidden",children:h(go,{})}),h("div",{className:"yvlw-hidden dark:yvlw-block",children:h(Ma,{})})]})]})]}),h("div",{className:oe.main,children:h("div",{className:oe.content,children:[h(he,{show:!v,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:u?h(At,{Icon:La,title:"Liveness Check",description:"To ensure the security of your identity, we conduct a liveness check to verify that you are a real person actively engaging with the process. Please ensure to stay in a well lit area.",actionText:"Start Liveness Test",onActionClick:()=>m(!0)}):h(Ao,{size:"lg"})})}),h(he,{show:v&&!x,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(gc,{fetchAzureSessionToken:I,loadAzureSdk:wc,onImageCaptured:D=>{$(null),D&&L(!0)},onError:D=>$(D),onReset:()=>{lt=null,L(!1),F(D=>D+1),l()},onFailure:c},W)})}),o.map((D,K)=>{let M;switch(D.id){case"complete-the-circle":M=h(tc,{...D});break;case"yes-or-no":M=h(ic,{...D});break;case"motions":M=h(dc,{...D});break;case"blink":M=h(fc,{...D});break;default:M=h(V,{});break}return h(he,{show:v&&x&&!s&&i===K,appear:!0,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full",children:M},`task-${K}`)}),h(he,{show:v&&s,as:"div",leave:"yvlw-transform yvlw-transition yvlw-duration-300",leaveFrom:"yvlw-translate-y-0 yvlw-opacity-100",leaveTo:"yvlw--translate-y-full yvlw-opacity-0",enterFrom:"yvlw-translate-y-full yvlw-opacity-0",enterTo:"yvlw-translate-y-0 yvlw-opacity-100",className:"yvlw-h-full yvlw-w-full",children:h("div",{className:oe.completed,children:h(At,{Icon:Aa,title:T?"All Set!":"Completed",description:T?"You can now close or exit the window":"Your Identity verification has been completed successfully. Thanks for your patience",actionText:"Finish",loading:_,onActionClick:Y,hideButton:T,children:g&&h("div",{className:"yvlw-mt-3",children:g})})})})]})}),h("div",{className:`${oe.rhs} divider`,children:r&&h("div",{className:`${oe.profile} divider`,children:[h("div",{children:h("div",{className:oe.avatar,children:[r.firstName.charAt(0).toUpperCase(),(q=r.lastName)==null?void 0:q.charAt(0).toUpperCase()]})}),h("div",{children:[h("h4",{children:[r.firstName," ",r.lastName]}),r.email&&h("p",{className:"subtext",children:r.email})]})]})})]})})}function Ec(e){const{tasks:t,namespace:n,user:r,branding:o,isMobileAppWebView:i,onClose:s=()=>{},onSuccess:a,onFailure:c,presentation:u="modal",publicKey:d,metadata:l,sandboxEnvironment:f,sessionId:p,sessionToken:_}=e,[y,v]=C(e.show),m=()=>{v(!1),s()};return h(Ga,{namespace:n,publicKey:d,tasks:t,user:r,branding:o,isMobileAppWebView:i,onRequestClose:m,onSuccess:a,onFailure:c,metadata:l,presentation:u,sandboxEnvironment:f,sessionId:p,sessionToken:_,children:h(Ca,{id:n,open:u==="page"?!0:y,onClose:m,transition:!0,className:`${xa.root} ${Nt.root} ${Nt[u]}`,style:{"--branding-color":(o==null?void 0:o.color)??Va},children:[u==="modal"&&h("div",{onClick:m,role:"button",className:Nt.close,children:h(Ia,{className:"yvlw-text-white"})}),h(yo,{className:`${Nt.container}`,children:h(bc,{})})]})})}class $c{constructor(t){this.tasks=[],this.container=null,this.namespace="liveness-web-sdk",this.loadedScripts=[];const{presentation:n="modal"}=t;this.presentation=n,this.props=t,t.tasks&&(this.tasks=t.tasks),n==="page"&&this.start()}validateOptions(){if(!this.tasks)throw new Error("Tasks cannot be empty");if(this.props.user&&!this.props.user.firstName)throw new Error("First Name is required when User object is supplied");if(!this.props.sessionId)throw new Error("A sessionId is required. Generate it on your backend and pass it in.");if(!this.props.sessionToken)throw new Error("A sessionToken is required for passive liveness. Generate it on your backend and pass it in.")}async start(t){t&&(this.tasks=t),this.validateOptions(),this.container=document.createElement("div"),document.body.appendChild(this.container),We(h(Ec,{namespace:this.namespace,publicKey:this.props.publicKey,sandboxEnvironment:this.props.sandboxEnvironment,presentation:this.props.presentation,show:!0,tasks:this.tasks,user:this.props.user,branding:this.props.branding,isMobileAppWebView:this.props.isMobileAppWebView,onClose:()=>this.close(),onSuccess:this.props.onSuccess,onFailure:this.props.onFailure,metadata:this.props.metadata,sessionId:this.props.sessionId,sessionToken:this.props.sessionToken}),this.container)}close(){if(this.container&&this.presentation!=="page"){if(!document.body.contains(this.container))return;document.body.removeChild(this.container),this.props.onClose&&this.props.onClose()}}}return $c});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "youverify-liveness-web",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"