@toa.io/extensions.configuration 1.0.0-alpha.293 → 1.0.0-alpha.294

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.
@@ -1,4 +1,5 @@
1
1
  import * as schemas from '@toa.io/schemas';
2
+ import { assertSecrets } from '@toa.io/definitions/extensions.configuration';
2
3
  import { entry } from './lib/map.js';
3
4
  export async function transition(input, object) {
4
5
  const known = entry(input.component);
@@ -8,6 +9,7 @@ export async function transition(input, object) {
8
9
  const schema = schemas.schema(known.schema);
9
10
  try {
10
11
  schema.validate(configuration);
12
+ assertSecrets(known.schema, configuration);
11
13
  }
12
14
  catch (error) {
13
15
  return new InvalidConfigurationError(error.message);
@@ -27,4 +29,4 @@ class UnknownComponentError extends Error {
27
29
  class InvalidConfigurationError extends Error {
28
30
  code = 'INVALID_CONFIGURATION';
29
31
  }
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc291cmNlL2NyZWF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGlCQUFpQixDQUFBO0FBQzFDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFHcEMsTUFBTSxDQUFDLEtBQUssVUFBVSxVQUFVLENBQUMsS0FBWSxFQUFFLE1BQWM7SUFDM0QsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUVwQyxJQUFJLEtBQUssS0FBSyxTQUFTO1FBQUUsT0FBTyxJQUFJLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQTtJQUUxRSxNQUFNLGFBQWEsR0FBRyxlQUFlLENBQUMsS0FBSyxDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBRTFELE1BQU0sTUFBTSxHQUFnQixPQUFPLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUV4RCxJQUFJLENBQUM7UUFDSCxNQUFNLENBQUMsUUFBUSxDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBQ2hDLENBQUM7SUFBQyxPQUFPLEtBQUssRUFBRSxDQUFDO1FBQ2YsT0FBTyxJQUFJLHlCQUF5QixDQUFFLEtBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUNoRSxDQUFDO0lBRUQsTUFBTSxDQUFDLFNBQVMsR0FBRyxLQUFLLENBQUMsU0FBUyxDQUFBO0lBQ2xDLE1BQU0sQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDLEtBQUssQ0FBQTtJQUMxQixNQUFNLENBQUMsYUFBYSxHQUFHLGFBQWEsQ0FBQTtJQUNwQyxNQUFNLENBQUMsVUFBVSxHQUFHLEtBQUssQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFBO0lBRXZDLE9BQU8sTUFBTSxDQUFBO0FBQ2YsQ0FBQztBQUVELE1BQU0scUJBQXNCLFNBQVEsS0FBSztJQUN2QixJQUFJLEdBQUcsbUJBQW1CLENBQUE7SUFFMUMsWUFBbUIsU0FBaUI7UUFDbEMsS0FBSyxDQUFDLGNBQWMsU0FBUyxxQkFBcUIsQ0FBQyxDQUFBO0lBQ3JELENBQUM7Q0FDRjtBQUVELE1BQU0seUJBQTBCLFNBQVEsS0FBSztJQUMzQixJQUFJLEdBQUcsdUJBQXVCLENBQUE7Q0FDL0MifQ==
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc291cmNlL2NyZWF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGlCQUFpQixDQUFBO0FBQzFDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSw4Q0FBOEMsQ0FBQTtBQUM1RSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBR3BDLE1BQU0sQ0FBQyxLQUFLLFVBQVUsVUFBVSxDQUFDLEtBQVksRUFBRSxNQUFjO0lBQzNELE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUE7SUFFcEMsSUFBSSxLQUFLLEtBQUssU0FBUztRQUFFLE9BQU8sSUFBSSxxQkFBcUIsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUE7SUFFMUUsTUFBTSxhQUFhLEdBQUcsZUFBZSxDQUFDLEtBQUssQ0FBQyxhQUFhLENBQUMsQ0FBQTtJQUUxRCxNQUFNLE1BQU0sR0FBZ0IsT0FBTyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUE7SUFFeEQsSUFBSSxDQUFDO1FBQ0gsTUFBTSxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsQ0FBQTtRQUM5QixhQUFhLENBQUMsS0FBSyxDQUFDLE1BQU0sRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUM1QyxDQUFDO0lBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQztRQUNmLE9BQU8sSUFBSSx5QkFBeUIsQ0FBRSxLQUFlLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDaEUsQ0FBQztJQUVELE1BQU0sQ0FBQyxTQUFTLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQTtJQUNsQyxNQUFNLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQyxLQUFLLENBQUE7SUFDMUIsTUFBTSxDQUFDLGFBQWEsR0FBRyxhQUFhLENBQUE7SUFDcEMsTUFBTSxDQUFDLFVBQVUsR0FBRyxLQUFLLENBQUMsVUFBVSxDQUFDLEVBQUUsQ0FBQTtJQUV2QyxPQUFPLE1BQU0sQ0FBQTtBQUNmLENBQUM7QUFFRCxNQUFNLHFCQUFzQixTQUFRLEtBQUs7SUFDdkIsSUFBSSxHQUFHLG1CQUFtQixDQUFBO0lBRTFDLFlBQW1CLFNBQWlCO1FBQ2xDLEtBQUssQ0FBQyxjQUFjLFNBQVMscUJBQXFCLENBQUMsQ0FBQTtJQUNyRCxDQUFDO0NBQ0Y7QUFFRCxNQUFNLHlCQUEwQixTQUFRLEtBQUs7SUFDM0IsSUFBSSxHQUFHLHVCQUF1QixDQUFBO0NBQy9DIn0=
@@ -1,4 +1,5 @@
1
1
  import * as schemas from '@toa.io/schemas'
2
+ import { assertSecrets } from '@toa.io/definitions/extensions.configuration'
2
3
  import { entry } from './lib/map.js'
3
4
  import type { Schema } from '@toa.io/schemas'
4
5
 
@@ -13,6 +14,7 @@ export async function transition(input: Input, object: Entity): Promise<Entity |
13
14
 
14
15
  try {
15
16
  schema.validate(configuration)
17
+ assertSecrets(known.schema, configuration)
16
18
  } catch (error) {
17
19
  return new InvalidConfigurationError((error as Error).message)
18
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.configuration",
3
- "version": "1.0.0-alpha.293",
3
+ "version": "1.0.0-alpha.294",
4
4
  "type": "module",
5
5
  "description": "Toa Configuration",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -32,10 +32,10 @@
32
32
  "prepack": "npm run build:ui",
33
33
  "features": "TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js"
34
34
  },
35
- "gitHead": "1e05b3ab64758324c58c425f1f8e52e9f35f1da8",
35
+ "gitHead": "50b2b596a46a4d639d9f198f834d70c190f0a3c6",
36
36
  "dependencies": {
37
37
  "@toa.io/core": "1.0.0-alpha.293",
38
- "@toa.io/definitions": "1.0.0-alpha.293",
38
+ "@toa.io/definitions": "1.0.0-alpha.294",
39
39
  "@toa.io/generic": "1.0.0-alpha.292",
40
40
  "@toa.io/schemas": "1.0.0-alpha.293",
41
41
  "openspan": "1.0.0-alpha.293"
package/readme.md CHANGED
@@ -85,8 +85,14 @@ configuration:
85
85
  type: string
86
86
  bar:
87
87
  type: number
88
+ token:
89
+ type: string
90
+ format: secret
88
91
  ```
89
92
 
93
+ A string the component reads as a secret is declared `format: secret`. It is a `Secret`
94
+ on the context, and is given as a `$NAME` reference — see [Secrets](#secrets).
95
+
90
96
  ### Defaults
91
97
 
92
98
  The default configuration value can be provided using the `defaults` property, which should
@@ -148,7 +154,18 @@ configuration:
148
154
 
149
155
  ## Secrets
150
156
 
151
- Configuration values which are uppercase strings prefixed with `$` are considered as secrets.
157
+ A property declared `format: secret` is given as an uppercase name prefixed with `$`.
158
+ A plain string in its place is refused.
159
+
160
+ ```yaml
161
+ # manifest.toa.yaml
162
+ configuration:
163
+ schema:
164
+ properties:
165
+ api-key:
166
+ type: string
167
+ format: secret
168
+ ```
152
169
 
153
170
  ```yaml
154
171
  # context.toa.yaml
@@ -183,9 +200,6 @@ function transition(input, entity, context) {
183
200
  }
184
201
  ```
185
202
 
186
- A value a component reads as a secret is given as a reference: a plain string in its place
187
- has no `unwrap`.
188
-
189
203
  ## Values
190
204
 
191
205
  Configuration values are held by the `configuration.values` component, deployed as the
@@ -1,6 +1,6 @@
1
1
  import { add, environment } from '@toa.io/generic';
2
2
  import * as schemas from '@toa.io/schemas';
3
- import { PREFIX, SECRET_RX } from '@toa.io/definitions/extensions.configuration';
3
+ import { PREFIX, SECRET_RX, assertSecrets } from '@toa.io/definitions/extensions.configuration';
4
4
  import { Secret } from './Secret.js';
5
5
  /** The variable is set, so the values service is not consulted. */
6
6
  export function overridden(locator) {
@@ -25,6 +25,7 @@ export function fit(raw, manifest) {
25
25
  function validate(values, manifest) {
26
26
  const schema = schemas.schema(manifest.schema);
27
27
  schema.validate(values);
28
+ assertSecrets(manifest.schema, values);
28
29
  }
29
30
  function read(suffix) {
30
31
  const variable = PREFIX + suffix;
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../source/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIpC,mEAAmE;AACnE,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO,WAAW,CAAC,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,SAAS,CAAA;AAClE,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,KAAK,CAAC,OAAgB,EAAE,QAAkB;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAEtC,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;QAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAEnE,OAAO,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAC9B,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,QAAkB;IACjD,wFAAwF;IACxF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAS,CAAA;IAEtD,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC1B,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAEzB,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,MAAY,EAAE,QAAkB;IAChD,MAAM,MAAM,GAAgB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAE3D,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AACzB,CAAC;AAED,SAAS,IAAI,CAAC,MAAc;IAC1B,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAExC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAA;;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC;AAED,SAAS,iBAAiB,CAAC,aAAmB;IAC5C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACzD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;YAAE,iBAAiB,CAAC,KAAa,CAAC,CAAA;QAEjF,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAQ;QAEvC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QAEpC,IAAI,KAAK,KAAK,IAAI;YAAE,SAAQ;QAE5B,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAA;QAEnC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,IAAK,CAAC,CAAC,CAAA;IACnD,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,QAAQ,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,CAAA;IACpC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAEvC,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,cAAc,CAAC,CAAA;IAEnE,OAAO,KAAK,CAAA;AACd,CAAC"}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../source/configuration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EACL,MAAM,EACN,SAAS,EACT,aAAa,EACd,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIpC,mEAAmE;AACnE,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAO,WAAW,CAAC,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,SAAS,CAAA;AAClE,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,KAAK,CAAC,OAAgB,EAAE,QAAkB;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAEtC,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS;QAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAEnE,OAAO,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAC9B,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,QAAkB;IACjD,wFAAwF;IACxF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAS,CAAA;IAEtD,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC1B,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAEzB,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,MAAY,EAAE,QAAkB;IAChD,MAAM,MAAM,GAAgB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAE3D,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IACvB,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACxC,CAAC;AAED,SAAS,IAAI,CAAC,MAAc;IAC1B,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;IAChC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAExC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAA;;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC;AAED,SAAS,iBAAiB,CAAC,aAAmB;IAC5C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACzD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;YAAE,iBAAiB,CAAC,KAAa,CAAC,CAAA;QAEjF,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,SAAQ;QAEvC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;QAEpC,IAAI,KAAK,KAAK,IAAI;YAAE,SAAQ;QAE5B,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAA;QAEnC,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,IAAK,CAAC,CAAC,CAAA;IACnD,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,QAAQ,GAAG,MAAM,GAAG,GAAG,GAAG,IAAI,CAAA;IACpC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAEvC,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,cAAc,CAAC,CAAA;IAEnE,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,J as o,L as s,M as c,N as l,P as u,Q as d,R as f,S as p,Tt as m,a as h,b as g,bt as _,c as v,d as y,dt as b,et as x,i as S,it as C,j as w,k as T,kt as E,l as D,m as O,n as ee,nt as te,o as k,ot as A,p as j,pt as ne,q as M,s as N,st as P,tt as F,u as I,ut as L,v as R,w as z,x as re,y as B,yt as V}from"./CcD_ISxM.js";import"./BVp7FTPj.js";import"./xihTtKlq.js";import{A as ie,C as ae,D as oe,E as se,O as ce,_ as le,a as ue,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as H,l as _e,m as ve,n as ye,p as be,s as xe,u as Se,w as Ce,x as we}from"./DJFe2eVw.js";import{A as Te,B as Ee,C as De,D as Oe,E as ke,F as Ae,G as je,H as U,I as W,L as Me,M as G,N as Ne,O as Pe,P as Fe,R as Ie,S as Le,T as K,U as Re,V as ze,W as q,b as Be,d as Ve,f as He,g as Ue,h as We,j as Ge,k as Ke,m as qe,p as Je,u as J,v as Ye,w as Xe,x as Ze,y as Qe,z as $e}from"./D5h0LnT-.js";var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=h(t,et),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];H(e,k({name:`log-out`},()=>n,{get iconNode(){return r}}))}var nt=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`name`,`color`,`stroke`,`aria-label`]);function Y(e,t){_(t,!0);let r=S(t,`role`,3,`status`),i=S(t,`aria-label`,3,`Loading`),a=h(t,nt);{let o=P(()=>t.name===null?void 0:t.name),s=P(()=>t.color===null?void 0:t.color),c=P(()=>t.stroke===null?void 0:t.stroke),l=P(()=>q(`size-4 animate-spin`,t.class));ie(e,k({get role(){return r()},get name(){return n(o)},get color(){return n(s)},get stroke(){return n(c)},get"aria-label"(){return i()},get class(){return n(l)}},()=>a))}V()}var rt={"en-US":{auth:{signupTitle:`One-tap sign-up`,passwordTitle:`Hop in with password`,passwordDescription:`Create an account or sign in`,passkey:`Passkeys`,email:`Email`,alreadyHaveAccount:`Already have an account?`,betterSecurity:`Better security`,passkeysNotSupported:`Passkeys not supported`,passkeysWarning:`Your browser does not respect your privacy and security.`,learnMore:`Learn more`,passwordBlank:`Leave password blank <nobr>to receive</nobr> <nobr>a one-time</nobr> passcode.`,otpInstructions:`Enter the code sent to your email. It expires in 5 minutes.`,continueWith:e=>`Continue with ${e}`,passkeysDescription:`Passkeys are safer than passwords, easier to use, and can’t be stolen.`,yourName:`Your name`,password:`Password`,refresh:{description:e=>`${e?e+`, for`:`For`} security reasons, your credentials have expired. Please log in again to continue.`,title:`Welcome back`,continue:`Continue`},signout:`Sign out`,login:`Log In`,signin:`Sign In`,copyId:`Copy account ID`},credentials:{connect:`Connect`,email:{title:`Email`,description:`Connect your email address`},google:{title:`Google`,description:`Connect your Google account`},apple:{title:`Apple`,description:`Connect your Apple ID`},passkeys:{title:`Passkeys`,tagline:`Sign in faster with a passkey`,create:`Create`,manage:`Manage`,collapse:`Collapse`,add:`Enter passkey name`,delete:`Hold to delete`,unknown:`Unknown`,count:e=>{let t={one:`{n} passkey`,other:`{n} passkeys`},n=`en-US`,r=new Intl.PluralRules(n).select(e),i=t;return(i[r]??i.other).replace(/{n}/g,new Intl.NumberFormat(n).format(e))},meta:(e,t)=>`Added ${e} · Used ${t}`,duplicate:`This device already has a passkey for your account`,failed:`Could not create the passkey. Please try again.`},transfer:{action:`Sign in on another device`,title:`Scan to sign in`,description:`Use your other device to scan this code and sign in.`,done:`Done`}}}},X=ne(ye,e=>rt[e]),it=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),at=w(`<div><!></div>`);function ot(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,it);var o=at();I(o,e=>({"data-slot":`card-content`,class:e,...i}),[()=>q(`px-(--card-spacing)`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var st=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ct=w(`<p><!></p>`);function lt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,st);var o=ct();I(o,e=>({"data-slot":`card-description`,class:e,...i}),[()=>q(`text-sm text-muted-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var ut=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),dt=w(`<div><!></div>`);function ft(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,ut);var o=dt();I(o,e=>({"data-slot":`card-footer`,class:e,...i}),[()=>q(`rounded-b-xl border-t bg-muted/50 p-(--card-spacing) flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var pt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),mt=w(`<div><!></div>`);function ht(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,pt);var o=mt();I(o,e=>({"data-slot":`card-header`,class:e,...i}),[()=>q(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var gt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),_t=w(`<div><!></div>`);function vt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,gt);var o=_t();I(o,e=>({"data-slot":`card-title`,class:e,...i}),[()=>q(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var yt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),bt=w(`<div><!></div>`);function xt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),o=h(t,yt);var s=bt();I(s,e=>({"data-slot":`card`,"data-size":i(),class:e,...o}),[()=>q(`gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=h(t,St),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];H(e,k({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),Tt=w(`<input/>`);function Et(n,r){_(r,!0);let i=S(r,`ref`,15,null),a=S(r,`value`,15),o=S(r,`files`,15),s=S(r,`data-slot`,3,`input`),c=h(r,wt);var l=t(),u=e(l),d=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:`file`,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),v(t,o),D(t,a),T(e,t)},f=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:r.type,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),D(t,a),T(e,t)};z(u,e=>{r.type===`file`?e(d):e(f,-1)}),T(n,l),V()}var Dt=w(`<div><!></div>`);function Ot(e,t){_(t,!0);let r=A(!1);async function i(){C(r,!0),await new Promise(e=>setTimeout(e,500)),C(r,!1)}var o={shake:i},s=Dt(),c=d(s);return B(c,()=>t.children),a(s),M(()=>j(s,1,O([t.class,n(r)&&`shake`]),`svelte-alh7mr`)),T(e,s),V(o)}function Z(e){let t=A(te(e));return{[Ne]:!0,[$e]:!0,get current(){return n(t)},set current(e){C(t,e,!0)}}}Z.from=Ae,Z.with=W,Z.flatten=Fe,Z.readonly=ze,Z.isBox=Me,Z.isWritableBox=Ie;function kt(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var At=[Je,Be,Ye],jt=[Ue,Qe,`End`];[...At,...jt];function Mt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qe:We,vertical:Je}[t]}function Nt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?We:qe,vertical:Ue}[t]}function Pt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Mt(e,t),prevKey:Nt(e,t)}}var Ft=class{#e;#t=Z(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Pt(kt(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Ye]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?We:Je,t=s===`ArrowUp`?qe:Ue;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);t&&He(t)&&t.focus()}},It=18,Lt=40,Rt=`${Lt}px`,zt=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Bt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:i,domContext:a}){let s=A(!1),c=A(!1),l=A(!1);function u(){let e=r.current;return e!==`none`&&e===`increase-width`&&n(s)&&n(c)}function d(){let i=e.current,o=t.current;if(!i||!o||n(l)||r.current===`none`)return;let c=i,u=c.getBoundingClientRect().left+c.offsetWidth,d=c.getBoundingClientRect().top+c.offsetHeight/2,f=u-It,p=d;(a.querySelectorAll(zt).length!==0||a.getDocument().elementFromPoint(f,p)!==i)&&(C(s,!0),C(l,!0))}return o(()=>{let t=e.current;if(!t||r.current===`none`)return;function n(){let e=Oe(t).innerWidth-t.getBoundingClientRect().right;C(c,e>=Lt)}n();let i=setInterval(n,1e3);return()=>{clearInterval(i)}}),o(()=>{let e=i.current||a.getActiveElement()===t.current;if(r.current===`none`||!e)return;let n=setTimeout(d,0),o=setTimeout(d,2e3),s=setTimeout(d,5e3),c=setTimeout(()=>{C(l,!0)},6e3);return()=>{clearTimeout(n),clearTimeout(o),clearTimeout(s),clearTimeout(c)}}),{get hasPwmBadge(){return n(s)},get willPushPwmBadge(){return u()},PWM_BADGE_SPACE_WIDTH:Rt}}var Vt=`^\\d+$`,Ht=Xe({component:`pin-input`,parts:[`root`,`cell`]}),Ut=[`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`,`Enter`,`Tab`,`Shift`,`Control`,`Meta`],Wt=class e{static create(t){return new e(t)}opts;attachment;inputAttachment;#e=A(!1);#t=Ee(!1);#n=A(null);#r=A(null);#i=new Pe(()=>this.opts.value.current??``);#a=P(()=>typeof this.opts.pattern.current==`string`?new RegExp(this.opts.pattern.current):this.opts.pattern.current);#o=A(te({prev:[null,null,`none`],willSyntheticBlur:!1}));#s;#c;domContext;constructor(e){this.opts=e,this.attachment=K(this.opts.ref),this.inputAttachment=K(this.opts.inputRef),this.domContext=new ke(e.ref),this.#c={value:this.opts.value,isIOS:typeof window<`u`&&window?.CSS?.supports(`-webkit-touch-callout`,`none`)},this.#s=Bt({containerRef:this.opts.ref,inputRef:this.opts.inputRef,isFocused:this.#t,pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext}),ee(()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;this.#c.value.current!==e.value&&(this.opts.value.current=e.value),n(this.#o).prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let r=f(this.domContext.getDocument(),`selectionchange`,this.#m,{capture:!0});this.#m(),this.domContext.getActiveElement()===e&&(this.#t.current=!0),this.domContext.getElementById(`pin-input-style`)||this.#p();let i=()=>{t&&t.style.setProperty(`--bits-pin-input-root-height`,`${e.clientHeight}px`)};i();let a=new ResizeObserver(i);return a.observe(e),()=>{r(),a.disconnect()}}),Ke([()=>this.opts.value.current,()=>this.opts.inputRef.current],()=>{Kt(()=>{let e=this.opts.inputRef.current;if(!e)return;e.dispatchEvent(new Event(`input`));let t=e.selectionStart,r=e.selectionEnd,i=e.selectionDirection??`none`;t!==null&&r!==null&&(C(this.#n,t,!0),C(this.#r,r,!0),n(this.#o).prev=[t,r,i])},this.domContext)}),o(()=>{let e=this.opts.value.current,t=this.#i.current,n=this.opts.maxLength.current,r=this.opts.onComplete.current;t!==void 0&&e!==t&&t.length<n&&e.length===n&&r(e)})}onkeydown=e=>{let t=e.key;Ut.includes(t)||e.ctrlKey||e.metaKey||t&&n(this.#a)&&!n(this.#a).test(t)&&e.preventDefault()};#l=P(()=>({position:`relative`,cursor:this.opts.disabled.current?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}));#u=P(()=>({id:this.opts.id.current,[Ht.root]:``,style:n(this.#l),...this.attachment}));get rootProps(){return n(this.#u)}set rootProps(e){C(this.#u,e)}#d=P(()=>({style:{position:`absolute`,inset:0,pointerEvents:`none`}}));get inputWrapperProps(){return n(this.#d)}set inputWrapperProps(e){C(this.#d,e)}#f=P(()=>({position:`absolute`,inset:0,width:this.#s.willPushPwmBadge?`calc(100% + ${this.#s.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:this.#s.willPushPwmBadge?`inset(0 ${this.#s.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:this.opts.textAlign.current,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--bits-pin-input-root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}));#p(){let e=this.domContext.getDocument(),t=e.createElement(`style`);if(t.id=`pin-input-style`,e.head.appendChild(t),t.sheet){let e=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;qt(t.sheet,`[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }`),qt(t.sheet,`[data-pin-input-input]:autofill { ${e} }`),qt(t.sheet,`[data-pin-input-input]:-webkit-autofill { ${e} }`),qt(t.sheet,`@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),qt(t.sheet,`[data-pin-input-input] + * { pointer-events: all !important; }`)}}#m=()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;if(this.domContext.getActiveElement()!==e){C(this.#n,null),C(this.#r,null);return}let r=e.selectionStart,i=e.selectionEnd,a=e.selectionDirection??`none`,o=e.maxLength,s=e.value,c=n(this.#o).prev,l=-1,u=-1,d;if(s.length!==0&&r!==null&&i!==null){let e=r===i,t=r===s.length&&s.length<o;if(e&&!t){let e=r;if(e===0)l=0,u=1,d=`forward`;else if(e===o)l=e-1,u=e,d=`backward`;else if(o>1&&s.length>1){let t=0;if(c[0]!==null&&c[1]!==null){d=e<c[1]?`backward`:`forward`;let n=c[0]===c[1]&&c[0]<o;d===`backward`&&!n&&(t=-1)}l=t+e,u=t+e+1}}l!==-1&&u!==-1&&l!==u&&this.opts.inputRef.current?.setSelectionRange(l,u,d)}let f=l===-1?r:l,p=u===-1?i:u,m=d??a;C(this.#n,f,!0),C(this.#r,p,!0),n(this.#o).prev=[f,p,m]};oninput=e=>{let t=e.currentTarget.value.slice(0,this.opts.maxLength.current);if(t.length>0&&n(this.#a)&&!n(this.#a).test(t)){e.preventDefault();return}typeof this.#i.current==`string`&&t.length<this.#i.current.length&&this.domContext.getDocument().dispatchEvent(new Event(`selectionchange`)),this.opts.value.current=t};onfocus=e=>{let t=this.opts.inputRef.current;if(t){let e=Math.min(t.value.length,this.opts.maxLength.current-1),n=t.value.length;t.setSelectionRange(e,n),C(this.#n,e,!0),C(this.#r,n,!0)}this.#t.current=!0};onpaste=e=>{let t=this.opts.inputRef.current;if(!t)return;let r=e=>{let n=t.selectionStart===null?void 0:t.selectionStart,r=t.selectionEnd===null?void 0:t.selectionEnd,i=n!==r,a=this.opts.value.current;return(i?a.slice(0,n)+e+a.slice(r):a.slice(0,n)+e+a.slice(n)).slice(0,this.opts.maxLength.current)},i=e=>e.length>0&&n(this.#a)&&!n(this.#a).test(e);if(!this.opts.pasteTransformer?.current&&(!this.#c.isIOS||!e.clipboardData||!t)){i(r(e.clipboardData?.getData(`text/plain`)))&&e.preventDefault();return}let a=e.clipboardData?.getData(`text/plain`)??``,o=this.opts.pasteTransformer?.current?this.opts.pasteTransformer.current(a):a;e.preventDefault();let s=r(o);if(i(s))return;t.value=s,this.opts.value.current=s;let c=Math.min(s.length,this.opts.maxLength.current-1),l=s.length;t.setSelectionRange(c,l),C(this.#n,c,!0),C(this.#r,l,!0)};onmouseover=e=>{C(this.#e,!0)};onmouseleave=e=>{C(this.#e,!1)};onblur=e=>{if(n(this.#o).willSyntheticBlur){n(this.#o).willSyntheticBlur=!1;return}this.#t.current=!1};#h=P(()=>({id:this.opts.inputId.current,style:n(this.#f),autocomplete:this.opts.autocomplete.current||`one-time-code`,"data-pin-input-input":``,"data-pin-input-input-mss":n(this.#n),"data-pin-input-input-mse":n(this.#r),inputmode:this.opts.inputmode.current,pattern:n(this.#a)?.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:De(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}));get inputProps(){return n(this.#h)}set inputProps(e){C(this.#h,e)}#g=P(()=>Array.from({length:this.opts.maxLength.current}).map((e,t)=>{let r=this.#t.current&&n(this.#n)!==null&&n(this.#r)!==null&&(n(this.#n)===n(this.#r)&&t===n(this.#n)||t>=n(this.#n)&&t<n(this.#r)),i=this.opts.value.current[t]===void 0?null:this.opts.value.current[t];return{char:i,isActive:r,hasFakeCaret:r&&i===null}}));#_=P(()=>({cells:n(this.#g),isFocused:this.#t.current,isHovering:n(this.#e)}));get snippetProps(){return n(this.#_)}set snippetProps(e){C(this.#_,e)}},Gt=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=K(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,[Ht.cell]:``,"data-active":this.opts.cell.current.isActive?``:void 0,"data-inactive":this.opts.cell.current.isActive?void 0:``,...this.attachment}));get props(){return n(this.#e)}set props(e){C(this.#e,e)}};function Kt(e,t){return[t.setTimeout(e,0),t.setTimeout(e,10),t.setTimeout(e,50)]}function qt(e,t){try{e.insertRule(t)}catch{console.error(`pin input could not insert CSS rule:`,t)}}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`inputId`,`ref`,`inputRef`,`maxlength`,`textalign`,`pattern`,`inputmode`,`onComplete`,`pushPasswordManagerStrategy`,`class`,`children`,`autocomplete`,`disabled`,`value`,`onValueChange`,`pasteTransformer`]),Yt=w(`<div><!> <div><input/></div></div>`);function Xt(e,t){let i=l();_(t,!0);let o=S(t,`id`,19,()=>J(i)),s=S(t,`inputId`,19,()=>`${J(i)}-input`),c=S(t,`ref`,15,null),u=S(t,`inputRef`,15,null),f=S(t,`maxlength`,3,6),p=S(t,`textalign`,3,`left`),m=S(t,`inputmode`,3,`numeric`),g=S(t,`onComplete`,3,Ve),v=S(t,`pushPasswordManagerStrategy`,3,`increase-width`),y=S(t,`class`,3,``),b=S(t,`autocomplete`,3,`one-time-code`),x=S(t,`disabled`,3,!1),C=S(t,`value`,15,``),w=S(t,`onValueChange`,3,Ve),E=h(t,Jt),D=Wt.create({id:W(()=>o()),ref:W(()=>c(),e=>c(e)),inputRef:W(()=>u(),e=>u(e)),inputId:W(()=>s()),autocomplete:W(()=>b()),maxLength:W(()=>f()),textAlign:W(()=>p()),disabled:W(()=>x()),inputmode:W(()=>m()),pattern:W(()=>t.pattern),onComplete:W(()=>g()),value:W(()=>C(),e=>{C(e),w()(e)}),pushPasswordManagerStrategy:W(()=>v()),pasteTransformer:W(()=>t.pasteTransformer)}),O=P(()=>G(E,D.inputProps)),ee=P(()=>G(D.rootProps,{class:y()})),te=P(()=>G(D.inputWrapperProps,{}));var k=Yt();I(k,()=>({...n(ee)}));var A=d(k);B(A,()=>t.children??r,()=>D.snippetProps);var j=F(A,2);I(j,()=>({...n(te)}));var ne=d(j);I(ne,()=>({...n(O)}),void 0,void 0,void 0,void 0,!0),a(j),a(k),T(e,k),V()}var Zt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`cell`,`child`,`children`]),Qt=w(`<div><!></div>`);function $t(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,Zt),p=Gt.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e)),cell:W(()=>o.cell)}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=Qt();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var en=Xe({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),tn=new Te(`Tabs.Root`),nn=class e{static create(t){return tn.set(new e(t))}opts;attachment;rovingFocusGroup;#e=A(te([]));get triggerIds(){return n(this.#e)}set triggerIds(e){C(this.#e,e,!0)}valueToTriggerId=new Ge;valueToContentId=new Ge;constructor(e){this.opts=e,this.attachment=K(e.ref),this.rovingFocusGroup=new Ft({candidateAttr:en.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=P(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[en.root]:``,...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},rn=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#t=P(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[en.list]:``,"data-disabled":Ze(n(this.#e)),...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},an=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=A(0);#t=P(()=>this.root.opts.value.current===this.opts.value.current);#n=P(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=P(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),o(()=>{this.root.triggerIds.length,n(this.#t)||!this.root.opts.value.current?C(this.#e,0):C(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||n(this.#n)||this.#i()}onclick(e){n(this.#n)||this.#i()}onkeydown(e){if(!n(this.#n)){if(e.key===` `||e.key===`Enter`){e.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#a=P(()=>({id:this.opts.id.current,role:`tab`,"data-state":sn(n(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Ze(n(this.#n)),"aria-selected":Le(n(this.#t)),"aria-controls":n(this.#r),[en.trigger]:``,disabled:De(n(this.#n)),tabindex:n(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return n(this.#a)}set props(e){C(this.#a,e)}},on=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.value.current===this.opts.value.current);#t=P(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=P(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:De(!n(this.#e)),tabindex:0,"data-value":this.opts.value.current,"data-state":sn(n(this.#e)),"aria-labelledby":n(this.#t),"data-orientation":this.root.opts.orientation.current,[en.content]:``,...this.attachment}));get props(){return n(this.#n)}set props(e){C(this.#n,e)}};function sn(e){return e?`active`:`inactive`}var cn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),ln=w(`<div><!></div>`);function un(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=S(o,`value`,15,``),p=S(o,`onValueChange`,3,Ve),m=S(o,`orientation`,3,`horizontal`),g=S(o,`loop`,3,!0),v=S(o,`activationMode`,3,`automatic`),y=S(o,`disabled`,3,!1),b=h(o,cn),x=nn.create({id:W(()=>c()),value:W(()=>f(),e=>{f(e),p()(e)}),orientation:W(()=>m()),loop:W(()=>g()),activationMode:W(()=>v()),disabled:W(()=>y()),ref:W(()=>u(),e=>u(e))}),C=P(()=>G(b,x.props));var w=t(),E=e(w),D=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(C)})),T(r,i)},O=e=>{var t=ln();I(t,()=>({...n(C)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(E,e=>{o.child?e(D):e(O,-1)}),T(i,w),V()}var dn=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`]),fn=w(`<div><!></div>`);function pn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,dn),p=on.create({value:W(()=>o.value),id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=fn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var mn=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),hn=w(`<div><!></div>`);function gn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,mn),p=rn.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=hn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var _n=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),vn=w(`<button><!></button>`);function yn(i,o){let s=l();_(o,!0);let c=S(o,`disabled`,3,!1),u=S(o,`id`,19,()=>J(s)),f=S(o,`type`,3,`button`),p=S(o,`ref`,15,null),m=h(o,_n),g=an.create({id:W(()=>u()),disabled:W(()=>c()??!1),value:W(()=>o.value),ref:W(()=>p(),e=>p(e))}),v=P(()=>G(m,g.props,{type:f()}));var y=t(),b=e(y),x=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(v)})),T(r,i)},C=e=>{var t=vn();I(t,()=>({...n(v)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(b,e=>{o.child?e(x):e(C,-1)}),T(i,y),V()}var bn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xn=w(`<div><!></div>`);function Sn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,bn);var o=xn();I(o,e=>({"data-slot":`input-otp-group`,class:e,...i}),[()=>q(`rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`cell`,`class`]),wn=w(`<div class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"><div class="h-4 w-px animate-caret-blink bg-foreground duration-1000 h-4 w-px bg-foreground"></div></div>`),Tn=w(` <!>`,1);function En(r,a){_(a,!0);let o=S(a,`ref`,15,null),s=h(a,Cn);var c=t(),l=e(c);{let t=P(()=>q(`size-8 border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex items-center justify-center data-[active=true]:z-10`,a.class));R(l,()=>$t,(r,c)=>{c(r,k({get cell(){return a.cell},"data-slot":`input-otp-slot`,get class(){return n(t)}},()=>s,{get ref(){return o()},set ref(e){o(e)},children:(t,n)=>{m();var r=Tn(),o=e(r),s=F(o),c=e=>{var t=wn();T(e,t)};z(s,e=>{a.cell.hasFakeCaret&&e(c)}),M(()=>i(o,`${a.cell.char??``} `)),T(t,r)},$$slots:{default:!0}}))})}T(r,c),V()}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]);function On(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Dn);var c=t(),l=e(c);{let e=P(()=>q(`cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50`,i.class));R(l,()=>Xt,(t,r)=>{r(t,k({"data-slot":`input-otp`,spellcheck:!1,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var kn=w(`<div class="w-full flex items-center"><!></div>`);function An(r,i){_(i,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=S(i,`ref`,15,null),u=S(i,`mode`,11,`password`),f=S(i,`password`,15,``),m=S(i,`otp`,15,``);var h=kn(),g=d(h),v=e=>{Et(e,{id:`iam-password-input`,name:`password`,type:`password`,minlength:6,autocomplete:`current-password`,get placeholder(){return o().auth.password},class:`placeholder:text-sm`,get value(){return f()},set value(e){f(e)}})},y=r=>{var i=t(),a=e(i);{let r=(r,i)=>{let a=()=>(i?.()).cells;var o=t(),s=e(o);R(s,()=>Sn,(r,i)=>{i(r,{children:(r,i)=>{var o=t(),s=e(o);re(s,17,()=>a().slice(0,6),p,(r,i)=>{var a=t(),o=e(a);R(o,()=>En,(e,t)=>{t(e,{get cell(){return n(i)},class:`size-[40px] bg-background`})}),T(r,a)}),T(r,o)},$$slots:{default:!0}})}),T(r,o)};R(a,()=>On,(e,t)=>{t(e,{maxlength:6,get pattern(){return Vt},required:!0,get value(){return m()},set value(e){m(e)},children:r,$$slots:{default:!0}})})}T(r,i)};z(g,e=>{u()===`password`?e(v):e(y,-1)}),a(h),N(h,e=>l(e),()=>l()),T(r,h),V(),c()}var jn=w(`<!> <span class="sr-only"> </span>`,1),Mn=w(`<form><fieldset class="space-y-2"><!> <div class="space-y-2"><div class="flex items-center gap-2"><!> <!></div> <div class="text-sm text-muted-foreground px-1"><!></div></div></fieldset></form>`);function Nn(r,o){_(o,!0);let c=()=>b(X,`$dict`,l),[l,f]=L(),p=A(!1),m=A(``),h=A(``),v=A(``),y=A(null),S=A(`password`),w=A(void 0);async function E(){n(h).length===0?n(S)===`password`?await ee():await te():await D()}async function D(){C(p,!0);let e=o.account===void 0?await O():await be(o.account.id,{username:n(m),password:n(h)});C(p,!1),e instanceof Error&&await k()}async function O(){let e=await ve(n(m),n(h));return e instanceof Error||we(e)?.status===201&&o.oncreate?.(e),e}async function ee(){C(p,!0);let e=o.account===void 0?await fe(n(m)):await Se(o.account.id,n(m));C(p,!1),!(e instanceof Error)&&(C(S,`otp`),requestAnimationFrame(()=>j()))}async function te(){if(n(m).length===0){console.error(`username is required`);return}if(n(v).length!==6){await k();return}C(p,!0);let e=await pe(n(m),n(v));if(C(p,!1),e instanceof Error){C(v,``),await k();return}return we(e)?.status===201&&o.oncreate?.(e),e}async function k(){await n(w)?.shake(),j()}function j(){ue&&n(y)?.querySelector(`input`)?.focus()}var ne=Mn(),I=P(()=>je(E)),R=d(ne),re=d(R);{let e=P(()=>n(S)===`otp`||void 0);Et(re,{id:`iam-username-input`,name:`username`,type:`email`,autocomplete:`username`,required:!0,get disabled(){return n(e)},get autofocus(){return ue},get placeholder(){return c().auth.email},get value(){return n(m)},set value(e){C(m,e,!0)}})}var B=F(re,2),ie=d(B),ae=d(ie);N(Ot(ae,{class:`w-full`,children:(e,t)=>{An(e,{get mode(){return n(S)},get ref(){return n(y)},set ref(e){C(y,e,!0)},get password(){return n(h)},set password(e){C(h,e,!0)},get otp(){return n(v)},set otp(e){C(v,e,!0)}})},$$slots:{default:!0}}),e=>C(w,e,!0),()=>n(w));var oe=F(ae,2);U(oe,{size:`icon-lg`,type:`submit`,children:(t,r)=>{var a=jn(),o=e(a),s=e=>{Y(e,{})},l=e=>{Ct(e,{})};z(o,e=>{n(p)?e(s):e(l,-1)});var u=F(o,2),d=x(u,!0);M(()=>i(d,c().auth.login)),T(t,a)},$$slots:{default:!0}}),a(ie);var se=F(ie,2),ce=d(se),le=n=>{var r=t(),i=e(r);g(i,()=>c().auth.passwordBlank),T(n,r)},de=e=>{var t=u();M(()=>i(t,c().auth.otpInstructions)),T(e,t)};z(ce,e=>{n(S)===`password`?e(le):e(de,-1)}),a(se),a(B),a(R),a(ne),s(`submit`,ne,function(...e){n(I)?.apply(this,e)}),T(r,ne),V(),f()}var Pn=w(`<h2> </h2>`),Fn=w(`<!> <!>`,1);function In(r,a){_(a,!0);let o=()=>b(X,`$dict`,s),[s,c]=L();var l=t(),d=e(l);{let t=P(()=>q(`pt-4 gap-4 bg-background/75`,a.class));R(d,()=>xt,(r,s)=>{s(r,{get class(){return n(t)},children:(t,n)=>{var r=Fn(),s=e(r);R(s,()=>ht,(t,n)=>{n(t,{class:`gap-0`,children:(t,n)=>{var r=Fn(),a=e(r);R(a,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=Pn(),r=x(n,!0);M(()=>i(r,o().auth.passwordTitle)),T(e,n)},$$slots:{default:!0}})});var s=F(a,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,o().auth.passwordDescription)),T(e,n)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{Nn(e,{get account(){return a.account},get oncreate(){return a.oncreate}})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,l),V(),c()}function Ln(e){Nn(e,{})}var Rn=new Set([`$$slots`,`$$events`,`$$legacy`]);function zn(e,t){let n=h(t,Rn),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]];H(e,k({name:`shield-check`},()=>n,{get iconNode(){return r}}))}var Bn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vn(e,t){let n=h(t,Bn),r=[[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`}]];H(e,k({name:`shield-off`},()=>n,{get iconNode(){return r}}))}var Hn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Un=w(`<div><!></div>`);function Wn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Hn);var o=Un();I(o,e=>({"data-slot":`alert-description`,class:e,...i}),[()=>q(`text-sm text-balance text-muted-foreground md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Kn=w(`<div><!></div>`);function qn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Gn);var o=Kn();I(o,e=>({"data-slot":`alert-title`,class:e,...i}),[()=>q(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Jn=Re({base:`grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full`,variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}}),Yn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`variant`,`children`]),Xn=w(`<div><!></div>`);function Zn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`variant`,3,`default`),o=h(t,Yn);var s=Xn();I(s,e=>({"data-slot":`alert`,role:`alert`,class:e,...o}),[()=>q(Jn({variant:i()}),t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var Qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function $n(e,t){let n=h(t,Qn),r=[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]];H(e,k({name:`fingerprint-pattern`},()=>n,{get iconNode(){return r}}))}var er=w(`<!> `,1),tr=w(`<div class="flex flex-col items-center justify-center gap-2"><p> </p> <!></div>`);function nr(t,r){_(r,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=A(!1);async function u(){C(l,!0),await xe(),C(l,!1)}var f=tr(),p=d(f),m=x(p,!0),h=F(p,2);U(h,{id:`iam-passkey-login-button`,variant:`secondary`,onclick:u,children:(t,r)=>{var a=er(),s=e(a),c=e=>{Y(e,{})},u=e=>{$n(e,{})};z(s,e=>{n(l)?e(c):e(u,-1)});var d=F(s);M(()=>i(d,` ${o().auth.signin??``}`)),T(t,a)},$$slots:{default:!0}}),a(f),M(()=>i(m,o().auth.alreadyHaveAccount)),T(t,f),V(),c()}var rr=w(`<form><fieldset class="space-y-1"><div class="flex items-center gap-2"><!> <!></div></fieldset></form>`);function ir(r,i){_(i,!0);let o=()=>b(X,`$dict`,c),[c,l]=L(),u=P(()=>i.account?.name??``),f=A(!1);async function p(){let e=n(u).trim();if(e.length===0)return;C(f,!0);let t=await de(e,i.account?.id);C(f,!1),!(t instanceof Error)&&i.oncreate?.(t)}var m=rr(),h=P(()=>je(p)),g=d(m),v=d(g),y=d(v);Et(y,{id:`name`,type:`text`,get placeholder(){return o().auth.yourName},autocomplete:`given-name`,required:!0,get autofocus(){return ue},get value(){return n(u)},set value(e){C(u,e)}});var x=F(y,2);U(x,{id:`iam-passkey-create-button`,size:`icon-lg`,type:`submit`,children:(r,i)=>{var a=t(),o=e(a),s=e=>{Y(e,{})},c=e=>{Ct(e,{})};z(o,e=>{n(f)?e(s):e(c,-1)}),T(r,a)},$$slots:{default:!0}}),a(v),a(g),a(m),M(()=>g.disabled=i.disabled),s(`submit`,m,function(...e){n(h)?.apply(this,e)}),T(r,m),V(),l()}var ar=w(`<p> <a target="_blank" class="text-nowrap"> </a></p>`),or=w(`<h2> </h2>`),sr=w(`<!> <!>`,1),cr=w(`<!> <!> <!>`,1),lr=w(`<p> </p> <!>`,1),ur=w(`<div class="space-y-4"><!> <!></div>`);function dr(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),f=e=>{var t=ar(),n=d(t),r=F(n),o=x(r,!0);a(t),M(()=>{i(n,`${s().auth.passkeysDescription??``} `),y(r,`href`,p),i(o,s().auth.learnMore)}),T(e,t)},p=ge?`https://support.apple.com/en-us/102195`:`https://support.google.com/accounts/answer/13548313`;var h=ur(),g=d(h);{let r=P(()=>q(`gap-4 bg-background/75`,_e&&`pt-4`,o.class));R(g,()=>xt,(a,c)=>{c(a,{get class(){return n(r)},children:(n,r)=>{var a=sr(),c=e(a),l=n=>{var r=sr(),a=e(r);R(a,()=>ht,(n,r)=>{r(n,{class:`gap-0`,children:(n,r)=>{var a=t(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=or(),r=x(n,!0);M(()=>i(r,s().auth.signupTitle)),T(e,n)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})});var c=F(a,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{ir(e,{get account(){return o.account},get oncreate(){return o.oncreate}})},$$slots:{default:!0}})}),T(n,r)};z(c,e=>{_e&&e(l)});var d=F(c,2);R(d,()=>ft,(n,r)=>{r(n,{children:(n,r)=>{var a=t(),o=e(a),c=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);zn(a,{color:`green`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.betterSecurity)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(e,t)=>{t(e,{children:(e,t)=>{f(e)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)},l=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);Vn(a,{color:`red`,class:`animate-pulse`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.passkeysNotSupported)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(t,n)=>{n(t,{children:(t,n)=>{var r=lr(),a=e(r),o=x(a,!0),c=F(a,2);f(c),M(()=>i(o,s().auth.passkeysWarning)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)};z(o,e=>{_e?e(c):e(l,-1)}),T(n,a)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})})}var v=F(g,2),S=e=>{nr(e,{})};z(v,e=>{_e&&!o.account&&e(S)}),a(h),T(r,h),V(),l()}var fr=w(`<!> <!> `,1);function pr(t,n){_(n,!0);let r=()=>b(X,`$dict`,a),[a,o]=L();async function s(e){let t=e.currentTarget;t.disabled=!0,await xe(n.account.id),t.disabled=!1}U(t,{class:`w-full disabled:[&>.x-icon]:hidden [&>.x-spinner]:hidden disabled:[&>.x-spinner]:block`,onclick:s,children:(t,n)=>{var a=fr(),o=e(a);$n(o,{class:`size-5 x-icon`});var s=F(o,2);Y(s,{class:`x-spinner`});var c=F(s);M(()=>i(c,` ${r().auth.refresh.continue??``}`)),T(t,a)},$$slots:{default:!0}}),V(),o()}var mr=c(`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M19.84 10.2273C19.84 9.5182 19.7764 8.8364 19.6582 8.1818H10.24V12.05H15.6218C15.39 13.3 14.6855 14.3591 13.6264 15.0682V17.5773H16.8582C18.7491 15.8364 19.84 13.2727 19.84 10.2273Z" fill="#4285F4"></path><path d="M10.24 20C12.94 20 15.2036 19.1045 16.8581 17.5773L13.6263 15.0682C12.7309 15.6682 11.5854 16.0227 10.24 16.0227C7.6354 16.0227 5.4309 14.2636 4.6445 11.9H1.3036V14.4909C2.9491 17.7591 6.3309 20 10.24 20Z" fill="#34A853"></path><path d="M4.6445 11.9C4.4445 11.3 4.3309 10.6591 4.3309 10C4.3309 9.3409 4.4445 8.7 4.6445 8.1V5.5091H1.3036C0.6264 6.8591 0.24 8.3864 0.24 10C0.24 11.6136 0.6264 13.1409 1.3036 14.4909L4.6445 11.9Z" fill="#FBBC04"></path><path d="M10.24 3.9773C11.7081 3.9773 13.0263 4.4818 14.0627 5.4727L16.9309 2.6045C15.1991 0.9909 12.9354 0 10.24 0C6.3309 0 2.9491 2.2409 1.3036 5.5091L4.6445 8.1C5.4309 5.7364 7.6354 3.9773 10.24 3.9773Z" fill="#E94235"></path></svg>`);function hr(e,t){var n=mr();M(()=>j(n,0,O(t.class))),T(e,n)}var gr=c(`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="currentColor" viewBox="0 0 814 1000"><path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"></path></svg>`);function _r(e,t){_(t,!0);var n=gr(),r=x(n);M(e=>{j(n,0,e),y(r,`fill`,t.fill)},[()=>O(q(`size-5 -mt-[3px]`,t.class))]),T(e,n),V()}var vr={google:hr,apple:_r},yr=w(`<!> <!> <!>`,1);function br(t,i){_(i,!0);let a=P(()=>vr[i.idp]);async function o(e){let t=e.currentTarget;t.disabled=!0,await me(i.idp,i.account?.id),t.disabled=!1}{let s=P(()=>i.children?`default`:`icon`),c=P(()=>q(`disabled:[&_.x-icon]:hidden [&_.x-spinner]:hidden disabled:[&_.x-spinner]:block`,i.class));U(t,{variant:`outline`,get size(){return n(s)},onclick:o,get class(){return n(c)},children:(t,o)=>{var s=yr(),c=e(s);R(c,()=>n(a),(e,t)=>{t(e,{class:`x-icon`})});var l=F(c,2);Y(l,{class:`x-spinner`});var u=F(l,2);B(u,()=>i.children??r),T(t,s)},$$slots:{default:!0}})}V()}var xr=w(`<div class="flex gap-2"><!> <!></div>`);function Sr(e,t){_(t,!0);var n=xr(),r=d(n),i=e=>{br(e,{idp:`google`,get account(){return t.account}})};z(r,e=>{le.google.client&&e(i)});var o=F(r,2),s=e=>{br(e,{idp:`apple`,get account(){return t.account}})};z(o,e=>{le.apple.client&&e(s)}),a(n),T(e,n),V()}function Cr(e,t){_(t,!0);let n=()=>b(X,`$dict`,r),[r,a]=L(),o={google:`Google`,apple:`Apple`};br(e,{get idp(){return t.idp},class:`w-full`,children:(e,r)=>{m();var a=u();M(e=>i(a,e),[()=>n().auth.continueWith(o[t.idp])]),T(e,a)},$$slots:{default:!0}}),V(),a()}var wr=w(`<!> <!>`,1);function Tr(n,r){var a=t(),o=e(a);R(o,()=>xt,(n,a)=>{a(n,{class:`w-full`,children:(n,a)=>{var o=wr(),s=e(o);R(s,()=>ht,(t,n)=>{n(t,{children:(t,n)=>{var a=wr(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.title)),T(e,n)},$$slots:{default:!0}})});var s=F(o,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.description)),T(e,n)},$$slots:{default:!0}})}),T(t,a)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(n,i)=>{i(n,{class:`flex flex-col`,children:(n,i)=>{var a=t(),o=e(a);B(o,()=>r.action),T(n,a)},$$slots:{default:!0}})}),T(n,o)},$$slots:{default:!0}})}),T(n,a)}var Er=w(`<!> `,1),Dr=w(`<div class="flex flex-col items-center gap-4 w-full"><!> <!></div>`);function Or(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L();ee(()=>{o.method===null&&he()});var u=Dr(),f=d(u);{let r=n=>{var r=t(),i=e(r),a=e=>{pr(e,{get account(){return o.account}})},s=e=>{Ln(e,{})},c=e=>{Cr(e,{idp:`apple`})},l=e=>{Cr(e,{idp:`google`})};z(i,e=>{o.method===`passkey`?e(a):o.method===`password`?e(s,1):o.method===`apple`?e(c,2):o.method===`google`&&e(l,3)}),T(n,r)},i=P(()=>s().auth.refresh.description(o.account.name));Tr(f,{get title(){return s().auth.refresh.title},get description(){return n(i)},action:r,$$slots:{action:!0}})}var p=F(f,2);U(p,{variant:`outline`,get onclick(){return he},children:(t,n)=>{var r=Er(),a=e(r);tt(a,{});var o=F(a);M(()=>i(o,` ${s().auth.signout??``}`)),T(t,r)},$$slots:{default:!0}}),a(u),T(r,u),V(),l()}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=h(t,kr),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]];H(e,k({name:`at-sign`},()=>n,{get iconNode(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Mr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,jr);var s=t(),c=e(s);{let e=P(()=>q(`text-sm flex-1 outline-none`,i.class));R(c,()=>pn,(t,r)=>{r(t,k({"data-slot":`tabs-content`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Pr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,Nr);var s=t(),c=e(s);{let e=P(()=>q(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,i.class));R(c,()=>yn,(t,r)=>{r(t,k({"data-slot":`tabs-trigger`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Ir(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Fr);var c=t(),l=e(c);{let e=P(()=>q(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,i.class));R(l,()=>un,(t,r)=>{r(t,k({"data-slot":`tabs`,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var Lr=Re({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,variants:{variant:{default:`cn-tabs-list-variant-default bg-muted`,line:`cn-tabs-list-variant-line gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),Rr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function zr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`variant`,3,`default`),s=h(i,Rr);var c=t(),l=e(c);{let e=P(()=>q(Lr({variant:o()}),i.class));R(l,()=>gn,(t,r)=>{r(t,k({"data-slot":`tabs-list`,get"data-variant"(){return o()},get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,c),V()}var Br=w(`<!> `,1),Vr=w(`<!> <!>`,1),Hr=w(`<div class="flex justify-between gap-2"><!> <!></div> <!> <!>`,1);function Ur(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),u=A(null);function f(e){requestAnimationFrame(()=>{n(u)?.querySelector(`[data-value="${e}"] input[autofocus]`)?.focus()})}let p=A(`passkey`);ee(()=>{C(p,_e?`passkey`:`password`,!0)});var m=t(),h=e(m);{let t=P(()=>q(`w-full`,o.class));R(h,()=>Ir,(r,c)=>{c(r,{get class(){return n(t)},onValueChange:f,get value(){return n(p)},set value(e){C(p,e,!0)},get ref(){return n(u)},set ref(e){C(u,e,!0)},children:(t,n)=>{var r=Hr(),c=e(r),l=d(c);R(l,()=>zr,(t,n)=>{n(t,{children:(t,n)=>{var r=Vr(),a=e(r);R(a,()=>Pr,(t,n)=>{n(t,{value:`passkey`,"data-marker":`passkey-tab`,children:(t,n)=>{var r=Br(),a=e(r);$n(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.passkey??``}`)),T(t,r)},$$slots:{default:!0}})});var o=F(a,2);R(o,()=>Pr,(t,n)=>{n(t,{value:`password`,id:`iam-email-tab`,children:(t,n)=>{var r=Br(),a=e(r);Ar(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.email??``}`)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),Sr(F(l,2),{get account(){return o.account}}),a(c);var u=F(c,2);R(u,()=>Mr,(e,t)=>{t(e,{value:`passkey`,children:(e,t)=>{dr(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`passkey`)})},$$slots:{default:!0}})});var f=F(u,2);R(f,()=>Mr,(e,t)=>{t(e,{value:`password`,children:(e,t)=>{In(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`password`)})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,m),V(),l()}var Wr=w(`<div class="flex items-center justify-center h-screen"><!></div>`),Gr=w(`<div class="flex w-full max-w-sm items-center justify-center pt-[14vh] px-4 mx-auto"><!></div>`);function Kr(r,i){_(i,!0);let o=()=>b(ae,`$iam`,f),s=()=>b(oe,`$method`,f),c=()=>b(Ce,`$authenticated`,f),l=()=>b(se,`$greeting`,f),u=()=>b(ce,`$processing`,f),[f,p]=L(),m=r=>{var a=t(),c=e(a),l=e=>{Or(e,{get account(){return o()},get method(){return s()}})},u=e=>{{let t=P(()=>q(`scale-0 transition-transform`,`scale-100`));Ur(e,{get class(){return n(t)},get account(){return i.account},get oncreate(){return i.oncreate}})}};z(c,e=>{o()?e(l):e(u,-1)}),T(r,a)};var h=t(),g=e(h),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=e=>{var t=Wr();Y(d(t),{}),a(t),T(e,t)},x=n=>{var r=t(),a=e(r);B(a,()=>i.screen,()=>({authentication:m})),T(n,r)},S=e=>{var t=Gr(),n=d(t);m(n),a(t),T(e,t)};z(g,e=>{c()?e(v):l()||u()?e(y,1):i.screen?e(x,2):e(S,-1)}),T(r,h),V(),p()}var qr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jr(e,t){let n=h(t,qr),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];H(e,k({name:`check`},()=>n,{get iconNode(){return r}}))}var Yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xr(e,t){let n=h(t,Yr),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];H(e,k({name:`copy`},()=>n,{get iconNode(){return r}}))}var Zr=new Set([`$$slots`,`$$events`,`$$legacy`,`text`,`label`,`disabled`,`oncopy`,`icon`,`class`]),Qr=w(`<!> <!>`,1);function $r(r,a){_(a,!0);let o=h(a,Zr),s=A(!1),c=A(!1),l=!navigator.clipboard;async function d(){if(!n(s)){if(C(c,!0),typeof ClipboardItem>`u`){let e=typeof a.text==`function`?await a.text():a.text;if(e===null)return;await navigator.clipboard.writeText(e)}else{let e=f(a.text);await navigator.clipboard.write([e])}C(c,!1),C(s,!0),a.oncopy?.(),setTimeout(()=>C(s,!1),2e3)}}function f(e){return typeof e==`function`?p(e):new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`})})}function p(e){return new ClipboardItem({"text/plain":e().then(e=>new Blob([e??``],{type:`text/plain`}))})}{let f=P(()=>q(a.class)),p=P(()=>a.disabled||l||n(c));U(r,k({get class(){return n(f)},onclick:d,get disabled(){return n(p)}},()=>o,{children:(r,o)=>{var l=Qr(),d=e(l),f=e=>{Jr(e,{class:`text-constructive`,strokeWidth:3})},p=e=>{Y(e,{})},m=n=>{var r=t(),i=e(r);B(i,()=>a.icon),T(n,r)},h=e=>{Xr(e,{})};z(d,e=>{n(s)?e(f):n(c)?e(p,1):a.icon===void 0?e(h,-1):e(m,2)});var g=F(d,2),_=e=>{var t=u();M(()=>i(t,a.label)),T(e,t)};z(g,e=>{a.label!==null&&e(_)}),T(r,l)},$$slots:{default:!0}}))}V()}function ei(e,t){return!!(e.dev!==void 0&&e.dev===!1||e.beta!==void 0&&e.beta===ti()||e.debug!==void 0&&e.debug===ni()||e.role!==void 0&&t?.roles!==void 0&&ri(t.roles,e.role))}function ti(){return typeof window<`u`&&window.location.hostname.startsWith(`beta.`)}function ni(){return ti()}function ri(e,t){for(let n of e)if(n===t||t.startsWith(n+`:`))return!0;return!1}var ii=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`denied`]),ai=w(`<div class="flex justify-center pt-[14vh]"><!></div>`);function oi(r,i){_(i,!0);let o=()=>b(ae,`$account`,c),s=()=>b(X,`$dict`,c),[c,l]=L(),u=h(i,ii),f=P(()=>ei(u,o())),p=P(()=>o()?.id??``);var m=t(),g=e(m),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=n=>{var r=t(),a=e(r);B(a,()=>i.denied),T(n,r)},x=e=>{var t=ai(),r=d(t);{let e=P(()=>n(p).slice(0,8));$r(r,{get text(){return n(p)},get label(){return n(e)},get"aria-label"(){return s().auth.copyId},variant:`outline`,class:`font-mono`})}a(t),T(e,t)};z(g,e=>{n(f)?e(v):i.denied===void 0?n(p)!==``&&e(x,2):e(y,1)}),T(r,m),V(),l()}var si=E(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Q=E((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),ci=E((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),li=E(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ui=E(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),di=E((e=>{var t=Q().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),fi=E((e=>{var t=Q().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),pi=E((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),mi=E((e=>{var t=ci(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),hi=E((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),gi=E((e=>{var t=hi();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_i=E(((e,t)=>{var n=gi();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),vi=E((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),yi=E((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
1
+ import{$ as e,A as t,B as n,Dt as r,E as i,Et as a,J as o,L as s,M as c,N as l,P as u,Q as d,R as f,S as p,Tt as m,a as h,b as g,bt as _,c as v,d as y,dt as b,et as x,i as S,it as C,j as w,k as T,kt as E,l as D,m as O,n as ee,nt as te,o as k,ot as A,p as j,pt as ne,q as M,s as N,st as P,tt as F,u as I,ut as L,v as R,w as z,x as re,y as B,yt as V}from"./CcD_ISxM.js";import"./xhVW4qkk.js";import"./xihTtKlq.js";import{A as ie,C as ae,D as oe,E as se,O as ce,_ as le,a as ue,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as H,l as _e,m as ve,n as ye,p as be,s as xe,u as Se,w as Ce,x as we}from"./D3iZS-NA.js";import{A as Te,B as Ee,C as De,D as Oe,E as ke,F as Ae,G as je,H as U,I as W,L as Me,M as G,N as Ne,O as Pe,P as Fe,R as Ie,S as Le,T as K,U as Re,V as ze,W as q,b as Be,d as Ve,f as He,g as Ue,h as We,j as Ge,k as Ke,m as qe,p as Je,u as J,v as Ye,w as Xe,x as Ze,y as Qe,z as $e}from"./BRMEqzGy.js";var et=new Set([`$$slots`,`$$events`,`$$legacy`]);function tt(e,t){let n=h(t,et),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];H(e,k({name:`log-out`},()=>n,{get iconNode(){return r}}))}var nt=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`role`,`name`,`color`,`stroke`,`aria-label`]);function Y(e,t){_(t,!0);let r=S(t,`role`,3,`status`),i=S(t,`aria-label`,3,`Loading`),a=h(t,nt);{let o=P(()=>t.name===null?void 0:t.name),s=P(()=>t.color===null?void 0:t.color),c=P(()=>t.stroke===null?void 0:t.stroke),l=P(()=>q(`size-4 animate-spin`,t.class));ie(e,k({get role(){return r()},get name(){return n(o)},get color(){return n(s)},get stroke(){return n(c)},get"aria-label"(){return i()},get class(){return n(l)}},()=>a))}V()}var rt={"en-US":{auth:{signupTitle:`One-tap sign-up`,passwordTitle:`Hop in with password`,passwordDescription:`Create an account or sign in`,passkey:`Passkeys`,email:`Email`,alreadyHaveAccount:`Already have an account?`,betterSecurity:`Better security`,passkeysNotSupported:`Passkeys not supported`,passkeysWarning:`Your browser does not respect your privacy and security.`,learnMore:`Learn more`,passwordBlank:`Leave password blank <nobr>to receive</nobr> <nobr>a one-time</nobr> passcode.`,otpInstructions:`Enter the code sent to your email. It expires in 5 minutes.`,continueWith:e=>`Continue with ${e}`,passkeysDescription:`Passkeys are safer than passwords, easier to use, and can’t be stolen.`,yourName:`Your name`,password:`Password`,refresh:{description:e=>`${e?e+`, for`:`For`} security reasons, your credentials have expired. Please log in again to continue.`,title:`Welcome back`,continue:`Continue`},signout:`Sign out`,login:`Log In`,signin:`Sign In`,copyId:`Copy account ID`},credentials:{connect:`Connect`,email:{title:`Email`,description:`Connect your email address`},google:{title:`Google`,description:`Connect your Google account`},apple:{title:`Apple`,description:`Connect your Apple ID`},passkeys:{title:`Passkeys`,tagline:`Sign in faster with a passkey`,create:`Create`,manage:`Manage`,collapse:`Collapse`,add:`Enter passkey name`,delete:`Hold to delete`,unknown:`Unknown`,count:e=>{let t={one:`{n} passkey`,other:`{n} passkeys`},n=`en-US`,r=new Intl.PluralRules(n).select(e),i=t;return(i[r]??i.other).replace(/{n}/g,new Intl.NumberFormat(n).format(e))},meta:(e,t)=>`Added ${e} · Used ${t}`,duplicate:`This device already has a passkey for your account`,failed:`Could not create the passkey. Please try again.`},transfer:{action:`Sign in on another device`,title:`Scan to sign in`,description:`Use your other device to scan this code and sign in.`,done:`Done`}}}},X=ne(ye,e=>rt[e]),it=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),at=w(`<div><!></div>`);function ot(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,it);var o=at();I(o,e=>({"data-slot":`card-content`,class:e,...i}),[()=>q(`px-(--card-spacing)`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var st=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ct=w(`<p><!></p>`);function lt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,st);var o=ct();I(o,e=>({"data-slot":`card-description`,class:e,...i}),[()=>q(`text-sm text-muted-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var ut=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),dt=w(`<div><!></div>`);function ft(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,ut);var o=dt();I(o,e=>({"data-slot":`card-footer`,class:e,...i}),[()=>q(`rounded-b-xl border-t bg-muted/50 p-(--card-spacing) flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var pt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),mt=w(`<div><!></div>`);function ht(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,pt);var o=mt();I(o,e=>({"data-slot":`card-header`,class:e,...i}),[()=>q(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var gt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),_t=w(`<div><!></div>`);function vt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,gt);var o=_t();I(o,e=>({"data-slot":`card-title`,class:e,...i}),[()=>q(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var yt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),bt=w(`<div><!></div>`);function xt(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`size`,3,`default`),o=h(t,yt);var s=bt();I(s,e=>({"data-slot":`card`,"data-size":i(),class:e,...o}),[()=>q(`gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var St=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ct(e,t){let n=h(t,St),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]];H(e,k({name:`arrow-right`},()=>n,{get iconNode(){return r}}))}var wt=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),Tt=w(`<input/>`);function Et(n,r){_(r,!0);let i=S(r,`ref`,15,null),a=S(r,`value`,15),o=S(r,`files`,15),s=S(r,`data-slot`,3,`input`),c=h(r,wt);var l=t(),u=e(l),d=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:`file`,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),v(t,o),D(t,a),T(e,t)},f=e=>{var t=Tt();I(t,e=>({"data-slot":s(),class:e,type:r.type,...c}),[()=>q(`h-8 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:bg-input/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,r.class)],void 0,void 0,void 0,!0),N(t,e=>i(e),()=>i()),D(t,a),T(e,t)};z(u,e=>{r.type===`file`?e(d):e(f,-1)}),T(n,l),V()}var Dt=w(`<div><!></div>`);function Ot(e,t){_(t,!0);let r=A(!1);async function i(){C(r,!0),await new Promise(e=>setTimeout(e,500)),C(r,!1)}var o={shake:i},s=Dt(),c=d(s);return B(c,()=>t.children),a(s),M(()=>j(s,1,O([t.class,n(r)&&`shake`]),`svelte-alh7mr`)),T(e,s),V(o)}function Z(e){let t=A(te(e));return{[Ne]:!0,[$e]:!0,get current(){return n(t)},set current(e){C(t,e,!0)}}}Z.from=Ae,Z.with=W,Z.flatten=Fe,Z.readonly=ze,Z.isBox=Me,Z.isWritableBox=Ie;function kt(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var At=[Je,Be,Ye],jt=[Ue,Qe,`End`];[...At,...jt];function Mt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qe:We,vertical:Je}[t]}function Nt(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?We:qe,vertical:Ue}[t]}function Pt(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:Mt(e,t),prevKey:Nt(e,t)}}var Ft=class{#e;#t=Z(null);constructor(e){this.#e=e}getCandidateNodes(){return this.#e.rootNode.current?this.#e.candidateSelector?Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector)):this.#e.candidateAttr?Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=Pt(kt(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Ye]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?We:Je,t=s===`ArrowUp`?qe:Ue;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${e}`);t&&He(t)&&t.focus()}},It=18,Lt=40,Rt=`${Lt}px`,zt=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Bt({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:i,domContext:a}){let s=A(!1),c=A(!1),l=A(!1);function u(){let e=r.current;return e!==`none`&&e===`increase-width`&&n(s)&&n(c)}function d(){let i=e.current,o=t.current;if(!i||!o||n(l)||r.current===`none`)return;let c=i,u=c.getBoundingClientRect().left+c.offsetWidth,d=c.getBoundingClientRect().top+c.offsetHeight/2,f=u-It,p=d;(a.querySelectorAll(zt).length!==0||a.getDocument().elementFromPoint(f,p)!==i)&&(C(s,!0),C(l,!0))}return o(()=>{let t=e.current;if(!t||r.current===`none`)return;function n(){let e=Oe(t).innerWidth-t.getBoundingClientRect().right;C(c,e>=Lt)}n();let i=setInterval(n,1e3);return()=>{clearInterval(i)}}),o(()=>{let e=i.current||a.getActiveElement()===t.current;if(r.current===`none`||!e)return;let n=setTimeout(d,0),o=setTimeout(d,2e3),s=setTimeout(d,5e3),c=setTimeout(()=>{C(l,!0)},6e3);return()=>{clearTimeout(n),clearTimeout(o),clearTimeout(s),clearTimeout(c)}}),{get hasPwmBadge(){return n(s)},get willPushPwmBadge(){return u()},PWM_BADGE_SPACE_WIDTH:Rt}}var Vt=`^\\d+$`,Ht=Xe({component:`pin-input`,parts:[`root`,`cell`]}),Ut=[`Backspace`,`Delete`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`,`Enter`,`Tab`,`Shift`,`Control`,`Meta`],Wt=class e{static create(t){return new e(t)}opts;attachment;inputAttachment;#e=A(!1);#t=Ee(!1);#n=A(null);#r=A(null);#i=new Pe(()=>this.opts.value.current??``);#a=P(()=>typeof this.opts.pattern.current==`string`?new RegExp(this.opts.pattern.current):this.opts.pattern.current);#o=A(te({prev:[null,null,`none`],willSyntheticBlur:!1}));#s;#c;domContext;constructor(e){this.opts=e,this.attachment=K(this.opts.ref),this.inputAttachment=K(this.opts.inputRef),this.domContext=new ke(e.ref),this.#c={value:this.opts.value,isIOS:typeof window<`u`&&window?.CSS?.supports(`-webkit-touch-callout`,`none`)},this.#s=Bt({containerRef:this.opts.ref,inputRef:this.opts.inputRef,isFocused:this.#t,pushPasswordManagerStrategy:this.opts.pushPasswordManagerStrategy,domContext:this.domContext}),ee(()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;this.#c.value.current!==e.value&&(this.opts.value.current=e.value),n(this.#o).prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let r=f(this.domContext.getDocument(),`selectionchange`,this.#m,{capture:!0});this.#m(),this.domContext.getActiveElement()===e&&(this.#t.current=!0),this.domContext.getElementById(`pin-input-style`)||this.#p();let i=()=>{t&&t.style.setProperty(`--bits-pin-input-root-height`,`${e.clientHeight}px`)};i();let a=new ResizeObserver(i);return a.observe(e),()=>{r(),a.disconnect()}}),Ke([()=>this.opts.value.current,()=>this.opts.inputRef.current],()=>{Kt(()=>{let e=this.opts.inputRef.current;if(!e)return;e.dispatchEvent(new Event(`input`));let t=e.selectionStart,r=e.selectionEnd,i=e.selectionDirection??`none`;t!==null&&r!==null&&(C(this.#n,t,!0),C(this.#r,r,!0),n(this.#o).prev=[t,r,i])},this.domContext)}),o(()=>{let e=this.opts.value.current,t=this.#i.current,n=this.opts.maxLength.current,r=this.opts.onComplete.current;t!==void 0&&e!==t&&t.length<n&&e.length===n&&r(e)})}onkeydown=e=>{let t=e.key;Ut.includes(t)||e.ctrlKey||e.metaKey||t&&n(this.#a)&&!n(this.#a).test(t)&&e.preventDefault()};#l=P(()=>({position:`relative`,cursor:this.opts.disabled.current?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}));#u=P(()=>({id:this.opts.id.current,[Ht.root]:``,style:n(this.#l),...this.attachment}));get rootProps(){return n(this.#u)}set rootProps(e){C(this.#u,e)}#d=P(()=>({style:{position:`absolute`,inset:0,pointerEvents:`none`}}));get inputWrapperProps(){return n(this.#d)}set inputWrapperProps(e){C(this.#d,e)}#f=P(()=>({position:`absolute`,inset:0,width:this.#s.willPushPwmBadge?`calc(100% + ${this.#s.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:this.#s.willPushPwmBadge?`inset(0 ${this.#s.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:this.opts.textAlign.current,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--bits-pin-input-root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}));#p(){let e=this.domContext.getDocument(),t=e.createElement(`style`);if(t.id=`pin-input-style`,e.head.appendChild(t),t.sheet){let e=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;qt(t.sheet,`[data-pin-input-input]::selection { background: transparent !important; color: transparent !important; }`),qt(t.sheet,`[data-pin-input-input]:autofill { ${e} }`),qt(t.sheet,`[data-pin-input-input]:-webkit-autofill { ${e} }`),qt(t.sheet,`@supports (-webkit-touch-callout: none) { [data-pin-input-input] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),qt(t.sheet,`[data-pin-input-input] + * { pointer-events: all !important; }`)}}#m=()=>{let e=this.opts.inputRef.current,t=this.opts.ref.current;if(!e||!t)return;if(this.domContext.getActiveElement()!==e){C(this.#n,null),C(this.#r,null);return}let r=e.selectionStart,i=e.selectionEnd,a=e.selectionDirection??`none`,o=e.maxLength,s=e.value,c=n(this.#o).prev,l=-1,u=-1,d;if(s.length!==0&&r!==null&&i!==null){let e=r===i,t=r===s.length&&s.length<o;if(e&&!t){let e=r;if(e===0)l=0,u=1,d=`forward`;else if(e===o)l=e-1,u=e,d=`backward`;else if(o>1&&s.length>1){let t=0;if(c[0]!==null&&c[1]!==null){d=e<c[1]?`backward`:`forward`;let n=c[0]===c[1]&&c[0]<o;d===`backward`&&!n&&(t=-1)}l=t+e,u=t+e+1}}l!==-1&&u!==-1&&l!==u&&this.opts.inputRef.current?.setSelectionRange(l,u,d)}let f=l===-1?r:l,p=u===-1?i:u,m=d??a;C(this.#n,f,!0),C(this.#r,p,!0),n(this.#o).prev=[f,p,m]};oninput=e=>{let t=e.currentTarget.value.slice(0,this.opts.maxLength.current);if(t.length>0&&n(this.#a)&&!n(this.#a).test(t)){e.preventDefault();return}typeof this.#i.current==`string`&&t.length<this.#i.current.length&&this.domContext.getDocument().dispatchEvent(new Event(`selectionchange`)),this.opts.value.current=t};onfocus=e=>{let t=this.opts.inputRef.current;if(t){let e=Math.min(t.value.length,this.opts.maxLength.current-1),n=t.value.length;t.setSelectionRange(e,n),C(this.#n,e,!0),C(this.#r,n,!0)}this.#t.current=!0};onpaste=e=>{let t=this.opts.inputRef.current;if(!t)return;let r=e=>{let n=t.selectionStart===null?void 0:t.selectionStart,r=t.selectionEnd===null?void 0:t.selectionEnd,i=n!==r,a=this.opts.value.current;return(i?a.slice(0,n)+e+a.slice(r):a.slice(0,n)+e+a.slice(n)).slice(0,this.opts.maxLength.current)},i=e=>e.length>0&&n(this.#a)&&!n(this.#a).test(e);if(!this.opts.pasteTransformer?.current&&(!this.#c.isIOS||!e.clipboardData||!t)){i(r(e.clipboardData?.getData(`text/plain`)))&&e.preventDefault();return}let a=e.clipboardData?.getData(`text/plain`)??``,o=this.opts.pasteTransformer?.current?this.opts.pasteTransformer.current(a):a;e.preventDefault();let s=r(o);if(i(s))return;t.value=s,this.opts.value.current=s;let c=Math.min(s.length,this.opts.maxLength.current-1),l=s.length;t.setSelectionRange(c,l),C(this.#n,c,!0),C(this.#r,l,!0)};onmouseover=e=>{C(this.#e,!0)};onmouseleave=e=>{C(this.#e,!1)};onblur=e=>{if(n(this.#o).willSyntheticBlur){n(this.#o).willSyntheticBlur=!1;return}this.#t.current=!1};#h=P(()=>({id:this.opts.inputId.current,style:n(this.#f),autocomplete:this.opts.autocomplete.current||`one-time-code`,"data-pin-input-input":``,"data-pin-input-input-mss":n(this.#n),"data-pin-input-input-mse":n(this.#r),inputmode:this.opts.inputmode.current,pattern:n(this.#a)?.source,maxlength:this.opts.maxLength.current,value:this.opts.value.current,disabled:De(this.opts.disabled.current),onpaste:this.onpaste,oninput:this.oninput,onkeydown:this.onkeydown,onmouseover:this.onmouseover,onmouseleave:this.onmouseleave,onfocus:this.onfocus,onblur:this.onblur,...this.inputAttachment}));get inputProps(){return n(this.#h)}set inputProps(e){C(this.#h,e)}#g=P(()=>Array.from({length:this.opts.maxLength.current}).map((e,t)=>{let r=this.#t.current&&n(this.#n)!==null&&n(this.#r)!==null&&(n(this.#n)===n(this.#r)&&t===n(this.#n)||t>=n(this.#n)&&t<n(this.#r)),i=this.opts.value.current[t]===void 0?null:this.opts.value.current[t];return{char:i,isActive:r,hasFakeCaret:r&&i===null}}));#_=P(()=>({cells:n(this.#g),isFocused:this.#t.current,isHovering:n(this.#e)}));get snippetProps(){return n(this.#_)}set snippetProps(e){C(this.#_,e)}},Gt=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=K(this.opts.ref)}#e=P(()=>({id:this.opts.id.current,[Ht.cell]:``,"data-active":this.opts.cell.current.isActive?``:void 0,"data-inactive":this.opts.cell.current.isActive?void 0:``,...this.attachment}));get props(){return n(this.#e)}set props(e){C(this.#e,e)}};function Kt(e,t){return[t.setTimeout(e,0),t.setTimeout(e,10),t.setTimeout(e,50)]}function qt(e,t){try{e.insertRule(t)}catch{console.error(`pin input could not insert CSS rule:`,t)}}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`inputId`,`ref`,`inputRef`,`maxlength`,`textalign`,`pattern`,`inputmode`,`onComplete`,`pushPasswordManagerStrategy`,`class`,`children`,`autocomplete`,`disabled`,`value`,`onValueChange`,`pasteTransformer`]),Yt=w(`<div><!> <div><input/></div></div>`);function Xt(e,t){let i=l();_(t,!0);let o=S(t,`id`,19,()=>J(i)),s=S(t,`inputId`,19,()=>`${J(i)}-input`),c=S(t,`ref`,15,null),u=S(t,`inputRef`,15,null),f=S(t,`maxlength`,3,6),p=S(t,`textalign`,3,`left`),m=S(t,`inputmode`,3,`numeric`),g=S(t,`onComplete`,3,Ve),v=S(t,`pushPasswordManagerStrategy`,3,`increase-width`),y=S(t,`class`,3,``),b=S(t,`autocomplete`,3,`one-time-code`),x=S(t,`disabled`,3,!1),C=S(t,`value`,15,``),w=S(t,`onValueChange`,3,Ve),E=h(t,Jt),D=Wt.create({id:W(()=>o()),ref:W(()=>c(),e=>c(e)),inputRef:W(()=>u(),e=>u(e)),inputId:W(()=>s()),autocomplete:W(()=>b()),maxLength:W(()=>f()),textAlign:W(()=>p()),disabled:W(()=>x()),inputmode:W(()=>m()),pattern:W(()=>t.pattern),onComplete:W(()=>g()),value:W(()=>C(),e=>{C(e),w()(e)}),pushPasswordManagerStrategy:W(()=>v()),pasteTransformer:W(()=>t.pasteTransformer)}),O=P(()=>G(E,D.inputProps)),ee=P(()=>G(D.rootProps,{class:y()})),te=P(()=>G(D.inputWrapperProps,{}));var k=Yt();I(k,()=>({...n(ee)}));var A=d(k);B(A,()=>t.children??r,()=>D.snippetProps);var j=F(A,2);I(j,()=>({...n(te)}));var ne=d(j);I(ne,()=>({...n(O)}),void 0,void 0,void 0,void 0,!0),a(j),a(k),T(e,k),V()}var Zt=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`cell`,`child`,`children`]),Qt=w(`<div><!></div>`);function $t(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,Zt),p=Gt.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e)),cell:W(()=>o.cell)}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=Qt();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var en=Xe({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),tn=new Te(`Tabs.Root`),nn=class e{static create(t){return tn.set(new e(t))}opts;attachment;rovingFocusGroup;#e=A(te([]));get triggerIds(){return n(this.#e)}set triggerIds(e){C(this.#e,e,!0)}valueToTriggerId=new Ge;valueToContentId=new Ge;constructor(e){this.opts=e,this.attachment=K(e.ref),this.rovingFocusGroup=new Ft({candidateAttr:en.trigger,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=P(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[en.root]:``,...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},rn=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref)}#t=P(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[en.list]:``,"data-disabled":Ze(n(this.#e)),...this.attachment}));get props(){return n(this.#t)}set props(e){C(this.#t,e)}},an=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=A(0);#t=P(()=>this.root.opts.value.current===this.opts.value.current);#n=P(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=P(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),o(()=>{this.root.triggerIds.length,n(this.#t)||!this.root.opts.value.current?C(this.#e,0):C(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||n(this.#n)||this.#i()}onclick(e){n(this.#n)||this.#i()}onkeydown(e){if(!n(this.#n)){if(e.key===` `||e.key===`Enter`){e.preventDefault(),this.#i();return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e)}}#a=P(()=>({id:this.opts.id.current,role:`tab`,"data-state":sn(n(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Ze(n(this.#n)),"aria-selected":Le(n(this.#t)),"aria-controls":n(this.#r),[en.trigger]:``,disabled:De(n(this.#n)),tabindex:n(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return n(this.#a)}set props(e){C(this.#a,e)}},on=class e{static create(t){return new e(t,tn.get())}opts;root;attachment;#e=P(()=>this.root.opts.value.current===this.opts.value.current);#t=P(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=K(e.ref),Ke([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=P(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:De(!n(this.#e)),tabindex:0,"data-value":this.opts.value.current,"data-state":sn(n(this.#e)),"aria-labelledby":n(this.#t),"data-orientation":this.root.opts.orientation.current,[en.content]:``,...this.attachment}));get props(){return n(this.#n)}set props(e){C(this.#n,e)}};function sn(e){return e?`active`:`inactive`}var cn=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),ln=w(`<div><!></div>`);function un(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=S(o,`value`,15,``),p=S(o,`onValueChange`,3,Ve),m=S(o,`orientation`,3,`horizontal`),g=S(o,`loop`,3,!0),v=S(o,`activationMode`,3,`automatic`),y=S(o,`disabled`,3,!1),b=h(o,cn),x=nn.create({id:W(()=>c()),value:W(()=>f(),e=>{f(e),p()(e)}),orientation:W(()=>m()),loop:W(()=>g()),activationMode:W(()=>v()),disabled:W(()=>y()),ref:W(()=>u(),e=>u(e))}),C=P(()=>G(b,x.props));var w=t(),E=e(w),D=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(C)})),T(r,i)},O=e=>{var t=ln();I(t,()=>({...n(C)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(E,e=>{o.child?e(D):e(O,-1)}),T(i,w),V()}var dn=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`]),fn=w(`<div><!></div>`);function pn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,dn),p=on.create({value:W(()=>o.value),id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=fn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var mn=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),hn=w(`<div><!></div>`);function gn(i,o){let s=l();_(o,!0);let c=S(o,`id`,19,()=>J(s)),u=S(o,`ref`,15,null),f=h(o,mn),p=rn.create({id:W(()=>c()),ref:W(()=>u(),e=>u(e))}),m=P(()=>G(f,p.props));var g=t(),v=e(g),y=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(m)})),T(r,i)},b=e=>{var t=hn();I(t,()=>({...n(m)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(v,e=>{o.child?e(y):e(b,-1)}),T(i,g),V()}var _n=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),vn=w(`<button><!></button>`);function yn(i,o){let s=l();_(o,!0);let c=S(o,`disabled`,3,!1),u=S(o,`id`,19,()=>J(s)),f=S(o,`type`,3,`button`),p=S(o,`ref`,15,null),m=h(o,_n),g=an.create({id:W(()=>u()),disabled:W(()=>c()??!1),value:W(()=>o.value),ref:W(()=>p(),e=>p(e))}),v=P(()=>G(m,g.props,{type:f()}));var y=t(),b=e(y),x=r=>{var i=t(),a=e(i);B(a,()=>o.child,()=>({props:n(v)})),T(r,i)},C=e=>{var t=vn();I(t,()=>({...n(v)}));var i=d(t);B(i,()=>o.children??r),a(t),T(e,t)};z(b,e=>{o.child?e(x):e(C,-1)}),T(i,y),V()}var bn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),xn=w(`<div><!></div>`);function Sn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,bn);var o=xn();I(o,e=>({"data-slot":`input-otp-group`,class:e,...i}),[()=>q(`rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 flex items-center`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`cell`,`class`]),wn=w(`<div class="cn-input-otp-caret pointer-events-none absolute inset-0 flex items-center justify-center"><div class="h-4 w-px animate-caret-blink bg-foreground duration-1000 h-4 w-px bg-foreground"></div></div>`),Tn=w(` <!>`,1);function En(r,a){_(a,!0);let o=S(a,`ref`,15,null),s=h(a,Cn);var c=t(),l=e(c);{let t=P(()=>q(`size-8 border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex items-center justify-center data-[active=true]:z-10`,a.class));R(l,()=>$t,(r,c)=>{c(r,k({get cell(){return a.cell},"data-slot":`input-otp-slot`,get class(){return n(t)}},()=>s,{get ref(){return o()},set ref(e){o(e)},children:(t,n)=>{m();var r=Tn(),o=e(r),s=F(o),c=e=>{var t=wn();T(e,t)};z(s,e=>{a.cell.hasFakeCaret&&e(c)}),M(()=>i(o,`${a.cell.char??``} `)),T(t,r)},$$slots:{default:!0}}))})}T(r,c),V()}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`]);function On(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Dn);var c=t(),l=e(c);{let e=P(()=>q(`cn-input-otp-input gap-2 flex items-center disabled:cursor-not-allowed has-disabled:opacity-50`,i.class));R(l,()=>Xt,(t,r)=>{r(t,k({"data-slot":`input-otp`,spellcheck:!1,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var kn=w(`<div class="w-full flex items-center"><!></div>`);function An(r,i){_(i,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=S(i,`ref`,15,null),u=S(i,`mode`,11,`password`),f=S(i,`password`,15,``),m=S(i,`otp`,15,``);var h=kn(),g=d(h),v=e=>{Et(e,{id:`iam-password-input`,name:`password`,type:`password`,minlength:6,autocomplete:`current-password`,get placeholder(){return o().auth.password},class:`placeholder:text-sm`,get value(){return f()},set value(e){f(e)}})},y=r=>{var i=t(),a=e(i);{let r=(r,i)=>{let a=()=>(i?.()).cells;var o=t(),s=e(o);R(s,()=>Sn,(r,i)=>{i(r,{children:(r,i)=>{var o=t(),s=e(o);re(s,17,()=>a().slice(0,6),p,(r,i)=>{var a=t(),o=e(a);R(o,()=>En,(e,t)=>{t(e,{get cell(){return n(i)},class:`size-[40px] bg-background`})}),T(r,a)}),T(r,o)},$$slots:{default:!0}})}),T(r,o)};R(a,()=>On,(e,t)=>{t(e,{maxlength:6,get pattern(){return Vt},required:!0,get value(){return m()},set value(e){m(e)},children:r,$$slots:{default:!0}})})}T(r,i)};z(g,e=>{u()===`password`?e(v):e(y,-1)}),a(h),N(h,e=>l(e),()=>l()),T(r,h),V(),c()}var jn=w(`<!> <span class="sr-only"> </span>`,1),Mn=w(`<form><fieldset class="space-y-2"><!> <div class="space-y-2"><div class="flex items-center gap-2"><!> <!></div> <div class="text-sm text-muted-foreground px-1"><!></div></div></fieldset></form>`);function Nn(r,o){_(o,!0);let c=()=>b(X,`$dict`,l),[l,f]=L(),p=A(!1),m=A(``),h=A(``),v=A(``),y=A(null),S=A(`password`),w=A(void 0);async function E(){n(h).length===0?n(S)===`password`?await ee():await te():await D()}async function D(){C(p,!0);let e=o.account===void 0?await O():await be(o.account.id,{username:n(m),password:n(h)});C(p,!1),e instanceof Error&&await k()}async function O(){let e=await ve(n(m),n(h));return e instanceof Error||we(e)?.status===201&&o.oncreate?.(e),e}async function ee(){C(p,!0);let e=o.account===void 0?await fe(n(m)):await Se(o.account.id,n(m));C(p,!1),!(e instanceof Error)&&(C(S,`otp`),requestAnimationFrame(()=>j()))}async function te(){if(n(m).length===0){console.error(`username is required`);return}if(n(v).length!==6){await k();return}C(p,!0);let e=await pe(n(m),n(v));if(C(p,!1),e instanceof Error){C(v,``),await k();return}return we(e)?.status===201&&o.oncreate?.(e),e}async function k(){await n(w)?.shake(),j()}function j(){ue&&n(y)?.querySelector(`input`)?.focus()}var ne=Mn(),I=P(()=>je(E)),R=d(ne),re=d(R);{let e=P(()=>n(S)===`otp`||void 0);Et(re,{id:`iam-username-input`,name:`username`,type:`email`,autocomplete:`username`,required:!0,get disabled(){return n(e)},get autofocus(){return ue},get placeholder(){return c().auth.email},get value(){return n(m)},set value(e){C(m,e,!0)}})}var B=F(re,2),ie=d(B),ae=d(ie);N(Ot(ae,{class:`w-full`,children:(e,t)=>{An(e,{get mode(){return n(S)},get ref(){return n(y)},set ref(e){C(y,e,!0)},get password(){return n(h)},set password(e){C(h,e,!0)},get otp(){return n(v)},set otp(e){C(v,e,!0)}})},$$slots:{default:!0}}),e=>C(w,e,!0),()=>n(w));var oe=F(ae,2);U(oe,{size:`icon-lg`,type:`submit`,children:(t,r)=>{var a=jn(),o=e(a),s=e=>{Y(e,{})},l=e=>{Ct(e,{})};z(o,e=>{n(p)?e(s):e(l,-1)});var u=F(o,2),d=x(u,!0);M(()=>i(d,c().auth.login)),T(t,a)},$$slots:{default:!0}}),a(ie);var se=F(ie,2),ce=d(se),le=n=>{var r=t(),i=e(r);g(i,()=>c().auth.passwordBlank),T(n,r)},de=e=>{var t=u();M(()=>i(t,c().auth.otpInstructions)),T(e,t)};z(ce,e=>{n(S)===`password`?e(le):e(de,-1)}),a(se),a(B),a(R),a(ne),s(`submit`,ne,function(...e){n(I)?.apply(this,e)}),T(r,ne),V(),f()}var Pn=w(`<h2> </h2>`),Fn=w(`<!> <!>`,1);function In(r,a){_(a,!0);let o=()=>b(X,`$dict`,s),[s,c]=L();var l=t(),d=e(l);{let t=P(()=>q(`pt-4 gap-4 bg-background/75`,a.class));R(d,()=>xt,(r,s)=>{s(r,{get class(){return n(t)},children:(t,n)=>{var r=Fn(),s=e(r);R(s,()=>ht,(t,n)=>{n(t,{class:`gap-0`,children:(t,n)=>{var r=Fn(),a=e(r);R(a,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=Pn(),r=x(n,!0);M(()=>i(r,o().auth.passwordTitle)),T(e,n)},$$slots:{default:!0}})});var s=F(a,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,o().auth.passwordDescription)),T(e,n)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{Nn(e,{get account(){return a.account},get oncreate(){return a.oncreate}})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,l),V(),c()}function Ln(e){Nn(e,{})}var Rn=new Set([`$$slots`,`$$events`,`$$legacy`]);function zn(e,t){let n=h(t,Rn),r=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`}],[`path`,{d:`m9 12 2 2 4-4`}]];H(e,k({name:`shield-check`},()=>n,{get iconNode(){return r}}))}var Bn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Vn(e,t){let n=h(t,Bn),r=[[`path`,{d:`m2 2 20 20`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`}]];H(e,k({name:`shield-off`},()=>n,{get iconNode(){return r}}))}var Hn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Un=w(`<div><!></div>`);function Wn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Hn);var o=Un();I(o,e=>({"data-slot":`alert-description`,class:e,...i}),[()=>q(`text-sm text-balance text-muted-foreground md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Kn=w(`<div><!></div>`);function qn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=h(t,Gn);var o=Kn();I(o,e=>({"data-slot":`alert-title`,class:e,...i}),[()=>q(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,t.class)]);var s=d(o);B(s,()=>t.children??r),a(o),N(o,e=>n(e),()=>n()),T(e,o),V()}var Jn=Re({base:`grid gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full`,variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}}),Yn=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`variant`,`children`]),Xn=w(`<div><!></div>`);function Zn(e,t){_(t,!0);let n=S(t,`ref`,15,null),i=S(t,`variant`,3,`default`),o=h(t,Yn);var s=Xn();I(s,e=>({"data-slot":`alert`,role:`alert`,class:e,...o}),[()=>q(Jn({variant:i()}),t.class)]);var c=d(s);B(c,()=>t.children??r),a(s),N(s,e=>n(e),()=>n()),T(e,s),V()}var Qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function $n(e,t){let n=h(t,Qn),r=[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`}],[`path`,{d:`M2 16h.01`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`}]];H(e,k({name:`fingerprint-pattern`},()=>n,{get iconNode(){return r}}))}var er=w(`<!> `,1),tr=w(`<div class="flex flex-col items-center justify-center gap-2"><p> </p> <!></div>`);function nr(t,r){_(r,!0);let o=()=>b(X,`$dict`,s),[s,c]=L(),l=A(!1);async function u(){C(l,!0),await xe(),C(l,!1)}var f=tr(),p=d(f),m=x(p,!0),h=F(p,2);U(h,{id:`iam-passkey-login-button`,variant:`secondary`,onclick:u,children:(t,r)=>{var a=er(),s=e(a),c=e=>{Y(e,{})},u=e=>{$n(e,{})};z(s,e=>{n(l)?e(c):e(u,-1)});var d=F(s);M(()=>i(d,` ${o().auth.signin??``}`)),T(t,a)},$$slots:{default:!0}}),a(f),M(()=>i(m,o().auth.alreadyHaveAccount)),T(t,f),V(),c()}var rr=w(`<form><fieldset class="space-y-1"><div class="flex items-center gap-2"><!> <!></div></fieldset></form>`);function ir(r,i){_(i,!0);let o=()=>b(X,`$dict`,c),[c,l]=L(),u=P(()=>i.account?.name??``),f=A(!1);async function p(){let e=n(u).trim();if(e.length===0)return;C(f,!0);let t=await de(e,i.account?.id);C(f,!1),!(t instanceof Error)&&i.oncreate?.(t)}var m=rr(),h=P(()=>je(p)),g=d(m),v=d(g),y=d(v);Et(y,{id:`name`,type:`text`,get placeholder(){return o().auth.yourName},autocomplete:`given-name`,required:!0,get autofocus(){return ue},get value(){return n(u)},set value(e){C(u,e)}});var x=F(y,2);U(x,{id:`iam-passkey-create-button`,size:`icon-lg`,type:`submit`,children:(r,i)=>{var a=t(),o=e(a),s=e=>{Y(e,{})},c=e=>{Ct(e,{})};z(o,e=>{n(f)?e(s):e(c,-1)}),T(r,a)},$$slots:{default:!0}}),a(v),a(g),a(m),M(()=>g.disabled=i.disabled),s(`submit`,m,function(...e){n(h)?.apply(this,e)}),T(r,m),V(),l()}var ar=w(`<p> <a target="_blank" class="text-nowrap"> </a></p>`),or=w(`<h2> </h2>`),sr=w(`<!> <!>`,1),cr=w(`<!> <!> <!>`,1),lr=w(`<p> </p> <!>`,1),ur=w(`<div class="space-y-4"><!> <!></div>`);function dr(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),f=e=>{var t=ar(),n=d(t),r=F(n),o=x(r,!0);a(t),M(()=>{i(n,`${s().auth.passkeysDescription??``} `),y(r,`href`,p),i(o,s().auth.learnMore)}),T(e,t)},p=ge?`https://support.apple.com/en-us/102195`:`https://support.google.com/accounts/answer/13548313`;var h=ur(),g=d(h);{let r=P(()=>q(`gap-4 bg-background/75`,_e&&`pt-4`,o.class));R(g,()=>xt,(a,c)=>{c(a,{get class(){return n(r)},children:(n,r)=>{var a=sr(),c=e(a),l=n=>{var r=sr(),a=e(r);R(a,()=>ht,(n,r)=>{r(n,{class:`gap-0`,children:(n,r)=>{var a=t(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{var n=or(),r=x(n,!0);M(()=>i(r,s().auth.signupTitle)),T(e,n)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})});var c=F(a,2);R(c,()=>ot,(e,t)=>{t(e,{children:(e,t)=>{ir(e,{get account(){return o.account},get oncreate(){return o.oncreate}})},$$slots:{default:!0}})}),T(n,r)};z(c,e=>{_e&&e(l)});var d=F(c,2);R(d,()=>ft,(n,r)=>{r(n,{children:(n,r)=>{var a=t(),o=e(a),c=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);zn(a,{color:`green`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.betterSecurity)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(e,t)=>{t(e,{children:(e,t)=>{f(e)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)},l=n=>{var r=t(),a=e(r);R(a,()=>Zn,(t,n)=>{n(t,{children:(t,n)=>{var r=cr(),a=e(r);Vn(a,{color:`red`,class:`animate-pulse`});var o=F(a,2);R(o,()=>qn,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,s().auth.passkeysNotSupported)),T(e,n)},$$slots:{default:!0}})});var c=F(o,2);R(c,()=>Wn,(t,n)=>{n(t,{children:(t,n)=>{var r=lr(),a=e(r),o=x(a,!0),c=F(a,2);f(c),M(()=>i(o,s().auth.passkeysWarning)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),T(n,r)};z(o,e=>{_e?e(c):e(l,-1)}),T(n,a)},$$slots:{default:!0}})}),T(n,a)},$$slots:{default:!0}})})}var v=F(g,2),S=e=>{nr(e,{})};z(v,e=>{_e&&!o.account&&e(S)}),a(h),T(r,h),V(),l()}var fr=w(`<!> <!> `,1);function pr(t,n){_(n,!0);let r=()=>b(X,`$dict`,a),[a,o]=L();async function s(e){let t=e.currentTarget;t.disabled=!0,await xe(n.account.id),t.disabled=!1}U(t,{class:`w-full disabled:[&>.x-icon]:hidden [&>.x-spinner]:hidden disabled:[&>.x-spinner]:block`,onclick:s,children:(t,n)=>{var a=fr(),o=e(a);$n(o,{class:`size-5 x-icon`});var s=F(o,2);Y(s,{class:`x-spinner`});var c=F(s);M(()=>i(c,` ${r().auth.refresh.continue??``}`)),T(t,a)},$$slots:{default:!0}}),V(),o()}var mr=c(`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M19.84 10.2273C19.84 9.5182 19.7764 8.8364 19.6582 8.1818H10.24V12.05H15.6218C15.39 13.3 14.6855 14.3591 13.6264 15.0682V17.5773H16.8582C18.7491 15.8364 19.84 13.2727 19.84 10.2273Z" fill="#4285F4"></path><path d="M10.24 20C12.94 20 15.2036 19.1045 16.8581 17.5773L13.6263 15.0682C12.7309 15.6682 11.5854 16.0227 10.24 16.0227C7.6354 16.0227 5.4309 14.2636 4.6445 11.9H1.3036V14.4909C2.9491 17.7591 6.3309 20 10.24 20Z" fill="#34A853"></path><path d="M4.6445 11.9C4.4445 11.3 4.3309 10.6591 4.3309 10C4.3309 9.3409 4.4445 8.7 4.6445 8.1V5.5091H1.3036C0.6264 6.8591 0.24 8.3864 0.24 10C0.24 11.6136 0.6264 13.1409 1.3036 14.4909L4.6445 11.9Z" fill="#FBBC04"></path><path d="M10.24 3.9773C11.7081 3.9773 13.0263 4.4818 14.0627 5.4727L16.9309 2.6045C15.1991 0.9909 12.9354 0 10.24 0C6.3309 0 2.9491 2.2409 1.3036 5.5091L4.6445 8.1C5.4309 5.7364 7.6354 3.9773 10.24 3.9773Z" fill="#E94235"></path></svg>`);function hr(e,t){var n=mr();M(()=>j(n,0,O(t.class))),T(e,n)}var gr=c(`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill="currentColor" viewBox="0 0 814 1000"><path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z"></path></svg>`);function _r(e,t){_(t,!0);var n=gr(),r=x(n);M(e=>{j(n,0,e),y(r,`fill`,t.fill)},[()=>O(q(`size-5 -mt-[3px]`,t.class))]),T(e,n),V()}var vr={google:hr,apple:_r},yr=w(`<!> <!> <!>`,1);function br(t,i){_(i,!0);let a=P(()=>vr[i.idp]);async function o(e){let t=e.currentTarget;t.disabled=!0,await me(i.idp,i.account?.id),t.disabled=!1}{let s=P(()=>i.children?`default`:`icon`),c=P(()=>q(`disabled:[&_.x-icon]:hidden [&_.x-spinner]:hidden disabled:[&_.x-spinner]:block`,i.class));U(t,{variant:`outline`,get size(){return n(s)},onclick:o,get class(){return n(c)},children:(t,o)=>{var s=yr(),c=e(s);R(c,()=>n(a),(e,t)=>{t(e,{class:`x-icon`})});var l=F(c,2);Y(l,{class:`x-spinner`});var u=F(l,2);B(u,()=>i.children??r),T(t,s)},$$slots:{default:!0}})}V()}var xr=w(`<div class="flex gap-2"><!> <!></div>`);function Sr(e,t){_(t,!0);var n=xr(),r=d(n),i=e=>{br(e,{idp:`google`,get account(){return t.account}})};z(r,e=>{le.google.client&&e(i)});var o=F(r,2),s=e=>{br(e,{idp:`apple`,get account(){return t.account}})};z(o,e=>{le.apple.client&&e(s)}),a(n),T(e,n),V()}function Cr(e,t){_(t,!0);let n=()=>b(X,`$dict`,r),[r,a]=L(),o={google:`Google`,apple:`Apple`};br(e,{get idp(){return t.idp},class:`w-full`,children:(e,r)=>{m();var a=u();M(e=>i(a,e),[()=>n().auth.continueWith(o[t.idp])]),T(e,a)},$$slots:{default:!0}}),V(),a()}var wr=w(`<!> <!>`,1);function Tr(n,r){var a=t(),o=e(a);R(o,()=>xt,(n,a)=>{a(n,{class:`w-full`,children:(n,a)=>{var o=wr(),s=e(o);R(s,()=>ht,(t,n)=>{n(t,{children:(t,n)=>{var a=wr(),o=e(a);R(o,()=>vt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.title)),T(e,n)},$$slots:{default:!0}})});var s=F(o,2);R(s,()=>lt,(e,t)=>{t(e,{children:(e,t)=>{m();var n=u();M(()=>i(n,r.description)),T(e,n)},$$slots:{default:!0}})}),T(t,a)},$$slots:{default:!0}})});var c=F(s,2);R(c,()=>ot,(n,i)=>{i(n,{class:`flex flex-col`,children:(n,i)=>{var a=t(),o=e(a);B(o,()=>r.action),T(n,a)},$$slots:{default:!0}})}),T(n,o)},$$slots:{default:!0}})}),T(n,a)}var Er=w(`<!> `,1),Dr=w(`<div class="flex flex-col items-center gap-4 w-full"><!> <!></div>`);function Or(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L();ee(()=>{o.method===null&&he()});var u=Dr(),f=d(u);{let r=n=>{var r=t(),i=e(r),a=e=>{pr(e,{get account(){return o.account}})},s=e=>{Ln(e,{})},c=e=>{Cr(e,{idp:`apple`})},l=e=>{Cr(e,{idp:`google`})};z(i,e=>{o.method===`passkey`?e(a):o.method===`password`?e(s,1):o.method===`apple`?e(c,2):o.method===`google`&&e(l,3)}),T(n,r)},i=P(()=>s().auth.refresh.description(o.account.name));Tr(f,{get title(){return s().auth.refresh.title},get description(){return n(i)},action:r,$$slots:{action:!0}})}var p=F(f,2);U(p,{variant:`outline`,get onclick(){return he},children:(t,n)=>{var r=Er(),a=e(r);tt(a,{});var o=F(a);M(()=>i(o,` ${s().auth.signout??``}`)),T(t,r)},$$slots:{default:!0}}),a(u),T(r,u),V(),l()}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=h(t,kr),r=[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`}]];H(e,k({name:`at-sign`},()=>n,{get iconNode(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Mr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,jr);var s=t(),c=e(s);{let e=P(()=>q(`text-sm flex-1 outline-none`,i.class));R(c,()=>pn,(t,r)=>{r(t,k({"data-slot":`tabs-content`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Pr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=h(i,Nr);var s=t(),c=e(s);{let e=P(()=>q(`gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,i.class));R(c,()=>yn,(t,r)=>{r(t,k({"data-slot":`tabs-trigger`,get class(){return n(e)}},()=>o,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,s),V()}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Ir(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`value`,15,``),s=h(i,Fr);var c=t(),l=e(c);{let e=P(()=>q(`gap-2 group/tabs flex data-[orientation=horizontal]:flex-col`,i.class));R(l,()=>un,(t,r)=>{r(t,k({"data-slot":`tabs`,get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)},get value(){return o()},set value(e){o(e)}}))})}T(r,c),V()}var Lr=Re({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col`,variants:{variant:{default:`cn-tabs-list-variant-default bg-muted`,line:`cn-tabs-list-variant-line gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),Rr=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function zr(r,i){_(i,!0);let a=S(i,`ref`,15,null),o=S(i,`variant`,3,`default`),s=h(i,Rr);var c=t(),l=e(c);{let e=P(()=>q(Lr({variant:o()}),i.class));R(l,()=>gn,(t,r)=>{r(t,k({"data-slot":`tabs-list`,get"data-variant"(){return o()},get class(){return n(e)}},()=>s,{get ref(){return a()},set ref(e){a(e)}}))})}T(r,c),V()}var Br=w(`<!> `,1),Vr=w(`<!> <!>`,1),Hr=w(`<div class="flex justify-between gap-2"><!> <!></div> <!> <!>`,1);function Ur(r,o){_(o,!0);let s=()=>b(X,`$dict`,c),[c,l]=L(),u=A(null);function f(e){requestAnimationFrame(()=>{n(u)?.querySelector(`[data-value="${e}"] input[autofocus]`)?.focus()})}let p=A(`passkey`);ee(()=>{C(p,_e?`passkey`:`password`,!0)});var m=t(),h=e(m);{let t=P(()=>q(`w-full`,o.class));R(h,()=>Ir,(r,c)=>{c(r,{get class(){return n(t)},onValueChange:f,get value(){return n(p)},set value(e){C(p,e,!0)},get ref(){return n(u)},set ref(e){C(u,e,!0)},children:(t,n)=>{var r=Hr(),c=e(r),l=d(c);R(l,()=>zr,(t,n)=>{n(t,{children:(t,n)=>{var r=Vr(),a=e(r);R(a,()=>Pr,(t,n)=>{n(t,{value:`passkey`,"data-marker":`passkey-tab`,children:(t,n)=>{var r=Br(),a=e(r);$n(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.passkey??``}`)),T(t,r)},$$slots:{default:!0}})});var o=F(a,2);R(o,()=>Pr,(t,n)=>{n(t,{value:`password`,id:`iam-email-tab`,children:(t,n)=>{var r=Br(),a=e(r);Ar(a,{color:`var(--muted-foreground)`});var o=F(a);M(()=>i(o,` ${s().auth.email??``}`)),T(t,r)},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})}),Sr(F(l,2),{get account(){return o.account}}),a(c);var u=F(c,2);R(u,()=>Mr,(e,t)=>{t(e,{value:`passkey`,children:(e,t)=>{dr(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`passkey`)})},$$slots:{default:!0}})});var f=F(u,2);R(f,()=>Mr,(e,t)=>{t(e,{value:`password`,children:(e,t)=>{In(e,{get account(){return o.account},oncreate:e=>o.oncreate?.(e,`password`)})},$$slots:{default:!0}})}),T(t,r)},$$slots:{default:!0}})})}T(r,m),V(),l()}var Wr=w(`<div class="flex items-center justify-center h-screen"><!></div>`),Gr=w(`<div class="flex w-full max-w-sm items-center justify-center pt-[14vh] px-4 mx-auto"><!></div>`);function Kr(r,i){_(i,!0);let o=()=>b(ae,`$iam`,f),s=()=>b(oe,`$method`,f),c=()=>b(Ce,`$authenticated`,f),l=()=>b(se,`$greeting`,f),u=()=>b(ce,`$processing`,f),[f,p]=L(),m=r=>{var a=t(),c=e(a),l=e=>{Or(e,{get account(){return o()},get method(){return s()}})},u=e=>{{let t=P(()=>q(`scale-0 transition-transform`,`scale-100`));Ur(e,{get class(){return n(t)},get account(){return i.account},get oncreate(){return i.oncreate}})}};z(c,e=>{o()?e(l):e(u,-1)}),T(r,a)};var h=t(),g=e(h),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=e=>{var t=Wr();Y(d(t),{}),a(t),T(e,t)},x=n=>{var r=t(),a=e(r);B(a,()=>i.screen,()=>({authentication:m})),T(n,r)},S=e=>{var t=Gr(),n=d(t);m(n),a(t),T(e,t)};z(g,e=>{c()?e(v):l()||u()?e(y,1):i.screen?e(x,2):e(S,-1)}),T(r,h),V(),p()}var qr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jr(e,t){let n=h(t,qr),r=[[`path`,{d:`M20 6 9 17l-5-5`}]];H(e,k({name:`check`},()=>n,{get iconNode(){return r}}))}var Yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xr(e,t){let n=h(t,Yr),r=[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]];H(e,k({name:`copy`},()=>n,{get iconNode(){return r}}))}var Zr=new Set([`$$slots`,`$$events`,`$$legacy`,`text`,`label`,`disabled`,`oncopy`,`icon`,`class`]),Qr=w(`<!> <!>`,1);function $r(r,a){_(a,!0);let o=h(a,Zr),s=A(!1),c=A(!1),l=!navigator.clipboard;async function d(){if(!n(s)){if(C(c,!0),typeof ClipboardItem>`u`){let e=typeof a.text==`function`?await a.text():a.text;if(e===null)return;await navigator.clipboard.writeText(e)}else{let e=f(a.text);await navigator.clipboard.write([e])}C(c,!1),C(s,!0),a.oncopy?.(),setTimeout(()=>C(s,!1),2e3)}}function f(e){return typeof e==`function`?p(e):new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`})})}function p(e){return new ClipboardItem({"text/plain":e().then(e=>new Blob([e??``],{type:`text/plain`}))})}{let f=P(()=>q(a.class)),p=P(()=>a.disabled||l||n(c));U(r,k({get class(){return n(f)},onclick:d,get disabled(){return n(p)}},()=>o,{children:(r,o)=>{var l=Qr(),d=e(l),f=e=>{Jr(e,{class:`text-constructive`,strokeWidth:3})},p=e=>{Y(e,{})},m=n=>{var r=t(),i=e(r);B(i,()=>a.icon),T(n,r)},h=e=>{Xr(e,{})};z(d,e=>{n(s)?e(f):n(c)?e(p,1):a.icon===void 0?e(h,-1):e(m,2)});var g=F(d,2),_=e=>{var t=u();M(()=>i(t,a.label)),T(e,t)};z(g,e=>{a.label!==null&&e(_)}),T(r,l)},$$slots:{default:!0}}))}V()}function ei(e,t){return!!(e.dev!==void 0&&e.dev===!1||e.beta!==void 0&&e.beta===ti()||e.debug!==void 0&&e.debug===ni()||e.role!==void 0&&t?.roles!==void 0&&ri(t.roles,e.role))}function ti(){return typeof window<`u`&&window.location.hostname.startsWith(`beta.`)}function ni(){return ti()}function ri(e,t){for(let n of e)if(n===t||t.startsWith(n+`:`))return!0;return!1}var ii=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`denied`]),ai=w(`<div class="flex justify-center pt-[14vh]"><!></div>`);function oi(r,i){_(i,!0);let o=()=>b(ae,`$account`,c),s=()=>b(X,`$dict`,c),[c,l]=L(),u=h(i,ii),f=P(()=>ei(u,o())),p=P(()=>o()?.id??``);var m=t(),g=e(m),v=n=>{var r=t(),a=e(r);B(a,()=>i.children),T(n,r)},y=n=>{var r=t(),a=e(r);B(a,()=>i.denied),T(n,r)},x=e=>{var t=ai(),r=d(t);{let e=P(()=>n(p).slice(0,8));$r(r,{get text(){return n(p)},get label(){return n(e)},get"aria-label"(){return s().auth.copyId},variant:`outline`,class:`font-mono`})}a(t),T(e,t)};z(g,e=>{n(f)?e(v):i.denied===void 0?n(p)!==``&&e(x,2):e(y,1)}),T(r,m),V(),l()}var si=E(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),Q=E((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),ci=E((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),li=E(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),ui=E(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),di=E((e=>{var t=Q().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),fi=E((e=>{var t=Q().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),pi=E((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),mi=E((e=>{var t=ci(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),hi=E((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),gi=E((e=>{var t=hi();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),_i=E(((e,t)=>{var n=gi();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),vi=E((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),yi=E((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
2
2
  ]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),$=E((e=>{var t=vi(),n=yi();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),bi=E((e=>{var t=Q(),n=mi(),r=ci(),i=$(),a=vi(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),xi=E((e=>{var t=Q(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),Si=E(((e,t)=>{var n=$();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),Ci=E(((e,t)=>{var n=$(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),wi=E(((e,t)=>{var n=$();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),Ti=E(((e,t)=>{var n=$(),r=Q();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),Ei=E(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),Di=E((e=>{var t=$(),n=Si(),r=Ci(),i=wi(),a=Ti(),o=yi(),s=Q(),c=Ei();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
4
4
  Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),Oi=E((e=>{var t=Q(),n=ci(),r=li(),i=ui(),a=di(),o=fi(),s=pi(),c=mi(),l=_i(),u=bi(),d=xi(),f=$(),p=Di();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return x(a,e,n)}function x(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),x=0,S,C;for(S=0;S<v;S++)for(C=0;C<o;C++)S<g[C].length&&(b[x++]=g[C][S]);for(S=0;S<p;S++)for(C=0;C<o;C++)b[x++]=_[C][S];return b}function S(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`