@holostaff/sdk 0.11.3 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autopilot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,IAAI,CAAA;CAChB;AA+BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autopilot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,IAAI,CAAA;CAChB;AA+BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,GAAG,gBAAgB,CAiYpE"}
|
package/dist/autopilot/index.js
CHANGED
|
@@ -174,6 +174,11 @@ export function startAutopilot(deps) {
|
|
|
174
174
|
const input = document.createElement('textarea');
|
|
175
175
|
input.className = 'ap-textarea';
|
|
176
176
|
input.rows = 2;
|
|
177
|
+
// A visible label is an accessibility affordance AND what lets a
|
|
178
|
+
// synthetic user answer during certification (Level 2 finding:
|
|
179
|
+
// an unlabeled textarea is untargetable by visible-label acts).
|
|
180
|
+
input.placeholder = 'Type your answer';
|
|
181
|
+
input.setAttribute('aria-label', 'Your answer to the autopilot');
|
|
177
182
|
const row = document.createElement('div');
|
|
178
183
|
row.className = 'ap-row';
|
|
179
184
|
row.appendChild(button('Send', 'ap-primary', () => finish(input.value.trim())));
|
|
@@ -345,6 +350,14 @@ export function startAutopilot(deps) {
|
|
|
345
350
|
const pattern = route.replace(/:[^/]+/g, '[^/]+').replace(/\/+$/, '');
|
|
346
351
|
return new RegExp(`^${pattern}/?$`).test(path.replace(/\/+$/, '') || '/');
|
|
347
352
|
}
|
|
353
|
+
function previewMode() {
|
|
354
|
+
try {
|
|
355
|
+
return !!(sessionStorage.getItem('holostaff_autopilot_preview') || localStorage.getItem('holostaff_autopilot_preview'));
|
|
356
|
+
}
|
|
357
|
+
catch {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
348
361
|
function checkRoute() {
|
|
349
362
|
if (disposed || running)
|
|
350
363
|
return;
|
|
@@ -354,7 +367,11 @@ export function startAutopilot(deps) {
|
|
|
354
367
|
currentRoute = path;
|
|
355
368
|
removeEl(offerEl);
|
|
356
369
|
offerEl = null;
|
|
357
|
-
|
|
370
|
+
// Preview sessions (Level 2 certification) get the offer on any route:
|
|
371
|
+
// the certification scenario IS the intent, entry-route gating is a
|
|
372
|
+
// production nicety.
|
|
373
|
+
const entry = catalog.find(c => c.entryRoutes.some(r => routeMatches(r, path)))
|
|
374
|
+
?? (previewMode() ? catalog[0] : undefined);
|
|
358
375
|
if (entry)
|
|
359
376
|
showOffer(entry);
|
|
360
377
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/autopilot/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,oBAAoB,EAAwC,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,i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AACJ,CAAC"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";var __HolostaffSDK=(()=>{var _s=Object.create;var Tt=Object.defineProperty;var Fs=Object.getOwnPropertyDescriptor;var Bs=Object.getOwnPropertyNames;var Ps=Object.getPrototypeOf,Us=Object.prototype.hasOwnProperty;var At=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var H=(e,t)=>()=>(e&&(t=e(e=0)),t);var kt=(e,t)=>{for(var n in t)Tt(e,n,{get:t[n],enumerable:!0})},Wr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bs(t))!Us.call(e,o)&&o!==n&&Tt(e,o,{get:()=>t[o],enumerable:!(r=Fs(t,o))||r.enumerable});return e};var Ws=(e,t,n)=>(n=e!=null?_s(Ps(e)):{},Wr(t||!e||!e.__esModule?Tt(n,"default",{value:e,enumerable:!0}):n,e)),Vs=e=>Wr(Tt({},"__esModule",{value:!0}),e);function Qr(e){return e.nodeType===e.ELEMENT_NODE}function ze(e){var t=e?.host;return t?.shadowRoot===e}function He(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Xs(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function yn(e){try{var t=e.rules||e.cssRules;return t?Xs(Array.from(t).map(Sn).join("")):null}catch{return null}}function Sn(e){var t=e.cssText;if(Qs(e))try{t=yn(e.styleSheet)||t}catch{}return t}function Qs(e){return"styleSheet"in e}function Mt(){return new Cn}function lt(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,s=o||"";return(t[n.toLowerCase()]||t[r])&&(i?s=i(s):s="*".repeat(s.length)),s}function ea(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,s=Yr in i?i[Yr]:i,a=new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(a.some(function(l){return l!==0}))return!1}return!0}function In(){return ta++}function ra(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return na.test(t)?"div":t}function oa(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function ia(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}function Rt(e,t){return(e||"").replace(sa,function(n,r,o,i,s,a){var l=o||s||a,c=r||i||"";if(!l)return n;if(!aa.test(l)||la.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(ia(t)+l).concat(c,")");var d=t.split("/"),u=l.split("/");d.pop();for(var f=0,h=u;f<h.length;f++){var p=h[f];p!=="."&&(p===".."?d.pop():d.push(p))}return"url(".concat(c).concat(d.join("/")).concat(c,")")})}function ua(e,t){if(t.trim()==="")return t;var n=0;function r(c){var d,u=c.exec(t.substring(n));return u?(d=u[0],n+=d.length,d):""}for(var o=[];r(da),!(n>=t.length);){var i=r(ca);if(i.slice(-1)===",")i=et(e,i.substring(0,i.length-1)),o.push(i);else{var s="";i=et(e,i);for(var a=!1;;){var l=t.charAt(n);if(l===""){o.push((i+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,o.push((i+s).trim());break}else l==="("&&(a=!0);s+=l,n+=1}}}return o.join(", ")}function et(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function pa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function wn(){var e=document.createElement("a");return e.href="",e.href}function En(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?et(e,r):n==="srcset"&&r?ua(e,r):n==="style"&&r?Rt(r,wn()):t==="object"&&n==="data"&&r?et(e,r):r}function fa(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function at(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?at(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?at(e.parentNode,t,n):!1}function xn(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(at(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function ha(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var s=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(s),o=!0,t()});return}var a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function ma(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function ga(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,d=c===void 0?{}:c,u=t.maskTextFn,f=t.maskInputFn,h=t.dataURLOptions,p=h===void 0?{}:h,y=t.inlineImages,b=t.recordCanvas,m=t.keepIframeSrcFn,g=t.newlyAddedElement,v=g===void 0?!1:g,E=va(n,r);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:E};case e.ELEMENT_NODE:return ba(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:d,maskInputFn:f,dataURLOptions:p,inlineImages:y,recordCanvas:b,keepIframeSrcFn:m,newlyAddedElement:v,rootId:E});case e.TEXT_NODE:return ya(e,{maskTextClass:s,maskTextSelector:a,maskTextFn:u,rootId:E});case e.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:K.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function va(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function ya(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,s=t.rootId,a=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=a==="STYLE"?!0:void 0,d=a==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=oa(e.parentNode.sheet))}catch(u){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u),e)}l=Rt(l,wn())}return d&&(l="SCRIPT_PLACEHOLDER"),!c&&!d&&l&&xn(e,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:K.Text,textContent:l||"",isStyle:c,rootId:s}}function ba(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,s=t.maskInputOptions,a=s===void 0?{}:s,l=t.maskInputFn,c=t.dataURLOptions,d=c===void 0?{}:c,u=t.inlineImages,f=t.recordCanvas,h=t.keepIframeSrcFn,p=t.newlyAddedElement,y=p===void 0?!1:p,b=t.rootId,m=fa(e,r,o),g=ra(e),v={},E=e.attributes.length,N=0;N<E;N++){var k=e.attributes[N];v[k.name]=En(n,g,k.name,k.value)}if(g==="link"&&i){var O=Array.from(n.styleSheets).find(function(S){return S.href===e.href}),A=null;O&&(A=yn(O)),A&&(delete v.rel,delete v.href,v._cssText=Rt(A,O.href))}if(g==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var A=yn(e.sheet);A&&(v._cssText=Rt(A,wn()))}if(g==="input"||g==="textarea"||g==="select"){var $=e.value,V=e.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&$?v.value=lt({type:v.type,tagName:g,value:$,maskInputOptions:a,maskInputFn:l}):V&&(v.checked=V)}if(g==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),g==="canvas"&&f){if(e.__context==="2d")ea(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var F=e.toDataURL(d.type,d.quality),U=document.createElement("canvas");U.width=e.width,U.height=e.height;var W=U.toDataURL(d.type,d.quality);F!==W&&(v.rr_dataURL=F)}}if(g==="img"&&u){Qe||(Qe=n.createElement("canvas"),Zr=Qe.getContext("2d"));var R=e,I=R.crossOrigin;R.crossOrigin="anonymous";var w=function(){try{Qe.width=R.naturalWidth,Qe.height=R.naturalHeight,Zr.drawImage(R,0,0),v.rr_dataURL=Qe.toDataURL(d.type,d.quality)}catch(S){console.warn("Cannot inline img src=".concat(R.currentSrc,"! Error: ").concat(S))}I?v.crossOrigin=I:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?w():R.onload=w}if((g==="audio"||g==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),y||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),m){var x=e.getBoundingClientRect(),T=x.width,C=x.height;v={class:v.class,rr_width:"".concat(T,"px"),rr_height:"".concat(C,"px")}}return g==="iframe"&&!h(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:K.Element,tagName:g,attributes:v,childNodes:[],isSVG:pa(e)||void 0,needBlock:m,rootId:b}}function ee(e){return e===void 0?"":e.toLowerCase()}function Sa(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.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,d=t.inlineStylesheet,u=d===void 0?!0:d,f=t.maskInputOptions,h=f===void 0?{}:f,p=t.maskTextFn,y=t.maskInputFn,b=t.slimDOMOptions,m=t.dataURLOptions,g=m===void 0?{}:m,v=t.inlineImages,E=v===void 0?!1:v,N=t.recordCanvas,k=N===void 0?!1:N,O=t.onSerialize,A=t.onIframeLoad,$=t.iframeLoadTimeout,V=$===void 0?5e3:$,F=t.onStylesheetLoad,U=t.stylesheetLoadTimeout,W=U===void 0?5e3:U,R=t.keepIframeSrcFn,I=R===void 0?function(){return!1}:R,w=t.newlyAddedElement,x=w===void 0?!1:w,T=t.preserveWhiteSpace,C=T===void 0?!0:T,S=ga(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:a,inlineStylesheet:u,maskInputOptions:h,maskTextFn:p,maskInputFn:y,dataURLOptions:g,inlineImages:E,recordCanvas:k,keepIframeSrcFn:I,newlyAddedElement:x});if(!S)return console.warn(e,"not serialized"),null;var M;r.hasNode(e)?M=r.getId(e):Sa(S,b)||!C&&S.type===K.Text&&!S.isStyle&&!S.textContent.replace(/^\s+|\s+$/gm,"").length?M=$e:M=In();var L=Object.assign(S,{id:M});if(r.add(e,L),M===$e)return null;O&&O(e);var G=!c;if(L.type===K.Element){G=G&&!L.needBlock,delete L.needBlock;var B=e.shadowRoot;B&&He(B)&&(L.isShadowHost=!0)}if((L.type===K.Document||L.type===K.Element)&&G){b.headWhitespace&&L.type===K.Element&&L.tagName==="head"&&(C=!1);for(var z={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:p,maskInputFn:y,slimDOMOptions:b,dataURLOptions:g,inlineImages:E,recordCanvas:k,preserveWhiteSpace:C,onSerialize:O,onIframeLoad:A,iframeLoadTimeout:V,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:I},P=0,q=Array.from(e.childNodes);P<q.length;P++){var X=q[P],Q=Ge(X,z);Q&&L.childNodes.push(Q)}if(Qr(e)&&e.shadowRoot)for(var pe=0,Z=Array.from(e.shadowRoot.childNodes);pe<Z.length;pe++){var X=Z[pe],Q=Ge(X,z);Q&&(He(e.shadowRoot)&&(Q.isShadow=!0),L.childNodes.push(Q))}}return e.parentNode&&ze(e.parentNode)&&He(e.parentNode)&&(L.isShadow=!0),L.type===K.Element&&L.tagName==="iframe"&&ha(e,function(){var ce=e.contentDocument;if(ce&&A){var st=Ge(ce,{doc:ce,mirror:r,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:p,maskInputFn:y,slimDOMOptions:b,dataURLOptions:g,inlineImages:E,recordCanvas:k,preserveWhiteSpace:C,onSerialize:O,onIframeLoad:A,iframeLoadTimeout:V,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:I});st&&A(e,st)}},V),L.type===K.Element&&L.tagName==="link"&&L.attributes.rel==="stylesheet"&&ma(e,function(){if(F){var ce=Ge(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:p,maskInputFn:y,slimDOMOptions:b,dataURLOptions:g,inlineImages:E,recordCanvas:k,preserveWhiteSpace:C,onSerialize:O,onIframeLoad:A,iframeLoadTimeout:V,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:I});ce&&F(e,ce)}},W),L}function eo(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Cn:r,i=n.blockClass,s=i===void 0?"rr-block":i,a=n.blockSelector,l=a===void 0?null:a,c=n.maskTextClass,d=c===void 0?"rr-mask":c,u=n.maskTextSelector,f=u===void 0?null:u,h=n.inlineStylesheet,p=h===void 0?!0:h,y=n.inlineImages,b=y===void 0?!1:y,m=n.recordCanvas,g=m===void 0?!1:m,v=n.maskAllInputs,E=v===void 0?!1:v,N=n.maskTextFn,k=n.maskInputFn,O=n.slimDOM,A=O===void 0?!1:O,$=n.dataURLOptions,V=n.preserveWhiteSpace,F=n.onSerialize,U=n.onIframeLoad,W=n.iframeLoadTimeout,R=n.onStylesheetLoad,I=n.stylesheetLoadTimeout,w=n.keepIframeSrcFn,x=w===void 0?function(){return!1}:w,T=E===!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}:E===!1?{password:!0}:E,C=A===!0||A==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:A==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:A===!1?{}:A;return Ge(e,{doc:e,mirror:o,blockClass:s,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:T,maskTextFn:N,maskInputFn:k,slimDOMOptions:C,dataURLOptions:$,inlineImages:b,recordCanvas:g,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:U,iframeLoadTimeout:W,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:x,newlyAddedElement:!1})}function Ca(e,t){t===void 0&&(t={});var n=1,r=1;function o(C){var S=C.match(/\n/g);S&&(n+=S.length);var M=C.lastIndexOf(`
|
|
2
|
+
`);r=M===-1?r+C.length:C.length-M}function i(){var C={line:n,column:r};return function(S){return S.position=new s(C),p(),S}}var s=(function(){function C(S){this.start=S,this.end={line:n,column:r},this.source=t.source}return C})();s.prototype.content=e;var a=[];function l(C){var S=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(C));if(S.reason=C,S.filename=t.source,S.line=n,S.column=r,S.source=e,t.silent)a.push(S);else throw S}function c(){var C=f();return{type:"stylesheet",stylesheet:{source:t.source,rules:C,parsingErrors:a}}}function d(){return h(/^{\s*/)}function u(){return h(/^}/)}function f(){var C,S=[];for(p(),y(S);e.length&&e.charAt(0)!=="}"&&(C=x()||T());)C!==!1&&(S.push(C),y(S));return S}function h(C){var S=C.exec(e);if(S){var M=S[0];return o(M),e=e.slice(M.length),S}}function p(){h(/^\s*/)}function y(C){C===void 0&&(C=[]);for(var S;S=b();)S!==!1&&C.push(S),S=b();return C}function b(){var C=i();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var S=2;e.charAt(S)!==""&&(e.charAt(S)!=="*"||e.charAt(S+1)!=="/");)++S;if(S+=2,e.charAt(S-1)==="")return l("End of comment missing");var M=e.slice(2,S-2);return r+=2,o(M),e=e.slice(S),r+=2,C({type:"comment",comment:M})}}function m(){var C=h(/^([^{]+)/);if(C)return Ae(C[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(S){return S.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(S){return S.replace(/\u200C/g,",")})}function g(){var C=i(),S=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(S){var M=Ae(S[0]);if(!h(/^:\s*/))return l("property missing ':'");var L=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),G=C({type:"declaration",property:M.replace(Jr,""),value:L?Ae(L[0]).replace(Jr,""):""});return h(/^[;\s]*/),G}}function v(){var C=[];if(!d())return l("missing '{'");y(C);for(var S;S=g();)S!==!1&&(C.push(S),y(C)),S=g();return u()?C:l("missing '}'")}function E(){for(var C,S=[],M=i();C=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)S.push(C[1]),h(/^,\s*/);if(S.length)return M({type:"keyframe",values:S,declarations:v()})}function N(){var C=i(),S=h(/^@([-\w]+)?keyframes\s*/);if(S){var M=S[1];if(S=h(/^([-\w]+)\s*/),!S)return l("@keyframes missing name");var L=S[1];if(!d())return l("@keyframes missing '{'");for(var G,B=y();G=E();)B.push(G),B=B.concat(y());return u()?C({type:"keyframes",name:L,vendor:M,keyframes:B}):l("@keyframes missing '}'")}}function k(){var C=i(),S=h(/^@supports *([^{]+)/);if(S){var M=Ae(S[1]);if(!d())return l("@supports missing '{'");var L=y().concat(f());return u()?C({type:"supports",supports:M,rules:L}):l("@supports missing '}'")}}function O(){var C=i(),S=h(/^@host\s*/);if(S){if(!d())return l("@host missing '{'");var M=y().concat(f());return u()?C({type:"host",rules:M}):l("@host missing '}'")}}function A(){var C=i(),S=h(/^@media *([^{]+)/);if(S){var M=Ae(S[1]);if(!d())return l("@media missing '{'");var L=y().concat(f());return u()?C({type:"media",media:M,rules:L}):l("@media missing '}'")}}function $(){var C=i(),S=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(S)return C({type:"custom-media",name:Ae(S[1]),media:Ae(S[2])})}function V(){var C=i(),S=h(/^@page */);if(S){var M=m()||[];if(!d())return l("@page missing '{'");for(var L=y(),G;G=g();)L.push(G),L=L.concat(y());return u()?C({type:"page",selectors:M,declarations:L}):l("@page missing '}'")}}function F(){var C=i(),S=h(/^@([-\w]+)?document *([^{]+)/);if(S){var M=Ae(S[1]),L=Ae(S[2]);if(!d())return l("@document missing '{'");var G=y().concat(f());return u()?C({type:"document",document:L,vendor:M,rules:G}):l("@document missing '}'")}}function U(){var C=i(),S=h(/^@font-face\s*/);if(S){if(!d())return l("@font-face missing '{'");for(var M=y(),L;L=g();)M.push(L),M=M.concat(y());return u()?C({type:"font-face",declarations:M}):l("@font-face missing '}'")}}var W=w("import"),R=w("charset"),I=w("namespace");function w(C){var S=new RegExp("^@"+C+"\\s*([^;]+);");return function(){var M=i(),L=h(S);if(L){var G={type:C};return G[C]=L[1].trim(),M(G)}}}function x(){if(e[0]==="@")return N()||A()||$()||k()||W()||R()||I()||F()||V()||O()||U()}function T(){var C=i(),S=m();return S?(y(),C({type:"rule",selectors:S,declarations:v()})):l("selector missing")}return bn(c())}function Ae(e){return e?e.replace(/^\s+|\s+$/g,""):""}function bn(e,t){for(var n=e&&typeof e.type=="string",r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var s=i[o],a=e[s];Array.isArray(a)?a.forEach(function(l){bn(l,r)}):a&&typeof a=="object"&&bn(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}function Ia(e){var t=qr[e.tagName]?qr[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function wa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xr(e,t){var n=t?.stylesWithHoverClass.get(e);if(n)return n;var r=Ca(e,{silent:!0});if(!r.stylesheet)return e;var o=[];if(r.stylesheet.rules.forEach(function(a){"selectors"in a&&(a.selectors||[]).forEach(function(l){to.test(l)&&o.push(l)})}),o.length===0)return e;var i=new RegExp(o.filter(function(a,l){return o.indexOf(a)===l}).sort(function(a,l){return l.length-a.length}).map(function(a){return wa(a)}).join("|"),"g"),s=e.replace(i,function(a){var l=a.replace(Ea,"$1.\\:hover");return"".concat(a,", ").concat(l)});return t?.stylesWithHoverClass.set(e,s),s}function Tn(){var e=new Map;return{stylesWithHoverClass:e}}function xa(e,t){var n=t.doc,r=t.hackCss,o=t.cache;switch(e.type){case K.Document:return n.implementation.createDocument(null,"",null);case K.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case K.Element:{var i=Ia(e),s;e.isSVG?s=n.createElementNS("http://www.w3.org/2000/svg",i):s=n.createElement(i);var a={};for(var l in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,l)){var c=e.attributes[l];if(!(i==="option"&&l==="selected"&&c===!1)){if(c===!0&&(c=""),l.startsWith("rr_")){a[l]=c;continue}var d=i==="textarea"&&l==="value",u=i==="style"&&l==="_cssText";if(u&&r&&typeof c=="string"&&(c=Xr(c,o)),(d||u)&&typeof c=="string"){for(var f=n.createTextNode(c),h=0,p=Array.from(s.childNodes);h<p.length;h++){var y=p[h];y.nodeType===s.TEXT_NODE&&s.removeChild(y)}s.appendChild(f);continue}try{if(e.isSVG&&l==="xlink:href")s.setAttributeNS("http://www.w3.org/1999/xlink",l,c.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")s.setAttribute("_"+l,c.toString());else if(i==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){s.setAttribute("csp-content",c.toString());continue}else i==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||i==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(i==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?s.setAttribute("rrweb-original-srcset",e.attributes.srcset):s.setAttribute(l,c.toString()))}catch{}}}var b=function(g){var v=a[g];if(i==="canvas"&&g==="rr_dataURL"){var E=document.createElement("img");E.onload=function(){var k=s.getContext("2d");k&&k.drawImage(E,0,0,E.width,E.height)},E.src=v.toString(),s.RRNodeType&&(s.rr_dataURL=v.toString())}else if(i==="img"&&g==="rr_dataURL"){var N=s;N.currentSrc.startsWith("data:")||(N.setAttribute("rrweb-original-src",e.attributes.src),N.src=v.toString())}if(g==="rr_width")s.style.width=v.toString();else if(g==="rr_height")s.style.height=v.toString();else if(g==="rr_mediaCurrentTime"&&typeof v=="number")s.currentTime=v;else if(g==="rr_mediaState")switch(v){case"played":s.play().catch(function(k){return console.warn("media playback error",k)});break;case"paused":s.pause();break}};for(var m in a)b(m);if(e.isShadowHost)if(!s.shadowRoot)s.attachShadow({mode:"open"});else for(;s.shadowRoot.firstChild;)s.shadowRoot.removeChild(s.shadowRoot.firstChild);return s}case K.Text:return n.createTextNode(e.isStyle&&r?Xr(e.textContent,o):e.textContent);case K.CDATA:return n.createCDATASection(e.textContent);case K.Comment:return n.createComment(e.textContent);default:return null}}function tt(e,t){var n=t.doc,r=t.mirror,o=t.skipChild,i=o===void 0?!1:o,s=t.hackCss,a=s===void 0?!0:s,l=t.afterAppend,c=t.cache,d=xa(e,{doc:n,hackCss:a,cache:c});if(!d)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===K.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==K.DocumentType&&(e.childNodes[0].type===K.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=n),r.add(d,e),(e.type===K.Document||e.type===K.Element)&&!i)for(var u=0,f=e.childNodes;u<f.length;u++){var h=f[u],p=tt(h,{doc:n,mirror:r,skipChild:!1,hackCss:a,afterAppend:l,cache:c});if(!p){console.warn("Failed to rebuild",h);continue}h.isShadow&&Qr(d)&&d.shadowRoot?d.shadowRoot.appendChild(p):d.appendChild(p),l&&l(p,h.id)}return d}function Ta(e,t){function n(s){t(s)}for(var r=0,o=e.getIds();r<o.length;r++){var i=o[r];e.has(i)&&n(e.getNode(i))}}function Aa(e,t){var n=t.getMeta(e);if(n?.type===K.Element){var r=e;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];o==="rr_scrollLeft"&&(r.scrollLeft=i),o==="rr_scrollTop"&&(r.scrollTop=i)}}}function no(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,i=o===void 0?!0:o,s=t.afterAppend,a=t.cache,l=t.mirror,c=l===void 0?new Cn:l,d=tt(e,{doc:n,mirror:c,skipChild:!1,hackCss:i,afterAppend:s,cache:a});return Ta(c,function(u){r&&r(u),Aa(u,c)}),d}var K,Cn,Yr,ta,na,$e,Qe,Zr,sa,aa,la,ca,da,Jr,qr,to,Ea,ke=H(()=>{(function(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"})(K||(K={}));Cn=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();Yr="__rrweb_original__";ta=1,na=new RegExp("[^a-z0-9-_:]"),$e=-2;sa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,aa=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,la=/^(data:)([^,]*),(.*)/i;ca=/^[^ \t\n\r\u000c]+/,da=/^[, \t\n\r\u000c]+/;Jr=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;qr={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};to=/([^\\]):hover/,Ea=new RegExp(to.source,"g")});var Rn={};kt(Rn,{StyleSheetMirror:()=>Ke,_mirror:()=>ct,getBaseDimension:()=>_t,getNestedRule:()=>Ye,getPositionsAndIndex:()=>Ft,getWindowHeight:()=>dt,getWindowWidth:()=>ut,hasShadowRoot:()=>xe,hookSetter:()=>Le,isAncestorRemoved:()=>Ot,isBlocked:()=>te,isIgnored:()=>pt,isSerialized:()=>An,isSerializedIframe:()=>Ne,isSerializedStylesheet:()=>ht,isTouchEvent:()=>Dt,iterateResolveTree:()=>Lt,on:()=>le,patch:()=>me,polyfill:()=>ft,queueToResolveTrees:()=>kn,throttle:()=>je,uniqueTextMutations:()=>Nn});function le(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}function je(e,t,n={}){let r=null,o=0;return function(...i){let s=Date.now();!o&&n.leading===!1&&(o=s);let a=t-(s-o),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=s,e.apply(l,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function Le(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){setTimeout(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Le(e,t,i||{},!0)}function me(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function dt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ut(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function te(e,t,n,r){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(at(o,t,r))return!0;return!!(n&&(e.matches(n)||r&&o.closest(n)!==null))}function An(e,t){return t.getId(e)!==-1}function pt(e,t){return t.getId(e)===$e}function Ot(e,t){if(ze(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ot(e.parentNode,t):!0:!0}function Dt(e){return!!e.changedTouches}function ft(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),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function kn(e){let t={},n=(o,i)=>{let s={value:o,parent:i,children:[]};return t[o.node.id]=s,s},r=[];for(let o of e){let{nextId:i,parentId:s}=o;if(i&&i in t){let a=t[i];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,n(o,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,n(o,null))}continue}if(s in t){let a=t[s];a.children.push(n(o,a));continue}r.push(n(o,null))}return r}function Lt(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)Lt(e.children[n],t)}function Ne(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function ht(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _t(e,t){var n,r;let o=(r=(n=e.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let i=o.getBoundingClientRect(),s=_t(o,t),a=i.height/o.clientHeight;return{x:i.x*s.relativeScale+s.x,y:i.y*s.relativeScale+s.y,relativeScale:a,absoluteScale:s.absoluteScale*a}}function xe(e){return!!e?.shadowRoot}function Ye(e,t){let n=e[t[0]];return t.length===1?n:Ye(n.cssRules[t[1]].cssRules,t.slice(2))}function Ft(e){let t=[...e],n=t.pop();return{positions:t,index:n}}function Nn(e){let t=new Set,n=[];for(let r=e.length;r--;){let o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}var nt,ct,Ke,ge=H(()=>{ke();nt=`Please stop import mirror directly. Instead of that,\r
|
|
3
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
4
|
+
or you can use record.mirror to access the mirror instance during recording.`,ct={map:{},getId(){return console.error(nt),-1},getNode(){return console.error(nt),null},removeNodeFromMap(){console.error(nt)},has(){return console.error(nt),!1},reset(){console.error(nt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ct=new Proxy(ct,{get(e,t,n){return t==="map"&&console.error(nt),Reflect.get(e,t,n)}}));Ke=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}});var _,D,re,ve,Y,ye=H(()=>{_=(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))(_||{}),D=(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))(D||{}),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||{}),ve=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ve||{}),Y=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(Y||{})});function ro(e){return"__ln"in e}function On(e,t){e.delete(t),t.childNodes.forEach(n=>On(e,n))}function io(e,t,n){return e.length===0?!1:ao(e,t,n)}function ao(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:ao(e,r,n)}function so(e,t){return e.size===0?!1:lo(e,t)}function lo(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:lo(e,n):!1}var Mn,oo,Bt,co=H(()=>{ke();ge();Mn=class{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&ro(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&ro(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}},oo=(e,t)=>`${e}@${t}`,Bt=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Mn,r=a=>{let l=a,c=$e;for(;c===$e;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},o=a=>{var l,c,d,u;let f=null;((c=(l=a.getRootNode)===null||l===void 0?void 0:l.call(a))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(f=a.getRootNode().host);let h=f;for(;((u=(d=h?.getRootNode)===null||d===void 0?void 0:d.call(h))===null||u===void 0?void 0:u.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&h.getRootNode().host;)h=h.getRootNode().host;let p=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||p)return;let y=ze(a.parentNode)?this.mirror.getId(f):this.mirror.getId(a.parentNode),b=r(a);if(y===-1||b===-1)return n.addNode(a);let m=Ge(a,{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:g=>{Ne(g,this.mirror)&&this.iframeManager.addIframe(g),ht(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),xe(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(g,v)=>{this.iframeManager.attachIframe(g,v),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,v)=>{this.stylesheetManager.attachLinkElement(g,v)}});m&&t.push({parentId:y,nextId:b,node:m})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of Array.from(this.movedSet.values()))io(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(let a of Array.from(this.addedSet.values()))!so(this.droppedSet,a)&&!io(this.removes,a,this.mirror)||so(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;n.length;){let a=null;if(i){let l=this.mirror.getId(i.value.parentNode),c=r(i.value);l!==-1&&c!==-1&&(a=i)}if(!a)for(let l=n.length-1;l>=0;l--){let c=n.get(l);if(c){let d=this.mirror.getId(c.value.parentNode);if(r(c.value)===-1)continue;if(d!==-1){a=c;break}else{let f=c.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){a=c;break}}}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}i=a.previous,n.removeNode(a.value),o(a.value)}let s={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!pt(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!te(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:xn(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=lt({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),te(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){let i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let s=o.attributes.style;for(let a of Array.from(n.style)){let l=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(l!==i.style.getPropertyValue(a)||c!==i.style.getPropertyPriority(a))&&(c===""?s[a]=l:s[a]=[l,c])}for(let a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(s[a]=!1)}else o.attributes[t.attributeName]=En(this.doc,n.tagName,t.attributeName,r);break}case"childList":{if(te(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=ze(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);te(t.target,this.blockClass,this.blockSelector,!1)||pt(n,this.mirror)||!An(n,this.mirror)||(this.addedSet.has(n)?(On(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Ot(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[oo(r,o)]?On(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:ze(t.target)&&He(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(pt(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[oo(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);te(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=t[n]})}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 mt(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Dn(e,t){var n,r;let o=new Bt;Fe.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver,s=(r=(n=window?.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);let a=new i(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function ka({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,l=je(u=>{let f=Date.now()-a;e(s.map(h=>(h.timeOffset-=f,h)),u),s=[],a=null},i),c=je(u=>{let f=mt(u),{clientX:h,clientY:p}=Dt(u)?u.changedTouches[0]:u;a||(a=Date.now()),s.push({x:h,y:p,id:r.getId(f),timeOffset:Date.now()-a}),l(typeof DragEvent<"u"&&u instanceof DragEvent?D.Drag:u instanceof MouseEvent?D.MouseMove:D.TouchMove)},o,{trailing:!1}),d=[le("mousemove",c,n),le("touchmove",c,n),le("drag",c,n)];return()=>{d.forEach(u=>u())}}function Na({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let s=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,a=[],l=c=>d=>{let u=mt(d);if(te(u,r,o,!0))return;let f=Dt(d)?d.changedTouches[0]:d;if(!f)return;let h=n.getId(u),{clientX:p,clientY:y}=f;e({type:re[c],id:h,x:p,y})};return Object.keys(re).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{let d=c.toLowerCase(),u=l(c);a.push(le(d,u,t))}),()=>{a.forEach(c=>c())}}function Ln({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){let s=je(a=>{let l=mt(a);if(!l||te(l,r,o,!0))return;let c=n.getId(l);if(l===t){let d=t.scrollingElement||t.documentElement;e({id:c,x:d.scrollLeft,y:d.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},i.scroll||100);return le("scroll",s,t)}function Ra({viewportResizeCb:e}){let t=-1,n=-1,r=je(()=>{let o=dt(),i=ut();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return le("resize",r,window)}function uo(e,t){let n=Object.assign({},e);return t||delete n.userTriggered,n}function Oa({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:s,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function d(m){let g=mt(m),v=m.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Ma.indexOf(g.tagName)<0||te(g,r,o,!0))return;let E=g.type;if(g.classList.contains(i))return;let N=g.value,k=!1;E==="radio"||E==="checkbox"?k=g.checked:(s[g.tagName.toLowerCase()]||s[E])&&(N=lt({maskInputOptions:s,tagName:g.tagName,type:E,value:N,maskInputFn:a})),u(g,uo({text:N,isChecked:k,userTriggered:v},c));let O=g.name;E==="radio"&&O&&k&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(A=>{A!==g&&u(A,uo({text:A.value,isChecked:!k,userTriggered:!1},c))})}function u(m,g){let v=po.get(m);if(!v||v.text!==g.text||v.isChecked!==g.isChecked){po.set(m,g);let E=n.getId(m);e(Object.assign(Object.assign({},g),{id:E}))}}let h=(l.input==="last"?["change"]:["input","change"]).map(m=>le(m,d,t)),p=t.defaultView;if(!p)return()=>{h.forEach(m=>m())};let y=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&h.push(...b.map(m=>Le(m[0],m[1],{set(){d({target:this})}},!1,p))),()=>{h.forEach(m=>m())}}function Pt(e){let t=[];function n(r,o){if(fo&&r.parentRule instanceof CSSGroupingRule||ho&&r.parentRule instanceof CSSMediaRule||mo&&r.parentRule instanceof CSSSupportsRule||go&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function _e(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Da({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(d,u){let{id:f,styleId:h}=_e(this,t,n.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,adds:[{rule:d,index:u}]}),o.apply(this,[d,u])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(d){let{id:u,styleId:f}=_e(this,t,n.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,removes:[{index:d}]}),i.apply(this,[d])};let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(d){let{id:u,styleId:f}=_e(this,t,n.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,replace:d}),s.apply(this,[d])});let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(d){let{id:u,styleId:f}=_e(this,t,n.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,replaceSync:d}),a.apply(this,[d])});let l={};fo?l.CSSGroupingRule=r.CSSGroupingRule:(ho&&(l.CSSMediaRule=r.CSSMediaRule),go&&(l.CSSConditionRule=r.CSSConditionRule),mo&&(l.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(l).forEach(([d,u])=>{c[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=function(f,h){let{id:p,styleId:y}=_e(this.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,adds:[{rule:f,index:[...Pt(this),h||0]}]}),c[d].insertRule.apply(this,[f,h])},u.prototype.deleteRule=function(f){let{id:h,styleId:p}=_e(this.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,removes:[{index:[...Pt(this),f]}]}),c[d].deleteRule.apply(this,[f])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([d,u])=>{u.prototype.insertRule=c[d].insertRule,u.prototype.deleteRule=c[d].deleteRule})}}function _n({mirror:e,stylesheetManager:t},n){var r,o,i;let s=null;n.nodeName==="#document"?s=e.getId(n):s=e.getId(n.host);let a=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=(o=n.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,l=Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets");return s===null||s===-1||!a||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var d;let u=(d=l.set)===null||d===void 0?void 0:d.call(this,c);if(s!==null&&s!==-1)try{t.adoptStyleSheets(c,s)}catch{}return u}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function La({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(a,l,c){var d;if(n.has(a))return i.apply(this,[a,l,c]);let{id:u,styleId:f}=_e((d=this.parentRule)===null||d===void 0?void 0:d.parentStyleSheet,t,r.styleMirror);return(u&&u!==-1||f&&f!==-1)&&e({id:u,styleId:f,set:{property:a,value:l,priority:c},index:Pt(this.parentRule)}),i.apply(this,[a,l,c])};let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(a){var l;if(n.has(a))return s.apply(this,[a]);let{id:c,styleId:d}=_e((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&c!==-1||d&&d!==-1)&&e({id:c,styleId:d,remove:{property:a},index:Pt(this.parentRule)}),s.apply(this,[a])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s}}function _a({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){let i=a=>je(l=>{let c=mt(l);if(!c||te(c,t,n,!0))return;let{currentTime:d,volume:u,muted:f,playbackRate:h}=c;e({type:a,id:r.getId(c),currentTime:d,volume:u,muted:f,playbackRate:h})},o.media||500),s=[le("play",i(0)),le("pause",i(1)),le("seeked",i(2)),le("volumechange",i(3)),le("ratechange",i(4))];return()=>{s.forEach(a=>a())}}function Fa({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,d){let u=new i(l,c,d);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:d,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};let s=me(t.fonts,"add",function(a){return function(l){return setTimeout(()=>{let c=o.get(l);c&&(e(c),o.delete(l))},0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(s),()=>{r.forEach(a=>a())}}function Ba(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,s=!0,a=()=>{let l=t.getSelection();if(!l||s&&l?.isCollapsed)return;s=l.isCollapsed||!1;let c=[],d=l.rangeCount||0;for(let u=0;u<d;u++){let f=l.getRangeAt(u),{startContainer:h,startOffset:p,endContainer:y,endOffset:b}=f;te(h,r,o,!0)||te(y,r,o,!0)||c.push({start:n.getId(h),startOffset:p,end:n.getId(y),endOffset:b})}i({ranges:c})};return a(),le("selectionchange",a)}function Pa(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:f,selectionCb:h}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),n(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),r(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),o(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),i(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),s(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),a(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),l(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),d(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),u(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),f(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)}}function vo(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};Pa(e,t);let r=Dn(e,e.doc),o=ka(e),i=Na(e),s=Ln(e),a=Ra(e),l=Oa(e),c=_a(e),d=Da(e,{win:n}),u=_n(e,e.doc),f=La(e,{win:n}),h=e.collectFonts?Fa(e):()=>{},p=Ba(e),y=[];for(let b of e.plugins)y.push(b.observer(b.callback,n,b.options));return()=>{Fe.forEach(b=>b.reset()),r.disconnect(),o(),i(),s(),a(),l(),c(),d(),u(),f(),h(),p(),y.forEach(b=>b())}}var Fe,fo,ho,mo,go,Ma,po,Fn=H(()=>{ke();ge();ye();co();Fe=[],fo=typeof CSSGroupingRule<"u",ho=typeof CSSMediaRule<"u",mo=typeof CSSSupportsRule<"u",go=typeof CSSConditionRule<"u";Ma=["INPUT","TEXTAREA","SELECT"],po=new WeakMap});var gt,yo=H(()=>{gt=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}});var Ut,bo=H(()=>{ke();yo();ye();Ut=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new gt(In),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}}transformCrossOriginEvent(t,n){var r;switch(n.type){case _.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t),{timestamp:n.timestamp,type:_.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return n;case _.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case _.IncrementalSnapshot:switch(n.data.source){case D.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case D.Drag:case D.TouchMove:case D.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(n.data,t,["id"]),n;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case D.Font:return n;case D.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case D.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}}});var Wt,So=H(()=>{Fn();ge();ke();Wt=class{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;let n=this;this.restorePatches.push(me(Element.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}))}addShadowRoot(t,n){He(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Dn(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Ln(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),_n({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){let n=this;this.restorePatches.push(me(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),i}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}}});function Co(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function be(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(d){try{c(r.next(d))}catch(u){s(u)}}function l(d){try{c(r.throw(d))}catch(u){s(u)}}function c(d){d.done?i(d.value):o(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}var Ze=H(()=>{});var rt,yt,vt,Io,wo,Bn=H(()=>{rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(vt=0;vt<rt.length;vt++)yt[rt.charCodeAt(vt)]=vt;Io=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=rt[t[n]>>2],o+=rt[(t[n]&3)<<4|t[n+1]>>4],o+=rt[(t[n+1]&15)<<2|t[n+2]>>6],o+=rt[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},wo=function(e){var t=e.length*.75,n=e.length,r,o=0,i,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)i=yt[e.charCodeAt(r)],s=yt[e.charCodeAt(r+1)],a=yt[e.charCodeAt(r+2)],l=yt[e.charCodeAt(r+3)],d[o++]=i<<2|s>>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c}});function Ua(e,t){let n=Eo.get(e);return n||(n=new Map,Eo.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Vt(e,t,n){if(e instanceof Array)return e.map(r=>Vt(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=Io(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Vt(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Vt(e.data,t,n),e.width,e.height]};if(xo(e,t)||typeof e=="object"){let r=e.constructor.name,o=Pn(e,t,n);return{rr_type:r,index:o}}}}return e}var Eo,Pn,Gt,xo,Un=H(()=>{Bn();Eo=new Map;Pn=(e,t,n)=>{if(!e||!(xo(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=Ua(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};Gt=(e,t,n)=>[...e].map(r=>Vt(r,t,n)),xo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o])});function To(e,t,n,r){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of i)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=me(t.CanvasRenderingContext2D.prototype,s,function(l){return function(...c){return te(this.canvas,n,r,!0)||setTimeout(()=>{let d=Gt([...c],t,this);e(this.canvas,{type:ve["2D"],property:s,args:d})},0),l.apply(this,c)}});o.push(a)}catch{let l=Le(t.CanvasRenderingContext2D.prototype,s,{set(c){e(this.canvas,{type:ve["2D"],property:s,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(s=>s())}}var Ao=H(()=>{ye();ge();Un()});function Wn(e,t,n){let r=[];try{let o=me(e.HTMLCanvasElement.prototype,"getContext",function(i){return function(s,...a){return te(this,t,n,!0)||"__context"in this||(this.__context=s),i.apply(this,[s,...a])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(o=>o())}}var ko=H(()=>{ge()});function No(e,t,n,r,o,i,s){let a=[],l=Object.getOwnPropertyNames(e);for(let c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;let d=me(e,c,function(u){return function(...f){let h=u.apply(this,f);if(Pn(h,s,this),!te(this.canvas,r,o,!0)){let p=Gt([...f],s,this),y={type:t,property:c,args:p};n(this.canvas,y)}return h}});a.push(d)}catch{let u=Le(e,c,{set(f){n(this.canvas,{type:t,property:c,args:[f],setter:!0})}});a.push(u)}return a}function Ro(e,t,n,r,o){let i=[];return i.push(...No(t.WebGLRenderingContext.prototype,ve.WebGL,e,n,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...No(t.WebGL2RenderingContext.prototype,ve.WebGL2,e,n,r,o,t)),()=>{i.forEach(s=>s())}}var Mo=H(()=>{ye();ge();Un()});var Vn,Oo,Do=H(()=>{Vn=null;try{Oo=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof At=="function"&&At("worker_threads"),Vn=Oo.Worker}catch{}});function Wa(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function Lo(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Wa(e,o),s=i.indexOf(`
|
|
5
|
+
`,10)+1,a=i.substring(s)+(r?"//# sourceMappingURL="+r:"");return function(c){return new Vn(a,Object.assign({},c,{eval:!0}))}}var _o=H(()=>{Do()});function Va(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Ga(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Va(e,o),s=i.indexOf(`
|
|
6
|
+
`,10)+1,a=i.substring(s)+(r?"//# sourceMappingURL="+r:""),l=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(l)}function Fo(e,t,n){var r;return function(i){return r=r||Ga(e,t,n),new Worker(r,i)}}var Bo=H(()=>{});function Po(){return Ha}var Ha,Uo=H(()=>{Ha=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});function Wo(e,t,n){return Po()?Lo(e,t,n):Fo(e,t,n)}var Vo=H(()=>{_o();Bo();Uo()});var Go,Ho=H(()=>{Vo();Go=Wo("Lyogcm9sb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ZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1)});var Ht,$o=H(()=>{Ze();ge();ye();Ao();ko();Mo();Ho();Ht=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(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(c)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o,i),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,{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(t,n,r,o,i){let s=Wn(n,r,o),a=new Map,l=new Go;l.onmessage=p=>{let{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;let{base64:b,type:m,width:g,height:v}=p.data;this.mutationCb({id:y,type:ve["2D"],commands:[{property:"clearRect",args:[0,0,g,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:b}],type:m}]},0,0]}]})};let c=1e3/t,d=0,u,f=()=>{let p=[];return n.document.querySelectorAll("canvas").forEach(y=>{te(y,r,o,!0)||p.push(y)}),p},h=p=>{if(d&&p-d<c){u=requestAnimationFrame(h);return}d=p,f().forEach(y=>be(this,void 0,void 0,function*(){var b;let m=this.mirror.getId(y);if(a.get(m))return;if(a.set(m,!0),["webgl","webgl2"].includes(y.__context)){let v=y.getContext(y.__context);((b=v?.getContextAttributes())===null||b===void 0?void 0:b.preserveDrawingBuffer)===!1&&v?.clear(v.COLOR_BUFFER_BIT)}let g=yield createImageBitmap(y);l.postMessage({id:m,bitmap:g,width:y.width,height:y.height,dataURLOptions:i.dataURLOptions},[g])})),u=requestAnimationFrame(h)};u=requestAnimationFrame(h),this.resetObservers=()=>{s(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Wn(t,n,r),i=To(this.processMutation.bind(this),t,n,r),s=Ro(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{o(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(s=>Co(s,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}});var $t,zo=H(()=>{ke();ge();$t=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Ke,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let s;if(this.styleMirror.has(i))s=this.styleMirror.getId(i);else{s=this.styleMirror.add(i);let a=Array.from(i.rules||CSSRule);o.push({styleId:s,rules:a.map((l,c)=>({rule:Sn(l),index:c}))})}r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}});function ae(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}function Re(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:u,slimDOMOptions:f,maskInputFn:h,maskTextFn:p,hooks:y,packFn:b,sampling:m={},dataURLOptions:g={},mousemoveWait:v,recordCanvas:E=!1,recordCrossOriginIframes:N=!1,userTriggeredOnInput:k=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:$,keepIframeSrcFn:V=()=>!1,ignoreCSSAttributes:F=new Set([])}=e,U=N?window.parent===window:!0,W=!1;if(!U)try{window.parent.document,W=!1}catch{W=!0}if(U&&!t)throw new Error("emit function is required");v!==void 0&&m.mousemove===void 0&&(m.mousemove=v),Ce.reset();let R=d===!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}:u!==void 0?u:{password:!0},I=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};ft();let w,x=0,T=P=>{for(let q of $||[])q.eventProcessor&&(P=q.eventProcessor(P));return b&&(P=b(P)),P};oe=(P,q)=>{var X;if(!((X=Fe[0])===null||X===void 0)&&X.isFrozen()&&P.type!==_.FullSnapshot&&!(P.type===_.IncrementalSnapshot&&P.data.source===D.Mutation)&&Fe.forEach(Q=>Q.unfreeze()),U)t?.(T(P),q);else if(W){let Q={type:"rrweb",event:T(P),isCheckout:q};window.parent.postMessage(Q,"*")}if(P.type===_.FullSnapshot)w=P,x=0;else if(P.type===_.IncrementalSnapshot){if(P.data.source===D.Mutation&&P.data.isAttachIframe)return;x++;let Q=r&&x>=r,pe=n&&P.timestamp-w.timestamp>n;(Q||pe)&&zt(!0)}};let C=P=>{oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.Mutation},P)}))},S=P=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.Scroll},P)})),M=P=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.CanvasMutation},P)})),L=P=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.AdoptedStyleSheet},P)})),G=new $t({mutationCb:C,adoptedStyleSheetCb:L}),B=new Ut({mirror:Ce,mutationCb:C,stylesheetManager:G,recordCrossOriginIframes:N,wrappedEmit:oe});for(let P of $||[])P.getMirror&&P.getMirror({nodeMirror:Ce,crossOriginIframeMirror:B.crossOriginIframeMirror,crossOriginIframeStyleMirror:B.crossOriginIframeStyleMirror});Gn=new Ht({recordCanvas:E,mutationCb:M,win:window,blockClass:o,blockSelector:i,mirror:Ce,sampling:m.canvas,dataURLOptions:g});let z=new Wt({mutationCb:C,scrollCb:S,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:R,dataURLOptions:g,maskTextFn:p,maskInputFn:h,recordCanvas:E,inlineImages:A,sampling:m,slimDOMOptions:I,iframeManager:B,stylesheetManager:G,canvasManager:Gn,keepIframeSrcFn:V},mirror:Ce});zt=(P=!1)=>{var q,X,Q,pe,Z,ce;oe(ae({type:_.Meta,data:{href:window.location.href,width:ut(),height:dt()}}),P),G.reset(),Fe.forEach(se=>se.lock());let st=eo(document,{mirror:Ce,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:R,maskTextFn:p,slimDOM:I,dataURLOptions:g,recordCanvas:E,inlineImages:A,onSerialize:se=>{Ne(se,Ce)&&B.addIframe(se),ht(se,Ce)&&G.trackLinkElement(se),xe(se)&&z.addShadowRoot(se.shadowRoot,document)},onIframeLoad:(se,dn)=>{B.attachIframe(se,dn),z.observeAttachShadow(se)},onStylesheetLoad:(se,dn)=>{G.attachLinkElement(se,dn)},keepIframeSrcFn:V});if(!st)return console.warn("Failed to snapshot the document");oe(ae({type:_.FullSnapshot,data:{node:st,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(q=document?.body)===null||q===void 0?void 0:q.parentElement)===null||X===void 0?void 0:X.scrollLeft)||((Q=document?.body)===null||Q===void 0?void 0:Q.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((Z=(pe=document?.body)===null||pe===void 0?void 0:pe.parentElement)===null||Z===void 0?void 0:Z.scrollTop)||((ce=document?.body)===null||ce===void 0?void 0:ce.scrollTop)||0}}})),Fe.forEach(se=>se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,Ce.getId(document))};try{let P=[];P.push(le("DOMContentLoaded",()=>{oe(ae({type:_.DomContentLoaded,data:{}}))}));let q=Q=>{var pe;return vo({mutationCb:C,mousemoveCb:(Z,ce)=>oe(ae({type:_.IncrementalSnapshot,data:{source:ce,positions:Z}})),mouseInteractionCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.MouseInteraction},Z)})),scrollCb:S,viewportResizeCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.ViewportResize},Z)})),inputCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.Input},Z)})),mediaInteractionCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.MediaInteraction},Z)})),styleSheetRuleCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.StyleSheetRule},Z)})),styleDeclarationCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.StyleDeclaration},Z)})),canvasMutationCb:M,fontCb:Z=>oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.Font},Z)})),selectionCb:Z=>{oe(ae({type:_.IncrementalSnapshot,data:Object.assign({source:D.Selection},Z)}))},blockClass:o,ignoreClass:s,maskTextClass:a,maskTextSelector:l,maskInputOptions:R,inlineStylesheet:c,sampling:m,recordCanvas:E,inlineImages:A,userTriggeredOnInput:k,collectFonts:O,doc:Q,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:V,blockSelector:i,slimDOMOptions:I,dataURLOptions:g,mirror:Ce,iframeManager:B,stylesheetManager:G,shadowDomManager:z,canvasManager:Gn,ignoreCSSAttributes:F,plugins:((pe=$?.filter(Z=>Z.observer))===null||pe===void 0?void 0:pe.map(Z=>({observer:Z.observer,options:Z.options,callback:ce=>oe(ae({type:_.Plugin,data:{plugin:Z.name,payload:ce}}))})))||[]},y)};B.addLoadListener(Q=>{P.push(q(Q.contentDocument))});let X=()=>{zt(),P.push(q(document)),Kt=!0};return document.readyState==="interactive"||document.readyState==="complete"?X():P.push(le("load",()=>{oe(ae({type:_.Load,data:{}})),X()},window)),()=>{P.forEach(Q=>Q()),Kt=!1}}catch(P){console.warn(P)}}var oe,zt,Gn,Kt,Ce,Hn=H(()=>{ke();Fn();ge();ye();bo();So();$o();zo();Kt=!1,Ce=Mt();Re.addCustomEvent=(e,t)=>{if(!Kt)throw new Error("please add custom event after start recording");oe(ae({type:_.Custom,data:{tag:e,payload:t}}))};Re.freezePage=()=>{Fe.forEach(e=>e.freeze())};Re.takeFullSnapshot=e=>{if(!Kt)throw new Error("please take full snapshot after start recording");zt(e)};Re.mirror=Ce});function za(){return new $a}function Ka(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){let s=i.split(r);s.length>1&&(t[$n(s[0].trim())]=s[1].trim())}}),t}function Ko(e){let t=[];for(let n in e){let r=e[n];if(typeof r!="string")continue;let o=Ja(n);t.push(`${o}: ${r};`)}return t.join(" ")}function qa(e){return class Yo extends e{constructor(){super(...arguments),this.nodeType=ne.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=j.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===j.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===j.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===j.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){let r=n.RRNodeType;if((r===j.Element||r===j.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){let o=n.RRNodeType;if((o===j.Element||o===j.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===j.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);let i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){let r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){let o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Yo}createDocumentType(n,r,o){let i=new(Zo(Se))(n,r,o);return i.ownerDocument=this,i}createElement(n){let r=new(Jo(Se))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){let r=new(qo(Se))(n);return r.ownerDocument=this,r}createComment(n){let r=new(Xo(Se))(n);return r.ownerDocument=this,r}createCDATASection(n){let r=new(Qo(Se))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function Zo(e){return class extends e{constructor(n,r,o){super(),this.nodeType=ne.DOCUMENT_TYPE_NODE,this.RRNodeType=j.DocumentType,this.textContent=null,this.name=n,this.publicId=r,this.systemId=o,this.nodeName=n}toString(){return"RRDocumentType"}}}function Jo(e){return class extends e{constructor(n){super(),this.nodeType=ne.ELEMENT_NODE,this.RRNodeType=j.Element,this.attributes={},this.shadowRoot=null,this.tagName=n.toUpperCase(),this.nodeName=n.toUpperCase()}get textContent(){let n="";return this.childNodes.forEach(r=>n+=r.textContent),n}set textContent(n){this.childNodes=[this.ownerDocument.createTextNode(n)]}get classList(){return new zn(this.attributes.class,n=>{this.attributes.class=n})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let n=this.attributes.style?Ka(this.attributes.style):{},r=/\B([A-Z])/g;return n.setProperty=(o,i,s)=>{if(r.test(o))return;let a=$n(o);i?n[a]=i:delete n[a],s==="important"&&(n[a]+=" !important"),this.attributes.style=Ko(n)},n.removeProperty=o=>{if(r.test(o))return"";let i=$n(o),s=n[i]||"";return delete n[i],this.attributes.style=Ko(n),s},n}getAttribute(n){return this.attributes[n]||null}setAttribute(n,r){this.attributes[n]=r}setAttributeNS(n,r,o){this.setAttribute(r,o)}removeAttribute(n){delete this.attributes[n]}appendChild(n){return this.childNodes.push(n),n.parentNode=this,n.parentElement=this,n}insertBefore(n,r){if(r===null)return this.appendChild(n);let o=this.childNodes.indexOf(r);if(o==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(o,0,n),n.parentElement=this,n.parentNode=this,n}removeChild(n){let r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}attachShadow(n){let r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(n){return!0}toString(){let n="";for(let r in this.attributes)n+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${n}`}}}function Xa(e){return class extends e{attachShadow(n){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function qo(e){return class extends e{constructor(n){super(),this.nodeType=ne.TEXT_NODE,this.nodeName="#text",this.RRNodeType=j.Text,this.data=n}get textContent(){return this.data}set textContent(n){this.data=n}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function Xo(e){return class extends e{constructor(n){super(),this.nodeType=ne.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=j.Comment,this.data=n}get textContent(){return this.data}set textContent(n){this.data=n}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Qo(e){return class extends e{constructor(n){super(),this.nodeName="#cdata-section",this.nodeType=ne.CDATA_SECTION_NODE,this.RRNodeType=j.CDATA,this.data=n}get textContent(){return this.data}set textContent(n){this.data=n}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}function Ie(e,t,n,r){let o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&jo(Array.from(o),i,e,n,r);let s=null,a=null;switch(t.RRNodeType){case j.Document:{a=t.scrollData;break}case j.Element:{let l=e,c=t;switch(el(l,c,r),a=c.scrollData,s=c.inputData,c.tagName){case"AUDIO":case"VIDEO":{let d=e,u=c;u.paused!==void 0&&(u.paused?d.pause():d.play()),u.muted!==void 0&&(d.muted=u.muted),u.volume!==void 0&&(d.volume=u.volume),u.currentTime!==void 0&&(d.currentTime=u.currentTime),u.playbackRate!==void 0&&(d.playbackRate=u.playbackRate);break}case"CANVAS":{let d=t;if(d.rr_dataURL!==null){let u=document.createElement("img");u.onload=()=>{let f=l.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=d.rr_dataURL}d.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e))}break;case"STYLE":{let d=l.sheet;d&&t.rules.forEach(u=>n.applyStyleSheetMutation(u,d))}break}if(c.shadowRoot){l.shadowRoot||l.attachShadow({mode:"open"});let d=l.shadowRoot.childNodes,u=c.shadowRoot.childNodes;(d.length>0||u.length>0)&&jo(Array.from(d),u,l.shadowRoot,n,r)}break}case j.Text:case j.Comment:case j.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(a&&n.applyScroll(a,!0),s&&n.applyInput(s),t.nodeName==="IFRAME"){let l=e.contentDocument,c=t;if(l){let d=r.getMeta(c.contentDocument);d&&n.mirror.add(l,Object.assign({},d)),Ie(l,c.contentDocument,n,r)}}}function el(e,t,n){let r=e.attributes,o=t.attributes;for(let i in o){let s=o[i],a=n.getMeta(t);if(a&&"isSVG"in a&&a.isSVG&&Kn[i])e.setAttributeNS(Kn[i],i,s);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){let l=document.createElement("img");l.src=s,l.onload=()=>{let c=e.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else e.setAttribute(i,s)}for(let{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function jo(e,t,n,r,o){var i;let s=0,a=e.length-1,l=0,c=t.length-1,d=e[s],u=e[a],f=t[l],h=t[c],p,y;for(;s<=a&&l<=c;){let b=r.mirror.getId(d),m=r.mirror.getId(u),g=o.getId(f),v=o.getId(h);if(d===void 0)d=e[++s];else if(u===void 0)u=e[--a];else if(b!==-1&&b===g)Ie(d,f,r,o),d=e[++s],f=t[++l];else if(m!==-1&&m===v)Ie(u,h,r,o),u=e[--a],h=t[--c];else if(b!==-1&&b===v)n.insertBefore(d,u.nextSibling),Ie(d,h,r,o),d=e[++s],h=t[--c];else if(m!==-1&&m===g)n.insertBefore(u,d),Ie(u,f,r,o),u=e[--a],f=t[++l];else{if(!p){p={};for(let E=s;E<=a;E++){let N=e[E];N&&r.mirror.hasNode(N)&&(p[r.mirror.getId(N)]=E)}}if(y=p[o.getId(f)],y){let E=e[y];n.insertBefore(E,d),Ie(E,f,r,o),e[y]=void 0}else{let E=jt(f,r.mirror,o);n.nodeName==="#document"&&((i=r.mirror.getMeta(E))===null||i===void 0?void 0:i.type)===j.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[s]=void 0,d=void 0),n.insertBefore(E,d||null),Ie(E,f,r,o)}f=t[++l]}}if(s>a){let b=t[c+1],m=null;for(b&&n.childNodes.forEach(g=>{r.mirror.getId(g)===o.getId(b)&&(m=g)});l<=c;++l){let g=jt(t[l],r.mirror,o);n.insertBefore(g,m),Ie(g,t[l],r,o)}}else if(l>c)for(;s<=a;s++){let b=e[s];b&&(n.removeChild(b),r.mirror.removeNodeFromMap(b))}}function jt(e,t,n){let r=n.getId(e),o=n.getMeta(e),i=null;if(r>-1&&(i=t.getNode(r)),i!==null)return i;switch(e.RRNodeType){case j.Document:i=new Document;break;case j.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case j.Element:{let s=e.tagName.toLowerCase();s=Qa[s]||s,o&&"isSVG"in o&&o?.isSVG?i=document.createElementNS(Kn.svg,s):i=document.createElement(e.tagName);break}case j.Text:i=document.createTextNode(e.data);break;case j.Comment:i=document.createComment(e.data);break;case j.CDATA:i=document.createCDATASection(e.data);break}return o&&t.add(i,Object.assign({},o)),i}function il(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Xn(e,t,n,r){let o;switch(e.nodeType){case ne.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case ne.DOCUMENT_TYPE_NODE:{let s=e;o=t.createDocumentType(s.name,s.publicId,s.systemId);break}case ne.ELEMENT_NODE:{let s=e,a=il(s);o=t.createElement(a);let l=o;for(let{name:c,value:d}of Array.from(s.attributes))l.attributes[c]=d;s.scrollLeft&&(l.scrollLeft=s.scrollLeft),s.scrollTop&&(l.scrollTop=s.scrollTop);break}case ne.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case ne.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case ne.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case ne.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Je&&(i||(i=Qn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function ei(e,t=za(),n=new Je){function r(o,i){let s=Xn(o,n,t,i);if(s!==null)if(i?.nodeName!=="IFRAME"&&o.nodeType!==ne.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(s),s.parentNode=i,s.parentElement=i),o.nodeName==="IFRAME"){let a=o.contentDocument;a&&r(a,s)}else(o.nodeType===ne.DOCUMENT_NODE||o.nodeType===ne.ELEMENT_NODE||o.nodeType===ne.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===ne.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,s),o.childNodes.forEach(a=>r(a,s)))}return r(e,null),n}function sl(){return new qn}function Qn(e,t){switch(e.RRNodeType){case j.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case j.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case j.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case j.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case j.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case j.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}var j,$a,ja,Ya,$n,Za,Ja,Se,zn,ne,Kn,Qa,Je,tl,qe,jn,Yn,Zn,Jn,nl,rl,ol,qn,ti=H(()=>{(function(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"})(j||(j={}));$a=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();ja=/-([a-z])/g,Ya=/^--[a-zA-Z0-9-]+$/,$n=e=>Ya.test(e)?e:e.replace(ja,(t,n)=>n?n.toUpperCase():""),Za=/\B([A-Z])/g,Ja=e=>e.replace(Za,"-$1").toLowerCase(),Se=class{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=ne.ELEMENT_NODE,this.TEXT_NODE=ne.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){let t=this.parentNode;if(!t)return null;let n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(let n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};zn=class{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(let o of r){let i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){let r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}};(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(ne||(ne={}));Kn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Qa={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};Je=class e extends qa(Se){constructor(t){super(),this.UNSERIALIZED_STARTING_ID=-2,this._unserializedId=this.UNSERIALIZED_STARTING_ID,this.mirror=sl(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let o=new tl(t,n,r);return o.ownerDocument=this,o}createElement(t){let n=t.toUpperCase(),r;switch(n){case"AUDIO":case"VIDEO":r=new jn(n);break;case"IFRAME":r=new Jn(n,this.mirror);break;case"CANVAS":r=new Yn(n);break;case"STYLE":r=new Zn(n);break;default:r=new qe(n);break}return r.ownerDocument=this,r}createComment(t){let n=new rl(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new ol(t);return n.ownerDocument=this,n}createTextNode(t){let n=new nl(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},tl=Zo(Se),qe=class extends Jo(Se){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}},jn=class extends Xa(qe){},Yn=class extends qe{constructor(){super(...arguments),this.rr_dataURL=null,this.canvasMutations=[]}getContext(){return null}},Zn=class extends qe{constructor(){super(...arguments),this.rules=[]}},Jn=class extends qe{constructor(t,n){super(t),this.contentDocument=new Je,this.contentDocument.mirror=n}},nl=qo(Se),rl=Xo(Se),ol=Qo(Se);qn=class{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;let r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}});var ni,ri,oi=H(()=>{Hn();({addCustomEvent:ni}=Re),{freezePage:ri}=Re});function pi(e,t){t===void 0&&(t={});var n=gl();n.p(e);var r=vl(e,t,2,4);return bl(r,t),yl(r,r.length-4,n.d()),r}function fi(e,t){return pl((Sl(e),e.subarray(2,-4)),t)}function qt(e,t){var n=e.length;if(!t&&typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var r=new de(e.length+(e.length>>>1)),o=0,i=function(c){r[o++]=c},s=0;s<n;++s){if(o+5>r.length){var a=new de(o+8+(n-s<<1));a.set(r),r=a}var l=e.charCodeAt(s);l<128||t?i(l):l<2048?(i(192|l>>>6),i(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++s)&1023,i(240|l>>>18),i(128|l>>>12&63),i(128|l>>>6&63),i(128|l&63)):(i(224|l>>>12),i(128|l>>>6&63),i(128|l&63))}return lr(r,0,o)}function Xt(e,t){var n="";if(!t&&typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var r=0;r<e.length;){var o=e[r++];o<128||t?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((o&31)<<6|e[r++]&63):o<240?n+=String.fromCharCode((o&15)<<12|(e[r++]&63)<<6|e[r++]&63):(o=((o&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,n+=String.fromCharCode(55296|o>>10,56320|o&1023))}return n}var de,he,Ct,Zt,Jt,rr,li,ci,di,or,ui,al,ii,ir,Me,J,Te,Be,J,J,J,J,It,J,ll,cl,dl,ul,er,we,tr,ar,lr,pl,Oe,bt,nr,sr,si,St,Yt,ai,fl,hl,ml,gl,vl,yl,bl,Sl,cr=H(()=>{de=Uint8Array,he=Uint16Array,Ct=Uint32Array,Zt=new de([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Jt=new de([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rr=new de([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),li=function(e,t){for(var n=new he(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var o=new Ct(n[30]),r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},ci=li(Zt,2),di=ci[0],or=ci[1];di[28]=258,or[258]=28;ui=li(Jt,0),al=ui[0],ii=ui[1],ir=new he(32768);for(J=0;J<32768;++J)Me=(J&43690)>>>1|(J&21845)<<1,Me=(Me&52428)>>>2|(Me&13107)<<2,Me=(Me&61680)>>>4|(Me&3855)<<4,ir[J]=((Me&65280)>>>8|(Me&255)<<8)>>>1;Te=(function(e,t,n){for(var r=e.length,o=0,i=new he(t);o<r;++o)++i[e[o]-1];var s=new he(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;var a;if(n){a=new he(1<<t);var l=15-t;for(o=0;o<r;++o)if(e[o])for(var c=o<<4|e[o],d=t-e[o],u=s[e[o]-1]++<<d,f=u|(1<<d)-1;u<=f;++u)a[ir[u]>>>l]=c}else for(a=new he(r),o=0;o<r;++o)a[o]=ir[s[e[o]-1]++]>>>15-e[o];return a}),Be=new de(288);for(J=0;J<144;++J)Be[J]=8;for(J=144;J<256;++J)Be[J]=9;for(J=256;J<280;++J)Be[J]=7;for(J=280;J<288;++J)Be[J]=8;It=new de(32);for(J=0;J<32;++J)It[J]=5;ll=Te(Be,9,0),cl=Te(Be,9,1),dl=Te(It,5,0),ul=Te(It,5,1),er=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},we=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(t&7)&n},tr=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(t&7)},ar=function(e){return(e/8>>0)+(e&7&&1)},lr=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof he?he:e instanceof Ct?Ct:de)(n-t);return r.set(e.subarray(t,n)),r},pl=function(e,t,n){var r=e.length,o=!t||n,i=!n||n.i;n||(n={}),t||(t=new de(r*3));var s=function(P){var q=t.length;if(P>q){var X=new de(Math.max(q*2,P));X.set(t),t=X}},a=n.f||0,l=n.p||0,c=n.b||0,d=n.l,u=n.d,f=n.m,h=n.n,p=r*8;do{if(!d){n.f=a=we(e,l,1);var y=we(e,l+1,3);if(l+=3,y)if(y==1)d=cl,u=ul,f=9,h=5;else if(y==2){var v=we(e,l,31)+257,E=we(e,l+10,15)+4,N=v+we(e,l+5,31)+1;l+=14;for(var k=new de(N),O=new de(19),A=0;A<E;++A)O[rr[A]]=we(e,l+A*3,7);l+=E*3;var $=er(O),V=(1<<$)-1;if(!i&&l+N*($+7)>p)break;for(var F=Te(O,$,1),A=0;A<N;){var U=F[we(e,l,V)];l+=U&15;var b=U>>>4;if(b<16)k[A++]=b;else{var W=0,R=0;for(b==16?(R=3+we(e,l,3),l+=2,W=k[A-1]):b==17?(R=3+we(e,l,7),l+=3):b==18&&(R=11+we(e,l,127),l+=7);R--;)k[A++]=W}}var I=k.subarray(0,v),w=k.subarray(v);f=er(I),h=er(w),d=Te(I,f,1),u=Te(w,h,1)}else throw"invalid block type";else{var b=ar(l)+4,m=e[b-4]|e[b-3]<<8,g=b+m;if(g>r){if(i)throw"unexpected EOF";break}o&&s(c+m),t.set(e.subarray(b,g),c),n.b=c+=m,n.p=l=g*8;continue}if(l>p)throw"unexpected EOF"}o&&s(c+131072);for(var x=(1<<f)-1,T=(1<<h)-1,C=f+h+18;i||l+C<p;){var W=d[tr(e,l)&x],S=W>>>4;if(l+=W&15,l>p)throw"unexpected EOF";if(!W)throw"invalid length/literal";if(S<256)t[c++]=S;else if(S==256){d=null;break}else{var M=S-254;if(S>264){var A=S-257,L=Zt[A];M=we(e,l,(1<<L)-1)+di[A],l+=L}var G=u[tr(e,l)&T],B=G>>>4;if(!G)throw"invalid distance";l+=G&15;var w=al[B];if(B>3){var L=Jt[B];w+=tr(e,l)&(1<<L)-1,l+=L}if(l>p)throw"unexpected EOF";o&&s(c+131072);for(var z=c+M;c<z;c+=4)t[c]=t[c-w],t[c+1]=t[c+1-w],t[c+2]=t[c+2-w],t[c+3]=t[c+3-w];c=z}}n.l=d,n.p=l,n.b=c,d&&(a=1,n.m=f,n.d=u,n.n=h)}while(!a);return c==t.length?t:lr(t,0,c)},Oe=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},bt=function(e,t,n){n<<=t&7;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},nr=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,i=n.slice();if(!o)return[new de(0),0];if(o==1){var s=new de(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(N,k){return N.f-k.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],c=0,d=1,u=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};d!=o-1;)a=n[n[c].f<n[u].f?c++:u++],l=n[c!=d&&n[c].f<n[u].f?c++:u++],n[d++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=i[0].s,r=1;r<o;++r)i[r].s>f&&(f=i[r].s);var h=new he(f+1),p=sr(n[d-1],h,0);if(p>t){var r=0,y=0,b=p-t,m=1<<b;for(i.sort(function(k,O){return h[O.s]-h[k.s]||k.f-O.f});r<o;++r){var g=i[r].s;if(h[g]>t)y+=m-(1<<p-h[g]),h[g]=t;else break}for(y>>>=b;y>0;){var v=i[r].s;h[v]<t?y-=1<<t-h[v]++-1:++r}for(;r>=0&&y;--r){var E=i[r].s;h[E]==t&&(--h[E],++y)}p=t}return[new de(h),p]},sr=function(e,t,n){return e.s==-1?Math.max(sr(e.l,t,n+1),sr(e.r,t,n+1)):t[e.s]=n},si=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new he(++t),r=0,o=e[0],i=1,s=function(l){n[r++]=l},a=1;a<=t;++a)if(e[a]==o&&a!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(o),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(o);i=1,o=e[a]}return[n.subarray(0,r),t]},St=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Yt=function(e,t,n){var r=n.length,o=ar(t+2);e[o]=r&255,e[o+1]=r>>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var i=0;i<r;++i)e[o+i+4]=n[i];return(o+4+r)*8},ai=function(e,t,n,r,o,i,s,a,l,c,d){Oe(t,d++,n),++o[256];for(var u=nr(o,15),f=u[0],h=u[1],p=nr(i,15),y=p[0],b=p[1],m=si(f),g=m[0],v=m[1],E=si(y),N=E[0],k=E[1],O=new he(19),A=0;A<g.length;++A)O[g[A]&31]++;for(var A=0;A<N.length;++A)O[N[A]&31]++;for(var $=nr(O,7),V=$[0],F=$[1],U=19;U>4&&!V[rr[U-1]];--U);var W=c+5<<3,R=St(o,Be)+St(i,It)+s,I=St(o,f)+St(i,y)+s+14+3*U+St(O,V)+(2*O[16]+3*O[17]+7*O[18]);if(W<=R&&W<=I)return Yt(t,d,e.subarray(l,l+c));var w,x,T,C;if(Oe(t,d,1+(I<R)),d+=2,I<R){w=Te(f,h,0),x=f,T=Te(y,b,0),C=y;var S=Te(V,F,0);Oe(t,d,v-257),Oe(t,d+5,k-1),Oe(t,d+10,U-4),d+=14;for(var A=0;A<U;++A)Oe(t,d+3*A,V[rr[A]]);d+=3*U;for(var M=[g,N],L=0;L<2;++L)for(var G=M[L],A=0;A<G.length;++A){var B=G[A]&31;Oe(t,d,S[B]),d+=V[B],B>15&&(Oe(t,d,G[A]>>>5&127),d+=G[A]>>>12)}}else w=ll,x=Be,T=dl,C=It;for(var A=0;A<a;++A)if(r[A]>255){var B=r[A]>>>18&31;bt(t,d,w[B+257]),d+=x[B+257],B>7&&(Oe(t,d,r[A]>>>23&31),d+=Zt[B]);var z=r[A]&31;bt(t,d,T[z]),d+=C[z],z>3&&(bt(t,d,r[A]>>>5&8191),d+=Jt[z])}else bt(t,d,w[r[A]]),d+=x[r[A]];return bt(t,d,w[256]),d+x[256]},fl=new Ct([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hl=new de(0),ml=function(e,t,n,r,o,i){var s=e.length,a=new de(r+s+5*(1+Math.floor(s/7e3))+o),l=a.subarray(r,a.length-o),c=0;if(!t||s<8)for(var d=0;d<=s;d+=65535){var u=d+65535;u<s?c=Yt(l,c,e.subarray(d,u)):(l[d]=i,c=Yt(l,c,e.subarray(d,s)))}else{for(var f=fl[t-1],h=f>>>13,p=f&8191,y=(1<<n)-1,b=new he(32768),m=new he(y+1),g=Math.ceil(n/3),v=2*g,E=function(se){return(e[se]^e[se+1]<<g^e[se+2]<<v)&y},N=new Ct(25e3),k=new he(288),O=new he(32),A=0,$=0,d=0,V=0,F=0,U=0;d<s;++d){var W=E(d),R=d&32767,I=m[W];if(b[R]=I,m[W]=R,F<=d){var w=s-d;if((A>7e3||V>24576)&&w>423){c=ai(e,l,0,N,k,O,$,V,U,d-U,c),V=A=$=0,U=d;for(var x=0;x<286;++x)k[x]=0;for(var x=0;x<30;++x)O[x]=0}var T=2,C=0,S=p,M=R-I&32767;if(w>2&&W==E(d-M))for(var L=Math.min(h,w)-1,G=Math.min(32767,d),B=Math.min(258,w);M<=G&&--S&&R!=I;){if(e[d+T]==e[d+T-M]){for(var z=0;z<B&&e[d+z]==e[d+z-M];++z);if(z>T){if(T=z,C=M,z>L)break;for(var P=Math.min(M,z-2),q=0,x=0;x<P;++x){var X=d-M+x+32768&32767,Q=b[X],pe=X-Q+32768&32767;pe>q&&(q=pe,I=X)}}}R=I,I=b[R],M+=R-I+32768&32767}if(C){N[V++]=268435456|or[T]<<18|ii[C];var Z=or[T]&31,ce=ii[C]&31;$+=Zt[Z]+Jt[ce],++k[257+Z],++O[ce],F=d+T,++A}else N[V++]=e[d],++k[e[d]]}}c=ai(e,l,i,N,k,O,$,V,U,d-U,c),i||(c=Yt(l,c,hl))}return lr(a,0,r+ar(c)+o)},gl=function(){var e=1,t=0;return{p:function(n){for(var r=e,o=t,i=n.length,s=0;s!=i;){for(var a=Math.min(s+5552,i);s<a;++s)r+=n[s],o+=r;r%=65521,o%=65521}e=r,t=o},d:function(){return(e>>>8<<16|(t&255)<<8|t>>>8)+((e&255)<<23)*2}}},vl=function(e,t,n,r,o){return ml(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,n,r,!o)},yl=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},bl=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},Sl=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"}});var mi,gi=H(()=>{cr();mi=e=>{let t=Object.assign(Object.assign({},e),{v:"v1"});return Xt(pi(qt(JSON.stringify(t))),!0)}});var vi,yi=H(()=>{cr();vi=e=>{if(typeof e!="string")return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch{}try{let t=JSON.parse(Xt(fi(qt(e,!0))));if(t.v==="v1")return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${"v1"}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}}});var Pe,Cl,bi,Il,dr,Si=H(()=>{Pe=class{constructor(t){this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",n=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${n})`:`${this.fileName}:${t}:${n}`}},Cl=/(^|@)\S+:\d+/,bi=/^\s*at .*(\S+:\d+|\(native\))/m,Il=/^(eval@)?(\[native code])?$/,dr={parse:function(e){if(!e)return[];if(typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u")return this.parseOpera(e);if(e.stack&&e.stack.match(bi))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!n)throw new Error(`Cannot parse given url: ${e}`);return[n[1],n[2]||void 0,n[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
|
|
7
|
+
`).filter(function(n){return!!n.match(bi)},this).map(function(n){n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let r=n.replace(/^\s+/,"").replace(/\(eval code/g,"("),o=r.match(/ (\((.+):(\d+):(\d+)\)$)/);r=o?r.replace(o[0],""):r;let i=r.split(/\s+/).slice(1),s=this.extractLocation(o?o[1]:i.pop()),a=i.join(" ")||void 0,l=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new Pe({functionName:a,fileName:l,lineNumber:s[1],columnNumber:s[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(`
|
|
8
|
+
`).filter(function(n){return!n.match(Il)},this).map(function(n){if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),n.indexOf("@")===-1&&n.indexOf(":")===-1)return new Pe({functionName:n});{let r=/((.*".+"[^@]*)?[^@]*)(?:@)/,o=n.match(r),i=o&&o[1]?o[1]:void 0,s=this.extractLocation(n.replace(r,""));return new Pe({functionName:i,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
|
|
9
|
+
`)>-1&&e.message.split(`
|
|
10
|
+
`).length>e.stacktrace.split(`
|
|
11
|
+
`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split(`
|
|
12
|
+
`),r=[];for(let o=2,i=n.length;o<i;o+=2){let s=t.exec(n[o]);s&&r.push(new Pe({fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split(`
|
|
13
|
+
`),r=[];for(let o=0,i=n.length;o<i;o+=2){let s=t.exec(n[o]);s&&r.push(new Pe({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera11:function(e){return e.stack.split(`
|
|
14
|
+
`).filter(function(n){return!!n.match(Cl)&&!n.match(/^Error created at/)},this).map(function(n){let r=n.split("@"),o=this.extractLocation(r.pop()),s=(r.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Pe({functionName:s,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})},this)}}});function wl(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,o=[];if(r.children&&r.children.length>0)for(let i=0;i<r.children.length;i++){let s=r.children[i];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&o.push(s)}o.length>1&&(n+=`:eq(${o.indexOf(e)})`),t=n+(t?">"+t:""),e=r}return t}function ur(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ci(e,t){if(t===0)return!0;let n=Object.keys(e);for(let r of n)if(ur(e[r])&&Ci(e[r],t-1))return!0;return!1}function Qt(e,t){let n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);let r=[],o=[];return JSON.stringify(e,function(a,l){if(r.length>0){let c=r.indexOf(this);~c?r.splice(c+1):r.push(this),~c?o.splice(c,1/0,a):o.push(a),~r.indexOf(l)&&(r[0]===l?l="[Circular ~]":l="[Circular ~."+o.slice(0,r.indexOf(l)).join(".")+"]")}else r.push(l);if(l===null)return l;if(l===void 0)return"undefined";if(i(l))return s(l);if(l instanceof Event){let c={};for(let d in l){let u=l[d];Array.isArray(u)?c[d]=wl(u.length?u[0]:null):c[d]=u}return c}else{if(l instanceof Node)return l instanceof HTMLElement?l?l.outerHTML:"":l.nodeName;if(l instanceof Error)return l.stack?l.stack+`
|
|
15
|
+
End of stack for Error object`:l.name+": "+l.message}return l});function i(a){return!!(ur(a)&&Object.keys(a).length>n.numOfKeysLimit||typeof a=="function"||ur(a)&&Ci(a,n.depthOfLimit))}function s(a){let l=a.toString();return n.stringLengthLimit&&l.length>n.stringLengthLimit&&(l=`${l.slice(0,n.stringLengthLimit)}...`),l}}var Ii=H(()=>{});function El(e,t,n){let r=n?Object.assign({},wi,n):wi,o=r.logger;if(!o)return()=>{};let i;typeof o=="string"?i=t[o]:i=o;let s=0,a=[];if(r.level.includes("error")&&window){let c=d=>{let u=d.message,f=d.error,h=dr.parse(f).map(y=>y.toString()),p=[Qt(u,r.stringifyOptions)];e({level:"error",trace:h,payload:p})};window.addEventListener("error",c),a.push(()=>{window&&window.removeEventListener("error",c)})}for(let c of r.level)a.push(l(i,c));return()=>{a.forEach(c=>c())};function l(c,d){return c[d]?me(c,d,u=>(...f)=>{u.apply(this,f);try{let h=dr.parse(new Error).map(y=>y.toString()).splice(1),p=f.map(y=>Qt(y,r.stringifyOptions));s++,s<r.lengthThreshold?e({level:d,trace:h,payload:p}):s===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Qt("The number of log records reached the threshold.")]})}catch(h){u("rrweb logger error:",h,...f)}}):()=>{}}}var wi,wt,Ei,pr=H(()=>{ge();Si();Ii();wi={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};wt="rrweb/console@1",Ei=e=>({name:wt,observer:El,options:e})});var en,xl,fr,xi,Ti=H(()=>{pr();ye();en="__rrweb_original__",xl={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0},fr=class{constructor(t){this.config=Object.assign(xl,t)}getConsoleLogger(){let t={};for(let n of this.config.level)n==="trace"?t[n]=r=>{(console.log[en]?console.log[en]:console.log)(...r.payload.map(i=>JSON.parse(i)),this.formatMessage(r))}:t[n]=r=>{(console[n][en]?console[n][en]:console[n])(...r.payload.map(i=>JSON.parse(i)),this.formatMessage(r))};return t}formatMessage(t){if(t.trace.length===0)return"";let n=`
|
|
16
|
+
at `,r=n;return r+=t.trace.join(n),r}},xi=e=>{let t=e?.replayLogger||new fr(e).getConsoleLogger();return{handler(n,r,o){let i=null;if(n.type===_.IncrementalSnapshot&&n.data.source===D.Log?i=n.data:n.type===_.Plugin&&n.data.plugin===wt&&(i=n.data.payload),i)try{typeof t[i.level]=="function"&&t[i.level](i)}catch(s){o.replayer.config.showWarning&&console.warn(s)}}}}});var mr={};kt(mr,{default:()=>hr});function hr(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}var gr=H(()=>{});function Ai(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function s(m){let g=["MSIE ","Trident/","Edge/"];return new RegExp(g.join("|")).test(m)}let a=s(e.navigator.userAgent)?1:0;function l(m,g){this.scrollLeft=m,this.scrollTop=g}function c(m){return .5*(1-Math.cos(Math.PI*m))}function d(m){if(m===null||typeof m!="object"||m.behavior===void 0||m.behavior==="auto"||m.behavior==="instant")return!0;if(typeof m=="object"&&m.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+m.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(m,g){if(g==="Y")return m.clientHeight+a<m.scrollHeight;if(g==="X")return m.clientWidth+a<m.scrollWidth}function f(m,g){let v=e.getComputedStyle(m,null)["overflow"+g];return v==="auto"||v==="scroll"}function h(m){let g=u(m,"Y")&&f(m,"Y"),v=u(m,"X")&&f(m,"X");return g||v}function p(m){for(;m!==t.body&&h(m)===!1;)m=m.parentNode||m.host;return m}function y(m){let g=i(),v,E,N,k=(g-m.startTime)/r;k=k>1?1:k,v=c(k),E=m.startX+(m.x-m.startX)*v,N=m.startY+(m.y-m.startY)*v,m.method.call(m.scrollable,E,N),(E!==m.x||N!==m.y)&&e.requestAnimationFrame(y.bind(e,m))}function b(m,g,v){let E,N,k,O,A=i();m===t.body?(E=e,N=e.scrollX||e.pageXOffset,k=e.scrollY||e.pageYOffset,O=o.scroll):(E=m,N=m.scrollLeft,k=m.scrollTop,O=l),y({scrollable:E,method:O,startTime:A,startX:N,startY:k,x:g,y:v})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(d(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}b.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(d(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}b.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(d(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let m=arguments[0].left,g=arguments[0].top;b.call(this,this,typeof m>"u"?this.scrollLeft:~~m,typeof g>"u"?this.scrollTop:~~g)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(d(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(d(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let m=p(this),g=m.getBoundingClientRect(),v=this.getBoundingClientRect();m!==t.body?(b.call(this,m,m.scrollLeft+v.left-g.left,m.scrollTop+v.top-g.top),e.getComputedStyle(m).position!=="fixed"&&e.scrollBy({left:g.left,top:g.top,behavior:"smooth"})):e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}var ki=H(()=>{});function vr(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===D.MouseMove&&e.data.positions&&e.data.positions.length){let n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}var tn,yr=H(()=>{ye();tn=class{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed,this.liveMode=n.liveMode}addAction(t){if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay){this.actions.push(t);return}let n=this.findActionIndex(t);this.actions.splice(n,0,t)}start(){this.timeOffset=0;let t=performance.now(),n=()=>{let r=performance.now();for(this.timeOffset+=(r-t)*this.speed,t=r;this.actions.length;){let o=this.actions[0];if(this.timeOffset>=o.delay)this.actions.shift(),o.doAction();else break}(this.actions.length>0||this.liveMode)&&(this.raf=requestAnimationFrame(n))};this.raf=requestAnimationFrame(n)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){let o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}});function Ni(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function br(e){return e===void 0?[]:[].concat(e)}function Xe(e){return{type:"xstate.assign",assignment:e}}function Ri(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function nn(e){return function(t){return e===t}}function _i(e){return typeof e=="string"?{type:e}:e}function Mi(e,t){return{value:e,context:t,actions:[],changed:!1,matches:nn(e)}}function Oi(e,t,n){var r=t,o=!1;return[e.filter((function(i){if(i.type==="xstate.assign"){o=!0;var s=Object.assign({},r);return typeof i.assignment=="function"?s=i.assignment(r,n):Object.keys(i.assignment).forEach((function(a){s[a]=typeof i.assignment[a]=="function"?i.assignment[a](r,n):i.assignment[a]})),r=s,!1}return!0})),r,o]}function Sr(e,t){t===void 0&&(t={});var n=Ni(Oi(br(e.states[e.initial].entry).map((function(s){return Ri(s,t.actions)})),e.context,Li),2),r=n[0],o=n[1],i={config:e,_options:t,initialState:{value:e.initial,actions:r,context:o,matches:nn(e.initial)},transition:function(s,a){var l,c,d=typeof s=="string"?{value:s,context:e.context}:s,u=d.value,f=d.context,h=_i(a),p=e.states[u];if(p.on){var y=br(p.on[h.type]);try{for(var b=(function(x){var T=typeof Symbol=="function"&&Symbol.iterator,C=T&&x[T],S=0;if(C)return C.call(x);if(x&&typeof x.length=="number")return{next:function(){return x&&S>=x.length&&(x=void 0),{value:x&&x[S++],done:!x}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")})(y),m=b.next();!m.done;m=b.next()){var g=m.value;if(g===void 0)return Mi(u,f);var v=typeof g=="string"?{target:g}:g,E=v.target,N=v.actions,k=N===void 0?[]:N,O=v.cond,A=O===void 0?function(){return!0}:O,$=E===void 0,V=E??u,F=e.states[V];if(A(f,h)){var U=Ni(Oi(($?br(k):[].concat(p.exit,k,F.entry).filter((function(x){return x}))).map((function(x){return Ri(x,i._options.actions)})),f,h),3),W=U[0],R=U[1],I=U[2],w=E??u;return{value:w,context:R,actions:W,changed:E!==u||W.length>0||I,matches:nn(w)}}}}catch(x){l={error:x}}finally{try{m&&!m.done&&(c=b.return)&&c.call(b)}finally{if(l)throw l.error}}}return Mi(u,f)}};return i}function Cr(e){var t=e.initialState,n=ot.NotStarted,r=new Set,o={_machine:e,send:function(i){n===ot.Running&&(t=e.transition(t,i),Di(t,_i(i)),r.forEach((function(s){return s(t)})))},subscribe:function(i){return r.add(i),i(t),{unsubscribe:function(){return r.delete(i)}}},start:function(i){if(i){var s=typeof i=="object"?i:{context:e.config.context,value:i};t={value:s.value,actions:[],context:s.context,matches:nn(s.value)}}return n=ot.Running,Di(t,Li),o},stop:function(){return n=ot.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}var ot,Li,Di,Fi=H(()=>{(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ot||(ot={}));Li={type:"xstate.init"};Di=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))}});function Tl(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===_.Meta&&r.timestamp<=t)return e.slice(n)}return e}function Bi(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){let o=Sr({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Xe({lastPlayedEvent:(i,s)=>s.type==="CAST_EVENT"?s.payload.event:i.lastPlayedEvent}),recordTimeOffset:Xe((i,s)=>{let a=i.timeOffset;return"payload"in s&&"timeOffset"in s.payload&&(a=s.payload.timeOffset),Object.assign(Object.assign({},i),{timeOffset:a,baselineTime:i.events[0].timestamp+a})}),play(i){var s;let{timer:a,events:l,baselineTime:c,lastPlayedEvent:d}=i;a.clear();for(let p of l)vr(p,c);let u=Tl(l,c),f=d?.timestamp;d?.type===_.IncrementalSnapshot&&d.data.source===D.MouseMove&&(f=d.timestamp+((s=d.data.positions[0])===null||s===void 0?void 0:s.timeOffset)),c<(f||0)&&r.emit(Y.PlayBack);let h=new Array;for(let p of u)if(!(f&&f<c&&(p.timestamp<=f||p===d)))if(p.timestamp<c)h.push(p);else{let y=t(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}n(h),r.emit(Y.Flush),a.start()},pause(i){i.timer.clear()},resetLastPlayedEvent:Xe(i=>Object.assign(Object.assign({},i),{lastPlayedEvent:null})),startLive:Xe({baselineTime:(i,s)=>(i.timer.toggleLiveMode(!0),i.timer.start(),s.type==="TO_LIVE"&&s.payload.baselineTime?s.payload.baselineTime:Date.now())}),addEvent:Xe((i,s)=>{let{baselineTime:a,timer:l,events:c}=i;if(s.type==="ADD_EVENT"){let{event:d}=s.payload;vr(d,a);let u=c.length-1;if(!c[u]||c[u].timestamp<=d.timestamp)c.push(d);else{let p=-1,y=0;for(;y<=u;){let b=Math.floor((y+u)/2);c[b].timestamp<=d.timestamp?y=b+1:u=b-1}p===-1&&(p=y),c.splice(p,0,d)}let f=d.timestamp<a,h=t(d,f);f?h():l.isActive()&&l.addAction({doAction:()=>{h()},delay:d.delay})}return Object.assign(Object.assign({},i),{events:c})})}});return Cr(o)}function Pi(e){let t=Sr({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(n,r)=>{"payload"in r&&n.timer.setSpeed(r.payload.speed)},recordSpeed:Xe({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return Cr(t)}var Ui=H(()=>{Fi();ye();yr()});var Wi,Vi=H(()=>{Wi=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"]});function Ir(e,t){let n=Gi.get(e);return n||(n=new Map,Gi.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Ee(e,t,n){return r=>be(this,void 0,void 0,function*(){if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let o=yield Ee(e,t,n)(r.args);return yield createImageBitmap.apply(null,o)}else if("index"in r){if(n||t===null)return r;let{rr_type:o,index:i}=r;return Ir(t,o)[i]}else if("args"in r){let{rr_type:o,args:i}=r,s=window[o];return new s(...yield Promise.all(i.map(Ee(e,t,n))))}else{if("base64"in r)return wo(r.base64);if("src"in r){let o=e.get(r.src);if(o)return o;{let i=new Image;return i.src=r.src,e.set(r.src,i),i}}else if("data"in r&&r.rr_type==="Blob"){let o=yield Promise.all(r.data.map(Ee(e,t,n)));return new Blob(o,{type:r.type})}}else if(Array.isArray(r))return yield Promise.all(r.map(Ee(e,t,n)));return r})}var Gi,rn=H(()=>{Ze();Bn();Gi=new Map});function Al(e,t){try{return t===ve.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}function Nl(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!kl.includes(n))return;let r=Ir(e,n);r.includes(t)||r.push(t)}function Hi({mutation:e,target:t,type:n,imageMap:r,errorHandler:o}){return be(this,void 0,void 0,function*(){try{let i=Al(t,n);if(!i)return;if(e.setter){i[e.property]=e.args[0];return}let s=i[e.property],a=yield Promise.all(e.args.map(Ee(r,i))),l=s.apply(i,a);Nl(i,l);let c=!1}catch(i){o(e,i)}})}var kl,$i=H(()=>{Ze();ye();rn();kl=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"]});function zi({event:e,mutation:t,target:n,imageMap:r,errorHandler:o}){return be(this,void 0,void 0,function*(){try{let i=n.getContext("2d");if(t.setter){i[t.property]=t.args[0];return}let s=i[t.property];if(t.property==="drawImage"&&typeof t.args[0]=="string")r.get(e),s.apply(i,t.args);else{let a=yield Promise.all(t.args.map(Ee(r,i)));s.apply(i,a)}}catch(i){o(t,i)}})}var Ki=H(()=>{Ze();rn()});function wr({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:o,errorHandler:i}){return be(this,void 0,void 0,function*(){try{let s=o.get(e)||t,a="commands"in s?s.commands:[s];if([ve.WebGL,ve.WebGL2].includes(t.type)){for(let l=0;l<a.length;l++){let c=a[l];yield Hi({mutation:c,type:t.type,target:n,imageMap:r,errorHandler:i})}return}for(let l=0;l<a.length;l++){let c=a[l];yield zi({event:e,mutation:c,target:n,imageMap:r,errorHandler:i})}}catch(s){i(t,s)}})}var ji=H(()=>{Ze();ye();$i();Ki()});function Yi(e){return e.type==_.IncrementalSnapshot&&(e.data.source==D.TouchMove||e.data.source==D.MouseInteraction&&e.data.type==re.TouchStart)}var Rl,Ml,Ol,Er,xr,on,Zi=H(()=>{Ze();ke();ti();gr();gr();ki();yr();Ui();ye();ge();Vi();ji();rn();Rl=10*1e3,Ml=5*1e3,Ol=hr||mr,Er="[replayer]",xr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};on=class{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new Je,this.mouseTail=null,this.tailPositions=[],this.emitter=Ol(),this.legacy_missingNodeRetryMap={},this.cache=Tn(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=Mt(),this.styleMirror=new Ke,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=a=>{this.iframe.style.display="inherit";for(let l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))},this.applyEventsSynchronously=a=>{for(let l of a){switch(l.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(l,!0)()}this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null},this.getCastFn=(a,l=!1)=>{let c;switch(a.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(Y.CustomEvent,a)};break;case _.Meta:c=()=>this.emitter.emit(Y.Resize,{width:a.data.width,height:a.data.height});break;case _.FullSnapshot:c=()=>{var u;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(a,l),(u=this.iframe.contentWindow)===null||u===void 0||u.scrollTo(a.data.initialOffset),this.styleMirror.reset()};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let u of this.service.state.context.events)if(!(u.timestamp<=a.timestamp)&&this.isUserInteraction(u)){u.delay-a.delay>Rl*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=u);break}if(this.nextUserInteractionEvent){let u=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(u/Ml),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(Y.SkipStart,f)}}};break}return()=>{c&&c();for(let f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let u=this.service.state.context.events.length-1;if(a===this.service.state.context.events[u]){let f=()=>{u<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Y.Finish))};a.type===_.IncrementalSnapshot&&a.data.source===D.MouseMove&&a.data.positions.length?setTimeout(()=>{f()},Math.max(0,-a.data.positions[0].timeOffset+50)):f()}this.emitter.emit(Y.EventCast,a)}},!n?.liveMode&&t.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:xr,useVirtualDom:!0};this.config=Object.assign({},r,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Y.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(Y.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(l,c,d)=>{wr({event:l,mutation:c,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,c)=>{l.source===D.StyleSheetRule?this.applyStyleSheetRule(l,c):l.source===D.StyleDeclaration&&this.applyStyleDeclaration(l,c)}};if(this.iframe.contentDocument&&Ie(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror),this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let l in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[l],d=jt(c.node,this.mirror,this.virtualDom.mirror);Ie(d,c.node,a,this.virtualDom.mirror),c.node=d}catch(c){this.config.showWarning&&console.warn(c)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Y.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset()});let o=new tn([],{speed:this.config.speed,liveMode:this.config.liveMode});this.service=Bi({events:t.map(a=>n&&n.unpackFn?n.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(Y.StateChange,{player:a})}),this.speedService=Pi({normalSpeed:-1,timer:o}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(Y.StateChange,{speed:a})});let i=this.service.state.context.events.find(a=>a.type===_.Meta),s=this.service.state.context.events.find(a=>a.type===_.FullSnapshot);if(i){let{width:a,height:l}=i.data;setTimeout(()=>{this.emitter.emit(Y.Resize,{width:a,height:l})},0)}s&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=s,this.rebuildFullSnapshot(s),(a=this.iframe.contentWindow)===null||a===void 0||a.scrollTo(s.data.initialOffset))},1),this.service.state.context.events.find(Yi)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){Object.keys(t).forEach(n=>{t[n],this.config[n]=t[n]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let t=this.service.state.context.events[0],n=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:t,events:n}=this.service.state.context;return t-n[0].timestamp}getMirror(){return this.mirror}play(t=0){var n,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(r=(n=this.iframe.contentDocument)===null||n===void 0?void 0:n.getElementsByTagName("html")[0])===null||r===void 0||r.classList.remove("rrweb-paused"),this.emitter.emit(Y.Start)}pause(t){var n,r;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(r=(n=this.iframe.contentDocument)===null||n===void 0?void 0:n.getElementsByTagName("html")[0])===null||r===void 0||r.classList.add("rrweb-paused"),this.emitter.emit(Y.Pause)}resume(t=0){console.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Y.Resume)}destroy(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Y.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){let n=this.config.unpackFn?this.config.unpackFn(t):t;Yi(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:n}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Tn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ai(this.iframe.contentWindow,this.iframe.contentDocument),ft(this.iframe.contentWindow))}rebuildFullSnapshot(t,n=!1){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let r=[],o=(a,l)=>{this.collectIframeAndAttachDocument(r,a);for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};no(t.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,t.data.node.id);for(let{mutationInQueue:a,builtNode:l}of r)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);let{documentElement:i,head:s}=this.iframe.contentDocument;this.insertStyleRules(i,s),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Y.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){var r;let o=Wi(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&o.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){let i=this.virtualDom.createElement("style");this.virtualDom.mirror.add(i,Qn(i,this.virtualDom.unserializedId)),t.insertBefore(i,n),i.rules.push({source:D.StyleSheetRule,adds:o.map((s,a)=>({rule:s,index:a}))})}else{let i=document.createElement("style");t.insertBefore(i,n);for(let s=0;s<o.length;s++)(r=i.sheet)===null||r===void 0||r.insertRule(o[s],s)}}attachDocumentToIframe(t,n){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,o=[],i=(s,a)=>{this.collectIframeAndAttachDocument(o,s);let l=r.getMeta(s);if(l?.type===K.Element&&l?.tagName.toUpperCase()==="HTML"){let{documentElement:c,head:d}=n.contentDocument;this.insertStyleRules(c,d)}for(let c of this.config.plugins||[])c.onBuild&&c.onBuild(s,{id:a,replayer:this})};tt(t.node,{doc:n.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:i,cache:this.cache}),i(n.contentDocument,t.node.id);for(let{mutationInQueue:s,builtNode:a}of o)this.attachDocumentToIframe(s,a),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==s)}collectIframeAndAttachDocument(t,n){if(Ne(n,this.mirror)){let r=this.newDocumentQueue.find(o=>o.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){var t;let n=(t=this.iframe.contentDocument)===null||t===void 0?void 0:t.head;if(n){let r=new Set,o,i=this.service.state,s=()=>{i=this.service.state};this.emitter.on(Y.Start,s),this.emitter.on(Y.Pause,s);let a=()=>{this.emitter.off(Y.Start,s),this.emitter.off(Y.Pause,s)};n.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&o!==-1&&(i.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Y.LoadStylesheetEnd),o&&clearTimeout(o),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Y.LoadStylesheetStart),o=setTimeout(()=>{i.matches("playing")&&this.play(this.getCurrentTime()),o=-1,a()},this.config.loadTimeout))}}preloadAllImages(){return be(this,void 0,void 0,function*(){this.service.state;let t=()=>{this.service.state};this.emitter.on(Y.Start,t),this.emitter.on(Y.Pause,t);let n=[];for(let r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===D.CanvasMutation&&(n.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(n)})}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){let r=document.createElement("canvas"),o=r.getContext("2d"),i=o?.createImageData(r.width,r.height);i?.data,JSON.parse(t.args[0]),o?.putImageData(i,0,0)}}deserializeAndPreloadCanvasEvents(t,n){return be(this,void 0,void 0,function*(){if(!this.canvasEventMap.has(n)){let r={isUnchanged:!0};if("commands"in t){let o=yield Promise.all(t.commands.map(i=>be(this,void 0,void 0,function*(){let s=yield Promise.all(i.args.map(Ee(this.imageMap,null,r)));return Object.assign(Object.assign({},i),{args:s})})));r.isUnchanged===!1&&this.canvasEventMap.set(n,Object.assign(Object.assign({},t),{commands:o}))}else{let o=yield Promise.all(t.args.map(Ee(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,Object.assign(Object.assign({},t),{args:o}))}}})}applyIncremental(t,n){var r,o,i;let{data:s}=t;switch(s.source){case D.Mutation:{try{this.applyMutation(s,n)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,s)}break}case D.Drag:case D.TouchMove:case D.MouseMove:if(n){let a=s.positions[s.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:s}}else s.positions.forEach(a=>{let l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,n,s)},delay:a.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:t.delay-((r=s.positions[0])===null||r===void 0?void 0:r.timeOffset)});break;case D.MouseInteraction:{if(s.id===-1||n)break;let a=new Event(re[s.type].toLowerCase()),l=this.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);this.emitter.emit(Y.MouseInteraction,{type:s.type,target:l});let{triggerFocus:c}=this.config;switch(s.type){case re.Blur:"blur"in l&&l.blur();break;case re.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case re.Click:case re.TouchStart:case re.TouchEnd:n?(s.type===re.TouchStart?this.touchActive=!0:s.type===re.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===re.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,n,s),s.type===re.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===re.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===re.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case re.TouchCancel:n?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case D.Scroll:{if(s.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(s.id);if(!a)return this.debugNodeNotFound(s,s.id);a.scrollData=s;break}this.applyScroll(s,n);break}case D.ViewportResize:this.emitter.emit(Y.Resize,{width:s.width,height:s.height});break;case D.Input:{if(s.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(s.id);if(!a)return this.debugNodeNotFound(s,s.id);a.inputData=s;break}this.applyInput(s);break}case D.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!a)return this.debugNodeNotFound(s,s.id);let l=a;try{s.currentTime&&(l.currentTime=s.currentTime),s.volume&&(l.volume=s.volume),s.muted&&(l.muted=s.muted),s.type===1&&l.pause(),s.type===0&&l.play(),s.type===4&&(l.playbackRate=s.playbackRate)}catch(c){this.config.showWarning&&console.warn(`Failed to replay media interactions: ${c.message||c}`)}break}case D.StyleSheetRule:case D.StyleDeclaration:{this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&((o=this.virtualDom.mirror.getNode(s.id))===null||o===void 0||o.rules.push(s)):this.applyStyleSheetMutation(s);break}case D.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(s.id);if(!a)return this.debugNodeNotFound(s,s.id);a.canvasMutations.push({event:t,mutation:s})}else{let a=this.mirror.getNode(s.id);if(!a)return this.debugNodeNotFound(s,s.id);wr({event:t,mutation:s,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case D.Font:{try{let a=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);(i=this.iframe.contentDocument)===null||i===void 0||i.fonts.add(a)}catch(a){this.config.showWarning&&console.warn(a)}break}case D.Selection:{if(n){this.lastSelectionData=s;break}this.applySelection(s);break}case D.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s);break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n&&(this.usingVirtualDom=!0,ei(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let c in this.legacy_missingNodeRetryMap)try{let d=this.legacy_missingNodeRetryMap[c],u=Xn(d.node,this.virtualDom,this.mirror);u&&(d.node=u)}catch(d){this.config.showWarning&&console.warn(d)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.forEach(c=>{var d;let u=r.getNode(c.id);if(!u)return t.removes.find(h=>h.id===c.parentId)?void 0:this.warnNodeNotFound(t,c.id);let f=r.getNode(c.parentId);if(!f)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&xe(f)&&(f=f.shadowRoot),r.removeNodeFromMap(u),f)try{f.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&f.nodeName==="STYLE"&&((d=f.rules)===null||d===void 0?void 0:d.length)>0&&(f.rules=[])}catch(h){if(h instanceof DOMException)this.warn("parent could not remove child in mutation",f,u,t);else throw h}});let o=Object.assign({},this.legacy_missingNodeRetryMap),i=[],s=c=>{let d=null;return c.nextId&&(d=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!d},a=c=>{var d;if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");let u=r.getNode(c.parentId);if(!u)return c.node.type===K.Document?this.newDocumentQueue.push(c):i.push(c);c.node.isShadow&&(xe(u)||u.attachShadow({mode:"open"}),u=u.shadowRoot);let f=null,h=null;if(c.previousId&&(f=r.getNode(c.previousId)),c.nextId&&(h=r.getNode(c.nextId)),s(c))return i.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;let p=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ne(u,r)){this.attachDocumentToIframe(c,u);return}let y=(g,v)=>{for(let E of this.config.plugins||[])E.onBuild&&E.onBuild(g,{id:v,replayer:this})},b=tt(c.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:y});if(c.previousId===-1||c.nextId===-1){o[c.node.id]={node:b,mutation:c};return}let m=r.getMeta(u);if(m&&m.type===K.Element&&m.tagName==="textarea"&&c.node.type===K.Text){let g=Array.isArray(u.childNodes)?u.childNodes:Array.from(u.childNodes);for(let v of g)v.nodeType===u.TEXT_NODE&&u.removeChild(v)}if(f&&f.nextSibling&&f.nextSibling.parentNode)u.insertBefore(b,f.nextSibling);else if(h&&h.parentNode)u.contains(h)?u.insertBefore(b,h):u.insertBefore(b,null);else{if(u===p)for(;p.firstChild;)p.removeChild(p.firstChild);u.appendChild(b)}if(y(b,c.node.id),this.usingVirtualDom&&b.nodeName==="#text"&&u.nodeName==="STYLE"&&((d=u.rules)===null||d===void 0?void 0:d.length)>0&&(u.rules=[]),Ne(b,this.mirror)){let g=this.mirror.getId(b),v=this.newDocumentQueue.find(E=>E.parentId===g);v&&(this.attachDocumentToIframe(v,b),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==v))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(o,u,b,c)};t.adds.forEach(c=>{a(c)});let l=Date.now();for(;i.length;){let c=kn(i);if(i.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(let d of c)r.getNode(d.value.parentId)?Lt(d,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",d)}Object.keys(o).length&&Object.assign(this.legacy_missingNodeRetryMap,o),Nn(t.texts).forEach(c=>{var d;let u=r.getNode(c.id);if(!u)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);if(u.textContent=c.value,this.usingVirtualDom){let f=u.parentNode;((d=f?.rules)===null||d===void 0?void 0:d.length)>0&&(f.rules=[])}}),t.attributes.forEach(c=>{let d=r.getNode(c.id);if(!d)return t.removes.find(u=>u.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(let u in c.attributes)if(typeof u=="string"){let f=c.attributes[u];if(f===null)d.removeAttribute(u);else if(typeof f=="string")try{if(u==="_cssText"&&(d.nodeName==="LINK"||d.nodeName==="STYLE"))try{let h=r.getMeta(d);Object.assign(h.attributes,c.attributes);let p=tt(h,{doc:d.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),y=d.nextSibling,b=d.parentNode;if(p&&b){b.removeChild(d),b.insertBefore(p,y),r.replace(c.id,p);break}}catch{}d.setAttribute(u,f)}catch(h){this.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",h)}else if(u==="style"){let h=f,p=d;for(let y in h)if(h[y]===!1)p.style.removeProperty(y);else if(h[y]instanceof Array){let b=h[y];p.style.setProperty(y,b[0],b[1])}else{let b=h[y];p.style.setProperty(y,b)}}}})}applyScroll(t,n){var r,o;let i=this.mirror.getNode(t.id);if(!i)return this.debugNodeNotFound(t,t.id);let s=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)(r=this.iframe.contentWindow)===null||r===void 0||r.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(s?.type===K.Document)(o=i.defaultView)===null||o===void 0||o.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{i.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"})}catch{}}applyInput(t){let n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);try{n.checked=t.isChecked,n.value=t.text}catch{}}applySelection(t){try{let n=new Set,r=t.ranges.map(({start:o,startOffset:i,end:s,endOffset:a})=>{let l=this.mirror.getNode(o),c=this.mirror.getNode(s);if(!l||!c)return;let d=new Range;d.setStart(l,i),d.setEnd(c,a);let u=l.ownerDocument,f=u?.getSelection();return f&&n.add(f),{range:d,selection:f}});n.forEach(o=>o.removeAllRanges()),r.forEach(o=>{var i;return o&&((i=o.selection)===null||i===void 0?void 0:i.addRange(o.range))})}catch{}}applyStyleSheetMutation(t){var n;let r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=((n=this.mirror.getNode(t.id))===null||n===void 0?void 0:n.sheet)||null),r&&(t.source===D.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===D.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,n){var r,o,i,s;if((r=t.adds)===null||r===void 0||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){let{positions:c,index:d}=Ft(l);Ye(n.cssRules,c).insertRule(a,d)}else{let c=l===void 0?void 0:Math.min(l,n.cssRules.length);n?.insertRule(a,c)}}catch{}}),(o=t.removes)===null||o===void 0||o.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:l,index:c}=Ft(a);Ye(n.cssRules,l).deleteRule(c||0)}else n?.deleteRule(a)}catch{}}),t.replace)try{(i=n.replace)===null||i===void 0||i.call(n,t.replace)}catch{}if(t.replaceSync)try{(s=n.replaceSync)===null||s===void 0||s.call(n,t.replaceSync)}catch{}}applyStyleDeclaration(t,n){t.set&&Ye(n.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&Ye(n.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var n;let r=this.mirror.getNode(t.id);if(!r)return;(n=t.styles)===null||n===void 0||n.forEach(a=>{var l;let c=null,d=null;if(xe(r)?d=((l=r.ownerDocument)===null||l===void 0?void 0:l.defaultView)||null:r.nodeName==="#document"&&(d=r.defaultView),!!d)try{c=new d.CSSStyleSheet,this.styleMirror.add(c,a.styleId),this.applyStyleSheetRule({source:D.StyleSheetRule,adds:a.rules},c)}catch{}});let o=10,i=0,s=(a,l)=>{let c=l.map(d=>this.styleMirror.getStyle(d)).filter(d=>d!==null);xe(a)?a.shadowRoot.adoptedStyleSheets=c:a.nodeName==="#document"&&(a.adoptedStyleSheets=c),c.length!==l.length&&i<o&&(setTimeout(()=>s(a,l),0+100*i),i++)};s(r,t.styleIds)}legacy_resolveMissingNode(t,n,r,o){let{previousId:i,nextId:s}=o,a=i&&t[i],l=s&&t[s];if(a){let{node:c,mutation:d}=a;n.insertBefore(c,r),delete t[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(t,n,c,d)}if(l){let{node:c,mutation:d}=l;n.insertBefore(c,r.nextSibling),delete t[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(t,n,c,d)}}moveAndHover(t,n,r,o,i){let s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(i,r);let a=_t(s,this.iframe),l=t*a.absoluteScale+a.x,c=n*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${c}px`,o||this.drawMouseTail({x:l,y:c}),this.hoverElements(s)}drawMouseTail(t){if(!this.mouseTail)return;let{lineCap:n,lineWidth:r,strokeStyle:o,duration:i}=this.config.mouseTail===!0?xr:Object.assign({},xr,this.config.mouseTail),s=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=n,a.strokeStyle=o,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(t),s(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==t),s()},i/this.speedService.state.context.timer.speed)}hoverElements(t){var n;(n=this.iframe.contentDocument)===null||n===void 0||n.querySelectorAll(".\\:hover").forEach(o=>{o.classList.remove(":hover")});let r=t;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>D.Mutation&&t.data.source<=D.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Y.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,n){this.warn(`Node with id '${n}' not found. `,t)}warnCanvasMutationFailed(t,n){this.warn("Has error on canvas update",n,"canvas mutation:",t)}debugNodeNotFound(t,n){this.debug(Er,`Node with id '${n}' not found. `,t)}warn(...t){this.config.showWarning&&console.warn(Er,...t)}debug(...t){this.config.showDebug&&console.log(Er,...t)}}});var Ji={};kt(Ji,{EventType:()=>_,IncrementalSource:()=>D,MouseInteractions:()=>re,PLUGIN_NAME:()=>wt,Replayer:()=>on,ReplayerEvents:()=>Y,addCustomEvent:()=>ni,freezePage:()=>ri,getRecordConsolePlugin:()=>Ei,getReplayConsolePlugin:()=>xi,mirror:()=>ct,pack:()=>mi,record:()=>Re,unpack:()=>vi,utils:()=>Rn});var qi=H(()=>{oi();gi();yi();pr();Ti();Hn();ye();Zi();ge();ge()});var Rc={};kt(Rc,{BOWTIE_STAGES:()=>cn,holostaff:()=>Nc});var un="holostaff_did",Nt="holostaff_did",fn="holostaff_huid";function Gs(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function We(){return typeof window<"u"&&typeof document<"u"}function Hs(e){if(!We())return null;let t=document.cookie?document.cookie.split("; "):[];for(let n of t){let r=n.indexOf("=");if(!(r<0)&&n.slice(0,r)===e)return decodeURIComponent(n.slice(r+1))}return null}function Vr(e,t){if(!We())return;let n=window.location.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${encodeURIComponent(t)}; Max-Age=31536000; Path=/; SameSite=Lax${n}`}function $s(e){if(!We())return null;try{return window.localStorage.getItem(e)}catch{return null}}function pn(e,t){if(We())try{window.localStorage.setItem(e,t)}catch{}}function zs(e){if(!We())return null;try{return window.sessionStorage.getItem(e)}catch{return null}}function Ks(e,t){if(We())try{window.sessionStorage.setItem(e,t)}catch{}}function js(e){if(We())try{window.sessionStorage.removeItem(e)}catch{}}function Gr(){let e=Hs(un),t=$s(Nt);if(e&&t)return e!==t&&pn(Nt,e),e;if(e)return pn(Nt,e),e;if(t)return Vr(un,t),t;let n=Gs();return Vr(un,n),pn(Nt,n),n}function hn(){return zs(fn)}function Hr(e){Ks(fn,e)}function $r(){js(fn)}var Ys="https://holostaff-vision-1008066443043.us-central1.run.app";function zr(e){return{baseUrl:e.baseUrl??Ys,apiKey:e.apiKey,onError:e.onError}}function Kr(e){let t={"content-type":"application/json"};return e.apiKey&&(t.authorization=`Bearer ${e.apiKey}`),t}async function fe(e,t,n){try{let r=await fetch(`${e.baseUrl}${t}`,{method:"POST",headers:Kr(e),body:JSON.stringify(n),credentials:"omit",mode:"cors"});if(!r.ok){let o=await r.text().catch(()=>"");return e.onError?.(new Error(`HTTP ${r.status} ${r.statusText}${o?` \u2014 ${o}`:""}`),{method:"POST",path:t}),!1}return!0}catch(r){return e.onError?.(r instanceof Error?r:new Error(String(r)),{method:"POST",path:t}),!1}}async function De(e,t,n){try{let r=await fetch(`${e.baseUrl}${t}`,{method:"POST",headers:Kr(e),body:JSON.stringify(n),credentials:"omit",mode:"cors"});if(!r.ok){let o=await r.text().catch(()=>"");return e.onError?.(new Error(`HTTP ${r.status} ${r.statusText}${o?` \u2014 ${o}`:""}`),{method:"POST",path:t}),null}return await r.json()}catch(r){return e.onError?.(r instanceof Error?r:new Error(String(r)),{method:"POST",path:t}),null}}function Ve(e,t,n){let r=`${e.baseUrl}${t}`,o=JSON.stringify(n);if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function")try{let i=new Blob([o],{type:"text/plain"});return navigator.sendBeacon(r,i)}catch(i){return e.onError?.(i instanceof Error?i:new Error(String(i)),{method:"BEACON",path:t}),!1}try{return fetch(r,{method:"POST",headers:{"content-type":"text/plain"},body:o,keepalive:!0,credentials:"omit",mode:"cors"}),!0}catch(i){return e.onError?.(i instanceof Error?i:new Error(String(i)),{method:"BEACON",path:t}),!1}}function mn(e,t,n,r){if(typeof EventSource>"u")return null;let o=new URLSearchParams({tenantId:n,sourceId:r}),i=`${e.baseUrl}/api/runtime/sessions/${encodeURIComponent(t)}/commands?${o}`;try{return new EventSource(i)}catch(s){return e.onError?.(s instanceof Error?s:new Error(String(s)),{method:"SSE",path:`/api/runtime/sessions/${t}/commands`}),null}}function Zs(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function gn(){return`ses_${Date.now().toString(36)}_${Zs().slice(0,8)}`}function jr(e,t){if(typeof window>"u")return{dispose:()=>{}};let n=!1,r=()=>{n||(n=!0,e())},o=()=>r(),i=()=>{document.visibilityState==="hidden"&&(t?.suppressOnHidden?.()||r())};return window.addEventListener("pagehide",o),document.addEventListener("visibilitychange",i),{dispose:()=>{window.removeEventListener("pagehide",o),document.removeEventListener("visibilitychange",i)}}}var Js=3e4,qs=80;function vn(e){if(typeof window>"u")return{dispose:()=>{}};let t=null,n=new Date().toISOString(),r=null,o=null,i=!1,s=()=>{try{return window.location.pathname+window.location.search}catch{return"/"}},a=v=>{i||fe(e.cfg,`/api/runtime/sessions/${e.sessionId}/fastpath`,{...e.buildBody(),route:v,lastActivityAt:n})},l=()=>{r=null;let v=s();v!==t&&(t=v,a(v))},c=()=>{r||(r=setTimeout(l,qs))},d=()=>{n=new Date().toISOString()},u=()=>{c()},f=()=>{c()},h=window.history.pushState,p=window.history.replaceState,y=function(...v){let E=h.apply(window.history,v);return c(),E},b=function(...v){let E=p.apply(window.history,v);return c(),E};window.history.pushState=y,window.history.replaceState=b;let m={passive:!0};window.addEventListener("mousemove",d,m),window.addEventListener("scroll",d,m),window.addEventListener("keydown",d,m),window.addEventListener("touchstart",d,m),window.addEventListener("popstate",u),window.addEventListener("hashchange",f);let g=s();return t=g,a(g),o=setInterval(()=>{i||a(s())},Js),{dispose(){i||(i=!0,window.removeEventListener("mousemove",d),window.removeEventListener("scroll",d),window.removeEventListener("keydown",d),window.removeEventListener("touchstart",d),window.removeEventListener("popstate",u),window.removeEventListener("hashchange",f),window.history.pushState===y&&(window.history.pushState=h),window.history.replaceState===b&&(window.history.replaceState=p),o!=null&&(clearInterval(o),o=null),r!=null&&(clearTimeout(r),r=null))}}}var Dl=5e3,Ll=200,_l=8e5,Fl=55e3,Bl=3e4,Pl=800,Ul=3e6,Wl=15e3,Vl=2;function Tr(e){if(typeof window>"u")return{dispose:()=>{}};if(e.observe?.enabled===!1)return{dispose:()=>{}};let t=!1,n=!1,r=null,o=[],i=0,s=[],a=0,l=null,c=null,d=`/api/runtime/sessions/${e.sessionId}/observations`,u=`/api/runtime/sessions/${e.sessionId}/heartbeat`,h=typeof navigator<"u"&&navigator.webdriver===!0?{automated:!0}:{},p=()=>{if(!o.length)return;let R=o;o=[],i=0,fe(e.cfg,d,{...e.buildBody(),...h,events:R})},y=()=>{if(!o.length)return;let R=o;for(o=[],i=0;R.length>1&&JSON.stringify(R).length>Fl;)R=R.slice(Math.ceil(R.length/2));Ve(e.cfg,d,{...e.buildBody(),...h,events:R})},b=R=>{try{return JSON.stringify(R).length}catch{return 1e3}},m=()=>{let R=-1;for(let I=s.length-1;I>=0;I--)if(s[I].type===Vl){R=I;break}R>0&&(s=s.slice(R)),a=s.reduce((I,w)=>I+b(w),0)},g=R=>{if(!t){if(!n){s.push(R),a+=b(R),(s.length>Pl||a>Ul)&&m();return}o.push(R),i+=b(R),(o.length>=Ll||i>=_l)&&p()}},v=()=>{l==null&&(l=setInterval(p,Dl))},E=()=>{l!=null&&(clearInterval(l),l=null)},N=()=>{c==null&&(c=setInterval(()=>{typeof document<"u"&&document.hidden||fe(e.cfg,u,{...e.buildBody(),...h})},Wl))},k=()=>{c!=null&&(clearInterval(c),c=null)},O=["pointerdown","pointermove","keydown","wheel","scroll","touchstart"],A={passive:!0,capture:!0},$=()=>{n||t||(n=!0,U(),o=s,i=a,s=[],a=0,p(),v(),N())},V=R=>{R.isTrusted&&$()},F=()=>{for(let R of O)window.addEventListener(R,V,A)},U=()=>{for(let R of O)window.removeEventListener(R,V,A)},W=()=>{n&&(document.hidden?(p(),E(),k()):(v(),N()))};return typeof document<"u"&&document.addEventListener("visibilitychange",W),F(),e.evalMode&&$(),Promise.resolve().then(()=>(qi(),Ji)).then(R=>{if(t)return;let I=R.record;if(typeof I!="function"){e.cfg.onError?.(new Error("rrweb.record unavailable"),{method:"OBSERVE",path:d});return}r=I({emit:w=>g(w),checkoutEveryNms:Bl,recordCanvas:!0,sampling:{canvas:2},inlineImages:!0,collectFonts:!0,maskInputOptions:{password:!0,email:!0,tel:!0},maskAllInputs:e.observe?.maskAllInputs??!1,maskTextClass:"holostaff-mask",blockClass:"holostaff-block",ignoreClass:"holostaff-ignore",...e.observe?.blockSelector?{blockSelector:e.observe.blockSelector}:{},...e.observe?.rrweb??{}})??null}).catch(R=>{e.cfg.onError?.(R instanceof Error?R:new Error(String(R)),{method:"OBSERVE",path:d})}),{dispose(){if(!t){t=!0,E(),k(),U(),typeof document<"u"&&document.removeEventListener("visibilitychange",W);try{r?.()}catch{}r=null,n&&y()}}}}function Gl(){return document.querySelector("script[nonce]")?.nonce??""}function Qi(e){let t=document.createElement("style"),n=Gl();return n&&(t.nonce=n),t.textContent=e,t}function Et(e,t){try{let n=new CSSStyleSheet;n.replaceSync(t),e.adoptedStyleSheets=[...e.adoptedStyleSheets,n];return}catch{}e.appendChild(Qi(t))}var Xi=new Map;function it(e,t){try{let r=Xi.get(e);r||(r=new CSSStyleSheet,Xi.set(e,r),document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]),r.replaceSync(t);return}catch{}let n=document.getElementById(e);if(!n){n=Qi(t),n.id=e,document.head.appendChild(n);return}n.textContent=t}var es=56,ts="holostaff-presence-root",sn=220,Hl=12e4,$l=45e3;function os(e){if(typeof window>"u"||typeof document>"u")return jl();let t=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,n=zl(e),r=n.shadowRoot;Et(r,Yl(e));let o=document.createElement("div");o.className="wrap";let i=document.createElement("button");i.className="chip",i.setAttribute("data-holostaff","chip"),i.type="button",i.setAttribute("aria-label","Copilot"),i.style.display="none";let s=document.createElement("div");s.className="frame";let a=ns("idle"),l=ns("gesture"),c=document.createElement("img");c.className="poster",c.alt="",c.referrerPolicy="no-referrer";let d=document.createElement("div");d.className="mono",s.append(c,a,l,d),i.appendChild(s);let u=document.createElement("div");u.className="tag";let f=document.createElement("div");f.className="tag-name";let h=document.createElement("div");h.className="tag-scope",u.append(f,h),o.append(i,u),r.appendChild(o);let p=null,y=null,b=null,m=!1,g=!1,v=()=>e.dock.endsWith("right")?"glanceL":"glanceR",E=(F,U)=>{let W=F.portrait??{},R=W.poster??F.avatar??"",I=U?.light?.primary||U?.dark?.primary||"";I&&s.style.setProperty("--accent",I),d.textContent=(F.name.trim()[0]??"?").toUpperCase(),!t&&!!(W.idle||W.idleMp4)?(rs(a,W.idle,W.idleMp4),R&&(a.poster=R),a.style.display="block",c.style.display="none",d.style.display="none",a.play().catch(()=>{})):R?(c.src=R,c.style.display="block",a.style.display="none",d.style.display="none"):(d.style.display="flex",a.style.display="none",c.style.display="none")},N=F=>{if(m||t||document.hidden)return;let U=p?.portrait?.gestures?.[F];if(!U)return;rs(l,U,void 0),l.classList.add("show"),l.play().catch(()=>{}),b&&clearTimeout(b);let W=()=>{l.classList.remove("show")};l.onended=W,b=setTimeout(W,4e3)},k=()=>{y&&clearTimeout(y);let F=Hl+Math.random()*$l;y=setTimeout(()=>{!m&&!document.hidden&&!t&&p&&N(v()),k()},F)},O=()=>{g||o.classList.add("open"),N("meet")},A=()=>{o.classList.remove("open")};i.addEventListener("mouseenter",O),i.addEventListener("mouseleave",A),i.addEventListener("focus",O),i.addEventListener("blur",A),i.addEventListener("click",()=>{p&&e.onActivate?.(p)});let $=()=>{document.hidden?a.pause():p&&!t&&(p.portrait?.idle||p.portrait?.idleMp4)&&a.play().catch(()=>{})};return document.addEventListener("visibilitychange",$),{setCopilot:(F,U)=>{if(m)return;if(!F){p=null,i.classList.add("leaving"),setTimeout(()=>{p||(i.style.display="none")},t?0:sn),y&&(clearTimeout(y),y=null);return}let W=p?.copilotId!==F.copilotId;p=F,f.textContent=`${F.name} \xB7 ${F.roleLine}`,h.textContent=F.scopeLine,i.setAttribute("aria-label",`${F.name}, ${F.roleLine}. ${F.scopeLine}`),i.style.display="block",i.classList.remove("leaving"),W&&!t&&(i.classList.add("swap"),requestAnimationFrame(()=>requestAnimationFrame(()=>i.classList.remove("swap")))),E(F,U),k()},playGesture:N,getAnchorRect:()=>i.style.display==="none"?null:i.getBoundingClientRect(),innerGlance:v,getCopilot:()=>p,setTagSuppressed(F){g=F,F&&o.classList.remove("open")},destroy(){m=!0,y&&clearTimeout(y),b&&clearTimeout(b),document.removeEventListener("visibilitychange",$);try{n.remove()}catch{}}}}function ns(e){let t=document.createElement("video");return t.className=e,t.muted=!0,t.loop=e==="idle",t.autoplay=e==="idle",t.playsInline=!0,t.setAttribute("playsinline",""),t.setAttribute("aria-hidden","true"),t.preload="auto",t}function rs(e,t,n){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){let r=document.createElement("source");r.src=t,r.type=t.endsWith(".mp4")?"video/mp4":"video/webm",e.appendChild(r)}if(n&&n!==t){let r=document.createElement("source");r.src=n,r.type="video/mp4",e.appendChild(r)}e.load()}function zl(e){let t=document.getElementById(ts);if(t)return t;t=document.createElement("div"),t.id=ts,t.setAttribute("data-holostaff","chip-host");let[n,r]=e.dock.split("-"),o=`${e.offset}px`;return t.style.cssText=["position:fixed",`${n}:${Kl(e,o)}`,`${r}:${o}`,"z-index:2147483646","pointer-events:none"].join(";"),t.attachShadow({mode:"open"}),document.body.appendChild(t),t}function Kl(e,t){let n=["#intercom-container",".intercom-lightweight-app","#launcher","#drift-widget",".drift-frame-controller","#crisp-chatbox","#hubspot-messages-iframe-container"];try{if(n.some(o=>document.querySelector(o)))return console.info("[holostaff] presence: chat widget detected in the dock corner; offsetting the copilot above it. Set init({ presence: { dock } }) to choose a corner."),`calc(${t} + 76px)`}catch{}return t}function jl(){return{setCopilot:()=>{},playGesture:()=>{},getAnchorRect:()=>null,innerGlance:()=>"glanceL",getCopilot:()=>null,setTagSuppressed:()=>{},destroy:()=>{}}}function Yl(e){let t=e.dock.endsWith("right");return`
|
|
17
|
+
:host { all: initial; }
|
|
18
|
+
.wrap {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: flex; align-items: center;
|
|
21
|
+
font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
22
|
+
}
|
|
23
|
+
.chip {
|
|
24
|
+
pointer-events: auto;
|
|
25
|
+
appearance: none; border: 0; padding: 0; margin: 0;
|
|
26
|
+
width: ${es}px; height: ${es}px; border-radius: 50%;
|
|
27
|
+
cursor: pointer; background: transparent;
|
|
28
|
+
transition: transform 160ms ease-out, opacity ${sn}ms ease-out;
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
.chip:hover { transform: scale(1.06); }
|
|
32
|
+
.chip:focus-visible { outline: none; }
|
|
33
|
+
.chip:focus-visible .frame { box-shadow: 0 0 0 3px var(--accent, #4f8bff); }
|
|
34
|
+
.chip.swap .frame { opacity: 0; }
|
|
35
|
+
.chip.leaving { opacity: 0; transform: scale(0.9); }
|
|
36
|
+
.frame {
|
|
37
|
+
position: relative; width: 100%; height: 100%;
|
|
38
|
+
border-radius: 50%; overflow: hidden;
|
|
39
|
+
background: #1a1a1a;
|
|
40
|
+
box-shadow: 0 4px 16px rgba(0,0,0,0.28), 0 0 0 2px var(--accent, rgba(255,255,255,0.18));
|
|
41
|
+
transition: opacity ${sn}ms ease-out, box-shadow 160ms ease-out;
|
|
42
|
+
}
|
|
43
|
+
.frame > * {
|
|
44
|
+
position: absolute; inset: 0;
|
|
45
|
+
width: 100%; height: 100%; object-fit: cover;
|
|
46
|
+
}
|
|
47
|
+
.idle, .poster { display: none; }
|
|
48
|
+
.gesture { opacity: 0; transition: opacity ${sn}ms ease-out; pointer-events: none; }
|
|
49
|
+
.gesture.show { opacity: 1; }
|
|
50
|
+
.mono {
|
|
51
|
+
display: none; align-items: center; justify-content: center;
|
|
52
|
+
background: #23262e; color: var(--accent, #9ab8ff);
|
|
53
|
+
font-weight: 600; font-size: 22px;
|
|
54
|
+
}
|
|
55
|
+
.tag {
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
position: absolute; ${t?"right: calc(100% + 10px);":"left: calc(100% + 10px);"}
|
|
58
|
+
top: 50%;
|
|
59
|
+
transform: translateY(-50%) ${t?"translateX(8px)":"translateX(-8px)"};
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transition: opacity 160ms ease-out, transform 160ms ease-out;
|
|
62
|
+
background: #111; color: #fafafa;
|
|
63
|
+
border-radius: 12px; padding: 8px 12px;
|
|
64
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.3);
|
|
65
|
+
white-space: nowrap; max-width: 260px;
|
|
66
|
+
}
|
|
67
|
+
.wrap.open .tag { opacity: 1; transform: translateY(-50%) translateX(0); }
|
|
68
|
+
.tag-name { font-weight: 600; font-size: 13px; }
|
|
69
|
+
.tag-scope { font-size: 12px; color: #c7c7c7; margin-top: 2px; white-space: normal; }
|
|
70
|
+
@media (prefers-reduced-motion: reduce) {
|
|
71
|
+
.chip, .frame, .gesture, .tag { transition: none; }
|
|
72
|
+
}
|
|
73
|
+
`}function Ar(e){let t=e.options??{};if(t.enabled===!1||typeof window>"u"||!e.source)return Zl();let n=null,r=null,o=null,i=os({dock:t.dock??"bottom-right",offset:t.offset??16,onActivate:l=>o?.(l)}),s=l=>{let c=null;try{c=JSON.parse(l.data)}catch{return}c&&(n=c.copilot??null,r=c.designTokens??null,i.setCopilot(n,r))},a=l=>{let c=null;try{c=JSON.parse(l.data)}catch{return}!c||!c.copilot||(n=c.copilot,r=c.designTokens??r,i.setCopilot(n,r),i.playGesture(c.firstMeeting?"wave":"nod"))};return e.source.addEventListener("presence",s),e.source.addEventListener("copilot_changed",a),{chip:i,dispose(){e.source?.removeEventListener("presence",s),e.source?.removeEventListener("copilot_changed",a),i.destroy()},getCopilot:()=>n,getDesignTokens:()=>r,onActivate(l){o=l}}}function Zl(){return{chip:null,dispose:()=>{},getCopilot:()=>null,getDesignTokens:()=>null,onActivate:()=>{}}}var Jl=45e3,ql=15e3,is=260,Nr=200,Xl=12e3,ss="holostaff-note-root";function Rr(e){if(typeof window>"u"||!e.source)return{dispose:()=>{},onShow:()=>{},onTalk:()=>{}};let t=null,n=null,r=null,o=(a,l)=>{fe(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/outcome`,{...e.buildBody(),interventionId:a,outcome:l})},i=a=>{let l=null;try{let c=JSON.parse(a.data);if(!c||typeof c.interventionId!="string")return;l=c}catch{return}if(l){if(l.modality!=="text"&&l.modality!=="voice_presentation"){e.cfg.onError?.(new Error(`Modality '${l.modality}' is not supported in this SDK build`),{method:"NOTE",path:"(fire_intervention)"});return}if(l.route){let c=l.route.split("?")[0];if(c&&c!==window.location.pathname){o(l.interventionId,"ignored");return}}t&&t.close("ignored"),t=Ql(e,l,{showHandler:n,talkHandler:r},()=>{t&&t.event.interventionId===l.interventionId&&(t=null)})}},s=a=>{let l=null;try{l=JSON.parse(a.data)}catch{return}!l||!l.firstMeeting||!l.copilot?.intro||t||(t=ec(e,l,()=>{t=null}))};return e.source.addEventListener("fire_intervention",i),e.source.addEventListener("copilot_changed",s),{dispose(){e.source?.removeEventListener("fire_intervention",i),e.source?.removeEventListener("copilot_changed",s),t?.detach(),t=null},onShow(a){n=a},onTalk(a){r=a}}}function Ql(e,t,n,r){let o=ls();cs(o,e);let i=o.shadowRoot;i.innerHTML="";let s=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,a=t.copilot?.name?.trim()||"Copilot",l=t.copilot?.roleLine?.trim()||"",c=document.createElement("div");c.className=`note enter ${e.dock}`,c.setAttribute("role","status"),c.setAttribute("aria-live","polite"),c.setAttribute("data-holostaff","note"),c.setAttribute("data-holostaff-intervention",t.interventionId),c.setAttribute("data-holostaff-modality",t.modality);let d=document.createElement("div");d.className="head";let u=document.createElement("div");u.className="idblock";let f=document.createElement("div");if(f.className="name",f.textContent=a,u.appendChild(f),l){let x=document.createElement("div");x.className="role",x.textContent=l,u.appendChild(x)}d.appendChild(u);let h=document.createElement("button");h.className="x",h.type="button",h.setAttribute("aria-label","Dismiss"),h.textContent="\u2715",d.appendChild(h);let p=document.createElement("div");p.className="message",p.textContent=t.content||t.goal;let y=t.modality==="voice_presentation",b=document.createElement("div");b.className="actions",n.talkHandler&&b.appendChild(kr("secondary","Talk",()=>{n.talkHandler?.(as(t)),w.close("engaged")})),y&&n.showHandler?b.appendChild(kr("primary","Show me",()=>{n.showHandler?.(as(t)),w.close("engaged")})):b.appendChild(kr("primary","Got it",()=>w.close("engaged"))),c.append(d,p,b),Et(i,ds()),i.append(c),s?c.classList.remove("enter"):requestAnimationFrame(()=>requestAnimationFrame(()=>c.classList.remove("enter"))),e.presence.chip?.playGesture(e.presence.chip.innerGlance()),e.presence.chip?.setTagSuppressed(!0);let m=!1,g=!1,v=Jl,E=null,N=0,k=!1,O=()=>{m||!g||k||(N=Date.now(),E=setTimeout(()=>w.close("ignored"),v))},A=()=>{k=!0,E!=null&&(clearTimeout(E),E=null,v=Math.max(1e3,v-(Date.now()-N)))},$=()=>{k&&(k=!1,O())},V=()=>{g||m||(g=!0,window.removeEventListener("pointerdown",V),window.removeEventListener("scroll",V),window.removeEventListener("keydown",V),F!=null&&(clearTimeout(F),F=null),document.hidden||O())};window.addEventListener("pointerdown",V,{passive:!0}),window.addEventListener("scroll",V,{passive:!0}),window.addEventListener("keydown",V);let F=setTimeout(V,ql);c.addEventListener("mouseenter",A),c.addEventListener("focusin",A),c.addEventListener("mouseleave",$),c.addEventListener("focusout",$);let U=()=>{document.hidden?A():g&&$()};document.addEventListener("visibilitychange",U);let W=x=>{fe(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/outcome`,{...e.buildBody(),interventionId:t.interventionId,outcome:x})},R=()=>{E!=null&&clearTimeout(E),F!=null&&clearTimeout(F),window.removeEventListener("pointerdown",V),window.removeEventListener("scroll",V),window.removeEventListener("keydown",V),document.removeEventListener("visibilitychange",U),e.presence.chip?.setTagSuppressed(!1)},I=x=>{if(m)return;m=!0,R(),x&&W(x);let T=()=>{try{i.removeChild(c)}catch{}r()};if(s){T();return}c.classList.add("exit");let C=!1,S=()=>{C||(C=!0,T())};c.addEventListener("transitionend",S,{once:!0}),setTimeout(S,Nr+80)};h.addEventListener("click",()=>I("dismissed"));let w={event:t,close(x){I(x)},detach(){I(null)}};return w}function ec(e,t,n){let r=ls();cs(r,e);let o=r.shadowRoot;o.innerHTML="";let i=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,s=t.copilot.name?.trim()||"Copilot",a=t.copilot.roleLine?.trim()||"",l=document.createElement("div");l.className=`note enter ${e.dock}`,l.setAttribute("role","status"),l.setAttribute("aria-live","polite"),l.setAttribute("data-holostaff","intro");let c=document.createElement("div");c.className="head";let d=document.createElement("div");d.className="idblock";let u=document.createElement("div");if(u.className="name",u.textContent=s,d.appendChild(u),a){let g=document.createElement("div");g.className="role",g.textContent=a,d.appendChild(g)}c.appendChild(d);let f=document.createElement("button");f.className="x",f.type="button",f.setAttribute("aria-label","Dismiss"),f.textContent="\u2715",c.appendChild(f);let h=document.createElement("div");h.className="message",h.textContent=t.copilot.intro,l.append(c,h),Et(o,ds()),o.append(l),i?l.classList.remove("enter"):requestAnimationFrame(()=>requestAnimationFrame(()=>l.classList.remove("enter"))),e.presence.chip?.setTagSuppressed(!0);let p=!1,y=setTimeout(()=>m.close(null),Xl),b=()=>{if(p)return;p=!0,e.presence.chip?.setTagSuppressed(!1),y!=null&&(clearTimeout(y),y=null);let g=()=>{try{o.removeChild(l)}catch{}n()};if(i){g();return}l.classList.add("exit");let v=!1,E=()=>{v||(v=!0,g())};l.addEventListener("transitionend",E,{once:!0}),setTimeout(E,Nr+80)};f.addEventListener("click",b);let m={event:{interventionId:`intro_${t.copilot.copilotId}`,modality:"text",content:t.copilot.intro,goal:"",stage:t.stage},close(){b()},detach(){b()}};return m}function as(e){return{interventionId:e.interventionId,goal:e.goal,content:e.content,stage:e.stage}}function kr(e,t,n){let r=document.createElement("button");return r.className=`btn ${e}`,r.type="button",r.textContent=t,r.addEventListener("click",n),r}function ls(){let e=document.getElementById(ss);return e||(e=document.createElement("div"),e.id=ss,e.setAttribute("data-holostaff","note-host"),e.style.cssText="position:fixed;z-index:2147483646;pointer-events:none",e.attachShadow({mode:"open"}),document.body.appendChild(e),e)}function cs(e,t){let r=t.presence.chip?.getAnchorRect()??null;if(e.style.top=e.style.bottom=e.style.left=e.style.right="",r){t.dock.startsWith("bottom")?e.style.bottom=`${Math.max(8,window.innerHeight-r.top+12)}px`:e.style.top=`${Math.max(8,r.bottom+12)}px`,t.dock.endsWith("right")?e.style.right=`${Math.max(8,window.innerWidth-r.right)}px`:e.style.left=`${Math.max(8,r.left)}px`;return}let o=16;t.dock.startsWith("bottom")?e.style.bottom=`${o+64}px`:e.style.top=`${o+64}px`,t.dock.endsWith("right")?e.style.right=`${o}px`:e.style.left=`${o}px`}function ds(){return`
|
|
74
|
+
:host { all: initial; }
|
|
75
|
+
.note {
|
|
76
|
+
pointer-events: auto;
|
|
77
|
+
width: 320px; max-width: calc(100vw - 32px);
|
|
78
|
+
background: #111; color: #fafafa;
|
|
79
|
+
border-radius: 16px;
|
|
80
|
+
box-shadow: 0 12px 32px rgba(0,0,0,0.32), 0 2px 8px rgba(0,0,0,0.12);
|
|
81
|
+
padding: 12px 14px;
|
|
82
|
+
font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
83
|
+
opacity: 1; transform: scale(1) translateY(0);
|
|
84
|
+
transition: opacity ${is}ms ease-out, transform ${is}ms cubic-bezier(0.16,1,0.3,1);
|
|
85
|
+
}
|
|
86
|
+
/* Grow from the chip: origin toward the docked corner. */
|
|
87
|
+
.note.bottom-right { transform-origin: bottom right; }
|
|
88
|
+
.note.bottom-left { transform-origin: bottom left; }
|
|
89
|
+
.note.top-right { transform-origin: top right; }
|
|
90
|
+
.note.top-left { transform-origin: top left; }
|
|
91
|
+
.note.enter { opacity: 0; transform: scale(0.82) translateY(8px); }
|
|
92
|
+
.note.exit { opacity: 0; transform: scale(0.82) translateY(8px); transition-duration: ${Nr}ms; }
|
|
93
|
+
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
|
|
94
|
+
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #2a2a2a; }
|
|
95
|
+
.avatar.mono { display: flex; align-items: center; justify-content: center; color: #9ab8ff; font-weight: 600; font-size: 15px; }
|
|
96
|
+
.idblock { flex: 1; min-width: 0; }
|
|
97
|
+
.name { font-weight: 600; font-size: 13px; color: #e8e8e8; }
|
|
98
|
+
.role { font-size: 11px; color: #9a9a9a; margin-top: 1px; }
|
|
99
|
+
.x { appearance: none; border: 0; background: transparent; color: #8a8a8a; font-size: 13px; line-height: 1; padding: 6px; margin: -6px -4px -6px 0; border-radius: 8px; cursor: pointer; flex: none; }
|
|
100
|
+
.x:hover { color: #fff; background: rgba(255,255,255,0.08); }
|
|
101
|
+
.message { margin: 0 2px 12px; color: #f2f2f2; }
|
|
102
|
+
.actions { display: flex; justify-content: flex-end; gap: 8px; }
|
|
103
|
+
.btn { appearance: none; border: 0; padding: 7px 14px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
|
|
104
|
+
.btn.primary { background: #4f8bff; color: #fff; }
|
|
105
|
+
.btn.primary:hover { background: #6aa0ff; }
|
|
106
|
+
.btn.secondary { background: rgba(255,255,255,0.10); color: #e8e8e8; }
|
|
107
|
+
.btn.secondary:hover { background: rgba(255,255,255,0.16); }
|
|
108
|
+
.btn:focus-visible, .x:focus-visible { outline: 2px solid #9ab8ff; outline-offset: 2px; }
|
|
109
|
+
@media (prefers-reduced-motion: reduce) { .note { transition: none; } }
|
|
110
|
+
`}var tc="holostaff-theater-root";function us(e){if(typeof window>"u"||typeof document>"u")return oc();let t=nc(e.baseUrl),n=null,r=null,o=!1,i=!0,s=null,a=null,l=null,c=!1,d=null,u=v=>{if(t&&v.origin!==t)return;let E=v.data;if(!(!E||typeof E.type!="string"))switch(E.type){case"theater-ready":o=!0,s&&(clearTimeout(s),s=null),h(),a&&(p(a),a=null);break;case"theater-close":g();break;case"theater-error":e.onError?.(new Error(`Theater: ${E.error??"render error"}`));break}};window.addEventListener("message",u);let f=()=>{if(n)return;n=document.createElement("div"),n.id=tc,n.style.cssText=["position:fixed","inset:0","z-index:2147483647","background:rgba(8,9,12,0.62)","backdrop-filter:blur(2px)","opacity:0","transition:opacity 200ms ease-out"].join(";"),r=document.createElement("iframe"),r.title="Copilot presentation",r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.cssText=["position:absolute","inset:0","width:100%","height:100%","border:0","background:transparent"].join(";"),r.addEventListener("error",()=>m());let v=document.createElement("button");v.type="button",v.setAttribute("aria-label","Close presentation"),v.textContent="\u2715",v.style.cssText=["position:absolute","top:18px","right:20px","z-index:2","width:40px","height:40px","border-radius:50%","border:0","background:rgba(255,255,255,0.14)","color:#fff","font-size:16px","cursor:pointer"].join(";"),v.addEventListener("click",()=>g()),n.addEventListener("click",E=>{E.target===n&&g()}),n.append(r,v,b()),document.body.appendChild(n),requestAnimationFrame(()=>{n&&(n.style.opacity="1")}),d&&(rc(d.wrap,d.fromRect),d=null),o=!1,r.src=`${e.baseUrl.replace(/\/$/,"")}/theater/app`,s=setTimeout(()=>{o||m()},6e3)},h=()=>{let v=e.presence.getDesignTokens();y({type:"theme",tokens:v})},p=v=>{let E=e.buildContext(),N=e.presence.getCopilot();y({type:"present",payload:{...E,copilotId:N?.copilotId,copilotName:N?.name,intent:v.intent,context:v.context}})},y=v=>{try{r?.contentWindow?.postMessage(v,t||"*")}catch{}},b=()=>{let v=document.createElement("div");v.style.cssText=["position:absolute","right:24px","bottom:24px","z-index:2","width:128px","height:128px","border-radius:50%","overflow:hidden","box-shadow:0 10px 30px rgba(0,0,0,0.45), 0 0 0 3px rgba(255,255,255,0.10)","background:#1a1a1a"].join(";");let E=l?.acquire()??null;if(E)return c=!0,E.video.style.cssText="width:100%;height:100%;object-fit:cover",v.appendChild(E.video),d={wrap:v,fromRect:E.fromRect},v;let N=e.presence.getCopilot(),k=N?.portrait;if(k?.idle||k?.idleMp4||k?.poster){let O=document.createElement("video");O.muted=!0,O.loop=!0,O.autoplay=!0,O.playsInline=!0,O.setAttribute("playsinline",""),O.style.cssText="width:100%;height:100%;object-fit:cover",k.poster&&(O.poster=k.poster);let A=k.idle||k.idleMp4;A&&(O.src=A,O.play().catch(()=>{})),v.appendChild(O)}else if(N?.avatar){let O=document.createElement("img");O.src=N.avatar,O.alt="",O.referrerPolicy="no-referrer",O.style.cssText="width:100%;height:100%;object-fit:cover",v.appendChild(O)}return v},m=()=>{i=!1,e.onError?.(new Error("Theater unavailable (likely host frame-src CSP). Falling back to telling.")),g()},g=()=>{if(s&&(clearTimeout(s),s=null),!n)return;if(c){try{l?.release()}catch{}c=!1}let v=n;n=null,r=null,o=!1,a=null,v.style.opacity="0",setTimeout(()=>{try{v.remove()}catch{}},200)};return{present(v){!i||!v?.intent||(f(),o?p(v):a=v)},highlight(v){y({type:"highlight",elementId:v})},close:g,setPresenter(v){l=v},isAvailable:()=>i,dispose(){window.removeEventListener("message",u),g()}}}function nc(e){try{return new URL(e).origin}catch{return""}}function rc(e,t){if(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r=e.getBoundingClientRect();if(!r.width||!r.height||!t.width||!t.height)return;let o=t.left-r.left,i=t.top-r.top,s=t.width/r.width,a=t.height/r.height;e.style.transformOrigin="top left",e.style.transition="none",e.style.transform=`translate(${o}px, ${i}px) scale(${s}, ${a})`,requestAnimationFrame(()=>{e.style.transition="transform 420ms cubic-bezier(0.16, 1, 0.3, 1)",e.style.transform="none"})}function oc(){return{present:()=>{},highlight:()=>{},close:()=>{},setPresenter:()=>{},isAvailable:()=>!1,dispose:()=>{}}}async function Mr(e,t){let n=new RTCPeerConnection;for(let p of e.micStream.getAudioTracks())n.addTrack(p,e.micStream);e.audioOut&&n.addEventListener("track",p=>{p.track.kind==="audio"&&p.streams[0]&&t.onRemoteAudio?.(p.streams[0])});let r=n.createDataChannel("oai-events"),o=ps(),i=!1,s=p=>{try{r.readyState==="open"&&r.send(JSON.stringify(p))}catch{}},a=/\/realtime\/calls(?:\?|$)/i.test(e.realtimeUrl),l=e.tools.map(p=>({type:"function",name:p.name,description:p.description,parameters:p.parameters}));r.addEventListener("open",()=>{let p=a?{type:"realtime",output_modalities:e.audioOut?["audio"]:["text"],...e.instructions?{instructions:e.instructions}:{},tools:l,tool_choice:"auto",audio:{input:{transcription:{model:"whisper-1"},turn_detection:{type:"semantic_vad"}},...e.audioOut&&e.voice?{output:{voice:e.voice}}:{}}}:{modalities:e.audioOut?["audio","text"]:["text"],...e.audioOut&&e.voice?{voice:e.voice}:{},...e.instructions?{instructions:e.instructions}:{},tools:l,tool_choice:"auto",input_audio_transcription:{model:"whisper-1"},turn_detection:{type:"server_vad",threshold:.5,silence_duration_ms:500}};s({type:"session.update",session:p}),e.seedMessage&&s({type:"conversation.item.create",item:{type:"message",role:"user",content:[{type:"input_text",text:e.seedMessage}]}}),s({type:"response.create"})}),r.addEventListener("message",p=>{let y;try{y=JSON.parse(p.data)}catch{return}c(y)});let c=p=>{switch(p.type){case"response.text.delta":case"response.output_text.delta":case"response.audio_transcript.delta":case"response.output_audio_transcript.delta":typeof p.delta=="string"&&t.onTextDelta(p.delta,o);break;case"response.created":i=!0;break;case"response.text.done":case"response.output_text.done":case"response.audio_transcript.done":case"response.output_audio_transcript.done":case"response.done":p.type==="response.done"&&(i=!1),t.onTurnDone(o),o=ps();break;case"input_audio_buffer.speech_started":t.onUserSpeechStarted();break;case"conversation.item.input_audio_transcription.completed":typeof p.transcript=="string"&&p.transcript.trim()&&t.onUserTranscript?.(p.transcript.trim());break;case"output_audio_buffer.started":t.onAudioPlaybackStarted?.();break;case"output_audio_buffer.stopped":case"output_audio_buffer.cleared":t.onAudioPlaybackStopped?.();break;case"response.function_call_arguments.done":{let y=typeof p.name=="string"?p.name:"",b=typeof p.call_id=="string"?p.call_id:"",m={};if(typeof p.arguments=="string")try{m=JSON.parse(p.arguments)}catch{}y&&b&&t.onToolCall({name:y,args:m,callId:b});break}case"error":t.onError(new Error(typeof p.error=="object"&&p.error?JSON.stringify(p.error):"realtime error"));break}},d=await n.createOffer();await n.setLocalDescription(d),await ic(n);let u=a?e.realtimeUrl:`${e.realtimeUrl}?model=${encodeURIComponent(e.realtimeModel)}`,f=await fetch(u,{method:"POST",headers:{Authorization:`Bearer ${e.ephemeralKey}`,"Content-Type":"application/sdp"},body:n.localDescription?.sdp??d.sdp??""});if(!f.ok)throw n.close(),new Error(`realtime SDP ${f.status}: ${(await f.text().catch(()=>"")).slice(0,200)}`);let h=await f.text();return await n.setRemoteDescription({type:"answer",sdp:h}),{sendToolResult(p,y){s({type:"conversation.item.create",item:{type:"function_call_output",call_id:p,output:typeof y=="string"?y:JSON.stringify(y)}}),s({type:"response.create"})},cancelResponse(){i&&s({type:"response.cancel"})},close(){try{r.close()}catch{}try{n.close()}catch{}}}}function ps(){return`turn_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,6)}`}function ic(e){return e.iceGatheringState==="complete"?Promise.resolve():new Promise(t=>{let n=()=>{e.removeEventListener("icegatheringstatechange",r),t()},r=()=>{e.iceGatheringState==="complete"&&n()};e.addEventListener("icegatheringstatechange",r),setTimeout(n,1500)})}async function fs(e){let n=await import(["@anam-ai","js-sdk"].join("/")),r=n.createClient??n.default?.createClient;if(typeof r!="function")throw new Error("@anam-ai/js-sdk: createClient not found (version mismatch)");let o=r(e.sessionToken,{disableInputAudio:!0}),i=ac(e.videoEl);typeof o.streamToVideoElement=="function"?await o.streamToVideoElement(i):typeof o.startSession=="function"&&await o.startSession();let s=[],a=!1,l=0,c=null,d=async()=>{let f=c;if(c=null,f?.endMessage)try{await f.endMessage()}catch{}},u=async()=>{if(!a){a=!0;try{for(;s.length;){let f=l,h=s.shift();if(!h)continue;if(await d(),f!==l)break;let p=null,y=`hs-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`;try{typeof o.createTalkMessageStream=="function"&&(p=o.createTalkMessageStream(y))}catch{}if(!p){if(typeof o.talk=="function")try{await o.talk(h)}catch{}continue}c=p;let b=h+" ";try{p.streamMessageChunk&&await p.streamMessageChunk(b,!0)}catch(m){e.onError?.(m instanceof Error?m:new Error(String(m)))}if(await sc(Math.max(1200,Math.ceil(b.length*70)),()=>f!==l),f!==l)break;await d()}}finally{a=!1}}};return{enqueueSentence(f){let h=f.trim();h&&(s.push(h),u())},interrupt(){l++,s.length=0;try{o.interruptPersona?.()}catch{}d()},stop(){l++,s.length=0;try{o.interruptPersona?.()}catch{}d();try{typeof o.stopStreaming=="function"?o.stopStreaming():typeof o.disconnect=="function"&&o.disconnect()}catch{}}}}function sc(e,t){return new Promise(n=>{let r=Date.now(),o=()=>{if(t()||Date.now()-r>=e){n();return}setTimeout(o,100)};o()})}function ac(e){return e.id||(e.id=`holostaff-anam-${Math.random().toString(36).slice(2,9)}`),e.id}async function hs(e){let t=await dc(),{Room:n,RoomEvent:r,Track:o}=t,i=new n({adaptiveStream:!1,dynacast:!1});i.on(r.TrackSubscribed,b=>{b.kind===o.Kind.Video?(b.attach(e.videoEl),e.onVideo?.()):b.kind===o.Kind.Audio&&b.attach(e.audioEl)}),i.on(r.Disconnected,()=>e.onClosed?.()),await i.connect(e.livekitUrl,e.livekitToken);let s=new WebSocket(e.wsUrl),a=!1,l=[],c=b=>{let m=JSON.stringify(b);if(a&&s.readyState===WebSocket.OPEN)try{s.send(m)}catch{}else l.push(m)};s.addEventListener("open",()=>{a=!0;for(let b of l.splice(0))try{s.send(b)}catch{}}),s.addEventListener("message",b=>{let m={};try{m=JSON.parse(b.data)}catch{return}m.type==="agent.speak_started"?e.onSpeaking?.(!0):m.type==="agent.speak_ended"?e.onSpeaking?.(!1):m.type==="error"&&e.onError?.(new Error(`avatar ws: ${b.data.slice(0,200)}`))}),s.addEventListener("close",()=>{a=!1,e.onClosed?.()}),s.addEventListener("error",()=>e.onError?.(new Error("avatar control WS error")));let d=setInterval(()=>c({type:"session.keep_alive"}),6e4),u=!1,f="",h=null,p=null,y=()=>`hs-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,7)}`;return{async attachRealtimeAudio(b){h||(h=new an,h.onChunk=m=>{u&&c({type:"agent.speak",audio:m,event_id:f})},await h.start(b))},async attachMic(b){p||(p=new an,p.onChunk=m=>c({type:"listener.audio",audio:m}),await p.start(b))},beginTurn(){u=!0,f=y()},speakEnd(){u&&(u=!1,c({type:"agent.speak_end",event_id:f}))},interrupt(){u=!1,c({type:"agent.interrupt"})},stop(){u=!1,clearInterval(d);try{h?.stop()}catch{}try{p?.stop()}catch{}try{s.close(1e3,"stage closed")}catch{}try{i.disconnect()}catch{}try{e.videoEl.srcObject=null}catch{}try{e.audioEl.srcObject=null}catch{}}}}var lc=`
|
|
111
|
+
class HsPcmProcessor extends AudioWorkletProcessor {
|
|
112
|
+
constructor() { super(); this._buf = new Float32Array(0); this._n = 2400 }
|
|
113
|
+
process(inputs) {
|
|
114
|
+
const ch = inputs[0] && inputs[0][0]
|
|
115
|
+
if (!ch) return true
|
|
116
|
+
const nb = new Float32Array(this._buf.length + ch.length)
|
|
117
|
+
nb.set(this._buf); nb.set(ch, this._buf.length); this._buf = nb
|
|
118
|
+
while (this._buf.length >= this._n) {
|
|
119
|
+
const c = this._buf.slice(0, this._n); this._buf = this._buf.slice(this._n)
|
|
120
|
+
this.port.postMessage({ samples: c })
|
|
121
|
+
}
|
|
122
|
+
return true
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
registerProcessor('hs-pcm-processor', HsPcmProcessor)
|
|
126
|
+
`,an=class{constructor(){this.onChunk=null;this.ctx=null;this.src=null;this.node=null;this.started=!1}async start(t){if(this.started)return;this.ctx=new AudioContext({sampleRate:24e3});let n=new Blob([lc],{type:"application/javascript"}),r=URL.createObjectURL(n);await this.ctx.audioWorklet.addModule(r),URL.revokeObjectURL(r),this.src=this.ctx.createMediaStreamSource(t),this.node=new AudioWorkletNode(this.ctx,"hs-pcm-processor"),this.node.port.onmessage=i=>{let s=i.data.samples;this.onChunk?.(cc(s))};let o=this.ctx.createGain();o.gain.value=0,this.src.connect(this.node),this.node.connect(o),o.connect(this.ctx.destination),this.started=!0}stop(){if(this.started){try{this.node?.disconnect()}catch{}try{this.src?.disconnect()}catch{}try{this.ctx?.close()}catch{}this.node=null,this.src=null,this.ctx=null,this.started=!1}}};function cc(e){let t=new Int16Array(e.length);for(let o=0;o<e.length;o++){let i=Math.max(-1,Math.min(1,e[o]??0));t[o]=i<0?i*32768:i*32767}let n=new Uint8Array(t.buffer),r="";for(let o=0;o<n.length;o++)r+=String.fromCharCode(n[o]??0);return btoa(r)}async function dc(){let e=globalThis.LivekitClient;if(e)return e;let t=await import("livekit-client");if(!t?.Room)throw new Error("livekit-client not found (install it or load its UMD build)");return t}var Or="holostaff-stage-root";function ms(e){let t=uc(),n=t;n.innerHTML="",fc(e.dock);let r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,o=document.createElement("div");o.className=`sheet enter ${e.dock}`,o.setAttribute("role","dialog"),o.setAttribute("aria-label",`Conversation with ${e.copilotName}`);let i=document.createElement("div");i.className="avatar-area";let s=document.createElement("video");s.className="avatar-video",s.autoplay=!0,s.playsInline=!0,s.setAttribute("playsinline",""),i.appendChild(s);let a=document.createElement("div");a.className="state-ring",i.appendChild(a);let l=document.createElement("div");l.className="head";let c=document.createElement("div");c.className="idblock";let d=document.createElement("div");if(d.className="name",d.textContent=e.copilotName,c.appendChild(d),e.scopeLine){let g=document.createElement("div");g.className="scope",g.textContent=e.scopeLine,c.appendChild(g)}l.appendChild(c);let u=document.createElement("button");u.className="cc",u.type="button",u.setAttribute("aria-pressed","false"),u.title="Captions",u.textContent="CC",l.appendChild(u);let f=document.createElement("button");f.className="x",f.type="button",f.setAttribute("aria-label","End conversation"),f.textContent="\u2715",f.addEventListener("click",()=>e.onClose()),l.appendChild(f);let h=document.createElement("div");h.className="state-label",h.textContent="Connecting\u2026";let p=document.createElement("div");p.className="captions",p.setAttribute("aria-live","polite");let y=!1;u.addEventListener("click",()=>{y=!y,u.setAttribute("aria-pressed",String(y)),u.classList.toggle("on",y),p.classList.toggle("show",y)});let b=document.createElement("div");return b.className="hint",b.textContent="Can't talk right now? Turn on captions, or use the suggestion buttons.",o.append(l,i,h,p,b),n.appendChild(o),r?o.classList.remove("enter"):requestAnimationFrame(()=>requestAnimationFrame(()=>o.classList.remove("enter"))),{video:s,setState:g=>{o.setAttribute("data-state",g),h.textContent={connecting:"Connecting\u2026",listening:"Listening\u2026",thinking:"Thinking\u2026",speaking:e.copilotName+" is speaking"}[g]},appendCaption(g){p.textContent=(p.textContent??"")+g,p.scrollTop=p.scrollHeight},setHidden(g){t.style.display=g?"none":""},detachVideo(){return s},reattachVideo(){s.parentNode!==i&&i.insertBefore(s,a)},destroy(){o.classList.add("exit"),setTimeout(()=>{try{t.remove()}catch{}},r?0:220)}}}function uc(){let e=document.getElementById(Or);return e||(e=document.createElement("div"),e.id=Or,e.style.cssText="position:fixed;inset:0;z-index:2147483646;pointer-events:none",document.body.appendChild(e),e)}var pc="holostaff-stage-style";function fc(e){let t=e.endsWith("right"),n=t?"right: 20px;":"left: 20px;",r=`${e.startsWith("bottom")?"bottom":"top"} ${t?"right":"left"}`,o=`#${Or}`,i=`
|
|
127
|
+
${o} .sheet { pointer-events: auto; box-sizing: border-box; position: fixed; ${n} bottom: 20px; width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px); background: #0e0f12; color: #fafafa; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.45); display: flex; flex-direction: column; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; transform-origin: ${r}; opacity: 1; transition: opacity 220ms ease-out, transform 220ms cubic-bezier(0.16,1,0.3,1); }
|
|
128
|
+
${o} .sheet * { box-sizing: border-box; }
|
|
129
|
+
${o} .sheet.enter { opacity: 0; transform: scale(0.9) translateY(12px); }
|
|
130
|
+
${o} .sheet.exit { opacity: 0; transform: scale(0.92) translateY(12px); }
|
|
131
|
+
@media (max-width: 480px) { ${o} .sheet { left: 0; right: 0; bottom: 0; width: 100%; height: 88vh; border-radius: 20px 20px 0 0; } }
|
|
132
|
+
${o} .head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
|
|
133
|
+
${o} .idblock { flex: 1; min-width: 0; }
|
|
134
|
+
${o} .name { font-weight: 600; font-size: 15px; }
|
|
135
|
+
${o} .scope { font-size: 12px; color: #9aa0aa; margin-top: 1px; }
|
|
136
|
+
${o} .cc, ${o} .x { appearance: none; border: 0; background: rgba(255,255,255,0.08); color: #cfd2d8; cursor: pointer; border-radius: 8px; }
|
|
137
|
+
${o} .cc { font-size: 11px; font-weight: 700; padding: 5px 8px; }
|
|
138
|
+
${o} .cc.on { background: #4f8bff; color: #fff; }
|
|
139
|
+
${o} .x { font-size: 14px; padding: 6px 9px; }
|
|
140
|
+
${o} .cc:hover, ${o} .x:hover { background: rgba(255,255,255,0.16); }
|
|
141
|
+
${o} .avatar-area { position: relative; flex: 1; min-height: 0; background: #16181d; display: flex; align-items: center; justify-content: center; }
|
|
142
|
+
${o} .avatar-video { width: 100%; height: 100%; object-fit: cover; }
|
|
143
|
+
${o} .state-ring { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 0 rgba(79,139,255,0); transition: box-shadow 200ms ease-out; }
|
|
144
|
+
${o} .sheet[data-state="listening"] .state-ring { box-shadow: inset 0 0 0 3px rgba(79,139,255,0.7); }
|
|
145
|
+
${o} .sheet[data-state="thinking"] .state-ring { box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25); }
|
|
146
|
+
${o} .sheet[data-state="speaking"] .state-ring { box-shadow: inset 0 0 0 3px rgba(120,220,160,0.6); }
|
|
147
|
+
${o} .state-label { padding: 10px 16px 0; font-size: 12px; color: #9aa0aa; }
|
|
148
|
+
${o} .captions { display: none; padding: 8px 16px; max-height: 96px; overflow-y: auto; color: #e8e8ea; font-size: 14px; }
|
|
149
|
+
${o} .captions.show { display: block; }
|
|
150
|
+
${o} .hint { padding: 8px 16px 14px; font-size: 11px; color: #6b7280; }
|
|
151
|
+
@media (prefers-reduced-motion: reduce) { ${o} .sheet { transition: none; } }
|
|
152
|
+
`;it(pc,i)}var gs=800,Dr=600,hc=15e3,mc=/^(cc-|one-time-code)/i,gc=/\b(password|passcode|card number|cvv|cvc|security code|ssn|social security|secret)\b/i,vc=/\b(pay|payment|place order|buy|purchase|order now|check ?out|confirm|complete|delete|remove|cancel|unsubscribe|send|sign|submit|transfer|upgrade|downgrade)\b/i;function ln(e={}){let t=0,n=null,r=null,o=()=>{r&&(clearTimeout(r),r=null);try{n?.remove()}catch{}n=null},i=async(a,l)=>{let c=Date.now();if(c-t<gs&&await Cs(gs-(c-t)),n)return{ok:!1,error:"a previous action is still waiting for the visitor to Allow or Deny"};switch(a.action){case"navigate":{let d=(a.path??"").trim();if(!d)return{ok:!1,error:"navigate needs a path"};let u;try{u=new URL(d,window.location.origin)}catch{return{ok:!1,error:`not a valid path: ${d}`}}if(u.origin!==window.location.origin)return{ok:!1,error:"cross-origin navigation is not allowed"};t=Date.now();try{await e.beforeNavigate?.(u.pathname+u.search)}catch{}return window.location.assign(u.href),{ok:!0,did:`navigated to ${u.pathname}${u.search}`}}case"scroll_to":{let d=Lr(a.target??"","any");return d.el?(d.el.scrollIntoView({block:"center",behavior:"smooth"}),await _r(d.el,Dr*2),t=Date.now(),{ok:!0,did:`scrolled to and highlighted "${d.label}"`}):{ok:!1,error:d.error,candidates:d.candidates}}case"click":{let d=Lr(a.target??"","clickable");if(!d.el)return{ok:!1,error:d.error,candidates:d.candidates};if(d.el.scrollIntoView({block:"center",behavior:"smooth"}),vc.test(d.label)&&!await s(d.el,d.label,l))return{ok:!1,error:`the visitor did not allow clicking "${d.label}"`};await _r(d.el,Dr);let u=d.el.closest?d.el.closest("a[href]"):null;if(u&&!u.target&&u.origin===window.location.origin)try{await e.beforeNavigate?.(u.pathname+u.search)}catch{}return Cc(d.el),t=Date.now(),{ok:!0,did:`clicked "${d.label}"`}}case"fill":{let d=a.value??"";if(!d)return{ok:!1,error:"fill needs a value"};let u=Lr(a.target??"","fillable");if(!u.el)return{ok:!1,error:u.error,candidates:u.candidates};let f=Sc(u.el,u.label);if(f)return{ok:!1,error:f};u.el.scrollIntoView({block:"center",behavior:"smooth"}),await _r(u.el,Dr);let h=Ic(u.el,d);return t=Date.now(),h?{ok:!0,did:`filled "${u.label}"`}:{ok:!1,error:`could not set a value on "${u.label}"`}}default:return{ok:!1,error:`unknown action ${String(a.action)}`}}},s=(a,l,c)=>(Ec(),new Promise(d=>{let u=document.createElement("div");u.className="holostaff-act-pill";let f=document.createElement("span");f.textContent=`${c} wants to click "${l}"`;let h=document.createElement("button");h.type="button",h.textContent="Allow",h.className="allow";let p=document.createElement("button");p.type="button",p.textContent="Deny",p.className="deny",u.append(f,h,p);let y=a.getBoundingClientRect();u.style.top=`${Math.max(8,y.top-44)}px`,u.style.left=`${Math.max(8,y.left)}px`,document.body.appendChild(u),n=u;let b=m=>{o(),d(m)};h.addEventListener("click",()=>b(!0)),p.addEventListener("click",()=>b(!1)),r=setTimeout(()=>b(!1),hc)}));return{act:i,destroy(){o()}}}var vs='a[href], button, [role="button"], input[type="submit"], input[type="button"], summary, [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="tab"], [role="switch"]',ys='input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]), textarea, select, [contenteditable="true"]';function Lr(e,t){let n=Ue(e);if(!n)return{el:null,label:"",error:"target (visible label) required"};let r=t==="clickable"?vs:t==="fillable"?ys:`${vs}, ${ys}, h1, h2, h3, [aria-label]`,o=[];for(let a of Array.from(document.querySelectorAll(r))){if(!Ss(a))continue;let l=bs(a);if(!l)continue;let c=yc(n,Ue(l));c>0&&o.push({el:a,label:l,score:c})}if(!o.length){let a=Array.from(document.querySelectorAll(r)).filter(Ss).map(bs).filter(Boolean).slice(0,8);return{el:null,label:"",error:`nothing on screen matches "${e}"`,candidates:a}}o.sort((a,l)=>l.score-a.score);let i=o[0];return o.find(a=>a.el!==i.el&&a.score===i.score&&Ue(a.label)!==Ue(i.label))?{el:null,label:"",error:`"${e}" is ambiguous`,candidates:[...new Set(o.slice(0,6).map(a=>a.label))]}:{el:i.el,label:i.label}}function bs(e){let t=e.getAttribute("aria-label");if(t?.trim())return t.trim();if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){if(e.id){let i=document.querySelector(`label[for="${bc(e.id)}"]`);if(i?.textContent?.trim())return i.textContent.trim()}let r=e.closest("label");if(r?.textContent?.trim())return r.textContent.trim();let o=e.getAttribute("placeholder");return o?.trim()?o.trim():e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button")&&e.value.trim()?e.value.trim():e.name||""}let n=(e.textContent??"").trim().replace(/\s+/g," ");return n.length>80?"":n}function yc(e,t){if(!t)return 0;if(t===e)return 3;if(t.includes(e)||e.includes(t))return 2;let n=e.split(" ").filter(Boolean);return n.length&&n.filter(o=>t.includes(o)).length/n.length>=.6?1:0}function Ue(e){return e.toLowerCase().replace(/\s+/g," ").trim()}function Ss(e){if(e.disabled)return!1;let t=e.getBoundingClientRect();if(t.width<2||t.height<2)return!1;let n=window.getComputedStyle(e);return n.visibility!=="hidden"&&n.display!=="none"}function bc(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function Sc(e,t){let n=e,r=(n.type??"").toLowerCase(),o=n.autocomplete??"",i=`${t} ${n.name??""} ${n.id??""}`;return r==="password"||mc.test(o)||gc.test(i)?`"${t}" looks like a sensitive field (password/payment/code). I can point the visitor to it, but they must type it themselves.`:null}function Cc(e){let t={bubbles:!0,cancelable:!0,composed:!0,view:window},n={...t,pointerId:1,pointerType:"mouse",isPrimary:!0};e.dispatchEvent(new PointerEvent("pointerover",n)),e.dispatchEvent(new PointerEvent("pointerdown",n)),e.dispatchEvent(new MouseEvent("mousedown",{...t,button:0})),e.dispatchEvent(new PointerEvent("pointerup",n)),e.dispatchEvent(new MouseEvent("mouseup",{...t,button:0})),e.click()}function Ic(e,t){if(e instanceof HTMLSelectElement){let n=Array.from(e.options).find(r=>Ue(r.textContent??"")===Ue(t)||r.value===t);return n?(e.value=n.value,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),!0):!1}if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){let n=e instanceof HTMLInputElement?HTMLInputElement.prototype:HTMLTextAreaElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value")?.set;return e.focus(),r?r.call(e,t):e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),!0}if(e.isContentEditable){e.focus();let n=!1;try{let r=window.getSelection();if(r){r.removeAllRanges();let o=document.createRange();o.selectNodeContents(e),r.addRange(o)}n=document.execCommand("insertText",!1,t)}catch{n=!1}return n||(e.textContent=t,e.dispatchEvent(new Event("input",{bubbles:!0}))),Ue(e.textContent??"").includes(Ue(t).slice(0,24))}return!1}async function _r(e,t){let n=e.style.outline,r=e.style.outlineOffset;e.style.outline="3px solid #4f8bff",e.style.outlineOffset="2px",await Cs(t),e.style.outline=n,e.style.outlineOffset=r}function Cs(e){return new Promise(t=>setTimeout(t,e))}var wc="holostaff-act-pill-style";function Ec(){it(wc,`
|
|
153
|
+
.holostaff-act-pill { position: fixed; z-index: 2147483647; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0e0f12; color: #fafafa; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); font: 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
|
|
154
|
+
.holostaff-act-pill button { appearance: none; border: 0; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 12px; cursor: pointer; }
|
|
155
|
+
.holostaff-act-pill .allow { background: #4f8bff; color: #fff; }
|
|
156
|
+
.holostaff-act-pill .deny { background: rgba(255,255,255,0.12); color: #cfd2d8; }
|
|
157
|
+
`)}var Fr="holostaff:stage-resume";function Br(e){try{sessionStorage.setItem(Fr,JSON.stringify(e))}catch{}}function Is(){try{let e=sessionStorage.getItem(Fr);if(!e)return null;sessionStorage.removeItem(Fr);let t=JSON.parse(e);return!t||typeof t.at!="number"||Date.now()-t.at>6e4?null:t}catch{return null}}function ws(e){let n=e.transcript.slice(-14).map(r=>`${r.role==="user"?"Visitor":"You"}: ${r.text}`).join(`
|
|
158
|
+
`).slice(-2500);return`[SESSION RESUMED AFTER PAGE NAVIGATION] You navigated the visitor to ${e.destPath} and the conversation reconnected there. Conversation so far:
|
|
159
|
+
`+(n||"(no transcript captured)")+`
|
|
160
|
+
Continue exactly where you left off \u2014 briefly confirm the new page is up and go on. Do NOT re-greet, do NOT re-introduce yourself.`}var Es={name:"get_screen",description:"Look at what the visitor is doing RIGHT NOW: current page URL/title and a fresh summary of their recent on-screen activity. Call this whenever the answer depends on where they are, or whenever they may have moved since the conversation started. Cheap \u2014 prefer calling it over guessing.",parameters:{type:"object",properties:{},required:[]}},xs={name:"act",description:"Perform ONE small visible action on the visitor's screen, on their behalf, with their knowledge. Always say aloud what you are about to do first. Targets are VISIBLE labels (button/link text, field label or placeholder). The result tells you what actually happened \u2014 never claim more than it says. Consequential clicks (pay, order, delete, send\u2026) show the visitor an Allow/Deny pill; tell them to expect it. Sensitive fields (passwords, card numbers, codes) are refused \u2014 point with scroll_to and let the visitor type. After navigate, call get_screen before acting again.",parameters:{type:"object",properties:{action:{type:"string",enum:["click","fill","scroll_to","navigate"]},target:{type:"string",description:"Visible label of the element (for click/fill/scroll_to)."},value:{type:"string",description:"Text to type (fill only)."},path:{type:"string",description:'Same-origin path, e.g. "/checkout" (navigate only).'}},required:["action"]}},Ts={name:"present",description:"Show a visual frame in the Theater when a picture beats words. Call again to show the next thing.",parameters:{type:"object",properties:{intent:{type:"string",description:'What to show, e.g. "how attention works".'},context:{type:"string",description:"Optional extra detail for the frame."}},required:["intent"]}};function As(e){if(typeof window>"u")return{open:()=>{},close:()=>{},isOpen:()=>!1,acquirePresenter:()=>null,releasePresenter:()=>{},dispose:()=>{}};let t=!1,n=null,r=null,o=null,i=null,s=null,a=null,l=null,c=null,d=null,u="",f=[],h="",p=null,y=!1,b=!1,m=(w,x)=>{let T=x.trim();T&&(f.push({role:w,text:T}),f.length>16&&f.shift())},g=async w=>{if(!t||!i||!p)return;y=!0;let x=(C,S)=>Promise.race([C,new Promise(M=>setTimeout(()=>M(null),S))]),T=await x(De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-rekey`,e.buildBody()),2e3).catch(()=>null);await x(De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-preserve`,{...e.buildBody(),avatarSessionId:i}),800).catch(()=>null),Br({at:Date.now(),destPath:w,avatar:p,rekey:T&&T.ephemeralKey?T:null,transcript:f})},v=()=>{!t||y||!i||!p||(y=!0,Ve(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-preserve`,{...e.buildBody(),avatarSessionId:i}),Br({at:Date.now(),destPath:"(a page the visitor opened)",avatar:p,rekey:null,transcript:f}))},E="",N=null,k=w=>{e.cfg.onError?.(w,{method:"STAGE",path:"(voice)"})},O=()=>{t=!1,e.reportConversationActive(!1),a&&(clearTimeout(a),a=null);try{l?.close()}catch{}try{r?.stop()}catch{}try{o?.stop()}catch{}try{d?.destroy()}catch{}if(b){try{window.removeEventListener("pagehide",v)}catch{}b=!1}i&&!y&&De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-stop`,{...e.buildBody(),avatarSessionId:i});try{c?.getTracks().forEach(w=>w.stop())}catch{}try{s?.remove()}catch{}try{n?.destroy()}catch{}l=null,r=null,o=null,i=null,s=null,c=null,n=null,d=null,u="",p=null,h=""},A=w=>{let x=/[^.!?]+[.!?]+(\s|$)/g,T,C=0;for(;(T=x.exec(u))!==null;)r?.enqueueSentence(T[0]),C=x.lastIndex;u=u.slice(C),w&&u.trim()&&(r?.enqueueSentence(u),u="")},$=async w=>{try{c=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{k(new Error("Microphone unavailable \u2014 voice needs mic access on the host origin.")),e.theater&&w?.intent&&e.theater.present({intent:w.intent}),O();return}let x=null,T;if(w?.resume){T=ws(w.resume);let B=w.resume;if(B.avatar){let z=B.rekey??await De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-rekey`,e.buildBody()).catch(()=>null);z?.ephemeralKey&&(De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-resume`,{...e.buildBody(),avatarSessionId:B.avatar.sessionId}),x={provider:"holostaff",ephemeralKey:z.ephemeralKey,anamSessionToken:null,avatar:B.avatar,realtimeUrl:z.realtimeUrl,realtimeModel:z.realtimeModel,instructions:z.instructions,copilotName:z.copilotName,voiceId:z.voiceId})}}if(x||(x=await De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice`,e.buildBody())),!x||!x.ephemeralKey){k(new Error("voice mint failed or returned incomplete session")),O();return}let C=x.provider??"anam";if(!(C==="holostaff"?!!x.avatar:!!x.anamSessionToken)){k(new Error("voice mint returned no face session")),O();return}let M=e.presence.getCopilot();d=ln({beforeNavigate:g}),b||(window.addEventListener("pagehide",v),b=!0),n=ms({dock:e.dock,copilotName:x.copilotName||M?.name||"Copilot",scopeLine:M?.scopeLine,onClose:()=>U()}),n.setState("connecting");let L=({name:B,args:z,callId:P})=>{if(B==="present"&&e.theater){let q=typeof z.intent=="string"?z.intent:"",X=typeof z.context=="string"?z.context:void 0;q&&e.theater.present({intent:q,context:X}),l?.sendToolResult(P,{ok:!0})}else if(B==="act"){let q=d;if(!q){l?.sendToolResult(P,{ok:!1,error:"stage not ready"});return}q.act(z,x.copilotName||M?.name||"The copilot").then(X=>l?.sendToolResult(P,X)).catch(X=>l?.sendToolResult(P,{ok:!1,error:X.message}))}else if(B==="get_screen"){let q=window.location.href,X=document.title;De(e.cfg,`/api/runtime/sessions/${e.getSessionId()}/voice-context`,e.buildBody()).then(Q=>{l?.sendToolResult(P,{url:q,pageTitle:X,stage:Q?.stage??null,recentActivity:Q?.visionSummary??"no activity summary available yet"})}).catch(()=>{l?.sendToolResult(P,{url:q,pageTitle:X})})}else l?.sendToolResult(P,{error:`unknown tool ${B}`})},G=T??(w?.intent?`The visitor tapped "Talk" on your suggestion: "${w.intent}". Open the conversation on that.`:void 0);try{C==="holostaff"?await F(x,G,L):await V(x,G,L),n?.setState("listening")}catch(B){k(B instanceof Error?B:new Error("voice connect failed")),O()}},V=async(w,x,T)=>{if(!n||!c)throw new Error("stage not ready");r=await fs({sessionToken:w.anamSessionToken,videoEl:n.video,onError:k}),l=await Mr({ephemeralKey:w.ephemeralKey,realtimeUrl:w.realtimeUrl,realtimeModel:w.realtimeModel,instructions:w.instructions,tools:[Ts,Es,xs],micStream:c,seedMessage:x},{onTextDelta:(C,S)=>{E=S,S!==N&&(n?.setState("speaking"),u+=C,n?.appendCaption(C),A(!1))},onTurnDone:C=>{if(C===N){N=null;return}A(!0),n?.setState("listening")},onUserSpeechStarted:()=>{N=E,u="",l?.cancelResponse(),r?.interrupt(),n?.setState("listening")},onToolCall:T,onError:k})},F=async(w,x,T)=>{if(!n||!c)throw new Error("stage not ready");let C=w.avatar;i=C.sessionId,p=C,s=document.createElement("audio"),s.autoplay=!0,s.setAttribute("playsinline",""),s.style.display="none",document.body.appendChild(s);let S=!1,M=null,L=!1,G=()=>{if(!S){k(new Error("avatar media blocked \u2014 continuing voice-only"));try{o?.stop()}catch{}if(o=null,M&&s)try{s.srcObject=M}catch{}}};o=await hs({livekitUrl:C.livekitUrl,livekitToken:C.livekitToken,wsUrl:C.wsUrl,videoEl:n.video,audioEl:s,onVideo:()=>{S=!0,a&&(clearTimeout(a),a=null)},onSpeaking:B=>n?.setState(B?"speaking":"listening"),onError:k}),a=setTimeout(G,6e3),l=await Mr({ephemeralKey:w.ephemeralKey,realtimeUrl:w.realtimeUrl,realtimeModel:w.realtimeModel,instructions:w.instructions,tools:[Ts,Es,xs],micStream:c,seedMessage:x,audioOut:!0,voice:w.voiceId??void 0},{onAudioPlaybackStarted:()=>{L=!0,o?.beginTurn(),n?.setState("speaking")},onAudioPlaybackStopped:()=>{o?.speakEnd(),n?.setState("listening")},onTextDelta:(B,z)=>{!L&&z!==E&&o?.beginTurn(),E=z,z!==N&&(n?.setState("speaking"),n?.appendCaption(B),h+=B)},onTurnDone:B=>{if(B===N){N=null,h="";return}m("assistant",h),h="",L||(o?.speakEnd(),n?.setState("listening"))},onUserTranscript:B=>m("user",B),onUserSpeechStarted:()=>{N=E,l?.cancelResponse(),o?.interrupt(),n?.setState("listening")},onRemoteAudio:B=>{if(M=B,o)o.attachRealtimeAudio(B);else if(s)try{s.srcObject=B}catch{}},onToolCall:T,onError:k}),o&&o.attachMic(c)},U=()=>{t&&O()},W=!1,R=w=>{t||(t=!0,e.reportConversationActive(!0),$(w))},I=Is();return I&&setTimeout(()=>R({resume:I}),250),{open:R,close:U,isOpen:()=>t,acquirePresenter(){if(!t||!n||!r&&!o)return null;let w=n.detachVideo(),x=w.getBoundingClientRect();return W=!0,n.setHidden(!0),{video:w,fromRect:x}},releasePresenter(){W&&(W=!1,n&&(n.reattachVideo(),n.setHidden(!1)))},dispose(){t&&O()}}}function ks(){let e=[],t=new Set,n=(a,l)=>{let c=(l||"").replace(/\s+/g," ").trim().slice(0,140);!c||t.has(a+c)||(t.add(a+c),e.push(a+": "+c))},r=a=>{let l=a.getBoundingClientRect();return l.width>2&&l.height>2&&l.bottom>0&&l.top<innerHeight*2.2},o=document,i=[...document.querySelectorAll('[role="dialog"], dialog, [class*="modal"] [class*="content"], [id*="modal"]')].filter(a=>{if(!r(a))return!1;let l=a.getBoundingClientRect();return l.width*l.height>innerWidth*innerHeight*.08&&l.width<innerWidth*.95}).filter(a=>!a.closest("[data-holostaff-autopilot]"));i.length&&(o=i[i.length-1],e.push("note: A DIALOG IS OPEN on top of the page \u2014 the page behind it is dimmed and NOT clickable. Only what is listed below (the dialog) is interactive right now."));let s=a=>!!a.closest("[data-holostaff-autopilot], .holostaff-act-pill");return o.querySelectorAll('h1,h2,h3,[class*="title"]').forEach(a=>{r(a)&&!s(a)&&n("heading",a.textContent)}),o.querySelectorAll('button,[role="button"],a[href]').forEach(a=>{if(!r(a)||s(a))return;let l=(a.textContent||"").trim()||a.getAttribute("aria-label")||a.getAttribute("title")||"";if(!l){let c=a.querySelector('[class*="i-"]'),d=c&&/i-[a-z0-9-]+:([a-z0-9-]+)/.exec(c.className||"");d&&(l="(icon: "+d[1].replace(/-\d+-(solid|outline)$/,"")+")")}n(a.tagName==="A"?"link":"button",l)}),o.querySelectorAll("input,textarea,select").forEach(a=>{if(!r(a)||s(a))return;let l=a,c=l.labels&&l.labels[0]?(l.labels[0].textContent||"").trim():"";if(a.tagName==="SELECT"){let d=a,u=Array.from(d.options||[]).map(h=>(h.textContent||"").trim()).filter(Boolean).slice(0,12),f=d.selectedOptions&&d.selectedOptions[0]?(d.selectedOptions[0].textContent||"").trim():"";n("dropdown",'label="'+c+'" current="'+f+'" options=['+u.join(" | ")+"]");return}n("input",(l.type||a.tagName.toLowerCase())+' placeholder="'+(l.placeholder||"")+'" label="'+c+'"')}),o.querySelectorAll('code,pre,[class*="alert"],[class*="empty"],[class*="toast"]').forEach(a=>{r(a)&&!s(a)&&n("text",a.textContent)}),o.querySelectorAll('p,li,span[class*="caption"],[class*="subtitle"]').forEach(a=>{r(a)&&!s(a)&&(a.textContent||"").trim().length>25&&n("copy",a.textContent)}),`URL: ${window.location.href}
|
|
161
|
+
TITLE: ${document.title}
|
|
162
|
+
`+e.slice(0,90).join(`
|
|
163
|
+
`)}var xc="holostaff-autopilot-style",Pr="holostaff_autopilot_active",Ns=e=>`holostaff_autopilot_dismissed:${e}`,Tc=350;function Ms(e){Ac();let t=!1,n=[],r=null,o=null,i=null,s=null,a=!1,l=!1,c=!1,d="",u=I=>e.onError?.(I instanceof Error?I:new Error(String(I))),f=async(I,w)=>{let x=await fetch(`${e.baseUrl}/api/runtime/autopilot${I}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({tenantId:e.tenantId,...w})}),T=await x.json().catch(()=>({}));if(!x.ok)throw new Error(String(T.error??`autopilot HTTP ${x.status}`));return T},h=I=>{try{I?.remove()}catch{}};function p(I){let w=document.createElement("div");return w.className=`holostaff-ap ${I}`,w.setAttribute("data-holostaff-autopilot",""),document.body.appendChild(w),w}function y(I){if(r||a||sessionStorage.getItem(Ns(I.workflowName)))return;r=p("holostaff-ap-offer");let w=document.createElement("div");w.className="ap-title",w.textContent=I.workflowName;let x=document.createElement("div");x.className="ap-line",x.textContent="I can do this for you while you watch. You stay in control.";let T=document.createElement("div");T.className="ap-row";let C=m("Do this for me","ap-primary",()=>{h(r),r=null,b(I)}),S=m("No thanks","ap-ghost",()=>{sessionStorage.setItem(Ns(I.workflowName),"1"),h(r),r=null});T.append(C,S),r.append(w,x,T)}function b(I){i=p("holostaff-ap-overlay");let w=document.createElement("div");w.className="ap-box";let x=document.createElement("div");x.className="ap-title",x.textContent=I.workflowName;let T=document.createElement("div");T.className="ap-line",T.textContent="Anything I should know first? Optional.";let C=document.createElement("textarea");C.className="ap-textarea",C.rows=3,C.placeholder="Names, details, what you want at the end.";let S=document.createElement("div");S.className="ap-row";let M=m("Start","ap-primary",()=>{let G=C.value.trim();h(i),i=null,k(I,G)}),L=m("Cancel","ap-ghost",()=>{h(i),i=null});S.append(M,L),w.append(x,T,C,S),i.appendChild(w),C.focus()}function m(I,w,x){let T=document.createElement("button");return T.type="button",T.className=`ap-btn ${w}`,T.textContent=I,T.addEventListener("click",x),T}function g(I,w,x){h(o),o=p("holostaff-ap-panel");let T=document.createElement("div");T.className="ap-title",T.textContent=`Autopilot \xB7 ${I}`;let C=document.createElement("div");C.className="ap-line ap-status",C.textContent="Starting\u2026";let S=document.createElement("div");S.className="ap-meta";let M=document.createElement("div");M.className="ap-row";let L=m("Resume","ap-primary",x);L.style.display="none";let G=m("Stop","ap-ghost",w);return M.append(L,G),o.append(T,C,S,M),{el:o,status:(B,z)=>{C.textContent=B,S.textContent=`step ${z}`},note:B=>{C.textContent=B,L.style.display=l?"":"none"}}}function v(I){return new Promise(w=>{i=p("holostaff-ap-overlay");let x=document.createElement("div");x.className="ap-box";let T=document.createElement("div");T.className="ap-line",T.textContent=I.label,x.appendChild(T);let C=S=>{h(i),i=null,w(S)};if(I.type==="choice"&&I.options?.length){let S=document.createElement("div");S.className="ap-row ap-wrap";for(let M of I.options.slice(0,6))S.appendChild(m(M,"ap-primary",()=>C(M)));x.appendChild(S)}else if(I.type==="user-input-fields"){let S=document.createElement("div");S.className="ap-meta",S.textContent="Type those in yourself, then continue. The autopilot never enters them for you.";let M=document.createElement("div");M.className="ap-row",M.appendChild(m("Done, continue","ap-primary",()=>C(""))),x.append(S,M)}else{let S=document.createElement("textarea");S.className="ap-textarea",S.rows=2;let M=document.createElement("div");M.className="ap-row",M.appendChild(m("Send","ap-primary",()=>C(S.value.trim()))),x.append(S,M),S.focus()}i.appendChild(x)})}function E(I,w){h(o),o=null;let x=p("holostaff-ap-panel"),T=document.createElement("div");T.className="ap-title",T.textContent=I==="done"?"Done":I==="stopped"?"Stopped":"Handing back";let C=document.createElement("div");C.className="ap-line",C.textContent=w;let S=document.createElement("div");S.className="ap-row",S.appendChild(m("Close","ap-ghost",()=>h(x))),x.append(T,C,S),setTimeout(()=>h(x),3e4)}function N(I){try{I?sessionStorage.setItem(Pr,JSON.stringify(I)):sessionStorage.removeItem(Pr)}catch{}}async function k(I,w){try{let{handoverId:x}=await f("/start",{sourceId:e.sourceId,workflowName:I.workflowName,intent:w,path:window.location.pathname});await O({handoverId:x,workflowName:I.workflowName,step:0})}catch(x){u(x),E("give_up","The autopilot could not start. Nothing was changed.")}}async function O(I){a=!0,l=!1,c=!1,s=ln();let w=g(I.workflowName,()=>{c=!0,l=!1,f(`/${I.handoverId}/end`,{reason:"user_stop"}).catch(()=>{}),N(null),E("stopped","You have the controls. Nothing else will happen.")},()=>{l=!1,I.lastResult="the user paused you and may have changed things themselves \u2014 re-read the screen before acting",w.status("Resuming\u2026",I.step)});N(I);try{for(;!t&&!c;){if(l){await Rs(400);continue}let x=ks(),T;try{T=await f(`/${I.handoverId}/tick`,{digest:x,...I.lastResult?{lastResult:I.lastResult}:{},...I.answer?{answer:I.answer}:{}})}catch(M){u(M),E("give_up","The autopilot lost its connection. You have the controls.");break}if(I.answer=void 0,I.step+=1,N(I),T.kind==="done"||T.kind==="give_up"){N(null),E(T.kind,T.summary??(T.kind==="done"?"Finished.":"I could not finish. You have the controls."));break}if(l){I.lastResult="the user took the controls before this action ran \u2014 nothing was done; re-read the screen once resumed",N(I);continue}if(T.status&&w.status(T.status,I.step),T.kind==="ask"&&T.ask){let M=await v(T.ask);if(c)break;T.ask.type==="user-input-fields"?I.lastResult="The user says they entered those fields themselves. Continue.":(I.answer=M||"(no answer)",I.lastResult="the user answered your question");continue}let C=T.kind==="choose"?{action:"fill",target:T.target,value:T.value}:{action:T.kind,target:T.target,value:T.value,path:T.path};T.kind==="navigate"&&N(I);let S=await s.act(C,"The autopilot");I.lastResult=S.ok?S.did??"ok":`${S.error??"action failed"}${S.candidates?.length?` \u2014 on screen: ${S.candidates.slice(0,6).join(", ")}`:""}`,N(I),await Rs(Tc)}}finally{a=!1,s?.destroy(),s=null,c||(h(o),o=null)}}let A=I=>{if(!a||l||c||i)return;let w=I.target;if(w&&(w.closest?.("[data-holostaff-autopilot]")||w.closest?.(".holostaff-act-pill"))||!I.isTrusted)return;l=!0;let x=o?.querySelector(".ap-status");x&&(x.textContent="Paused \u2014 you took the wheel.");let T=o?.querySelectorAll(".ap-btn")[0];T&&(T.style.display="")};window.addEventListener("pointerdown",A,!0),window.addEventListener("keydown",A,!0);function $(I,w){if(!I)return!1;if(I==="/")return w==="/";let x=I.replace(/:[^/]+/g,"[^/]+").replace(/\/+$/,"");return new RegExp(`^${x}/?$`).test(w.replace(/\/+$/,"")||"/")}function V(){try{return!!(sessionStorage.getItem("holostaff_autopilot_preview")||localStorage.getItem("holostaff_autopilot_preview"))}catch{return!1}}function F(){if(t||a)return;let I=window.location.pathname;if(I===d)return;d=I,h(r),r=null;let w=n.find(x=>x.entryRoutes.some(T=>$(T,I)))??(V()?n[0]:void 0);w&&y(w)}let U=history.pushState.bind(history),W=history.replaceState.bind(history);history.pushState=(...I)=>{U(...I),setTimeout(F,50)},history.replaceState=(...I)=>{W(...I),setTimeout(F,50)};let R=()=>{setTimeout(F,50)};return window.addEventListener("popstate",R),(async()=>{try{let I="";try{(sessionStorage.getItem("holostaff_autopilot_preview")||localStorage.getItem("holostaff_autopilot_preview"))&&(I="&preview=1")}catch{}let w=await fetch(`${e.baseUrl}/api/runtime/autopilot/catalog?tenantId=${encodeURIComponent(e.tenantId)}&sourceId=${encodeURIComponent(e.sourceId)}${I}`);w.ok&&(n=(await w.json()).autopilots??[])}catch(I){u(I)}try{let I=sessionStorage.getItem(Pr);if(I){let w=JSON.parse(I);w.lastResult=w.lastResult??"the page reloaded \u2014 re-read the screen",O(w);return}}catch{}F()})(),{dispose(){t=!0,c=!0,window.removeEventListener("popstate",R),window.removeEventListener("pointerdown",A,!0),window.removeEventListener("keydown",A,!0),history.pushState=U,history.replaceState=W,s?.destroy(),h(r),h(o),h(i)}}}function Rs(e){return new Promise(t=>setTimeout(t,e))}function Ac(){it(xc,`
|
|
164
|
+
.holostaff-ap { position: fixed; z-index: 2147483600; font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: #16181d; }
|
|
165
|
+
.holostaff-ap-offer, .holostaff-ap-panel { right: 20px; bottom: 20px; width: 300px; background: #fff; border: 1px solid rgba(0,0,0,0.12); border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,0.16); padding: 14px 16px; }
|
|
166
|
+
.holostaff-ap-overlay { inset: 0; background: rgba(10,12,16,0.35); display: flex; align-items: center; justify-content: center; }
|
|
167
|
+
.holostaff-ap .ap-box { width: 360px; background: #fff; border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,0.25); padding: 16px 18px; }
|
|
168
|
+
.holostaff-ap .ap-title { font-weight: 650; font-size: 14px; margin-bottom: 4px; }
|
|
169
|
+
.holostaff-ap .ap-line { color: #3c4048; margin-bottom: 10px; }
|
|
170
|
+
.holostaff-ap .ap-meta { color: #8a8f98; font-size: 11px; margin-bottom: 8px; }
|
|
171
|
+
.holostaff-ap .ap-row { display: flex; gap: 8px; }
|
|
172
|
+
.holostaff-ap .ap-wrap { flex-wrap: wrap; }
|
|
173
|
+
.holostaff-ap .ap-btn { appearance: none; border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
|
|
174
|
+
.holostaff-ap .ap-primary { background: #4f8bff; color: #fff; }
|
|
175
|
+
.holostaff-ap .ap-ghost { background: rgba(0,0,0,0.06); color: #3c4048; }
|
|
176
|
+
.holostaff-ap .ap-textarea { width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,0.16); border-radius: 8px; padding: 8px 10px; font: inherit; margin-bottom: 10px; resize: vertical; }
|
|
177
|
+
.holostaff-ap .ap-status { min-height: 18px; }
|
|
178
|
+
`)}function Os(){if(typeof window>"u")return null;let e=window.__HS_EVAL__;if(!e||typeof e!="object")return null;let t=e.visitorId;if(typeof t!="string"||!t.startsWith("eval_"))return null;let n=e.sourceId,r=e.tenantId;return{visitorId:t,sourceId:typeof n=="string"?n:void 0,tenantId:typeof r=="string"?r:void 0}}var cn=["awareness","education","selection","mutual_commit","onboarding","adoption","expansion"];var kc="https://theater.holostaff.ai",ie=null,Ur=[];function xt(e){if(ie){e(ie);return}Ur.push(()=>{ie&&e(ie)})}function ue(e,t={}){return{tenantId:e.tenantId,sourceId:e.sourceId,deviceId:e.deviceId,hostUserId:hn()??void 0,...t}}function Ds(e,t){e.onShow(n=>t.present({intent:n.goal||n.content,context:n.content}))}function Ls(e,t,n){e.onActivate(()=>n.open()),t.onTalk(r=>n.open({intent:r.goal||r.content}))}var Nc={init(e){if(ie){if(ie.sourceId===e.sourceId&&ie.tenantId===e.tenantId&&ie.transport.baseUrl===(e.baseUrl??ie.transport.baseUrl))return;this._destroy()}let t=Os(),n=t?.visitorId??Gr(),r=gn(),o=zr(e),i=t?{...e.observe,enabled:!0}:e.observe,s={sourceId:e.sourceId,tenantId:e.tenantId,transport:o,deviceId:n,sessionId:r};for(ie=s,s.commands=mn(o,r,e.tenantId,e.sourceId),s.signals=vn({cfg:o,sessionId:r,tenantId:e.tenantId,sourceId:e.sourceId,buildBody:()=>ue(s)}),s.observeOpts=i,s.observations=Tr({cfg:o,sessionId:r,buildBody:()=>ue(s),observe:i,evalMode:!!t}),s.presenceOpts=e.presence,s.presence=Ar({cfg:o,getSessionId:()=>s.sessionId,buildBody:()=>ue(s),source:s.commands,options:e.presence}),s.note=Rr({cfg:o,getSessionId:()=>s.sessionId,buildBody:()=>ue(s),source:s.commands,presence:s.presence,dock:e.presence?.dock??"bottom-right"}),e.theater?.enabled!==!1&&!t&&(s.theater=us({baseUrl:e.theater?.baseUrl??kc,buildContext:()=>({tenantId:s.tenantId,sourceId:s.sourceId,sessionId:s.sessionId}),presence:s.presence,onError:a=>o.onError?.(a,{method:"THEATER",path:"(present)"})}),Ds(s.note,s.theater)),e.voice?.enabled!==!1&&!t&&(s.stage=As({cfg:o,getSessionId:()=>s.sessionId,buildBody:()=>ue(s),presence:s.presence,theater:s.theater??null,dock:e.presence?.dock??"bottom-right",reportConversationActive:a=>{fe(o,`/api/runtime/sessions/${s.sessionId}/fastpath`,ue(s,{conversationActive:a}))}}),Ls(s.presence,s.note,s.stage),s.theater?.setPresenter({acquire:()=>s.stage?.acquirePresenter()??null,release:()=>s.stage?.releasePresenter()})),e.autopilot?.enabled!==!1&&(s.autopilot=Ms({baseUrl:o.baseUrl,tenantId:e.tenantId,sourceId:e.sourceId,onError:a=>o.onError?.(a,{method:"AUTOPILOT",path:"(loop)"})})),s.unload=jr(()=>{Ve(o,`/api/runtime/sessions/${r}/close`,ue(s,{reason:"domain_leave"}))},{suppressOnHidden:()=>s.stage?.isOpen()??!1});Ur.length>0;){let a=Ur.shift();try{a?.()}catch(l){o.onError?.(l instanceof Error?l:new Error(String(l)),{method:"QUEUE",path:"(replay)"})}}},identify(e){!e||typeof e!="string"||(Hr(e),xt(t=>{fe(t.transport,`/api/runtime/sessions/${t.sessionId}/identity`,ue(t,{kind:"identify",hostUserId:e}))}))},clearIdentity(){let e=hn();$r(),xt(t=>{fe(t.transport,`/api/runtime/sessions/${t.sessionId}/identity`,{...ue(t,{kind:"clear"}),hostUserId:e??void 0}),Ve(t.transport,`/api/runtime/sessions/${t.sessionId}/close`,ue(t,{reason:"logout"})),t.sessionId=gn(),t.signals?.dispose(),t.signals=vn({cfg:t.transport,sessionId:t.sessionId,tenantId:t.tenantId,sourceId:t.sourceId,buildBody:()=>ue(t)}),t.observations?.dispose(),t.observations=Tr({cfg:t.transport,sessionId:t.sessionId,buildBody:()=>ue(t),observe:t.observeOpts}),t.note?.dispose(),t.presence?.dispose(),t.commands?.close(),t.commands=mn(t.transport,t.sessionId,t.tenantId,t.sourceId),t.presence=Ar({cfg:t.transport,getSessionId:()=>t.sessionId,buildBody:()=>ue(t),source:t.commands,options:t.presenceOpts}),t.note=Rr({cfg:t.transport,getSessionId:()=>t.sessionId,buildBody:()=>ue(t),source:t.commands,presence:t.presence,dock:t.presenceOpts?.dock??"bottom-right"}),t.theater&&Ds(t.note,t.theater),t.stage&&(t.stage.close(),Ls(t.presence,t.note,t.stage))})},markStageEntry(e){cn.includes(e)&&xt(t=>{fe(t.transport,`/api/runtime/sessions/${t.sessionId}/stage`,ue(t,{stage:e,ts:new Date().toISOString()}))})},emitSignal(e,t){!e||typeof e!="string"||xt(n=>{fe(n.transport,`/api/runtime/sessions/${n.sessionId}/signal`,ue(n,{name:e,payload:t??{},ts:new Date().toISOString()}))})},reportOutcome(e,t){!e||!t||xt(n=>{fe(n.transport,`/api/runtime/sessions/${n.sessionId}/outcome`,ue(n,{interventionId:e,outcome:t}))})},_destroy(){ie&&(ie.unload?.dispose(),ie.signals?.dispose(),ie.observations?.dispose(),ie.note?.dispose(),ie.presence?.dispose(),ie.theater?.dispose(),ie.stage?.dispose(),ie.autopilot?.dispose(),ie.commands?.close(),ie=null)}};return Vs(Rc);})();
|
|
179
|
+
/*! Bundled license information:
|
|
180
|
+
|
|
181
|
+
rrweb/es/rrweb/ext/tslib/tslib.es6.js:
|
|
182
|
+
rrweb/es/rrweb/ext/@xstate/fsm/es/index.js:
|
|
183
|
+
(*! *****************************************************************************
|
|
184
|
+
Copyright (c) Microsoft Corporation.
|
|
185
|
+
|
|
186
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
187
|
+
purpose with or without fee is hereby granted.
|
|
188
|
+
|
|
189
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
190
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
191
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
192
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
193
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
194
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
195
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
196
|
+
***************************************************************************** *)
|
|
197
|
+
*/
|
|
198
|
+
;try{window.HolostaffSDK=__HolostaffSDK}catch(e){}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holostaff/sdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
4
4
|
"description": "Holostaff SDK — lifetime identity, stage detection, custom signal probes, and the living-portrait presence layer (chip, note, Theater, voice Stage) for the Holostaff runtime.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.holostaff.ai",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsc -p tsconfig.json",
|
|
23
23
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
24
|
-
"prepublishOnly": "npm run build"
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"build:iife": "esbuild src/index.ts --bundle --format=iife --global-name=__HolostaffSDK --outfile=dist/holostaff-sdk.iife.js --minify --external:livekit-client --external:@anam-ai/* --footer:js=';try{window.HolostaffSDK=__HolostaffSDK}catch(e){}'"
|
|
25
26
|
},
|
|
26
27
|
"keywords": [
|
|
27
28
|
"holostaff",
|