@replayops/sdk 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/react.cjs +3 -3
- package/dist/adapters/react.js +1 -1
- package/dist/adapters/vue.cjs +3 -3
- package/dist/adapters/vue.js +1 -1
- package/dist/browser/replayops.min.js +36 -36
- package/dist/chunk-KJRPCR2B.js +36 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +1 -1
- package/package.json +11 -12
- package/dist/chunk-A3ZJ2DKC.js +0 -36
package/dist/index.d.cts
CHANGED
|
@@ -48,6 +48,13 @@ interface SdkConfig {
|
|
|
48
48
|
live?: boolean;
|
|
49
49
|
/** Show the in-page chat widget (requires `live`). Default true. */
|
|
50
50
|
liveChat?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Show the bug-report launcher: capture the screen, draw on it, file a
|
|
53
|
+
* finding. Default true, and independent of `liveChat` — a team testing a
|
|
54
|
+
* site wants to report what they see without a support chat on their
|
|
55
|
+
* marketing pages. Requires `live` only because it shares that module.
|
|
56
|
+
*/
|
|
57
|
+
testerTools?: boolean;
|
|
51
58
|
/**
|
|
52
59
|
* If Google Analytics is on the page, capture its client id so a replay can
|
|
53
60
|
* deep-link to the visitor's GA session (and vice-versa). Harmless when GA
|
|
@@ -58,6 +65,19 @@ interface SdkConfig {
|
|
|
58
65
|
batchSize?: number;
|
|
59
66
|
/** Max ms between flushes. Default 5000. */
|
|
60
67
|
flushIntervalMs?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Largest request body, in bytes of JSON, before a flush is split into
|
|
70
|
+
* several consecutive batches. Default 1 MiB.
|
|
71
|
+
*
|
|
72
|
+
* `batchSize` bounds how many events trigger a flush, not how big the body
|
|
73
|
+
* is, and a flush used to send the whole buffer regardless. After a failed
|
|
74
|
+
* send the buffer grows while it waits, so the retry was larger than the
|
|
75
|
+
* attempt that failed; in production that produced 6–12 MB uncompressed
|
|
76
|
+
* bodies that no real uplink delivers inside the timeouts in front of the
|
|
77
|
+
* collector. A single event larger than this (a full snapshot of a very
|
|
78
|
+
* heavy page) still ships, alone.
|
|
79
|
+
*/
|
|
80
|
+
maxBatchBytes?: number;
|
|
61
81
|
/** Require explicit consent() before any recording. Default false. */
|
|
62
82
|
requireConsent?: boolean;
|
|
63
83
|
/**
|
|
@@ -89,7 +109,15 @@ declare class SessionController {
|
|
|
89
109
|
/** Deployment policy fetched from the collector; undefined until it resolves. */
|
|
90
110
|
private policyMaskInputs?;
|
|
91
111
|
private policyLiveChat?;
|
|
112
|
+
private policyTesterTools?;
|
|
92
113
|
private policyLive?;
|
|
114
|
+
/** Project sampling, from the same fetch. Undefined until it resolves. */
|
|
115
|
+
private policySamplingRate?;
|
|
116
|
+
private policySamplingMode?;
|
|
117
|
+
/** The hashed user allow/deny list. Enforced again at ingest. */
|
|
118
|
+
private policyUserRules?;
|
|
119
|
+
/** Set once a rule has excluded this visitor, so nothing restarts recording. */
|
|
120
|
+
private ruledOut;
|
|
93
121
|
/** Configure the SDK. Does not start recording unless autostart is implied. */
|
|
94
122
|
init(config: SdkConfig): void;
|
|
95
123
|
private bootstrap;
|
|
@@ -104,6 +132,13 @@ declare class SessionController {
|
|
|
104
132
|
resume(): void;
|
|
105
133
|
stop(): void;
|
|
106
134
|
identify(userId: string, traits?: Record<string, unknown>): void;
|
|
135
|
+
/**
|
|
136
|
+
* Whether a user rule excludes this visitor: false means stop, true means
|
|
137
|
+
* carry on, undefined means the browser cannot decide and the server will.
|
|
138
|
+
*/
|
|
139
|
+
private ruleVerdict;
|
|
140
|
+
/** Stops and discards when a rule turns out to exclude the current visitor. */
|
|
141
|
+
private enforceUserRule;
|
|
107
142
|
track(eventName: string, properties?: Record<string, unknown>): void;
|
|
108
143
|
setUserProperties(props: Record<string, unknown>): void;
|
|
109
144
|
/** Adds a CSS selector whose matched subtree text is masked. */
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,13 @@ interface SdkConfig {
|
|
|
48
48
|
live?: boolean;
|
|
49
49
|
/** Show the in-page chat widget (requires `live`). Default true. */
|
|
50
50
|
liveChat?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Show the bug-report launcher: capture the screen, draw on it, file a
|
|
53
|
+
* finding. Default true, and independent of `liveChat` — a team testing a
|
|
54
|
+
* site wants to report what they see without a support chat on their
|
|
55
|
+
* marketing pages. Requires `live` only because it shares that module.
|
|
56
|
+
*/
|
|
57
|
+
testerTools?: boolean;
|
|
51
58
|
/**
|
|
52
59
|
* If Google Analytics is on the page, capture its client id so a replay can
|
|
53
60
|
* deep-link to the visitor's GA session (and vice-versa). Harmless when GA
|
|
@@ -58,6 +65,19 @@ interface SdkConfig {
|
|
|
58
65
|
batchSize?: number;
|
|
59
66
|
/** Max ms between flushes. Default 5000. */
|
|
60
67
|
flushIntervalMs?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Largest request body, in bytes of JSON, before a flush is split into
|
|
70
|
+
* several consecutive batches. Default 1 MiB.
|
|
71
|
+
*
|
|
72
|
+
* `batchSize` bounds how many events trigger a flush, not how big the body
|
|
73
|
+
* is, and a flush used to send the whole buffer regardless. After a failed
|
|
74
|
+
* send the buffer grows while it waits, so the retry was larger than the
|
|
75
|
+
* attempt that failed; in production that produced 6–12 MB uncompressed
|
|
76
|
+
* bodies that no real uplink delivers inside the timeouts in front of the
|
|
77
|
+
* collector. A single event larger than this (a full snapshot of a very
|
|
78
|
+
* heavy page) still ships, alone.
|
|
79
|
+
*/
|
|
80
|
+
maxBatchBytes?: number;
|
|
61
81
|
/** Require explicit consent() before any recording. Default false. */
|
|
62
82
|
requireConsent?: boolean;
|
|
63
83
|
/**
|
|
@@ -89,7 +109,15 @@ declare class SessionController {
|
|
|
89
109
|
/** Deployment policy fetched from the collector; undefined until it resolves. */
|
|
90
110
|
private policyMaskInputs?;
|
|
91
111
|
private policyLiveChat?;
|
|
112
|
+
private policyTesterTools?;
|
|
92
113
|
private policyLive?;
|
|
114
|
+
/** Project sampling, from the same fetch. Undefined until it resolves. */
|
|
115
|
+
private policySamplingRate?;
|
|
116
|
+
private policySamplingMode?;
|
|
117
|
+
/** The hashed user allow/deny list. Enforced again at ingest. */
|
|
118
|
+
private policyUserRules?;
|
|
119
|
+
/** Set once a rule has excluded this visitor, so nothing restarts recording. */
|
|
120
|
+
private ruledOut;
|
|
93
121
|
/** Configure the SDK. Does not start recording unless autostart is implied. */
|
|
94
122
|
init(config: SdkConfig): void;
|
|
95
123
|
private bootstrap;
|
|
@@ -104,6 +132,13 @@ declare class SessionController {
|
|
|
104
132
|
resume(): void;
|
|
105
133
|
stop(): void;
|
|
106
134
|
identify(userId: string, traits?: Record<string, unknown>): void;
|
|
135
|
+
/**
|
|
136
|
+
* Whether a user rule excludes this visitor: false means stop, true means
|
|
137
|
+
* carry on, undefined means the browser cannot decide and the server will.
|
|
138
|
+
*/
|
|
139
|
+
private ruleVerdict;
|
|
140
|
+
/** Stops and discards when a rule turns out to exclude the current visitor. */
|
|
141
|
+
private enforceUserRule;
|
|
107
142
|
track(eventName: string, properties?: Record<string, unknown>): void;
|
|
108
143
|
setUserProperties(props: Record<string, unknown>): void;
|
|
109
144
|
/** Adds a CSS selector whose matched subtree text is masked. */
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{b as Session,a as SessionController,c as default}from'./chunk-
|
|
1
|
+
export{b as Session,a as SessionController,c as default}from'./chunk-KJRPCR2B.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replayops/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Session replay SDK for ReplayOps — records DOM, console, network and errors in the browser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"session-replay",
|
|
@@ -55,15 +55,6 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"scripts": {
|
|
59
|
-
"build": "tsup",
|
|
60
|
-
"dev": "tsup --watch",
|
|
61
|
-
"typecheck": "tsc --noEmit",
|
|
62
|
-
"test": "vitest run",
|
|
63
|
-
"size": "node scripts/check-size.mjs",
|
|
64
|
-
"clean": "rimraf dist",
|
|
65
|
-
"prepublishOnly": "npm run build"
|
|
66
|
-
},
|
|
67
58
|
"dependencies": {
|
|
68
59
|
"rrweb": "^2.0.0-alpha.4"
|
|
69
60
|
},
|
|
@@ -86,6 +77,14 @@
|
|
|
86
77
|
"tsup": "^8.3.0",
|
|
87
78
|
"typescript": "^5.6.3",
|
|
88
79
|
"vitest": "^2.1.2",
|
|
89
|
-
"@replayops/rrweb-schema": "
|
|
80
|
+
"@replayops/rrweb-schema": "0.1.0"
|
|
81
|
+
},
|
|
82
|
+
"scripts": {
|
|
83
|
+
"build": "tsup",
|
|
84
|
+
"dev": "tsup --watch",
|
|
85
|
+
"typecheck": "tsc --noEmit",
|
|
86
|
+
"test": "vitest run",
|
|
87
|
+
"size": "node scripts/check-size.mjs",
|
|
88
|
+
"clean": "rimraf dist"
|
|
90
89
|
}
|
|
91
|
-
}
|
|
90
|
+
}
|
package/dist/chunk-A3ZJ2DKC.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {record}from'rrweb';var un=Object.defineProperty;var pn=(t,e)=>{for(var n in e)un(t,n,{get:e[n],enumerable:true});};var fn={samplingRate:1,environment:"production",maskInputs:true,maskSelectors:[],ignoreSelectors:[],recordConsole:true,recordNetwork:true,recordNetworkBodies:true,recordErrors:true,capturePerformance:true,captureMemory:true,captureWebVitals:true,tracePropagation:true,tracePropagationTargets:[],live:true,liveChat:true,googleAnalytics:true,batchSize:100,flushIntervalMs:5e3,requireConsent:false,idleTimeoutMs:36e5};function kt(t){return {...fn,...t}}var Tt="ro_anon_id",Et="ro_optout",St="ro_consent";function Ze(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return (t==="x"?e:e&3|8).toString(16)})}var ze=class{anonymousId;userId;userTraits={};constructor(){this.anonymousId=this.load(Tt)??Ze(),this.save(Tt,this.anonymousId);}identify(e,n){this.userId=e,n&&(this.userTraits={...this.userTraits,...n});}setUserProperties(e){this.userTraits={...this.userTraits,...e};}snapshot(){return {anonymousId:this.anonymousId,userId:this.userId,userTraits:Object.keys(this.userTraits).length?this.userTraits:void 0}}isOptedOut(){return this.load(Et)==="1"}optOut(){this.save(Et,"1");}setConsent(e){this.save(St,e?"1":"0");}hasConsent(){return this.load(St)==="1"}load(e){try{return localStorage.getItem(e)}catch{return null}}save(e,n){try{localStorage.setItem(e,n);}catch{}}};function Ct(t){return t>=1?true:t<=0?false:Math.random()<t}var N;(function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.NativeFrame=7]="NativeFrame",t[t.NativeInteraction=8]="NativeInteraction";})(N||(N={}));var st;(function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Selection=11]="Selection",t[t.StyleDeclaration=12]="StyleDeclaration",t[t.Drag=13]="Drag";})(st||(st={}));var it;(function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchEnd=9]="TouchEnd";})(it||(it={}));var I;(function(t){t.Console="replayops/console",t.Network="replayops/network",t.Performance="replayops/performance",t.WebVitals="replayops/webvitals",t.Error="replayops/error";})(I||(I={}));var Rt;(function(t){t[t.Tap=0]="Tap",t[t.DoubleTap=1]="DoubleTap",t[t.LongPress=2]="LongPress",t[t.Scroll=3]="Scroll",t[t.Swipe=4]="Swipe",t[t.ScreenChange=5]="ScreenChange",t[t.KeyboardInput=6]="KeyboardInput",t[t.Back=7]="Back";})(Rt||(Rt={}));var _={};pn(_,{BRAND:()=>Dn,DIRTY:()=>le,EMPTY_PATH:()=>yn,INVALID:()=>m,NEVER:()=>kr,OK:()=>O,ParseStatus:()=>M,Schema:()=>w,ZodAny:()=>oe,ZodArray:()=>ne,ZodBigInt:()=>pe,ZodBoolean:()=>fe,ZodBranded:()=>Le,ZodCatch:()=>Te,ZodDate:()=>he,ZodDefault:()=>ke,ZodDiscriminatedUnion:()=>qe,ZodEffects:()=>Z,ZodEnum:()=>we,ZodError:()=>L,ZodFirstPartyTypeKind:()=>g,ZodFunction:()=>We,ZodIntersection:()=>ve,ZodIssueCode:()=>d,ZodLazy:()=>xe,ZodLiteral:()=>be,ZodMap:()=>Oe,ZodNaN:()=>Pe,ZodNativeEnum:()=>_e,ZodNever:()=>B,ZodNull:()=>ge,ZodNullable:()=>J,ZodNumber:()=>ue,ZodObject:()=>$,ZodOptional:()=>V,ZodParsedType:()=>p,ZodPipeline:()=>$e,ZodPromise:()=>ae,ZodReadonly:()=>Ee,ZodRecord:()=>Be,ZodSchema:()=>w,ZodSet:()=>Ae,ZodString:()=>ie,ZodSymbol:()=>Me,ZodTransformer:()=>Z,ZodTuple:()=>Y,ZodType:()=>w,ZodUndefined:()=>me,ZodUnion:()=>ye,ZodUnknown:()=>te,ZodVoid:()=>Ie,addIssueToContext:()=>u,any:()=>Kn,array:()=>Gn,bigint:()=>Un,boolean:()=>Dt,coerce:()=>_r,custom:()=>$t,date:()=>Fn,datetimeRegex:()=>Nt,defaultErrorMap:()=>Q,discriminatedUnion:()=>nr,effect:()=>hr,enum:()=>ur,function:()=>cr,getErrorMap:()=>Se,getParsedType:()=>X,instanceof:()=>zn,intersection:()=>rr,isAborted:()=>Ue,isAsync:()=>Ce,isDirty:()=>Fe,isValid:()=>se,late:()=>Vn,lazy:()=>dr,literal:()=>lr,makeIssue:()=>Ne,map:()=>or,nan:()=>Zn,nativeEnum:()=>pr,never:()=>Yn,null:()=>Wn,nullable:()=>gr,number:()=>Ht,object:()=>Qn,objectUtil:()=>ot,oboolean:()=>wr,onumber:()=>br,optional:()=>mr,ostring:()=>xr,pipeline:()=>vr,preprocess:()=>yr,promise:()=>fr,quotelessJson:()=>hn,record:()=>ir,set:()=>ar,setErrorMap:()=>gn,strictObject:()=>er,string:()=>jt,symbol:()=>qn,transformer:()=>hr,tuple:()=>sr,undefined:()=>Bn,union:()=>tr,unknown:()=>Xn,util:()=>k,void:()=>Jn});var k;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},t.getValidEnumValues=s=>{let i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(let o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i;})(k||(k={}));var ot;(function(t){t.mergeShapes=(e,n)=>({...e,...n});})(ot||(ot={}));var p=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),X=t=>{switch(typeof t){case "undefined":return p.undefined;case "string":return p.string;case "number":return Number.isNaN(t)?p.nan:p.number;case "boolean":return p.boolean;case "function":return p.function;case "bigint":return p.bigint;case "symbol":return p.symbol;case "object":return Array.isArray(t)?p.array:t===null?p.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?p.promise:typeof Map<"u"&&t instanceof Map?p.map:typeof Set<"u"&&t instanceof Set?p.set:typeof Date<"u"&&t instanceof Date?p.date:p.object;default:return p.unknown}};var d=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),hn=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),L=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r];},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r];};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e;}format(e){let n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else {let a=r,c=0;for(;c<o.path.length;){let l=o.path[c];c===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(o))):a[l]=a[l]||{_errors:[]},a=a[l],c++;}}};return s(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];n[i]=n[i]||[],n[i].push(e(s));}else r.push(e(s));return {formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};L.create=t=>new L(t);var mn=(t,e)=>{let n;switch(t.code){case d.invalid_type:t.received===p.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,k.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:n=`Unrecognized key(s) in object: ${k.joinValues(t.keys,", ")}`;break;case d.invalid_union:n="Invalid input";break;case d.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${k.joinValues(t.options)}`;break;case d.invalid_enum_value:n=`Invalid enum value. Expected ${k.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:n="Invalid function arguments";break;case d.invalid_return_type:n="Invalid function return type";break;case d.invalid_date:n="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:k.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case d.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case d.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case d.custom:n="Invalid input";break;case d.invalid_intersection_types:n="Intersection results could not be merged";break;case d.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:n="Number must be finite";break;default:n=e.defaultError,k.assertNever(t);}return {message:n}},Q=mn;var Mt=Q;function gn(t){Mt=t;}function Se(){return Mt}var Ne=t=>{let{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return {...s,path:i,message:s.message};let a="",c=r.filter(l=>!!l).slice().reverse();for(let l of c)a=l(o,{data:e,defaultError:a}).message;return {...s,path:i,message:a}},yn=[];function u(t,e){let n=Se(),r=Ne({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Q?void 0:Q].filter(s=>!!s)});t.common.issues.push(r);}var M=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,n){let r=[];for(let s of n){if(s.status==="aborted")return m;s.status==="dirty"&&e.dirty(),r.push(s.value);}return {status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let s of n){let i=await s.key,o=await s.value;r.push({key:i,value:o});}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let s of n){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return m;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value);}return {status:e.value,value:r}}},m=Object.freeze({status:"aborted"}),le=t=>({status:"dirty",value:t}),O=t=>({status:"valid",value:t}),Ue=t=>t.status==="aborted",Fe=t=>t.status==="dirty",se=t=>t.status==="valid",Ce=t=>typeof Promise<"u"&&t instanceof Promise;var h;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message;})(h||(h={}));var z=class{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},It=(t,e)=>{if(se(e))return {success:true,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let n=new L(t.common.issues);return this._error=n,this._error}}};function v(t){if(!t)return {};let{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{let{message:c}=t;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:s}}var w=class{get description(){return this._def.description}_getType(e){return X(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:X(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new M,ctx:{common:e.parent.common,data:e.data,parsedType:X(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Ce(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:n?.async??false,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:X(e)},s=this._parseSync({data:e,path:r.path,parent:r});return It(r,s)}"~validate"(e){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:X(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:n});return se(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),n.common={issues:[],async:true};}return this._parseAsync({data:e,path:[],parent:n}).then(r=>se(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:true},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:X(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(Ce(s)?s:Promise.resolve(s));return It(r,i)}refine(e,n){let r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{let o=e(s),a=()=>i.addIssue({code:d.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?true:(a(),false)):o?true:(a(),false)})}refinement(e,n){return this._refinement((r,s)=>e(r)?true:(s.addIssue(typeof n=="function"?n(r,s):n),false))}_refinement(e){return new Z({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)};}optional(){return V.create(this,this._def)}nullable(){return J.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ne.create(this)}promise(){return ae.create(this,this._def)}or(e){return ye.create([this,e],this._def)}and(e){return ve.create(this,e,this._def)}transform(e){return new Z({...v(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new ke({...v(this._def),innerType:this,defaultValue:n,typeName:g.ZodDefault})}brand(){return new Le({typeName:g.ZodBranded,type:this,...v(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new Te({...v(this._def),innerType:this,catchValue:n,typeName:g.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return $e.create(this,e)}readonly(){return Ee.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},vn=/^c[^\s-]{8,}$/i,xn=/^[0-9a-z]+$/,bn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_n=/^[a-z0-9_-]{21}$/i,kn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,En=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",at,Cn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Rn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Mn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,In=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,On=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,An=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,At="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Pn=new RegExp(`^${At}$`);function Pt(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Nn(t){return new RegExp(`^${Pt(t)}$`)}function Nt(t){let e=`${At}T${Pt(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Ln(t,e){return !!((e==="v4"||!e)&&Cn.test(t)||(e==="v6"||!e)&&Mn.test(t))}function $n(t,e){if(!kn.test(t))return false;try{let[n]=t.split(".");if(!n)return !1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return !(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return false}}function jn(t,e){return !!((e==="v4"||!e)&&Rn.test(t)||(e==="v6"||!e)&&In.test(t))}var ie=class t extends w{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){let i=this._getOrReturnCtx(e);return u(i,{code:d.invalid_type,expected:p.string,received:i.parsedType}),m}let r=new M,s;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),r.dirty());else if(i.kind==="length"){let o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?u(s,{code:d.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&u(s,{code:d.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),r.dirty());}else if(i.kind==="email")En.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"email",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")at||(at=new RegExp(Sn,"u")),at.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"emoji",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"uuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")_n.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"nanoid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")vn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")xn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid2",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")bn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ulid",code:d.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data);}catch{s=this._getOrReturnCtx(e,s),u(s,{validation:"url",code:d.invalid_string,message:i.message}),r.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"regex",code:d.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Nt(i).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Nn(i).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Tn.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"duration",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Ln(e.data,i.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ip",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?$n(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"jwt",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?jn(e.data,i.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cidr",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?On.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64",code:d.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?An.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64url",code:d.invalid_string,message:i.message}),r.dirty()):k.assertNever(i);return {status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??false,local:e?.local??false,...h.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...h.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...h.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...h.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...h.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...h.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...h.errToObj(n)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return !!this._def.checks.find(e=>e.kind==="date")}get isTime(){return !!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return !!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return !!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return !!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return !!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};ie.create=t=>new ie({checks:[],typeName:g.ZodString,coerce:t?.coerce??false,...v(t)});function Hn(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}var ue=class t extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){let i=this._getOrReturnCtx(e);return u(i,{code:d.invalid_type,expected:p.number,received:i.parsedType}),m}let r,s=new M;for(let i of this._def.checks)i.kind==="int"?k.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),s.dirty()):i.kind==="multipleOf"?Hn(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_finite,message:i.message}),s.dirty()):k.assertNever(i);return {status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,true,h.toString(n))}gt(e,n){return this.setLimit("min",e,false,h.toString(n))}lte(e,n){return this.setLimit("max",e,true,h.toString(n))}lt(e,n){return this.setLimit("max",e,false,h.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:false,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:false,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:true,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:true,message:h.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return true;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);}return Number.isFinite(n)&&Number.isFinite(e)}};ue.create=t=>new ue({checks:[],typeName:g.ZodNumber,coerce:t?.coerce||false,...v(t)});var pe=class t extends w{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data);}catch{return this._getInvalidInput(e)}if(this._getType(e)!==p.bigint)return this._getInvalidInput(e);let r,s=new M;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),u(r,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):k.assertNever(i);return {status:s.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:p.bigint,received:n.parsedType}),m}gte(e,n){return this.setLimit("min",e,true,h.toString(n))}gt(e,n){return this.setLimit("min",e,false,h.toString(n))}lte(e,n){return this.setLimit("max",e,true,h.toString(n))}lt(e,n){return this.setLimit("max",e,false,h.toString(n))}setLimit(e,n,r,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:h.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:h.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};pe.create=t=>new pe({checks:[],typeName:g.ZodBigInt,coerce:t?.coerce??false,...v(t)});var fe=class extends w{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.boolean,received:r.parsedType}),m}return O(e.data)}};fe.create=t=>new fe({typeName:g.ZodBoolean,coerce:t?.coerce||false,...v(t)});var he=class t extends w{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){let i=this._getOrReturnCtx(e);return u(i,{code:d.invalid_type,expected:p.date,received:i.parsedType}),m}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return u(i,{code:d.invalid_date}),m}let r=new M,s;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),r.dirty()):k.assertNever(i);return {status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};he.create=t=>new he({checks:[],coerce:t?.coerce||false,typeName:g.ZodDate,...v(t)});var Me=class extends w{_parse(e){if(this._getType(e)!==p.symbol){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.symbol,received:r.parsedType}),m}return O(e.data)}};Me.create=t=>new Me({typeName:g.ZodSymbol,...v(t)});var me=class extends w{_parse(e){if(this._getType(e)!==p.undefined){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.undefined,received:r.parsedType}),m}return O(e.data)}};me.create=t=>new me({typeName:g.ZodUndefined,...v(t)});var ge=class extends w{_parse(e){if(this._getType(e)!==p.null){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.null,received:r.parsedType}),m}return O(e.data)}};ge.create=t=>new ge({typeName:g.ZodNull,...v(t)});var oe=class extends w{constructor(){super(...arguments),this._any=true;}_parse(e){return O(e.data)}};oe.create=t=>new oe({typeName:g.ZodAny,...v(t)});var te=class extends w{constructor(){super(...arguments),this._unknown=true;}_parse(e){return O(e.data)}};te.create=t=>new te({typeName:g.ZodUnknown,...v(t)});var B=class extends w{_parse(e){let n=this._getOrReturnCtx(e);return u(n,{code:d.invalid_type,expected:p.never,received:n.parsedType}),m}};B.create=t=>new B({typeName:g.ZodNever,...v(t)});var Ie=class extends w{_parse(e){if(this._getType(e)!==p.undefined){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.void,received:r.parsedType}),m}return O(e.data)}};Ie.create=t=>new Ie({typeName:g.ZodVoid,...v(t)});var ne=class t extends w{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==p.array)return u(n,{code:d.invalid_type,expected:p.array,received:n.parsedType}),m;if(s.exactLength!==null){let o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(u(n,{code:o?d.too_big:d.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:s.exactLength.message}),r.dirty());}if(s.minLength!==null&&n.data.length<s.minLength.value&&(u(n,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:true,exact:false,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(u(n,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:true,exact:false,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new z(n,o,n.path,a)))).then(o=>M.mergeArray(r,o));let i=[...n.data].map((o,a)=>s.type._parseSync(new z(n,o,n.path,a)));return M.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:h.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:h.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:h.toString(n)}})}nonempty(e){return this.min(1,e)}};ne.create=(t,e)=>new ne({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...v(e)});function Re(t){if(t instanceof $){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=V.create(Re(r));}return new $({...t._def,shape:()=>e})}else return t instanceof ne?new ne({...t._def,type:Re(t.element)}):t instanceof V?V.create(Re(t.unwrap())):t instanceof J?J.create(Re(t.unwrap())):t instanceof Y?Y.create(t.items.map(e=>Re(e))):t}var $=class t extends w{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=k.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==p.object){let l=this._getOrReturnCtx(e);return u(l,{code:d.invalid_type,expected:p.object,received:l.parsedType}),m}let{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof B&&this._def.unknownKeys==="strip"))for(let l in s.data)o.includes(l)||a.push(l);let c=[];for(let l of o){let f=i[l],T=s.data[l];c.push({key:{status:"valid",value:l},value:f._parse(new z(s,T,s.path,l)),alwaysSet:l in s.data});}if(this._def.catchall instanceof B){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(l==="strict")a.length>0&&(u(s,{code:d.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let l=this._def.catchall;for(let f of a){let T=s.data[f];c.push({key:{status:"valid",value:f},value:l._parse(new z(s,T,s.path,f)),alwaysSet:f in s.data});}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of c){let T=await f.key,H=await f.value;l.push({key:T,value:H,alwaysSet:f.alwaysSet});}return l}).then(l=>M.mergeObjectSync(r,l)):M.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{let s=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:h.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of k.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of k.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Re(this)}partial(e){let n={};for(let r of k.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional();}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of k.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else {let i=this.shape[r];for(;i instanceof V;)i=i._def.innerType;n[r]=i;}return new t({...this._def,shape:()=>n})}keyof(){return Lt(k.objectKeys(this.shape))}};$.create=(t,e)=>new $({shape:()=>t,unknownKeys:"strip",catchall:B.create(),typeName:g.ZodObject,...v(e)});$.strictCreate=(t,e)=>new $({shape:()=>t,unknownKeys:"strict",catchall:B.create(),typeName:g.ZodObject,...v(e)});$.lazycreate=(t,e)=>new $({shape:t,unknownKeys:"strip",catchall:B.create(),typeName:g.ZodObject,...v(e)});var ye=class extends w{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new L(a.ctx.common.issues));return u(n,{code:d.invalid_union,unionErrors:o}),m}if(n.common.async)return Promise.all(r.map(async i=>{let o={...n,common:{...n.common,issues:[]},parent:null};return {result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of r){let l={...n,common:{...n.common,issues:[]},parent:null},f=c._parseSync({data:n.data,path:n.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues);}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new L(c));return u(n,{code:d.invalid_union,unionErrors:a}),m}}get options(){return this._def.options}};ye.create=(t,e)=>new ye({options:t,typeName:g.ZodUnion,...v(e)});var ee=t=>t instanceof xe?ee(t.schema):t instanceof Z?ee(t.innerType()):t instanceof be?[t.value]:t instanceof we?t.options:t instanceof _e?k.objectValues(t.enum):t instanceof ke?ee(t._def.innerType):t instanceof me?[void 0]:t instanceof ge?[null]:t instanceof V?[void 0,...ee(t.unwrap())]:t instanceof J?[null,...ee(t.unwrap())]:t instanceof Le||t instanceof Ee?ee(t.unwrap()):t instanceof Te?ee(t._def.innerType):[],qe=class t extends w{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==p.object)return u(n,{code:d.invalid_type,expected:p.object,received:n.parsedType}),m;let r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(u(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let s=new Map;for(let i of n){let o=ee(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,i);}}return new t({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...v(r)})}};function ct(t,e){let n=X(t),r=X(e);if(t===e)return {valid:true,data:t};if(n===p.object&&r===p.object){let s=k.objectKeys(e),i=k.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(let a of i){let c=ct(t[a],e[a]);if(!c.valid)return {valid:false};o[a]=c.data;}return {valid:true,data:o}}else if(n===p.array&&r===p.array){if(t.length!==e.length)return {valid:false};let s=[];for(let i=0;i<t.length;i++){let o=t[i],a=e[i],c=ct(o,a);if(!c.valid)return {valid:false};s.push(c.data);}return {valid:true,data:s}}else return n===p.date&&r===p.date&&+t==+e?{valid:true,data:t}:{valid:false}}var ve=class extends w{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(Ue(i)||Ue(o))return m;let a=ct(i.value,o.value);return a.valid?((Fe(i)||Fe(o))&&n.dirty(),{status:n.value,value:a.data}):(u(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ve.create=(t,e,n)=>new ve({left:t,right:e,typeName:g.ZodIntersection,...v(n)});var Y=class t extends w{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.array)return u(r,{code:d.invalid_type,expected:p.array,received:r.parsedType}),m;if(r.data.length<this._def.items.length)return u(r,{code:d.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),m;!this._def.rest&&r.data.length>this._def.items.length&&(u(r,{code:d.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),n.dirty());let i=[...r.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new z(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>M.mergeArray(n,o)):M.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Y.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Y({items:t,typeName:g.ZodTuple,rest:null,...v(e)})};var Be=class t extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.object)return u(r,{code:d.invalid_type,expected:p.object,received:r.parsedType}),m;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in r.data)s.push({key:i._parse(new z(r,a,r.path,a)),value:o._parse(new z(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?M.mergeObjectAsync(n,s):M.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof w?new t({keyType:e,valueType:n,typeName:g.ZodRecord,...v(r)}):new t({keyType:ie.create(),valueType:e,typeName:g.ZodRecord,...v(n)})}},Oe=class extends w{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.map)return u(r,{code:d.invalid_type,expected:p.map,received:r.parsedType}),m;let s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,c],l)=>({key:s._parse(new z(r,a,r.path,[l,"key"])),value:i._parse(new z(r,c,r.path,[l,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let l=await c.key,f=await c.value;if(l.status==="aborted"||f.status==="aborted")return m;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),a.set(l.value,f.value);}return {status:n.value,value:a}})}else {let a=new Map;for(let c of o){let l=c.key,f=c.value;if(l.status==="aborted"||f.status==="aborted")return m;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),a.set(l.value,f.value);}return {status:n.value,value:a}}}};Oe.create=(t,e,n)=>new Oe({valueType:e,keyType:t,typeName:g.ZodMap,...v(n)});var Ae=class t extends w{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==p.set)return u(r,{code:d.invalid_type,expected:p.set,received:r.parsedType}),m;let s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(u(r,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:true,exact:false,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(u(r,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:true,exact:false,message:s.maxSize.message}),n.dirty());let i=this._def.valueType;function o(c){let l=new Set;for(let f of c){if(f.status==="aborted")return m;f.status==="dirty"&&n.dirty(),l.add(f.value);}return {status:n.value,value:l}}let a=[...r.data.values()].map((c,l)=>i._parse(new z(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:h.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:h.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};Ae.create=(t,e)=>new Ae({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...v(e)});var We=class t extends w{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==p.function)return u(n,{code:d.invalid_type,expected:p.function,received:n.parsedType}),m;function r(a,c){return Ne({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Se(),Q].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:c}})}function s(a,c){return Ne({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Se(),Q].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ae){let a=this;return O(async function(...c){let l=new L([]),f=await a._def.args.parseAsync(c,i).catch(j=>{throw l.addIssue(r(c,j)),l}),T=await Reflect.apply(o,this,f);return await a._def.returns._def.type.parseAsync(T,i).catch(j=>{throw l.addIssue(s(T,j)),l})})}else {let a=this;return O(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new L([r(c,l.error)]);let f=Reflect.apply(o,this,l.data),T=a._def.returns.safeParse(f,i);if(!T.success)throw new L([s(f,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Y.create(e).rest(te.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Y.create([]).rest(te.create()),returns:n||te.create(),typeName:g.ZodFunction,...v(r)})}},xe=class extends w{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};xe.create=(t,e)=>new xe({getter:t,typeName:g.ZodLazy,...v(e)});var be=class extends w{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return u(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),m}return {status:"valid",value:e.data}}get value(){return this._def.value}};be.create=(t,e)=>new be({value:t,typeName:g.ZodLiteral,...v(e)});function Lt(t,e){return new we({values:t,typeName:g.ZodEnum,...v(e)})}var we=class t extends w{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return u(n,{expected:k.joinValues(r),received:n.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return u(n,{received:n.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};we.create=Lt;var _e=class extends w{_parse(e){let n=k.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==p.string&&r.parsedType!==p.number){let s=k.objectValues(n);return u(r,{expected:k.joinValues(s),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(k.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let s=k.objectValues(n);return u(r,{received:r.data,code:d.invalid_enum_value,options:s}),m}return O(e.data)}get enum(){return this._def.values}};_e.create=(t,e)=>new _e({values:t,typeName:g.ZodNativeEnum,...v(e)});var ae=class extends w{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==p.promise&&n.common.async===false)return u(n,{code:d.invalid_type,expected:p.promise,received:n.parsedType}),m;let r=n.parsedType===p.promise?n.data:Promise.resolve(n.data);return O(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ae.create=(t,e)=>new ae({type:t,typeName:g.ZodPromise,...v(e)});var Z=class extends w{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{u(r,o),o.fatal?n.abort():n.dirty();},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return m;let c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?m:c.status==="dirty"?le(c.value):n.value==="dirty"?le(c.value):c});{if(n.value==="aborted")return m;let a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?le(a.value):n.value==="dirty"?le(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===false){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?m:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===false){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!se(o))return m;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>se(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):m);k.assertNever(s);}};Z.create=(t,e,n)=>new Z({schema:t,typeName:g.ZodEffects,effect:e,...v(n)});Z.createWithPreprocess=(t,e,n)=>new Z({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...v(n)});var V=class extends w{_parse(e){return this._getType(e)===p.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V.create=(t,e)=>new V({innerType:t,typeName:g.ZodOptional,...v(e)});var J=class extends w{_parse(e){return this._getType(e)===p.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};J.create=(t,e)=>new J({innerType:t,typeName:g.ZodNullable,...v(e)});var ke=class extends w{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===p.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};ke.create=(t,e)=>new ke({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});var Te=class extends w{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ce(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new L(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Te.create=(t,e)=>new Te({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});var Pe=class extends w{_parse(e){if(this._getType(e)!==p.nan){let r=this._getOrReturnCtx(e);return u(r,{code:d.invalid_type,expected:p.nan,received:r.parsedType}),m}return {status:"valid",value:e.data}}};Pe.create=t=>new Pe({typeName:g.ZodNaN,...v(t)});var Dn=Symbol("zod_brand"),Le=class extends w{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},$e=class t extends w{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?m:i.status==="dirty"?(n.dirty(),le(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?m:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:g.ZodPipeline})}},Ee=class extends w{_parse(e){let n=this._def.innerType._parse(e),r=s=>(se(s)&&(s.value=Object.freeze(s.value)),s);return Ce(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}};Ee.create=(t,e)=>new Ee({innerType:t,typeName:g.ZodReadonly,...v(e)});function Ot(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function $t(t,e={},n){return t?oe.create().superRefine((r,s)=>{let i=t(r);if(i instanceof Promise)return i.then(o=>{if(!o){let a=Ot(e,r),c=a.fatal??n??true;s.addIssue({code:"custom",...a,fatal:c});}});if(!i){let o=Ot(e,r),a=o.fatal??n??true;s.addIssue({code:"custom",...o,fatal:a});}}):oe.create()}var Vn={object:$.lazycreate},g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})(g||(g={}));var zn=(t,e={message:`Input not instance of ${t.name}`})=>$t(n=>n instanceof t,e),jt=ie.create,Ht=ue.create,Zn=Pe.create,Un=pe.create,Dt=fe.create,Fn=he.create,qn=Me.create,Bn=me.create,Wn=ge.create,Kn=oe.create,Xn=te.create,Yn=B.create,Jn=Ie.create,Gn=ne.create,Qn=$.create,er=$.strictCreate,tr=ye.create,nr=qe.create,rr=ve.create,sr=Y.create,ir=Be.create,or=Oe.create,ar=Ae.create,cr=We.create,dr=xe.create,lr=be.create,ur=we.create,pr=_e.create,fr=ae.create,hr=Z.create,mr=V.create,gr=J.create,yr=Z.createWithPreprocess,vr=$e.create,xr=()=>jt().optional(),br=()=>Ht().optional(),wr=()=>Dt().optional(),_r={string:(t=>ie.create({...t,coerce:true})),number:(t=>ue.create({...t,coerce:true})),boolean:(t=>fe.create({...t,coerce:true})),bigint:(t=>pe.create({...t,coerce:true})),date:(t=>he.create({...t,coerce:true}))};var kr=m;var Tr=_.object({type:_.nativeEnum(N),timestamp:_.number().int().nonnegative(),data:_.unknown()}),Er=_.object({browser:_.string(),browserVersion:_.string(),os:_.string(),osVersion:_.string(),deviceType:_.enum(["desktop","mobile","tablet","unknown"]),userAgent:_.string().max(1024),platform:_.enum(["web","ios","android"]).optional()}),Sr=_.object({entryUrl:_.string().url().max(2048),currentUrl:_.string().url().max(2048),referrer:_.string().max(2048),device:Er,screen:_.object({width:_.number().int().nonnegative(),height:_.number().int().nonnegative(),dpr:_.number().nonnegative()}),language:_.string().max(35),timezone:_.string().max(64),environment:_.enum(["production","staging","development"]),releaseVersion:_.string().max(128).optional(),sdkVersion:_.string().max(32)});_.object({v:_.literal(1),projectId:_.string().min(1).max(64),sessionId:_.string().uuid(),seq:_.number().int().nonnegative(),anonymousId:_.string().min(1).max(64),userId:_.string().max(256).optional(),userTraits:_.record(_.unknown()).optional(),events:_.array(Tr).min(1).max(5e3),meta:Sr,sentAt:_.number().int().nonnegative()});function lt(t){let e=/Edg\/|EdgiOS\//.test(t)?"Edge":/OPR\/|OPiOS\//.test(t)?"Opera":/Chrome\/|CriOS\//.test(t)?"Chrome":/Firefox\/|FxiOS\//.test(t)?"Firefox":/Safari\//.test(t)?"Safari":"Unknown",n=t.match(/(?:EdgiOS|Edg|OPiOS|OPR|CriOS|Chrome|FxiOS|Firefox|Version)\/(\d+)/)?.[1]??"0",r=/Windows/.test(t)?"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/Mac OS X|Macintosh/.test(t)?"macOS":/Linux/.test(t)?"Linux":"Unknown",s=/iPad|Tablet/.test(t)||/Android/.test(t)&&!/Mobi/.test(t)?"tablet":/Mobi|Android|iPhone|iPod/.test(t)?"mobile":"desktop",i=(t.match(/(?:iPhone OS|CPU OS) ([\d_]+)/)?.[1]??t.match(/(?:Windows NT|Mac OS X|Android) ([\d._]+)/)?.[1]??"").replace(/_/g,".");return {browser:e,browserVersion:n,os:r,osVersion:i,deviceType:s,userAgent:t.slice(0,1024)}}var Rr=new Set(["password","email","tel","number","hidden"]),Mr=["cc-number","cc-csc","cc-exp","cc-name","current-password","new-password","one-time-code"],Ir=/(pass(word)?|card|cvv|cvc|ccv|iban|ssn|tckn|national|secret|token|pin)/i;function Vt(t){if(t instanceof HTMLInputElement&&Rr.has(t.type))return true;let e=t.getAttribute("autocomplete")?.toLowerCase()??"";if(Mr.some(r=>e.includes(r)))return true;let n=`${t.getAttribute("name")??""} ${t.id??""} ${t.getAttribute("aria-label")??""}`;return Ir.test(n)}var zt="0123456789abcdef";function Zt(t){let e=new Uint8Array(t),n=globalThis.crypto;if(n?.getRandomValues)n.getRandomValues(e);else for(let s=0;s<t;s++)e[s]=Math.floor(Math.random()*256);let r="";for(let s of e)r+=zt[s>>4&15]+zt[s&15];return r}function Ut(){let t=Zt(16);return t==="0".repeat(32)?Ut():t}function Ft(){let t=Zt(8);return t==="0".repeat(16)?Ft():t}function Or(t,e,n=true){return `00-${t}-${e}-${n?"01":"00"}`}function ut(t,e,n){let r;try{r=new URL(t,n);}catch{return true}return r.origin===n?true:e.some(s=>typeof s=="string"?r.href.includes(s):s.test(r.href))}function pt(t){let e=Ut();return {traceId:e,traceparent:Or(e,Ft()),baggage:`replayops.session_id=${encodeURIComponent(t)}`}}function U(t,e){return {type:N.Plugin,timestamp:Date.now(),data:{plugin:t,payload:e}}}function Bt(t){let e=["log","info","warn","error","debug"],n={};for(let r of e)n[r]=console[r].bind(console),console[r]=(...s)=>{t(U(I.Console,{level:r,args:s.map(Pr).slice(0,10)})),n[r](...s);};return ()=>{for(let r of e)console[r]=n[r];}}function Wt(t){let e=r=>{let s=r.target,i=s&&s!==r.currentTarget?s.src||s.href:void 0;if(!r.message&&i){t(U(I.Error,{kind:"resource",message:"Failed to load resource",source:i}));return}r.message&&t(U(I.Error,{kind:"error",message:r.message,source:r.filename,line:r.lineno,column:r.colno,stack:r.error?.stack?.slice(0,4e3)}));},n=r=>t(U(I.Error,{kind:"unhandledrejection",message:String(r.reason?.message??r.reason),stack:r.reason?.stack?.slice(0,4e3)}));return window.addEventListener("error",e,true),window.addEventListener("unhandledrejection",n),()=>{window.removeEventListener("error",e,true),window.removeEventListener("unhandledrejection",n);}}function Kt(t,e,n={}){let r=!!n.bodies,s=n.selfEndpoint?n.selfEndpoint.replace(/\/$/,""):void 0,i=x=>{if(!s)return false;try{return new URL(x,location.href).href.startsWith(s)}catch{return x.startsWith(s)}},o=window.fetch;window.fetch=async(...x)=>{let b=Date.now(),S=typeof x[0]=="string"?x[0]:x[0].url;if(i(S))return o(...x);let A=(x[1]?.method??x[0]?.method??"GET").toUpperCase(),D=e?Ar(x,S,e):void 0,K={};if(r){let q=$r(x[1]?.headers??(x[0]instanceof Request?x[0].headers:void 0)),de=typeof x[1]?.body=="string"?x[1].body:void 0;K=qt(de,q);}try{let q=await o(...x),de={};return r&&(de=await Hr(q)),t(U(I.Network,{type:"fetch",url:S,method:A,status:q.status,durationMs:Date.now()-b,...D?{traceId:D}:{},...K,...de})),q}catch(q){throw t(U(I.Network,{type:"fetch",url:S,method:A,status:0,error:String(q),durationMs:Date.now()-b,...D?{traceId:D}:{},...K})),q}};let c=window.XMLHttpRequest.prototype,l=c.open,f=c.send,T=c.setRequestHeader;c.open=function(x,b,...S){return this.__ro={method:x,url:b,started:0,reqHeaders:{}},l.call(this,x,b,...S)},c.setRequestHeader=function(x,b){let S=this.__ro;return S&&r&&(S.reqHeaders[x]=b),T.call(this,x,b)},c.send=function(...x){let b=this.__ro,S={};if(b){if(b.started=Date.now(),r){let A=typeof x[0]=="string"?x[0]:void 0;S=qt(A,Xe(b.reqHeaders));}if(e&&ut(b.url,e.targets,location.origin)){let A=pt(e.sessionId);try{this.setRequestHeader("traceparent",A.traceparent),this.setRequestHeader("baggage",A.baggage),b.traceId=A.traceId;}catch{}}}return this.addEventListener("loadend",()=>{if(!b||i(b.url))return;let A={};if(r){let D=this.getResponseHeader("content-type")??void 0,K=this.responseType===""||this.responseType==="text"?this.responseText:void 0;A={...K!=null?{resBody:ft(ht(K,D))}:{},resHeaders:jr(this.getAllResponseHeaders())};}t(U(I.Network,{type:"xhr",url:b.url,method:b.method,status:this.status,durationMs:Date.now()-b.started,...b.traceId?{traceId:b.traceId}:{},...S,...A}));}),f.apply(this,x)};let H=1500,j=0,W;try{W=new PerformanceObserver(x=>{for(let b of x.getEntries()){if(j>=H)return;let S=b.initiatorType;S==="fetch"||S==="xmlhttprequest"||b.name.startsWith("data:")||i(b.name)||(j++,t({type:N.Plugin,timestamp:Math.round(performance.timeOrigin+b.startTime+b.duration),data:{plugin:I.Network,payload:{type:"resource",initiator:S,url:b.name,status:b.responseStatus??0,durationMs:Math.round(b.duration),...b.transferSize?{sizeBytes:b.transferSize}:{}}}}));}}),W.observe({type:"resource",buffered:!0});}catch{}return ()=>{window.fetch=o,c.open=l,c.send=f,c.setRequestHeader=T,W?.disconnect();}}function Ar(t,e,n){if(!ut(e,n.targets,location.origin))return;let r=pt(n.sessionId);if(t[0]instanceof Request){let o=new Headers(t[0].headers);return o.set("traceparent",r.traceparent),o.set("baggage",r.baggage),t[0]=new Request(t[0],{headers:o}),r.traceId}let s=t[1]??={},i=new Headers(s.headers);return i.set("traceparent",r.traceparent),i.set("baggage",r.baggage),s.headers=i,r.traceId}function Xt(t){let e=new PerformanceObserver(n=>{for(let r of n.getEntries())(r.entryType==="longtask"||r.entryType==="navigation")&&t(U(I.Performance,{entryType:r.entryType,name:r.name,startTime:Math.round(r.startTime),duration:Math.round(r.duration)}));});try{e.observe({entryTypes:["longtask","navigation"]});}catch{}return ()=>e.disconnect()}function Yt(t){let e=[],n=(s,i)=>{try{let o=new PerformanceObserver(a=>a.getEntries().forEach(i));o.observe({type:s,buffered:!0}),e.push(()=>o.disconnect());}catch{}};n("largest-contentful-paint",s=>t(U(I.WebVitals,{metric:"LCP",value:Math.round(s.startTime)}))),n("first-input",s=>{let i=s.processingStart-s.startTime;t(U(I.WebVitals,{metric:"FID",value:Math.round(i)}));});let r=0;return n("layout-shift",s=>{let i=s;i.hadRecentInput||(r+=i.value,t(U(I.WebVitals,{metric:"CLS",value:Number(r.toFixed(4))})));}),()=>e.forEach(s=>s())}function Pr(t){try{return typeof t=="string"?t:JSON.stringify(t)}catch{return String(t)}}var Ke=8192,Nr=/^(authorization|cookie|set-cookie|proxy-authorization|x-api-key|x-auth-token|x-csrf-token)$/i,Lr=/(pass|secret|token|auth|credit|card|cvv|ssn|api[-_]?key)/i;function ft(t){return t.length>Ke?`${t.slice(0,Ke)}\u2026[truncated]`:t}function ht(t,e){if(!(e&&/json/i.test(e)||/^\s*[[{]/.test(t)))return t;try{let r=s=>{if(Array.isArray(s))return s.map(r);if(s&&typeof s=="object"){let i={};for(let o of Object.keys(s))i[o]=Lr.test(o)?"***":r(s[o]);return i}return s};return JSON.stringify(r(JSON.parse(t)))}catch{return t}}function $r(t){let e={};return t?(new Headers(t).forEach((n,r)=>e[r]=n),Xe(e)):e}function Xe(t){let e={};for(let n of Object.keys(t))e[n]=Nr.test(n)?"***":t[n];return e}function jr(t){let e={};for(let n of t.trim().split(/\r?\n/)){let r=n.indexOf(":");r>0&&(e[n.slice(0,r).trim()]=n.slice(r+1).trim());}return Xe(e)}function qt(t,e,n){let r={reqHeaders:e};if(t!=null){r.reqBody=ft(ht(t,e["content-type"]));let s=Vr(t);s&&Object.assign(r,s);}return r}async function Hr(t){let e={resHeaders:Dr(t.headers)},n=t.headers.get("content-type")??"",r=Number(t.headers.get("content-length")??0);if((/json|text|xml|javascript|graphql/i.test(n)||!n&&r>0&&r<Ke*8)&&r<Ke*8)try{let i=await t.clone().text();e.resBody=ft(ht(i,n));}catch{}return e}function Dr(t){let e={};return t.forEach((n,r)=>e[r]=n),Xe(e)}function Vr(t){try{let e=JSON.parse(t),n=Array.isArray(e)?e[0]:e,r=n?.query;if(typeof r!="string")return;let s=r.match(/\b(query|mutation|subscription)\b\s+([A-Za-z0-9_]+)?/),i=typeof n.operationName=="string"?n.operationName:s?.[2];return {operationType:s?.[1]??"query",...i?{operationName:i}:{}}}catch{return}}function Jt(t){let e=0,n=0,r=()=>{e++,n=requestAnimationFrame(r);};n=requestAnimationFrame(r);let s=setInterval(()=>{let i=performance.memory;t(U(I.Performance,{sample:true,fps:e/2,domNodes:document.getElementsByTagName("*").length,...i?{memoryMB:Math.round(i.usedJSHeapSize/1048576*10)/10}:{}})),e=0;},2e3);return ()=>{clearInterval(s),cancelAnimationFrame(n);}}var Ye=class{constructor(e,n,r=""){this.config=e;this.emit=n;this.sessionId=r;}config;emit;sessionId;stopFns=[];rrwebStop;start(){this.beginRecording();}beginRecording(){if(this.rrwebStop)return;let e=["[data-mask]","[data-private]",...this.config.maskSelectors].filter(Boolean).join(","),n=["[data-ignore]",...this.config.ignoreSelectors].filter(Boolean).join(",");if(this.rrwebStop=record({emit:r=>this.emit(r),checkoutEveryNms:6e4,maskAllInputs:this.config.maskInputs,maskTextSelector:e||void 0,blockSelector:n||void 0,maskInputFn:(r,s)=>this.config.maskInputs||Vt(s)?"\u2022".repeat(r.length):r,recordCanvas:false,sampling:{mousemove:true,scroll:150,input:"last"}}),this.config.recordConsole&&this.stopFns.push(Bt(this.emit)),this.config.recordErrors&&this.stopFns.push(Wt(this.emit)),this.config.recordNetwork){let r=this.config.tracePropagation&&this.sessionId?{sessionId:this.sessionId,targets:this.config.tracePropagationTargets}:void 0;this.stopFns.push(Kt(this.emit,r,{bodies:this.config.recordNetworkBodies,selfEndpoint:this.config.endpoint}));}this.config.capturePerformance&&this.stopFns.push(Xt(this.emit)),this.config.captureMemory&&this.stopFns.push(Jt(this.emit)),this.config.captureWebVitals&&this.stopFns.push(Yt(this.emit));}emitCustom(e,n){this.emit({type:N.Custom,timestamp:Date.now(),data:{tag:e,payload:n}});}takeFullSnapshot(){try{record.takeFullSnapshot(!0);}catch{}}stop(){this.rrwebStop?.(),this.rrwebStop=void 0;for(let e of this.stopFns)e();this.stopFns=[];}};var Je=class t{constructor(e,n){this.sessionId=e;this.opts=n;this.url=`${n.endpoint.replace(/\/$/,"")}/v1/collect`;}sessionId;opts;buffer=[];seq=0;timer;url;start(){this.timer=setInterval(()=>this.flush(),this.opts.flushIntervalMs),window.addEventListener("pagehide",this.flushBeacon),document.addEventListener("visibilitychange",this.onVisibility);}enqueue(e){this.buffer.push(e),(e.type===N.FullSnapshot||this.buffer.length>=this.opts.batchSize)&&this.flush();}stop(){this.timer&&clearInterval(this.timer),window.removeEventListener("pagehide",this.flushBeacon),document.removeEventListener("visibilitychange",this.onVisibility),this.flushBeacon();}onVisibility=()=>{document.visibilityState==="hidden"&&this.flushBeacon();};drain(){if(this.buffer.length===0)return null;let e=this.buffer;this.buffer=[];let n=this.opts.getIdentity();return {v:1,projectId:this.opts.projectId,sessionId:this.sessionId,seq:this.seq++,anonymousId:n.anonymousId,userId:n.userId,userTraits:n.userTraits,events:e,meta:this.opts.getMeta(),sentAt:Date.now()}}static GZIP_THRESHOLD_BYTES=64*1024;preferPlain=false;static GZIP_DEADLINE_MS=2e3;async encodeBody(e){if(this.preferPlain||e.length<t.GZIP_THRESHOLD_BYTES||typeof CompressionStream>"u")return {body:e};try{let n=await new Promise(r=>{let s=setTimeout(()=>r(null),t.GZIP_DEADLINE_MS);try{let i=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));new Response(i).blob().then(o=>{clearTimeout(s),r(o);}).catch(()=>{clearTimeout(s),r(null);});}catch{clearTimeout(s),r(null);}});return n?{body:n,encoding:"gzip"}:(this.preferPlain=!0,{body:e})}catch{return {body:e}}}async flush(){let e=this.drain();if(!e)return;let{body:n,encoding:r}=await this.encodeBody(JSON.stringify(e));try{let s=await fetch(this.url,{method:"POST",headers:{"content-type":"application/json",...r?{"content-encoding":r}:{},"x-api-key":this.opts.apiKey},body:n,credentials:"omit",mode:"cors",signal:typeof AbortSignal<"u"&&"timeout"in AbortSignal?AbortSignal.timeout(6e4):void 0});s.ok||(r?(this.preferPlain=!0,this.buffer.unshift(...e.events),this.seq--):s.status===429||s.status>=500?(this.buffer.unshift(...e.events),this.seq--):console.warn(`[replayops] collector rejected batch seq=${e.seq} with ${s.status}`+(s.status===413?" \u2014 payload too large; this session may not be replayable. Raise the ingest body limit.":"")));}catch{r&&(this.preferPlain=true),this.buffer.unshift(...e.events),this.seq--;}}flushBeacon=()=>{let e=this.drain();e&&fetch(this.url,{method:"POST",headers:{"content-type":"application/json","x-api-key":this.opts.apiKey},body:JSON.stringify(e),keepalive:true,credentials:"omit",mode:"cors"}).catch(()=>{});}};var Qt=["#ef4444","#f59e0b","#22c55e","#3b82f6"],Ge=null;function zr(t){let e=window;return e.html2canvas?Promise.resolve(e.html2canvas):Ge||(Ge=new Promise((n,r)=>{let s=document.createElement("script");s.src=`${t}/sdk/v1/html2canvas.min.js`,s.async=true,s.onload=()=>e.html2canvas?n(e.html2canvas):r(new Error("html2canvas missing")),s.onerror=()=>r(new Error("html2canvas failed to load")),document.head.appendChild(s);}),Ge)}var mt=null;async function en(t){if(mt)return;let e=t.endpoint.replace(/\/$/,""),n=await Fr();if(!n){let s=F("","position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:2147483646;background:#111827;color:#fff;font:600 13px system-ui,sans-serif;padding:8px 14px;border-radius:8px;box-shadow:0 6px 24px rgba(0,0,0,.3)");s.textContent="\u{1F41E} Capturing the screen\u2026",s.setAttribute("data-ignore",""),document.body.appendChild(s);try{n=await(await zr(e))(document.documentElement,{backgroundColor:"#ffffff",useCORS:!0,logging:!1,scale:Math.min(2,window.devicePixelRatio||1),ignoreElements:o=>o instanceof HTMLElement&&o.hasAttribute("data-ignore"),x:window.scrollX,y:window.scrollY,width:window.innerWidth,height:window.innerHeight,windowWidth:document.documentElement.scrollWidth,windowHeight:document.documentElement.scrollHeight});}catch{s.remove(),nn(e,t,null);return}s.remove();}let r=Xr(n,1600);qr(e,t,r);}var ce=null;function Zr(t){return !!t&&t.getVideoTracks().some(e=>e.readyState==="live")}async function Ur(t){if(Zr(ce))return ce;ce=null;try{let e=await t.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"});return e.getVideoTracks().forEach(n=>n.onended=()=>{ce===e&&(ce=null);}),ce=e,e}catch{return null}}async function Fr(){let t=navigator.mediaDevices;if(!t?.getDisplayMedia)return null;let e=await Ur(t);if(!e)return null;let n=document.createElement("style");n.setAttribute("data-ignore",""),n.textContent="[data-ignore]{visibility:hidden !important}",document.head.appendChild(n);try{let r=document.createElement("video");r.srcObject=e,r.muted=!0,await r.play(),await new Promise(a=>setTimeout(a,200));let s=r.videoWidth||window.innerWidth,i=r.videoHeight||window.innerHeight,o=document.createElement("canvas");return o.width=s,o.height=i,o.getContext("2d").drawImage(r,0,0,s,i),r.srcObject=null,o}catch{return null}finally{n.remove();}}function tn(){ce?.getTracks().forEach(t=>t.stop()),ce=null;}function qr(t,e,n){let r=document.createElement("style");r.setAttribute("data-ignore",""),r.textContent="@media (max-width:760px){.ro-tester-root{flex-direction:column !important}.ro-tester-stage{flex:1 1 45% !important;min-height:0;padding:8px !important}.ro-tester-panel{width:100% !important;flex:1 1 55% !important;min-height:0}}",document.head.appendChild(r);let s=F("ro-tester-root","position:fixed;inset:0;z-index:2147483646;background:rgba(15,23,42,.82);display:flex;font-family:system-ui,-apple-system,sans-serif");s.setAttribute("data-ignore","");let i=F("ro-tester-stage","flex:1;min-width:0;display:grid;place-items:center;padding:16px;overflow:auto"),o=document.createElement("canvas");o.width=n.width,o.height=n.height,o.style.cssText="max-width:100%;max-height:100%;box-shadow:0 8px 40px rgba(0,0,0,.5);cursor:crosshair;touch-action:none;background:#fff",i.appendChild(o);let a=o.getContext("2d"),c=[],l="rect",f=Qt[0],T=null,H=()=>Math.max(2,Math.round(o.width/320)),j=()=>Math.max(16,Math.round(o.width/40)),W=y=>{if(a.strokeStyle=y.color,a.fillStyle=y.color,a.lineWidth=H(),a.lineJoin=a.lineCap="round",y.tool==="text"){let P=y.points[0];P&&y.text&&(a.font=`700 ${j()}px system-ui,sans-serif`,a.textBaseline="top",y.text.split(`
|
|
2
|
-
`).forEach((re,ln)=>a.fillText(re,P.x,P.y+ln*j()*1.25)));return}if(y.tool==="pen"){a.beginPath(),y.points.forEach((P,re)=>re?a.lineTo(P.x,P.y):a.moveTo(P.x,P.y)),a.stroke();return}if(y.points.length<2)return;let E=y.points[0],C=y.points[y.points.length-1];if(y.tool==="rect")a.strokeRect(E.x,E.y,C.x-E.x,C.y-E.y);else {a.beginPath(),a.moveTo(E.x,E.y),a.lineTo(C.x,C.y),a.stroke();let P=Math.atan2(C.y-E.y,C.x-E.x),re=H()*4;a.beginPath(),a.moveTo(C.x,C.y),a.lineTo(C.x-re*Math.cos(P-Math.PI/6),C.y-re*Math.sin(P-Math.PI/6)),a.lineTo(C.x-re*Math.cos(P+Math.PI/6),C.y-re*Math.sin(P+Math.PI/6)),a.closePath(),a.fill();}},x=()=>{a.clearRect(0,0,o.width,o.height),a.drawImage(n,0,0),c.forEach(W),T&&W(T);};x();let b=y=>{let E=o.getBoundingClientRect();return {x:(y.clientX-E.left)/E.width*o.width,y:(y.clientY-E.top)/E.height*o.height}};o.addEventListener("pointerdown",y=>{if(l==="text"){y.preventDefault();let E=b(y);Kr(y.clientX,y.clientY,f,C=>{C.trim()&&(c.push({tool:"text",color:f,points:[E],text:C}),x());});return}o.setPointerCapture(y.pointerId),T={tool:l,color:f,points:[b(y)]};}),o.addEventListener("pointermove",y=>{if(!T)return;let E=b(y);T.tool==="pen"?T.points.push(E):T.points[1]=E,x();}),o.addEventListener("pointerup",()=>{if(!T)return;let y=T;T=null,(y.tool==="pen"?y.points.length>1:y.points.length>=2)&&c.push(y),x();});let S=F("ro-tester-panel","width:320px;flex-shrink:0;background:#fff;display:flex;flex-direction:column;color:#0f172a;min-height:0");S.innerHTML='<div style="padding:14px 16px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #e2e8f0"><span style="font-size:18px">\u{1F41E}</span><b style="font-size:16px">Tester mode</b></div>';let A=F("","padding:14px 16px;overflow-y:auto;flex:1");S.appendChild(A);let D=F("","display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px"),K={};[["rect","\u25AD"],["arrow","\u2197"],["pen","\u270E"],["text","T"]].forEach(([y,E])=>{let C=je(E,"width:34px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font-size:15px;cursor:pointer");C.onclick=()=>{l=y,Object.values(K).forEach(P=>P.style.background="#fff"),C.style.background="#e0e7ff";},K[y]=C,D.appendChild(C);}),K.rect.style.background="#e0e7ff",Qt.forEach(y=>{let E=F("",`width:22px;height:22px;border-radius:50%;background:${y};cursor:pointer;border:2px solid ${y===f?"#fff":"transparent"};outline:2px solid ${y===f?y:"transparent"}`);E.onclick=()=>{f=y,[...D.querySelectorAll("[data-swatch]")].forEach(C=>{C.style.border="2px solid transparent",C.style.outline="2px solid transparent";}),E.style.border="2px solid #fff",E.style.outline=`2px solid ${y}`;},E.setAttribute("data-swatch",""),D.appendChild(E);});let q=je("\u21B6","margin-left:auto;width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");q.onclick=()=>{c.pop(),x();};let de=je("\u{1F5D1}","width:32px;height:32px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;cursor:pointer");de.onclick=()=>{c.length=0,x();},D.append(q,de),A.appendChild(D);let De=document.createElement("textarea");De.placeholder="What's wrong on this page? (optional \u2014 AI will draft it)",De.style.cssText="width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;min-height:90px;resize:vertical";let bt=F("","font-size:12px;color:#64748b;margin-top:10px;word-break:break-all"),nt=document.createElement("b");nt.style.color="#334155",nt.textContent="URL ",bt.append(nt,document.createTextNode(location.href)),A.append(Wr("What's wrong?",De),bt);let wt=F("","display:flex;gap:8px;padding:14px 16px;border-top:1px solid #e2e8f0"),_t=je("Cancel","flex:1;padding:10px;border:1px solid #cbd5e1;background:#fff;border-radius:8px;font:inherit;cursor:pointer"),Ve=je("Open ticket","flex:1;padding:10px;border:0;background:#0d9488;color:#fff;border-radius:8px;font:600 14px system-ui;cursor:pointer");wt.append(_t,Ve),S.appendChild(wt),s.append(i,S),document.body.appendChild(s);let rt=()=>{s.remove(),r.remove(),mt=null;};mt=rt,_t.onclick=rt,Ve.onclick=()=>{Ve.disabled=true,Ve.textContent="Opening\u2026";let y=o.toDataURL("image/jpeg",.85);nn(t,e,{title:"",note:De.value.trim(),screenshot:y}),rt();};}function nn(t,e,n){let r=new URLSearchParams({key:e.apiKey,url:location.href,sid:e.sessionId}),s=`${t}/tester-report.html?${r.toString()}`,i=window.open(s,"replayops-tester","width=480,height=680");if(!i){Br(s);return}if(!n)return;let o=a=>{a.origin!==t||!a.data||a.data.type!=="ro-tester:popup-ready"||(window.removeEventListener("message",o),i.postMessage({type:"ro-tester:payload",...n},t));};window.addEventListener("message",o);}function Br(t){let e=F("","position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483647;max-width:min(420px,calc(100vw - 32px));background:#0f172a;color:#fff;padding:14px 16px;border-radius:12px;font:14px system-ui;box-shadow:0 12px 40px rgba(0,0,0,.35)");e.setAttribute("data-ignore","");let n=document.createElement("div");n.textContent="ReplayOps could not open the report window \u2014 your browser or app blocked it.";let r=document.createElement("a");r.href=t,r.target="_blank",r.rel="noopener",r.textContent="Open the report form",r.style.cssText="color:#5eead4;display:inline-block;margin-top:8px",e.append(n,r),document.body.appendChild(e),setTimeout(()=>e.remove(),12e3);}function F(t,e){let n=document.createElement("div");return t&&(n.className=t),n.style.cssText=e,n}function je(t,e){let n=document.createElement("button");return n.type="button",n.textContent=t,n.style.cssText=e,n}function Wr(t,e){let n=F("","margin-bottom:4px"),r=F("","font-size:12px;font-weight:700;color:#475569;margin:8px 0 4px");return r.textContent=t,n.append(r,e),n}function Kr(t,e,n,r){let s=document.createElement("input");s.setAttribute("data-ignore",""),s.placeholder="Type, then Enter";let i=Math.min(t,window.innerWidth-180),o=Math.min(e,window.innerHeight-40);s.style.cssText=`position:fixed;left:${i}px;top:${o}px;z-index:2147483647;font:700 15px system-ui;color:${n};background:rgba(255,255,255,.98);border:2px solid ${n};border-radius:4px;padding:4px 8px;outline:none;min-width:140px;box-shadow:0 4px 16px rgba(0,0,0,.25)`;let a=false,c=()=>{if(a)return;a=true;let l=s.value;s.remove(),r(l);};s.addEventListener("keydown",l=>{l.stopPropagation(),l.key==="Enter"&&(l.preventDefault(),c()),l.key==="Escape"&&(s.value="",c());}),document.body.appendChild(s),setTimeout(()=>{s.focus(),setTimeout(()=>s.addEventListener("blur",c),60);},0);}function Xr(t,e){if(t.width<=e)return t;let n=e/t.width,r=document.createElement("canvas");return r.width=e,r.height=Math.round(t.height*n),r.getContext("2d").drawImage(t,0,0,r.width,r.height),r}var Yr=1e4,Jr=3e3;function Gr(){let t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}var Qe=class{constructor(e){this.opts=e;}opts;ws;heartbeat;watching=false;closed=false;claim=Gr();lifecycleOff=[];widget;control;start(){this.opts.chat&&(this.widget=new gt(e=>this.sendChat(e),()=>this.openTesterMode())),this.connect(),this.patchHistory(),this.watchLifecycle();}watchLifecycle(){let e=()=>{if(this.closed)return;let i=this.ws?.readyState;i===WebSocket.OPEN||i===WebSocket.CONNECTING||this.connect();},n=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close();},r=()=>document.visibilityState==="visible"?e():void 0,s=(i,o,a)=>{i.addEventListener(o,a),this.lifecycleOff.push(()=>i.removeEventListener(o,a));};s(window,"pagehide",n),s(window,"pageshow",e),s(window,"online",e),s(document,"visibilitychange",r);}openTesterMode(){en({endpoint:this.opts.endpoint,apiKey:this.opts.apiKey,sessionId:this.opts.sessionId});}feedEvent(e){this.watching&&this.send({t:"evt",e});}stop(){this.closed=true;for(let e of this.lifecycleOff)e();this.lifecycleOff=[],this.heartbeat&&clearInterval(this.heartbeat),this.ws?.close(),this.widget?.destroy(),tn(),this.endControl();}wsUrl(){return `${this.opts.endpoint.replace(/^http/,"ws").replace(/\/$/,"")}/ws/live?key=${encodeURIComponent(this.opts.apiKey)}`}connect(){if(this.closed)return;let e=this.ws?.readyState;if(e===WebSocket.OPEN||e===WebSocket.CONNECTING)return;let n;try{n=new WebSocket(this.wsUrl());}catch{return}this.ws=n,n.onopen=()=>{this.send({t:"hello",sessionId:this.opts.sessionId,claim:this.claim,url:location.href,identity:this.opts.getIdentity(),meta:this.opts.getMeta()}),this.heartbeat=setInterval(()=>this.send({t:"ping"}),Yr);},n.onmessage=r=>{let s;try{s=JSON.parse(String(r.data));}catch{return}s.t==="watch"?(this.watching=!!s.on,s.on?(this.send({t:"evt",e:{type:4,timestamp:Date.now(),data:{href:location.href,width:window.innerWidth,height:window.innerHeight}}}),this.opts.onWatchStart()):this.endControl()):s.t==="chat"&&typeof s.text=="string"?this.widget?.receive(s.text):s.t==="control-request"?this.onControlRequest():s.t==="control-cmd"&&s.cmd?this.control?.apply(s.cmd):s.t==="control-end"&&this.endControl();},n.onclose=()=>{this.heartbeat&&clearInterval(this.heartbeat),this.watching=false,this.closed||setTimeout(()=>this.connect(),Jr);},n.onerror=()=>n.close();}sendChat(e){this.send({t:"chat",text:e});}onControlRequest(){this.opts.remoteControl===false||this.control||Qr(()=>this.grantControl(),()=>this.send({t:"control",on:false}));}grantControl(){this.control||(this.send({t:"control",on:true}),this.control=new yt(()=>{this.send({t:"control",on:false}),this.endControl();}));}endControl(){this.control?.destroy(),this.control=void 0;}send(e){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify(e));}patchHistory(){let e=()=>this.send({t:"nav",url:location.href}),n=r=>{let s=history[r];history[r]=function(...i){let o=s.apply(this,i);return e(),o};};n("pushState"),n("replaceState"),window.addEventListener("popstate",e);}},gt=class{constructor(e,n){this.onSend=e;vt(),this.root=R("div","ro-live-root"),this.root.setAttribute("data-ignore","");let r=R("button","ro-live-launcher");r.setAttribute("aria-label","Chat"),r.innerHTML="\u{1F4AC}",this.badge=R("span","ro-live-badge"),this.badge.style.display="none",r.appendChild(this.badge),r.onclick=()=>this.toggle(),this.panel=R("div","ro-live-panel");let s=R("div","ro-live-header");s.textContent="Chat with us",this.log=R("div","ro-live-log");let i=R("form","ro-live-form"),o=R("input","ro-live-input");o.placeholder="Type a message\u2026";let a=R("button","ro-live-send");if(a.type="submit",a.textContent="Send",i.append(o,a),i.onsubmit=c=>{c.preventDefault();let l=o.value.trim();l&&(o.value="",this.append(l,"me"),this.onSend(l));},this.panel.append(s,this.log,i),this.panel.style.display="none",this.root.append(this.panel,r),n){let c=R("button","ro-live-tester-launcher");c.type="button",c.setAttribute("aria-label","Report a bug (tester)"),c.title="Tester tools",c.textContent="\u{1F41E}",c.onclick=()=>n(),this.root.append(c);}document.body.appendChild(this.root);}onSend;root;panel;log;badge;open=false;toggle(){this.open=!this.open,this.panel.style.display=this.open?"flex":"none",this.open&&(this.badge.style.display="none",this.badge.textContent="");}receive(e){if(this.append(e,"agent"),!this.open){let n=(parseInt(this.badge.textContent||"0",10)||0)+1;this.badge.textContent=String(n),this.badge.style.display="grid";}}append(e,n){let r=R("div",`ro-live-msg ro-live-${n}`);r.textContent=e,this.log.appendChild(r),this.log.scrollTop=this.log.scrollHeight;}destroy(){this.root.remove();}};function Qr(t,e){vt();let n=R("div","ro-ctl-consent");n.setAttribute("data-ignore","");let r=R("div","ro-ctl-card");r.innerHTML='<div class="ro-ctl-title">Allow support to control your screen?</div><div class="ro-ctl-body">A support agent is asking to take control of this page to help you. They can move your cursor, click, scroll and type. You can stop this at any time.</div>';let s=R("div","ro-ctl-actions"),i=R("button","ro-ctl-btn ro-ctl-decline");i.textContent="Not now";let o=R("button","ro-ctl-btn ro-ctl-allow");o.textContent="Allow control",s.append(i,o),r.appendChild(s),n.appendChild(r),document.body.appendChild(n);let a=()=>n.remove();i.onclick=()=>{a(),e();},o.onclick=()=>{a(),t();};}var yt=class{constructor(e){this.onStop=e;vt(),this.banner=R("div","ro-ctl-banner"),this.banner.setAttribute("data-ignore","");let n=R("span","ro-ctl-banner-text");n.textContent="A support agent is controlling your screen";let r=R("button","ro-ctl-stop");r.textContent="Stop",r.onclick=()=>this.onStop(),this.banner.append(n,r),this.cursor=R("div","ro-ctl-cursor"),this.cursor.setAttribute("data-ignore",""),this.cursor.innerHTML='<span class="ro-ctl-cursor-label">Agent</span>',document.body.append(this.banner,this.cursor);}onStop;banner;cursor;apply(e){switch(e.c){case "cursor":this.moveCursor(e.x,e.y);break;case "click":this.moveCursor(e.x,e.y),this.clickAt(e.x*window.innerWidth,e.y*window.innerHeight);break;case "scroll":window.scrollBy({left:e.x,top:e.y,behavior:"auto"});break;case "key":this.typeKey(e.key);break;case "nav":e.url&&e.url!==location.href&&/^https?:\/\//i.test(e.url)&&(location.href=e.url);break}}moveCursor(e,n){this.cursor.style.left=`${e*window.innerWidth}px`,this.cursor.style.top=`${n*window.innerHeight}px`;}clickAt(e,n){let r=document.elementFromPoint(e,n);if(!r||this.isOurs(r))return;let s={bubbles:true,cancelable:true,clientX:e,clientY:n,view:window};r.dispatchEvent(new MouseEvent("mousedown",s)),r.dispatchEvent(new MouseEvent("mouseup",s)),r.dispatchEvent(new MouseEvent("click",s));let i=r.tagName;(i==="INPUT"||i==="TEXTAREA"||i==="SELECT"||r.isContentEditable)&&r.focus(),this.pulse(e,n);}typeKey(e){let n=document.activeElement;if(!(!n||this.isOurs(n)||!(n.tagName==="INPUT"||n.tagName==="TEXTAREA"))&&!(n.tagName==="INPUT"&&n.type==="password")){if(e==="Enter"){n.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:true})),n.form?.requestSubmit?.();return}if(e==="Backspace")n.value=n.value.slice(0,-1);else if(e.length===1)n.value+=e;else return;n.dispatchEvent(new Event("input",{bubbles:true})),n.dispatchEvent(new Event("change",{bubbles:true}));}}pulse(e,n){let r=R("div","ro-ctl-pulse");r.setAttribute("data-ignore",""),r.style.left=`${e}px`,r.style.top=`${n}px`,document.body.appendChild(r),setTimeout(()=>r.remove(),600);}isOurs(e){return !!e.closest("[data-ignore]")}destroy(){this.banner.remove(),this.cursor.remove();}};function R(t,e){let n=document.createElement(t);return n.className=e,n}var rn=false;function vt(){if(rn)return;rn=true;let t=document.createElement("style");t.setAttribute("data-ignore",""),t.textContent=`
|
|
3
|
-
.ro-live-root{position:fixed;right:20px;bottom:20px;max-width:calc(100vw - 24px);z-index:2147483000;font-family:system-ui,-apple-system,sans-serif;display:flex;flex-direction:column;align-items:flex-end;gap:12px}
|
|
4
|
-
.ro-live-launcher{width:56px;height:56px;border-radius:50%;border:none;background:#6366f1;color:#fff;font-size:24px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);position:relative}
|
|
5
|
-
.ro-live-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:#ef4444;color:#fff;font-size:12px;display:grid;place-items:center;padding:0 5px}
|
|
6
|
-
/* Caps keep the panel inside a small phone viewport (a 320px panel plus
|
|
7
|
-
the 20px offsets overflows an iPhone SE) without changing the desktop look. */
|
|
8
|
-
.ro-live-panel{width:min(320px,calc(100vw - 32px));height:min(420px,calc(100vh - 160px));background:#fff;color:#111;border-radius:14px;box-shadow:0 12px 40px rgba(0,0,0,.28);flex-direction:column;overflow:hidden}
|
|
9
|
-
.ro-live-header{padding:14px 16px;background:#6366f1;color:#fff;font-weight:600}
|
|
10
|
-
.ro-live-log{flex:1;padding:12px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;background:#f7f8fa}
|
|
11
|
-
.ro-live-msg{max-width:78%;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.35;word-break:break-word}
|
|
12
|
-
.ro-live-me{align-self:flex-end;background:#6366f1;color:#fff;border-bottom-right-radius:4px}
|
|
13
|
-
.ro-live-agent{align-self:flex-start;background:#e8eaf1;color:#111;border-bottom-left-radius:4px}
|
|
14
|
-
.ro-live-form{display:flex;gap:8px;padding:10px;border-top:1px solid #e3e6ee;background:#fff}
|
|
15
|
-
.ro-live-input{flex:1;border:1px solid #cdd2df;border-radius:10px;padding:9px 12px;font-size:14px;outline:none}
|
|
16
|
-
.ro-live-send{border:none;background:#6366f1;color:#fff;border-radius:10px;padding:0 14px;font-size:14px;cursor:pointer}
|
|
17
|
-
.ro-live-tester-launcher{width:44px;height:44px;border-radius:50%;border:none;background:#0d9488;color:#fff;font-size:20px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);display:grid;place-items:center;padding:0;line-height:1}
|
|
18
|
-
.ro-live-tester-launcher:hover{background:#0f766e}
|
|
19
|
-
.ro-ctl-consent{position:fixed;inset:0;z-index:2147483600;background:rgba(10,14,22,.55);display:grid;place-items:center;font-family:system-ui,-apple-system,sans-serif}
|
|
20
|
-
.ro-ctl-card{width:min(420px,92vw);background:#fff;color:#111;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:22px}
|
|
21
|
-
.ro-ctl-title{font-size:17px;font-weight:700;margin-bottom:8px}
|
|
22
|
-
.ro-ctl-body{font-size:14px;line-height:1.5;color:#444}
|
|
23
|
-
.ro-ctl-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
|
|
24
|
-
.ro-ctl-btn{border:none;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:600;cursor:pointer}
|
|
25
|
-
.ro-ctl-decline{background:#eceef4;color:#333}
|
|
26
|
-
.ro-ctl-allow{background:#6366f1;color:#fff}
|
|
27
|
-
.ro-ctl-banner{position:fixed;top:0;left:0;right:0;z-index:2147483500;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;gap:14px;padding:9px 16px;font-family:system-ui,-apple-system,sans-serif;font-size:13px;box-shadow:0 2px 12px rgba(0,0,0,.3)}
|
|
28
|
-
.ro-ctl-banner-text::before{content:'\u25CF';color:#f87171;margin-right:7px}
|
|
29
|
-
.ro-ctl-stop{border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;border-radius:8px;padding:4px 12px;font-size:13px;font-weight:600;cursor:pointer}
|
|
30
|
-
.ro-ctl-cursor{position:fixed;z-index:2147483400;width:14px;height:14px;pointer-events:none;transform:translate(-2px,-2px);transition:left .06s linear,top .06s linear}
|
|
31
|
-
.ro-ctl-cursor::before{content:'';position:absolute;width:0;height:0;border-left:10px solid #6366f1;border-top:6px solid transparent;border-bottom:6px solid transparent;transform:rotate(-38deg)}
|
|
32
|
-
.ro-ctl-cursor-label{position:absolute;left:14px;top:12px;background:#6366f1;color:#fff;font:600 11px system-ui,sans-serif;padding:1px 6px;border-radius:6px;white-space:nowrap}
|
|
33
|
-
.ro-ctl-pulse{position:fixed;z-index:2147483400;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:rgba(99,102,241,.5);pointer-events:none;animation:ro-ctl-pulse .6s ease-out forwards}
|
|
34
|
-
@keyframes ro-ctl-pulse{from{transform:scale(.4);opacity:.9}to{transform:scale(2.6);opacity:0}}
|
|
35
|
-
`,document.head.appendChild(t);}function sn(){let t=document.cookie.match(/(?:^|;\s*)_ga=([^;]+)/);if(!t)return;let e=decodeURIComponent(t[1]).split(".");if(!(e.length<4))return `${e[e.length-2]}.${e[e.length-1]}`}function on(t){let e=window.gtag;if(typeof e=="function")try{e("event","replayops_session",{replayops_session_id:t});}catch{}}function xt(t,e,n,r){return {entryUrl:r,currentUrl:location.href,referrer:document.referrer,device:lt(navigator.userAgent),screen:{width:window.innerWidth||document.documentElement?.clientWidth||window.screen?.width||1,height:window.innerHeight||document.documentElement?.clientHeight||window.screen?.height||1,dpr:window.devicePixelRatio||1},language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,environment:t,releaseVersion:e,sdkVersion:n}}function es(t){switch((t.inputType??"text").toLowerCase()){case "email":return "rerun@replayops.test";case "password":return "ReRunTest!12345";case "tel":case "number":return "4242424242";default:return "ReplayOps re-run"}}function ts(){let t=/ro_rerun=([^&]+)/.exec(location.hash);if(!t)return null;let[e,n]=t[1].split("|");if(!e||!n)return null;let r=decodeURIComponent(e).replace(/\/$/,"");try{let s=new URL(r);if(s.protocol!=="https:"&&s.protocol!=="http:")return null;let i=s.hostname==="localhost"||s.hostname==="127.0.0.1";if(location.protocol==="https:"&&s.protocol!=="https:"&&!i)return null}catch{return null}return {api:r,token:n}}function G(t,e,n){let r=document.createElement(t);return r.setAttribute("style",e),n&&(r.textContent=n),r}var ns="position:fixed;z-index:2147483646;bottom:16px;left:16px;max-width:340px;padding:14px 16px;background:#0f172a;color:#f1f5f9;border-radius:12px;font:13px/1.45 system-ui,sans-serif;box-shadow:0 8px 30px rgba(0,0,0,.35);",tt="margin-top:10px;margin-right:8px;padding:6px 14px;border:none;border-radius:8px;cursor:pointer;font:600 13px system-ui,sans-serif;background:#2ec2b3;color:#04211d;",et=tt+"background:transparent;color:#94a3b8;border:1px solid #334155;";async function rs(t,e){let n=Date.now()+t;for(;!e.stopped&&(Date.now()<n||e.paused);)await new Promise(r=>setTimeout(r,100));}async function ss(t,e){let n=Date.now()+5e3;for(;Date.now()<n&&!e.stopped;){if(e.paused){await new Promise(r=>setTimeout(r,150));continue}for(let r of t.selectors??[]){let s=[];try{s=[...document.querySelectorAll(r)];}catch{continue}if(!s.length)continue;return (t.text?s.find(o=>(o.textContent??"").replace(/\s+/g," ").trim().includes(t.text)):void 0)??s[0]}if(typeof t.x=="number"&&typeof t.y=="number"){let r=document.elementFromPoint(t.x,t.y);if(r)return r}await new Promise(r=>setTimeout(r,250));}return null}function is(t,e){let n=t instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;Object.getOwnPropertyDescriptor(n,"value")?.set?.call(t,e),t.dispatchEvent(new Event("input",{bubbles:true})),t.dispatchEvent(new Event("change",{bubbles:true}));}function os(t){try{let e=new URL(t,location.href);return e.origin!==location.origin?!1:(location.href=e.href,!0)}catch{return false}}async function as(t,e,n){let r=0,s=0,i=0,o;for(let a=0;a<t.steps.length&&!n.stopped;a++){let c=t.steps[a];i=a+1,e.textContent=`Re-run ${a+1}/${t.steps.length} \u2014 ${c.label}`;let l=o===void 0?300:c.offsetMs-o;if(o=c.offsetMs,await rs(Math.min(Math.max(l,300),2500),n),n.stopped)break;if(c.kind==="open"){r++;continue}if(c.kind==="navigate"&&c.url){os(c.url)?r++:s++;continue}let f=await ss(c,n);if(n.stopped)break;if(!f){s++;continue}f.scrollIntoView({block:"center",behavior:"instant"}),c.kind==="click"?(f.click(),r++):c.kind==="input"&&(is(f,c.masked?es(c):c.value??""),r++);}return {ok:r,failed:s,done:i}}function an(t){let e=ts();if(!e)return;history.replaceState(null,"",location.href.replace(/#?ro_rerun=[^&]+&?/,"").replace(/#$/,""));let n=async()=>{let r;try{let f=await fetch(`${e.api}/v1/public/rerun/${encodeURIComponent(e.token)}`);if(!f.ok)return;r=await f.json();}catch{return}if(!r.steps?.length)return;let s=G("div",ns),i=G("div","font-weight:700;margin-bottom:4px;","ReplayOps scenario re-run"),o=G("div","color:#cbd5e1;",`${r.steps.length} recorded steps from session ${r.sessionId.slice(0,8)} (via ${new URL(e.api).host}) will be replayed on this page.`),a=G("button",tt,"Run scenario"),c=G("button",et,"Dismiss");s.append(i,o,a,c),document.body.appendChild(s),c.addEventListener("click",()=>s.remove());let l=async()=>{let f={paused:false,stopped:false},T=false,H=G("button",tt,"Pause"),j=G("button",et,"Restart"),W=G("button",et,"Stop");s.append(H,j,W),H.addEventListener("click",()=>{f.paused=!f.paused,H.textContent=f.paused?"Resume":"Pause";}),j.addEventListener("click",()=>{T=true,f.stopped=true;}),W.addEventListener("click",()=>{f.stopped=true;}),t("replayops_rerun",{sourceSessionId:r.sessionId,steps:r.steps.length});let x=await as(r,o,f);if(H.remove(),j.remove(),W.remove(),T)return l();o.textContent=f.stopped?`Re-run stopped at step ${x.done}/${r.steps.length}.`:`Re-run finished \u2014 ${x.ok}/${r.steps.length} steps succeeded`+(x.failed?`, ${x.failed} failed.`:".");let b=G("button",tt,"Run again"),S=G("button",et,"Dismiss");s.append(b,S),b.addEventListener("click",()=>{b.remove(),S.remove(),l();}),S.addEventListener("click",()=>s.remove());};a.addEventListener("click",()=>{a.remove(),c.remove(),l();});};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{n();},{once:true}):n();}var cn="0.1.0",He=class{config;identity;recorder;transport;live;state="idle";sessionId="";entryUrl="";extraMask=[];extraIgnore=[];policyMaskInputs;policyLiveChat;policyLive;init(e){this.config||(this.config=kt(e),this.identity=new ze,this.sessionId=Ze(),this.entryUrl=location.href,!this.identity.isOptedOut()&&(this.config.requireConsent&&!this.identity.hasConsent()||Ct(this.config.samplingRate)&&this.bootstrap()));}async bootstrap(){await this.fetchPolicy(),this.start(),this.watchIdle(),an((e,n)=>this.track(e,n));}lastActivityAt=Date.now();watchIdle(){let e=this.config?.idleTimeoutMs??0;if(e<=0)return;let n=0,r=()=>{let i=Date.now();(this.state==="suspended"||this.state==="recording"&&i-this.lastActivityAt>e)&&this.rotate(),i-n>1e3&&(n=i,this.lastActivityAt=i);};for(let i of ["pointerdown","keydown","mousemove","scroll","touchstart"])window.addEventListener(i,r,{capture:true,passive:true});let s=()=>{this.state==="recording"&&(Date.now()-this.lastActivityAt<=e||(this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="suspended"));};setInterval(s,6e4),document.addEventListener("visibilitychange",s);}rotate(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.sessionId=Ze(),this.entryUrl=location.href,this.state="idle",this.start();}async fetchPolicy(){if(this.config)try{let e=`${this.config.endpoint.replace(/\/$/,"")}/v1/config`,n=new AbortController,r=setTimeout(()=>n.abort(),1500),s=await fetch(e,{headers:{"x-api-key":this.config.apiKey},signal:n.signal}).finally(()=>clearTimeout(r));if(s.ok){let i=await s.json();typeof i.maskInputs=="boolean"&&(this.policyMaskInputs=i.maskInputs),typeof i.liveChat=="boolean"&&(this.policyLiveChat=i.liveChat),typeof i.live=="boolean"&&(this.policyLive=i.live);}}catch{}}start(){if(!this.config||!this.identity||this.state==="recording")return;let e={...this.config,maskInputs:this.policyMaskInputs??this.config.maskInputs,live:(this.policyLive??this.config.live)&&this.config.live,liveChat:(this.policyLiveChat??this.config.liveChat)&&this.config.liveChat,maskSelectors:[...this.config.maskSelectors,...this.extraMask],ignoreSelectors:[...this.config.ignoreSelectors,...this.extraIgnore]};if(this.transport=new Je(this.sessionId,{endpoint:e.endpoint,projectId:e.projectId,apiKey:e.apiKey,batchSize:e.batchSize,flushIntervalMs:e.flushIntervalMs,getMeta:()=>xt(e.environment,e.releaseVersion,cn,this.entryUrl),getIdentity:()=>this.identity.snapshot()}),e.live&&(this.live=new Qe({endpoint:e.endpoint,apiKey:e.apiKey,sessionId:this.sessionId,chat:e.liveChat,getIdentity:()=>{let n=this.identity.snapshot();return {anonymousId:n.anonymousId,userId:n.userId,email:n.userTraits?.email}},getMeta:()=>{let n=xt(e.environment,e.releaseVersion,cn,this.entryUrl).device;return {browser:n.browser,os:n.os,deviceType:n.deviceType}},onWatchStart:()=>this.recorder?.takeFullSnapshot()})),this.recorder=new Ye(e,n=>{this.transport.enqueue(n),this.live?.feedEvent(n);},this.sessionId),this.transport.start(),this.recorder.start(),this.live?.start(),e.googleAnalytics){let n=sn();n&&(this.recorder.emitCustom("$ga",{clientId:n}),on(this.sessionId));}this.state="recording";}pause(){this.state==="recording"&&(this.recorder?.stop(),this.recorder=void 0,this.live?.stop(),this.live=void 0,this.state="paused");}resume(){this.state==="paused"&&this.start();}stop(){this.recorder?.stop(),this.transport?.stop(),this.live?.stop(),this.recorder=void 0,this.transport=void 0,this.live=void 0,this.state="stopped";}identify(e,n){this.identity?.identify(e,n),this.recorder?.emitCustom("$identify",{userId:e,...n??{}});}track(e,n={}){this.recorder?.emitCustom(e,n);}setUserProperties(e){this.identity?.setUserProperties(e);}mask(e){this.extraMask.push(e);}ignore(e){this.extraIgnore.push(e);}consent(e){this.identity?.setConsent(e),e&&this.state==="idle"&&this.config&&this.start(),e||this.stop();}optOut(){this.identity?.optOut(),this.stop();}getState(){return this.state}getSessionId(){return this.sessionId}};var dn=new He;typeof window<"u"&&(window.ReplayOps=dn);var Di=dn;export{He as a,dn as b,Di as c};//# sourceMappingURL=chunk-A3ZJ2DKC.js.map
|
|
36
|
-
//# sourceMappingURL=chunk-A3ZJ2DKC.js.map
|