@fixback/sdk 0.2.0 → 0.4.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 -10
- package/dist/annotation.d.ts +1 -1
- package/dist/boot.d.ts +23 -3
- package/dist/breadcrumbs.d.ts +315 -32
- package/dist/dom.d.ts +7 -0
- package/dist/error-capture.d.ts +31 -1
- package/dist/fixback.umd.js +115 -54
- package/dist/fixback.umd.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.mjs +5544 -1258
- package/dist/index.mjs.map +1 -1
- package/dist/init.d.ts +62 -8
- package/dist/launcher.d.ts +2 -2
- package/dist/overlay-styles.d.ts +1 -1
- package/dist/overlay.d.ts +12 -0
- package/dist/replay.d.ts +101 -0
- package/dist/report.d.ts +47 -5
- package/dist/screenshot.d.ts +37 -18
- package/dist/scrub.d.ts +5 -4
- package/dist/styles.d.ts +2 -2
- package/dist/submit.d.ts +8 -0
- package/dist/version.d.ts +10 -4
- package/package.json +6 -1
package/dist/fixback.umd.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
(function(j,J){typeof exports=="object"&&typeof module!="undefined"?J(exports):typeof define=="function"&&define.amd?define(["exports"],J):(j=typeof globalThis!="undefined"?globalThis:j||self,J(j.Fixback={}))})(this,function(j){Object.defineProperty(j,Symbol.toStringTag,{value:"Module"});function J(e){return`${e.replace(/\/+$/,"")}/api/ingest/boot`}function Et(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 _t(e,t,n=fetch){let o;try{o=await n(J(e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)})}catch{return null}if(!o.ok)return null;let i;try{i=await o.json()}catch{return null}return Et(i)?i:null}var Me=["data-fixback-root","data-fixback-overlay"],St=Me.map(e=>`[${e}]`).join(",");function he(e){let t=e instanceof Node?e:null;for(;t;){if(t instanceof Element){for(const o of Me)if(t.hasAttribute(o))return!0}const n=t.getRootNode();if(n instanceof ShadowRoot&&n!==t){t=n.host;continue}t=t.parentNode}return!1}function Tt(e){for(const t of Array.from(e.querySelectorAll(St)))t.remove()}function Ae(e){const t=globalThis.CSS;return t!=null&&t.escape?t.escape(e):e.replace(/[^\w-]/g,n=>`\\${n}`)}function Ct(e){let t=1,n=e.previousElementSibling;for(;n;)n.tagName===e.tagName&&(t+=1),n=n.previousElementSibling;return t}function Ie(e){if(e.id)return`#${Ae(e.id)}`;const t=[];let n=e;for(;n&&n.tagName.toLowerCase()!=="html";){if(n.id){t.unshift(`#${Ae(n.id)}`);break}const o=n.tagName.toLowerCase(),i=n.parentElement;if(i){const r=Array.from(i.children).filter(s=>s.tagName===n.tagName);t.unshift(r.length>1?`${o}:nth-of-type(${Ct(n)})`:o)}else t.unshift(o);n=i}return t.join(" > ")}function Lt(e){const t=e.tagName.toLowerCase();if(e.id)return`${t}#${e.id}`;const n=e.classList[0];return n?`${t}.${n}`:t}function Mt(e){const t=[];let n=e;for(;n;)t.unshift(Lt(n)),n=n.parentElement;return t.join(" > ")}function At(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 It(e){return{selector:Ie(e),domPath:Mt(e),tag:e.tagName.toLowerCase(),rect:At(e)}}function Rt(e){var t,n;const o=(t=e.doc)!==null&&t!==void 0?t:document,i=(n=e.ignore)!==null&&n!==void 0?n:he;let r=null,s=!1;function f(b){var u;const m=(u=(typeof b.composedPath=="function"?b.composedPath():[])[0])!==null&&u!==void 0?u:b.target;return m instanceof Element?i(m)?null:m:null}function l(b){var u;s||(r=f(b),(u=e.onHover)===null||u===void 0||u.call(e,r))}function d(b){var u;if(s)return;const m=(u=f(b))!==null&&u!==void 0?u:r;m&&(b.preventDefault(),b.stopPropagation(),a(),e.onPick(m))}function h(b){if(!s&&b.key==="Escape"){var u;b.preventDefault(),a(),(u=e.onCancel)===null||u===void 0||u.call(e)}}function a(){s||(s=!0,o.removeEventListener("mouseover",l,!0),o.removeEventListener("click",d,!0),o.removeEventListener("keydown",h,!0),r=null)}return o.addEventListener("mouseover",l,!0),o.addEventListener("click",d,!0),o.addEventListener("keydown",h,!0),{stop:a}}var $t=7,Nt=/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi,Pt=new RegExp(`\\d{${$t},}`,"g"),Ut=/\b(bearer|token)\s+[\w.\-~+/]+=*/gi,Bt=/\bhttps?:\/\/[^\s"'<>]+/gi;function Ot(e){return typeof e!="string"||e.length===0?e:e.replace(Nt,"[redacted-email]").replace(Ut,(t,n)=>`${n} [redacted]`).replace(Pt,"[redacted-number]")}function H(e){if(typeof e!="string"||e.length===0)return e;let t=e;return t=t.replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@?#]*@/i,"$1"),t=t.replace(/\?[^#]*/,""),t=t.replace(/#.*$/,n=>n.includes("=")?"":n),t}function zt(e){const t={...e};return typeof t.url=="string"&&(t.url=H(t.url)),typeof t.from=="string"&&(t.from=H(t.from)),typeof t.to=="string"&&(t.to=H(t.to)),t}function Dt(e){return Ot(e.replace(Bt,t=>H(t)))}function jt(e){const t={...e};return typeof t.message=="string"&&(t.message=Dt(t.message)),t.data&&(t.data=zt(t.data)),t}function Ft(e){const t={...e};return typeof t.url=="string"&&(t.url=H(t.url)),t.trace&&t.trace.length>0&&(t.trace=t.trace.map(jt)),t}function Re(e,t={}){const n=t.scrub===!1?e:Ft(e),o=t.hook;if(!o)return n;try{const i=o(n);return i!=null?i:null}catch{return n}}var Ko=30,Ht=["warn","error","assert"];function Vt(e){return typeof e!="number"||!Number.isFinite(e)||e<1?30:Math.floor(e)}function Xt(e={}){var t;const n=Vt(e.maxBreadcrumbs),o=e.maxAgeMs,i=e.beforeBreadcrumb,r=(t=e.now)!==null&&t!==void 0?t:Date.now;let s=[];function f(){if(typeof o=="number"&&o>0&&s.length>0){const l=r()-o;s=s.filter(d=>d.timestamp>=l)}}return{add(l){let d=l;if(i)try{d=i(l)}catch{d=l}d&&(s.push(d),f(),s.length>n&&(s=s.slice(-n)))},snapshot(){return f(),s.slice()},clear(){s=[]}}}var $e=300;function Ne(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 Gt(e){const t=e.map(Ne).join(" ");return t.length>$e?`${t.slice(0,$e)}…`:t}function Pe(e,t,n){return{category:"console",level:e,message:Gt(t),timestamp:n}}function Yt(e,t,n){const o=H(e),i=H(t);return{category:"navigation",message:`${o} → ${i}`,timestamp:n,data:{from:o,to:i}}}function Ue(e,t,n,o,i){const r=H(n),s=o?{method:t,url:r,status:o}:{method:t,url:r};return{category:e,message:`${t} ${r}${o?` [${o}]`:""}`,timestamp:i,data:s}}function Be(e,t,n,o){return Ue("fetch",e,t,n,o)}function Kt(e,t,n,o){return Ue("xhr",e,t,n,o)}function Oe(e){try{return Ie(e)}catch{return e.tagName?e.tagName.toLowerCase():"unknown"}}function qt(e,t){const n=Oe(e);return{category:"ui.click",message:`click ${n}`,timestamp:t,data:{target:n}}}function Wt(e,t){const n=Oe(e);return{category:"ui.input",message:`input ${n}`,timestamp:t,data:{target:n}}}function Zt(e){return e instanceof Error?{name:e.name||"Error",message:e.message}:typeof e=="string"?{name:"Error",message:e}:{name:"Error",message:Ne(e)}}function Jt(e,t){const{name:n,message:o}=Zt(e);return{category:"error",level:"error",message:o?`${n}: ${o}`:n,timestamp:t,data:{errorType:n}}}function ve(){}function Qt(e,t,n,o){const i=[];for(const r of n){const s=t[r];if(typeof s!="function")continue;const f=(...l)=>{try{r==="assert"?l[0]||e.add(Pe("assert",l.slice(1),o())):e.add(Pe(r,l,o()))}catch{}return s.apply(t,l)};t[r]=f,i.push(()=>{t[r]=s})}return()=>{for(const r of i)r()}}function en(e){return typeof e=="string"?e:e instanceof URL?e.toString():e.url}function tn(e,t){var n,o;return((n=(o=t==null?void 0:t.method)!==null&&o!==void 0?o:typeof e=="object"&&"method"in e?e.method:void 0)!==null&&n!==void 0?n:"GET").toUpperCase()}function nn(e,t,n,o){const i=t.fetch;if(typeof i!="function")return ve;const r=(s,f)=>{const l=en(s),d=tn(s,f),h=i.call(t,s,f);return n(l)?h:h.then(a=>{try{e.add(Be(d,l,a.status,o()))}catch{}return a},a=>{try{e.add(Be(d,l,void 0,o()))}catch{}throw a})};return t.fetch=r,()=>{t.fetch=i}}function on(e,t,n,o){const i=t.XMLHttpRequest;if(typeof i!="function")return ve;const r=i.prototype,s=r.open,f=r.send;return r.open=function(l,d,...h){return this.__fixbackMeta={method:String(l).toUpperCase(),url:String(d)},s.call(this,l,d,...h)},r.send=function(l){const d=this.__fixbackMeta;if(d&&!n(d.url)){const h=()=>{try{e.add(Kt(d.method,d.url,this.status||void 0,o()))}catch{}this.removeEventListener("loadend",h)};this.addEventListener("loadend",h)}return f.call(this,l)},()=>{r.open=s,r.send=f}}function rn(e,t,n){const o=t.history,i=t.location;if(!o||!i)return ve;let r=i.href;const s=a=>{try{e.add(Yt(r,a,n()))}catch{}r=a},f=o.pushState,l=o.replaceState;o.pushState=function(a,b,u){const m=f.call(this,a,b,u);return s(i.href),m},o.replaceState=function(a,b,u){const m=l.call(this,a,b,u);return s(i.href),m};const d=()=>s(i.href),h=()=>s(i.href);return t.addEventListener("popstate",d),t.addEventListener("hashchange",h),()=>{o.pushState=f,o.replaceState=l,t.removeEventListener("popstate",d),t.removeEventListener("hashchange",h)}}function ze(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 an(e,t,n){const o=r=>{const s=ze(r);if(!(!s||he(s)))try{e.add(qt(s,n()))}catch{}},i=r=>{const s=ze(r);if(!(!s||he(s)))try{e.add(Wt(s,n()))}catch{}};return t.addEventListener("click",o,!0),t.addEventListener("input",i,!0),()=>{t.removeEventListener("click",o,!0),t.removeEventListener("input",i,!0)}}function sn(e,t={}){var n,o,i,r,s,f;const l=(n=t.win)!==null&&n!==void 0?n:globalThis,d=(o=t.doc)!==null&&o!==void 0?o:typeof document!="undefined"?document:void 0,h=(i=t.consoleObj)!==null&&i!==void 0?i:typeof console!="undefined"?console:void 0,a=(r=t.consoleLevels)!==null&&r!==void 0?r:Ht,b=(s=t.ignoreUrl)!==null&&s!==void 0?s:(()=>!1),u=(f=t.now)!==null&&f!==void 0?f:Date.now,m=[];return h&&m.push(Qt(e,h,a,u)),l&&(m.push(nn(e,l,b,u)),m.push(on(e,l,b,u)),m.push(rn(e,l,u))),d&&m.push(an(e,d,u)),()=>{for(const p of m)try{p()}catch{}}}var ln="#e5484d";function De(e,t,n,o){return{x:Math.round(Math.min(e,n)),y:Math.round(Math.min(t,o)),width:Math.round(Math.abs(n-e)),height:Math.round(Math.abs(o-t))}}function cn(e,t,n,o,i=14){const r=Math.atan2(o-t,n-e);return[{x:n,y:o},{x:n-i*Math.cos(r-Math.PI/6),y:o-i*Math.sin(r-Math.PI/6)},{x:n-i*Math.cos(r+Math.PI/6),y:o-i*Math.sin(r+Math.PI/6)}]}function dn(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 je(e,t){var n;const o={},i=e.innerWidth;typeof i=="number"&&i>0&&(o.viewportWidth=Math.round(i));const r=e.innerHeight;typeof r=="number"&&r>0&&(o.viewportHeight=Math.round(r));const s=(n=e.navigator)===null||n===void 0?void 0:n.userAgent;return typeof s=="string"&&s.length>0&&(o.browser=s),t.length>0&&(o.sdkVersion=t),o}function Fe(e){var t;const n={};e.kind&&(n.kind=e.kind);const o=(t=e.comment)===null||t===void 0?void 0:t.trim();o&&(n.comment=o),e.url&&(n.url=e.url),e.environment&&Object.keys(e.environment).length>0&&(n.environment=e.environment);const i=dn({element:e.element,region:e.region,marks:e.marks});return i&&(n.annotation=i),e.trace&&e.trace.length>0&&(n.trace=e.trace),n}var qo="•",un=32,fn=new Set(["button","submit","reset","checkbox","radio","range","color","file","image","hidden"]);function me(e){const t=Math.min(Math.max(e,1),un);return"•".repeat(t)}function bn(e){for(const o of Array.from(e.querySelectorAll("input"))){var t;const i=((t=o.getAttribute("type"))!==null&&t!==void 0?t:"text").toLowerCase();if(fn.has(i))continue;const r=o.value;if(!r)continue;const s=me(r.length);o.value=s,o.setAttribute("value",s)}for(const o of Array.from(e.querySelectorAll("textarea"))){const i=o.value||o.textContent||"";if(!i)continue;const r=me(i.length);o.value=r,o.textContent=r}for(const o of Array.from(e.querySelectorAll("[contenteditable]"))){var n;if(o.getAttribute("contenteditable")==="false")continue;const i=(n=o.textContent)!==null&&n!==void 0?n:"";i.trim()&&(o.textContent=me(i.length))}}var pn={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","image/gif":"gif"};function He(e){var t;return(t=pn[e])!==null&&t!==void 0?t:"png"}function Ve(e,t,n){const o=e==null?void 0:e[`inner${n}`],i=t.documentElement[`client${n}`];return Math.max(1,Math.round((typeof o=="number"&&o>0?o:i)||0)||1)}function hn(e,t,n){return`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">${new XMLSerializer().serializeToString(e)}</div></foreignObject></svg>`}var vn=4e3,mn=(e,{width:t,height:n,type:o})=>new Promise(i=>{let r=!1;const s=f=>{r||(r=!0,i(f))};try{const f=new Image,l=setTimeout(()=>s(null),vn);f.onload=()=>{try{const d=document.createElement("canvas");d.width=t,d.height=n;const h=d.getContext("2d");if(!h){clearTimeout(l),s(null);return}h.drawImage(f,0,0),d.toBlob(a=>{clearTimeout(l),s(a)},o)}catch{clearTimeout(l),s(null)}},f.onerror=()=>{clearTimeout(l),s(null)},f.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}catch{s(null)}});async function Xe(e={}){try{var t,n,o,i,r,s;const f=(t=e.doc)!==null&&t!==void 0?t:document,l=(n=(o=e.win)!==null&&o!==void 0?o:f.defaultView)!==null&&n!==void 0?n:void 0,d=(i=e.target)!==null&&i!==void 0?i:f.documentElement,h=(r=e.type)!==null&&r!==void 0?r:"image/png",a=Ve(l,f,"Width"),b=Ve(l,f,"Height"),u=d.cloneNode(!0);Tt(u),bn(u);const m=hn(u,a,b),p=await((s=e.rasterize)!==null&&s!==void 0?s:mn)(m,{width:a,height:b,type:h});return p?{blob:p,width:a,height:b,type:h}:null}catch{return null}}function Q(e){"@babel/helpers - typeof";return Q=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},Q(e)}function gn(e,t){if(Q(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Q(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xn(e){var t=gn(e,"string");return Q(t)=="symbol"?t:t+""}function Y(e,t,n){return(t=xn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wo=60;function yn(e,t){if(e==null)return 60;const n=e.trim();if(n==="")return 60;if(/^\d+$/.test(n))return Number(n);const o=Date.parse(n);return Number.isNaN(o)?60:Math.max(0,Math.ceil((o-t)/1e3))}var wn=class{constructor(e=Date.now){Y(this,"now",void 0),Y(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(),n=yn(e,t),o=t+n*1e3;return o>this.pausedUntil&&(this.pausedUntil=o),n}},kn="screenshot",En=new wn;function _n(e){return`${e.replace(/\/+$/,"")}/api/ingest/feedback`}function Sn(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 Ge(e,t,n=fetch,o=En){var i,r;const s=(i=t.content.source)!==null&&i!==void 0?i:"reporter",f=s==="auto";if(f&&o.isPaused())return{ok:!1,reason:"backpressure",retryAfterSeconds:o.retryAfterSeconds()};const l={key:t.key,...Sn(t.identity),...t.content,source:s},d=new FormData;if(d.append("payload",JSON.stringify(l)),!((r=t.screenshot)===null||r===void 0)&&r.blob){var h;d.append(kn,t.screenshot.blob,(h=t.screenshot.filename)!==null&&h!==void 0?h:"screenshot.png")}let a;try{a=await n(_n(e),{method:"POST",body:d})}catch{return{ok:!1,reason:"unreachable"}}if(!a.ok)return f&&a.status===429?{ok:!1,reason:"backpressure",retryAfterSeconds:o.hold(a.headers.get("Retry-After"))}:{ok:!1,reason:"refused",status:a.status};try{return{ok:!0,feedback:await a.json()}}catch{return{ok:!0,feedback:null}}}var ae="0.1.0",Zo=5,Tn=2e3,Jo=20,Cn=5,Ln=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,Mn=/\bhttps?:\/\/[^\s"')]+/gi,An=/\b0x[0-9a-f]+\b/gi,In=/\b[0-9a-f]{8,}\b/gi,Rn=/\d{4,}/g;function $n(e){return typeof e!="string"||e.length===0?"":e.replace(Ln,"<uuid>").replace(Mn,"<url>").replace(An,"<hex>").replace(In,"<hex>").replace(Rn,"<n>").trim()}function Nn(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 ge(e){const t=e.replace(/\?[^:]*/,""),n=t.lastIndexOf("/");return n>=0?t.slice(n+1):t}function Pn(e){var t,n,o;const i=e.match(/^at\s+(.+?)\s+\((.+)\)$/);if(i)return`${(t=i[1])!==null&&t!==void 0?t:""}@${ge((n=i[2])!==null&&n!==void 0?n:"")}`;const r=e.match(/^at\s+(.+)$/);if(r)return`@${ge((o=r[1])!==null&&o!==void 0?o:"")}`;const s=e.indexOf("@");return s>=0?`${e.slice(0,s)}@${ge(e.slice(s+1))}`:null}function Un(e,t=Cn){if(typeof e!="string"||e.length===0)return"";const n=[];for(const o of e.split(`
|
|
2
|
-
`)){const i=Pn(o.trim());if(i&&(n.push(i),n.length>=t))break}return n.join(" < ")}function Bn(e,t,n){return Nn(`${e}|${$n(t)}|${Un(n)}`)}var On=class{constructor(e){var t;Y(this,"options",void 0),Y(this,"tokens",void 0),Y(this,"last",void 0),Y(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:n}=this.options;if(n>0&&e>this.last){const o=Math.floor((e-this.last)/n);o>0&&(this.tokens=Math.min(t,this.tokens+o),this.last+=o*n)}return this.tokens>=1?(this.tokens-=1,!0):!1}};function V(e){if(typeof e=="string")return e;if(e==null)return"";try{return String(e)}catch{return""}}function zn(e){const t=e,n=t.error;if(n&&typeof n=="object"){const i=n;return{type:V(i.name)||"Error",value:V(i.message)||V(t.message),stack:typeof i.stack=="string"?i.stack:void 0,original:n}}const o=V(t.message);return o?{type:"Error",value:o,original:o}:null}function Dn(e){const t=e.reason;if(t&&typeof t=="object"){const o=t;return{type:V(o.name)||"UnhandledRejection",value:V(o.message)||V(t),stack:typeof o.stack=="string"?o.stack:void 0,original:t}}const n=V(t);return{type:"UnhandledRejection",value:n,original:t!=null?t:n}}var jn={destroy:()=>{},droppedCount:()=>0};function Fn(e){var t,n,o,i,r,s,f,l,d,h,a,b;const u=(t=e.win)!==null&&t!==void 0?t:typeof window!="undefined"?window:void 0;if(!u)return jn;const m=u,p=(n=(o=e.doc)!==null&&o!==void 0?o:m.document)!==null&&n!==void 0?n:typeof document!="undefined"?document:void 0,c=(i=e.now)!==null&&i!==void 0?i:Date.now,T=(r=e.sdkVersion)!==null&&r!==void 0?r:ae,C=(s=e.maxDistinct)!==null&&s!==void 0?s:20,w=(f=(l=e.deps)===null||l===void 0?void 0:l.captureView)!==null&&f!==void 0?f:Xe,_=(d=(h=e.deps)===null||h===void 0?void 0:h.submitReport)!==null&&d!==void 0?d:Ge,N=new On({capacity:(a=e.burstCapacity)!==null&&a!==void 0?a:5,refillIntervalMs:(b=e.burstRefillMs)!==null&&b!==void 0?b:Tn,now:c}),M=new Map;let A=0;function y(I,L,B){var R,z;return{...Fe({kind:"bug",url:(R=m.location)===null||R===void 0?void 0:R.href,environment:je(m,T),trace:B.trace?(z=e.buffer)===null||z===void 0?void 0:z.snapshot():void 0}),source:"auto",errorSignature:I,occurrences:L}}async function D(I,L,B){const R=M.get(I);if(!R)return;const z=R.sentCount;R.sentCount=L;try{const we=y(I,L,B),te=Re(we,{hook:e.beforeSend,scrub:e.scrub});if(!te)return;let ne=null;if(B.screenshot){const q=await w({doc:p,win:m});ne=q?{blob:q.blob,filename:`screenshot.${He(q.type)}`}:null}!(await _(e.apiUrl,{key:e.key,identity:e.identity,content:te,screenshot:ne})).ok&&R.sentCount===L&&(R.sentCount=z)}catch{R.sentCount===L&&(R.sentCount=z)}}function v(I){const L=Bn(I.type,I.value,I.stack),B=M.get(L);if(B){B.count+=1,B.lastAt=c();return}if(!N.take()){A+=1;return}if(M.size>=C){A+=1;return}const R=c();M.set(L,{count:1,firstAt:R,lastAt:R,sentCount:0});try{var z;(z=e.buffer)===null||z===void 0||z.add(Jt(I.original,R))}catch{}D(L,1,{screenshot:!0,trace:!0})}const S=I=>{try{const L=zn(I);L&&v(L)}catch{}},O=I=>{try{const L=Dn(I);L&&v(L)}catch{}},$=()=>{try{for(const[I,L]of M)L.count>L.sentCount&&D(I,L.count,{screenshot:!1,trace:!1})}catch{}},ee=()=>{(p==null?void 0:p.visibilityState)==="hidden"&&$()};return m.addEventListener("error",S,!0),m.addEventListener("unhandledrejection",O,!0),m.addEventListener("pagehide",$),p==null||p.addEventListener("visibilitychange",ee),{destroy:()=>{m.removeEventListener("error",S,!0),m.removeEventListener("unhandledrejection",O,!0),m.removeEventListener("pagehide",$),p==null||p.removeEventListener("visibilitychange",ee)},droppedCount:()=>A}}var Ye="fixback.anonymousId";function Ke(){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 Hn(){try{const e=globalThis.localStorage,t=e.getItem(Ye);if(t)return t;const n=Ke();return e.setItem(Ye,n),n}catch{return Ke()}}var qe="fixback_invite",Vn="fixback:reporter:";function Xn(e){try{const t=new URL(e).searchParams.get(qe);return t&&t.length>0?t:null}catch{return null}}function Gn(e){try{const t=new URL(e.location.href);if(!t.searchParams.has("fixback_invite"))return;t.searchParams.delete(qe);const n=t.searchParams.toString(),o=`${t.pathname}${n?`?${n}`:""}${t.hash}`;e.history.replaceState(e.history.state,"",o)}catch{}}function We(e){return`${Vn}${e}`}function Ze(){try{var e;return(e=globalThis.localStorage)!==null&&e!==void 0?e:null}catch{return null}}function se(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}function Yn(e,t,n=Ze()){if(!n)return;const o=se(t.name),i=se(t.email),r={reporterId:t.reporterId,...o?{name:o}:{},...i?{email:i}:{}};try{n.setItem(We(e),JSON.stringify(r))}catch{}}function Je(e,t=Ze()){if(!t)return null;try{const n=t.getItem(We(e));if(!n)return null;const o=JSON.parse(n);if(typeof(o==null?void 0:o.reporterId)!="string"||o.reporterId.length===0)return null;const i=se(o.name),r=se(o.email);return{reporterId:o.reporterId,...i?{name:i}:{},...r?{email:r}:{}}}catch{return null}}function Qe(e,t){return`${e.replace(/\/+$/,"")}/api/invites/${encodeURIComponent(t)}`}function Kn(e,t){return`${Qe(e,t)}/redeem`}var et=new Set(["revoked","expired","exhausted","not_found"]);function tt(e){return e==="public"||e==="invited"||e==="internal"}function qn(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")&&tt(t.tier):typeof t.status=="string"&&et.has(t.status)}function Wn(e){if(typeof e!="object"||e===null)return!1;const t=e;return t.status==="redeemed"?typeof t.reporterId=="string"&&typeof t.projectId=="string"&&tt(t.tier):typeof t.status=="string"&&et.has(t.status)}async function nt(e){try{return await e.json()}catch{return null}}async function Zn(e,t,n=fetch){let o;try{o=await n(Qe(e,t),{method:"GET",headers:{accept:"application/json"}})}catch{return null}const i=await nt(o);return qn(i)?i:null}async function Jn(e,t,n=fetch){let o;try{o=await n(Kn(e,t),{method:"POST",headers:{accept:"application/json"}})}catch{return null}const i=await nt(o);return Wn(i)?i:null}var Qn=`
|
|
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
|
+
background-clip: text;
|
|
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=`
|
|
3
18
|
:host {
|
|
4
19
|
/* Vendored Signal tokens (packages/ui/src/tokens.css). */
|
|
5
20
|
--fb-color-accent: #2f6fed;
|
|
@@ -110,6 +125,12 @@
|
|
|
110
125
|
display: block;
|
|
111
126
|
width: 14px;
|
|
112
127
|
height: 14px;
|
|
128
|
+
transition: transform 340ms cubic-bezier(0.2, 0.8, 0.3, 1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Tucked away: mirror the chevron so it points left — back into view. */
|
|
132
|
+
:host([data-fb-hidden]) .fb-launcher__tuck-icon {
|
|
133
|
+
transform: scaleX(-1);
|
|
113
134
|
}
|
|
114
135
|
|
|
115
136
|
/* The corner hover-zone that peeks a tucked launcher back — inert until tucked,
|
|
@@ -159,13 +180,15 @@
|
|
|
159
180
|
pointer-events: auto;
|
|
160
181
|
}
|
|
161
182
|
|
|
162
|
-
/*
|
|
163
|
-
.fb-launcher__welcome
|
|
164
|
-
.fb-launcher__hint {
|
|
183
|
+
/* The first-visit welcome toast, above the pill. */
|
|
184
|
+
.fb-launcher__welcome {
|
|
165
185
|
position: fixed;
|
|
166
186
|
right: 20px;
|
|
187
|
+
bottom: 70px;
|
|
167
188
|
z-index: 5;
|
|
168
189
|
box-sizing: border-box;
|
|
190
|
+
max-width: 210px;
|
|
191
|
+
padding: 9px 13px;
|
|
169
192
|
color: #fff;
|
|
170
193
|
font-size: 12px;
|
|
171
194
|
line-height: 1.45;
|
|
@@ -175,23 +198,11 @@
|
|
|
175
198
|
animation: fbToast 300ms ease both;
|
|
176
199
|
}
|
|
177
200
|
|
|
178
|
-
.fb-launcher__welcome {
|
|
179
|
-
bottom: 70px;
|
|
180
|
-
max-width: 210px;
|
|
181
|
-
padding: 9px 13px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
201
|
.fb-launcher__welcome strong {
|
|
185
202
|
color: #8fc0ff;
|
|
186
203
|
font-weight: 600;
|
|
187
204
|
}
|
|
188
205
|
|
|
189
|
-
.fb-launcher__hint {
|
|
190
|
-
bottom: 20px;
|
|
191
|
-
max-width: 232px;
|
|
192
|
-
padding: 10px 13px;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
206
|
/* The pulse that draws the eye while the welcome shows. */
|
|
196
207
|
.fb-launcher--pulse {
|
|
197
208
|
animation: fbPulse 1.8s ease-in-out 2;
|
|
@@ -224,28 +235,28 @@
|
|
|
224
235
|
|
|
225
236
|
/* Reduce motion — the explicit opt-in and the OS setting both still it all. */
|
|
226
237
|
:host([data-fb-reduce-motion]) .fb-launcher,
|
|
227
|
-
:host([data-fb-reduce-motion]) .fb-launcher__nub
|
|
238
|
+
:host([data-fb-reduce-motion]) .fb-launcher__nub,
|
|
239
|
+
:host([data-fb-reduce-motion]) .fb-launcher__tuck-icon {
|
|
228
240
|
transition: none;
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
:host([data-fb-reduce-motion]) .fb-launcher--pulse,
|
|
232
|
-
:host([data-fb-reduce-motion]) .fb-launcher__welcome
|
|
233
|
-
:host([data-fb-reduce-motion]) .fb-launcher__hint {
|
|
244
|
+
:host([data-fb-reduce-motion]) .fb-launcher__welcome {
|
|
234
245
|
animation: none;
|
|
235
246
|
}
|
|
236
247
|
|
|
237
248
|
@media (prefers-reduced-motion: reduce) {
|
|
238
249
|
.fb-launcher,
|
|
239
|
-
.fb-launcher__nub
|
|
250
|
+
.fb-launcher__nub,
|
|
251
|
+
.fb-launcher__tuck-icon {
|
|
240
252
|
transition: none;
|
|
241
253
|
}
|
|
242
254
|
.fb-launcher--pulse,
|
|
243
|
-
.fb-launcher__welcome
|
|
244
|
-
.fb-launcher__hint {
|
|
255
|
+
.fb-launcher__welcome {
|
|
245
256
|
animation: none;
|
|
246
257
|
}
|
|
247
258
|
}
|
|
248
|
-
`,
|
|
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=`
|
|
249
260
|
:host {
|
|
250
261
|
--fb-color-accent: #2f6fed;
|
|
251
262
|
--fb-color-accent-hover: #245fd0;
|
|
@@ -439,7 +450,7 @@
|
|
|
439
450
|
@media (prefers-reduced-motion: reduce) {
|
|
440
451
|
.fb-ob-backdrop, .fb-ob-panel { animation: none; }
|
|
441
452
|
}
|
|
442
|
-
`,
|
|
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=`
|
|
443
454
|
:host {
|
|
444
455
|
--fb-color-accent: #2f6fed;
|
|
445
456
|
--fb-color-accent-hover: #245fd0;
|
|
@@ -455,8 +466,6 @@
|
|
|
455
466
|
--fb-color-bug-bg: #fdecec;
|
|
456
467
|
--fb-color-impr: #2f6fed;
|
|
457
468
|
--fb-color-impr-bg: #eaf1fe;
|
|
458
|
-
--fb-color-idea: #8b5cf6;
|
|
459
|
-
--fb-color-idea-bg: #f2ecfe;
|
|
460
469
|
--fb-color-success: #2f9e5b;
|
|
461
470
|
--fb-font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto,
|
|
462
471
|
Helvetica, Arial, sans-serif;
|
|
@@ -520,33 +529,8 @@
|
|
|
520
529
|
}
|
|
521
530
|
.fb-ov-close:hover { color: var(--fb-color-muted); background: #f4f7fa; }
|
|
522
531
|
|
|
523
|
-
.fb-ov-tabs { display: flex; gap: 6px; padding: 12px 14px 6px; }
|
|
524
|
-
.fb-ov-tab {
|
|
525
|
-
flex: 1;
|
|
526
|
-
text-align: center;
|
|
527
|
-
font-size: 11px;
|
|
528
|
-
font-weight: 600;
|
|
529
|
-
padding: 6px;
|
|
530
|
-
border-radius: 7px;
|
|
531
|
-
border: 1px solid var(--fb-color-border);
|
|
532
|
-
background: var(--fb-color-surface);
|
|
533
|
-
color: var(--fb-color-muted);
|
|
534
|
-
cursor: pointer;
|
|
535
|
-
font-family: inherit;
|
|
536
|
-
}
|
|
537
|
-
.fb-ov-tab:hover { border-color: #cfd8e2; }
|
|
538
|
-
.fb-ov-tab.is-active[data-kind="bug"] {
|
|
539
|
-
background: var(--fb-color-bug-bg); color: var(--fb-color-bug); border-color: transparent;
|
|
540
|
-
}
|
|
541
|
-
.fb-ov-tab.is-active[data-kind="improvement"] {
|
|
542
|
-
background: var(--fb-color-impr-bg); color: var(--fb-color-impr); border-color: transparent;
|
|
543
|
-
}
|
|
544
|
-
.fb-ov-tab.is-active[data-kind="idea"] {
|
|
545
|
-
background: var(--fb-color-idea-bg); color: var(--fb-color-idea); border-color: transparent;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
532
|
.fb-ov-mark {
|
|
549
|
-
margin:
|
|
533
|
+
margin: 12px 14px 10px;
|
|
550
534
|
min-height: 52px;
|
|
551
535
|
border-radius: 9px;
|
|
552
536
|
border: 1px solid var(--fb-color-border-soft);
|
|
@@ -788,6 +772,83 @@
|
|
|
788
772
|
@media (prefers-reduced-motion: reduce) {
|
|
789
773
|
.fb-ov-highlight { transition: none; }
|
|
790
774
|
}
|
|
791
|
-
`,ko="data-fixback-overlay",Eo="http://www.w3.org/2000/svg",_o=[{value:"bug",label:"Bug"},{value:"improvement",label:"Improve"},{value:"idea",label:"Idea"}],So=[{tool:"arrow",label:"Arrow"},{tool:"box",label:"Box"},{tool:"pen",label:"Pen"},{tool:"text",label:"Text label"}],at=1800;function x(e,t,n={},o=[]){const i=e.createElement(t);for(const[r,s]of Object.entries(n))s!==void 0&&i.setAttribute(r,s);for(const r of o)i.appendChild(typeof r=="string"?e.createTextNode(r):r);return i}function F(e,t,n={},o=[]){const i=e.createElementNS(Eo,t);for(const[r,s]of Object.entries(n))i.setAttribute(r,s);for(const r of o)i.appendChild(r);return i}function To(e){var t,n,o,i,r,s,f,l,d,h;const a=(t=e.doc)!==null&&t!==void 0?t:document,b=(n=(o=e.win)!==null&&o!==void 0?o:a.defaultView)!==null&&n!==void 0?n:window,u=(i=e.sdkVersion)!==null&&i!==void 0?i:ae,m={captureView:(r=(s=e.deps)===null||s===void 0?void 0:s.captureView)!==null&&r!==void 0?r:Xe,submitReport:(f=(l=e.deps)===null||l===void 0?void 0:l.submitReport)!==null&&f!==void 0?f:Ge,startElementPicker:(d=(h=e.deps)===null||h===void 0?void 0:h.startElementPicker)!==null&&d!==void 0?d:Rt};let p=null,c=null,T=null,C=null,w=null,_=null,N=null,M=!1,A="compose";const y={kind:"bug",selectedElement:null,region:null,marks:[],phase:"compose"};function D(g,E){c&&(c.status.textContent=g,c.status.classList.toggle("is-error",E))}function v(g){if(y.kind=g,!!c)for(const[E,P]of c.tabs){const U=E===g;P.classList.toggle("is-active",U),P.setAttribute("aria-pressed",String(U))}}function S(g){if(A=g,!c)return;const E=g!=="compose";c.panel.classList.toggle("is-marking",E),c.pickLayer.classList.toggle("is-visible",g==="picking"),c.captureLayer.classList.toggle("is-visible",g==="capturing"),c.drawLayer.classList.toggle("is-visible",g==="drawing"),c.pickBtn.classList.toggle("is-active",g==="picking"),c.captureBtn.classList.toggle("is-active",g==="capturing"||g==="drawing")}function O(){if(!c)return;const g=!!y.selectedElement,E=!!y.region,P=y.marks.length;c.mark.classList.toggle("has-element",g),c.selector.textContent=g?y.selectedElement.selector:"",c.pickBtn.textContent="",c.pickBtn.append(Co(a),a.createTextNode(g?"Change element":"Pick element")),c.captureBtn.classList.toggle("is-attached",E||P>0);const U=[];g&&U.push("Element"),E&&U.push("Region"),P>0&&U.push(`${P} mark${P===1?"":"s"}`),c.caption.textContent=U.length?`${U.join(" · ")} · masked screenshot on Send`:"Masked screenshot attached on Send"}function $(g){if(!c)return;if(!g){c.highlight.style.display="none";return}const E=g.getBoundingClientRect();c.highlight.style.display="block",c.highlight.style.left=`${E.left}px`,c.highlight.style.top=`${E.top}px`,c.highlight.style.width=`${E.width}px`,c.highlight.style.height=`${E.height}px`}function ee(){T==null||T.stop(),T=null}function I(){c&&(c.highlight.style.display="none"),ee(),A==="picking"&&S("compose")}function L(){c&&(W(),S("picking"),T=m.startElementPicker({doc:a,onHover:$,onPick:g=>{y.selectedElement=It(g),I(),O()},onCancel:I}))}function B(g){if(!c)return;const E=c.selBox;if(!g){E.style.display="none";return}E.style.display="block",E.style.left=`${g.x}px`,E.style.top=`${g.y}px`,E.style.width=`${g.width}px`,E.style.height=`${g.height}px`}function R(){C==null||C.stop(),C=null}function z(){c&&(W(),B(null),S("capturing"),C=yo({doc:a,onProgress:B,onComplete:g=>{R(),B(null),Uo(g)},onCancel:()=>{R(),B(null),S("compose")}}))}function we(g){c&&(c.drawFrame.style.left=`${g.x}px`,c.drawFrame.style.top=`${g.y}px`,c.drawFrame.style.width=`${g.width}px`,c.drawFrame.style.height=`${g.height}px`)}function te(g){if(w==null||w.setTool(g),!!c)for(const[E,P]of c.drawTools)P.classList.toggle("is-active",E===g)}function ne(g){c&&(c.undoBtn.disabled=g.length===0)}function q(){w==null||w.stop(),w=null}function Uo(g){c&&(_=g,we(g),S("drawing"),w=go({doc:a,svg:c.drawSvg,textInput:c.drawText,initialMarks:y.marks,onChange:ne}),te("arrow"),ne(y.marks))}function Bo(){w&&(y.marks=w.marks().slice(),_&&(y.region=_)),ct(),O()}function Oo(){ct(),O()}function ct(){q(),_=null,A==="drawing"&&S("compose")}function W(){ee(),R(),q(),_=null,B(null),c&&(c.highlight.style.display="none"),A!=="compose"&&S("compose")}function ke(){N!==null&&(clearTimeout(N),N=null)}async function zo(){if(!(!c||y.phase==="sending")){W(),y.phase="sending",c.sendBtn.disabled=!0,c.sendBtn.textContent="Sending…",D("",!1);try{var g,E,P,U;const oe=Fe({kind:y.kind,comment:c.comment.value,element:(g=y.selectedElement)!==null&&g!==void 0?g:void 0,region:(E=y.region)!==null&&E!==void 0?E:void 0,marks:y.marks.length>0?y.marks:void 0,url:(P=b.location)===null||P===void 0?void 0:P.href,environment:je(b,u),trace:(U=e.buffer)===null||U===void 0?void 0:U.snapshot()}),re=Re(oe,{hook:e.beforeSend,scrub:e.scrub});if(!re){y.phase="sent",c.panel.classList.add("is-sent"),N=setTimeout(de,at);return}const Z=await m.captureView({doc:a,win:b}),ue=Z?{blob:Z.blob,filename:`screenshot.${He(Z.type)}`}:null,ie=await m.submitReport(e.apiUrl,{key:e.key,identity:e.identity,content:re,screenshot:ue});ie.ok?(y.phase="sent",c.panel.classList.add("is-sent"),N=setTimeout(de,at)):(Ee(),D(ie.reason==="unreachable"?"Couldn't reach Fixback — try again.":"Fixback couldn't accept this report.",!0))}catch{Ee(),D("Something went wrong — try again.",!0)}}}function Ee(){y.phase="compose",c&&(c.sendBtn.disabled=!1,c.sendBtn.textContent="Send")}function Do(){var g;p=x(a,"div",{[ko]:""}),p.style.cssText="position:fixed;right:20px;bottom:84px;z-index:2147483001;margin:0;padding:0;border:0;display:none;";const E=p.attachShadow({mode:"open"}),P=a.createElement("style");P.textContent=wo,E.appendChild(P);const U=x(a,"button",{type:"button",class:"fb-ov-close","aria-label":"Close"},["✕"]),oe=x(a,"div",{class:"fb-ov-head"},[x(a,"span",{class:"fb-ov-mark-sq"}),x(a,"span",{class:"fb-ov-brand"},["Fixback"])]);e.tier!=null&&oe.appendChild(x(a,"span",{class:"fb-ov-tier","aria-label":`Trust tier: ${e.tier}`},[e.tier])),oe.appendChild(U);const re=new Map,Z=x(a,"div",{class:"fb-ov-tabs"});for(const{value:X,label:pe}of _o){const G=x(a,"button",{type:"button",class:"fb-ov-tab","data-kind":X},[pe]);G.addEventListener("click",()=>v(X)),re.set(X,G),Z.appendChild(G)}const ue=x(a,"span",{class:"fb-ov-selector"}),ie=x(a,"span",{class:"fb-ov-mark-caption"}),dt=x(a,"div",{class:"fb-ov-mark"},[ue,ie]),ut=x(a,"textarea",{class:"fb-ov-comment",placeholder:"Describe what you saw or want…","aria-label":"Comment"}),ft=x(a,"div",{class:"fb-ov-status",role:"status","aria-live":"polite"}),_e=x(a,"button",{type:"button",class:"fb-ov-pickbtn",title:"Point at an element"});_e.addEventListener("click",()=>{y.phase!=="sending"&&(A==="picking"?I():L())});const fe=x(a,"button",{type:"button",class:"fb-ov-capturebtn",title:"Capture a region and draw","aria-label":"Capture a region and draw"});fe.appendChild(Lo(a)),fe.addEventListener("click",()=>{y.phase!=="sending"&&z()});const Se=x(a,"button",{type:"button",class:"fb-ov-send"},["Send"]);Se.addEventListener("click",()=>{zo()});const Vo=x(a,"div",{class:"fb-ov-tools"},[_e,fe,Se]),Xo=x(a,"div",{class:"fb-ov-form"},[Z,dt,ut,ft,Vo]),Go=x(a,"div",{class:"fb-ov-done"},[x(a,"div",{class:"fb-ov-done__check"},["✓"]),x(a,"div",{class:"fb-ov-done__title"},["Report sent"]),x(a,"div",{class:"fb-ov-done__sub"},["Thanks — the team can see it now."])]),bt=x(a,"div",{class:"fb-ov-panel",role:"dialog","aria-label":"Fixback feedback"},[oe,Xo,Go]),Te=x(a,"div",{class:"fb-ov-highlight"});Te.style.display="none";const pt=x(a,"div",{class:"fb-ov-pick"},[x(a,"div",{class:"fb-ov-hint"},["Click the element you mean · Esc to cancel"]),Te]),Ce=x(a,"div",{class:"fb-ov-capture-sel"});Ce.style.display="none";const ht=x(a,"div",{class:"fb-ov-capture"},[x(a,"div",{class:"fb-ov-capture-dim"}),x(a,"div",{class:"fb-ov-hint"},["Drag to capture an area · Esc to cancel"]),Ce]),vt=F(a,"svg",{class:"fb-ov-draw-svg",width:"100%",height:"100%"}),Le=x(a,"input",{class:"fb-ov-draw-text",placeholder:"label…","aria-label":"Mark label"});Le.style.display="none";const mt=x(a,"div",{class:"fb-ov-draw-frame"}),gt=new Map,xt=[];for(const{tool:X,label:pe}of So){const G=x(a,"button",{type:"button",class:"fb-ov-drawtool","data-tool":X,title:pe,"aria-label":pe});G.appendChild(Ao(a,X)),G.addEventListener("click",()=>te(X)),gt.set(X,G),xt.push(G)}const be=x(a,"button",{type:"button",class:"fb-ov-draw-undo",title:"Undo","aria-label":"Undo"});be.appendChild(Mo(a)),be.addEventListener("click",()=>w==null?void 0:w.undo());const yt=x(a,"button",{type:"button",class:"fb-ov-draw-cancel"},["Cancel"]);yt.addEventListener("click",()=>Oo());const wt=x(a,"button",{type:"button",class:"fb-ov-draw-attach"},["Attach"]);wt.addEventListener("click",()=>Bo());const Yo=x(a,"div",{class:"fb-ov-draw-toolbar"},[...xt,x(a,"span",{class:"fb-ov-draw-divider"}),be,yt,wt]),kt=x(a,"div",{class:"fb-ov-draw"},[mt,vt,Le,Yo]);E.append(bt,pt,ht,kt),U.addEventListener("click",de),((g=e.target)!==null&&g!==void 0?g:a.body).appendChild(p),c={panel:bt,tabs:re,mark:dt,selector:ue,caption:ie,comment:ut,status:ft,pickBtn:_e,captureBtn:fe,sendBtn:Se,highlight:Te,pickLayer:pt,captureLayer:ht,selBox:Ce,drawLayer:kt,drawSvg:vt,drawText:Le,drawFrame:mt,drawTools:gt,undoBtn:be}}function jo(){(!p||!c)&&Do()}function Fo(){if(jo(),!(!p||!c)){ke(),W(),y.phase="compose",y.selectedElement=null,y.region=null,y.marks=[],c.panel.classList.remove("is-sent"),c.comment.value="",Ee(),D("",!1),v("bug"),O(),p.style.display="block",M=!0;try{c.comment.focus()}catch{}}}function de(){ke(),W(),p&&(p.style.display="none"),M=!1}function Ho(){ke(),W(),p==null||p.remove(),p=null,c=null,M=!1}return{open:Fo,close:de,destroy:Ho,get isOpen(){return M}}}function Co(e){return x(e,"span",{class:"fb-ov-pickbtn__glyph","aria-hidden":"true"},["⌖"])}function Lo(e){return F(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"},[F(e,"path",{d:"M2 5V2h3M14 5V2h-3M2 11v3h3M14 11v3h-3"})])}function Mo(e){return F(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"},[F(e,"path",{d:"M6 4 3 7l3 3M3 7h6a4 4 0 0 1 0 8H7"})])}function Ao(e,t){return t==="text"?x(e,"span",{class:"fb-ov-drawtool__t","aria-hidden":"true"},["T"]):F(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:F(e,"path",{d:"M3 13 13 3M7 3h6v6"}),box:F(e,"rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),pen:F(e,"path",{d:"M3 13l1-3 6-6 2 2-6 6-3 1Z"})}[t]])}var st="https://api.fixback.dev",ye={destroy(){}};function Io(){try{const e=window.location;return e.host||e.hostname||"this site"}catch{return"this site"}}function Ro(){try{return window.location.href}catch{return""}}function $o(e){const{options:t,apiUrl:n,key:o,identity:i,target:r,answer:s}=e,f=so(r,{key:o,reduceMotion:t.reduceMotion}),l=n.replace(/\/+$/,"");let d=null,h=()=>{};if(t.trace!==!1){var a;const p=(a=t.trace)!==null&&a!==void 0?a:{};d=Xt({maxBreadcrumbs:p.maxBreadcrumbs,maxAgeMs:p.maxAgeMs,beforeBreadcrumb:p.beforeBreadcrumb}),h=sn(d,{consoleLevels:p.consoleLevels,ignoreUrl:c=>c.startsWith(l)})}const b=To({apiUrl:n,key:o,identity:i,gate:s.gate,tier:s.tier,sdkVersion:ae,target:r,buffer:d,beforeSend:t.beforeSend,scrub:t.scrub}),u=()=>b.open();f.host.addEventListener(le,u);let m=()=>{};return t.autoCapture!==!1&&(m=Fn({apiUrl:n,key:o,identity:i,sdkVersion:ae,buffer:d,beforeSend:t.beforeSend,scrub:t.scrub}).destroy),()=>{f.host.removeEventListener(le,u),b.destroy(),lo(f),h(),m()}}async function lt(e,t){try{var n,o,i;if(typeof document=="undefined")return ye;const r=e==null?void 0:e.key;if(typeof r!="string"||r.length===0)return ye;const s=(n=e.apiUrl)!==null&&n!==void 0?n:st,f=(o=e.anonymousId)!==null&&o!==void 0?o:Hn(),l=(i=e.target)!==null&&i!==void 0?i:document.body;let d=!1,h=()=>{},a=()=>{};const b={destroy:()=>{d=!0,a(),a=()=>{},h(),h=()=>{}}},u=()=>{var p;const c=Je(r);return{signedIdentity:e.signedIdentity,reporterId:(p=e.reporterId)!==null&&p!==void 0?p:c==null?void 0:c.reporterId,anonymousId:f}},m=async p=>{const c=await _t(s,{key:r,...p});d||!(c!=null&&c.canSubmit)||(h=$o({options:e,apiUrl:s,key:r,identity:p,target:l,answer:c}))};if(t){const p=await Zn(s,t);if(d)return b;if(p&&p.status==="pending"){const c=Je(r),T=async w=>{const _=await Jn(s,t);d||(a(),a=()=>{},_&&_.status==="redeemed"?(Yn(r,{reporterId:_.reporterId,name:w.name,email:w.email}),Gn(window),await m({signedIdentity:e.signedIdentity,reporterId:_.reporterId,anonymousId:f})):await m(u()))},C=ho({origin:Io(),tier:p.tier,defaults:c?{name:c.name,email:c.email}:void 0,target:l,onConfirm:w=>{T(w)}});return a=()=>C.destroy(),b}}return await m(u()),b}catch{return ye}}function No(e){return lt(e,typeof window!="undefined"?Xn(Ro()):null)}function Po(e){return lt(e,typeof(e==null?void 0:e.token)=="string"&&e.token.length>0?e.token:null)}j.DEFAULT_API_URL=st,j.LAUNCH_EVENT=le,j.init=No,j.redeem=Po});
|
|
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
|
|
776
|
+
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() {
|
|
778
|
+
"use strict";
|
|
779
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
780
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
781
|
+
for (var i = 0; i < chars.length; i++) {
|
|
782
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
783
|
+
}
|
|
784
|
+
var encode = function(arraybuffer) {
|
|
785
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
786
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
787
|
+
base64 += chars[bytes[i2] >> 2];
|
|
788
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
789
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
790
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
791
|
+
}
|
|
792
|
+
if (len % 3 === 2) {
|
|
793
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
794
|
+
} else if (len % 3 === 1) {
|
|
795
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
796
|
+
}
|
|
797
|
+
return base64;
|
|
798
|
+
};
|
|
799
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
800
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
801
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
802
|
+
const id = \`\${width}-\${height}\`;
|
|
803
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
804
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
805
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
806
|
+
offscreen.getContext("2d");
|
|
807
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
808
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
809
|
+
const base64 = encode(arrayBuffer);
|
|
810
|
+
transparentBlobMap.set(id, base64);
|
|
811
|
+
return base64;
|
|
812
|
+
} else {
|
|
813
|
+
return "";
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
const worker = self;
|
|
817
|
+
worker.onmessage = async function(e) {
|
|
818
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
819
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
820
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
821
|
+
width,
|
|
822
|
+
height,
|
|
823
|
+
dataURLOptions
|
|
824
|
+
);
|
|
825
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
826
|
+
const ctx = offscreen.getContext("2d");
|
|
827
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
828
|
+
bitmap.close();
|
|
829
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
830
|
+
const type = blob.type;
|
|
831
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
832
|
+
const base64 = encode(arrayBuffer);
|
|
833
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
834
|
+
lastBlobMap.set(id, base64);
|
|
835
|
+
return worker.postMessage({ id });
|
|
836
|
+
}
|
|
837
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
838
|
+
worker.postMessage({
|
|
839
|
+
id,
|
|
840
|
+
type,
|
|
841
|
+
base64,
|
|
842
|
+
width,
|
|
843
|
+
height
|
|
844
|
+
});
|
|
845
|
+
lastBlobMap.set(id, base64);
|
|
846
|
+
} else {
|
|
847
|
+
return worker.postMessage({ id: e.data.id });
|
|
848
|
+
}
|
|
849
|
+
};
|
|
850
|
+
})();
|
|
851
|
+
//# 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});
|
|
792
853
|
|
|
793
854
|
//# sourceMappingURL=fixback.umd.js.map
|