@fixback/sdk 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/annotation.d.ts +10 -73
- package/dist/capture/extract-dom.d.ts +33 -0
- package/dist/connect.d.ts +47 -0
- package/dist/dom.d.ts +7 -19
- package/dist/element-picker.d.ts +1 -1
- package/dist/error-capture.d.ts +21 -93
- package/dist/fixback.umd.js +36 -215
- package/dist/fixback.umd.js.map +1 -1
- package/dist/identity.d.ts +6 -1
- package/dist/index.d.ts +17 -15
- package/dist/index.mjs +3598 -4681
- package/dist/index.mjs.map +1 -1
- package/dist/init.d.ts +63 -97
- package/dist/mount.d.ts +46 -0
- package/dist/overlay/dom.d.ts +16 -0
- package/dist/overlay/icons.d.ts +23 -0
- package/dist/overlay/marking.d.ts +64 -0
- package/dist/overlay/send.d.ts +65 -0
- package/dist/overlay/view.d.ts +78 -0
- package/dist/overlay-styles.d.ts +1 -1
- package/dist/overlay.d.ts +40 -43
- package/dist/package.json +3 -0
- package/dist/report.d.ts +22 -111
- package/dist/reporter-session-store.d.ts +17 -0
- package/dist/session.d.ts +27 -0
- package/dist/submit.d.ts +56 -19
- package/dist/trace/instrument/beacon.d.ts +16 -0
- package/dist/trace/instrument/console.d.ts +11 -0
- package/dist/trace/instrument/fetch.d.ts +16 -0
- package/dist/trace/instrument/index.d.ts +64 -0
- package/dist/trace/instrument/navigation.d.ts +12 -0
- package/dist/trace/instrument/ui.d.ts +23 -0
- package/dist/trace/instrument/window.d.ts +66 -0
- package/dist/trace/instrument/xhr.d.ts +15 -0
- package/dist/version.d.ts +1 -1
- package/package.json +8 -5
- package/dist/auto-report-backoff.d.ts +0 -47
- package/dist/boot.d.ts +0 -74
- package/dist/breadcrumbs.d.ts +0 -448
- package/dist/invite.d.ts +0 -104
- package/dist/onboarding-styles.d.ts +0 -8
- package/dist/onboarding.d.ts +0 -44
- package/dist/screenshot.d.ts +0 -73
- package/dist/scrub.d.ts +0 -61
package/dist/fixback.umd.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
(function(me,Xe){typeof exports=="object"&&typeof module!="undefined"?Xe(exports):typeof define=="function"&&define.amd?define(["exports"],Xe):(me=typeof globalThis!="undefined"?globalThis:me||self,Xe(me.Fixback={}))})(this,function(me){Object.defineProperty(me,Symbol.toStringTag,{value:"Module"});function Xe(e){return`${e.replace(/\/+$/,"")}/api/ingest/boot`}function Wo(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.originAllowed=="boolean"&&typeof t.canSubmit=="boolean"&&typeof t.gate=="string"&&(t.tier===null||typeof t.tier=="string")}async function Ho(e,t,r=fetch){let n;try{n=await r(Xe(e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}catch{return null}if(!n.ok)return null;let o;try{o=await n.json()}catch{return null}return Wo(o)?o:null}var zt=["data-fixback-root","data-fixback-overlay"],gu=zt.map(e=>`[${e}]`).join(",");function jo(e){return e instanceof Element&&zt.some(t=>e.hasAttribute(t))}function $t(e){let t=e instanceof Node?e:null;for(;t;){if(t instanceof Element){for(const n of zt)if(t.hasAttribute(n))return!0}const r=t.getRootNode();if(r instanceof ShadowRoot&&r!==t){t=r.host;continue}t=t.parentNode}return!1}function kr(e){const t=globalThis.CSS;return t!=null&&t.escape?t.escape(e):e.replace(/[^\w-]/g,r=>`\\${r}`)}function Vo(e){let t=1,r=e.previousElementSibling;for(;r;)r.tagName===e.tagName&&(t+=1),r=r.previousElementSibling;return t}function Mr(e){if(e.id)return`#${kr(e.id)}`;const t=[];let r=e;for(;r&&r.tagName.toLowerCase()!=="html";){if(r.id){t.unshift(`#${kr(r.id)}`);break}const n=r.tagName.toLowerCase(),o=r.parentElement;if(o){const i=Array.from(o.children).filter(a=>a.tagName===r.tagName);t.unshift(i.length>1?`${n}:nth-of-type(${Vo(r)})`:n)}else t.unshift(n);r=o}return t.join(" > ")}function Go(e){const t=e.tagName.toLowerCase();if(e.id)return`${t}#${e.id}`;const r=e.classList[0];return r?`${t}.${r}`:t}function qo(e){const t=[];let r=e;for(;r;)t.unshift(Go(r)),r=r.parentElement;return t.join(" > ")}function Xo(e){const t=e.getBoundingClientRect();return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}function Yo(e){return{selector:Mr(e),domPath:qo(e),tag:e.tagName.toLowerCase(),rect:Xo(e)}}function Ko(e){var t,r;const n=(t=e.doc)!==null&&t!==void 0?t:document,o=(r=e.ignore)!==null&&r!==void 0?r:$t;let i=null,a=!1;function l(b){var d;const h=(d=(typeof b.composedPath=="function"?b.composedPath():[])[0])!==null&&d!==void 0?d:b.target;return h instanceof Element?o(h)?null:h:null}function s(b){var d;a||(i=l(b),(d=e.onHover)===null||d===void 0||d.call(e,i))}function u(b){var d;if(a)return;const h=(d=l(b))!==null&&d!==void 0?d:i;h&&(b.preventDefault(),b.stopPropagation(),c(),e.onPick(h))}function f(b){if(!a&&b.key==="Escape"){var d;b.preventDefault(),c(),(d=e.onCancel)===null||d===void 0||d.call(e)}}function c(){a||(a=!0,n.removeEventListener("mouseover",s,!0),n.removeEventListener("click",u,!0),n.removeEventListener("keydown",f,!0),i=null)}return n.addEventListener("mouseover",s,!0),n.addEventListener("click",u,!0),n.addEventListener("keydown",f,!0),{stop:c}}var Jo=7,Ir=/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,Rr=new RegExp(`\\d{${Jo},}`,"g"),Zo=/\b(bearer|token)\s+[\w.\-~+/]+=*/gi,Qo=/\bhttps?:\/\/[^\s"'<>]+/gi;function ei(e){return typeof e!="string"||e.length===0?e:e.replace(Ir,"[redacted-email]").replace(Zo,(t,r)=>`${r} [redacted]`).replace(Rr,"[redacted-number]")}function Wt(e){return e.replace(Ir,"[redacted-email]").replace(Rr,"[redacted-number]")}function le(e){var t;if(typeof e!="string"||e.length===0)return e;let r=e;r=r.replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@?#]*@/i,"$1"),r=r.replace(/\?[^#]*/,""),r=r.replace(/#.*$/,a=>a.includes("=")?"":a);const n=r.match(/^([a-z][a-z0-9+.-]*:\/\/[^/?#]*)([\s\S]*)$/i);if(n)return n[1]+Wt((t=n[2])!==null&&t!==void 0?t:"");const o=r.match(/^(\/\/[^/?#]*)([\s\S]*)$/);if(o){var i;return o[1]+Wt((i=o[2])!==null&&i!==void 0?i:"")}return Wt(r)}function ti(e){const t={...e};return typeof t.url=="string"&&(t.url=le(t.url)),typeof t.from=="string"&&(t.from=le(t.from)),typeof t.to=="string"&&(t.to=le(t.to)),t}function Ye(e){return ei(e.replace(Qo,t=>le(t)))}function Ht(e){if(typeof e=="string")return Ye(e);if(Array.isArray(e))return e.map(Ht);if(e&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))t[r]=Ht(n);return t}return e}function ri(e){switch(e.t){case"string":return typeof e.v=="string"?{t:"string",v:Ye(e.v)}:e;case"json":return{t:"json",v:Ht(e.v)};case"error":{if(!e.v||typeof e.v!="object")return e;const t={...e.v};return typeof t.message=="string"&&(t.message=Ye(t.message)),typeof t.stack=="string"&&(t.stack=Ye(t.stack)),{t:"error",v:t}}default:return e}}function ni(e){const t={...e};return typeof t.message=="string"&&(t.message=Ye(t.message)),t.data&&(t.data=ti(t.data)),typeof t.url=="string"&&(t.url=le(t.url)),Array.isArray(t.args)&&(t.args=t.args.map(ri)),t}function oi(e){const t={...e};return typeof t.url=="string"&&(t.url=le(t.url)),t.trace&&t.trace.length>0&&(t.trace=t.trace.map(ni)),t.errorFrames&&t.errorFrames.length>0&&(t.errorFrames=t.errorFrames.map(r=>({...r,file:le(r.file)}))),t}function Tr(e,t={}){const r=t.scrub===!1?e:oi(e),n=t.hook;if(!n)return r;try{const o=n(r);return o!=null?o:null}catch{return r}}var jt={network:100,console:80,breadcrumbs:40},ii=18e4,ai=["log","info","warn","error","assert","debug"],Nr=["warn","error","assert"];function si(e){return e!==void 0&&Nr.includes(e)}var li=Nr;function ci(e){return li.includes(e)}function ui(e){return e==="console"?"console":e==="fetch"||e==="xhr"||e==="beacon"?"network":"breadcrumbs"}function Vt(e,t){return typeof e!="number"||!Number.isFinite(e)||e<1?t:Math.floor(e)}function ut(){return typeof performance!="undefined"&&typeof performance.now=="function"?performance.now():Date.now()}function di(){const e=Math.random().toString(36).slice(2,8);let t=0;return()=>`${e}${(t++).toString(36)}`}var _r=["network","console","breadcrumbs"];function fi(e,t){const r=e.length-t;if(r<=0)return e;const n=new Set;for(let o=0;o<e.length&&n.size<r;o+=1)si(e[o].crumb.level)||n.add(o);for(let o=0;o<e.length&&n.size<r;o+=1)n.has(o)||n.add(o);return e.filter((o,i)=>!n.has(i))}function hi(e={}){var t,r,n,o,i,a;const l={network:Vt((t=e.budgets)===null||t===void 0?void 0:t.network,jt.network),console:Vt((r=e.budgets)===null||r===void 0?void 0:r.console,jt.console),breadcrumbs:Vt((n=e.budgets)===null||n===void 0?void 0:n.breadcrumbs,jt.breadcrumbs)},s=e.maxAgeMs===void 0?ii:e.maxAgeMs,u=e.beforeBreadcrumb,f=(o=e.now)!==null&&o!==void 0?o:Date.now,c=(i=e.mono)!==null&&i!==void 0?i:ut,b=(a=e.nextId)!==null&&a!==void 0?a:di(),d={network:[],console:[],breadcrumbs:[]};let h=0;function m(){if(typeof s!="number"||s<=0)return;const p=f()-s;for(const y of _r){const g=d[y];g.length>0&&(d[y]=g.filter(v=>v.crumb.timestamp>=p))}}return{add(p){var y;let g=p;if(u)try{g=u(p)}catch{g=p}if(!g)return;const v={...g,id:(y=g.id)!==null&&y!==void 0?y:b(),timestamp:typeof g.timestamp=="number"?g.timestamp:f(),mono:typeof g.mono=="number"?g.mono:c()},w=ui(v.category);d[w].push({crumb:v,seq:h++}),m();const C=d[w],E=l[w];C.length>E&&(d[w]=w==="console"?fi(C,E):C.slice(-E))},snapshot(){m();const p=[];for(const y of _r)p.push(...d[y]);return p.sort((y,g)=>(typeof y.crumb.mono=="number"?y.crumb.mono:y.crumb.timestamp)-(typeof g.crumb.mono=="number"?g.crumb.mono:g.crumb.timestamp)||y.seq-g.seq),p.map(y=>y.crumb)},clear(){d.network=[],d.console=[],d.breadcrumbs=[],h=0}}}var Lr=300,Gt=2048,vu=4,yu=100,qt=1024,wu=4096,pi=2048;function Ee(e,t){return e.length>t?`${e.slice(0,t)}…`:e}function Ar(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);try{var t;return(t=JSON.stringify(e))!==null&&t!==void 0?t:String(e)}catch{return"[object]"}}function mi(e){const t=e.map(Ar).join(" ");return t.length>Lr?`${t.slice(0,Lr)}…`:t}function Or(e){var t;const r={name:e.name||"Error",message:Ee(String((t=e.message)!==null&&t!==void 0?t:""),qt)};return typeof e.stack=="string"&&e.stack.length>0&&(r.stack=Ee(e.stack,pi)),r}function Xt(e,t,r){if(e===null)return null;const n=typeof e;if(n==="string")return Ee(e,qt);if(n==="number")return Number.isFinite(e)?e:String(e);if(n==="boolean")return e;if(n==="bigint")return`${e.toString()}n`;if(n==="symbol")return e.toString();if(n==="function")return"[Function]";if(n==="undefined")return null;const o=e;if(e instanceof Error){const{name:i,message:a}=Or(e);return{name:i,message:a}}if(r.has(o))return"[Circular]";if(t<=0)return Array.isArray(e)?"[Array]":"[Object]";r.add(o);try{if(Array.isArray(e)){const s=e.slice(0,100).map(u=>Xt(u,t-1,r));return e.length>100&&s.push(`… ${e.length-100} more`),s}const i=e,a=Object.keys(i),l={};for(const s of a.slice(0,100)){const u=i[s];typeof u=="undefined"||typeof u=="function"||(l[s]=Xt(u,t-1,r))}return a.length>100&&(l["…"]=`${a.length-100} more`),l}finally{r.delete(o)}}function bi(e){if(e==null)return{t:"null",v:null};const t=typeof e;return t==="string"?{t:"string",v:Ee(e,qt)}:t==="number"?Number.isFinite(e)?{t:"number",v:e}:{t:"string",v:String(e)}:t==="boolean"?{t:"bool",v:e}:t==="bigint"?{t:"string",v:`${e.toString()}n`}:t==="symbol"?{t:"string",v:e.toString()}:t==="function"?{t:"string",v:"[Function]"}:e instanceof Error?{t:"error",v:Or(e)}:{t:"json",v:Xt(e,4,new Set)}}function Yt(e){try{var t;const r=(t=JSON.stringify(e))!==null&&t!==void 0?t:"";return typeof TextEncoder!="undefined"?new TextEncoder().encode(r).length:r.length}catch{return Number.POSITIVE_INFINITY}}function gi(e){if(Yt(e)<=4096)return e;let t=e.slice();for(;t.length>1&&Yt(t)>4096;)t=t.slice(0,-1);return t.length===1&&Yt(t)>4096?[{t:"string",v:"[trace: console argument omitted (too large)]"}]:t}function Dr(e,t,r,n){const o=gi(t.map(bi));return{category:"console",level:e,message:mi(t),timestamp:r,...o.length>0?{args:o}:{},...n?{source:n}:{}}}function vi(e,t,r){const n=Ee(le(e),Gt),o=Ee(le(t),Gt);return{category:"navigation",message:`${n} → ${o}`,timestamp:r,data:{from:n,to:o}}}function Kt(e){return typeof e!="number"||e<=0?"network-error":e>=500?"http-5xx":e>=400?"http-4xx":"ok"}function Jt(e){if(typeof e=="string")return yi(e);if(typeof Blob!="undefined"&&e instanceof Blob)return e.size;if(typeof ArrayBuffer!="undefined"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))return e.byteLength}function yi(e){try{return typeof TextEncoder!="undefined"?new TextEncoder().encode(e).length:e.length}catch{return e.length}}function Fr(e){if(typeof e!="string")return;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=0?t:void 0}function Pr(e){var t;if(typeof e!="string"||e.length===0)return;const r=(t=e.split(";")[0])===null||t===void 0?void 0:t.trim();return r&&r.length>0?r:void 0}function dt(e,t){const r=Ee(le(e.url),Gt),n=typeof e.status=="number"&&e.status>0,o=n?` → ${e.status}`:"",i=e.outcome!=="ok"?` (${e.outcome})`:"";return{category:e.api,api:e.api,method:e.method,url:r,message:`${e.method} ${r}${o}${i}`,timestamp:t,...n?{status:e.status}:{},...e.statusText?{statusText:e.statusText}:{},...typeof e.durationMs=="number"?{durationMs:e.durationMs}:{},...typeof e.reqSize=="number"?{reqSize:e.reqSize}:{},...typeof e.respSize=="number"?{respSize:e.respSize}:{},...e.contentType?{contentType:e.contentType}:{},outcome:e.outcome}}function Ur(e){try{return Mr(e)}catch{return e.tagName?e.tagName.toLowerCase():"unknown"}}function wi(e,t){const r=Ur(e);return{category:"ui.click",message:`click ${r}`,timestamp:t,data:{target:r}}}function Si(e,t){const r=Ur(e);return{category:"ui.input",message:`input ${r}`,timestamp:t,data:{target:r}}}function xi(e){return e instanceof Error?{name:e.name||"Error",message:e.message}:typeof e=="string"?{name:"Error",message:e}:{name:"Error",message:Ar(e)}}function Ei(e,t,r){const{name:n,message:o}=xi(e),i={category:"error",level:"error",message:o?`${n}: ${o}`:n,timestamp:t,data:{errorType:n}};return r&&r.length>0?{...i,causedBy:r}:i}function ft(){}function Ci(e){var t,r;let n;const o=e.match(/^at\s+.+?\s+\((.+)\)$/);if(o)n=o[1];else{const s=e.match(/^at\s+(.+)$/);if(s)n=s[1];else{const u=e.indexOf("@");u>=0&&(n=e.slice(u+1))}}if(!n)return;n=n.replace(/\?[^:]*/,"");const i=(t=n.match(/^(.*):(\d+):\d+$/))!==null&&t!==void 0?t:n.match(/^(.*):(\d+)$/);if(!i)return;const a=(r=i[1])!==null&&r!==void 0?r:"",l=Number(i[2]);if(!(!a||!Number.isFinite(l)))return{file:a,line:l}}function ki(e,t=0){if(typeof e!="string"||e.length===0)return;const r=[];for(const n of e.split(`
|
|
2
|
-
`)){const o=Ci(n.trim());o&&r.push(o)}return r[t]}var Mi=1;function Ii(e,t,r,n){const o=[];for(const i of r){const a=t[i];if(typeof a!="function")continue;const l=ci(i),s=(...u)=>{let f;if(l)try{f=ki(new Error().stack,Mi)}catch{f=void 0}try{i==="assert"?u[0]||e.add(Dr("assert",u.slice(1),n(),f)):e.add(Dr(i,u,n(),f))}catch{}return a.apply(t,u)};t[i]=s,o.push(()=>{t[i]=a})}return()=>{for(const i of o)i()}}function Ri(e){return typeof e=="string"?e:e instanceof URL?e.toString():e.url}function Ti(e,t){var r,n;return((r=(n=t==null?void 0:t.method)!==null&&n!==void 0?n:typeof e=="object"&&"method"in e?e.method:void 0)!==null&&r!==void 0?r:"GET").toUpperCase()}function Br(e,t){try{var r,n,o;return(r=(n=e.headers)===null||n===void 0||(o=n.get)===null||o===void 0?void 0:o.call(n,t))!==null&&r!==void 0?r:null}catch{return null}}function Ni(e){return e.type==="opaque"||e.type==="opaqueredirect"?"opaque-cors":Kt(e.status)}function _i(e){const t=typeof e=="object"&&e!==null&&"name"in e?String(e.name):"";return t==="AbortError"?"aborted":t==="TimeoutError"?"timeout":"network-error"}function Li(e,t,r,n,o=ut){const i=t.fetch;if(typeof i!="function")return ft;const a=(l,s)=>{const u=Ri(l),f=Ti(l,s),c=Jt(s==null?void 0:s.body),b=o(),d=i.call(t,l,s);return r(u)?d:d.then(h=>{try{e.add(dt({api:"fetch",method:f,url:u,status:h.status||void 0,statusText:h.statusText||void 0,durationMs:Math.max(0,o()-b),reqSize:c,respSize:Fr(Br(h,"content-length")),contentType:Pr(Br(h,"content-type")),outcome:Ni(h)},n()))}catch{}return h},h=>{try{e.add(dt({api:"fetch",method:f,url:u,durationMs:Math.max(0,o()-b),reqSize:c,outcome:_i(h)},n()))}catch{}throw h})};return t.fetch=a,()=>{t.fetch=i}}function zr(e,t){try{return typeof e.getResponseHeader=="function"?e.getResponseHeader(t):null}catch{return null}}function Ai(e){try{return e.statusText||void 0}catch{return}}function Oi(e,t,r,n,o=ut){const i=t.XMLHttpRequest;if(typeof i!="function")return ft;const a=i.prototype,l=a.open,s=a.send;return a.open=function(u,f,...c){return this.__fixbackMeta={method:String(u).toUpperCase(),url:String(f)},l.call(this,u,f,...c)},a.send=function(u){const f=this.__fixbackMeta;if(f&&!r(f.url)){const c=o(),b=Jt(u);let d;const h=()=>{d=Kt(this.status||void 0)},m=()=>{d="network-error"},p=()=>{d="timeout"},y=()=>{d="aborted"},g=()=>{try{var v;e.add(dt({api:"xhr",method:f.method,url:f.url,status:this.status||void 0,statusText:Ai(this),durationMs:Math.max(0,o()-c),reqSize:b,respSize:Fr(zr(this,"content-length")),contentType:Pr(zr(this,"content-type")),outcome:(v=d)!==null&&v!==void 0?v:Kt(this.status||void 0)},n()))}catch{}this.removeEventListener("load",h),this.removeEventListener("error",m),this.removeEventListener("timeout",p),this.removeEventListener("abort",y),this.removeEventListener("loadend",g)};this.addEventListener("load",h),this.addEventListener("error",m),this.addEventListener("timeout",p),this.addEventListener("abort",y),this.addEventListener("loadend",g)}return s.call(this,u)},()=>{a.open=l,a.send=s}}function Di(e,t,r,n){const o=t.navigator;if(!o||typeof o.sendBeacon!="function")return ft;const i=o.sendBeacon,a=(s,u,f)=>{if(!r(s))try{e.add(dt({api:"beacon",method:"POST",url:s,reqSize:Jt(u),outcome:f},n()))}catch{}},l=function(s,u){const f=typeof s=="string"?s:String(s);let c;try{c=i.call(o,s,u)}catch(b){throw a(f,u,"network-error"),b}return a(f,u,c?"ok":"network-error"),c};return o.sendBeacon=l,()=>{o.sendBeacon=i}}function Fi(e,t,r){const n=t.history,o=t.location;if(!n||!o)return ft;let i=o.href;const a=c=>{try{e.add(vi(i,c,r()))}catch{}i=c},l=n.pushState,s=n.replaceState;n.pushState=function(c,b,d){const h=l.call(this,c,b,d);return a(o.href),h},n.replaceState=function(c,b,d){const h=s.call(this,c,b,d);return a(o.href),h};const u=()=>a(o.href),f=()=>a(o.href);return t.addEventListener("popstate",u),t.addEventListener("hashchange",f),()=>{n.pushState=l,n.replaceState=s,t.removeEventListener("popstate",u),t.removeEventListener("hashchange",f)}}function $r(e){var t;const r=(t=(typeof e.composedPath=="function"?e.composedPath():[])[0])!==null&&t!==void 0?t:e.target;return r instanceof Element?r:null}function Pi(e,t,r){const n=i=>{const a=$r(i);if(!(!a||$t(a)))try{e.add(wi(a,r()))}catch{}},o=i=>{const a=$r(i);if(!(!a||$t(a)))try{e.add(Si(a,r()))}catch{}};return t.addEventListener("click",n,!0),t.addEventListener("input",o,!0),()=>{t.removeEventListener("click",n,!0),t.removeEventListener("input",o,!0)}}function Ui(e,t={}){var r,n,o,i,a,l,s;const u=(r=t.win)!==null&&r!==void 0?r:globalThis,f=(n=t.doc)!==null&&n!==void 0?n:typeof document!="undefined"?document:void 0,c=(o=t.consoleObj)!==null&&o!==void 0?o:typeof console!="undefined"?console:void 0,b=(i=t.consoleLevels)!==null&&i!==void 0?i:ai,d=(a=t.ignoreUrl)!==null&&a!==void 0?a:(()=>!1),h=(l=t.now)!==null&&l!==void 0?l:Date.now,m=(s=t.mono)!==null&&s!==void 0?s:ut,p=t.captureConsole!==!1,y=t.captureNetwork!==!1,g=[];return c&&p&&g.push(Ii(e,c,b,h)),u&&(y&&(g.push(Li(e,u,d,h,m)),g.push(Oi(e,u,d,h,m)),g.push(Di(e,u,d,h))),g.push(Fi(e,u,h))),f&&g.push(Pi(e,f,h)),()=>{for(const v of g)try{v()}catch{}}}var Bi="#e5484d";function Wr(e,t,r,n){return{x:Math.round(Math.min(e,r)),y:Math.round(Math.min(t,n)),width:Math.round(Math.abs(r-e)),height:Math.round(Math.abs(n-t))}}function zi(e,t,r,n,o=14){const i=Math.atan2(n-t,r-e);return[{x:r,y:n},{x:r-o*Math.cos(i-Math.PI/6),y:n-o*Math.sin(i-Math.PI/6)},{x:r-o*Math.cos(i+Math.PI/6),y:n-o*Math.sin(i+Math.PI/6)}]}function $i(e){const t={};return e.element&&(t.element=e.element),e.region&&(t.region=e.region),e.marks&&e.marks.length>0&&(t.marks=e.marks.slice()),Object.keys(t).length>0?t:void 0}var Wi=100,Hi=new Set([".","..","latest"]);function ji(e){const t=e.trim();if(!(t.length===0||t.length>Wi)&&!Hi.has(t)&&!/[\s/\\\u0000-\u001f\u007f]/.test(t))return t}function Hr(e,t,r){var n;const o={},i=e.innerWidth;typeof i=="number"&&i>0&&(o.viewportWidth=Math.round(i));const a=e.innerHeight;typeof a=="number"&&a>0&&(o.viewportHeight=Math.round(a));const l=(n=e.navigator)===null||n===void 0?void 0:n.userAgent;return typeof l=="string"&&l.length>0&&(o.browser=l),t.length>0&&(o.sdkVersion=t),r&&r.length>0&&(o.release=r),o}function jr(e){var t,r,n;const o={},i=(t=e.comment)===null||t===void 0?void 0:t.trim();i&&(o.comment=i);const a=(r=e.reporterName)===null||r===void 0?void 0:r.trim();a&&(o.reporterName=a);const l=(n=e.reporterEmail)===null||n===void 0?void 0:n.trim();l&&(o.reporterEmail=l),e.url&&(o.url=e.url),e.environment&&Object.keys(e.environment).length>0&&(o.environment=e.environment);const s=$i({element:e.element,region:e.region,marks:e.marks});return s&&(o.annotation=s),e.trace&&e.trace.length>0&&(o.trace=e.trace),o}var Zt;function Vi(e,t){return e[13]=1,e[14]=t>>8,e[15]=t&255,e[16]=t>>8,e[17]=t&255,e}var Vr=112,Gr=72,qr=89,Xr=115,Qt;function Gi(){const e=new Int32Array(256);for(let t=0;t<256;t++){let r=t;for(let n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e}function qi(e){let t=-1;Qt||(Qt=Gi());for(let r=0;r<e.length;r++)t=Qt[(t^e[r])&255]^t>>>8;return t^-1}function Xi(e){const t=e.length-1;for(let r=t;r>=4;r--)if(e[r-4]===9&&e[r-3]===Vr&&e[r-2]===Gr&&e[r-1]===qr&&e[r]===Xr)return r-3;return 0}function Yi(e,t,r=!1){const n=new Uint8Array(13);t*=39.3701,n[0]=Vr,n[1]=Gr,n[2]=qr,n[3]=Xr,n[4]=t>>>24,n[5]=t>>>16,n[6]=t>>>8,n[7]=t&255,n[8]=n[4],n[9]=n[5],n[10]=n[6],n[11]=n[7],n[12]=1;const o=qi(n),i=new Uint8Array(4);if(i[0]=o>>>24,i[1]=o>>>16,i[2]=o>>>8,i[3]=o&255,r){const a=Xi(e);return e.set(n,a),e.set(i,a+13),e}else{const a=new Uint8Array(4);a[0]=0,a[1]=0,a[2]=0,a[3]=9;const l=new Uint8Array(54);return l.set(e,0),l.set(a,33),l.set(n,37),l.set(i,50),l}}var Yr="[modern-screenshot]",ye=typeof window!="undefined",Ki=ye&&"Worker"in window,Ji=ye&&"atob"in window,Su=ye&&"btoa"in window,er=ye?(Zt=window.navigator)===null||Zt===void 0?void 0:Zt.userAgent:"",Kr=er.includes("Chrome"),ht=er.includes("AppleWebKit")&&!Kr,tr=er.includes("Firefox"),Zi=e=>e&&"__CONTEXT__"in e,Qi=e=>e.constructor.name==="CSSFontFaceRule",ea=e=>e.constructor.name==="CSSImportRule",ta=e=>e.constructor.name==="CSSLayerBlockRule",he=e=>e.nodeType===1,Ke=e=>typeof e.className=="object",Jr=e=>e.tagName==="image",ra=e=>e.tagName==="use",Je=e=>he(e)&&typeof e.style!="undefined"&&!Ke(e),na=e=>e.nodeType===8,oa=e=>e.nodeType===3,Ne=e=>e.tagName==="IMG",pt=e=>e.tagName==="VIDEO",ia=e=>e.tagName==="CANVAS",aa=e=>e.tagName==="TEXTAREA",sa=e=>e.tagName==="INPUT",la=e=>e.tagName==="STYLE",ca=e=>e.tagName==="SCRIPT",ua=e=>e.tagName==="SELECT",da=e=>e.tagName==="SLOT",fa=e=>e.tagName==="IFRAME",ha=(...e)=>console.warn(Yr,...e);function pa(e){var t;const r=e==null||(t=e.createElement)===null||t===void 0?void 0:t.call(e,"canvas");return r&&(r.height=r.width=1),!!r&&"toDataURL"in r&&!!r.toDataURL("image/webp").includes("image/webp")}var rr=e=>e.startsWith("data:");function Zr(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(ye&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!ye)return e;const r=mt().implementation.createHTMLDocument(),n=r.createElement("base"),o=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(o),t&&(n.href=t),o.href=e,o.href}function mt(e){var t;return(t=e&&he(e)?e==null?void 0:e.ownerDocument:e)!==null&&t!==void 0?t:window.document}var bt="http://www.w3.org/2000/svg";function ma(e,t,r){const n=mt(r).createElementNS(bt,"svg");return n.setAttributeNS(null,"width",e.toString()),n.setAttributeNS(null,"height",t.toString()),n.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),n}function ba(e,t){let r=new XMLSerializer().serializeToString(e);return t&&(r=r.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`}async function ga(e,t="image/png",r=1){try{return await new Promise((n,o)=>{e.toBlob(i=>{i?n(i):o(new Error("Blob is null"))},t,r)})}catch(n){if(Ji)return va(e.toDataURL(t,r));throw n}}function va(e){var t,r;const[n,o]=e.split(","),i=(t=(r=n.match(/data:(.+);/))===null||r===void 0?void 0:r[1])!==null&&t!==void 0?t:void 0,a=window.atob(o),l=a.length,s=new Uint8Array(l);for(let u=0;u<l;u+=1)s[u]=a.charCodeAt(u);return new Blob([s],{type:i})}function Qr(e,t){return new Promise((r,n)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>n(o.error),o.onabort=()=>n(new Error(`Failed read blob to ${t}`)),t==="dataUrl"?o.readAsDataURL(e):t==="arrayBuffer"&&o.readAsArrayBuffer(e)})}var ya=e=>Qr(e,"dataUrl"),wa=e=>Qr(e,"arrayBuffer");function _e(e,t){const r=mt(t).createElement("img");return r.decoding="sync",r.loading="eager",r.src=e,r}function Ze(e,t){return new Promise(r=>{const{timeout:n,ownerDocument:o,onError:i,onWarn:a}=t!=null?t:{},l=typeof e=="string"?_e(e,mt(o)):e;let s=null,u=null;function f(){r(l),s&&clearTimeout(s),u==null||u()}if(n&&(s=setTimeout(f,n)),pt(l)){const c=l.currentSrc||l.src;if(!c)return l.poster?Ze(l.poster,t).then(r):f();if(l.readyState>=2)return f();const b=f,d=h=>{a==null||a("Failed video load",c,h),i==null||i(h),f()};u=()=>{l.removeEventListener("loadeddata",b),l.removeEventListener("error",d)},l.addEventListener("loadeddata",b,{once:!0}),l.addEventListener("error",d,{once:!0})}else{const c=Jr(l)?l.href.baseVal:l.currentSrc||l.src;if(!c)return f();const b=async()=>{if(Ne(l)&&"decode"in l)try{await l.decode()}catch(h){a==null||a("Failed to decode image, trying to render anyway",l.dataset.originalSrc||c,h)}f()},d=h=>{a==null||a("Failed image load",l.dataset.originalSrc||c,h),f()};if(Ne(l)&&l.complete)return b();u=()=>{l.removeEventListener("load",b),l.removeEventListener("error",d)},l.addEventListener("load",b,{once:!0}),l.addEventListener("error",d,{once:!0})}})}async function Sa(e,t){Je(e)&&(Ne(e)||pt(e)?await Ze(e,t):await Promise.all(["img","video"].flatMap(r=>Array.from(e.querySelectorAll(r)).map(n=>Ze(n,t)))))}var en=(function(){let t=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${r()}${t}`)})();function tn(e){return e==null?void 0:e.split(",").map(t=>t.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var rn=0;function xa(e){const t=`${Yr}[#${rn}]`;return rn++,{time:r=>e&&console.time(`${t} ${r}`),timeEnd:r=>e&&console.timeEnd(`${t} ${r}`),warn:(...r)=>e&&ha(...r)}}function Ea(e){return{cache:e?"no-cache":"force-cache"}}async function nr(e,t){return Zi(e)?e:Ca(e,{...t,autoDestruct:!0})}async function Ca(e,t){var r,n,o,i,a;const{scale:l=1,workerUrl:s,workerNumber:u=1}=t||{},f=!!(t!=null&&t.debug),c=(r=t==null?void 0:t.features)!==null&&r!==void 0?r:!0,b=(n=e.ownerDocument)!==null&&n!==void 0?n:ye?window.document:void 0,d=(o=(i=e.ownerDocument)===null||i===void 0?void 0:i.defaultView)!==null&&o!==void 0?o:ye?window:void 0,h=new Map,m={width:0,height:0,quality:1,type:"image/png",scale:l,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:f,fetch:{requestInit:Ea(t==null||(a=t.fetch)===null||a===void 0?void 0:a.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:!1,...t==null?void 0:t.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:u,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:!1,...t,__CONTEXT__:!0,log:xa(f),node:e,ownerDocument:b,ownerWindow:d,dpi:l===1?null:96*l,svgStyleElement:nn(b),svgDefsElement:b==null?void 0:b.createElementNS(bt,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:Ki&&s&&u?u:0})].map(()=>{try{const g=new Worker(s);return g.onmessage=async v=>{const{url:w,result:C}=v.data;if(C){var E,T;(E=h.get(w))===null||E===void 0||(T=E.resolve)===null||T===void 0||T.call(E,C)}else{var L,k;(L=h.get(w))===null||L===void 0||(k=L.reject)===null||k===void 0||k.call(L,new Error(`Error receiving message from worker: ${w}`))}},g.onmessageerror=v=>{var w,C;const{url:E}=v.data;(w=h.get(E))===null||w===void 0||(C=w.reject)===null||C===void 0||C.call(w,new Error(`Error receiving message from worker: ${E}`))},g}catch(g){return m.log.warn("Failed to new Worker",g),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[pa(b)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:h,drawImageCount:0,tasks:[],features:c,isEnable:g=>{var v;if(g==="restoreScrollPosition"){var w;return typeof c=="boolean"?!1:(w=c[g])!==null&&w!==void 0?w:!1}return typeof c=="boolean"?c:(v=c[g])!==null&&v!==void 0?v:!0},shadowRoots:[]};m.log.time("wait until load"),await Sa(e,{timeout:m.timeout,onWarn:m.log.warn}),m.log.timeEnd("wait until load");const{width:p,height:y}=ka(e,m);return m.width=p,m.height=y,m}function nn(e){if(!e)return;const t=e.createElement("style"),r=t.ownerDocument.createTextNode(`
|
|
3
|
-
.______background-clip--text {
|
|
4
|
-
|
|
5
|
-
-webkit-background-clip: text;
|
|
6
|
-
}
|
|
7
|
-
`);return t.appendChild(r),t}function ka(e,t){let{width:r,height:n}=t;if(he(e)&&(!r||!n)){const o=e.getBoundingClientRect();r=r||o.width||Number(e.getAttribute("width"))||0,n=n||o.height||Number(e.getAttribute("height"))||0}return{width:r,height:n}}async function Ma(e,t){const{log:r,timeout:n,drawImageCount:o,drawImageInterval:i}=t;r.time("image to canvas");const a=await Ze(e,{timeout:n,onWarn:t.log.warn}),{canvas:l,context2d:s}=Ia(e.ownerDocument,t),u=()=>{try{s==null||s.drawImage(a,0,0,l.width,l.height)}catch(f){t.log.warn("Failed to drawImage",f)}};if(u(),t.isEnable("fixSvgXmlDecode"))for(let f=0;f<o;f++)await new Promise(c=>{setTimeout(()=>{s==null||s.clearRect(0,0,l.width,l.height),u(),c()},f+i)});return t.drawImageCount=0,r.timeEnd("image to canvas"),l}function Ia(e,t){const{width:r,height:n,scale:o,backgroundColor:i,maximumCanvasSize:a}=t,l=e.createElement("canvas");l.width=Math.floor(r*o),l.height=Math.floor(n*o),l.style.width=`${r}px`,l.style.height=`${n}px`,a&&(l.width>a||l.height>a)&&(l.width>a&&l.height>a?l.width>l.height?(l.height*=a/l.width,l.width=a):(l.width*=a/l.height,l.height=a):l.width>a?(l.height*=a/l.width,l.width=a):(l.width*=a/l.height,l.height=a));const s=l.getContext("2d");return s&&i&&(s.fillStyle=i,s.fillRect(0,0,l.width,l.height)),{canvas:l,context2d:s}}function on(e,t){if(e.ownerDocument)try{const i=e.toDataURL();if(i!=="data:,")return _e(i,e.ownerDocument)}catch(i){t.log.warn("Failed to clone canvas",i)}const r=e.cloneNode(!1),n=e.getContext("2d"),o=r.getContext("2d");try{return n&&o&&o.putImageData(n.getImageData(0,0,e.width,e.height),0,0),r}catch(i){t.log.warn("Failed to clone canvas",i)}return r}function Ra(e,t){try{var r;if(!(e==null||(r=e.contentDocument)===null||r===void 0)&&r.documentElement)return or(e.contentDocument.documentElement,t)}catch(n){t.log.warn("Failed to clone iframe",n)}return e.cloneNode(!1)}function Ta(e){const t=e.cloneNode(!1);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager"),t}async function Na(e,t){if(e.ownerDocument&&!e.currentSrc&&e.poster)return _e(e.poster,e.ownerDocument);const r=e.cloneNode(!1);r.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(r.src=e.currentSrc);const n=r.ownerDocument;if(n){let o=!0;if(await Ze(r,{onError:()=>o=!1,onWarn:t.log.warn}),!o)return e.poster?_e(e.poster,e.ownerDocument):r;r.currentTime=e.currentTime,await new Promise(a=>{r.addEventListener("seeked",a,{once:!0})});const i=n.createElement("canvas");i.width=e.offsetWidth,i.height=e.offsetHeight;try{const a=i.getContext("2d");a&&a.drawImage(r,0,0,i.width,i.height)}catch(a){return t.log.warn("Failed to clone video",a),e.poster?_e(e.poster,e.ownerDocument):r}return on(i,t)}return r}function _a(e,t){return ia(e)?on(e,t):fa(e)?Ra(e,t):Ne(e)?Ta(e):pt(e)?Na(e,t):e.cloneNode(!1)}function La(e){let t=e.sandbox;if(!t){const{ownerDocument:r}=e;try{r&&(t=r.createElement("iframe"),t.id=`__SANDBOX__${en()}`,t.width="0",t.height="0",t.style.visibility="hidden",t.style.position="fixed",r.body.appendChild(t),t.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',e.sandbox=t)}catch(n){e.log.warn("Failed to getSandBox",n)}}return t}var Aa=["width","height","-webkit-text-fill-color"],Oa=["stroke","fill"];function an(e,t,r){const{defaultComputedStyles:n}=r,o=e.nodeName.toLowerCase(),i=Ke(e)&&o!=="svg",a=i?Oa.map(m=>[m,e.getAttribute(m)]).filter(([,m])=>m!==null):[],l=[i&&"svg",o,a.map((m,p)=>`${m}=${p}`).join(","),t].filter(Boolean).join(":");if(n.has(l))return n.get(l);const s=La(r),u=s==null?void 0:s.contentWindow;if(!u)return new Map;const f=u==null?void 0:u.document;let c,b;i?(c=f.createElementNS(bt,"svg"),b=c.ownerDocument.createElementNS(c.namespaceURI,o),a.forEach(([m,p])=>{b.setAttributeNS(null,m,p)}),c.appendChild(b)):c=b=f.createElement(o),b.textContent=" ",f.body.appendChild(c);const d=u.getComputedStyle(b,t),h=new Map;for(let m=d.length,p=0;p<m;p++){const y=d.item(p);Aa.includes(y)||h.set(y,d.getPropertyValue(y))}return f.body.removeChild(c),n.set(l,h),h}function sn(e,t,r){const n=new Map,o=[],i=new Map;if(r)for(const s of r)l(s);else for(let s=e.length,u=0;u<s;u++)l(e.item(u));for(let s=o.length,u=0;u<s;u++){var a;(a=i.get(o[u]))===null||a===void 0||a.forEach((f,c)=>n.set(c,f))}function l(s){const u=e.getPropertyValue(s),f=e.getPropertyPriority(s),c=s.lastIndexOf("-"),b=c>-1?s.substring(0,c):void 0;if(b){let d=i.get(b);d||(d=new Map,i.set(b,d)),d.set(s,[u,f])}t.get(s)===u&&!f||(b?o.push(b):n.set(s,[u,f]))}return n}function Da(e,t,r,n){var o;const{ownerWindow:i,includeStyleProperties:a,currentParentNodeStyle:l}=n,s=t.style,u=i.getComputedStyle(e),f=an(e,null,n);l==null||l.forEach((m,p)=>{f.delete(p)});const c=sn(u,f,a);if(c.delete("transition-property"),c.delete("all"),c.delete("d"),c.delete("content"),r&&(c.delete("position"),c.delete("margin-top"),c.delete("margin-right"),c.delete("margin-bottom"),c.delete("margin-left"),c.delete("margin-block-start"),c.delete("margin-block-end"),c.delete("margin-inline-start"),c.delete("margin-inline-end"),c.set("box-sizing",["border-box",""])),((o=c.get("background-clip"))===null||o===void 0?void 0:o[0])==="text"&&t.classList.add("______background-clip--text"),Kr){var b,d,h;c.has("font-kerning")||c.set("font-kerning",["normal",""]),(((b=c.get("overflow-x"))===null||b===void 0?void 0:b[0])==="hidden"||((d=c.get("overflow-y"))===null||d===void 0?void 0:d[0])==="hidden")&&((h=c.get("text-overflow"))===null||h===void 0?void 0:h[0])==="ellipsis"&&e.scrollWidth===e.clientWidth&&c.set("text-overflow",["clip",""])}for(let m=s.length,p=0;p<m;p++)s.removeProperty(s.item(p));return c.forEach(([m,p],y)=>{s.setProperty(y,m,p)}),c}function Fa(e,t){(aa(e)||sa(e)||ua(e))&&t.setAttribute("value",e.value)}var Pa=["::before","::after"],Ua=["::-webkit-scrollbar","::-webkit-scrollbar-button","::-webkit-scrollbar-thumb","::-webkit-scrollbar-track","::-webkit-scrollbar-track-piece","::-webkit-scrollbar-corner","::-webkit-resizer"];function Ba(e,t,r,n,o){const{ownerWindow:i,svgStyleElement:a,svgStyles:l,currentNodeStyle:s}=n;if(!a||!i)return;function u(f){var c;const b=i.getComputedStyle(e,f);let d=b.getPropertyValue("content");if(!d||d==="none")return;o==null||o(d),d=d.replace(/(')|(")|(counter\(.+\))/g,"");const h=[en()],m=an(e,f,n);s==null||s.forEach((w,C)=>{m.delete(C)});const p=sn(b,m,n.includeStyleProperties);p.delete("content"),p.delete("-webkit-locale"),((c=p.get("background-clip"))===null||c===void 0?void 0:c[0])==="text"&&t.classList.add("______background-clip--text");const y=[`content: '${d}';`];if(p.forEach(([w,C],E)=>{y.push(`${E}: ${w}${C?" !important":""};`)}),y.length===1)return;try{t.className=[t.className,...h].join(" ")}catch(w){n.log.warn("Failed to copyPseudoClass",w);return}const g=y.join(`
|
|
8
|
-
`);let v=l.get(g);v||(v=[],l.set(g,v)),v.push(`.${h[0]}${f}`)}Pa.forEach(u),r&&Ua.forEach(u)}var ln=new Set(["symbol"]);async function cn(e,t,r,n,o){if(he(r)&&(la(r)||ca(r))||n.filter&&!n.filter(r))return;ln.has(t.nodeName)||ln.has(r.nodeName)?n.currentParentNodeStyle=void 0:n.currentParentNodeStyle=n.currentNodeStyle;const i=await or(r,n,!1,o);n.isEnable("restoreScrollPosition")&&za(e,i),t.appendChild(i)}async function un(e,t,r,n){let o=e.firstChild;if(he(e)&&e.shadowRoot){var i;o=(i=e.shadowRoot)===null||i===void 0?void 0:i.firstChild,r.shadowRoots.push(e.shadowRoot)}for(let a=o;a;a=a.nextSibling)if(!na(a))if(he(a)&&da(a)&&typeof a.assignedNodes=="function"){const l=a.assignedNodes();for(let s=0;s<l.length;s++)await cn(e,t,l[s],r,n)}else await cn(e,t,a,r,n)}function za(e,t){if(!Je(e)||!Je(t))return;const{scrollTop:r,scrollLeft:n}=e;if(!r&&!n)return;const{transform:o}=t.style,i=new DOMMatrix(o),{a,b:l,c:s,d:u}=i;i.a=1,i.b=0,i.c=0,i.d=1,i.translateSelf(-n,-r),i.a=a,i.b=l,i.c=s,i.d=u,t.style.transform=i.toString()}function $a(e,t){const{backgroundColor:r,width:n,height:o,style:i}=t,a=e.style;if(r&&a.setProperty("background-color",r,"important"),n&&a.setProperty("width",`${n}px`,"important"),o&&a.setProperty("height",`${o}px`,"important"),i)for(const l in i)a[l]=i[l]}var Wa=/^[\w-:]+$/;async function or(e,t,r=!1,n){const{ownerDocument:o,ownerWindow:i,fontFamilies:a,onCloneEachNode:l}=t;if(o&&oa(e))return n&&/\S/.test(e.data)&&n(e.data),o.createTextNode(e.data);if(o&&i&&he(e)&&(Je(e)||Ke(e))){var s,u;const d=await _a(e,t);if(t.isEnable("removeAbnormalAttributes")){const v=d.getAttributeNames();for(let w=v.length,C=0;C<w;C++){const E=v[C];Wa.test(E)||d.removeAttribute(E)}}const h=t.currentNodeStyle=Da(e,d,r,t);r&&$a(d,t);let m=!1;if(t.isEnable("copyScrollbar")){var f,c;const v=[(f=h.get("overflow-x"))===null||f===void 0?void 0:f[0],(c=h.get("overflow-y"))===null||c===void 0?void 0:c[0]];m=v.includes("scroll")||(v.includes("auto")||v.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)}const p=(s=h.get("text-transform"))===null||s===void 0?void 0:s[0],y=tn((u=h.get("font-family"))===null||u===void 0?void 0:u[0]),g=y?v=>{p==="uppercase"?v=v.toUpperCase():p==="lowercase"?v=v.toLowerCase():p==="capitalize"&&(v=v[0].toUpperCase()+v.substring(1)),y.forEach(w=>{let C=a.get(w);C||a.set(w,C=new Set),v.split("").forEach(E=>C.add(E))})}:void 0;return Ba(e,d,m,t,g),Fa(e,d),pt(e)||await un(e,d,t,g),await(l==null?void 0:l(d)),d}const b=e.cloneNode(!1);return await un(e,b,t),await(l==null?void 0:l(b)),b}function Ha(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove()}catch(t){e.log.warn("Failed to destroyContext",t)}e.sandbox=void 0}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[],e.shadowRoots=[]}function ja(e){const{url:t,timeout:r,responseType:n,...o}=e,i=new AbortController,a=r?setTimeout(()=>i.abort(),r):void 0;return fetch(t,{signal:i.signal,...o}).then(l=>{if(!l.ok)throw new Error("Failed fetch, not 2xx response",{cause:l});switch(n){case"arrayBuffer":return l.arrayBuffer();case"dataUrl":return l.blob().then(ya);default:return l.text()}}).finally(()=>clearTimeout(a))}function Qe(e,t){const{url:r,requestType:n="text",responseType:o="text",imageDom:i}=t;let a=r;const{timeout:l,acceptOfImage:s,requests:u,fetchFn:f,fetch:{requestInit:c,bypassingCache:b,placeholderImage:d},font:h,workers:m,fontFamilies:p}=e;n==="image"&&(ht||tr)&&e.drawImageCount++;let y=u.get(r);if(!y){b&&b instanceof RegExp&&b.test(a)&&(a+=(/\?/.test(a)?"&":"?")+new Date().getTime());const g=n.startsWith("font")&&h&&h.minify,v=new Set;g&&n.split(";")[1].split(",").forEach(E=>{p.has(E)&&p.get(E).forEach(T=>v.add(T))});const w=g&&v.size,C={url:a,timeout:l,responseType:w?"arrayBuffer":o,headers:n==="image"?{accept:s}:void 0,...c};y={type:n,resolve:void 0,reject:void 0,response:null},y.response=(async()=>{if(f&&n==="image"){const E=await f(r);if(E)return E}return!ht&&r.startsWith("http")&&m.length?new Promise((E,T)=>{m[u.size&m.length-1].postMessage({rawUrl:r,...C}),y.resolve=E,y.reject=T}):ja(C)})().catch(E=>{if(u.delete(r),n==="image"&&d)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",a),typeof d=="string"?d:d(i);throw E}),u.set(r,y)}return y.response}async function dn(e,t,r,n){if(!fn(e))return e;for(const[o,i]of Va(e,t))try{const a=await Qe(r,{url:i,requestType:n?"image":"text",responseType:"dataUrl"});e=e.replace(Ga(o),`$1${a}$3`)}catch(a){r.log.warn("Failed to fetch css data url",o,a)}return e}function fn(e){return/url\((['"]?)([^'"]+?)\1\)/.test(e)}var hn=/url\((['"]?)([^'"]+?)\1\)/g;function Va(e,t){const r=[];return e.replace(hn,(n,o,i)=>(r.push([i,Zr(i,t)]),n)),r.filter(([n])=>!rr(n))}function Ga(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}var qa=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function Xa(e,t){return qa.map(r=>{const n=e.getPropertyValue(r);return!n||n==="none"?null:((ht||tr)&&t.drawImageCount++,dn(n,null,t,!0).then(o=>{!o||n===o||e.setProperty(r,o,e.getPropertyPriority(r))}))}).filter(Boolean)}function Ya(e,t){if(Ne(e)){const r=e.currentSrc||e.src;if(!rr(r))return[Qe(t,{url:r,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(n=>{n&&(e.srcset="",e.dataset.originalSrc=r,e.src=n||"")})];(ht||tr)&&t.drawImageCount++}else if(Ke(e)&&!rr(e.href.baseVal)){const r=e.href.baseVal;return[Qe(t,{url:r,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(n=>{n&&(e.dataset.originalSrc=r,e.href.baseVal=n||"")})]}return[]}function Ka(e,t){var r;const{ownerDocument:n,svgDefsElement:o}=t,i=(r=e.getAttribute("href"))!==null&&r!==void 0?r:e.getAttribute("xlink:href");if(!i)return[];const[a,l]=i.split("#");if(l){const s=`#${l}`,u=t.shadowRoots.reduce((f,c)=>f!=null?f:c.querySelector(`svg ${s}`),n==null?void 0:n.querySelector(`svg ${s}`));if(a&&e.setAttribute("href",s),o!=null&&o.querySelector(s))return[];if(u)return o==null||o.appendChild(u.cloneNode(!0)),[];if(a)return[Qe(t,{url:a,responseType:"text"}).then(f=>{o==null||o.insertAdjacentHTML("beforeend",f)})]}return[]}function pn(e,t){const{tasks:r}=t;he(e)&&((Ne(e)||Jr(e))&&r.push(...Ya(e,t)),ra(e)&&r.push(...Ka(e,t))),Je(e)&&r.push(...Xa(e.style,t)),e.childNodes.forEach(n=>{pn(n,t)})}async function Ja(e,t){const{ownerDocument:r,svgStyleElement:n,fontFamilies:o,fontCssTexts:i,tasks:a,font:l}=t;if(!(!r||!n||!o.size))if(l&&l.cssText){const s=bn(l.cssText,t);n.appendChild(r.createTextNode(`${s}
|
|
9
|
-
`))}else{const s=Array.from(r.styleSheets).filter(d=>{try{return"cssRules"in d&&!!d.cssRules.length}catch(h){return t.log.warn(`Error while reading CSS rules from ${d.href}`,h),!1}}),u=r.implementation.createHTMLDocument(""),f=u.createElement("style");u.head.appendChild(f);const c=f.sheet;await Promise.all(s.flatMap(d=>Array.from(d.cssRules).map(async h=>{if(ea(h)){const m=h.href;let p="";try{p=await Qe(t,{url:m,requestType:"text",responseType:"text"})}catch(g){t.log.warn(`Error fetch remote css import from ${m}`,g)}const y=p.replace(hn,(g,v,w)=>g.replace(w,Zr(w,m)));for(const g of Qa(y))try{c.insertRule(g,c.cssRules.length)}catch(v){t.log.warn("Error inserting rule from remote css import",{rule:g,error:v})}}}))),c.cssRules.length&&s.push(c);const b=[];s.forEach(d=>{ir(d.cssRules,b)}),b.filter(d=>{var h;return Qi(d)&&fn(d.style.getPropertyValue("src"))&&((h=tn(d.style.getPropertyValue("font-family")))===null||h===void 0?void 0:h.some(m=>o.has(m)))}).forEach(d=>{const h=d,m=i.get(h.cssText);m?n.appendChild(r.createTextNode(`${m}
|
|
10
|
-
`)):a.push(dn(h.cssText,h.parentStyleSheet?h.parentStyleSheet.href:null,t).then(p=>{p=bn(p,t),i.set(h.cssText,p),n.appendChild(r.createTextNode(`${p}
|
|
11
|
-
`))}))})}}var Za=/(\/\*[\s\S]*?\*\/)/g,mn=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function Qa(e){if(e==null)return[];const t=[];let r=e.replace(Za,"");for(;;){const i=mn.exec(r);if(!i)break;t.push(i[0])}r=r.replace(mn,"");const n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let i=n.exec(r);if(i)o.lastIndex=n.lastIndex;else if(i=o.exec(r),i)n.lastIndex=o.lastIndex;else break;t.push(i[0])}return t}var es=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ts=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function bn(e,t){const{font:r}=t,n=r?r==null?void 0:r.preferredFormat:void 0;return n?e.replace(ts,o=>{for(;;){const[i,,a]=es.exec(o)||[];if(!a)return"";if(a===n)return`src: ${i};`}}):e}function ir(e,t=[]){for(const r of Array.from(e))ta(r)?t.push(...ir(r.cssRules)):"cssRules"in r?ir(r.cssRules,t):t.push(r);return t}var rs=/\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;function ns(e){return rs.test(e.innerHTML)}async function os(e,t){const r=await nr(e,t);if(he(r.node)&&Ke(r.node)&&!ns(r.node))return r.node;const{ownerDocument:n,log:o,tasks:i,svgStyleElement:a,svgDefsElement:l,svgStyles:s,font:u,progress:f,autoDestruct:c,onCloneNode:b,onEmbedNode:d,onCreateForeignObjectSvg:h}=r;o.time("clone node");const m=await or(r.node,r,!0);if(a&&n){let w="";s.forEach((C,E)=>{w+=`${C.join(`,
|
|
12
|
-
`)} {
|
|
13
|
-
${E}
|
|
14
|
-
}
|
|
15
|
-
`}),a.appendChild(n.createTextNode(w))}o.timeEnd("clone node"),await(b==null?void 0:b(m)),u!==!1&&he(m)&&(o.time("embed web font"),await Ja(m,r),o.timeEnd("embed web font")),o.time("embed node"),pn(m,r);const p=i.length;let y=0;const g=async()=>{for(;;){const w=i.pop();if(!w)break;try{await w}catch(C){r.log.warn("Failed to run task",C)}f==null||f(++y,p)}};f==null||f(y,p),await Promise.all([...Array.from({length:4})].map(g)),o.timeEnd("embed node"),await(d==null?void 0:d(m));const v=is(m,r);return l&&v.insertBefore(l,v.children[0]),a&&v.insertBefore(a,v.children[0]),c&&Ha(r),await(h==null?void 0:h(v)),v}function is(e,t){const{width:r,height:n}=t,o=ma(r,n,e.ownerDocument),i=o.ownerDocument.createElementNS(o.namespaceURI,"foreignObject");return i.setAttributeNS(null,"x","0%"),i.setAttributeNS(null,"y","0%"),i.setAttributeNS(null,"width","100%"),i.setAttributeNS(null,"height","100%"),i.append(e),o.appendChild(i),o}async function as(e,t){const r=await nr(e,t),n=await os(r),o=ba(n,r.isEnable("removeControlCharacter"));if(!r.autoDestruct){var i;r.svgStyleElement=nn(r.ownerDocument),r.svgDefsElement=(i=r.ownerDocument)===null||i===void 0?void 0:i.createElementNS(bt,"defs"),r.svgStyles.clear()}return await Ma(_e(o,n.ownerDocument),r)}async function ss(e,t){const r=await nr(e,t),{log:n,type:o,quality:i,dpi:a}=r,l=await as(r);n.time("canvas to blob");const s=await ga(l,o,i);if(["image/png","image/jpeg"].includes(o)&&a){const u=await wa(s.slice(0,33));let f=new Uint8Array(u);return o==="image/png"?f=Yi(f,a):o==="image/jpeg"&&(f=Vi(f,a)),n.timeEnd("canvas to blob"),new Blob([f,s.slice(33)],{type:o})}return n.timeEnd("canvas to blob"),s}var xu="•",ls=32,cs=new Set(["button","submit","reset","checkbox","radio","range","color","file","image","hidden"]);function ar(e){const t=Math.min(Math.max(e,1),ls);return"•".repeat(t)}function us(e){for(const n of Array.from(e.querySelectorAll("input"))){var t;const o=((t=n.getAttribute("type"))!==null&&t!==void 0?t:"text").toLowerCase();if(cs.has(o))continue;const i=n.value;if(!i)continue;const a=ar(i.length);n.value=a,n.setAttribute("value",a)}for(const n of Array.from(e.querySelectorAll("textarea"))){const o=n.value||n.textContent||"";if(!o)continue;const i=ar(o.length);n.value=i,n.textContent=i,n.setAttribute("value",i)}for(const n of Array.from(e.querySelectorAll("[contenteditable]"))){var r;if(n.getAttribute("contenteditable")==="false")continue;const o=(r=n.textContent)!==null&&r!==void 0?r:"";o.trim()&&(n.textContent=ar(o.length))}}var ds={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","image/gif":"gif"};function gn(e){var t;return(t=ds[e])!==null&&t!==void 0?t:"png"}function vn(e,t,r){const n=e==null?void 0:e[`inner${r}`],o=t.documentElement[`client${r}`];return Math.max(1,Math.round((typeof n=="number"&&n>0?n:o)||0)||1)}var fs=6e3,hs=(e,t)=>ss(e,{width:t.width,height:t.height,type:t.type,timeout:fs,filter:t.filter,onCloneNode:t.onCloneNode});async function yn(e={}){try{var t,r,n,o,i,a;const l=(t=e.doc)!==null&&t!==void 0?t:document,s=(r=(n=e.win)!==null&&n!==void 0?n:l.defaultView)!==null&&r!==void 0?r:void 0,u=(o=e.target)!==null&&o!==void 0?o:l.documentElement,f=(i=e.type)!==null&&i!==void 0?i:"image/png",c=vn(s,l,"Width"),b=vn(s,l,"Height"),d=await((a=e.capture)!==null&&a!==void 0?a:hs)(u,{width:c,height:b,type:f,filter:h=>!jo(h),onCloneNode:h=>us(h)});return d?{blob:d,width:c,height:b,type:f}:null}catch{return null}}function et(e){"@babel/helpers - typeof";return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(e)}function ps(e,t){if(et(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(et(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ms(e){var t=ps(e,"string");return et(t)=="symbol"?t:t+""}function Le(e,t,r){return(t=ms(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Eu=60;function bs(e,t){if(e==null)return 60;const r=e.trim();if(r==="")return 60;if(/^\d+$/.test(r))return Number(r);const n=Date.parse(r);return Number.isNaN(n)?60:Math.max(0,Math.ceil((n-t)/1e3))}var gs=class{constructor(e=Date.now){Le(this,"now",void 0),Le(this,"pausedUntil",0),this.now=e}isPaused(){return this.now()<this.pausedUntil}retryAfterSeconds(){return Math.max(0,Math.ceil((this.pausedUntil-this.now())/1e3))}hold(e){const t=this.now(),r=bs(e,t),n=t+r*1e3;return n>this.pausedUntil&&(this.pausedUntil=n),r}},vs="screenshot",ys="replay",ws=new gs;function Ss(e){return`${e.replace(/\/+$/,"")}/api/ingest/feedback`}function xs(e){if(!e)return{};const t={};return e.signedIdentity&&(t.signedIdentity=e.signedIdentity),e.reporterId&&(t.reporterId=e.reporterId),e.anonymousId&&(t.anonymousId=e.anonymousId),t}async function wn(e,t,r=fetch,n=ws){var o,i;const a=(o=t.content.source)!==null&&o!==void 0?o:"reporter",l=a==="auto";if(l&&n.isPaused())return{ok:!1,reason:"backpressure",retryAfterSeconds:n.retryAfterSeconds()};const s={key:t.key,...xs(t.identity),...t.content,source:a},u=new FormData;if(u.append("payload",JSON.stringify(s)),!((i=t.screenshot)===null||i===void 0)&&i.blob){var f;u.append(vs,t.screenshot.blob,(f=t.screenshot.filename)!==null&&f!==void 0?f:"screenshot.png")}if(t.replay&&t.replay.events.length>0)try{const b=JSON.stringify(t.replay.events);u.append(ys,new Blob([b],{type:"application/json"}),"replay.json")}catch{}let c;try{c=await r(Ss(e),{method:"POST",body:u})}catch{return{ok:!1,reason:"unreachable"}}if(!c.ok)return l&&c.status===429?{ok:!1,reason:"backpressure",retryAfterSeconds:n.hold(c.headers.get("Retry-After"))}:{ok:!1,reason:"refused",status:c.status};try{return{ok:!0,feedback:await c.json()}}catch{return{ok:!0,feedback:null}}}var gt="0.4.0",Cu=5,Es=2e3,ku=20,Cs=5,ks=5;function Ms(e){if(!e||e.length===0)return[];const t=[];for(let n=e.length-1;n>=0&&t.length<ks;n-=1){var r;const o=(r=e[n])===null||r===void 0?void 0:r.id;typeof o=="string"&&o.length>0&&t.unshift(o)}return t}var Is=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,Rs=/\bhttps?:\/\/[^\s"')]+/gi,Ts=/\b0x[0-9a-f]+\b/gi,Ns=/\b[0-9a-f]{8,}\b/gi,_s=/\d{4,}/g;function Ls(e){return typeof e!="string"||e.length===0?"":e.replace(Is,"<uuid>").replace(Rs,"<url>").replace(Ts,"<hex>").replace(Ns,"<hex>").replace(_s,"<n>").trim()}function As(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function sr(e){const t=e.replace(/\?[^:]*/,""),r=t.lastIndexOf("/");return r>=0?t.slice(r+1):t}function Os(e){var t,r,n;const o=e.match(/^at\s+(.+?)\s+\((.+)\)$/);if(o)return`${(t=o[1])!==null&&t!==void 0?t:""}@${sr((r=o[2])!==null&&r!==void 0?r:"")}`;const i=e.match(/^at\s+(.+)$/);if(i)return`@${sr((n=i[1])!==null&&n!==void 0?n:"")}`;const a=e.indexOf("@");return a>=0?`${e.slice(0,a)}@${sr(e.slice(a+1))}`:null}function Ds(e,t=Cs){if(typeof e!="string"||e.length===0)return"";const r=[];for(const n of e.split(`
|
|
16
|
-
`)){const o=Os(n.trim());if(o&&(r.push(o),r.length>=t))break}return r.join(" < ")}var Fs=30;function Ps(e){var t;const r=e.match(/^(.*?):(\d+)(?::(\d+))?$/);if(!r)return null;const n=(t=r[1])!==null&&t!==void 0?t:"";if(n.length===0||n==="native"||n.includes("<anonymous>"))return null;const o=Number(r[2]);return Number.isFinite(o)?{file:n,line:o,column:r[3]!==void 0?Number(r[3]):null}:null}function Us(e,t=Fs){if(typeof e!="string"||e.length===0)return[];const r=[];for(const a of e.split(`
|
|
17
|
-
`)){if(r.length>=t)break;const l=a.trim();let s=null,u=null;const f=l.match(/^at\s+(.+?)\s+\((.+)\)$/),c=f?null:l.match(/^at\s+(.+)$/),b=f||c?-1:l.indexOf("@");if(f){var n,o;s=(n=f[1])!==null&&n!==void 0?n:null,u=(o=f[2])!==null&&o!==void 0?o:null}else if(c){var i;u=(i=c[1])!==null&&i!==void 0?i:null}else b>=0&&(s=b>0?l.slice(0,b):null,u=l.slice(b+1));if(!u)continue;const d=Ps(u);d&&r.push({file:le(d.file),line:d.line,column:d.column,function:s&&s.length>0?s:null})}return r}function Bs(e,t,r){return As(`${e}|${Ls(t)}|${Ds(r)}`)}var zs=class{constructor(e){var t;Le(this,"options",void 0),Le(this,"tokens",void 0),Le(this,"last",void 0),Le(this,"now",void 0),this.options=e,this.now=(t=e.now)!==null&&t!==void 0?t:Date.now,this.tokens=Math.max(0,e.capacity),this.last=this.now()}take(){const e=this.now(),{capacity:t,refillIntervalMs:r}=this.options;if(r>0&&e>this.last){const n=Math.floor((e-this.last)/r);n>0&&(this.tokens=Math.min(t,this.tokens+n),this.last+=n*r)}return this.tokens>=1?(this.tokens-=1,!0):!1}};function we(e){if(typeof e=="string")return e;if(e==null)return"";try{return String(e)}catch{return""}}function $s(e){const t=e,r=t.error;if(r&&typeof r=="object"){const o=r;return{type:we(o.name)||"Error",value:we(o.message)||we(t.message),stack:typeof o.stack=="string"?o.stack:void 0,original:r}}const n=we(t.message);return n?{type:"Error",value:n,original:n}:null}function Ws(e){const t=e.reason;if(t&&typeof t=="object"){const n=t;return{type:we(n.name)||"UnhandledRejection",value:we(n.message)||we(t),stack:typeof n.stack=="string"?n.stack:void 0,original:t}}const r=we(t);return{type:"UnhandledRejection",value:r,original:t!=null?t:r}}var Hs={destroy:()=>{},droppedCount:()=>0};function js(e){var t,r,n,o,i,a,l,s,u,f,c,b;const d=(t=e.win)!==null&&t!==void 0?t:typeof window!="undefined"?window:void 0;if(!d)return Hs;const h=d,m=(r=(n=e.doc)!==null&&n!==void 0?n:h.document)!==null&&r!==void 0?r:typeof document!="undefined"?document:void 0,p=(o=e.now)!==null&&o!==void 0?o:Date.now,y=(i=e.sdkVersion)!==null&&i!==void 0?i:gt,g=(a=e.maxDistinct)!==null&&a!==void 0?a:20,v=(l=(s=e.deps)===null||s===void 0?void 0:s.captureView)!==null&&l!==void 0?l:yn,w=(u=(f=e.deps)===null||f===void 0?void 0:f.submitReport)!==null&&u!==void 0?u:wn,C=new zs({capacity:(c=e.burstCapacity)!==null&&c!==void 0?c:5,refillIntervalMs:(b=e.burstRefillMs)!==null&&b!==void 0?b:Es,now:p}),E=new Map;let T=0;function L(W,N,z){var H,X,Z,Q,de;const ae=jr({url:(H=h.location)===null||H===void 0?void 0:H.href,environment:Hr(h,y,e.release),trace:z.trace?(X=e.buffer)===null||X===void 0?void 0:X.snapshot():void 0,reporterName:(Z=e.display)===null||Z===void 0?void 0:Z.name,reporterEmail:(Q=e.display)===null||Q===void 0?void 0:Q.email}),fe=(de=E.get(W))===null||de===void 0?void 0:de.frames;return{...ae,source:"auto",errorSignature:W,occurrences:N,...z.trace&&fe&&fe.length>0?{errorFrames:fe}:{}}}async function k(W,N,z){const H=E.get(W);if(!H)return;const X=H.sentCount;H.sentCount=N;try{var Z,Q;const de=L(W,N,z),ae=Tr(de,{hook:e.beforeSend,scrub:e.scrub});if(!ae)return;let fe=null;if(z.screenshot){const Ie=await v({doc:m,win:h});fe=Ie?{blob:Ie.blob,filename:`screenshot.${gn(Ie.type)}`}:null}const $e=z.trace&&(Z=(Q=e.replay)===null||Q===void 0?void 0:Q.snapshot())!==null&&Z!==void 0?Z:null;!(await w(e.apiUrl,{key:e.key,identity:e.identity,content:ae,screenshot:fe,replay:$e})).ok&&H.sentCount===N&&(H.sentCount=X)}catch{H.sentCount===N&&(H.sentCount=X)}}function x(W){const N=Bs(W.type,W.value,W.stack),z=E.get(N);if(z){z.count+=1,z.lastAt=p();return}if(!C.take()){T+=1;return}if(E.size>=g){T+=1;return}const H=p();E.set(N,{count:1,firstAt:H,lastAt:H,sentCount:0,frames:Us(W.stack)});try{var X,Z;const Q=Ms((X=e.buffer)===null||X===void 0?void 0:X.snapshot());(Z=e.buffer)===null||Z===void 0||Z.add(Ei(W.original,H,Q))}catch{}k(N,1,{screenshot:!0,trace:!0})}const A=W=>{try{const N=$s(W);N&&x(N)}catch{}},V=W=>{try{const N=Ws(W);N&&x(N)}catch{}},R=()=>{try{for(const[W,N]of E)N.count>N.sentCount&&k(W,N.count,{screenshot:!1,trace:!1})}catch{}},ue=()=>{(m==null?void 0:m.visibilityState)==="hidden"&&R()};return h.addEventListener("error",A,!0),h.addEventListener("unhandledrejection",V,!0),h.addEventListener("pagehide",R),m==null||m.addEventListener("visibilitychange",ue),{destroy:()=>{h.removeEventListener("error",A,!0),h.removeEventListener("unhandledrejection",V,!0),h.removeEventListener("pagehide",R),m==null||m.removeEventListener("visibilitychange",ue)},droppedCount:()=>T}}var Sn="fixback.anonymousId";function xn(){const e=globalThis.crypto;return e&&typeof e.randomUUID=="function"?e.randomUUID():`fb-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Vs(){try{const e=globalThis.localStorage,t=e.getItem(Sn);if(t)return t;const r=xn();return e.setItem(Sn,r),r}catch{return xn()}}var En="fixback_invite",Gs="fixback:reporter:";function qs(e){try{const t=new URL(e).searchParams.get(En);return t&&t.length>0?t:null}catch{return null}}function Xs(e){try{const t=new URL(e.location.href);if(!t.searchParams.has("fixback_invite"))return;t.searchParams.delete(En);const r=t.searchParams.toString(),n=`${t.pathname}${r?`?${r}`:""}${t.hash}`;e.history.replaceState(e.history.state,"",n)}catch{}}function Cn(e){return`${Gs}${e}`}function kn(){try{var e;return(e=globalThis.localStorage)!==null&&e!==void 0?e:null}catch{return null}}function vt(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}function Ys(e,t,r=kn()){if(!r)return;const n=vt(t.name),o=vt(t.email),i={reporterId:t.reporterId,...n?{name:n}:{},...o?{email:o}:{}};try{r.setItem(Cn(e),JSON.stringify(i))}catch{}}function lr(e,t=kn()){if(!t)return null;try{const r=t.getItem(Cn(e));if(!r)return null;const n=JSON.parse(r);if(typeof(n==null?void 0:n.reporterId)!="string"||n.reporterId.length===0)return null;const o=vt(n.name),i=vt(n.email);return{reporterId:n.reporterId,...o?{name:o}:{},...i?{email:i}:{}}}catch{return null}}function Mn(e,t){return`${e.replace(/\/+$/,"")}/api/invites/${encodeURIComponent(t)}`}function Ks(e,t){return`${Mn(e,t)}/redeem`}var In=new Set(["revoked","expired","exhausted","not_found"]);function Rn(e){return e==="public"||e==="invited"||e==="internal"}function Js(e){if(typeof e!="object"||e===null)return!1;const t=e;return t.status==="pending"?typeof t.projectId=="string"&&(t.kind==="targeted"||t.kind==="shared")&&Rn(t.tier):typeof t.status=="string"&&In.has(t.status)}function Zs(e){if(typeof e!="object"||e===null)return!1;const t=e;return t.status==="redeemed"?typeof t.reporterId=="string"&&typeof t.projectId=="string"&&Rn(t.tier):typeof t.status=="string"&&In.has(t.status)}async function Tn(e){try{return await e.json()}catch{return null}}async function Qs(e,t,r=fetch){let n;try{n=await r(Mn(e,t),{method:"GET",headers:{accept:"application/json"}})}catch{return null}const o=await Tn(n);return Js(o)?o:null}async function el(e,t,r=fetch){let n;try{n=await r(Ks(e,t),{method:"POST",headers:{accept:"application/json"}})}catch{return null}const o=await Tn(n);return Zs(o)?o:null}var tl=`
|
|
1
|
+
(function(re,Me){typeof exports=="object"&&typeof module!="undefined"?Me(exports):typeof define=="function"&&define.amd?define(["exports"],Me):(re=typeof globalThis!="undefined"?globalThis:re||self,Me(re.Fixback={}))})(this,function(re){Object.defineProperty(re,Symbol.toStringTag,{value:"Module"});var Me=Object.defineProperty,lr=(e,t,n)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fe=(e,t,n)=>lr(e,typeof t!="symbol"?t+"":t,n),cr=7,At=/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,Dt=new RegExp(`\\d{${cr},}`,"g"),ur=/\b(bearer|token)\s+[\w.\-~+/]+=*/gi,dr=/\bhttps?:\/\/[^\s"'<>]+/gi;function fr(e){return typeof e!="string"||e.length===0?e:e.replace(At,"[redacted-email]").replace(ur,(t,n)=>`${n} [redacted]`).replace(Dt,"[redacted-number]")}function st(e){return e.replace(At,"[redacted-email]").replace(Dt,"[redacted-number]")}function Z(e){var t;if(typeof e!="string"||e.length===0)return e;let n=e;n=n.replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@?#]*@/i,"$1"),n=n.replace(/\?[^#]*/,""),n=n.replace(/#.*$/,s=>s.includes("=")?"":s);const r=n.match(/^([a-z][a-z0-9+.-]*:\/\/[^/?#]*)([\s\S]*)$/i);if(r)return r[1]+st((t=r[2])!==null&&t!==void 0?t:"");const o=n.match(/^(\/\/[^/?#]*)([\s\S]*)$/);if(o){var i;return o[1]+st((i=o[2])!==null&&i!==void 0?i:"")}return st(n)}function pr(e){const t={...e};return typeof t.url=="string"&&(t.url=Z(t.url)),typeof t.from=="string"&&(t.from=Z(t.from)),typeof t.to=="string"&&(t.to=Z(t.to)),t}function Ee(e){return fr(e.replace(dr,t=>Z(t)))}function at(e){if(typeof e=="string")return Ee(e);if(Array.isArray(e))return e.map(at);if(e&&typeof e=="object"){const t={};for(const[n,r]of Object.entries(e))t[n]=at(r);return t}return e}function hr(e){switch(e.t){case"string":return typeof e.v=="string"?{t:"string",v:Ee(e.v)}:e;case"json":return{t:"json",v:at(e.v)};case"error":{if(!e.v||typeof e.v!="object")return e;const t={...e.v};return typeof t.message=="string"&&(t.message=Ee(t.message)),typeof t.stack=="string"&&(t.stack=Ee(t.stack)),{t:"error",v:t}}default:return e}}function mr(e){const t={...e};return typeof t.message=="string"&&(t.message=Ee(t.message)),t.data&&(t.data=pr(t.data)),typeof t.url=="string"&&(t.url=Z(t.url)),Array.isArray(t.args)&&(t.args=t.args.map(hr)),t}function br(e){const t={...e};return typeof t.url=="string"&&(t.url=Z(t.url)),t.trace&&t.trace.length>0&&(t.trace=t.trace.map(mr)),t.errorFrames&&t.errorFrames.length>0&&(t.errorFrames=t.errorFrames.map(n=>({...n,file:Z(n.file)}))),t}function Ft(e,t={}){const n=t.scrub===!1?e:br(e),r=t.hook;if(!r)return n;try{const o=r(n);return o!=null?o:null}catch{return n}}var gr=30;function lt(e){var t,n,r;const o=e.match(/^at\s+(.+?)\s+\((.+)\)$/);if(o)return{fn:(t=o[1])!==null&&t!==void 0?t:null,location:(n=o[2])!==null&&n!==void 0?n:""};const i=e.match(/^at\s+(.+)$/);if(i)return{fn:null,location:(r=i[1])!==null&&r!==void 0?r:""};const s=e.indexOf("@");return s>=0?{fn:s>0?e.slice(0,s):null,location:e.slice(s+1)}:null}function vr(e){var t;const n=e.match(/^(.*?):(\d+)(?::(\d+))?$/);if(!n)return null;const r=(t=n[1])!==null&&t!==void 0?t:"";if(r.length===0||r==="native"||r.includes("<anonymous>"))return null;const o=Number(n[2]);return Number.isFinite(o)?{file:r,line:o,column:n[3]!==void 0?Number(n[3]):null}:null}function yr(e,t=gr){if(typeof e!="string"||e.length===0)return[];const n=[];for(const r of e.split(`
|
|
2
|
+
`)){if(n.length>=t)break;const o=lt(r.trim());if(!o||!o.location)continue;const i=vr(o.location);i&&n.push({file:Z(i.file),line:i.line,column:i.column,function:o.fn&&o.fn.length>0?o.fn:null})}return n}var Sr=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,wr=/\bhttps?:\/\/[^\s"')]+/gi,xr=/\b0x[0-9a-f]+\b/gi,kr=/\b[0-9a-f]{8,}\b/gi,Cr=/\d{4,}/g,Mr=5;function Er(e){return typeof e!="string"||e.length===0?"":e.replace(Sr,"<uuid>").replace(wr,"<url>").replace(xr,"<hex>").replace(kr,"<hex>").replace(Cr,"<n>").trim()}function Ir(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function _r(e){const t=e.replace(/\?[^:]*/,""),n=t.lastIndexOf("/");return n>=0?t.slice(n+1):t}function Rr(e){var t;const n=lt(e);return n?`${(t=n.fn)!==null&&t!==void 0?t:""}@${_r(n.location)}`:null}function Tr(e,t=Mr){if(typeof e!="string"||e.length===0)return"";const n=[];for(const r of e.split(`
|
|
3
|
+
`)){const o=Rr(r.trim());if(o&&(n.push(o),n.length>=t))break}return n.join(" < ")}function Lr(e,t,n){return Ir(`${e}|${Er(t)}|${Tr(n)}`)}var Sa=60;function Nr(e,t){if(e==null)return 60;const n=e.trim();if(n==="")return 60;if(/^\d+$/.test(n))return Number(n);const r=Date.parse(n);return Number.isNaN(r)?60:Math.max(0,Math.ceil((r-t)/1e3))}var Or=class{constructor(e=Date.now){this.now=e,Fe(this,"pausedUntil",0)}isPaused(){return this.now()<this.pausedUntil}retryAfterSeconds(){return Math.max(0,Math.ceil((this.pausedUntil-this.now())/1e3))}hold(e){const t=this.now(),n=Nr(e,t),r=t+n*1e3;return r>this.pausedUntil&&(this.pausedUntil=r),n}};function Pe(){const e=globalThis.performance;return e&&typeof e.now=="function"?e.now():Date.now()}function Ar(){return globalThis.TextEncoder}function Pt(e){try{const t=Ar();return t?new t().encode(e).length:e.length}catch{return e.length}}function ct(e){try{var t;return Pt((t=JSON.stringify(e))!==null&&t!==void 0?t:"")}catch{return Number.POSITIVE_INFINITY}}function ut(e){if(typeof e=="string")return Pt(e);const t=globalThis.Blob;if(t&&e instanceof t)return e.size;if(typeof ArrayBuffer!="undefined"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e)))return e.byteLength}function Ue(){const e=globalThis;if(typeof e.fetch!="function")return;const t=e.fetch.bind(globalThis);return(n,r)=>t(n,r)}function Dr(e,t){try{var n,r,o;return(n=(r=e.headers)===null||r===void 0||(o=r.get)===null||o===void 0?void 0:o.call(r,t))!==null&&n!==void 0?n:null}catch{return null}}function Fr(e){return`${e.replace(/\/+$/,"")}/api/ingest/boot`}function Pr(e){return`${e.replace(/\/+$/,"")}/api/ingest/feedback`}function Ur(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.originAllowed=="boolean"&&typeof t.canSubmit=="boolean"&&typeof t.gate=="string"&&(t.tier===null||typeof t.tier=="string")}function Ut(e){if(!e)return{};const t={};return e.hostIdentity&&(t.hostIdentity=e.hostIdentity),e.reporterSession&&(t.reporterSession=e.reporterSession),e.anonymousId&&(t.anonymousId=e.anonymousId),t}function $r(e,t){const n=e.replace(/\/+$/,"");return t.startsWith(`${n}/api/ingest/`)||t.startsWith(`${n}/api/connect/`)}async function Br(e,t,n={}){var r;const o=(r=n.fetch)!==null&&r!==void 0?r:Ue();if(!o)return null;let i;try{i=await o(Fr(e),{method:"POST",headers:{"content-type":"application/json",...n.origin?{origin:n.origin}:{}},body:JSON.stringify(t)})}catch{return null}if(!i.ok)return null;let s;try{var l;s=await((l=i.json)===null||l===void 0?void 0:l.call(i))}catch{return null}return Ur(s)?s:null}var wa="fixback-connect",$t="fixback";function zr(e){return`${e.replace(/\/+$/,"")}/api/connect/exchange`}function Wr(e){return`${e.replace(/\/+$/,"")}/api/connect/signout`}function Hr(e,t){var n;const r=(n=e.split("#")[0])!==null&&n!==void 0?n:e;return`${r}${r.includes("?")?"&":"?"}${`key=${encodeURIComponent(t.key)}&return=${encodeURIComponent(t.returnUrl)}`}`}function dt(e){return`fixback.reporterSession.${e}`}function jr(e){if(typeof e!="object"||e===null)return null;const t=e;return t.source!=="fixback-connect"?null:typeof t.code=="string"&&t.code.length>0?t.code:null}function Gr(e){if(typeof e!="object"||e===null)return!1;const t=e;if(typeof t.reporterSession!="string"||t.reporterSession.length===0)return!1;const n=t.account;return typeof n=="object"&&n!==null&&typeof n.name=="string"&&typeof n.email=="string"}async function Vr(e,t,n={}){var r;const o=(r=n.fetch)!==null&&r!==void 0?r:Ue();if(!o)return null;let i;try{i=await o(zr(e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}catch{return null}if(!i.ok)return null;let s;try{var l;s=await((l=i.json)===null||l===void 0?void 0:l.call(i))}catch{return null}return Gr(s)?s:null}async function qr(e,t,n={}){var r;const o=(r=n.fetch)!==null&&r!==void 0?r:Ue();if(o)try{await o(Wr(e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({reporterSession:t})})}catch{}}var Bt="fixback.anonymousId";function zt(){const e=globalThis.crypto;if(e&&typeof e.randomUUID=="function")try{return e.randomUUID()}catch{}return`fb-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}var xa=100,Xr=new Set([".","..","latest"]);function Yr(e){const t=e.trim();if(!(t.length===0||t.length>100)&&!Xr.has(t)&&!/[\s/\\\u0000-\u001f\u007f]/.test(t))return t}var Wt="https://api.fixback.dev",ka=300,Ca=4,Ma=100,ft=1024,Ea=4096,Kr=2048;function ce(e,t){return e.length>t?`${e.slice(0,t)}…`:e}function Ht(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);try{var t;return(t=JSON.stringify(e))!==null&&t!==void 0?t:String(e)}catch{return"[object]"}}function Jr(e){const t=e.map(Ht).join(" ");return t.length>300?`${t.slice(0,300)}…`:t}function jt(e){var t;const n={name:e.name||"Error",message:ce(String((t=e.message)!==null&&t!==void 0?t:""),ft)};return typeof e.stack=="string"&&e.stack.length>0&&(n.stack=ce(e.stack,Kr)),n}function pt(e,t,n){if(e===null)return null;const r=typeof e;if(r==="string")return ce(e,ft);if(r==="number")return Number.isFinite(e)?e:String(e);if(r==="boolean")return e;if(r==="bigint")return`${e.toString()}n`;if(r==="symbol")return e.toString();if(r==="function")return"[Function]";if(r==="undefined")return null;const o=e;if(e instanceof Error){const{name:i,message:s}=jt(e);return{name:i,message:s}}if(n.has(o))return"[Circular]";if(t<=0)return Array.isArray(e)?"[Array]":"[Object]";n.add(o);try{if(Array.isArray(e)){const a=e.slice(0,100).map(c=>pt(c,t-1,n));return e.length>100&&a.push(`… ${e.length-100} more`),a}const i=e,s=Object.keys(i),l={};for(const a of s.slice(0,100)){const c=i[a];typeof c=="undefined"||typeof c=="function"||(l[a]=pt(c,t-1,n))}return s.length>100&&(l["…"]=`${s.length-100} more`),l}finally{n.delete(o)}}function Zr(e){if(e==null)return{t:"null",v:null};const t=typeof e;return t==="string"?{t:"string",v:ce(e,ft)}:t==="number"?Number.isFinite(e)?{t:"number",v:e}:{t:"string",v:String(e)}:t==="boolean"?{t:"bool",v:e}:t==="bigint"?{t:"string",v:`${e.toString()}n`}:t==="symbol"?{t:"string",v:e.toString()}:t==="function"?{t:"string",v:"[Function]"}:e instanceof Error?{t:"error",v:jt(e)}:{t:"json",v:pt(e,4,new Set)}}function Qr(e){if(ct(e)<=4096)return e;let t=e.slice();for(;t.length>1&&ct(t)>4096;)t=t.slice(0,-1);return t.length===1&&ct(t)>4096?[{t:"string",v:"[trace: console argument omitted (too large)]"}]:t}var ht=2048;function Gt(e,t,n,r){const o=Qr(t.map(Zr));return{category:"console",level:e,message:Jr(t),timestamp:n,...o.length>0?{args:o}:{},...r?{source:r}:{}}}function eo(e,t,n){const r=ce(Z(e),ht),o=ce(Z(t),ht);return{category:"navigation",message:`${r} → ${o}`,timestamp:n,data:{from:r,to:o}}}function mt(e){return typeof e!="number"||e<=0?"network-error":e>=500?"http-5xx":e>=400?"http-4xx":"ok"}function Vt(e){if(typeof e!="string")return;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=0?t:void 0}function qt(e){var t;if(typeof e!="string"||e.length===0)return;const n=(t=e.split(";")[0])===null||t===void 0?void 0:t.trim();return n&&n.length>0?n:void 0}function $e(e,t){const n=ce(Z(e.url),ht),r=typeof e.status=="number"&&e.status>0,o=r?` → ${e.status}`:"",i=e.outcome!=="ok"?` (${e.outcome})`:"";return{category:e.api,api:e.api,method:e.method,url:n,message:`${e.method} ${n}${o}${i}`,timestamp:t,...r?{status:e.status}:{},...e.statusText?{statusText:e.statusText}:{},...typeof e.durationMs=="number"?{durationMs:e.durationMs}:{},...typeof e.reqSize=="number"?{reqSize:e.reqSize}:{},...typeof e.respSize=="number"?{respSize:e.respSize}:{},...e.contentType?{contentType:e.contentType}:{},outcome:e.outcome}}function to(e){return e instanceof Error?{name:e.name||"Error",message:e.message}:typeof e=="string"?{name:"Error",message:e}:{name:"Error",message:Ht(e)}}function no(e,t,n){const{name:r,message:o}=to(e),i={category:"error",level:"error",message:o?`${r}: ${o}`:r,timestamp:t,data:{errorType:r}};return n&&n.length>0?{...i,causedBy:n}:i}var Ia=5,ro=2e3,_a=20,Ra=5;function ae(e){if(typeof e=="string")return e;if(e==null)return"";try{return String(e)}catch{return""}}function oo(e){if(!e||e.length===0)return[];const t=[];for(let r=e.length-1;r>=0&&t.length<5;r-=1){var n;const o=(n=e[r])===null||n===void 0?void 0:n.id;typeof o=="string"&&o.length>0&&t.unshift(o)}return t}var io=class{constructor(e){var t;this.options=e,Fe(this,"tokens"),Fe(this,"last"),Fe(this,"now"),this.now=(t=e.now)!==null&&t!==void 0?t:Date.now,this.tokens=Math.max(0,e.capacity),this.last=this.now()}take(){const e=this.now(),{capacity:t,refillIntervalMs:n}=this.options;if(n>0&&e>this.last){const r=Math.floor((e-this.last)/n);r>0&&(this.tokens=Math.min(t,this.tokens+r),this.last+=r*n)}return this.tokens>=1?(this.tokens-=1,!0):!1}};function so(e){var t,n,r,o;const i=(t=e.now)!==null&&t!==void 0?t:Date.now,s=(n=e.maxDistinct)!==null&&n!==void 0?n:20,l=new io({capacity:(r=e.burstCapacity)!==null&&r!==void 0?r:5,refillIntervalMs:(o=e.burstRefillMs)!==null&&o!==void 0?o:ro,now:i}),a=new Map;let c=0;async function p(h,u,d){const f=a.get(h);if(!f)return;const g=f.sentCount;f.sentCount=u;try{!await e.submit({fingerprint:h,occurrences:u,rich:d,frames:f.frames})&&f.sentCount===u&&(f.sentCount=g)}catch{f.sentCount===u&&(f.sentCount=g)}}function m(h){const u=Lr(h.type,h.value,h.stack),d=a.get(u);if(d){d.count+=1,d.lastAt=i();return}if(!l.take()){c+=1;return}if(a.size>=s){c+=1;return}const f=i();a.set(u,{count:1,firstAt:f,lastAt:f,sentCount:0,frames:yr(h.stack)});try{var g,v;const b=oo((g=e.buffer)===null||g===void 0?void 0:g.snapshot());(v=e.buffer)===null||v===void 0||v.add(no(h.original,f,b))}catch{}p(u,1,!0)}return{capture(h){try{const u=e.extract(h);u&&m(u)}catch{}},flush(){try{for(const[h,u]of a)u.count>u.sentCount&&p(h,u.count,!1)}catch{}},droppedCount:()=>c}}var bt={network:100,console:80,breadcrumbs:40},ao=18e4,lo=["log","info","warn","error","assert","debug"],Xt=["warn","error","assert"];function co(e){return e!==void 0&&Xt.includes(e)}var uo=Xt;function fo(e){return uo.includes(e)}function po(e){return e==="console"?"console":e==="fetch"||e==="xhr"||e==="beacon"?"network":"breadcrumbs"}function gt(e,t){return typeof e!="number"||!Number.isFinite(e)||e<1?t:Math.floor(e)}function ho(){const e=Math.random().toString(36).slice(2,8);let t=0;return()=>`${e}${(t++).toString(36)}`}var Yt=["network","console","breadcrumbs"];function mo(e,t){const n=e.length-t;if(n<=0)return e;const r=new Set;for(let o=0;o<e.length&&r.size<n;o+=1)co(e[o].crumb.level)||r.add(o);for(let o=0;o<e.length&&r.size<n;o+=1)r.has(o)||r.add(o);return e.filter((o,i)=>!r.has(i))}function bo(e={}){var t,n,r,o,i,s;const l={network:gt((t=e.budgets)===null||t===void 0?void 0:t.network,bt.network),console:gt((n=e.budgets)===null||n===void 0?void 0:n.console,bt.console),breadcrumbs:gt((r=e.budgets)===null||r===void 0?void 0:r.breadcrumbs,bt.breadcrumbs)},a=e.maxAgeMs===void 0?ao:e.maxAgeMs,c=e.beforeBreadcrumb,p=(o=e.now)!==null&&o!==void 0?o:Date.now,m=(i=e.mono)!==null&&i!==void 0?i:Pe,h=(s=e.nextId)!==null&&s!==void 0?s:ho(),u={network:[],console:[],breadcrumbs:[]};let d=0;function f(){if(typeof a!="number"||a<=0)return;const g=p()-a;for(const v of Yt){const b=u[v];b.length>0&&(u[v]=b.filter(y=>y.crumb.timestamp>=g))}}return{add(g){var v;let b=g;if(c)try{b=c(g)}catch{b=g}if(!b)return;const y={...b,id:(v=b.id)!==null&&v!==void 0?v:h(),timestamp:typeof b.timestamp=="number"?b.timestamp:p(),mono:typeof b.mono=="number"?b.mono:m()},k=po(y.category);u[k].push({crumb:y,seq:d++}),f();const E=u[k],C=l[k];E.length>C&&(u[k]=k==="console"?mo(E,C):E.slice(-C))},snapshot(){f();const g=[];for(const v of Yt)g.push(...u[v]);return g.sort((v,b)=>(typeof v.crumb.mono=="number"?v.crumb.mono:v.crumb.timestamp)-(typeof b.crumb.mono=="number"?b.crumb.mono:b.crumb.timestamp)||v.seq-b.seq),g.map(v=>v.crumb)},clear(){u.network=[],u.console=[],u.breadcrumbs=[],d=0}}}function go(e){var t,n;const r=lt(e);if(!r||!r.location)return;const o=r.location.replace(/\?[^:]*/,""),i=(t=o.match(/^(.*):(\d+):\d+$/))!==null&&t!==void 0?t:o.match(/^(.*):(\d+)$/);if(!i)return;const s=(n=i[1])!==null&&n!==void 0?n:"",l=Number(i[2]);if(!(!s||!Number.isFinite(l)))return{file:s,line:l}}function vo(e,t=0){if(typeof e!="string"||e.length===0)return;const n=[];for(const r of e.split(`
|
|
4
|
+
`)){const o=go(r.trim());o&&n.push(o)}return n[t]}var Ta=1;function yo(e,t,n,r){const o=[];for(const i of n){const s=t[i];if(typeof s!="function")continue;const l=fo(i),a=(...c)=>{let p;if(l)try{p=vo(new Error().stack,1)}catch{p=void 0}try{i==="assert"?c[0]||e.add(Gt("assert",c.slice(1),r(),p)):e.add(Gt(i,c,r(),p))}catch{}return s.apply(t,c)};t[i]=a,o.push(()=>{t[i]=s})}return()=>{for(const i of o)i()}}var So=3e5;function wo(e,t){try{return e.open(t,"fixback-connect","popup,width=480,height=680,menubar=no,toolbar=no,location=yes")}catch{return null}}function xo(e,t){const n=Hr(t.connectUrl,{key:t.key,returnUrl:t.returnUrl}),r=wo(e,n);if(!r){try{e.location.assign(n)}catch{}return Promise.resolve({kind:"redirected"})}return new Promise(o=>{let i=!1;const s=p=>{i||(i=!0,e.removeEventListener("message",l),clearInterval(a),clearTimeout(c),o(p))},l=p=>{const m=jr(p.data);if(m){try{r.close()}catch{}s({kind:"code",code:m})}};e.addEventListener("message",l);const a=setInterval(()=>{try{r.closed&&s({kind:"cancelled"})}catch{}},400),c=setTimeout(()=>s({kind:"cancelled"}),So)})}function ko(e){try{const t=new URL(e.location.href).searchParams.get($t);return t&&t.length>0?t:null}catch{return null}}function Co(e){try{const t=new URL(e.location.href);if(!t.searchParams.has("fixback"))return;t.searchParams.delete($t),e.history.replaceState(e.history.state,"",t.toString())}catch{}}function Mo(){try{const e=globalThis.localStorage,t=e.getItem(Bt);if(t)return t;const n=zt();return e.setItem(Bt,n),n}catch{return zt()}}function Eo(e){const t=e,n=t.error;if(n&&typeof n=="object"){const o=n;return{type:ae(o.name)||"Error",value:ae(o.message)||ae(t.message),stack:typeof o.stack=="string"?o.stack:void 0,original:n}}const r=ae(t.message);return r?{type:"Error",value:r,original:r}:null}function Io(e){const t=e.reason;if(t&&typeof t=="object"){const r=t;return{type:ae(r.name)||"UnhandledRejection",value:ae(r.message)||ae(t),stack:typeof r.stack=="string"?r.stack:void 0,original:t}}const n=ae(t);return{type:"UnhandledRejection",value:n,original:t!=null?t:n}}function _o(e){return e.type==="unhandledrejection"?Io(e):Eo(e)}var Ro="#e5484d";function Kt(e,t,n,r){return{x:Math.round(Math.min(e,n)),y:Math.round(Math.min(t,r)),width:Math.round(Math.abs(n-e)),height:Math.round(Math.abs(r-t))}}function To(e,t,n,r,o=14){const i=Math.atan2(r-t,n-e);return[{x:n,y:r},{x:n-o*Math.cos(i-Math.PI/6),y:r-o*Math.sin(i-Math.PI/6)},{x:n-o*Math.cos(i+Math.PI/6),y:r-o*Math.sin(i+Math.PI/6)}]}function Lo(e){const t={};return e.element&&(t.element=e.element),e.region&&(t.region=e.region),e.marks&&e.marks.length>0&&(t.marks=e.marks.slice()),Object.keys(t).length>0?t:void 0}function Jt(e,t,n){var r;const o={},i=e.innerWidth;typeof i=="number"&&i>0&&(o.viewportWidth=Math.round(i));const s=e.innerHeight;typeof s=="number"&&s>0&&(o.viewportHeight=Math.round(s));const l=(r=e.navigator)===null||r===void 0?void 0:r.userAgent;return typeof l=="string"&&l.length>0&&(o.browser=l),t.length>0&&(o.sdkVersion=t),n&&n.length>0&&(o.release=n),o}function Zt(e){var t,n;const r={},o=(t=e.comment)===null||t===void 0?void 0:t.trim();o&&(r.comment=o),e.url&&(r.url=e.url),e.environment&&Object.keys(e.environment).length>0&&(r.environment=e.environment);const i=(n=e.deployEnvironment)===null||n===void 0?void 0:n.trim();i&&(r.deployEnvironment=i);const s=Lo({element:e.element,region:e.region,marks:e.marks});return s&&(r.annotation=s),e.trace&&e.trace.length>0&&(r.trace=e.trace),r}var No="replay",Oo=3e4,Ao=new Or;async function Qt(e,t,n={}){var r,o,i,s;const l=(r=t.content.source)!==null&&r!==void 0?r:"reporter",a=l==="error",c=(o=n.backoff)!==null&&o!==void 0?o:Ao;if(a&&c.isPaused())return{ok:!1,reason:"backpressure",retryAfterSeconds:c.retryAfterSeconds()};const p=(i=n.fetch)!==null&&i!==void 0?i:Ue();if(!p)return{ok:!1,reason:"unreachable"};const m={key:t.key,...Ut(t.identity),...t.content,source:l},h=new FormData;if(h.append("payload",JSON.stringify(m)),t.replay&&t.replay.events.length>0)try{const v=JSON.stringify(t.replay.events);h.append(No,new Blob([v],{type:"application/json"}),"replay.json")}catch{}const u=(s=n.timeoutMs)!==null&&s!==void 0?s:Oo;let d,f;try{const v=p(Pr(e),{method:"POST",body:h});f=u>0?await Promise.race([v,new Promise((b,y)=>{d=setTimeout(()=>y(new Error("fixback: submission timed out")),u)})]):await v}catch{return{ok:!1,reason:"unreachable"}}finally{d!==void 0&&clearTimeout(d)}if(!f.ok)return a&&f.status===429?{ok:!1,reason:"backpressure",retryAfterSeconds:c.hold(Dr(f,"Retry-After"))}:{ok:!1,reason:"refused",status:f.status};try{var g;return{ok:!0,feedback:await((g=f.json)===null||g===void 0?void 0:g.call(f))}}catch{return{ok:!0,feedback:null}}}var Be="0.6.0",Do={destroy:()=>{},droppedCount:()=>0};function Fo(e){var t,n,r,o,i,s;const l=(t=e.win)!==null&&t!==void 0?t:typeof window!="undefined"?window:void 0;if(!l)return Do;const a=l,c=(n=(r=e.doc)!==null&&r!==void 0?r:a.document)!==null&&n!==void 0?n:typeof document!="undefined"?document:void 0,p=(o=e.sdkVersion)!==null&&o!==void 0?o:Be,m=(i=(s=e.deps)===null||s===void 0?void 0:s.submitReport)!==null&&i!==void 0?i:Qt;function h(v){var b,y;return{...Zt({url:(b=a.location)===null||b===void 0?void 0:b.href,environment:Jt(a,p,e.release),deployEnvironment:e.deployEnvironment,trace:v.rich?(y=e.buffer)===null||y===void 0?void 0:y.snapshot():void 0}),source:"error",errorSignature:v.fingerprint,occurrences:v.occurrences,...v.rich&&v.frames.length>0?{errorFrames:v.frames}:{}}}const u=so({extract:_o,buffer:e.buffer,burstCapacity:e.burstCapacity,burstRefillMs:e.burstRefillMs,maxDistinct:e.maxDistinct,now:e.now,submit:async v=>{var b,y,k;const E=Ft(h(v),{hook:e.beforeSend,scrub:e.scrub});if(!E)return!0;const C=v.rich&&(b=(y=e.replay)===null||y===void 0?void 0:y.snapshot())!==null&&b!==void 0?b:null;return(await m(e.apiUrl,{key:e.key,identity:(k=e.getIdentity)===null||k===void 0?void 0:k.call(e),content:E,replay:C})).ok}}),d=v=>u.capture(v),f=()=>u.flush(),g=()=>{(c==null?void 0:c.visibilityState)==="hidden"&&f()};return a.addEventListener("error",d,!0),a.addEventListener("unhandledrejection",d,!0),a.addEventListener("pagehide",f),c==null||c.addEventListener("visibilitychange",g),{destroy:()=>{a.removeEventListener("error",d,!0),a.removeEventListener("unhandledrejection",d,!0),a.removeEventListener("pagehide",f),c==null||c.removeEventListener("visibilitychange",g)},droppedCount:u.droppedCount}}var Po=`
|
|
18
5
|
:host {
|
|
19
6
|
/* Vendored Signal tokens (packages/ui/src/tokens.css). */
|
|
20
7
|
--fb-color-accent: #2f6fed;
|
|
@@ -256,201 +243,7 @@
|
|
|
256
243
|
animation: none;
|
|
257
244
|
}
|
|
258
245
|
}
|
|
259
|
-
`,Nn="data-fixback-root",yt="fixback:launch",rl="fixback:welcomed:",nl=5e3,ol=280,il='<svg class="fb-launcher__icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" d="M3.25 2h9.5A1.25 1.25 0 0 1 14 3.25v6.5A1.25 1.25 0 0 1 12.75 11H7.6l-3.19 2.55A.6.6 0 0 1 3.4 13.1V11h-.15A1.25 1.25 0 0 1 2 9.75v-6.5A1.25 1.25 0 0 1 3.25 2Z"/></svg>',al='<svg class="fb-launcher__tuck-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6 4l4 4-4 4"/></svg>';function sl(e,t){const r=rl+(t!=null?t:"default");try{const n=e==null?void 0:e.localStorage;return n?n.getItem(r)==="1"?!1:(n.setItem(r,"1"),!0):!0}catch{return!0}}function ll(e,t={}){const r=e.ownerDocument,n=r.defaultView,o=r.querySelector(`[${Nn}]`);o&&o.remove();const i=r.createElement("div");i.setAttribute(Nn,""),i.style.cssText="position:fixed;right:20px;bottom:20px;z-index:2147483000;margin:0;padding:0;border:0;",t.reduceMotion&&i.setAttribute("data-fb-reduce-motion","true");const a=i.attachShadow({mode:"open"}),l=r.createElement("style");l.textContent=tl,a.appendChild(l);const s=r.createElement("div");s.className="fb-launcher";const u=r.createElement("button");u.type="button",u.className="fb-launcher__button",u.setAttribute("aria-haspopup","dialog"),u.setAttribute("aria-label","Give feedback"),u.innerHTML=`${il}<span class="fb-launcher__label">Feedback</span>`,u.addEventListener("click",()=>{i.dispatchEvent(new CustomEvent(yt,{bubbles:!0,composed:!0}))});const f=r.createElement("span");f.className="fb-launcher__divider",f.setAttribute("aria-hidden","true");const c=r.createElement("button");c.type="button",c.className="fb-launcher__tuck",c.setAttribute("data-fb-tuck",""),c.setAttribute("aria-label","Hide feedback button"),c.title="Tuck away",c.innerHTML=al,s.append(u,f,c);const b=r.createElement("div");b.className="fb-launcher__peekzone",b.setAttribute("aria-hidden","true");const d=r.createElement("div");d.className="fb-launcher__nub",d.setAttribute("role","button"),d.setAttribute("tabindex","0"),d.setAttribute("aria-label","Show feedback button"),a.append(s,b,d);let h=!1,m=!1,p,y,g;const v=()=>{h?i.setAttribute("data-fb-hidden","true"):i.removeAttribute("data-fb-hidden"),h&&m?i.setAttribute("data-fb-peeking","true"):i.removeAttribute("data-fb-peeking"),c.setAttribute("aria-label",h?"Show feedback button":"Hide feedback button"),c.title=h?"Bring back":"Tuck away"},w=()=>{y!==void 0&&(clearTimeout(y),y=void 0),s.classList.remove("fb-launcher--pulse"),g==null||g.remove(),g=void 0},C=()=>{p!==void 0&&(clearTimeout(p),p=void 0),m||(m=!0,v())},E=()=>{p!==void 0&&clearTimeout(p),p=setTimeout(()=>{p=void 0,m=!1,v()},ol)};for(const x of[s,b,d])x.addEventListener("mouseenter",C),x.addEventListener("mouseleave",E);const T=()=>{p!==void 0&&(clearTimeout(p),p=void 0),h=!1,m=!1,v()},L=()=>{w(),h=!0,m=!1,v()};return c.addEventListener("click",()=>{h?T():L()}),d.addEventListener("click",T),d.addEventListener("keydown",x=>{(x.key==="Enter"||x.key===" "||x.key==="Spacebar")&&(x.preventDefault(),T())}),sl(n,t.key)&&(g=r.createElement("div"),g.className="fb-launcher__welcome",g.setAttribute("role","status"),g.innerHTML="You're all set — tap <strong>Feedback</strong> any time to report something.",a.appendChild(g),t.reduceMotion||s.classList.add("fb-launcher--pulse"),y=setTimeout(w,nl)),e.appendChild(i),{host:i,dispose:()=>{p!==void 0&&clearTimeout(p),y!==void 0&&clearTimeout(y)}}}function cl(e){e.dispose(),e.host.remove()}var ul=`
|
|
260
|
-
:host {
|
|
261
|
-
--fb-color-accent: #2f6fed;
|
|
262
|
-
--fb-color-accent-hover: #245fd0;
|
|
263
|
-
--fb-color-on-emphasis: #ffffff;
|
|
264
|
-
--fb-color-ink: #0f1720;
|
|
265
|
-
--fb-color-text: #1a2530;
|
|
266
|
-
--fb-color-muted: #5a6875;
|
|
267
|
-
--fb-color-faint: #9aa7b2;
|
|
268
|
-
--fb-color-hint: #b7c1cb;
|
|
269
|
-
--fb-color-border: #dce3ea;
|
|
270
|
-
--fb-color-border-soft: #e6ebf0;
|
|
271
|
-
--fb-color-surface: #ffffff;
|
|
272
|
-
--fb-color-card: #f6f8fa;
|
|
273
|
-
--fb-color-accent-bg: #eaf1fe;
|
|
274
|
-
--fb-color-success: #2f9e5b;
|
|
275
|
-
--fb-font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
|
|
276
|
-
Helvetica, Arial, sans-serif;
|
|
277
|
-
--fb-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas,
|
|
278
|
-
monospace;
|
|
279
|
-
all: initial;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
*, *::before, *::after { box-sizing: border-box; }
|
|
283
|
-
|
|
284
|
-
.fb-ob-backdrop {
|
|
285
|
-
position: fixed;
|
|
286
|
-
inset: 0;
|
|
287
|
-
z-index: 2147483010;
|
|
288
|
-
display: flex;
|
|
289
|
-
align-items: center;
|
|
290
|
-
justify-content: center;
|
|
291
|
-
padding: 24px;
|
|
292
|
-
background: rgba(15, 23, 32, 0.55);
|
|
293
|
-
backdrop-filter: blur(3px);
|
|
294
|
-
font-family: var(--fb-font-sans);
|
|
295
|
-
color: var(--fb-color-text);
|
|
296
|
-
animation: fb-ob-fade 0.25s ease both;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.fb-ob-panel {
|
|
300
|
-
width: 400px;
|
|
301
|
-
max-width: 100%;
|
|
302
|
-
background: var(--fb-color-surface);
|
|
303
|
-
border-radius: 16px;
|
|
304
|
-
box-shadow: 0 30px 70px rgba(15, 40, 70, 0.4);
|
|
305
|
-
overflow: hidden;
|
|
306
|
-
animation: fb-ob-pop 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.fb-ob-head {
|
|
310
|
-
padding: 22px 24px 0;
|
|
311
|
-
display: flex;
|
|
312
|
-
align-items: center;
|
|
313
|
-
gap: 10px;
|
|
314
|
-
}
|
|
315
|
-
.fb-ob-mark {
|
|
316
|
-
width: 22px;
|
|
317
|
-
height: 22px;
|
|
318
|
-
border-radius: 6px;
|
|
319
|
-
background: var(--fb-color-accent);
|
|
320
|
-
flex: none;
|
|
321
|
-
display: flex;
|
|
322
|
-
align-items: center;
|
|
323
|
-
justify-content: center;
|
|
324
|
-
}
|
|
325
|
-
.fb-ob-mark::after {
|
|
326
|
-
content: "";
|
|
327
|
-
width: 7px;
|
|
328
|
-
height: 7px;
|
|
329
|
-
border-radius: 2px;
|
|
330
|
-
background: #fff;
|
|
331
|
-
}
|
|
332
|
-
.fb-ob-brand { font-size: 15px; font-weight: 600; color: var(--fb-color-ink); }
|
|
333
|
-
.fb-ob-chip {
|
|
334
|
-
margin-left: auto;
|
|
335
|
-
font-family: var(--fb-font-mono);
|
|
336
|
-
font-size: 10px;
|
|
337
|
-
color: #8a97a3;
|
|
338
|
-
border: 1px solid var(--fb-color-border-soft);
|
|
339
|
-
border-radius: 6px;
|
|
340
|
-
padding: 2px 7px;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.fb-ob-body { padding: 16px 24px 8px; }
|
|
344
|
-
.fb-ob-title {
|
|
345
|
-
font-size: 19px;
|
|
346
|
-
font-weight: 700;
|
|
347
|
-
color: var(--fb-color-ink);
|
|
348
|
-
letter-spacing: -0.01em;
|
|
349
|
-
}
|
|
350
|
-
.fb-ob-lede {
|
|
351
|
-
font-size: 13.5px;
|
|
352
|
-
color: var(--fb-color-muted);
|
|
353
|
-
line-height: 1.5;
|
|
354
|
-
margin: 7px 0 0;
|
|
355
|
-
}
|
|
356
|
-
.fb-ob-lede strong { color: var(--fb-color-text); }
|
|
357
|
-
|
|
358
|
-
.fb-ob-card {
|
|
359
|
-
margin: 16px 0;
|
|
360
|
-
padding: 13px 14px;
|
|
361
|
-
background: var(--fb-color-card);
|
|
362
|
-
border: 1px solid var(--fb-color-border-soft);
|
|
363
|
-
border-radius: 10px;
|
|
364
|
-
display: flex;
|
|
365
|
-
flex-direction: column;
|
|
366
|
-
gap: 10px;
|
|
367
|
-
}
|
|
368
|
-
.fb-ob-row { display: flex; align-items: center; gap: 10px; }
|
|
369
|
-
.fb-ob-row + .fb-ob-row {
|
|
370
|
-
border-top: 1px solid #eef2f6;
|
|
371
|
-
padding-top: 10px;
|
|
372
|
-
}
|
|
373
|
-
.fb-ob-rowlabel {
|
|
374
|
-
font-family: var(--fb-font-mono);
|
|
375
|
-
font-size: 10px;
|
|
376
|
-
color: var(--fb-color-faint);
|
|
377
|
-
width: 70px;
|
|
378
|
-
flex: none;
|
|
379
|
-
}
|
|
380
|
-
.fb-ob-site { font-size: 13px; color: var(--fb-color-text); font-weight: 500; }
|
|
381
|
-
.fb-ob-tier {
|
|
382
|
-
font-size: 11px;
|
|
383
|
-
font-weight: 600;
|
|
384
|
-
color: var(--fb-color-accent);
|
|
385
|
-
background: var(--fb-color-accent-bg);
|
|
386
|
-
padding: 3px 9px;
|
|
387
|
-
border-radius: 6px;
|
|
388
|
-
}
|
|
389
|
-
.fb-ob-tiernote { font-size: 11.5px; color: #8a97a3; }
|
|
390
|
-
|
|
391
|
-
.fb-ob-fieldlabel {
|
|
392
|
-
display: block;
|
|
393
|
-
font-family: var(--fb-font-mono);
|
|
394
|
-
font-size: 10px;
|
|
395
|
-
letter-spacing: 0.05em;
|
|
396
|
-
text-transform: uppercase;
|
|
397
|
-
color: var(--fb-color-faint);
|
|
398
|
-
margin-bottom: 6px;
|
|
399
|
-
}
|
|
400
|
-
.fb-ob-fields { display: flex; gap: 8px; }
|
|
401
|
-
.fb-ob-input {
|
|
402
|
-
height: 38px;
|
|
403
|
-
padding: 0 12px;
|
|
404
|
-
border: 1px solid var(--fb-color-border);
|
|
405
|
-
border-radius: 9px;
|
|
406
|
-
font-family: inherit;
|
|
407
|
-
font-size: 13px;
|
|
408
|
-
color: var(--fb-color-text);
|
|
409
|
-
outline: none;
|
|
410
|
-
min-width: 0;
|
|
411
|
-
}
|
|
412
|
-
.fb-ob-input:focus { border-color: var(--fb-color-accent); }
|
|
413
|
-
.fb-ob-name { flex: 1; }
|
|
414
|
-
.fb-ob-email { flex: 1.3; font-family: var(--fb-font-mono); font-size: 12.5px; color: var(--fb-color-muted); }
|
|
415
|
-
|
|
416
|
-
.fb-ob-privacy {
|
|
417
|
-
display: flex;
|
|
418
|
-
align-items: flex-start;
|
|
419
|
-
gap: 8px;
|
|
420
|
-
margin-top: 14px;
|
|
421
|
-
font-size: 11.5px;
|
|
422
|
-
color: #8a97a3;
|
|
423
|
-
line-height: 1.5;
|
|
424
|
-
}
|
|
425
|
-
.fb-ob-privacy svg { flex: none; margin-top: 1px; }
|
|
426
|
-
.fb-ob-privacy strong { color: var(--fb-color-muted); }
|
|
427
|
-
|
|
428
|
-
.fb-ob-foot { padding: 16px 24px 22px; }
|
|
429
|
-
.fb-ob-confirm {
|
|
430
|
-
width: 100%;
|
|
431
|
-
height: 44px;
|
|
432
|
-
border: 0;
|
|
433
|
-
border-radius: 11px;
|
|
434
|
-
background: var(--fb-color-accent);
|
|
435
|
-
color: var(--fb-color-on-emphasis);
|
|
436
|
-
font-family: inherit;
|
|
437
|
-
font-size: 14px;
|
|
438
|
-
font-weight: 600;
|
|
439
|
-
cursor: pointer;
|
|
440
|
-
}
|
|
441
|
-
.fb-ob-confirm:hover { background: var(--fb-color-accent-hover); }
|
|
442
|
-
.fb-ob-confirm:disabled { opacity: 0.6; cursor: default; }
|
|
443
|
-
|
|
444
|
-
@keyframes fb-ob-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
445
|
-
@keyframes fb-ob-pop {
|
|
446
|
-
from { opacity: 0; transform: translateY(8px) scale(0.98); }
|
|
447
|
-
to { opacity: 1; transform: none; }
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
@media (prefers-reduced-motion: reduce) {
|
|
451
|
-
.fb-ob-backdrop, .fb-ob-panel { animation: none; }
|
|
452
|
-
}
|
|
453
|
-
`,dl="data-fixback-onboard",fl={invited:"Invited tester",internal:"Internal",public:"Public"},hl={invited:"reviewed before it ships",internal:"ships straight through",public:"tracked, not auto-shipped"},pl='<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#2f9e5b" stroke-width="1.5" aria-hidden="true"><path d="M8 1.8 13.5 4v3.5c0 3.6-2.4 5.6-5.5 6.7C4.9 13.1 2.5 11.1 2.5 7.5V4z"/><path d="M5.8 8 7.3 9.5 10.3 6.2"/></svg>';function B(e,t,r={},n=[]){const o=e.createElement(t);for(const[i,a]of Object.entries(r))a!==void 0&&o.setAttribute(i,a);for(const i of n)o.appendChild(typeof i=="string"?e.createTextNode(i):i);return o}function wt(e){const t=e.trim();return t.length>0?t:void 0}function ml(e){var t,r,n,o,i,a;const l=(t=e.target)!==null&&t!==void 0?t:document.body,s=(r=e.doc)!==null&&r!==void 0?r:l.ownerDocument;(n=s.querySelector("[data-fixback-onboard]"))===null||n===void 0||n.remove();const u=B(s,"div",{[dl]:""}),f=u.attachShadow({mode:"open"}),c=s.createElement("style");c.textContent=ul,f.appendChild(c);const b=B(s,"div",{class:"fb-ob-head"},[B(s,"span",{class:"fb-ob-mark"}),B(s,"span",{class:"fb-ob-brand"},["Fixback"]),B(s,"span",{class:"fb-ob-chip"},["invite link"])]),d=B(s,"p",{class:"fb-ob-lede"},["You've been invited to give feedback on ",B(s,"strong",{},[e.origin]),". Point, mark up, send."]),h=B(s,"div",{class:"fb-ob-card"},[B(s,"div",{class:"fb-ob-row"},[B(s,"span",{class:"fb-ob-rowlabel"},["SITE"]),B(s,"span",{class:"fb-ob-site"},[e.origin])]),B(s,"div",{class:"fb-ob-row"},[B(s,"span",{class:"fb-ob-rowlabel"},["ACCESS"]),B(s,"span",{class:"fb-ob-tier"},[fl[e.tier]]),B(s,"span",{class:"fb-ob-tiernote"},[hl[e.tier]])])]),m=B(s,"input",{class:"fb-ob-input fb-ob-name",type:"text","aria-label":"Name",placeholder:"Name"}),p=B(s,"input",{class:"fb-ob-input fb-ob-email",type:"email","aria-label":"Email",placeholder:"email@example.com"});!((o=e.defaults)===null||o===void 0)&&o.name&&(m.value=e.defaults.name),!((i=e.defaults)===null||i===void 0)&&i.email&&(p.value=e.defaults.email);const y=B(s,"div",{class:"fb-ob-privacy"}),g=B(s,"span");g.innerHTML=pl,y.appendChild((a=g.firstChild)!==null&&a!==void 0?a:s.createTextNode("")),y.appendChild(B(s,"span",{},[B(s,"strong",{},["Private by default."])," Anything you type is masked before it leaves your browser."]));const v=B(s,"div",{class:"fb-ob-body"},[B(s,"div",{class:"fb-ob-title"},["You're invited to give feedback"]),d,h,B(s,"label",{class:"fb-ob-fieldlabel",for:"fb-ob-name-input"},["Continue as"]),B(s,"div",{class:"fb-ob-fields"},[m,p]),y]);m.id="fb-ob-name-input";const w=B(s,"button",{type:"button",class:"fb-ob-confirm"},["Start giving feedback"]),C=B(s,"div",{class:"fb-ob-backdrop"},[B(s,"div",{class:"fb-ob-panel",role:"dialog","aria-modal":"true","aria-label":"Fixback invite"},[b,v,B(s,"div",{class:"fb-ob-foot"},[w])])]);f.appendChild(C);let E=!1;return w.addEventListener("click",()=>{if(E)return;E=!0,w.disabled=!0;const T={...wt(m.value)?{name:wt(m.value)}:{},...wt(p.value)?{email:wt(p.value)}:{}};e.onConfirm(T)}),l.appendChild(u),{host:u,destroy:()=>u.remove()}}var bl="http://www.w3.org/2000/svg",cr="3",_n=4,gl='600 16px "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';function vl(e){var t,r;const n=(t=e.doc)!==null&&t!==void 0?t:document,{svg:o,textInput:i}=e,a=(r=e.color)!==null&&r!==void 0?r:Bi;let l="arrow",s=e.initialMarks?e.initialMarks.slice():[],u=null,f=!1,c=null,b=!1;function d(){var x;(x=e.onChange)===null||x===void 0||x.call(e,s.slice())}function h(x){return{x:Math.round(x.clientX),y:Math.round(x.clientY)}}function m(x){const A=typeof x.composedPath=="function"?x.composedPath():[x.target];for(const V of A){if(V===n)break;if(V instanceof Element){const R=V.tagName;if(R==="BUTTON"||R==="INPUT"||R==="TEXTAREA")return!0}}return!1}function p(x){return x.type==="pen"?x.points.length>1:x.type==="text"?x.text.trim().length>0:Math.abs(x.x1-x.x0)>_n||Math.abs(x.y1-x.y0)>_n}function y(x){if(b||f||m(x))return;const A=h(x);if(l==="text"){w(A);return}x.cancelable&&x.preventDefault(),f=!0,u=l==="pen"?{type:"pen",points:[A],color:a}:{type:l,x0:A.x,y0:A.y,x1:A.x,y1:A.y,color:a},L()}function g(x){if(b||!f||!u)return;const A=h(x);u.type==="pen"?u={type:"pen",points:[...u.points,A],color:u.color}:u={...u,x1:A.x,y1:A.y},L()}function v(){if(b||!f)return;f=!1;const x=u;u=null,x&&p(x)&&(s=[...s,x],d()),L()}function w(x){c=x,i.value="",i.style.display="block",i.style.left=`${x.x}px`,i.style.top=`${x.y}px`,i.onkeydown=C,i.onblur=E,setTimeout(()=>{try{i.focus()}catch{}},0)}function C(x){x.key==="Enter"?(x.preventDefault(),x.stopPropagation(),E()):x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),T())}function E(){if(!c)return;const x=i.value.trim(),A=c;T(),x.length>0&&(s=[...s,{type:"text",x:A.x,y:A.y,text:x,color:a}],d(),L())}function T(){c=null,i.onkeydown=null,i.onblur=null,i.value="",i.style.display="none"}function L(){for(;o.firstChild;)o.removeChild(o.firstChild);for(const x of s)o.appendChild(Ln(n,x));u&&o.appendChild(Ln(n,u))}function k(){b||(b=!0,n.removeEventListener("mousedown",y,!0),n.removeEventListener("mousemove",g,!0),n.removeEventListener("mouseup",v,!0),T())}return n.addEventListener("mousedown",y,!0),n.addEventListener("mousemove",g,!0),n.addEventListener("mouseup",v,!0),L(),{setTool:x=>{l=x},getTool:()=>l,undo:()=>{s.length!==0&&(s=s.slice(0,-1),d(),L())},marks:()=>s.slice(),stop:k}}function Ln(e,t){switch(t.type){case"box":return Ae(e,"rect",{x:String(Math.min(t.x0,t.x1)),y:String(Math.min(t.y0,t.y1)),width:String(Math.abs(t.x1-t.x0)),height:String(Math.abs(t.y1-t.y0)),rx:"2",fill:"none",stroke:t.color,"stroke-width":cr});case"pen":return Ae(e,"polyline",{points:t.points.map(r=>`${r.x},${r.y}`).join(" "),fill:"none",stroke:t.color,"stroke-width":cr,"stroke-linecap":"round","stroke-linejoin":"round"});case"text":{const r=Ae(e,"text",{x:String(t.x),y:String(t.y),fill:t.color,style:`font:${gl}`});return r.textContent=t.text,r}case"arrow":{const r=Ae(e,"g",{});r.appendChild(Ae(e,"line",{x1:String(t.x0),y1:String(t.y0),x2:String(t.x1),y2:String(t.y1),stroke:t.color,"stroke-width":cr,"stroke-linecap":"round"}));const n=zi(t.x0,t.y0,t.x1,t.y1);return r.appendChild(Ae(e,"polygon",{points:n.map(o=>`${o.x},${o.y}`).join(" "),fill:t.color})),r}}}function Ae(e,t,r){const n=e.createElementNS(bl,t);for(const[o,i]of Object.entries(r))n.setAttribute(o,i);return n}var yl=12;function wl(e){var t,r;const n=(t=e.doc)!==null&&t!==void 0?t:document,o=(r=e.minSize)!==null&&r!==void 0?r:yl;let i=null,a=!1;function l(b){a||i||(i={x:b.clientX,y:b.clientY},b.cancelable&&b.preventDefault())}function s(b){var d;a||!i||(d=e.onProgress)===null||d===void 0||d.call(e,Wr(i.x,i.y,b.clientX,b.clientY))}function u(b){if(a||!i)return;const d=Wr(i.x,i.y,b.clientX,b.clientY);if(i=null,c(),d.width<o||d.height<o){var h;(h=e.onCancel)===null||h===void 0||h.call(e);return}e.onComplete(d)}function f(b){if(!a&&b.key==="Escape"){var d;b.preventDefault(),c(),(d=e.onCancel)===null||d===void 0||d.call(e)}}function c(){a||(a=!0,n.removeEventListener("mousedown",l,!0),n.removeEventListener("mousemove",s,!0),n.removeEventListener("mouseup",u,!0),n.removeEventListener("keydown",f,!0),i=null)}return n.addEventListener("mousedown",l,!0),n.addEventListener("mousemove",s,!0),n.addEventListener("mouseup",u,!0),n.addEventListener("keydown",f,!0),{stop:c}}var Sl=`
|
|
246
|
+
`,en="data-fixback-root",ze="fixback:launch",Uo="fixback:welcomed:",$o=5e3,Bo=280,zo='<svg class="fb-launcher__icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" d="M3.25 2h9.5A1.25 1.25 0 0 1 14 3.25v6.5A1.25 1.25 0 0 1 12.75 11H7.6l-3.19 2.55A.6.6 0 0 1 3.4 13.1V11h-.15A1.25 1.25 0 0 1 2 9.75v-6.5A1.25 1.25 0 0 1 3.25 2Z"/></svg>',Wo='<svg class="fb-launcher__tuck-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M6 4l4 4-4 4"/></svg>';function Ho(e,t){const n=Uo+(t!=null?t:"default");try{const r=e==null?void 0:e.localStorage;return r?r.getItem(n)==="1"?!1:(r.setItem(n,"1"),!0):!0}catch{return!0}}function jo(e,t={}){const n=e.ownerDocument,r=n.defaultView,o=n.querySelector(`[${en}]`);o&&o.remove();const i=n.createElement("div");i.setAttribute(en,""),i.style.cssText="position:fixed;right:20px;bottom:20px;z-index:2147483000;margin:0;padding:0;border:0;",t.reduceMotion&&i.setAttribute("data-fb-reduce-motion","true");const s=i.attachShadow({mode:"open"}),l=n.createElement("style");l.textContent=Po,s.appendChild(l);const a=n.createElement("div");a.className="fb-launcher";const c=n.createElement("button");c.type="button",c.className="fb-launcher__button",c.setAttribute("aria-haspopup","dialog"),c.setAttribute("aria-label","Give feedback"),c.innerHTML=`${zo}<span class="fb-launcher__label">Feedback</span>`,c.addEventListener("click",()=>{i.dispatchEvent(new CustomEvent(ze,{bubbles:!0,composed:!0}))});const p=n.createElement("span");p.className="fb-launcher__divider",p.setAttribute("aria-hidden","true");const m=n.createElement("button");m.type="button",m.className="fb-launcher__tuck",m.setAttribute("data-fb-tuck",""),m.setAttribute("aria-label","Hide feedback button"),m.title="Tuck away",m.innerHTML=Wo,a.append(c,p,m);const h=n.createElement("div");h.className="fb-launcher__peekzone",h.setAttribute("aria-hidden","true");const u=n.createElement("div");u.className="fb-launcher__nub",u.setAttribute("role","button"),u.setAttribute("tabindex","0"),u.setAttribute("aria-label","Show feedback button"),s.append(a,h,u);let d=!1,f=!1,g,v,b;const y=()=>{d?i.setAttribute("data-fb-hidden","true"):i.removeAttribute("data-fb-hidden"),d&&f?i.setAttribute("data-fb-peeking","true"):i.removeAttribute("data-fb-peeking"),m.setAttribute("aria-label",d?"Show feedback button":"Hide feedback button"),m.title=d?"Bring back":"Tuck away"},k=()=>{v!==void 0&&(clearTimeout(v),v=void 0),a.classList.remove("fb-launcher--pulse"),b==null||b.remove(),b=void 0},E=()=>{g!==void 0&&(clearTimeout(g),g=void 0),f||(f=!0,y())},C=()=>{g!==void 0&&clearTimeout(g),g=setTimeout(()=>{g=void 0,f=!1,y()},Bo)};for(const x of[a,h,u])x.addEventListener("mouseenter",E),x.addEventListener("mouseleave",C);const T=()=>{g!==void 0&&(clearTimeout(g),g=void 0),d=!1,f=!1,y()},w=()=>{k(),d=!0,f=!1,y()};return m.addEventListener("click",()=>{d?T():w()}),u.addEventListener("click",T),u.addEventListener("keydown",x=>{(x.key==="Enter"||x.key===" "||x.key==="Spacebar")&&(x.preventDefault(),T())}),Ho(r,t.key)&&(b=n.createElement("div"),b.className="fb-launcher__welcome",b.setAttribute("role","status"),b.innerHTML="You're all set — tap <strong>Feedback</strong> any time to report something.",s.appendChild(b),t.reduceMotion||a.classList.add("fb-launcher--pulse"),v=setTimeout(k,$o)),e.appendChild(i),{host:i,dispose:()=>{g!==void 0&&clearTimeout(g),v!==void 0&&clearTimeout(v)}}}function Go(e){e.dispose(),e.host.remove()}var Vo=["data-fixback-root","data-fixback-overlay"];function vt(e){let t=e instanceof Node?e:null;for(;t;){if(t instanceof Element){for(const r of Vo)if(t.hasAttribute(r))return!0}const n=t.getRootNode();if(n instanceof ShadowRoot&&n!==t){t=n.host;continue}t=t.parentNode}return!1}function tn(e){const t=globalThis.CSS;return t!=null&&t.escape?t.escape(e):e.replace(/[^\w-]/g,n=>`\\${n}`)}function qo(e){let t=1,n=e.previousElementSibling;for(;n;)n.tagName===e.tagName&&(t+=1),n=n.previousElementSibling;return t}function nn(e){if(e.id)return`#${tn(e.id)}`;const t=[];let n=e;for(;n&&n.tagName.toLowerCase()!=="html";){if(n.id){t.unshift(`#${tn(n.id)}`);break}const r=n.tagName.toLowerCase(),o=n.parentElement;if(o){const i=Array.from(o.children).filter(s=>s.tagName===n.tagName);t.unshift(i.length>1?`${r}:nth-of-type(${qo(n)})`:r)}else t.unshift(r);n=o}return t.join(" > ")}function Xo(e){const t=e.tagName.toLowerCase();if(e.id)return`${t}#${e.id}`;const n=e.classList[0];return n?`${t}.${n}`:t}function Yo(e){const t=[];let n=e;for(;n;)t.unshift(Xo(n)),n=n.parentElement;return t.join(" > ")}function Ko(e){const t=e.getBoundingClientRect();return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}function Jo(e){return{selector:nn(e),domPath:Yo(e),tag:e.tagName.toLowerCase(),rect:Ko(e)}}function Zo(e){var t,n;const r=(t=e.doc)!==null&&t!==void 0?t:document,o=(n=e.ignore)!==null&&n!==void 0?n:vt;let i=null,s=!1;function l(h){var u;const d=(u=(typeof h.composedPath=="function"?h.composedPath():[])[0])!==null&&u!==void 0?u:h.target;return d instanceof Element?o(d)?null:d:null}function a(h){var u;s||(i=l(h),(u=e.onHover)===null||u===void 0||u.call(e,i))}function c(h){var u;if(s)return;const d=(u=l(h))!==null&&u!==void 0?u:i;d&&(h.preventDefault(),h.stopPropagation(),m(),e.onPick(d))}function p(h){if(!s&&h.key==="Escape"){var u;h.preventDefault(),m(),(u=e.onCancel)===null||u===void 0||u.call(e)}}function m(){s||(s=!0,r.removeEventListener("mouseover",a,!0),r.removeEventListener("click",c,!0),r.removeEventListener("keydown",p,!0),i=null)}return r.addEventListener("mouseover",a,!0),r.addEventListener("click",c,!0),r.addEventListener("keydown",p,!0),{stop:m}}var Qo="http://www.w3.org/2000/svg",yt="3",rn=4,ei='600 16px "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';function ti(e){var t,n;const r=(t=e.doc)!==null&&t!==void 0?t:document,{svg:o,textInput:i}=e,s=(n=e.color)!==null&&n!==void 0?n:Ro;let l="arrow",a=e.initialMarks?e.initialMarks.slice():[],c=null,p=!1,m=null,h=!1;function u(){var x;(x=e.onChange)===null||x===void 0||x.call(e,a.slice())}function d(x){return{x:Math.round(x.clientX),y:Math.round(x.clientY)}}function f(x){const D=typeof x.composedPath=="function"?x.composedPath():[x.target];for(const j of D){if(j===r)break;if(j instanceof Element){const R=j.tagName;if(R==="BUTTON"||R==="INPUT"||R==="TEXTAREA")return!0}}return!1}function g(x){return x.type==="pen"?x.points.length>1:x.type==="text"?x.text.trim().length>0:Math.abs(x.x1-x.x0)>rn||Math.abs(x.y1-x.y0)>rn}function v(x){if(h||p||f(x))return;const D=d(x);if(l==="text"){k(D);return}x.cancelable&&x.preventDefault(),p=!0,c=l==="pen"?{type:"pen",points:[D],color:s}:{type:l,x0:D.x,y0:D.y,x1:D.x,y1:D.y,color:s},w()}function b(x){if(h||!p||!c)return;const D=d(x);c.type==="pen"?c={type:"pen",points:[...c.points,D],color:c.color}:c={...c,x1:D.x,y1:D.y},w()}function y(){if(h||!p)return;p=!1;const x=c;c=null,x&&g(x)&&(a=[...a,x],u()),w()}function k(x){m=x,i.value="",i.style.display="block",i.style.left=`${x.x}px`,i.style.top=`${x.y}px`,i.onkeydown=E,i.onblur=C,setTimeout(()=>{try{i.focus()}catch{}},0)}function E(x){x.key==="Enter"?(x.preventDefault(),x.stopPropagation(),C()):x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),T())}function C(){if(!m)return;const x=i.value.trim(),D=m;T(),x.length>0&&(a=[...a,{type:"text",x:D.x,y:D.y,text:x,color:s}],u(),w())}function T(){m=null,i.onkeydown=null,i.onblur=null,i.value="",i.style.display="none"}function w(){for(;o.firstChild;)o.removeChild(o.firstChild);for(const x of a)o.appendChild(on(r,x));c&&o.appendChild(on(r,c))}function L(){h||(h=!0,r.removeEventListener("mousedown",v,!0),r.removeEventListener("mousemove",b,!0),r.removeEventListener("mouseup",y,!0),T())}return r.addEventListener("mousedown",v,!0),r.addEventListener("mousemove",b,!0),r.addEventListener("mouseup",y,!0),w(),{setTool:x=>{l=x},getTool:()=>l,undo:()=>{a.length!==0&&(a=a.slice(0,-1),u(),w())},marks:()=>a.slice(),stop:L}}function on(e,t){switch(t.type){case"box":return be(e,"rect",{x:String(Math.min(t.x0,t.x1)),y:String(Math.min(t.y0,t.y1)),width:String(Math.abs(t.x1-t.x0)),height:String(Math.abs(t.y1-t.y0)),rx:"2",fill:"none",stroke:t.color,"stroke-width":yt});case"pen":return be(e,"polyline",{points:t.points.map(n=>`${n.x},${n.y}`).join(" "),fill:"none",stroke:t.color,"stroke-width":yt,"stroke-linecap":"round","stroke-linejoin":"round"});case"text":{const n=be(e,"text",{x:String(t.x),y:String(t.y),fill:t.color,style:`font:${ei}`});return n.textContent=t.text,n}case"arrow":{const n=be(e,"g",{});n.appendChild(be(e,"line",{x1:String(t.x0),y1:String(t.y0),x2:String(t.x1),y2:String(t.y1),stroke:t.color,"stroke-width":yt,"stroke-linecap":"round"}));const r=To(t.x0,t.y0,t.x1,t.y1);return n.appendChild(be(e,"polygon",{points:r.map(o=>`${o.x},${o.y}`).join(" "),fill:t.color})),n}}}function be(e,t,n){const r=e.createElementNS(Qo,t);for(const[o,i]of Object.entries(n))r.setAttribute(o,i);return r}var ni=12;function ri(e){var t,n;const r=(t=e.doc)!==null&&t!==void 0?t:document,o=(n=e.minSize)!==null&&n!==void 0?n:ni;let i=null,s=!1;function l(h){s||i||(i={x:h.clientX,y:h.clientY},h.cancelable&&h.preventDefault())}function a(h){var u;s||!i||(u=e.onProgress)===null||u===void 0||u.call(e,Kt(i.x,i.y,h.clientX,h.clientY))}function c(h){if(s||!i)return;const u=Kt(i.x,i.y,h.clientX,h.clientY);if(i=null,m(),u.width<o||u.height<o){var d;(d=e.onCancel)===null||d===void 0||d.call(e);return}e.onComplete(u)}function p(h){if(!s&&h.key==="Escape"){var u;h.preventDefault(),m(),(u=e.onCancel)===null||u===void 0||u.call(e)}}function m(){s||(s=!0,r.removeEventListener("mousedown",l,!0),r.removeEventListener("mousemove",a,!0),r.removeEventListener("mouseup",c,!0),r.removeEventListener("keydown",p,!0),i=null)}return r.addEventListener("mousedown",l,!0),r.addEventListener("mousemove",a,!0),r.addEventListener("mouseup",c,!0),r.addEventListener("keydown",p,!0),{stop:m}}function oi(e){const{doc:t,refs:n,onChange:r}=e;let o=null,i=null,s=null,l=null,a="compose";const c={selectedElement:null,region:null,marks:[]};function p(w){a=w;const L=w!=="compose";n.panel.classList.toggle("is-marking",L),n.pickLayer.classList.toggle("is-visible",w==="picking"),n.captureLayer.classList.toggle("is-visible",w==="capturing"),n.drawLayer.classList.toggle("is-visible",w==="drawing"),n.pickBtn.classList.toggle("is-active",w==="picking"),n.captureBtn.classList.toggle("is-active",w==="capturing"||w==="drawing")}function m(w){if(!w){n.highlight.style.display="none";return}const L=w.getBoundingClientRect();n.highlight.style.display="block",n.highlight.style.left=`${L.left}px`,n.highlight.style.top=`${L.top}px`,n.highlight.style.width=`${L.width}px`,n.highlight.style.height=`${L.height}px`}function h(){o==null||o.stop(),o=null}function u(){n.highlight.style.display="none",h(),a==="picking"&&p("compose")}function d(){T(),p("picking"),o=e.startElementPicker({doc:t,onHover:m,onPick:w=>{c.selectedElement=Jo(w),u(),r()},onCancel:u})}function f(w){const L=n.selBox;if(!w){L.style.display="none";return}L.style.display="block",L.style.left=`${w.x}px`,L.style.top=`${w.y}px`,L.style.width=`${w.width}px`,L.style.height=`${w.height}px`}function g(){i==null||i.stop(),i=null}function v(w){n.drawFrame.style.left=`${w.x}px`,n.drawFrame.style.top=`${w.y}px`,n.drawFrame.style.width=`${w.width}px`,n.drawFrame.style.height=`${w.height}px`}function b(w){s==null||s.setTool(w);for(const[L,x]of n.drawTools)x.classList.toggle("is-active",L===w)}function y(w){n.undoBtn.disabled=w.length===0}function k(){s==null||s.stop(),s=null}function E(w){l=w,v(w),p("drawing"),s=ti({doc:t,svg:n.drawSvg,textInput:n.drawText,initialMarks:c.marks,onChange:y}),b("arrow"),y(c.marks)}function C(){k(),l=null,a==="drawing"&&p("compose")}function T(){h(),g(),k(),l=null,f(null),n.highlight.style.display="none",a!=="compose"&&p("compose")}return{mode:()=>a,state:()=>({selectedElement:c.selectedElement,region:c.region,marks:c.marks}),togglePick(){a==="picking"?u():d()},beginCapture(){T(),f(null),p("capturing"),i=ri({doc:t,onProgress:f,onComplete:w=>{g(),f(null),E(w)},onCancel:()=>{g(),f(null),p("compose")}})},setTool:b,undo:()=>s==null?void 0:s.undo(),attachDraw(){s&&(c.marks=s.marks().slice(),l&&(c.region=l)),C(),r()},cancelDraw(){C(),r()},closeAll:T,reset(){c.selectedElement=null,c.region=null,c.marks=[]}}}var ii="http://www.w3.org/2000/svg",si="data-fixback-overlay";function I(e,t,n={},r=[]){const o=e.createElement(t);for(const[i,s]of Object.entries(n))s!==void 0&&o.setAttribute(i,s);for(const i of r)o.appendChild(typeof i=="string"?e.createTextNode(i):i);return o}function oe(e,t,n={},r=[]){const o=e.createElementNS(ii,t);for(const[i,s]of Object.entries(n))o.setAttribute(i,s);for(const i of r)o.appendChild(i);return o}var ai=[{tool:"arrow",label:"Arrow"},{tool:"box",label:"Box"},{tool:"pen",label:"Pen"},{tool:"text",label:"Text label"}];function St(e){return{class:"fb-ov-icon",width:e,height:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":e==="14"?"1.5":"1.6","aria-hidden":"true"}}function li(e){return I(e,"span",{class:"fb-ov-pickbtn__glyph","aria-hidden":"true"},["⌖"])}function ci(e){return oe(e,"svg",St("14"),[oe(e,"path",{d:"M2 5V2h3M14 5V2h-3M2 11v3h3M14 11v3h-3"})])}function ui(e){return oe(e,"svg",St("15"),[oe(e,"path",{d:"M6 4 3 7l3 3M3 7h6a4 4 0 0 1 0 8H7"})])}function di(e,t){if(t==="text")return I(e,"span",{class:"fb-ov-drawtool__t","aria-hidden":"true"},["T"]);const n={arrow:oe(e,"path",{d:"M3 13 13 3M7 3h6v6"}),box:oe(e,"rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),pen:oe(e,"path",{d:"M3 13l1-3 6-6 2 2-6 6-3 1Z"})};return oe(e,"svg",St("15"),[n[t]])}async function fi(e,t){var n,r,o,i,s,l,a;const{marking:c}=t,p=Zt({comment:t.comment,element:(n=c.selectedElement)!==null&&n!==void 0?n:void 0,region:(r=c.region)!==null&&r!==void 0?r:void 0,marks:c.marks.length>0?c.marks:void 0,url:(o=e.win.location)===null||o===void 0?void 0:o.href,environment:Jt(e.win,e.sdkVersion,e.release),deployEnvironment:e.deployEnvironment,trace:(i=e.buffer)===null||i===void 0?void 0:i.snapshot()}),m=Ft(p,{hook:e.beforeSend,scrub:e.scrub});if(!m)return{kind:"dropped"};const h=(s=(l=t.openedReplay)!==null&&l!==void 0?l:(a=e.replay)===null||a===void 0?void 0:a.snapshot())!==null&&s!==void 0?s:null;return{kind:"submitted",result:await e.submitReport(e.apiUrl,{key:e.key,identity:e.identity,content:m,replay:h})}}var pi=`
|
|
454
247
|
:host {
|
|
455
248
|
--fb-color-accent: #2f6fed;
|
|
456
249
|
--fb-color-accent-hover: #245fd0;
|
|
@@ -516,6 +309,34 @@
|
|
|
516
309
|
border-radius: 5px;
|
|
517
310
|
padding: 1px 6px;
|
|
518
311
|
}
|
|
312
|
+
/* The identity chip (ADR-0032): "Anonymous · Sign in", or "<name> · <tier> · Sign out". */
|
|
313
|
+
.fb-ov-identity {
|
|
314
|
+
display: inline-flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
gap: 6px;
|
|
317
|
+
}
|
|
318
|
+
.fb-ov-ident-name {
|
|
319
|
+
font-size: 11.5px;
|
|
320
|
+
color: var(--fb-color-faint);
|
|
321
|
+
max-width: 140px;
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
text-overflow: ellipsis;
|
|
324
|
+
white-space: nowrap;
|
|
325
|
+
}
|
|
326
|
+
.fb-ov-signin,
|
|
327
|
+
.fb-ov-signout {
|
|
328
|
+
flex: none;
|
|
329
|
+
border: 1px solid var(--fb-color-border-soft);
|
|
330
|
+
background: none;
|
|
331
|
+
border-radius: 5px;
|
|
332
|
+
padding: 1px 7px;
|
|
333
|
+
font-size: 10.5px;
|
|
334
|
+
color: var(--fb-color-accent);
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
}
|
|
337
|
+
.fb-ov-signin:hover,
|
|
338
|
+
.fb-ov-signout:hover { border-color: var(--fb-color-accent); }
|
|
339
|
+
.fb-ov-signout { color: var(--fb-color-faint); }
|
|
519
340
|
.fb-ov-close {
|
|
520
341
|
margin-left: auto;
|
|
521
342
|
border: 0;
|
|
@@ -772,9 +593,9 @@
|
|
|
772
593
|
@media (prefers-reduced-motion: reduce) {
|
|
773
594
|
.fb-ov-highlight { transition: none; }
|
|
774
595
|
}
|
|
775
|
-
`,xl="data-fixback-overlay",El="http://www.w3.org/2000/svg",Cl=[{tool:"arrow",label:"Arrow"},{tool:"box",label:"Box"},{tool:"pen",label:"Pen"},{tool:"text",label:"Text label"}],An=1800;function _(e,t,r={},n=[]){const o=e.createElement(t);for(const[i,a]of Object.entries(r))a!==void 0&&o.setAttribute(i,a);for(const i of n)o.appendChild(typeof i=="string"?e.createTextNode(i):i);return o}function be(e,t,r={},n=[]){const o=e.createElementNS(El,t);for(const[i,a]of Object.entries(r))o.setAttribute(i,a);for(const i of n)o.appendChild(i);return o}function kl(e){var t,r,n,o,i,a,l,s,u,f;const c=(t=e.doc)!==null&&t!==void 0?t:document,b=(r=(n=e.win)!==null&&n!==void 0?n:c.defaultView)!==null&&r!==void 0?r:window,d=(o=e.sdkVersion)!==null&&o!==void 0?o:gt,h={captureView:(i=(a=e.deps)===null||a===void 0?void 0:a.captureView)!==null&&i!==void 0?i:yn,submitReport:(l=(s=e.deps)===null||s===void 0?void 0:s.submitReport)!==null&&l!==void 0?l:wn,startElementPicker:(u=(f=e.deps)===null||f===void 0?void 0:f.startElementPicker)!==null&&u!==void 0?u:Ko};let m=null,p=null,y=null,g=null,v=null,w=null,C=null,E=!1,T=null,L="compose";const k={selectedElement:null,region:null,marks:[],phase:"compose"};function x(M,U){p&&(p.status.textContent=M,p.status.classList.toggle("is-error",U))}function A(M){if(L=M,!p)return;const U=M!=="compose";p.panel.classList.toggle("is-marking",U),p.pickLayer.classList.toggle("is-visible",M==="picking"),p.captureLayer.classList.toggle("is-visible",M==="capturing"),p.drawLayer.classList.toggle("is-visible",M==="drawing"),p.pickBtn.classList.toggle("is-active",M==="picking"),p.captureBtn.classList.toggle("is-active",M==="capturing"||M==="drawing")}function V(){if(!p)return;const M=!!k.selectedElement,U=!!k.region,ie=k.marks.length;p.mark.classList.toggle("has-element",M),p.selector.textContent=M?k.selectedElement.selector:"",p.pickBtn.textContent="",p.pickBtn.append(Ml(c),c.createTextNode(M?"Change element":"Pick element")),p.captureBtn.classList.toggle("is-attached",U||ie>0);const se=[];M&&se.push("Element"),U&&se.push("Region"),ie>0&&se.push(`${ie} mark${ie===1?"":"s"}`),p.caption.textContent=se.length?`${se.join(" · ")} · masked screenshot on Send`:"Masked screenshot attached on Send"}function R(M){if(!p)return;if(!M){p.highlight.style.display="none";return}const U=M.getBoundingClientRect();p.highlight.style.display="block",p.highlight.style.left=`${U.left}px`,p.highlight.style.top=`${U.top}px`,p.highlight.style.width=`${U.width}px`,p.highlight.style.height=`${U.height}px`}function ue(){y==null||y.stop(),y=null}function W(){p&&(p.highlight.style.display="none"),ue(),L==="picking"&&A("compose")}function N(){p&&(ne(),A("picking"),y=h.startElementPicker({doc:c,onHover:R,onPick:M=>{k.selectedElement=Yo(M),W(),V()},onCancel:W}))}function z(M){if(!p)return;const U=p.selBox;if(!M){U.style.display="none";return}U.style.display="block",U.style.left=`${M.x}px`,U.style.top=`${M.y}px`,U.style.width=`${M.width}px`,U.style.height=`${M.height}px`}function H(){g==null||g.stop(),g=null}function X(){p&&(ne(),z(null),A("capturing"),g=wl({doc:c,onProgress:z,onComplete:M=>{H(),z(null),fe(M)},onCancel:()=>{H(),z(null),A("compose")}}))}function Z(M){p&&(p.drawFrame.style.left=`${M.x}px`,p.drawFrame.style.top=`${M.y}px`,p.drawFrame.style.width=`${M.width}px`,p.drawFrame.style.height=`${M.height}px`)}function Q(M){if(v==null||v.setTool(M),!!p)for(const[U,ie]of p.drawTools)ie.classList.toggle("is-active",U===M)}function de(M){p&&(p.undoBtn.disabled=M.length===0)}function ae(){v==null||v.stop(),v=null}function fe(M){p&&(w=M,Z(M),A("drawing"),v=vl({doc:c,svg:p.drawSvg,textInput:p.drawText,initialMarks:k.marks,onChange:de}),Q("arrow"),de(k.marks))}function $e(){v&&(k.marks=v.marks().slice(),w&&(k.region=w)),pe(),V()}function Ie(){pe(),V()}function pe(){ae(),w=null,L==="drawing"&&A("compose")}function ne(){ue(),H(),ae(),w=null,z(null),p&&(p.highlight.style.display="none"),L!=="compose"&&A("compose")}function Re(){C!==null&&(clearTimeout(C),C=null)}async function We(){if(!(!p||k.phase==="sending")){ne(),k.phase="sending",p.sendBtn.disabled=!0,p.sendBtn.textContent="Sending…",x("",!1);try{var M,U,ie,se,Te,He,je,Ve,Ge;const Dt=jr({comment:p.comment.value,element:(M=k.selectedElement)!==null&&M!==void 0?M:void 0,region:(U=k.region)!==null&&U!==void 0?U:void 0,marks:k.marks.length>0?k.marks:void 0,url:(ie=b.location)===null||ie===void 0?void 0:ie.href,environment:Hr(b,d,e.release),trace:(se=e.buffer)===null||se===void 0?void 0:se.snapshot(),reporterName:(Te=e.display)===null||Te===void 0?void 0:Te.name,reporterEmail:(He=e.display)===null||He===void 0?void 0:He.email}),qe=Tr(Dt,{hook:e.beforeSend,scrub:e.scrub});if(!qe){k.phase="sent",p.panel.classList.add("is-sent"),C=setTimeout(J,An);return}const xe=await h.captureView({doc:c,win:b}),ct=xe?{blob:xe.blob,filename:`screenshot.${gn(xe.type)}`}:null,Sr=(je=(Ve=T)!==null&&Ve!==void 0?Ve:(Ge=e.replay)===null||Ge===void 0?void 0:Ge.snapshot())!==null&&je!==void 0?je:null,Ft=await h.submitReport(e.apiUrl,{key:e.key,identity:e.identity,content:qe,screenshot:ct,replay:Sr});Ft.ok?(k.phase="sent",p.panel.classList.add("is-sent"),C=setTimeout(J,An)):(F(),x(Ft.reason==="unreachable"?"Couldn't reach Fixback — try again.":"Fixback couldn't accept this report.",!0))}catch{F(),x("Something went wrong — try again.",!0)}}}function F(){k.phase="compose",p&&(p.sendBtn.disabled=!1,p.sendBtn.textContent="Send")}function oe(){var M;m=_(c,"div",{[xl]:""}),m.style.cssText="position:fixed;right:20px;bottom:84px;z-index:2147483001;margin:0;padding:0;border:0;display:none;";const U=m.attachShadow({mode:"open"}),ie=c.createElement("style");ie.textContent=Sl,U.appendChild(ie);const se=_(c,"button",{type:"button",class:"fb-ov-close","aria-label":"Close"},["✕"]),Te=_(c,"div",{class:"fb-ov-head"},[_(c,"span",{class:"fb-ov-mark-sq"}),_(c,"span",{class:"fb-ov-brand"},["Fixback"])]);e.tier!=null&&Te.appendChild(_(c,"span",{class:"fb-ov-tier","aria-label":`Trust tier: ${e.tier}`},[e.tier])),Te.appendChild(se);const He=_(c,"span",{class:"fb-ov-selector"}),je=_(c,"span",{class:"fb-ov-mark-caption"}),Ve=_(c,"div",{class:"fb-ov-mark"},[He,je]),Ge=_(c,"textarea",{class:"fb-ov-comment",placeholder:"Describe what you saw or want…","aria-label":"Comment"}),Dt=_(c,"div",{class:"fb-ov-status",role:"status","aria-live":"polite"}),qe=_(c,"button",{type:"button",class:"fb-ov-pickbtn",title:"Point at an element"});qe.addEventListener("click",()=>{k.phase!=="sending"&&(L==="picking"?W():N())});const xe=_(c,"button",{type:"button",class:"fb-ov-capturebtn",title:"Capture a region and draw","aria-label":"Capture a region and draw"});xe.appendChild(Il(c)),xe.addEventListener("click",()=>{k.phase!=="sending"&&X()});const ct=_(c,"button",{type:"button",class:"fb-ov-send"},["Send"]);ct.addEventListener("click",()=>{We()});const Sr=_(c,"div",{class:"fb-ov-tools"},[qe,xe,ct]),Ft=_(c,"div",{class:"fb-ov-form"},[Ve,Ge,Dt,Sr]),mu=_(c,"div",{class:"fb-ov-done"},[_(c,"div",{class:"fb-ov-done__check"},["✓"]),_(c,"div",{class:"fb-ov-done__title"},["Report sent"]),_(c,"div",{class:"fb-ov-done__sub"},["Thanks — the team can see it now."])]),No=_(c,"div",{class:"fb-ov-panel",role:"dialog","aria-label":"Fixback feedback"},[Te,Ft,mu]),xr=_(c,"div",{class:"fb-ov-highlight"});xr.style.display="none";const _o=_(c,"div",{class:"fb-ov-pick"},[_(c,"div",{class:"fb-ov-hint"},["Click the element you mean · Esc to cancel"]),xr]),Er=_(c,"div",{class:"fb-ov-capture-sel"});Er.style.display="none";const Lo=_(c,"div",{class:"fb-ov-capture"},[_(c,"div",{class:"fb-ov-capture-dim"}),_(c,"div",{class:"fb-ov-hint"},["Drag to capture an area · Esc to cancel"]),Er]),Ao=be(c,"svg",{class:"fb-ov-draw-svg",width:"100%",height:"100%"}),Cr=_(c,"input",{class:"fb-ov-draw-text",placeholder:"label…","aria-label":"Mark label"});Cr.style.display="none";const Oo=_(c,"div",{class:"fb-ov-draw-frame"}),Do=new Map,Fo=[];for(const{tool:Ut,label:zo}of Cl){const Bt=_(c,"button",{type:"button",class:"fb-ov-drawtool","data-tool":Ut,title:zo,"aria-label":zo});Bt.appendChild(Tl(c,Ut)),Bt.addEventListener("click",()=>Q(Ut)),Do.set(Ut,Bt),Fo.push(Bt)}const Pt=_(c,"button",{type:"button",class:"fb-ov-draw-undo",title:"Undo","aria-label":"Undo"});Pt.appendChild(Rl(c)),Pt.addEventListener("click",()=>v==null?void 0:v.undo());const Po=_(c,"button",{type:"button",class:"fb-ov-draw-cancel"},["Cancel"]);Po.addEventListener("click",()=>Ie());const Uo=_(c,"button",{type:"button",class:"fb-ov-draw-attach"},["Attach"]);Uo.addEventListener("click",()=>$e());const bu=_(c,"div",{class:"fb-ov-draw-toolbar"},[...Fo,_(c,"span",{class:"fb-ov-draw-divider"}),Pt,Po,Uo]),Bo=_(c,"div",{class:"fb-ov-draw"},[Oo,Ao,Cr,bu]);U.append(No,_o,Lo,Bo),se.addEventListener("click",J),((M=e.target)!==null&&M!==void 0?M:c.body).appendChild(m),p={panel:No,mark:Ve,selector:He,caption:je,comment:Ge,status:Dt,pickBtn:qe,captureBtn:xe,sendBtn:ct,highlight:xr,pickLayer:_o,captureLayer:Lo,selBox:Er,drawLayer:Bo,drawSvg:Ao,drawText:Cr,drawFrame:Oo,drawTools:Do,undoBtn:Pt}}function G(){(!m||!p)&&oe()}function q(){var M,U;if(G(),!(!m||!p)){Re(),ne(),T=(M=(U=e.replay)===null||U===void 0?void 0:U.snapshot())!==null&&M!==void 0?M:null,k.phase="compose",k.selectedElement=null,k.region=null,k.marks=[],p.panel.classList.remove("is-sent"),p.comment.value="",F(),x("",!1),V(),m.style.display="block",E=!0;try{p.comment.focus()}catch{}}}function J(){Re(),ne(),m&&(m.style.display="none"),E=!1,T=null}function $(){Re(),ne(),m==null||m.remove(),m=null,p=null,E=!1}return{open:q,close:J,destroy:$,get isOpen(){return E}}}function Ml(e){return _(e,"span",{class:"fb-ov-pickbtn__glyph","aria-hidden":"true"},["⌖"])}function Il(e){return be(e,"svg",{class:"fb-ov-icon",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","aria-hidden":"true"},[be(e,"path",{d:"M2 5V2h3M14 5V2h-3M2 11v3h3M14 11v3h-3"})])}function Rl(e){return be(e,"svg",{class:"fb-ov-icon",width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.6","aria-hidden":"true"},[be(e,"path",{d:"M6 4 3 7l3 3M3 7h6a4 4 0 0 1 0 8H7"})])}function Tl(e,t){return t==="text"?_(e,"span",{class:"fb-ov-drawtool__t","aria-hidden":"true"},["T"]):be(e,"svg",{class:"fb-ov-icon",width:"15",height:"15",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.6","aria-hidden":"true"},[{arrow:be(e,"path",{d:"M3 13 13 3M7 3h6v6"}),box:be(e,"rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),pen:be(e,"path",{d:"M3 13l1-3 6-6 2 2-6 6-3 1Z"})}[t]])}var Nl=Object.defineProperty,_l=(e,t,r)=>t in e?Nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t,r)=>_l(e,typeof t!="symbol"?t+"":t,r),On,P=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(P||{}),O=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(O||{}),re=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(re||{}),ge=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ge||{}),Oe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Oe||{}),De=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(De||{}),K=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(K||{}),Dn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},St={},Pn={},Ll=()=>!!globalThis.Zone;function ur(e){if(St[e])return St[e];const t=globalThis[e],r=t.prototype,n=e in Dn?Dn[e]:void 0,o=!!(n&&n.every(l=>{var s,u;return!!((u=(s=Object.getOwnPropertyDescriptor(r,l))==null?void 0:s.get)!=null&&u.toString().includes("[native code]"))})),i=e in Fn?Fn[e]:void 0,a=!!(i&&i.every(l=>{var s;return typeof r[l]=="function"&&((s=r[l])==null?void 0:s.toString().includes("[native code]"))}));if(o&&a&&!Ll())return St[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const s=l.contentWindow;if(!s)return t.prototype;const u=s[e].prototype;if(!u)return l.remove(),r;const f=navigator.userAgent;return f.includes("Safari")&&!f.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Pn[e]=()=>l.remove()):l.remove(),St[e]=u}catch{return r}}var dr={};function ve(e,t,r){var n;const o=`${e}.${String(r)}`;if(dr[o])return dr[o].call(t);const i=ur(e),a=(n=Object.getOwnPropertyDescriptor(i,r))==null?void 0:n.get;return a?(dr[o]=a,a.call(t)):t[r]}var fr={};function Un(e,t,r){const n=`${e}.${String(r)}`;if(fr[n])return fr[n].bind(t);const o=ur(e)[r];return typeof o!="function"?t[r]:(fr[n]=o,o.bind(t))}function Al(e){return ve("Node",e,"ownerDocument")}function Ol(e){return ve("Node",e,"childNodes")}function Dl(e){return ve("Node",e,"parentNode")}function Fl(e){return ve("Node",e,"parentElement")}function Pl(e){return ve("Node",e,"textContent")}function Ul(e,t){return Un("Node",e,"contains")(t)}function Bl(e){return Un("Node",e,"getRootNode")()}function zl(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function $l(e){return e.styleSheets}function Wl(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function Hl(e,t){return ve("Element",e,"querySelector")(t)}function jl(e,t){return ve("Element",e,"querySelectorAll")(t)}function Bn(){var e;return[ur("MutationObserver").constructor,(e=Pn.MutationObserver)!==null&&e!==void 0?e:(()=>{})]}var tt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(tt=()=>new Date().getTime());function Ce(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var I={ownerDocument:Al,childNodes:Ol,parentNode:Dl,parentElement:Fl,textContent:Pl,contains:Ul,getRootNode:Bl,host:zl,styleSheets:$l,shadowRoot:Wl,querySelector:Hl,querySelectorAll:jl,nowTimestamp:tt,mutationObserverCtor:Bn,patch:Ce};function zn(e){return e.nodeType===e.ELEMENT_NODE}function rt(e){const t=e&&"host"in e&&"mode"in e&&I.host(e)||null;return!!(t&&"shadowRoot"in t&&I.shadowRoot(t)===e)}function nt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Vl(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Gl(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function hr(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),Vl(Array.from(t,n=>$n(n,r)).join(""))}catch{return null}}function $n(e,t){if(Xl(e)){let r;try{r=hr(e.styleSheet)||Gl(e)}catch{r=e.cssText}return e.styleSheet.href?Ct(r,e.styleSheet.href):r}else{let r=e.cssText;return Yl(e)&&e.selectorText.includes(":")&&(r=ql(r)),t?Ct(r,t):r}}function ql(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Xl(e){return"styleSheet"in e}function Yl(e){return"selectorText"in e}var Wn=class{constructor(){S(this,"idNodeMap",new Map),S(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Kl(){return new Wn}function xt({element:e,maskInputOptions:t,tagName:r,type:n,value:o,maskInputFn:i}){let a=o||"";const l=n&&ke(n);return(t[r.toLowerCase()]||l&&t[l])&&(i?a=i(a,e):a="*".repeat(a.length)),a}function ke(e){return e.toLowerCase()}var Hn="__rrweb_original__";function Jl(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){const i=t.getImageData,a=Hn in i?i[Hn]:i;if(new Uint32Array(a.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Et(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ke(t):null}function jn(e,t){var r;let n;try{n=new URL(e,t!=null?t:window.location.href)}catch{return null}const o=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(r=o==null?void 0:o[1])!==null&&r!==void 0?r:null}function Zl(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ql=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ec=/^(?:[a-z+]+:)?\/\//i,tc=/^www\..*/i,rc=/^(data:)([^,]*),(.*)/i;function Ct(e,t){return(e||"").replace(Ql,(r,n,o,i,a,l)=>{const s=o||a||l,u=n||i||"";if(!s)return r;if(ec.test(s)||tc.test(s))return`url(${u}${s}${u})`;if(rc.test(s))return`url(${u}${s}${u})`;if(s[0]==="/")return`url(${u}${Zl(t)+s}${u})`;const f=s.split("#")[0],c=s.substring(f.length),b=t.split("#")[0].split("/"),d=f.split("/");b.pop();for(const h of d)h!=="."&&(h===".."?b.pop():b.push(h));return`url(${u}${b.join("/")}${c}${u})`})}function kt(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function nc(e,t,r=!1){const n=Array.from(t.childNodes),o=[];let i=0;if(n.length>1&&e&&typeof e=="string"){let a=kt(e,r);const l=a.length/e.length;for(let s=1;s<n.length;s++)if(n[s].textContent&&typeof n[s].textContent=="string"){const u=kt(n[s].textContent,r),f=100;let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){let b=u.substring(0,c),d=a.split(b),h=-1;if(d.length===2)h=d[0].length;else if(d.length>2&&d[0]===""&&n[s-1].textContent!=="")h=a.indexOf(b,1);else if(d.length===1){if(b=b.substring(0,b.length-1),d=a.split(b),d.length<=1)return o.push(e),o;c=101}else c===u.length-1&&(h=a.indexOf(b));if(d.length>=2&&c>f){const m=n[s-1].textContent;if(m&&typeof m=="string"){const p=kt(m).length;h=a.indexOf(b,p)}h===-1&&(h=d[0].length)}if(h!==-1){let m=Math.floor(h/l);for(;m>0&&m<e.length;){if(i+=1,i>50*n.length)return o.push(e),o;const p=kt(e.substring(0,m),r);if(p.length===h){o.push(e.substring(0,m)),e=e.substring(m),a=a.substring(h);break}else p.length<h?m+=Math.max(1,Math.floor((h-p.length)/l)):m-=Math.max(1,Math.floor((p.length-h)*l))}break}}}}return o.push(e),o}function oc(e,t){return nc(e,t).join("/* rr_split */")}var ic=1,ac=new RegExp("[^a-z0-9-_:]"),ot=-2;function Vn(){return ic++}function sc(e){if(e instanceof HTMLFormElement)return"form";const t=ke(e.tagName);return ac.test(t)?"div":t}var Fe,Gn,lc=/^[^ \t\n\r\u000c]+/,cc=/^[, \t\n\r\u000c]+/;function uc(e,t){if(t.trim()==="")return t;let r=0;function n(i){let a;const l=i.exec(t.substring(r));return l?(a=l[0],r+=a.length,a):""}const o=[];for(;n(cc),!(r>=t.length);){let i=n(lc);if(i.slice(-1)===",")i=Pe(e,i.substring(0,i.length-1)),o.push(i);else{let a="";i=Pe(e,i);let l=!1;for(;;){const s=t.charAt(r);if(s===""){o.push((i+a).trim());break}else if(l)s===")"&&(l=!1);else if(s===","){r+=1,o.push((i+a).trim());break}else s==="("&&(l=!0);a+=s,r+=1}}}return o.join(", ")}var qn=new WeakMap;function Pe(e,t){return!t||t.trim()===""?t:pr(e,t)}function dc(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function pr(e,t){let r=qn.get(e);if(r||(r=e.createElement("a"),qn.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Xn(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Pe(e,n):r==="srcset"?uc(e,n):r==="style"?Ct(n,pr(e)):t==="object"&&r==="data"?Pe(e,n):n)}function Yn(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function fc(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch{}return!1}function Mt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Mt(I.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){const o=e.classList[n];if(t.test(o))return!0}return r?Mt(I.parentNode(e),t,r):!1}function Kn(e,t,r,n){let o;if(zn(e)){if(o=e,!I.childNodes(o).length)return!1}else{if(I.parentElement(e)===null)return!1;o=I.parentElement(e)}try{if(typeof t=="string"){if(n){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Mt(o,t,n))return!0;if(r){if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}}catch{}return!1}function hc(e,t,r){const n=e.contentWindow;if(!n)return;let o=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){const l=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),o=!0,t()});return}const a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function pc(e,t,r){let n=!1,o;try{o=e.sheet}catch{return}if(o)return;const i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}function mc(e,t){const{doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:a,inlineStylesheet:l,maskInputOptions:s={},maskTextFn:u,maskInputFn:f,dataURLOptions:c={},inlineImages:b,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:m=!1,cssCaptured:p=!1}=t,y=bc(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:e.compatMode}:{type:K.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return vc(e,{doc:r,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:s,maskInputFn:f,dataURLOptions:c,inlineImages:b,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return gc(e,{doc:r,needsMask:a,maskTextFn:u,rootId:y,cssCaptured:p});case e.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:K.Comment,textContent:I.textContent(e)||"",rootId:y};default:return!1}}function bc(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function gc(e,t){const{needsMask:r,maskTextFn:n,rootId:o,cssCaptured:i}=t,a=I.parentNode(e),l=a&&a.tagName;let s="";const u=l==="STYLE"?!0:void 0,f=l==="SCRIPT"?!0:void 0;return f?s="SCRIPT_PLACEHOLDER":i||(s=I.textContent(e),u&&s&&(s=Ct(s,pr(t.doc)))),!u&&!f&&s&&r&&(s=n?n(s,I.parentElement(e)):s.replace(/[\S]/g,"*")),{type:K.Text,textContent:s||"",rootId:o}}function vc(e,t){const{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskInputFn:l,dataURLOptions:s={},inlineImages:u,recordCanvas:f,keepIframeSrcFn:c,newlyAddedElement:b=!1,rootId:d}=t,h=fc(e,n,o),m=sc(e);let p={};const y=e.attributes.length;for(let v=0;v<y;v++){const w=e.attributes[v];Yn(m,w.name,w.value)||(p[w.name]=Xn(r,m,ke(w.name),w.value))}if(m==="link"&&i){const v=Array.from(r.styleSheets).find(C=>C.href===e.href);let w=null;v&&(w=hr(v)),w&&(delete p.rel,delete p.href,p._cssText=w)}if(m==="style"&&e.sheet){let v=hr(e.sheet);v&&(e.childNodes.length>1&&(v=oc(v,e)),p._cssText=v)}if(["input","textarea","select"].includes(m)){const v=e.value,w=e.checked;p.type!=="radio"&&p.type!=="checkbox"&&p.type!=="submit"&&p.type!=="button"&&v?p.value=xt({element:e,type:Et(e),tagName:m,value:v,maskInputOptions:a,maskInputFn:l}):w&&(p.checked=w)}if(m==="option"&&(e.selected&&!a.select?p.selected=!0:delete p.selected),m==="dialog"&&e.open&&(p.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&f){if(e.__context==="2d")Jl(e)||(p.rr_dataURL=e.toDataURL(s.type,s.quality));else if(!("__context"in e)){const v=e.toDataURL(s.type,s.quality),w=r.createElement("canvas");w.width=e.width,w.height=e.height,v!==w.toDataURL(s.type,s.quality)&&(p.rr_dataURL=v)}}if(m==="img"&&u){Fe||(Fe=r.createElement("canvas"),Gn=Fe.getContext("2d"));const v=e,w=v.currentSrc||v.getAttribute("src")||"<unknown-src>",C=v.crossOrigin,E=()=>{v.removeEventListener("load",E);try{Fe.width=v.naturalWidth,Fe.height=v.naturalHeight,Gn.drawImage(v,0,0),p.rr_dataURL=Fe.toDataURL(s.type,s.quality)}catch(T){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?E():v.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${w}! Error: ${T}`)}v.crossOrigin==="anonymous"&&(C?p.crossOrigin=C:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?E():v.addEventListener("load",E)}if(["audio","video"].includes(m)){const v=p;v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime,v.rr_mediaPlaybackRate=e.playbackRate,v.rr_mediaMuted=e.muted,v.rr_mediaLoop=e.loop,v.rr_mediaVolume=e.volume}if(b||(e.scrollLeft&&(p.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(p.rr_scrollTop=e.scrollTop)),h){const{width:v,height:w}=e.getBoundingClientRect();p={class:p.class,rr_width:`${v}px`,rr_height:`${w}px`}}m==="iframe"&&!c(p.src)&&(e.contentDocument||(p.rr_src=p.src),delete p.src);let g;try{customElements.get(m)&&(g=!0)}catch{}return{type:K.Element,tagName:m,attributes:p,childNodes:[],isSVG:dc(e)||void 0,needBlock:h,rootId:d,isCustom:g}}function j(e){return e==null?"":e.toLowerCase()}function Jn(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function yc(e,t){if(t.comment&&e.type===K.Comment)return!0;if(e.type===K.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&jn(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(j(e.attributes.name).match(/^msapplication-tile(image|color)$/)||j(e.attributes.name)==="application-name"||j(e.attributes.rel)==="icon"||j(e.attributes.rel)==="apple-touch-icon"||j(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&j(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(j(e.attributes.property).match(/^(og|twitter|fb):/)||j(e.attributes.name).match(/^(og|twitter):/)||j(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(j(e.attributes.name)==="robots"||j(e.attributes.name)==="googlebot"||j(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(j(e.attributes.name)==="author"||j(e.attributes.name)==="generator"||j(e.attributes.name)==="framework"||j(e.attributes.name)==="publisher"||j(e.attributes.name)==="progid"||j(e.attributes.property).match(/^article:/)||j(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(j(e.attributes.name)==="google-site-verification"||j(e.attributes.name)==="yandex-verification"||j(e.attributes.name)==="csrf-token"||j(e.attributes.name)==="p:domain_verify"||j(e.attributes.name)==="verify-v1"||j(e.attributes.name)==="verification"||j(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ue(e,t){const{doc:r,mirror:n,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:s=!1,inlineStylesheet:u=!0,maskInputOptions:f={},maskTextFn:c,maskInputFn:b,slimDOMOptions:d,dataURLOptions:h={},inlineImages:m=!1,recordCanvas:p=!1,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:v=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:T=!1,cssCaptured:L=!1}=t;let{needsMask:k}=t,{preserveWhiteSpace:x=!0}=t;k||(k=Kn(e,a,l,k===void 0));const A=mc(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:k,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:b,dataURLOptions:h,inlineImages:m,recordCanvas:p,keepIframeSrcFn:E,newlyAddedElement:T,cssCaptured:L});if(!A)return console.warn(e,"not serialized"),null;let V;n.hasNode(e)?V=n.getId(e):yc(A,d)||!x&&A.type===K.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?V=ot:V=Vn();const R=Object.assign(A,{id:V});if(n.add(e,R),V===ot)return null;y&&y(e);let ue=!s;if(R.type===K.Element){ue=ue&&!R.needBlock,delete R.needBlock;const N=I.shadowRoot(e);N&&nt(N)&&(R.isShadowHost=!0)}if((R.type===K.Document||R.type===K.Element)&&ue){d.headWhitespace&&R.type===K.Element&&R.tagName==="head"&&(x=!1);const N={doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:k,maskTextClass:a,maskTextSelector:l,skipChild:s,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:b,slimDOMOptions:d,dataURLOptions:h,inlineImages:m,recordCanvas:p,preserveWhiteSpace:x,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:E,cssCaptured:!1};if(!(R.type===K.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===K.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(N.cssCaptured=!0);for(const H of Array.from(I.childNodes(e))){const X=Ue(H,N);X&&R.childNodes.push(X)}}let z=null;if(zn(e)&&(z=I.shadowRoot(e)))for(const H of Array.from(I.childNodes(z))){const X=Ue(H,N);X&&(nt(z)&&(X.isShadow=!0),R.childNodes.push(X))}}const W=I.parentNode(e);return W&&rt(W)&&nt(W)&&(R.isShadow=!0),R.type===K.Element&&R.tagName==="iframe"&&hc(e,()=>{const N=e.contentDocument;if(N&&g){const z=Ue(N,{doc:N,mirror:n,blockClass:o,blockSelector:i,needsMask:k,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:b,slimDOMOptions:d,dataURLOptions:h,inlineImages:m,recordCanvas:p,preserveWhiteSpace:x,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:E});z&&g(e,z)}},v),R.type===K.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&jn(R.attributes.href)==="css")&&pc(e,()=>{if(w){const N=Ue(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,needsMask:k,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:b,slimDOMOptions:d,dataURLOptions:h,inlineImages:m,recordCanvas:p,preserveWhiteSpace:x,onSerialize:y,onIframeLoad:g,iframeLoadTimeout:v,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:E});N&&w(e,N)}},C),R}function wc(e,t){const{mirror:r=new Wn,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:s=!1,recordCanvas:u=!1,maskAllInputs:f=!1,maskTextFn:c,maskInputFn:b,slimDOM:d=!1,dataURLOptions:h,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:C=()=>!1}=t;return Ue(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===!1?{password:!0}:f,maskTextFn:c,maskInputFn:b,slimDOMOptions:Jn(d),dataURLOptions:h,inlineImages:s,recordCanvas:u,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:y,iframeLoadTimeout:g,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:C,newlyAddedElement:!1})}var Sc=class $o{constructor(...t){S(this,"parentElement",null),S(this,"parentNode",null),S(this,"ownerDocument"),S(this,"firstChild",null),S(this,"lastChild",null),S(this,"previousSibling",null),S(this,"nextSibling",null),S(this,"ELEMENT_NODE",1),S(this,"TEXT_NODE",3),S(this,"nodeType"),S(this,"nodeName"),S(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof $o){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function ee(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Be=`Please stop import mirror directly. Instead of that,\r
|
|
596
|
+
`;function sn(e,t,n,r){if(t.textContent="",n.status==="connected"){t.appendChild(I(e,"span",{class:"fb-ov-ident-name"},[n.name||n.email])),n.tier&&t.appendChild(I(e,"span",{class:"fb-ov-tier","aria-label":`Trust tier: ${n.tier}`},[n.tier]));const o=I(e,"button",{type:"button",class:"fb-ov-signout"},["Sign out"]);o.addEventListener("click",r.onSignOut),t.appendChild(o)}else{t.appendChild(I(e,"span",{class:"fb-ov-ident-name"},["Anonymous"]));const o=I(e,"button",{type:"button",class:"fb-ov-signin"},["Sign in"]);o.addEventListener("click",r.onSignIn),t.appendChild(o)}}function hi(e,t){var n;const{doc:r}=e,o=I(r,"div",{[si]:""});o.style.cssText="position:fixed;right:20px;bottom:84px;z-index:2147483001;margin:0;padding:0;border:0;display:none;";const i=o.attachShadow({mode:"open"}),s=r.createElement("style");s.textContent=pi,i.appendChild(s);const l=I(r,"button",{type:"button",class:"fb-ov-close","aria-label":"Close"},["✕"]);l.addEventListener("click",t.onClose);const a=I(r,"span",{class:"fb-ov-identity"});sn(r,a,e.identity,t);const c=I(r,"div",{class:"fb-ov-head"},[I(r,"span",{class:"fb-ov-mark-sq"}),I(r,"span",{class:"fb-ov-brand"},["Fixback"]),a]);c.appendChild(l);const p=I(r,"span",{class:"fb-ov-selector"}),m=I(r,"span",{class:"fb-ov-mark-caption"}),h=I(r,"div",{class:"fb-ov-mark"},[p,m]),u=I(r,"textarea",{class:"fb-ov-comment",placeholder:"Describe what you saw or want…","aria-label":"Comment"}),d=I(r,"div",{class:"fb-ov-status",role:"status","aria-live":"polite"}),f=I(r,"button",{type:"button",class:"fb-ov-pickbtn",title:"Point at an element"});f.addEventListener("click",t.onTogglePick);const g=I(r,"button",{type:"button",class:"fb-ov-capturebtn",title:"Capture a region and draw","aria-label":"Capture a region and draw"});g.appendChild(ci(r)),g.addEventListener("click",t.onBeginCapture);const v=I(r,"button",{type:"button",class:"fb-ov-send"},["Send"]);v.addEventListener("click",t.onSend);const b=I(r,"div",{class:"fb-ov-tools"},[f,g,v]),y=I(r,"div",{class:"fb-ov-form"},[h,u,d,b]),k=I(r,"div",{class:"fb-ov-done"},[I(r,"div",{class:"fb-ov-done__check"},["✓"]),I(r,"div",{class:"fb-ov-done__title"},["Report sent"]),I(r,"div",{class:"fb-ov-done__sub"},["Thanks — the team can see it now."])]),E=I(r,"div",{class:"fb-ov-panel",role:"dialog","aria-label":"Fixback feedback"},[c,y,k]),C=I(r,"div",{class:"fb-ov-highlight"});C.style.display="none";const T=I(r,"div",{class:"fb-ov-pick"},[I(r,"div",{class:"fb-ov-hint"},["Click the element you mean · Esc to cancel"]),C]),w=I(r,"div",{class:"fb-ov-capture-sel"});w.style.display="none";const L=I(r,"div",{class:"fb-ov-capture"},[I(r,"div",{class:"fb-ov-capture-dim"}),I(r,"div",{class:"fb-ov-hint"},["Drag to capture an area · Esc to cancel"]),w]),x=oe(r,"svg",{class:"fb-ov-draw-svg",width:"100%",height:"100%"}),D=I(r,"input",{class:"fb-ov-draw-text",placeholder:"label…","aria-label":"Mark label"});D.style.display="none";const j=I(r,"div",{class:"fb-ov-draw-frame"}),R=new Map,ne=[];for(const{tool:Y,label:Ce}of ai){const pe=I(r,"button",{type:"button",class:"fb-ov-drawtool","data-tool":Y,title:Ce,"aria-label":Ce});pe.appendChild(di(r,Y)),pe.addEventListener("click",()=>t.onSelectTool(Y)),R.set(Y,pe),ne.push(pe)}const J=I(r,"button",{type:"button",class:"fb-ov-draw-undo",title:"Undo","aria-label":"Undo"});J.appendChild(ui(r)),J.addEventListener("click",t.onUndo);const _=I(r,"button",{type:"button",class:"fb-ov-draw-cancel"},["Cancel"]);_.addEventListener("click",t.onCancelDraw);const F=I(r,"button",{type:"button",class:"fb-ov-draw-attach"},["Attach"]);F.addEventListener("click",t.onAttachDraw);const ee=I(r,"div",{class:"fb-ov-draw-toolbar"},[...ne,I(r,"span",{class:"fb-ov-draw-divider"}),J,_,F]),G=I(r,"div",{class:"fb-ov-draw"},[j,x,D,ee]);return i.append(E,T,L,G),((n=e.target)!==null&&n!==void 0?n:r.body).appendChild(o),{host:o,refs:{panel:E,identity:a,mark:h,selector:p,caption:m,comment:u,status:d,pickBtn:f,captureBtn:g,sendBtn:v,highlight:C,pickLayer:T,captureLayer:L,selBox:w,drawLayer:G,drawSvg:x,drawText:D,drawFrame:j,drawTools:R,undoBtn:J}}}var mi=1800;function bi(e){var t,n,r,o,i,s,l,a;const c=(t=e.doc)!==null&&t!==void 0?t:document,p=(n=(r=e.win)!==null&&r!==void 0?r:c.defaultView)!==null&&n!==void 0?n:window,m=(o=e.sdkVersion)!==null&&o!==void 0?o:Be,h={submitReport:(i=(s=e.deps)===null||s===void 0?void 0:s.submitReport)!==null&&i!==void 0?i:Qt,startElementPicker:(l=(a=e.deps)===null||a===void 0?void 0:a.startElementPicker)!==null&&l!==void 0?l:Zo};let u=null,d=null,f=null,g=e.reporterIdentity,v=null,b=!1,y=null,k="compose";function E(_,F){d&&(d.status.textContent=_,d.status.classList.toggle("is-error",F))}function C(){if(!d||!f)return;const{selectedElement:_,region:F,marks:ee}=f.state(),G=ee.length;d.mark.classList.toggle("has-element",!!_),d.selector.textContent=_?_.selector:"",d.pickBtn.textContent="",d.pickBtn.append(li(c),c.createTextNode(_?"Change element":"Pick element")),d.captureBtn.classList.toggle("is-attached",!!F||G>0);const Y=[];_&&Y.push("Element"),F&&Y.push("Region"),G>0&&Y.push(`${G} mark${G===1?"":"s"}`),d.caption.textContent=Y.length?`${Y.join(" · ")} · masked session replay on Send`:"Masked session replay attached on Send"}function T(){v!==null&&(clearTimeout(v),v=null)}function w(){k="compose",d&&(d.sendBtn.disabled=!1,d.sendBtn.textContent="Send")}function L(){k="sent",d==null||d.panel.classList.add("is-sent"),v=setTimeout(R,mi)}async function x(){if(!(!d||!f||k==="sending")){f.closeAll(),k="sending",d.sendBtn.disabled=!0,d.sendBtn.textContent="Sending…",E("",!1);try{var _;const F=await fi({apiUrl:e.apiUrl,key:e.key,identity:(_=e.getIdentity)===null||_===void 0?void 0:_.call(e),sdkVersion:m,release:e.release,deployEnvironment:e.deployEnvironment,win:p,buffer:e.buffer,replay:e.replay,beforeSend:e.beforeSend,scrub:e.scrub,submitReport:h.submitReport},{comment:d.comment.value,marking:f.state(),openedReplay:y});if(F.kind==="dropped"||F.result.ok){L();return}w(),E(F.result.reason==="unreachable"?"Couldn't reach Fixback — try again.":"Fixback couldn't accept this report.",!0)}catch{w(),E("Something went wrong — try again.",!0)}}}function D(){if(u&&d&&f)return;const _=hi({doc:c,target:e.target,identity:g},{onClose:R,onTogglePick:()=>{k!=="sending"&&(f==null||f.togglePick())},onBeginCapture:()=>{k!=="sending"&&(f==null||f.beginCapture())},onSend:()=>{x()},onSelectTool:F=>f==null?void 0:f.setTool(F),onUndo:()=>f==null?void 0:f.undo(),onCancelDraw:()=>f==null?void 0:f.cancelDraw(),onAttachDraw:()=>f==null?void 0:f.attachDraw(),onSignIn:e.onSignIn,onSignOut:e.onSignOut});u=_.host,d=_.refs,f=oi({doc:c,refs:_.refs,startElementPicker:h.startElementPicker,onChange:C})}function j(){var _,F;if(D(),!(!u||!d||!f)){T(),f.closeAll(),y=(_=(F=e.replay)===null||F===void 0?void 0:F.snapshot())!==null&&_!==void 0?_:null,f.reset(),d.panel.classList.remove("is-sent"),d.comment.value="",w(),E("",!1),C(),u.style.display="block",b=!0;try{d.comment.focus()}catch{}}}function R(){T(),f==null||f.closeAll(),u&&(u.style.display="none"),b=!1,y=null}function ne(){T(),f==null||f.closeAll(),u==null||u.remove(),u=null,d=null,f=null,b=!1}function J(_){g=_,d&&sn(c,d.identity,_,{onSignIn:e.onSignIn,onSignOut:e.onSignOut})}return{open:j,close:R,destroy:ne,setIdentity:J,get isOpen(){return b}}}var gi=Object.defineProperty,vi=(e,t,n)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t,n)=>vi(e,typeof t!="symbol"?t+"":t,n),an,A=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(A||{}),N=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(N||{}),X=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(X||{}),ie=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ie||{}),ge=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ge||{}),ve=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(ve||{}),H=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(H||{}),ln={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},We={},un={},yi=()=>!!globalThis.Zone;function wt(e){if(We[e])return We[e];const t=globalThis[e],n=t.prototype,r=e in ln?ln[e]:void 0,o=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(n,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),i=e in cn?cn[e]:void 0,s=!!(i&&i.every(l=>{var a;return typeof n[l]=="function"&&((a=n[l])==null?void 0:a.toString().includes("[native code]"))}));if(o&&s&&!yi())return We[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const a=l.contentWindow;if(!a)return t.prototype;const c=a[e].prototype;if(!c)return l.remove(),n;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),un[e]=()=>l.remove()):l.remove(),We[e]=c}catch{return n}}var xt={};function se(e,t,n){var r;const o=`${e}.${String(n)}`;if(xt[o])return xt[o].call(t);const i=wt(e),s=(r=Object.getOwnPropertyDescriptor(i,n))==null?void 0:r.get;return s?(xt[o]=s,s.call(t)):t[n]}var kt={};function dn(e,t,n){const r=`${e}.${String(n)}`;if(kt[r])return kt[r].bind(t);const o=wt(e)[n];return typeof o!="function"?t[n]:(kt[r]=o,o.bind(t))}function Si(e){return se("Node",e,"ownerDocument")}function wi(e){return se("Node",e,"childNodes")}function xi(e){return se("Node",e,"parentNode")}function ki(e){return se("Node",e,"parentElement")}function Ci(e){return se("Node",e,"textContent")}function Mi(e,t){return dn("Node",e,"contains")(t)}function Ei(e){return dn("Node",e,"getRootNode")()}function Ii(e){return!e||!("host"in e)?null:se("ShadowRoot",e,"host")}function _i(e){return e.styleSheets}function Ri(e){return!e||!("shadowRoot"in e)?null:se("Element",e,"shadowRoot")}function Ti(e,t){return se("Element",e,"querySelector")(t)}function Li(e,t){return se("Element",e,"querySelectorAll")(t)}function fn(){var e;return[wt("MutationObserver").constructor,(e=un.MutationObserver)!==null&&e!==void 0?e:(()=>{})]}var Ie=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ie=()=>new Date().getTime());function ue(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var M={ownerDocument:Si,childNodes:wi,parentNode:xi,parentElement:ki,textContent:Ci,contains:Mi,getRootNode:Ei,host:Ii,styleSheets:_i,shadowRoot:Ri,querySelector:Ti,querySelectorAll:Li,nowTimestamp:Ie,mutationObserverCtor:fn,patch:ue};function pn(e){return e.nodeType===e.ELEMENT_NODE}function _e(e){const t=e&&"host"in e&&"mode"in e&&M.host(e)||null;return!!(t&&"shadowRoot"in t&&M.shadowRoot(t)===e)}function Re(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ni(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Oi(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Ct(e){try{const t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),Ni(Array.from(t,r=>hn(r,n)).join(""))}catch{return null}}function hn(e,t){if(Di(e)){let n;try{n=Ct(e.styleSheet)||Oi(e)}catch{n=e.cssText}return e.styleSheet.href?Ge(n,e.styleSheet.href):n}else{let n=e.cssText;return Fi(e)&&e.selectorText.includes(":")&&(n=Ai(n)),t?Ge(n,t):n}}function Ai(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Di(e){return"styleSheet"in e}function Fi(e){return"selectorText"in e}var mn=class{constructor(){S(this,"idNodeMap",new Map),S(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const n=(t=this.getMeta(e))==null?void 0:t.id;return n!=null?n:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Pi(){return new mn}function He({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:i}){let s=o||"";const l=r&&de(r);return(t[n.toLowerCase()]||l&&t[l])&&(i?s=i(s,e):s="*".repeat(s.length)),s}function de(e){return e.toLowerCase()}var bn="__rrweb_original__";function Ui(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const i=t.getImageData,s=bn in i?i[bn]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function je(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?de(t):null}function gn(e,t){var n;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch{return null}const o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(n=o==null?void 0:o[1])!==null&&n!==void 0?n:null}function $i(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Bi=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zi=/^(?:[a-z+]+:)?\/\//i,Wi=/^www\..*/i,Hi=/^(data:)([^,]*),(.*)/i;function Ge(e,t){return(e||"").replace(Bi,(n,r,o,i,s,l)=>{const a=o||s||l,c=r||i||"";if(!a)return n;if(zi.test(a)||Wi.test(a))return`url(${c}${a}${c})`;if(Hi.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${$i(t)+a}${c})`;const p=a.split("#")[0],m=a.substring(p.length),h=t.split("#")[0].split("/"),u=p.split("/");h.pop();for(const d of u)d!=="."&&(d===".."?h.pop():h.push(d));return`url(${c}${h.join("/")}${m}${c})`})}function Ve(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ji(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let i=0;if(r.length>1&&e&&typeof e=="string"){let s=Ve(e,n);const l=s.length/e.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const c=Ve(r[a].textContent,n),p=100;let m=3;for(;m<c.length&&(c[m].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,m),1)!==-1);m++);for(;m<c.length;m++){let h=c.substring(0,m),u=s.split(h),d=-1;if(u.length===2)d=u[0].length;else if(u.length>2&&u[0]===""&&r[a-1].textContent!=="")d=s.indexOf(h,1);else if(u.length===1){if(h=h.substring(0,h.length-1),u=s.split(h),u.length<=1)return o.push(e),o;m=101}else m===c.length-1&&(d=s.indexOf(h));if(u.length>=2&&m>p){const f=r[a-1].textContent;if(f&&typeof f=="string"){const g=Ve(f).length;d=s.indexOf(h,g)}d===-1&&(d=u[0].length)}if(d!==-1){let f=Math.floor(d/l);for(;f>0&&f<e.length;){if(i+=1,i>50*r.length)return o.push(e),o;const g=Ve(e.substring(0,f),n);if(g.length===d){o.push(e.substring(0,f)),e=e.substring(f),s=s.substring(d);break}else g.length<d?f+=Math.max(1,Math.floor((d-g.length)/l)):f-=Math.max(1,Math.floor((g.length-d)*l))}break}}}}return o.push(e),o}function Gi(e,t){return ji(e,t).join("/* rr_split */")}var Vi=1,qi=new RegExp("[^a-z0-9-_:]"),Te=-2;function vn(){return Vi++}function Xi(e){if(e instanceof HTMLFormElement)return"form";const t=de(e.tagName);return qi.test(t)?"div":t}var ye,yn,Yi=/^[^ \t\n\r\u000c]+/,Ki=/^[, \t\n\r\u000c]+/;function Ji(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s;const l=i.exec(t.substring(n));return l?(s=l[0],n+=s.length,s):""}const o=[];for(;r(Ki),!(n>=t.length);){let i=r(Yi);if(i.slice(-1)===",")i=Se(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Se(e,i);let l=!1;for(;;){const a=t.charAt(n);if(a===""){o.push((i+s).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){n+=1,o.push((i+s).trim());break}else a==="("&&(l=!0);s+=a,n+=1}}}return o.join(", ")}var Sn=new WeakMap;function Se(e,t){return!t||t.trim()===""?t:Mt(e,t)}function Zi(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Mt(e,t){let n=Sn.get(e);if(n||(n=e.createElement("a"),Sn.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function wn(e,t,n,r){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(t)?Se(e,r):n==="srcset"?Ji(e,r):n==="style"?Ge(r,Mt(e)):t==="object"&&n==="data"?Se(e,r):r)}function xn(e,t,n){return["video","audio"].includes(e)&&t==="autoplay"}function Qi(e,t,n){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function qe(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?qe(M.parentNode(e),t,n):!1;for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}return n?qe(M.parentNode(e),t,n):!1}function kn(e,t,n,r){let o;if(pn(e)){if(o=e,!M.childNodes(o).length)return!1}else{if(M.parentElement(e)===null)return!1;o=M.parentElement(e)}try{if(typeof t=="string"){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(qe(o,t,r))return!0;if(n){if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}}catch{}return!1}function es(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const l=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(l),o=!0,t()});return}const s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ts(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const i=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(i),r=!0,t()})}function ns(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:s,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:p,dataURLOptions:m={},inlineImages:h,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:f=!1,cssCaptured:g=!1}=t,v=rs(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:e.compatMode}:{type:H.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return is(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:a,maskInputFn:p,dataURLOptions:m,inlineImages:h,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:f,rootId:v});case e.TEXT_NODE:return os(e,{doc:n,needsMask:s,maskTextFn:c,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:H.Comment,textContent:M.textContent(e)||"",rootId:v};default:return!1}}function rs(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function os(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,s=M.parentNode(e),l=s&&s.tagName;let a="";const c=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0;return p?a="SCRIPT_PLACEHOLDER":i||(a=M.textContent(e),c&&a&&(a=Ge(a,Mt(t.doc)))),!c&&!p&&a&&n&&(a=r?r(a,M.parentElement(e)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:o}}function is(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:h=!1,rootId:u}=t,d=Qi(e,r,o),f=Xi(e);let g={};const v=e.attributes.length;for(let y=0;y<v;y++){const k=e.attributes[y];xn(f,k.name,k.value)||(g[k.name]=wn(n,f,de(k.name),k.value))}if(f==="link"&&i){const y=Array.from(n.styleSheets).find(E=>E.href===e.href);let k=null;y&&(k=Ct(y)),k&&(delete g.rel,delete g.href,g._cssText=k)}if(f==="style"&&e.sheet){let y=Ct(e.sheet);y&&(e.childNodes.length>1&&(y=Gi(y,e)),g._cssText=y)}if(["input","textarea","select"].includes(f)){const y=e.value,k=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&y?g.value=He({element:e,type:je(e),tagName:f,value:y,maskInputOptions:s,maskInputFn:l}):k&&(g.checked=k)}if(f==="option"&&(e.selected&&!s.select?g.selected=!0:delete g.selected),f==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&p){if(e.__context==="2d")Ui(e)||(g.rr_dataURL=e.toDataURL(a.type,a.quality));else if(!("__context"in e)){const y=e.toDataURL(a.type,a.quality),k=n.createElement("canvas");k.width=e.width,k.height=e.height,y!==k.toDataURL(a.type,a.quality)&&(g.rr_dataURL=y)}}if(f==="img"&&c){ye||(ye=n.createElement("canvas"),yn=ye.getContext("2d"));const y=e,k=y.currentSrc||y.getAttribute("src")||"<unknown-src>",E=y.crossOrigin,C=()=>{y.removeEventListener("load",C);try{ye.width=y.naturalWidth,ye.height=y.naturalHeight,yn.drawImage(y,0,0),g.rr_dataURL=ye.toDataURL(a.type,a.quality)}catch(T){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?C():y.addEventListener("load",C);return}else console.warn(`Cannot inline img src=${k}! Error: ${T}`)}y.crossOrigin==="anonymous"&&(E?g.crossOrigin=E:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?C():y.addEventListener("load",C)}if(["audio","video"].includes(f)){const y=g;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),d){const{width:y,height:k}=e.getBoundingClientRect();g={class:g.class,rr_width:`${y}px`,rr_height:`${k}px`}}f==="iframe"&&!m(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(f)&&(b=!0)}catch{}return{type:H.Element,tagName:f,attributes:g,childNodes:[],isSVG:Zi(e)||void 0,needBlock:d,rootId:u,isCustom:b}}function $(e){return e==null?"":e.toLowerCase()}function Cn(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function ss(e,t){if(t.comment&&e.type===H.Comment)return!0;if(e.type===H.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&gn(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&($(e.attributes.name).match(/^msapplication-tile(image|color)$/)||$(e.attributes.name)==="application-name"||$(e.attributes.rel)==="icon"||$(e.attributes.rel)==="apple-touch-icon"||$(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&$(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&($(e.attributes.property).match(/^(og|twitter|fb):/)||$(e.attributes.name).match(/^(og|twitter):/)||$(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&($(e.attributes.name)==="robots"||$(e.attributes.name)==="googlebot"||$(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&($(e.attributes.name)==="author"||$(e.attributes.name)==="generator"||$(e.attributes.name)==="framework"||$(e.attributes.name)==="publisher"||$(e.attributes.name)==="progid"||$(e.attributes.property).match(/^article:/)||$(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&($(e.attributes.name)==="google-site-verification"||$(e.attributes.name)==="yandex-verification"||$(e.attributes.name)==="csrf-token"||$(e.attributes.name)==="p:domain_verify"||$(e.attributes.name)==="verify-v1"||$(e.attributes.name)==="verification"||$(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function we(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:c=!0,maskInputOptions:p={},maskTextFn:m,maskInputFn:h,slimDOMOptions:u,dataURLOptions:d={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:T=!1,cssCaptured:w=!1}=t;let{needsMask:L}=t,{preserveWhiteSpace:x=!0}=t;L||(L=kn(e,s,l,L===void 0));const D=ns(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:L,inlineStylesheet:c,maskInputOptions:p,maskTextFn:m,maskInputFn:h,dataURLOptions:d,inlineImages:f,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:T,cssCaptured:w});if(!D)return console.warn(e,"not serialized"),null;let j;r.hasNode(e)?j=r.getId(e):ss(D,u)||!x&&D.type===H.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?j=Te:j=vn();const R=Object.assign(D,{id:j});if(r.add(e,R),j===Te)return null;v&&v(e);let ne=!a;if(R.type===H.Element){ne=ne&&!R.needBlock,delete R.needBlock;const _=M.shadowRoot(e);_&&Re(_)&&(R.isShadowHost=!0)}if((R.type===H.Document||R.type===H.Element)&&ne){u.headWhitespace&&R.type===H.Element&&R.tagName==="head"&&(x=!1);const _={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:L,maskTextClass:s,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:u,dataURLOptions:d,inlineImages:f,recordCanvas:g,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:C,cssCaptured:!1};if(!(R.type===H.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===H.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(_.cssCaptured=!0);for(const ee of Array.from(M.childNodes(e))){const G=we(ee,_);G&&R.childNodes.push(G)}}let F=null;if(pn(e)&&(F=M.shadowRoot(e)))for(const ee of Array.from(M.childNodes(F))){const G=we(ee,_);G&&(Re(F)&&(G.isShadow=!0),R.childNodes.push(G))}}const J=M.parentNode(e);return J&&_e(J)&&Re(J)&&(R.isShadow=!0),R.type===H.Element&&R.tagName==="iframe"&&es(e,()=>{const _=e.contentDocument;if(_&&b){const F=we(_,{doc:_,mirror:r,blockClass:o,blockSelector:i,needsMask:L,maskTextClass:s,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:u,dataURLOptions:d,inlineImages:f,recordCanvas:g,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:C});F&&b(e,F)}},y),R.type===H.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&gn(R.attributes.href)==="css")&&ts(e,()=>{if(k){const _=we(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:L,maskTextClass:s,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:u,dataURLOptions:d,inlineImages:f,recordCanvas:g,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:k,stylesheetLoadTimeout:E,keepIframeSrcFn:C});_&&k(e,_)}},E),R}function as(e,t){const{mirror:n=new mn,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:c=!1,maskAllInputs:p=!1,maskTextFn:m,maskInputFn:h,slimDOM:u=!1,dataURLOptions:d,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:k,keepIframeSrcFn:E=()=>!1}=t;return we(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:l,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:m,maskInputFn:h,slimDOMOptions:Cn(u),dataURLOptions:d,inlineImages:a,recordCanvas:c,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:k,keepIframeSrcFn:E,newlyAddedElement:!1})}var ls=class ar{constructor(...t){S(this,"parentElement",null),S(this,"parentNode",null),S(this,"ownerDocument"),S(this,"firstChild",null),S(this,"lastChild",null),S(this,"previousSibling",null),S(this,"nextSibling",null),S(this,"ELEMENT_NODE",1),S(this,"TEXT_NODE",3),S(this,"nodeType"),S(this,"nodeName"),S(this,"RRNodeType")}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof ar){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function V(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var xe=`Please stop import mirror directly. Instead of that,\r
|
|
776
597
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
777
|
-
or you can use record.mirror to access the mirror instance during recording.`,Zn={map:{},getId(){return console.error(Be),-1},getNode(){return console.error(Be),null},removeNodeFromMap(){console.error(Be)},has(){return console.error(Be),!1},reset(){console.error(Be)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Zn=new Proxy(Zn,{get(e,t,r){return t==="map"&&console.error(Be),Reflect.get(e,t,r)}}));function it(e,t,r={}){let n=null,o=0;return function(...i){const a=Date.now();!o&&r.leading===!1&&(o=a);const l=t-(a-o),s=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),o=a,e.apply(s,i)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(s,i)},l))}}function It(e,t,r,n,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>It(e,t,i||{},!0)}function Qn(e){var t,r,n,o;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((t=I.parentElement(i.body))==null?void 0:t.scrollLeft)||((r=i==null?void 0:i.body)==null?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((n=I.parentElement(i.body))==null?void 0:n.scrollTop)||((o=i==null?void 0:i.body)==null?void 0:o.scrollTop)||0}}function eo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function to(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ro(e){return e?e.nodeType===e.ELEMENT_NODE?e:I.parentElement(e):null}function te(e,t,r,n){if(!e)return!1;const o=ro(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||n&&o.closest("."+t)!==null)return!0}else if(Mt(o,t,n))return!0}catch{}return!!(r&&(o.matches(r)||n&&o.closest(r)!==null))}function xc(e,t){return t.getId(e)!==-1}function mr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===ot}function no(e,t){if(rt(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=I.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?no(n,t):!0}function br(e){return!!e.changedTouches}function Ec(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function oo(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function io(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function gr(e){return e?e instanceof Sc&&"shadowRoot"in e?!!e.shadowRoot:!!I.shadowRoot(e):!1}var Cc=class{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!==null&&t!==void 0?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function ao(e){var t;let r=null;return"getRootNode"in e&&((t=I.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&I.host(I.getRootNode(e))&&(r=I.host(I.getRootNode(e))),r}function kc(e){let t=e,r;for(;r=ao(t);)t=r;return t}function Mc(e){const t=I.ownerDocument(e);if(!t)return!1;const r=kc(e);return I.contains(t,r)}function so(e){const t=I.ownerDocument(e);return t?I.contains(t,e)||Mc(e):!1}function lo(e){return"__ln"in e}var Ic=class{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&lo(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&lo(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},co=(e,t)=>`${e}@${t}`,Rc=class{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Ic,n=l=>{let s=l,u=ot;for(;u===ot;)s=s&&s.nextSibling,u=s&&this.mirror.getId(s);return u},o=l=>{const s=I.parentNode(l);if(!s||!so(l))return;let u=!1;if(l.nodeType===Node.TEXT_NODE){const d=s.tagName;if(d==="TEXTAREA")return;d==="STYLE"&&this.addedSet.has(s)&&(u=!0)}const f=rt(s)?this.mirror.getId(ao(l)):this.mirror.getId(s),c=n(l);if(f===-1||c===-1)return r.addNode(l);const b=Ue(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{oo(d,this.mirror)&&this.iframeManager.addIframe(d),io(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),gr(l)&&this.shadowDomManager.addShadowRoot(I.shadowRoot(l),this.doc)},onIframeLoad:(d,h)=>{this.iframeManager.attachIframe(d,h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,h)=>{this.stylesheetManager.attachLinkElement(d,h)},cssCaptured:u});b&&(e.push({parentId:f,nextId:c,node:b}),t.add(b.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)uo(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(I.parentNode(l))||o(l);for(const l of this.addedSet)!fo(this.droppedSet,l)&&!uo(this.removesSubTreeCache,l,this.mirror)||fo(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;r.length;){let l=null;if(i){const s=this.mirror.getId(I.parentNode(i.value)),u=n(i.value);s!==-1&&u!==-1&&(l=i)}if(!l){let s=r.tail;for(;s;){const u=s;if(s=s.previous,u){const f=this.mirror.getId(I.parentNode(u.value));if(n(u.value)===-1)continue;if(f!==-1){l=u;break}else{const c=u.value,b=I.parentNode(c);if(b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const d=I.host(b);if(this.mirror.getId(d)!==-1){l=u;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}i=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const s=l.node,u=I.parentNode(s);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(s),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:s}=l;if(typeof s.style=="string"){const u=JSON.stringify(l.styleDiff),f=JSON.stringify(l._unchangedStyles);u.length<s.style.length&&(u+f).split("var(").length===s.style.split("var(").length&&(s.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:s}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(a))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(I.childNodes(e),n=>I.textContent(n)||"").join("");t.attributes.value=xt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Et(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!mr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=I.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Kn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ro(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if(r==="value"){const i=Et(t);n=xt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:i,value:n,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(n))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Yn(t.tagName,r))if(o.attributes[r]=Xn(this.doc,ke(t.tagName),ke(r),n),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");e.oldValue&&i.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),s=t.style.getPropertyPriority(a);l!==i.style.getPropertyValue(a)||s!==i.style.getPropertyPriority(a)?s===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,s]:o._unchangedStyles[a]=[l,s]}for(const a of Array.from(i.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":if(te(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),n=rt(e.target)?this.mirror.getId(I.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||mr(t,this.mirror,this.slimDOMOptions)||!xc(t,this.mirror)||(this.addedSet.has(t)?(vr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||no(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[co(r,n)]?vr(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:rt(e.target)&&nt(e.target)?!0:void 0}),Tc(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(mr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[co(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(I.childNodes(e).forEach(r=>this.genAdds(r)),gr(e)&&I.childNodes(I.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function vr(e,t){e.delete(t),I.childNodes(t).forEach(r=>vr(e,r))}function Tc(e,t){const r=[e];for(;r.length;){const n=r.pop();t.has(n)||(t.add(n),I.childNodes(n).forEach(o=>r.push(o)))}}function uo(e,t,r){return e.size===0?!1:Nc(e,t)}function Nc(e,t,r){const n=I.parentNode(t);return n?e.has(n):!1}function fo(e,t){return e.size===0?!1:ho(e,t)}function ho(e,t){const r=I.parentNode(t);return r?e.has(r)?!0:ho(e,r):!1}var at;function _c(e){at=e}function Lc(){at=void 0}var D=e=>at?(...r)=>{try{return e(...r)}catch(n){if(at&&at(n)===!0)return;throw n}}:e,Me=[];function st(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function po(e,t){const r=new Rc;Me.push(r),r.init(e);const[n,o]=Bn(),i=new n(D(r.processMutations.bind(r)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[i,o]}function Ac({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const s=it(D(c=>{const b=Date.now()-l;e(a.map(d=>(d.timeOffset-=b,d)),c),a=[],l=null}),i),u=D(it(D(c=>{const b=st(c),{clientX:d,clientY:h}=br(c)?c.changedTouches[0]:c;l||(l=tt()),a.push({x:d,y:h,id:n.getId(b),timeOffset:tt()-l}),s(typeof DragEvent!="undefined"&&c instanceof DragEvent?O.Drag:c instanceof MouseEvent?O.MouseMove:O.TouchMove)}),o,{trailing:!1})),f=[ee("mousemove",u,r),ee("touchmove",u,r),ee("drag",u,r)];return D(()=>{f.forEach(c=>c())})}function Oc({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[];let s=null;const u=f=>c=>{const b=st(c);if(te(b,n,o,!0))return;let d=null,h=f;if("pointerType"in c){switch(c.pointerType){case"mouse":d=ge.Mouse;break;case"touch":d=ge.Touch;break;case"pen":d=ge.Pen}d===ge.Touch?re[f]===re.MouseDown?h="TouchStart":re[f]===re.MouseUp&&(h="TouchEnd"):ge.Pen}else br(c)&&(d=ge.Touch);d!==null?(s=d,(h.startsWith("Touch")&&d===ge.Touch||h.startsWith("Mouse")&&d===ge.Mouse)&&(d=null)):re[f]===re.Click&&(d=s,s=null);const m=br(c)?c.changedTouches[0]:c;if(!m)return;const p=r.getId(b),{clientX:y,clientY:g}=m;D(e)({type:re[h],id:p,x:y,y:g,...d!==null&&{pointerType:d}})};return Object.keys(re).filter(f=>Number.isNaN(Number(f))&&!f.endsWith("_Departed")&&a[f]!==!1).forEach(f=>{let c=ke(f);const b=u(f);if(window.PointerEvent)switch(re[f]){case re.MouseDown:case re.MouseUp:c=c.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}l.push(ee(c,b,t))}),D(()=>{l.forEach(f=>f())})}function mo({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:i}){return ee("scroll",D(it(D(a=>{const l=st(a);if(!l||te(l,n,o,!0))return;const s=r.getId(l);if(l===t&&t.defaultView){const u=Qn(t.defaultView);e({id:s,x:u.left,y:u.top})}else e({id:s,x:l.scrollLeft,y:l.scrollTop})}),i.scroll||100)),t)}function Dc({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return ee("resize",D(it(D(()=>{const o=eo(),i=to();(r!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),r=o,n=i)}),200)),t)}var Fc=["INPUT","TEXTAREA","SELECT"],bo=new WeakMap;function Pc({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:l,maskInputFn:s,sampling:u,userTriggeredOnInput:f}){function c(y){let g=st(y);const v=y.isTrusted,w=g&&g.tagName;if(g&&w==="OPTION"&&(g=I.parentElement(g)),!g||!w||Fc.indexOf(w)<0||te(g,n,o,!0)||g.classList.contains(i)||a&&g.matches(a))return;let C=g.value,E=!1;const T=Et(g)||"";T==="radio"||T==="checkbox"?E=g.checked:(l[w.toLowerCase()]||l[T])&&(C=xt({element:g,maskInputOptions:l,tagName:w,type:T,value:C,maskInputFn:s})),b(g,f?{text:C,isChecked:E,userTriggered:v}:{text:C,isChecked:E});const L=g.name;T==="radio"&&L&&E&&t.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(k=>{if(k!==g){const x=k.value;b(k,f?{text:x,isChecked:!E,userTriggered:!1}:{text:x,isChecked:!E})}})}function b(y,g){const v=bo.get(y);if(!v||v.text!==g.text||v.isChecked!==g.isChecked){bo.set(y,g);const w=r.getId(y);D(e)({...g,id:w})}}const d=(u.input==="last"?["change"]:["input","change"]).map(y=>ee(y,D(c),t)),h=t.defaultView;if(!h)return()=>{d.forEach(y=>y())};const m=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),p=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...p.map(y=>It(y[0],y[1],{set(){D(c)({target:this,isTrusted:!1})}},!1,h))),D(()=>{d.forEach(y=>y())})}function Rt(e){const t=[];function r(n,o){if(Tt("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Tt("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Tt("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Tt("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const i=Array.from(n.parentRule.cssRules).indexOf(n);return o.unshift(i),r(n.parentRule,o)}else if(n.parentStyleSheet){const i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(i)}return o}return r(e,t)}function Se(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function Uc({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:D((f,c,b)=>{const[d,h]=b,{id:m,styleId:p}=Se(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,adds:[{rule:d,index:h}]}),f.apply(c,b)})}),n.CSSStyleSheet.prototype.addRule=function(f,c,b=this.cssRules.length){const d=`${f} { ${c} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[d,b])};const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:D((f,c,b)=>{const[d]=b,{id:h,styleId:m}=Se(c,t,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:d}]}),f.apply(c,b)})}),n.CSSStyleSheet.prototype.removeRule=function(f){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[f])};let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:D((f,c,b)=>{const[d]=b,{id:h,styleId:m}=Se(c,t,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:d}),f.apply(c,b)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:D((f,c,b)=>{const[d]=b,{id:h,styleId:m}=Se(c,t,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:d}),f.apply(c,b)})}));const s={};Nt("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(Nt("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),Nt("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),Nt("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(s).forEach(([f,c])=>{u[f]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(u[f].insertRule,{apply:D((b,d,h)=>{const[m,p]=h,{id:y,styleId:g}=Se(d.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,adds:[{rule:m,index:[...Rt(d),p||0]}]}),b.apply(d,h)})}),c.prototype.deleteRule=new Proxy(u[f].deleteRule,{apply:D((b,d,h)=>{const[m]=h,{id:p,styleId:y}=Se(d.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,removes:[{index:[...Rt(d),m]}]}),b.apply(d,h)})})}),D(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,a&&(n.CSSStyleSheet.prototype.replace=a),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(s).forEach(([f,c])=>{c.prototype.insertRule=u[f].insertRule,c.prototype.deleteRule=u[f].deleteRule})})}function go({mirror:e,stylesheetManager:t},r){var n,o,i;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(I.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(i=(o=r.ownerDocument)==null?void 0:o.defaultView)==null?void 0:i.ShadowRoot,s=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!s?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var u;return(u=s.get)==null?void 0:u.call(this)},set(u){var f;const c=(f=s.set)==null?void 0:f.call(this,u);if(a!==null&&a!==-1)try{t.adoptStyleSheets(u,a)}catch{}return c}}),D(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function Bc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:D((l,s,u)=>{var f;const[c,b,d]=u;if(r.has(c))return i.apply(s,[c,b,d]);const{id:h,styleId:m}=Se((f=s.parentRule)==null?void 0:f.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,set:{property:c,value:b,priority:d},index:Rt(s.parentRule)}),l.apply(s,u)})});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:D((l,s,u)=>{var f;const[c]=u;if(r.has(c))return a.apply(s,[c]);const{id:b,styleId:d}=Se((f=s.parentRule)==null?void 0:f.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||d&&d!==-1)&&e({id:b,styleId:d,remove:{property:c},index:Rt(s.parentRule)}),l.apply(s,u)})}),D(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a})}function zc({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:o,doc:i}){const a=D(s=>it(D(u=>{const f=st(u);if(!f||te(f,t,r,!0))return;const{currentTime:c,volume:b,muted:d,playbackRate:h,loop:m}=f;e({type:s,id:n.getId(f),currentTime:c,volume:b,muted:d,playbackRate:h,loop:m})}),o.media||500)),l=[ee("play",a(De.Play),i),ee("pause",a(De.Pause),i),ee("seeked",a(De.Seeked),i),ee("volumechange",a(De.VolumeChange),i),ee("ratechange",a(De.RateChange),i)];return D(()=>{l.forEach(s=>s())})}function $c({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(s,u,f){const c=new i(s,u,f);return o.set(c,{family:s,buffer:typeof u!="string",descriptors:f,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),c};const a=Ce(t.fonts,"add",function(l){return function(s){return setTimeout(D(()=>{const u=o.get(s);u&&(e(u),o.delete(s))}),0),l.apply(this,[s])}});return n.push(()=>{r.FontFace=i}),n.push(a),D(()=>{n.forEach(l=>l())})}function Wc(e){const{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:i}=e;let a=!0;const l=D(()=>{const s=t.getSelection();if(!s||a&&(s!=null&&s.isCollapsed))return;a=s.isCollapsed||!1;const u=[],f=s.rangeCount||0;for(let c=0;c<f;c++){const{startContainer:b,startOffset:d,endContainer:h,endOffset:m}=s.getRangeAt(c);te(b,n,o,!0)||te(h,n,o,!0)||u.push({start:r.getId(b),startOffset:d,end:r.getId(h),endOffset:m})}i({ranges:u})});return l(),ee("selectionchange",l)}function Hc({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Ce(r.customElements,"define",function(n){return function(o,i,a){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return n.apply(this,[o,i,a])}})}function jc(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:s,styleSheetRuleCb:u,styleDeclarationCb:f,canvasMutationCb:c,fontCb:b,selectionCb:d,customElementCb:h}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),o(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),i(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),s(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),u(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),f(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),c(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),b(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),d(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),h(...m)}}function Vc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};jc(e,t);let n,o=()=>{};e.recordDOM&&([n,o]=po(e,e.doc));const i=Ac(e),a=Oc(e),l=mo(e),s=Dc(e,{win:r}),u=Pc(e),f=zc(e);let c=()=>{},b=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(c=Uc(e,{win:r}),b=go(e,e.doc),d=Bc(e,{win:r}),e.collectFonts&&(h=$c(e)));const m=Wc(e),p=Hc(e),y=[];for(const g of e.plugins)y.push(g.observer(g.callback,r,g.options));return D(()=>{Me.forEach(g=>g.reset()),n==null||n.disconnect(),o(),i(),a(),l(),s(),u(),f(),c(),b(),d(),h(),m(),p(),y.forEach(g=>g())})}function Tt(e){return typeof window[e]!="undefined"}function Nt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var vo=class{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){const o=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,n))}getRemoteId(e,t,r){const n=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=n.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(n=>this.getRemoteId(e,n,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Gc=class{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new vo(Vn)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vo(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case P.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:P.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case P.Meta:case P.Load:case P.DomContentLoaded:return!1;case P.Plugin:return t;case P.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case P.IncrementalSnapshot:switch(t.data.source){case O.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(n.node,o)}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case O.Drag:case O.TouchMove:case O.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(t.data,e,["id"]),t;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case O.Font:return t;case O.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),t;case O.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(const o of n)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==K.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},qc=class{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!nt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const[r]=po({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mo({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(I.host(e))),this.restoreHandlers.push(go({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ce(e.prototype,"attachShadow",function(n){return function(o){const i=n.call(this,o),a=I.shadowRoot(this);return a&&so(this)&&r.addShadowRoot(a,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xc=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),_t=0;_t<ze.length;_t++)Xc[ze.charCodeAt(_t)]=_t;var Yc=function(e){var t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=ze[t[r]>>2],o+=ze[(t[r]&3)<<4|t[r+1]>>4],o+=ze[(t[r+1]&15)<<2|t[r+2]>>6],o+=ze[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},yo=new Map;function Kc(e,t){let r=yo.get(e);return r||(r=new Map,yo.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var wo=(e,t,r)=>{if(!e||!(xo(e,t)||typeof e=="object"))return;const n=e.constructor.name,o=Kc(r,n);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Lt(e,t,r){if(e instanceof Array)return e.map(n=>Lt(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:Yc(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Lt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Lt(e.data,t,r),e.width,e.height]};if(xo(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:wo(e,t,r)}}return e}var So=(e,t,r)=>e.map(n=>Lt(n,t,r)),xo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof t[n]=="function").find(n=>e instanceof t[n]);function Jc(e,t,r,n){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Ce(t.CanvasRenderingContext2D.prototype,a,function(s){return function(...u){return te(this.canvas,r,n,!0)||setTimeout(()=>{const f=So(u,t,this);e(this.canvas,{type:Oe["2D"],property:a,args:f})},0),s.apply(this,u)}});o.push(l)}catch{const l=It(t.CanvasRenderingContext2D.prototype,a,{set(s){e(this.canvas,{type:Oe["2D"],property:a,args:[s],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function Zc(e){return e==="experimental-webgl"?"webgl":e}function Eo(e,t,r,n){const o=[];try{const i=Ce(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...s){if(!te(this,t,r,!0)){const u=Zc(l);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(s[0]&&typeof s[0]=="object"){const f=s[0];f.preserveDrawingBuffer||(f.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...s])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(i=>i())}}function Co(e,t,r,n,o,i){const a=[],l=Object.getOwnPropertyNames(e);for(const s of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))try{if(typeof e[s]!="function")continue;const u=Ce(e,s,function(f){return function(...c){const b=f.apply(this,c);if(wo(b,i,this),"tagName"in this.canvas&&!te(this.canvas,n,o,!0)){const d=So(c,i,this),h={type:t,property:s,args:d};r(this.canvas,h)}return b}});a.push(u)}catch{const u=It(e,s,{set(f){r(this.canvas,{type:t,property:s,args:[f],setter:!0})}});a.push(u)}return a}function Qc(e,t,r,n){const o=[];return typeof t.WebGLRenderingContext!="undefined"&&o.push(...Co(t.WebGLRenderingContext.prototype,Oe.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext!="undefined"&&o.push(...Co(t.WebGL2RenderingContext.prototype,Oe.WebGL2,e,r,n,t)),()=>{o.forEach(i=>i())}}var ko=`(function() {
|
|
598
|
+
or you can use record.mirror to access the mirror instance during recording.`,Mn={map:{},getId(){return console.error(xe),-1},getNode(){return console.error(xe),null},removeNodeFromMap(){console.error(xe)},has(){return console.error(xe),!1},reset(){console.error(xe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Mn=new Proxy(Mn,{get(e,t,n){return t==="map"&&console.error(xe),Reflect.get(e,t,n)}}));function Le(e,t,n={}){let r=null,o=0;return function(...i){const s=Date.now();!o&&n.leading===!1&&(o=s);const l=t-(s-o),a=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=s,e.apply(a,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(a,i)},l))}}function Xe(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Xe(e,t,i||{},!0)}function En(e){var t,n,r,o;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:i.documentElement.scrollLeft||(i==null?void 0:i.body)&&((t=M.parentElement(i.body))==null?void 0:t.scrollLeft)||((n=i==null?void 0:i.body)==null?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(i==null?void 0:i.documentElement.scrollTop)||(i==null?void 0:i.body)&&((r=M.parentElement(i.body))==null?void 0:r.scrollTop)||((o=i==null?void 0:i.body)==null?void 0:o.scrollTop)||0}}function In(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function _n(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Rn(e){return e?e.nodeType===e.ELEMENT_NODE?e:M.parentElement(e):null}function q(e,t,n,r){if(!e)return!1;const o=Rn(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(qe(o,t,r))return!0}catch{}return!!(n&&(o.matches(n)||r&&o.closest(n)!==null))}function cs(e,t){return t.getId(e)!==-1}function Et(e,t,n){return e.tagName==="TITLE"&&n.headTitleMutations?!0:t.getId(e)===Te}function Tn(e,t){if(_e(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=M.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?Tn(r,t):!0}function It(e){return!!e.changedTouches}function us(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ln(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Nn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _t(e){return e?e instanceof ls&&"shadowRoot"in e?!!e.shadowRoot:!!M.shadowRoot(e):!1}var ds=class{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!==null&&t!==void 0?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function On(e){var t;let n=null;return"getRootNode"in e&&((t=M.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&M.host(M.getRootNode(e))&&(n=M.host(M.getRootNode(e))),n}function fs(e){let t=e,n;for(;n=On(t);)t=n;return t}function ps(e){const t=M.ownerDocument(e);if(!t)return!1;const n=fs(e);return M.contains(t,n)}function An(e){const t=M.ownerDocument(e);return t?M.contains(t,e)||ps(e):!1}function Dn(e){return"__ln"in e}var hs=class{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Dn(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Dn(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Fn=(e,t)=>`${e}@${t}`,ms=class{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new hs,r=l=>{let a=l,c=Te;for(;c===Te;)a=a&&a.nextSibling,c=a&&this.mirror.getId(a);return c},o=l=>{const a=M.parentNode(l);if(!a||!An(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const u=a.tagName;if(u==="TEXTAREA")return;u==="STYLE"&&this.addedSet.has(a)&&(c=!0)}const p=_e(a)?this.mirror.getId(On(l)):this.mirror.getId(a),m=r(l);if(p===-1||m===-1)return n.addNode(l);const h=we(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:u=>{Ln(u,this.mirror)&&this.iframeManager.addIframe(u),Nn(u,this.mirror)&&this.stylesheetManager.trackLinkElement(u),_t(l)&&this.shadowDomManager.addShadowRoot(M.shadowRoot(l),this.doc)},onIframeLoad:(u,d)=>{this.iframeManager.attachIframe(u,d),this.shadowDomManager.observeAttachShadow(u)},onStylesheetLoad:(u,d)=>{this.stylesheetManager.attachLinkElement(u,d)},cssCaptured:c});h&&(e.push({parentId:p,nextId:m,node:h}),t.add(h.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Pn(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(M.parentNode(l))||o(l);for(const l of this.addedSet)!Un(this.droppedSet,l)&&!Pn(this.removesSubTreeCache,l,this.mirror)||Un(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;n.length;){let l=null;if(i){const a=this.mirror.getId(M.parentNode(i.value)),c=r(i.value);a!==-1&&c!==-1&&(l=i)}if(!l){let a=n.tail;for(;a;){const c=a;if(a=a.previous,c){const p=this.mirror.getId(M.parentNode(c.value));if(r(c.value)===-1)continue;if(p!==-1){l=c;break}else{const m=c.value,h=M.parentNode(m);if(h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const u=M.host(h);if(this.mirror.getId(u)!==-1){l=c;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}i=l.previous,n.removeNode(l.value),o(l.value)}const s={texts:this.texts.map(l=>{const a=l.node,c=M.parentNode(a);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(a),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:a}=l;if(typeof a.style=="string"){const c=JSON.stringify(l.styleDiff),p=JSON.stringify(l._unchangedStyles);c.length<a.style.length&&(c+p).split("var(").length===a.style.split("var(").length&&(a.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:a}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(s))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const n=Array.from(M.childNodes(e),r=>M.textContent(r)||"").join("");t.attributes.value=He({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:je(e),value:n,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Et(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=M.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:kn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Rn(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if(n==="value"){const i=je(t);r=He({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:i,value:r,maskInputFn:this.maskInputFn})}if(q(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r))if(!t.contentDocument)n="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!xn(t.tagName,n))if(o.attributes[n]=wn(this.doc,de(t.tagName),de(n),r),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");e.oldValue&&i.setAttribute("style",e.oldValue);for(const s of Array.from(t.style)){const l=t.style.getPropertyValue(s),a=t.style.getPropertyPriority(s);l!==i.style.getPropertyValue(s)||a!==i.style.getPropertyPriority(s)?a===""?o.styleDiff[s]=l:o.styleDiff[s]=[l,a]:o._unchangedStyles[s]=[l,a]}for(const s of Array.from(i.style))t.style.getPropertyValue(s)===""&&(o.styleDiff[s]=!1)}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":if(q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=_e(e.target)?this.mirror.getId(M.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,!1)||Et(t,this.mirror,this.slimDOMOptions)||!cs(t,this.mirror)||(this.addedSet.has(t)?(Rt(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||Tn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fn(n,r)]?Rt(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:_e(e.target)&&Re(e.target)?!0:void 0}),bs(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Et(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Fn(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,!1)||(M.childNodes(e).forEach(n=>this.genAdds(n)),_t(e)&&M.childNodes(M.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Rt(e,t){e.delete(t),M.childNodes(t).forEach(n=>Rt(e,n))}function bs(e,t){const n=[e];for(;n.length;){const r=n.pop();t.has(r)||(t.add(r),M.childNodes(r).forEach(o=>n.push(o)))}}function Pn(e,t,n){return e.size===0?!1:gs(e,t)}function gs(e,t,n){const r=M.parentNode(t);return r?e.has(r):!1}function Un(e,t){return e.size===0?!1:$n(e,t)}function $n(e,t){const n=M.parentNode(t);return n?e.has(n)?!0:$n(e,n):!1}var Ne;function vs(e){Ne=e}function ys(){Ne=void 0}var O=e=>Ne?(...n)=>{try{return e(...n)}catch(r){if(Ne&&Ne(r)===!0)return;throw r}}:e,fe=[];function Oe(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Bn(e,t){const n=new ms;fe.push(n),n.init(e);const[r,o]=fn(),i=new r(O(n.processMutations.bind(n)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[i,o]}function Ss({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],l;const a=Le(O(m=>{const h=Date.now()-l;e(s.map(u=>(u.timeOffset-=h,u)),m),s=[],l=null}),i),c=O(Le(O(m=>{const h=Oe(m),{clientX:u,clientY:d}=It(m)?m.changedTouches[0]:m;l||(l=Ie()),s.push({x:u,y:d,id:r.getId(h),timeOffset:Ie()-l}),a(typeof DragEvent!="undefined"&&m instanceof DragEvent?N.Drag:m instanceof MouseEvent?N.MouseMove:N.TouchMove)}),o,{trailing:!1})),p=[V("mousemove",c,n),V("touchmove",c,n),V("drag",c,n)];return O(()=>{p.forEach(m=>m())})}function ws({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const s=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,l=[];let a=null;const c=p=>m=>{const h=Oe(m);if(q(h,r,o,!0))return;let u=null,d=p;if("pointerType"in m){switch(m.pointerType){case"mouse":u=ie.Mouse;break;case"touch":u=ie.Touch;break;case"pen":u=ie.Pen}u===ie.Touch?X[p]===X.MouseDown?d="TouchStart":X[p]===X.MouseUp&&(d="TouchEnd"):ie.Pen}else It(m)&&(u=ie.Touch);u!==null?(a=u,(d.startsWith("Touch")&&u===ie.Touch||d.startsWith("Mouse")&&u===ie.Mouse)&&(u=null)):X[p]===X.Click&&(u=a,a=null);const f=It(m)?m.changedTouches[0]:m;if(!f)return;const g=n.getId(h),{clientX:v,clientY:b}=f;O(e)({type:X[d],id:g,x:v,y:b,...u!==null&&{pointerType:u}})};return Object.keys(X).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&s[p]!==!1).forEach(p=>{let m=de(p);const h=c(p);if(window.PointerEvent)switch(X[p]){case X.MouseDown:case X.MouseUp:m=m.replace("mouse","pointer");break;case X.TouchStart:case X.TouchEnd:return}l.push(V(m,h,t))}),O(()=>{l.forEach(p=>p())})}function zn({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return V("scroll",O(Le(O(s=>{const l=Oe(s);if(!l||q(l,r,o,!0))return;const a=n.getId(l);if(l===t&&t.defaultView){const c=En(t.defaultView);e({id:a,x:c.left,y:c.top})}else e({id:a,x:l.scrollLeft,y:l.scrollTop})}),i.scroll||100)),t)}function xs({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return V("resize",O(Le(O(()=>{const o=In(),i=_n();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200)),t)}var ks=["INPUT","TEXTAREA","SELECT"],Wn=new WeakMap;function Cs({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,ignoreSelector:s,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:p}){function m(v){let b=Oe(v);const y=v.isTrusted,k=b&&b.tagName;if(b&&k==="OPTION"&&(b=M.parentElement(b)),!b||!k||ks.indexOf(k)<0||q(b,r,o,!0)||b.classList.contains(i)||s&&b.matches(s))return;let E=b.value,C=!1;const T=je(b)||"";T==="radio"||T==="checkbox"?C=b.checked:(l[k.toLowerCase()]||l[T])&&(E=He({element:b,maskInputOptions:l,tagName:k,type:T,value:E,maskInputFn:a})),h(b,p?{text:E,isChecked:C,userTriggered:y}:{text:E,isChecked:C});const w=b.name;T==="radio"&&w&&C&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(L=>{if(L!==b){const x=L.value;h(L,p?{text:x,isChecked:!C,userTriggered:!1}:{text:x,isChecked:!C})}})}function h(v,b){const y=Wn.get(v);if(!y||y.text!==b.text||y.isChecked!==b.isChecked){Wn.set(v,b);const k=n.getId(v);O(e)({...b,id:k})}}const u=(c.input==="last"?["change"]:["input","change"]).map(v=>V(v,O(m),t)),d=t.defaultView;if(!d)return()=>{u.forEach(v=>v())};const f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),g=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&u.push(...g.map(v=>Xe(v[0],v[1],{set(){O(m)({target:this,isTrusted:!1})}},!1,d))),O(()=>{u.forEach(v=>v())})}function Ye(e){const t=[];function n(r,o){if(Ke("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ke("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ke("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ke("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);return o.unshift(i),n(r.parentRule,o)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function le(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ms({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:O((p,m,h)=>{const[u,d]=h,{id:f,styleId:g}=le(m,t,n.styleMirror);return(f&&f!==-1||g&&g!==-1)&&e({id:f,styleId:g,adds:[{rule:u,index:d}]}),p.apply(m,h)})}),r.CSSStyleSheet.prototype.addRule=function(p,m,h=this.cssRules.length){const u=`${p} { ${m} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[u,h])};const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:O((p,m,h)=>{const[u]=h,{id:d,styleId:f}=le(m,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,removes:[{index:u}]}),p.apply(m,h)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:O((p,m,h)=>{const[u]=h,{id:d,styleId:f}=le(m,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replace:u}),p.apply(m,h)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:O((p,m,h)=>{const[u]=h,{id:d,styleId:f}=le(m,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replaceSync:u}),p.apply(m,h)})}));const a={};Je("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Je("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Je("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Je("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(a).forEach(([p,m])=>{c[p]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(c[p].insertRule,{apply:O((h,u,d)=>{const[f,g]=d,{id:v,styleId:b}=le(u.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,adds:[{rule:f,index:[...Ye(u),g||0]}]}),h.apply(u,d)})}),m.prototype.deleteRule=new Proxy(c[p].deleteRule,{apply:O((h,u,d)=>{const[f]=d,{id:g,styleId:v}=le(u.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...Ye(u),f]}]}),h.apply(u,d)})})}),O(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([p,m])=>{m.prototype.insertRule=c[p].insertRule,m.prototype.deleteRule=c[p].deleteRule})})}function Hn({mirror:e,stylesheetManager:t},n){var r,o,i;let s=null;n.nodeName==="#document"?s=e.getId(n):s=e.getId(M.host(n));const l=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(i=(o=n.ownerDocument)==null?void 0:o.defaultView)==null?void 0:i.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!l||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var p;const m=(p=a.set)==null?void 0:p.call(this,c);if(s!==null&&s!==-1)try{t.adoptStyleSheets(c,s)}catch{}return m}}),O(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Es({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:O((l,a,c)=>{var p;const[m,h,u]=c;if(n.has(m))return i.apply(a,[m,h,u]);const{id:d,styleId:f}=le((p=a.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:m,value:h,priority:u},index:Ye(a.parentRule)}),l.apply(a,c)})});const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:O((l,a,c)=>{var p;const[m]=c;if(n.has(m))return s.apply(a,[m]);const{id:h,styleId:u}=le((p=a.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||u&&u!==-1)&&e({id:h,styleId:u,remove:{property:m},index:Ye(a.parentRule)}),l.apply(a,c)})}),O(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function Is({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:i}){const s=O(a=>Le(O(c=>{const p=Oe(c);if(!p||q(p,t,n,!0))return;const{currentTime:m,volume:h,muted:u,playbackRate:d,loop:f}=p;e({type:a,id:r.getId(p),currentTime:m,volume:h,muted:u,playbackRate:d,loop:f})}),o.media||500)),l=[V("play",s(ve.Play),i),V("pause",s(ve.Pause),i),V("seeked",s(ve.Seeked),i),V("volumechange",s(ve.VolumeChange),i),V("ratechange",s(ve.RateChange),i)];return O(()=>{l.forEach(a=>a())})}function _s({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(a,c,p){const m=new i(a,c,p);return o.set(m,{family:a,buffer:typeof c!="string",descriptors:p,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),m};const s=ue(t.fonts,"add",function(l){return function(a){return setTimeout(O(()=>{const c=o.get(a);c&&(e(c),o.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{n.FontFace=i}),r.push(s),O(()=>{r.forEach(l=>l())})}function Rs(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let s=!0;const l=O(()=>{const a=t.getSelection();if(!a||s&&(a!=null&&a.isCollapsed))return;s=a.isCollapsed||!1;const c=[],p=a.rangeCount||0;for(let m=0;m<p;m++){const{startContainer:h,startOffset:u,endContainer:d,endOffset:f}=a.getRangeAt(m);q(h,r,o,!0)||q(d,r,o,!0)||c.push({start:n.getId(h),startOffset:u,end:n.getId(d),endOffset:f})}i({ranges:c})});return l(),V("selectionchange",l)}function Ts({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:ue(n.customElements,"define",function(r){return function(o,i,s){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return r.apply(this,[o,i,s])}})}function Ls(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:p,canvasMutationCb:m,fontCb:h,selectionCb:u,customElementCb:d}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),n(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),r(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),o(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),i(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),s(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),l(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),a(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),c(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),p(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),m(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),h(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),u(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),d(...f)}}function Ns(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Ls(e,t);let r,o=()=>{};e.recordDOM&&([r,o]=Bn(e,e.doc));const i=Ss(e),s=ws(e),l=zn(e),a=xs(e,{win:n}),c=Cs(e),p=Is(e);let m=()=>{},h=()=>{},u=()=>{},d=()=>{};e.recordDOM&&(m=Ms(e,{win:n}),h=Hn(e,e.doc),u=Es(e,{win:n}),e.collectFonts&&(d=_s(e)));const f=Rs(e),g=Ts(e),v=[];for(const b of e.plugins)v.push(b.observer(b.callback,n,b.options));return O(()=>{fe.forEach(b=>b.reset()),r==null||r.disconnect(),o(),i(),s(),l(),a(),c(),p(),m(),h(),u(),d(),f(),g(),v.forEach(b=>b())})}function Ke(e){return typeof window[e]!="undefined"}function Je(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var jn=class{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Os=class{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new jn(vn)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new jn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:A.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return t;case A.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case A.IncrementalSnapshot:switch(t.data.source){case N.Mutation:return t.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(r.node,o)}),t.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),t.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),t.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case N.Drag:case N.TouchMove:case N.MouseMove:return t.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds(t.data,e,["id"]),t;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case N.Font:return t;case N.Selection:return t.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),t;case N.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==H.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},As=class{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Re(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const[n]=Bn({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(zn({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(M.host(e))),this.restoreHandlers.push(Hn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(ue(e.prototype,"attachShadow",function(r){return function(o){const i=r.call(this,o),s=M.shadowRoot(this);return s&&An(this)&&n.addShadowRoot(s,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ds=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ze=0;Ze<ke.length;Ze++)Ds[ke.charCodeAt(Ze)]=Ze;var Fs=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=ke[t[n]>>2],o+=ke[(t[n]&3)<<4|t[n+1]>>4],o+=ke[(t[n+1]&15)<<2|t[n+2]>>6],o+=ke[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},Gn=new Map;function Ps(e,t){let n=Gn.get(e);return n||(n=new Map,Gn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Vn=(e,t,n)=>{if(!e||!(Xn(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Ps(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function Qe(e,t,n){if(e instanceof Array)return e.map(r=>Qe(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:Fs(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Qe(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Qe(e.data,t,n),e.width,e.height]};if(Xn(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:Vn(e,t,n)}}return e}var qn=(e,t,n)=>e.map(r=>Qe(r,t,n)),Xn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]);function Us(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;const l=ue(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...c){return q(this.canvas,n,r,!0)||setTimeout(()=>{const p=qn(c,t,this);e(this.canvas,{type:ge["2D"],property:s,args:p})},0),a.apply(this,c)}});o.push(l)}catch{const l=Xe(t.CanvasRenderingContext2D.prototype,s,{set(a){e(this.canvas,{type:ge["2D"],property:s,args:[a],setter:!0})}});o.push(l)}return()=>{o.forEach(s=>s())}}function $s(e){return e==="experimental-webgl"?"webgl":e}function Yn(e,t,n,r){const o=[];try{const i=ue(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(l,...a){if(!q(this,t,n,!0)){const c=$s(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){const p=a[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[l,...a])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(i=>i())}}function Kn(e,t,n,r,o,i){const s=[],l=Object.getOwnPropertyNames(e);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof e[a]!="function")continue;const c=ue(e,a,function(p){return function(...m){const h=p.apply(this,m);if(Vn(h,i,this),"tagName"in this.canvas&&!q(this.canvas,r,o,!0)){const u=qn(m,i,this),d={type:t,property:a,args:u};n(this.canvas,d)}return h}});s.push(c)}catch{const c=Xe(e,a,{set(p){n(this.canvas,{type:t,property:a,args:[p],setter:!0})}});s.push(c)}return s}function Bs(e,t,n,r){const o=[];return typeof t.WebGLRenderingContext!="undefined"&&o.push(...Kn(t.WebGLRenderingContext.prototype,ge.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext!="undefined"&&o.push(...Kn(t.WebGL2RenderingContext.prototype,ge.WebGL2,e,n,r,t)),()=>{o.forEach(i=>i())}}var Jn=`(function() {
|
|
778
599
|
"use strict";
|
|
779
600
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
780
601
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -849,6 +670,6 @@ or you can use record.mirror to access the mirror instance during recording.`,Zn
|
|
|
849
670
|
};
|
|
850
671
|
})();
|
|
851
672
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
852
|
-
`,Mo=typeof self!="undefined"&&self.Blob&&new Blob([ko],{type:"text/javascript;charset=utf-8"});function eu(e){let t;try{if(t=Mo&&(self.URL||self.webkitURL).createObjectURL(Mo),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ko),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var tu=class{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(l,s)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(s)});const{sampling:t="all",win:r,blockClass:n,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&t==="all"&&this.initCanvasMutationObserver(r,n,o),i&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,n,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,o){const i=Eo(t,r,n,!0),a=new Map,l=new eu;l.onmessage=d=>{const{id:h}=d.data;if(a.set(h,!1),!("base64"in d.data))return;const{base64:m,type:p,width:y,height:g}=d.data;this.mutationCb({id:h,type:Oe["2D"],commands:[{property:"clearRect",args:[0,0,y,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:p}]},0,0]}]})};const s=1e3/e;let u=0,f;const c=()=>{const d=[];return t.document.querySelectorAll("canvas").forEach(h=>{te(h,r,n,!0)||d.push(h)}),d},b=d=>{if(u&&d-u<s){f=requestAnimationFrame(b);return}u=d,c().forEach(async h=>{var m;const p=this.mirror.getId(h);if(a.get(p)||h.width===0||h.height===0)return;if(a.set(p,!0),["webgl","webgl2"].includes(h.__context)){const g=h.getContext(h.__context);((m=g==null?void 0:g.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&g.clear(g.COLOR_BUFFER_BIT)}const y=await createImageBitmap(h);l.postMessage({id:p,bitmap:y,width:h.width,height:h.height,dataURLOptions:o.dataURLOptions},[y])}),f=requestAnimationFrame(b)};f=requestAnimationFrame(b),this.resetObservers=()=>{i(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=Eo(e,t,r,!1),o=Jc(this.processMutation.bind(this),e,t,r),i=Qc(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const n=r.map(i=>{const{type:a,...l}=i;return l}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}},ru=class{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new Cc),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},n=[];for(const o of e){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),n.push({styleId:i,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:$n(a,o.href),index:l}))})),r.styleIds.push(i)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},nu=class{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(n=>n!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Y,At,yr,Ot=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((On=e.contentWindow)==null?void 0:On.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var ce=Kl();function lt(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:s="rr-mask",maskTextSelector:u=null,inlineStylesheet:f=!0,maskAllInputs:c,maskInputOptions:b,slimDOMOptions:d,maskInputFn:h,maskTextFn:m,hooks:p,packFn:y,sampling:g={},dataURLOptions:v={},mousemoveWait:w,recordDOM:C=!0,recordCanvas:E=!1,recordCrossOriginIframes:T=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:k=!1,collectFonts:x=!1,inlineImages:A=!1,plugins:V,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:ue=new Set([]),errorHandler:W}=e;_c(W);const N=T?window.parent===window:!0;let z=!1;if(!N)try{window.parent.document&&(z=!1)}catch{z=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!z)return()=>{};w!==void 0&&g.mousemove===void 0&&(g.mousemove=w),ce.reset();const H=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:b!==void 0?b:{password:!0},X=Jn(d);Ec();let Z,Q=0;const de=F=>{for(const oe of V||[])oe.eventProcessor&&(F=oe.eventProcessor(F));return y&&!z&&(F=y(F)),F};Y=(F,oe)=>{var G;const q=F;if(q.timestamp=tt(),(G=Me[0])!=null&&G.isFrozen()&&q.type!==P.FullSnapshot&&!(q.type===P.IncrementalSnapshot&&q.data.source===O.Mutation)&&Me.forEach(J=>J.unfreeze()),N)t==null||t(de(q),oe);else if(z){const J={type:"rrweb",event:de(q),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(J,"*")}if(q.type===P.FullSnapshot)Z=q,Q=0;else if(q.type===P.IncrementalSnapshot){if(q.data.source===O.Mutation&&q.data.isAttachIframe)return;Q++;const J=n&&Q>=n,$=r&&q.timestamp-Z.timestamp>r;(J||$)&&At(!0)}};const ae=F=>{Y({type:P.IncrementalSnapshot,data:{source:O.Mutation,...F}})},fe=F=>Y({type:P.IncrementalSnapshot,data:{source:O.Scroll,...F}}),$e=F=>Y({type:P.IncrementalSnapshot,data:{source:O.CanvasMutation,...F}}),Ie=F=>Y({type:P.IncrementalSnapshot,data:{source:O.AdoptedStyleSheet,...F}}),pe=new ru({mutationCb:ae,adoptedStyleSheetCb:Ie}),ne=new Gc({mirror:ce,mutationCb:ae,stylesheetManager:pe,recordCrossOriginIframes:T,wrappedEmit:Y});for(const F of V||[])F.getMirror&&F.getMirror({nodeMirror:ce,crossOriginIframeMirror:ne.crossOriginIframeMirror,crossOriginIframeStyleMirror:ne.crossOriginIframeStyleMirror});const Re=new nu;yr=new tu({recordCanvas:E,mutationCb:$e,win:window,blockClass:o,blockSelector:i,mirror:ce,sampling:g.canvas,dataURLOptions:v});const We=new qc({mutationCb:ae,scrollCb:fe,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:u,inlineStylesheet:f,maskInputOptions:H,dataURLOptions:v,maskTextFn:m,maskInputFn:h,recordCanvas:E,inlineImages:A,sampling:g,slimDOMOptions:X,iframeManager:ne,stylesheetManager:pe,canvasManager:yr,keepIframeSrcFn:R,processedNodeManager:Re},mirror:ce});At=(F=!1)=>{if(!C)return;Y({type:P.Meta,data:{href:window.location.href,width:to(),height:eo()}},F),pe.reset(),We.init(),Me.forEach(G=>G.lock());const oe=wc(document,{mirror:ce,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:u,inlineStylesheet:f,maskAllInputs:H,maskTextFn:m,maskInputFn:h,slimDOM:X,dataURLOptions:v,recordCanvas:E,inlineImages:A,onSerialize:G=>{oo(G,ce)&&ne.addIframe(G),io(G,ce)&&pe.trackLinkElement(G),gr(G)&&We.addShadowRoot(I.shadowRoot(G),document)},onIframeLoad:(G,q)=>{ne.attachIframe(G,q),We.observeAttachShadow(G)},onStylesheetLoad:(G,q)=>{pe.attachLinkElement(G,q)},keepIframeSrcFn:R});if(!oe)return console.warn("Failed to snapshot the document");Y({type:P.FullSnapshot,data:{node:oe,initialOffset:Qn(window)}},F),Me.forEach(G=>G.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&pe.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const F=[],oe=q=>{var J;return D(Vc)({mutationCb:ae,mousemoveCb:($,M)=>Y({type:P.IncrementalSnapshot,data:{source:M,positions:$}}),mouseInteractionCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.MouseInteraction,...$}}),scrollCb:fe,viewportResizeCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.ViewportResize,...$}}),inputCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.Input,...$}}),mediaInteractionCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.MediaInteraction,...$}}),styleSheetRuleCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.StyleSheetRule,...$}}),styleDeclarationCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.StyleDeclaration,...$}}),canvasMutationCb:$e,fontCb:$=>Y({type:P.IncrementalSnapshot,data:{source:O.Font,...$}}),selectionCb:$=>{Y({type:P.IncrementalSnapshot,data:{source:O.Selection,...$}})},customElementCb:$=>{Y({type:P.IncrementalSnapshot,data:{source:O.CustomElement,...$}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:s,maskTextSelector:u,maskInputOptions:H,inlineStylesheet:f,sampling:g,recordDOM:C,recordCanvas:E,inlineImages:A,userTriggeredOnInput:k,collectFonts:x,doc:q,maskInputFn:h,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:X,dataURLOptions:v,mirror:ce,iframeManager:ne,stylesheetManager:pe,shadowDomManager:We,processedNodeManager:Re,canvasManager:yr,ignoreCSSAttributes:ue,plugins:((J=V==null?void 0:V.filter($=>$.observer))==null?void 0:J.map($=>({observer:$.observer,options:$.options,callback:M=>Y({type:P.Plugin,data:{plugin:$.name,payload:M}})})))||[]},p)};ne.addLoadListener(q=>{try{F.push(oe(q.contentDocument))}catch(J){console.warn(J)}});const G=()=>{At(),F.push(oe(document)),Ot=!0};return["interactive","complete"].includes(document.readyState)?G():(F.push(ee("DOMContentLoaded",()=>{Y({type:P.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&G()})),F.push(ee("load",()=>{Y({type:P.Load,data:{}}),L==="load"&&G()},window))),()=>{F.forEach(q=>{try{q()}catch(J){String(J).toLowerCase().includes("cross-origin")||console.warn(J)}}),Re.destroy(),Ot=!1,Lc()}}catch(F){console.warn(F)}}lt.addCustomEvent=(e,t)=>{if(!Ot)throw new Error("please add custom event after start recording");Y({type:P.Custom,data:{tag:e,payload:t}})},lt.freezePage=()=>{Me.forEach(e=>e.freeze())},lt.takeFullSnapshot=e=>{if(!Ot)throw new Error("please take full snapshot after start recording");At(e)},lt.mirror=ce;var Io=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(Io||{}),ou=3e4,iu="[data-fixback-root],[data-fixback-overlay]",au="img,image,svg,video,object,picture,embed,map,audio",su={snapshot:()=>null,stop:()=>{}};function lu(e={},t=lt){let r=[],n=[],o=!1;const i=e.maskText!==!1,a=[iu,...e.blockMedia!==!1?[au]:[],...e.blockSelector?[e.blockSelector]:[]].join(",");let l;try{var s;l=t({emit:(c,b)=>{b&&!o&&(r=n,n=[]),o=b===!0,n.push(c)},checkoutEveryNms:ou,maskAllInputs:!0,...i?{maskTextSelector:(s=e.maskTextSelector)!==null&&s!==void 0?s:"*"}:{},blockSelector:a,slimDOMOptions:"all"})}catch{l=void 0}if(typeof l!="function")return su;const u=l;let f=!0;return{snapshot(){if(!f)return null;const c=[...r,...n];return c.some(b=>b.type===Io.FullSnapshot)?{events:c}:null},stop(){if(f){f=!1;try{u()}catch{}r=[],n=[]}}}}var Ro="https://api.fixback.dev";function cu(e,t){const r=e.replace(/\/+$/,"");return t.startsWith(`${r}/api/ingest/`)||t.startsWith(`${r}/api/invites/`)}var wr={destroy(){}};function uu(){try{const e=window.location;return e.host||e.hostname||"this site"}catch{return"this site"}}function du(){try{return window.location.href}catch{return""}}function fu(e){const{options:t,apiUrl:r,key:n,identity:o,display:i,target:a,answer:l}=e,s=t.release?ji(t.release):void 0;t.release&&!s&&console.warn(`[fixback] ignoring invalid release ${JSON.stringify(t.release)} — use 1-100 visible characters with no whitespace or slashes (e.g. a git SHA or semver).`);const u=ll(a,{key:n,reduceMotion:t.reduceMotion});let f=null,c=()=>{};if(t.trace!==!1){var b,d,h,m,p;const L=(b=t.trace)!==null&&b!==void 0?b:{},k=e.answer.capture,x=(d=(h=t.capture)===null||h===void 0?void 0:h.console)!==null&&d!==void 0?d:typeof(k==null?void 0:k.console)=="boolean"?k.console:!0,A=(m=(p=t.capture)===null||p===void 0?void 0:p.network)!==null&&m!==void 0?m:typeof(k==null?void 0:k.network)=="boolean"?k.network:!0;f=hi({budgets:L.budgets,maxAgeMs:L.maxAgeMs,beforeBreadcrumb:L.beforeBreadcrumb}),c=Ui(f,{consoleLevels:L.consoleLevels,ignoreUrl:V=>cu(r,V),captureConsole:x,captureNetwork:A})}let y=null;if(t.replay!==!1){var g,v;const L=e.answer.capture;if((g=(v=t.capture)===null||v===void 0?void 0:v.replay)!==null&&g!==void 0?g:typeof(L==null?void 0:L.replay)!="boolean"||L.replay){var w;y=lu((w=t.replay)!==null&&w!==void 0?w:{})}}const C=kl({apiUrl:r,key:n,identity:o,display:i,gate:l.gate,tier:l.tier,sdkVersion:gt,release:s,target:a,buffer:f,replay:y,beforeSend:t.beforeSend,scrub:t.scrub}),E=()=>C.open();u.host.addEventListener(yt,E);let T=()=>{};return t.autoCapture!==!1&&(T=js({apiUrl:r,key:n,identity:o,display:i,sdkVersion:gt,release:s,buffer:f,replay:y,beforeSend:t.beforeSend,scrub:t.scrub}).destroy),()=>{u.host.removeEventListener(yt,E),C.destroy(),cl(u),c(),y==null||y.stop(),T()}}async function To(e,t){try{var r,n,o;if(typeof document=="undefined")return wr;const i=e==null?void 0:e.key;if(typeof i!="string"||i.length===0)return wr;const a=(r=e.apiUrl)!==null&&r!==void 0?r:Ro,l=(n=e.anonymousId)!==null&&n!==void 0?n:Vs(),s=(o=e.target)!==null&&o!==void 0?o:document.body;let u=!1,f=()=>{},c=()=>{};const b={destroy:()=>{u=!0,c(),c=()=>{},f(),f=()=>{}}},d=()=>{var p;const y=lr(i);return{signedIdentity:e.signedIdentity,reporterId:(p=e.reporterId)!==null&&p!==void 0?p:y==null?void 0:y.reporterId,anonymousId:l}},h=()=>{const p=lr(i);if(!p)return;const y={...p.name?{name:p.name}:{},...p.email?{email:p.email}:{}};return y.name||y.email?y:void 0},m=async(p,y)=>{const g=await Ho(a,{key:i,...p});u||!(g!=null&&g.canSubmit)||(f=fu({options:e,apiUrl:a,key:i,identity:p,display:y,target:s,answer:g}))};if(t){const p=await Qs(a,t);if(u)return b;if(p&&p.status==="pending"){const y=lr(i),g=async w=>{const C=await el(a,t);u||(c(),c=()=>{},C&&C.status==="redeemed"?(Ys(i,{reporterId:C.reporterId,name:w.name,email:w.email}),Xs(window),await m({signedIdentity:e.signedIdentity,reporterId:C.reporterId,anonymousId:l},w.name||w.email?w:void 0)):await m(d(),h()))},v=ml({origin:uu(),tier:p.tier,defaults:y?{name:y.name,email:y.email}:void 0,target:s,onConfirm:w=>{g(w)}});return c=()=>v.destroy(),b}}return await m(d(),h()),b}catch{return wr}}function hu(e){return To(e,typeof window!="undefined"?qs(du()):null)}function pu(e){return To(e,typeof(e==null?void 0:e.token)=="string"&&e.token.length>0?e.token:null)}me.DEFAULT_API_URL=Ro,me.LAUNCH_EVENT=yt,me.init=hu,me.redeem=pu});
|
|
673
|
+
`,Zn=typeof self!="undefined"&&self.Blob&&new Blob([Jn],{type:"text/javascript;charset=utf-8"});function zs(e){let t;try{if(t=Zn&&(self.URL||self.webkitURL).createObjectURL(Zn),!t)throw"";const n=new Worker(t,{name:e==null?void 0:e.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Jn),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ws=class{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(l,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)});const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&t==="all"&&this.initCanvasMutationObserver(n,r,o),i&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Yn(t,n,r,!0),s=new Map,l=new zs;l.onmessage=u=>{const{id:d}=u.data;if(s.set(d,!1),!("base64"in u.data))return;const{base64:f,type:g,width:v,height:b}=u.data;this.mutationCb({id:d,type:ge["2D"],commands:[{property:"clearRect",args:[0,0,v,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:g}]},0,0]}]})};const a=1e3/e;let c=0,p;const m=()=>{const u=[];return t.document.querySelectorAll("canvas").forEach(d=>{q(d,n,r,!0)||u.push(d)}),u},h=u=>{if(c&&u-c<a){p=requestAnimationFrame(h);return}c=u,m().forEach(async d=>{var f;const g=this.mirror.getId(d);if(s.get(g)||d.width===0||d.height===0)return;if(s.set(g,!0),["webgl","webgl2"].includes(d.__context)){const b=d.getContext(d.__context);((f=b==null?void 0:b.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const v=await createImageBitmap(d);l.postMessage({id:g,bitmap:v,width:d.width,height:d.height,dataURLOptions:o.dataURLOptions},[v])}),p=requestAnimationFrame(h)};p=requestAnimationFrame(h),this.resetObservers=()=>{i(),cancelAnimationFrame(p)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Yn(e,t,n,!1),o=Us(this.processMutation.bind(this),e,t,n),i=Bs(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;const r=n.map(i=>{const{type:s,...l}=i;return l}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}},Hs=class{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new ds),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const n={id:t,styleIds:[]},r=[];for(const o of e){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),r.push({styleId:i,rules:Array.from(o.rules||CSSRule,(s,l)=>({rule:hn(s,o.href),index:l}))})),n.styleIds.push(i)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},js=class{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(r=>r!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},B,et,Tt,tt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((an=e.contentWindow)==null?void 0:an.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Q=Pi();function Ae(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:h,slimDOMOptions:u,maskInputFn:d,maskTextFn:f,hooks:g,packFn:v,sampling:b={},dataURLOptions:y={},mousemoveWait:k,recordDOM:E=!0,recordCanvas:C=!1,recordCrossOriginIframes:T=!1,recordAfter:w=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:x=!1,inlineImages:D=!1,plugins:j,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:ne=new Set([]),errorHandler:J}=e;vs(J);const _=T?window.parent===window:!0;let F=!1;if(!_)try{window.parent.document&&(F=!1)}catch{F=!0}if(_&&!t)throw new Error("emit function is required");if(!_&&!F)return()=>{};k!==void 0&&b.mousemove===void 0&&(b.mousemove=k),Q.reset();const ee=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h!==void 0?h:{password:!0},G=Cn(u);us();let Y,Ce=0;const pe=P=>{for(const te of j||[])te.eventProcessor&&(P=te.eventProcessor(P));return v&&!F&&(P=v(P)),P};B=(P,te)=>{var z;const W=P;if(W.timestamp=Ie(),(z=fe[0])!=null&&z.isFrozen()&&W.type!==A.FullSnapshot&&!(W.type===A.IncrementalSnapshot&&W.data.source===N.Mutation)&&fe.forEach(K=>K.unfreeze()),_)t==null||t(pe(W),te);else if(F){const K={type:"rrweb",event:pe(W),origin:window.location.origin,isCheckout:te};window.parent.postMessage(K,"*")}if(W.type===A.FullSnapshot)Y=W,Ce=0;else if(W.type===A.IncrementalSnapshot){if(W.data.source===N.Mutation&&W.data.isAttachIframe)return;Ce++;const K=r&&Ce>=r,U=n&&W.timestamp-Y.timestamp>n;(K||U)&&et(!0)}};const ot=P=>{B({type:A.IncrementalSnapshot,data:{source:N.Mutation,...P}})},ir=P=>B({type:A.IncrementalSnapshot,data:{source:N.Scroll,...P}}),sr=P=>B({type:A.IncrementalSnapshot,data:{source:N.CanvasMutation,...P}}),ya=P=>B({type:A.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...P}}),he=new Hs({mutationCb:ot,adoptedStyleSheetCb:ya}),me=new Os({mirror:Q,mutationCb:ot,stylesheetManager:he,recordCrossOriginIframes:T,wrappedEmit:B});for(const P of j||[])P.getMirror&&P.getMirror({nodeMirror:Q,crossOriginIframeMirror:me.crossOriginIframeMirror,crossOriginIframeStyleMirror:me.crossOriginIframeStyleMirror});const Nt=new js;Tt=new Ws({recordCanvas:C,mutationCb:sr,win:window,blockClass:o,blockSelector:i,mirror:Q,sampling:b.canvas,dataURLOptions:y});const it=new As({mutationCb:ot,scrollCb:ir,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:p,maskInputOptions:ee,dataURLOptions:y,maskTextFn:f,maskInputFn:d,recordCanvas:C,inlineImages:D,sampling:b,slimDOMOptions:G,iframeManager:me,stylesheetManager:he,canvasManager:Tt,keepIframeSrcFn:R,processedNodeManager:Nt},mirror:Q});et=(P=!1)=>{if(!E)return;B({type:A.Meta,data:{href:window.location.href,width:_n(),height:In()}},P),he.reset(),it.init(),fe.forEach(z=>z.lock());const te=as(document,{mirror:Q,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:p,maskAllInputs:ee,maskTextFn:f,maskInputFn:d,slimDOM:G,dataURLOptions:y,recordCanvas:C,inlineImages:D,onSerialize:z=>{Ln(z,Q)&&me.addIframe(z),Nn(z,Q)&&he.trackLinkElement(z),_t(z)&&it.addShadowRoot(M.shadowRoot(z),document)},onIframeLoad:(z,W)=>{me.attachIframe(z,W),it.observeAttachShadow(z)},onStylesheetLoad:(z,W)=>{he.attachLinkElement(z,W)},keepIframeSrcFn:R});if(!te)return console.warn("Failed to snapshot the document");B({type:A.FullSnapshot,data:{node:te,initialOffset:En(window)}},P),fe.forEach(z=>z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&he.adoptStyleSheets(document.adoptedStyleSheets,Q.getId(document))};try{const P=[],te=W=>{var K;return O(Ns)({mutationCb:ot,mousemoveCb:(U,Ot)=>B({type:A.IncrementalSnapshot,data:{source:Ot,positions:U}}),mouseInteractionCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.MouseInteraction,...U}}),scrollCb:ir,viewportResizeCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.ViewportResize,...U}}),inputCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.Input,...U}}),mediaInteractionCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.MediaInteraction,...U}}),styleSheetRuleCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.StyleSheetRule,...U}}),styleDeclarationCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.StyleDeclaration,...U}}),canvasMutationCb:sr,fontCb:U=>B({type:A.IncrementalSnapshot,data:{source:N.Font,...U}}),selectionCb:U=>{B({type:A.IncrementalSnapshot,data:{source:N.Selection,...U}})},customElementCb:U=>{B({type:A.IncrementalSnapshot,data:{source:N.CustomElement,...U}})},blockClass:o,ignoreClass:s,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:ee,inlineStylesheet:p,sampling:b,recordDOM:E,recordCanvas:C,inlineImages:D,userTriggeredOnInput:L,collectFonts:x,doc:W,maskInputFn:d,maskTextFn:f,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:G,dataURLOptions:y,mirror:Q,iframeManager:me,stylesheetManager:he,shadowDomManager:it,processedNodeManager:Nt,canvasManager:Tt,ignoreCSSAttributes:ne,plugins:((K=j==null?void 0:j.filter(U=>U.observer))==null?void 0:K.map(U=>({observer:U.observer,options:U.options,callback:Ot=>B({type:A.Plugin,data:{plugin:U.name,payload:Ot}})})))||[]},g)};me.addLoadListener(W=>{try{P.push(te(W.contentDocument))}catch(K){console.warn(K)}});const z=()=>{et(),P.push(te(document)),tt=!0};return["interactive","complete"].includes(document.readyState)?z():(P.push(V("DOMContentLoaded",()=>{B({type:A.DomContentLoaded,data:{}}),w==="DOMContentLoaded"&&z()})),P.push(V("load",()=>{B({type:A.Load,data:{}}),w==="load"&&z()},window))),()=>{P.forEach(W=>{try{W()}catch(K){String(K).toLowerCase().includes("cross-origin")||console.warn(K)}}),Nt.destroy(),tt=!1,ys()}}catch(P){console.warn(P)}}Ae.addCustomEvent=(e,t)=>{if(!tt)throw new Error("please add custom event after start recording");B({type:A.Custom,data:{tag:e,payload:t}})},Ae.freezePage=()=>{fe.forEach(e=>e.freeze())},Ae.takeFullSnapshot=e=>{if(!tt)throw new Error("please take full snapshot after start recording");et(e)},Ae.mirror=Q;var Qn=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(Qn||{}),Gs=3e4,Vs="[data-fixback-root],[data-fixback-overlay]",qs="img,image,svg,video,object,picture,embed,map,audio",Xs={snapshot:()=>null,stop:()=>{}};function Ys(e={},t=Ae){let n=[],r=[],o=!1;const i=e.maskText!==!1,s=[Vs,...e.blockMedia!==!1?[qs]:[],...e.blockSelector?[e.blockSelector]:[]].join(",");let l;try{var a;l=t({emit:(m,h)=>{h&&!o&&(n=r,r=[]),o=h===!0,r.push(m)},checkoutEveryNms:Gs,maskAllInputs:!0,...i?{maskTextSelector:(a=e.maskTextSelector)!==null&&a!==void 0?a:"*"}:{},blockSelector:s,slimDOMOptions:"all"})}catch{l=void 0}if(typeof l!="function")return Xs;const c=l;let p=!0;return{snapshot(){if(!p)return null;const m=[...n,...r];return m.some(h=>h.type===Qn.FullSnapshot)?{events:m}:null},stop(){if(p){p=!1;try{c()}catch{}n=[],r=[]}}}}function nt(){}function Ks(){return typeof window!="undefined"?window:void 0}function Js(){return typeof document!="undefined"?document:void 0}function Zs(){return typeof console!="undefined"?console:void 0}function Qs(e,t,n,r){const o=t.navigator;if(!o||typeof o.sendBeacon!="function")return nt;const i=o.sendBeacon,s=(a,c,p)=>{if(!n(a))try{e.add($e({api:"beacon",method:"POST",url:a,reqSize:ut(c),outcome:p},r()))}catch{}},l=function(a,c){const p=typeof a=="string"?a:String(a);let m;try{m=i.call(o,a,c)}catch(h){throw s(p,c,"network-error"),h}return s(p,c,m?"ok":"network-error"),m};return o.sendBeacon=l,()=>{o.sendBeacon=i}}function ea(e){return typeof e=="string"?e:e instanceof URL?e.toString():e.url}function ta(e,t){var n,r;return((n=(r=t==null?void 0:t.method)!==null&&r!==void 0?r:typeof e=="object"&&"method"in e?e.method:void 0)!==null&&n!==void 0?n:"GET").toUpperCase()}function er(e,t){try{var n,r,o;return(n=(r=e.headers)===null||r===void 0||(o=r.get)===null||o===void 0?void 0:o.call(r,t))!==null&&n!==void 0?n:null}catch{return null}}function na(e){return e.type==="opaque"||e.type==="opaqueredirect"?"opaque-cors":mt(e.status)}function ra(e){const t=typeof e=="object"&&e!==null&&"name"in e?String(e.name):"";return t==="AbortError"?"aborted":t==="TimeoutError"?"timeout":"network-error"}function oa(e,t,n,r,o=Pe){const i=t.fetch;if(typeof i!="function")return nt;const s=(l,a)=>{const c=ea(l),p=ta(l,a),m=ut(a==null?void 0:a.body),h=o(),u=i.call(t,l,a);return n(c)?u:u.then(d=>{try{e.add($e({api:"fetch",method:p,url:c,status:d.status||void 0,statusText:d.statusText||void 0,durationMs:Math.max(0,o()-h),reqSize:m,respSize:Vt(er(d,"content-length")),contentType:qt(er(d,"content-type")),outcome:na(d)},r()))}catch{}return d},d=>{try{e.add($e({api:"fetch",method:p,url:c,durationMs:Math.max(0,o()-h),reqSize:m,outcome:ra(d)},r()))}catch{}throw d})};return t.fetch=s,()=>{t.fetch=i}}function ia(e,t,n){const r=t.history,o=t.location;if(!r||!o)return nt;let i=o.href;const s=m=>{try{e.add(eo(i,m,n()))}catch{}i=m},l=r.pushState,a=r.replaceState;r.pushState=function(m,h,u){const d=l.call(this,m,h,u);return s(o.href),d},r.replaceState=function(m,h,u){const d=a.call(this,m,h,u);return s(o.href),d};const c=()=>s(o.href),p=()=>s(o.href);return t.addEventListener("popstate",c),t.addEventListener("hashchange",p),()=>{r.pushState=l,r.replaceState=a,t.removeEventListener("popstate",c),t.removeEventListener("hashchange",p)}}function tr(e){try{return nn(e)}catch{return e.tagName?e.tagName.toLowerCase():"unknown"}}function sa(e,t){const n=tr(e);return{category:"ui.click",message:`click ${n}`,timestamp:t,data:{target:n}}}function aa(e,t){const n=tr(e);return{category:"ui.input",message:`input ${n}`,timestamp:t,data:{target:n}}}function nr(e){var t;const n=(t=(typeof e.composedPath=="function"?e.composedPath():[])[0])!==null&&t!==void 0?t:e.target;return n instanceof Element?n:null}function la(e,t,n){const r=i=>{const s=nr(i);if(!(!s||vt(s)))try{e.add(sa(s,n()))}catch{}},o=i=>{const s=nr(i);if(!(!s||vt(s)))try{e.add(aa(s,n()))}catch{}};return t.addEventListener("click",r,!0),t.addEventListener("input",o,!0),()=>{t.removeEventListener("click",r,!0),t.removeEventListener("input",o,!0)}}function rr(e,t){try{return typeof e.getResponseHeader=="function"?e.getResponseHeader(t):null}catch{return null}}function ca(e){try{return e.statusText||void 0}catch{return}}function ua(e,t,n,r,o=Pe){const i=t.XMLHttpRequest;if(typeof i!="function")return nt;const s=i.prototype,l=s.open,a=s.send;return s.open=function(c,p,...m){return this.__fixbackMeta={method:String(c).toUpperCase(),url:String(p)},l.call(this,c,p,...m)},s.send=function(c){const p=this.__fixbackMeta;if(p&&!n(p.url)){const m=o(),h=ut(c);let u;const d=()=>{u=mt(this.status||void 0)},f=()=>{u="network-error"},g=()=>{u="timeout"},v=()=>{u="aborted"},b=()=>{try{var y;e.add($e({api:"xhr",method:p.method,url:p.url,status:this.status||void 0,statusText:ca(this),durationMs:Math.max(0,o()-m),reqSize:h,respSize:Vt(rr(this,"content-length")),contentType:qt(rr(this,"content-type")),outcome:(y=u)!==null&&y!==void 0?y:mt(this.status||void 0)},r()))}catch{}this.removeEventListener("load",d),this.removeEventListener("error",f),this.removeEventListener("timeout",g),this.removeEventListener("abort",v),this.removeEventListener("loadend",b)};this.addEventListener("load",d),this.addEventListener("error",f),this.addEventListener("timeout",g),this.addEventListener("abort",v),this.addEventListener("loadend",b)}return a.call(this,c)},()=>{s.open=l,s.send=a}}function da(e,t={}){var n,r,o,i,s,l,a;const c=(n=t.win)!==null&&n!==void 0?n:Ks(),p=(r=t.doc)!==null&&r!==void 0?r:Js(),m=(o=t.consoleObj)!==null&&o!==void 0?o:Zs(),h=(i=t.consoleLevels)!==null&&i!==void 0?i:lo,u=(s=t.ignoreUrl)!==null&&s!==void 0?s:(()=>!1),d=(l=t.now)!==null&&l!==void 0?l:Date.now,f=(a=t.mono)!==null&&a!==void 0?a:Pe,g=t.captureConsole!==!1,v=t.captureNetwork!==!1,b=[];return m&&g&&b.push(yo(e,m,h,d)),c&&(v&&(b.push(oa(e,c,u,d,f)),b.push(ua(e,c,u,d,f)),b.push(Qs(e,c,u,d))),b.push(ia(e,c,d))),p&&b.push(la(e,p,d)),()=>{for(const y of b)try{y()}catch{}}}function Lt(e,t){return e!=null?e:typeof t=="boolean"?t:!0}function fa(e){var t,n,r,o;const{options:i,apiUrl:s,key:l,getIdentity:a,reporterIdentity:c,target:p,answer:m}=e,h=i.release?Yr(i.release):void 0;i.release&&!h&&console.warn(`[fixback] ignoring invalid release ${JSON.stringify(i.release)} — use 1-100 visible characters with no whitespace or slashes (e.g. a git SHA or semver).`);const u=jo(p,{key:l,reduceMotion:i.reduceMotion}),d=m.capture,f=(t=i.trace)!==null&&t!==void 0?t:{},g=bo({budgets:f.budgets,maxAgeMs:f.maxAgeMs,beforeBreadcrumb:i.beforeBreadcrumb}),v=da(g,{consoleLevels:f.consoleLevels,ignoreUrl:T=>$r(s,T),captureConsole:Lt((n=i.capture)===null||n===void 0?void 0:n.console,d==null?void 0:d.console),captureNetwork:Lt((r=i.capture)===null||r===void 0?void 0:r.network,d==null?void 0:d.network)});let b=null;if(Lt((o=i.capture)===null||o===void 0?void 0:o.replay,d==null?void 0:d.replay)){var y;b=Ys((y=i.replay)!==null&&y!==void 0?y:{})}const k=bi({apiUrl:s,key:l,getIdentity:a,reporterIdentity:c,onSignIn:e.onSignIn,onSignOut:e.onSignOut,gate:m.gate,sdkVersion:Be,release:h,deployEnvironment:i.environment,target:p,buffer:g,replay:b,beforeSend:i.beforeSend,scrub:i.scrub}),E=()=>k.open();u.host.addEventListener(ze,E);let C=()=>{};return i.autoCapture!==!1&&(C=Fo({apiUrl:s,key:l,getIdentity:a,sdkVersion:Be,release:h,deployEnvironment:i.environment,buffer:g,replay:b,beforeSend:i.beforeSend,scrub:i.scrub}).destroy),{teardown:()=>{u.host.removeEventListener(ze,E),k.destroy(),Go(u),v(),b==null||b.stop(),C()},setIdentity:T=>k.setIdentity(T)}}function pa(e){try{return globalThis.localStorage.getItem(dt(e))}catch{return null}}function or(e,t){try{globalThis.localStorage.setItem(dt(e),t)}catch{}}function ha(e){try{globalThis.localStorage.removeItem(dt(e))}catch{}}var De={destroy(){},signIn:()=>Promise.resolve({status:"anonymous"}),signOut:()=>Promise.resolve(),identity:()=>({status:"anonymous"})};function ma(){try{return window.location.href}catch{return""}}async function ba(e,t){try{var n,r;if(typeof document=="undefined")return De;const o=e==null?void 0:e.key;if(typeof o!="string"||o.length===0)return De;const i=window,s=(n=e.anonymousId)!==null&&n!==void 0?n:Mo(),l=(r=e.target)!==null&&r!==void 0?r:document.body;let a=!1,c=pa(o),p=null,m=null,h=null,u;const d=()=>{var C;return{hostIdentity:e.hostIdentity,reporterSession:(C=c)!==null&&C!==void 0?C:void 0,anonymousId:s}},f=()=>{var C;return h?{status:"connected",name:h.name,email:h.email,tier:(C=m)!==null&&C!==void 0?C:null}:{status:"anonymous"}},g=async C=>{const T=await Vr(t,{key:o,code:C,anonymousId:s,platform:"browser"});T&&(c=T.reporterSession,or(o,c))},v=async()=>{var C,T;const w=await Br(t,{key:o,...Ut(d())});a||(w!=null&&w.reporterSession&&(c=w.reporterSession,or(o,c)),m=(C=w==null?void 0:w.tier)!==null&&C!==void 0?C:null,h=(T=w==null?void 0:w.account)!==null&&T!==void 0?T:null,u=w==null?void 0:w.connectUrl,w!=null&&w.canSubmit?p?p.setIdentity(f()):p=fa({options:e,apiUrl:t,key:o,getIdentity:d,reporterIdentity:f(),onSignIn:()=>{b()},onSignOut:()=>{y()},target:l,answer:w}):p&&(p.teardown(),p=null))},b=async()=>{if(a||!u)return f();const C=await xo(i,{connectUrl:u,key:o,returnUrl:ma()});return C.kind==="code"&&(await g(C.code),await v()),f()},y=async()=>{c&&await qr(t,c),ha(o),c=null,await v()},k={destroy:()=>{a=!0,p==null||p.teardown(),p=null},signIn:b,signOut:y,identity:()=>f()},E=ko(i);if(E){if(await g(E),a)return k;Co(i)}return await v(),k}catch{return De}}var rt=De,ga={signIn:()=>rt.signIn(),signOut:()=>rt.signOut(),identity:()=>rt.identity()};function va(e){var t;if((e==null?void 0:e.enabled)===!1)return Promise.resolve(De);const n=(t=e==null?void 0:e.apiUrl)!==null&&t!==void 0?t:Wt;return ba(e,n).then(r=>(rt=r,r))}re.DEFAULT_API_URL=Wt,re.Fixback=ga,re.LAUNCH_EVENT=ze,re.init=va});
|
|
853
674
|
|
|
854
675
|
//# sourceMappingURL=fixback.umd.js.map
|