@sentry/rrweb-player 2.43.2 → 2.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-player.cjs +1605 -1407
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +1605 -1407
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +1512 -1324
- package/dist/rrweb-player.umd.cjs.map +4 -4
- package/dist/rrweb-player.umd.min.cjs +12 -12
- package/dist/rrweb-player.umd.min.cjs.map +4 -4
- package/dist/style.css +17 -11
- package/dist/style.min.css.map +2 -2
- package/package.json +5 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebPlayer", [], f);} else if ("object" == typeof exports) {exports["rrwebPlayer"] = f();} else {g["rrwebPlayer"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var Na=Object.defineProperty,zs=e=>{throw TypeError(e)},Ma=(e,t,n)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t,n)=>Ma(e,typeof t!="symbol"?t+"":t,n),Oi=(e,t,n)=>t.has(e)||zs("Cannot "+n),p=(e,t,n)=>(Oi(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?zs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,r)=>(Oi(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Oi(e,t,"access private method"),n),jn,An,Mt,dt,Un,Oe,hr,jt,Rt,mt,Bn,On,un,we,dr,Gs,pr,Ii,mr,Da,Ie,sr,vt,hn,Me,yt,Fe,tt,kt,Lt,At,In,vr,gr,St,Qr,he,Ys,Hs,js,Jr,Ar,yr,Zr,Nt,Ye,ns,et,ut,Re,tn,or,ar,$r;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var le=2,En=4,Or=8,qs=1<<24,rt=16,Qe=32,Zt=64,ei=128,Le=512,ie=1024,ue=2048,st=4096,be=8192,Te=16384,Pt=32768,ti=1<<25,dn=65536,ni=1<<17,Ta=1<<18,Sn=1<<19,Ca=1<<20,_t=1<<25,qt=65536,ri=1<<21,qn=1<<22,Ot=1<<23,Vn=Symbol("$state"),Xs=Symbol("legacy props"),xa=Symbol(""),pt=new class extends Error{constructor(){super(...arguments),nt(this,"name","StaleReactionError"),nt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ra=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Ir=3,Qn=8,ka=!1,Ks=Array.isArray,Aa=Array.prototype.indexOf,pn=Array.prototype.includes,Fr=Array.from,Qs=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Oa=Object.getOwnPropertyDescriptors,Ia=Object.prototype,Fa=Array.prototype,Js=Object.getPrototypeOf,rs=Object.isExtensible,Pa=()=>{};function La(e){for(var t=0;t<e.length;t++)e[t]()}function Zs(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function $s(e){return e===this.v}function Wa(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function eo(e){return!Wa(e,this.v)}function to(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ua(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ba(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Va(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function za(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ga(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ya(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ha(){throw new Error("https://svelte.dev/e/hydration_failed")}function ja(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function qa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ka(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Qa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ja=!1,Za=1,$a=2,el=16,tl=1,nl=4,rl=8,il=16,sl=2,no="[",Fi="[!",is="[?",Pi="]",mn={},ae=Symbol(),ro="http://www.w3.org/1999/xhtml",pe=null;function vn(e){pe=e}function Pr(e,t=!1,n){pe={p:pe,i:!1,c:null,e:null,s:e,x:null,r:F,l:null}}function Lr(e){var t=pe,n=t.e;if(n!==null){t.e=null;for(var r of n)Lo(r)}return e!==void 0&&(t.x=e),t.i=!0,pe=t.p,e??{}}function io(){return!0}var Bt=[];function so(){var e=Bt;Bt=[],La(e)}function Xt(e){if(Bt.length===0&&!zn){var t=Bt;queueMicrotask(()=>{t===Bt&&so()})}Bt.push(e)}function ol(){for(;Bt.length>0;)so()}function Wr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function al(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var W=!1;function wt(e){W=e}var L;function Ce(e){if(e===null)throw Wr(),mn;return L=e}function Ur(){return Ce(ot(L))}function He(e){if(W){if(ot(L)!==null)throw Wr(),mn;L=e}}function ll(e=1){if(W){for(var t=e,n=L;t--;)n=ot(n);L=n}}function _r(e=!0){for(var t=0,n=L;;){if(n.nodeType===Qn){var r=n.data;if(r===Pi){if(t===0)return n;t-=1}else(r===no||r===Fi||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ot(n);e&&n.remove(),n=i}}function oo(e){if(!e||e.nodeType!==Qn)throw Wr(),mn;return e.data}function Dt(e){if(typeof e!="object"||e===null||Vn in e)return e;let t=Js(e);if(t!==Ia&&t!==Fa)return e;var n=new Map,r=Ks(e),i=de(0),s=Ht,o=a=>{if(Ht===s)return a();var l=I,c=Ht;Ue(null),cs(s);var u=a();return Ue(l),cs(c),u};return r&&n.set("length",de(e.length)),new Proxy(e,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&qa();var u=n.get(l);return u===void 0?o(()=>{var f=de(c.value);return n.set(l,f),f}):te(u,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){let u=o(()=>de(ae));n.set(l,u),Gn(i)}}else te(c,ae),Gn(i);return!0},get(a,l,c){if(l===Vn)return e;var u=n.get(l),f=l in a;if(u===void 0&&(!f||fn(a,l)?.writable)&&(u=o(()=>{var d=Dt(f?a[l]:ae),m=de(d);return m}),n.set(l,u)),u!==void 0){var h=b(u);return h===ae?void 0:h}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=n.get(l);u&&(c.value=b(u))}else if(c===void 0){var f=n.get(l),h=f?.v;if(f!==void 0&&h!==ae)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(a,l){if(l===Vn)return!0;var c=n.get(l),u=c!==void 0&&c.v!==ae||Reflect.has(a,l);if(c!==void 0||F!==null&&(!u||fn(a,l)?.writable)){c===void 0&&(c=o(()=>{var h=u?Dt(a[l]):ae,d=de(h);return d}),n.set(l,c));var f=b(c);if(f===ae)return!1}return u},set(a,l,c,u){var f=n.get(l),h=l in a;if(r&&l==="length")for(var d=c;d<f.v;d+=1){var m=n.get(d+"");m!==void 0?te(m,ae):d in a&&(m=o(()=>de(ae)),n.set(d+"",m))}if(f===void 0)(!h||fn(a,l)?.writable)&&(f=o(()=>de(void 0)),te(f,Dt(c)),n.set(l,f));else{h=f.v!==ae;var E=o(()=>Dt(c));te(f,E)}var y=Reflect.getOwnPropertyDescriptor(a,l);if(y?.set&&y.set.call(u,c),!h){if(r&&typeof l=="string"){var v=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=v.v&&te(v,w+1)}Gn(i)}return!0},ownKeys(a){b(i);var l=Reflect.ownKeys(a).filter(f=>{var h=n.get(f);return h===void 0||h.v!==ae});for(var[c,u]of n)u.v!==ae&&!(c in a)&&l.push(c);return l},setPrototypeOf(){Xa()}})}var ss,ao,lo,co;function ii(){if(ss===void 0){ss=window,ao=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;lo=fn(t,"firstChild").get,co=fn(t,"nextSibling").get,rs(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rs(n)&&(n.__t=void 0)}}function Ke(e=""){return document.createTextNode(e)}function Kt(e){return lo.call(e)}function ot(e){return co.call(e)}function je(e,t){if(!W)return Kt(e);var n=Kt(L);if(n===null)n=L.appendChild(Ke());else if(t&&n.nodeType!==Ir){var r=Ke();return n?.before(r),Ce(r),r}return t&&Li(n),Ce(n),n}function cl(e,t=!1){if(!W){var n=Kt(e);return n instanceof Comment&&n.data===""?ot(n):n}if(t){if(L?.nodeType!==Ir){var r=Ke();return L?.before(r),Ce(r),r}Li(L)}return L}function ke(e,t=1,n=!1){let r=W?L:e;for(var i;t--;)i=r,r=ot(r);if(!W)return r;if(n){if(r?.nodeType!==Ir){var s=Ke();return r===null?i?.after(s):r.before(s),Ce(s),s}Li(r)}return Ce(r),r}function uo(e){e.textContent=""}function fo(){return!1}function ul(e,t,n){return document.createElementNS(ro,e,void 0)}function Li(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ir;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ho(e){var t=F;if(t===null)return I.f|=Ot,e;if((t.f&Pt)===0&&(t.f&En)===0)throw e;Tt(e,t)}function Tt(e,t){for(;t!==null;){if((t.f&ei)!==0){if((t.f&Pt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}var fl=-7169;function $(e,t){e.f=e.f&fl|t}function Wi(e){(e.f&Le)!==0||e.deps===null?$(e,ie):$(e,st)}function po(e){if(e!==null)for(let t of e)(t.f&le)===0||(t.f&qt)===0||(t.f^=qt,po(t.deps))}function mo(e,t,n){(e.f&ue)!==0?t.add(e):(e.f&st)!==0&&n.add(e),po(e.deps),$(e,ie)}var tr=!1;function hl(e){var t=tr;try{return tr=!1,[e(),tr]}finally{tr=t}}var Gt=new Set,H=null,qe=null,si=null,zn=!1,Vr=!1,gn=null,wr=null,vo=0,dl=1,go=class yo{constructor(){x(this,we),nt(this,"id",dl++),nt(this,"current",new Map),nt(this,"previous",new Map),x(this,jn,new Set),x(this,An,new Set),x(this,Mt,new Map),x(this,dt,new Map),x(this,Un,null),x(this,Oe,[]),x(this,hr,[]),x(this,jt,new Set),x(this,Rt,new Set),x(this,mt,new Map),x(this,Bn,new Set),nt(this,"is_fork",!1),x(this,On,!1),x(this,un,new Set)}skip_effect(t){p(this,mt).has(t)||p(this,mt).set(t,{d:[],m:[]}),p(this,Bn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=p(this,mt).get(t);if(r){p(this,mt).delete(t);for(var i of r.d)$(i,ue),n(i);for(i of r.m)$(i,st),n(i)}p(this,Bn).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ot)===0&&(this.current.set(t,[n,r]),qe?.set(t,n)),this.is_fork||(t.v=n)}activate(){H=this}deactivate(){H=null,qe=null}flush(){try{Vr=!0,H=this,Q(this,we,pr).call(this)}finally{vo=0,si=null,gn=null,wr=null,Vr=!1,H=null,qe=null,Yt.clear()}}discard(){for(let t of p(this,An))t(this);p(this,An).clear(),Gt.delete(this)}register_created_effect(t){p(this,hr).push(t)}increment(t,n){let r=p(this,Mt).get(n)??0;if(p(this,Mt).set(n,r+1),t){let i=p(this,dt).get(n)??0;p(this,dt).set(n,i+1)}}decrement(t,n,r){let i=p(this,Mt).get(n)??0;if(i===1?p(this,Mt).delete(n):p(this,Mt).set(n,i-1),t){let s=p(this,dt).get(n)??0;s===1?p(this,dt).delete(n):p(this,dt).set(n,s-1)}p(this,On)||r||(k(this,On,!0),Xt(()=>{k(this,On,!1),this.flush()}))}transfer_effects(t,n){for(let r of t)p(this,jt).add(r);for(let r of n)p(this,Rt).add(r);t.clear(),n.clear()}oncommit(t){p(this,jn).add(t)}ondiscard(t){p(this,An).add(t)}settled(){return(p(this,Un)??k(this,Un,Zs())).promise}static ensure(){if(H===null){let t=H=new yo;Vr||(Gt.add(H),zn||Xt(()=>{H===t&&t.flush()}))}return H}apply(){{qe=null;return}}schedule(t){if(si=t,t.b?.is_pending&&(t.f&(En|Or|qs))!==0&&(t.f&Pt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(gn!==null&&n===F&&(I===null||(I.f&le)===0))return;if((r&(Zt|Qe))!==0){if((r&ie)===0)return;n.f^=ie}}p(this,Oe).push(n)}};jn=new WeakMap;An=new WeakMap;Mt=new WeakMap;dt=new WeakMap;Un=new WeakMap;Oe=new WeakMap;hr=new WeakMap;jt=new WeakMap;Rt=new WeakMap;mt=new WeakMap;Bn=new WeakMap;On=new WeakMap;un=new WeakMap;we=new WeakSet;dr=function(){return this.is_fork||p(this,dt).size>0};Gs=function(){for(let n of p(this,un))for(let r of p(n,dt).keys()){for(var e=!1,t=r;t.parent!==null;){if(p(this,mt).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1};pr=function(){var e;if(vo++>1e3&&(Gt.delete(this),ml()),!Q(this,we,dr).call(this)){for(let a of p(this,jt))p(this,Rt).delete(a),$(a,ue),this.schedule(a);for(let a of p(this,Rt))$(a,st),this.schedule(a)}let t=p(this,Oe);k(this,Oe,[]),this.apply();var n=gn=[],r=[],i=wr=[];for(let a of t)try{Q(this,we,Ii).call(this,a,n,r)}catch(l){throw bo(a),l}if(H=null,i.length>0){var s=go.ensure();for(let a of i)s.schedule(a)}if(gn=null,wr=null,Q(this,we,dr).call(this)||Q(this,we,Gs).call(this)){Q(this,we,mr).call(this,r),Q(this,we,mr).call(this,n);for(let[a,l]of p(this,mt))wo(a,l)}else{p(this,Mt).size===0&&Gt.delete(this),p(this,jt).clear(),p(this,Rt).clear();for(let a of p(this,jn))a(this);p(this,jn).clear(),os(r),os(n),p(this,Un)?.resolve()}var o=H;if(p(this,Oe).length>0){let a=o??(o=this);p(a,Oe).push(...p(this,Oe).filter(l=>!p(a,Oe).includes(l)))}o!==null&&(Gt.add(o),Q(e=o,we,pr).call(e))};Ii=function(e,t,n){e.f^=ie;for(var r=e.first;r!==null;){var i=r.f,s=(i&(Qe|Zt))!==0,o=s&&(i&ie)!==0,a=o||(i&be)!==0||p(this,mt).has(r);if(!a&&r.fn!==null){s?r.f^=ie:(i&En)!==0?t.push(r):Zn(r)&&((i&rt)!==0&&p(this,Rt).add(r),_n(r));var l=r.first;if(l!==null){r=l;continue}}for(;r!==null;){var c=r.next;if(c!==null){r=c;break}r=r.parent}}};mr=function(e){for(var t=0;t<e.length;t+=1)mo(e[t],p(this,jt),p(this,Rt))};Da=function(){var e,t,n;for(let h of Gt){var r=h.id<this.id,i=[];for(let[d,[m,E]]of this.current){if(h.current.has(d)){var s=h.current.get(d)[0];if(r&&m!==s)h.current.set(d,[m,E]);else continue}i.push(d)}var o=[...h.current.keys()].filter(d=>!this.current.has(d));if(o.length===0)r&&h.discard();else if(i.length>0){if(r)for(let d of p(this,Bn))h.unskip_effect(d,m=>{var E;(m.f&(rt|qn))!==0?h.schedule(m):Q(E=h,we,mr).call(E,[m])});h.activate();var a=new Set,l=new Map;for(var c of i)_o(c,o,a,l);l=new Map;var u=[...h.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d:!0);for(let d of p(this,hr))(d.f&(Te|be|ni))===0&&Ui(d,u,l)&&((d.f&(qn|rt))!==0?($(d,ue),h.schedule(d)):p(h,jt).add(d));if(p(h,Oe).length>0){h.apply();for(var f of p(h,Oe))Q(e=h,we,Ii).call(e,f,[],[]);k(h,Oe,[])}h.deactivate()}}for(let h of Gt)p(h,un).has(this)&&(p(h,un).delete(this),p(h,un).size===0&&!Q(t=h,we,dr).call(t)&&(h.activate(),Q(n=h,we,pr).call(n)))};var Jn=go;function pl(e){var t=zn;zn=!0;try{for(var n;;){if(ol(),H===null)return n;H.flush()}}finally{zn=t}}function ml(){try{Ya()}catch(e){Tt(e,si)}}var ft=null;function os(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Te|be))===0&&Zn(r)&&(ft=new Set,_n(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Uo(r),ft?.size>0)){Yt.clear();for(let i of ft){if((i.f&(Te|be))!==0)continue;let s=[i],o=i.parent;for(;o!==null;)ft.has(o)&&(ft.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){let l=s[a];(l.f&(Te|be))===0&&_n(l)}}ft.clear()}}ft=null}}function _o(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let s=i.f;(s&le)!==0?_o(i,t,n,r):(s&(qn|rt))!==0&&(s&ue)===0&&Ui(i,t,r)&&($(i,ue),Bi(i))}}function Ui(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let i of e.deps){if(pn.call(t,i))return!0;if((i.f&le)!==0&&Ui(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Bi(e){H.schedule(e)}function wo(e,t){if(!((e.f&Qe)!==0&&(e.f&ie)!==0)){(e.f&ue)!==0?t.d.push(e):(e.f&st)!==0&&t.m.push(e),$(e,ie);for(var n=e.first;n!==null;)wo(n,t),n=n.next}}function bo(e){$(e,ie);for(var t=e.first;t!==null;)bo(t),t=t.next}function vl(e){let t=0,n=Qt(0),r;return()=>{Gi()&&(b(n),Yi(()=>(t===0&&(r=Nn(()=>e(()=>Gn(n)))),t+=1,()=>{Xt(()=>{t-=1,t===0&&(r?.(),r=void 0,Gn(n))})})))}}var gl=dn|Sn;function yl(e,t,n,r){new oi(e,t,n,r)}var oi=class{constructor(t,n,r,i){x(this,he),nt(this,"parent"),nt(this,"is_pending",!1),nt(this,"transform_error"),x(this,Ie),x(this,sr,W?L:null),x(this,vt),x(this,hn),x(this,Me),x(this,yt,null),x(this,Fe,null),x(this,tt,null),x(this,kt,null),x(this,Lt,0),x(this,At,0),x(this,In,!1),x(this,vr,new Set),x(this,gr,new Set),x(this,St,null),x(this,Qr,vl(()=>(k(this,St,Qt(p(this,Lt))),()=>{k(this,St,null)}))),k(this,Ie,t),k(this,vt,n),k(this,hn,s=>{var o=F;o.b=this,o.f|=ei,r(s)}),this.parent=F.b,this.transform_error=i??this.parent?.transform_error??(s=>s),k(this,Me,Hi(()=>{if(W){let s=p(this,sr);Ur();let o=s.data===Fi;if(s.data.startsWith(is)){let l=JSON.parse(s.data.slice(is.length));Q(this,he,Hs).call(this,l)}else o?Q(this,he,js).call(this):Q(this,he,Ys).call(this)}else Q(this,he,Jr).call(this)},gl)),W&&k(this,Ie,L)}defer_effect(t){mo(t,p(this,vr),p(this,gr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!p(this,vt).pending}update_pending_count(t,n){Q(this,he,Zr).call(this,t,n),k(this,Lt,p(this,Lt)+t),!(!p(this,St)||p(this,In))&&(k(this,In,!0),Xt(()=>{k(this,In,!1),p(this,St)&&yn(p(this,St),p(this,Lt))}))}get_effect_pending(){return p(this,Qr).call(this),b(p(this,St))}error(t){var n=p(this,vt).onerror;let r=p(this,vt).failed;if(!n&&!r)throw t;p(this,yt)&&(Ee(p(this,yt)),k(this,yt,null)),p(this,Fe)&&(Ee(p(this,Fe)),k(this,Fe,null)),p(this,tt)&&(Ee(p(this,tt)),k(this,tt,null)),W&&(Ce(p(this,sr)),ll(),Ce(_r()));var i=!1,s=!1;let o=()=>{if(i){al();return}i=!0,s&&Qa(),p(this,tt)!==null&&$t(p(this,tt),()=>{k(this,tt,null)}),Q(this,he,yr).call(this,()=>{Q(this,he,Jr).call(this)})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(c){Tt(c,p(this,Me)&&p(this,Me).parent)}r&&k(this,tt,Q(this,he,yr).call(this,()=>{try{return Be(()=>{var c=F;c.b=this,c.f|=ei,r(p(this,Ie),()=>l,()=>o)})}catch(c){return Tt(c,p(this,Me).parent),null}}))};Xt(()=>{var l;try{l=this.transform_error(t)}catch(c){Tt(c,p(this,Me)&&p(this,Me).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>Tt(c,p(this,Me)&&p(this,Me).parent)):a(l)})}};Ie=new WeakMap;sr=new WeakMap;vt=new WeakMap;hn=new WeakMap;Me=new WeakMap;yt=new WeakMap;Fe=new WeakMap;tt=new WeakMap;kt=new WeakMap;Lt=new WeakMap;At=new WeakMap;In=new WeakMap;vr=new WeakMap;gr=new WeakMap;St=new WeakMap;Qr=new WeakMap;he=new WeakSet;Ys=function(){try{k(this,yt,Be(()=>p(this,hn).call(this,p(this,Ie))))}catch(e){this.error(e)}};Hs=function(e){let t=p(this,vt).failed;t&&k(this,tt,Be(()=>{t(p(this,Ie),()=>e,()=>()=>{})}))};js=function(){let e=p(this,vt).pending;e&&(this.is_pending=!0,k(this,Fe,Be(()=>e(p(this,Ie)))),Xt(()=>{var t=k(this,kt,document.createDocumentFragment()),n=Ke();t.append(n),k(this,yt,Q(this,he,yr).call(this,()=>Be(()=>p(this,hn).call(this,n)))),p(this,At)===0&&(p(this,Ie).before(t),k(this,kt,null),$t(p(this,Fe),()=>{k(this,Fe,null)}),Q(this,he,Ar).call(this,H))}))};Jr=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,At,0),k(this,Lt,0),k(this,yt,Be(()=>{p(this,hn).call(this,p(this,Ie))})),p(this,At)>0){var e=k(this,kt,document.createDocumentFragment());Xi(p(this,yt),e);let t=p(this,vt).pending;k(this,Fe,Be(()=>t(p(this,Ie))))}else Q(this,he,Ar).call(this,H)}catch(t){this.error(t)}};Ar=function(e){this.is_pending=!1,e.transfer_effects(p(this,vr),p(this,gr))};yr=function(e){var t=F,n=I,r=pe;it(p(this,Me)),Ue(p(this,Me)),vn(p(this,Me).ctx);try{return Jn.ensure(),e()}catch(i){return ho(i),null}finally{it(t),Ue(n),vn(r)}};Zr=function(e,t){var n;if(!this.has_pending_snippet()){this.parent&&Q(n=this.parent,he,Zr).call(n,e,t);return}k(this,At,p(this,At)+e),p(this,At)===0&&(Q(this,he,Ar).call(this,t),p(this,Fe)&&$t(p(this,Fe),()=>{k(this,Fe,null)}),p(this,kt)&&(p(this,Ie).before(p(this,kt)),k(this,kt,null)))};function _l(e,t,n,r){let i=Br;var s=e.filter(h=>!h.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=F,a=wl(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function c(h){a();try{r(h)}catch(d){(o.f&Te)===0&&Tt(d,o)}br()}if(n.length===0){l.then(()=>c(t.map(i)));return}var u=Eo();function f(){Promise.all(n.map(h=>bl(h))).then(h=>c([...t.map(i),...h])).catch(h=>Tt(h,o)).finally(()=>u())}l?l.then(()=>{a(),f(),br()}):f()}function wl(){var e=F,t=I,n=pe,r=H;return function(s=!0){it(e),Ue(t),vn(n),s&&(e.f&Te)===0&&(r?.activate(),r?.apply())}}function br(e=!0){it(null),Ue(null),vn(null),e&&H?.deactivate()}function Eo(){var e=F,t=e.b,n=H,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Br(e){var t=le|ue,n=I!==null&&(I.f&le)!==0?I:null;return F!==null&&(F.f|=Sn),{ctx:pe,deps:null,effects:null,equals:$s,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:n??F,ac:null}}function bl(e,t,n){let r=F;r===null&&Ua();var i=void 0,s=Qt(ae),o=!I,a=new Map;return Il(()=>{var l=F,c=Zs();i=c.promise;try{Promise.resolve(e()).then(c.resolve,c.reject).finally(br)}catch(d){c.reject(d),br()}var u=H;if(o){if((l.f&Pt)!==0)var f=Eo();if(r.b.is_rendered())a.get(u)?.reject(pt),a.delete(u);else{for(let d of a.values())d.reject(pt);a.clear()}a.set(u,c)}let h=(d,m=void 0)=>{if(f){var E=m===pt;f(E)}if(!(m===pt||(l.f&Te)!==0)){if(u.activate(),m)s.f|=Ot,yn(s,m);else{(s.f&Ot)!==0&&(s.f^=Ot),yn(s,d);for(let[y,v]of a){if(a.delete(y),y===u)break;v.reject(pt)}}u.deactivate()}};c.promise.then(h,d=>h(null,d||"unknown"))}),kl(()=>{for(let l of a.values())l.reject(pt)}),new Promise(l=>{function c(u){function f(){u===i?l(s):c(i)}u.then(f,f)}c(i)})}function Wt(e){let t=Br(e);return Ro(t),t}function So(e){let t=Br(e);return t.equals=eo,t}function El(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ee(t[n])}}function Sl(e){for(var t=e.parent;t!==null;){if((t.f&le)===0)return(t.f&Te)===0?t:null;t=t.parent}return null}function Vi(e){var t,n=F;it(Sl(e));try{e.f&=~qt,El(e),t=Io(e)}finally{it(n)}return t}function No(e){var t=Vi(e);if(!e.equals(t)&&(e.wv=Ao(),(!H?.is_fork||e.deps===null)&&(H!==null?H.capture(e,t,!0):e.v=t,e.deps===null))){$(e,ie);return}It||(qe!==null?(Gi()||H?.is_fork)&&qe.set(e,t):Wi(e))}function Nl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(pt),t.teardown=Pa,t.ac=null,Xn(t,0),ji(t))}function Mo(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&_n(t)}var ai=new Set,Yt=new Map,Do=!1;function Qt(e,t){var n={f:0,v:e,reactions:null,equals:$s,rv:0,wv:0};return n}function de(e,t){let n=Qt(e);return Ro(n),n}function To(e,t=!1,n=!0){let r=Qt(e);return t||(r.equals=eo),r}function te(e,t,n=!1){I!==null&&(!Xe||(I.f&ni)!==0)&&io()&&(I.f&(le|rt|qn|ni))!==0&&(We===null||!pn.call(We,e))&&Ka();let r=n?Dt(t):t;return yn(e,r,wr)}function yn(e,t,n=null){if(!e.equals(t)){Yt.set(e,It?t:e.v);var r=Jn.ensure();if(r.capture(e,t),(e.f&le)!==0){let i=e;(e.f&ue)!==0&&Vi(i),qe===null&&Wi(i)}e.wv=Ao(),Co(e,ue,n),F!==null&&(F.f&ie)!==0&&(F.f&(Qe|Zt))===0&&(Ae===null?Tl([e]):Ae.push(e)),!r.is_fork&&ai.size>0&&!Do&&Ml()}return t}function Ml(){Do=!1;for(let e of ai)(e.f&ie)!==0&&$(e,st),Zn(e)&&_n(e);ai.clear()}function Gn(e){te(e,e.v+1)}function Co(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],a=o.f,l=(a&ue)===0;if(l&&$(o,t),(a&le)!==0){var c=o;qe?.delete(c),(a&qt)===0&&(a&Le&&(o.f|=qt),Co(c,st,n))}else if(l){var u=o;(a&rt)!==0&&ft!==null&&ft.add(u),n!==null?n.push(u):Bi(u)}}}var as=!1;function xo(){as||(as=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function zi(e){var t=I,n=F;Ue(null),it(null);try{return e()}finally{Ue(t),it(n)}}function Dl(e,t,n,r=n){e.addEventListener(t,()=>zi(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),xo()}var lr=!1,It=!1;function ls(e){It=e}var I=null,Xe=!1;function Ue(e){I=e}var F=null;function it(e){F=e}var We=null;function Ro(e){I!==null&&(We===null?We=[e]:We.push(e))}var _e=null,Ne=0,Ae=null;function Tl(e){Ae=e}var ko=1,Vt=0,Ht=Vt;function cs(e){Ht=e}function Ao(){return++ko}function Zn(e){var t=e.f;if((t&ue)!==0)return!0;if(t&le&&(e.f&=~qt),(t&st)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Zn(s)&&No(s),s.wv>e.wv)return!0}(t&Le)!==0&&qe===null&&$(e,ie)}return!1}function Oo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(We!==null&&pn.call(We,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&le)!==0?Oo(s,t,!1):t===s&&(n?$(s,ue):(s.f&ie)!==0&&$(s,st),Bi(s))}}function Io(e){var t,n=_e,r=Ne,i=Ae,s=I,o=We,a=pe,l=Xe,c=Ht,u=e.f;_e=null,Ne=0,Ae=null,I=(u&(Qe|Zt))===0?e:null,We=null,vn(e.ctx),Xe=!1,Ht=++Vt,e.ac!==null&&(zi(()=>{e.ac.abort(pt)}),e.ac=null);try{e.f|=ri;var f=e.fn,h=f();e.f|=Pt;var d=e.deps,m=H?.is_fork;if(_e!==null){var E;if(m||Xn(e,Ne),d!==null&&Ne>0)for(d.length=Ne+_e.length,E=0;E<_e.length;E++)d[Ne+E]=_e[E];else e.deps=d=_e;if(Gi()&&(e.f&Le)!==0)for(E=Ne;E<d.length;E++)((t=d[E]).reactions??(t.reactions=[])).push(e)}else!m&&d!==null&&Ne<d.length&&(Xn(e,Ne),d.length=Ne);if(io()&&Ae!==null&&!Xe&&d!==null&&(e.f&(le|st|ue))===0)for(E=0;E<Ae.length;E++)Oo(Ae[E],e);if(s!==null&&s!==e){if(Vt++,s.deps!==null)for(let y=0;y<r;y+=1)s.deps[y].rv=Vt;if(n!==null)for(let y of n)y.rv=Vt;Ae!==null&&(i===null?i=Ae:i.push(...Ae))}return(e.f&Ot)!==0&&(e.f^=Ot),h}catch(y){return ho(y)}finally{e.f^=ri,_e=n,Ne=r,Ae=i,I=s,We=o,vn(a),Xe=l,Ht=c}}function Cl(e,t){let n=t.reactions;if(n!==null){var r=Aa.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&le)!==0&&(_e===null||!pn.call(_e,t))){var s=t;(s.f&Le)!==0&&(s.f^=Le,s.f&=~qt),s.v!==ae&&Wi(s),Nl(s),Xn(s,0)}}function Xn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Cl(e,n[r])}function _n(e){var t=e.f;if((t&Te)===0){$(e,ie);var n=F,r=lr;F=e,lr=!0;try{(t&(rt|qs))!==0?Fl(e):ji(e),Wo(e);var i=Io(e);e.teardown=typeof i=="function"?i:null,e.wv=ko;var s;ka&&Ja&&(e.f&ue)!==0&&e.deps}finally{lr=r,F=n}}}function b(e){var t=e.f,n=(t&le)!==0;if(I!==null&&!Xe){var r=F!==null&&(F.f&Te)!==0;if(!r&&(We===null||!pn.call(We,e))){var i=I.deps;if((I.f&ri)!==0)e.rv<Vt&&(e.rv=Vt,_e===null&&i!==null&&i[Ne]===e?Ne++:_e===null?_e=[e]:_e.push(e));else{(I.deps??(I.deps=[])).push(e);var s=e.reactions;s===null?e.reactions=[I]:pn.call(s,I)||s.push(I)}}}if(It&&Yt.has(e))return Yt.get(e);if(n){var o=e;if(It){var a=o.v;return((o.f&ie)===0&&o.reactions!==null||Po(o))&&(a=Vi(o)),Yt.set(o,a),a}var l=(o.f&Le)===0&&!Xe&&I!==null&&(lr||(I.f&Le)!==0),c=(o.f&Pt)===0;Zn(o)&&(l&&(o.f|=Le),No(o)),l&&!c&&(Mo(o),Fo(o))}if(qe?.has(e))return qe.get(e);if((e.f&Ot)!==0)throw e.v;return e.v}function Fo(e){if(e.f|=Le,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&le)!==0&&(t.f&Le)===0&&(Mo(t),Fo(t))}function Po(e){if(e.v===ae)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Yt.has(t)||(t.f&le)!==0&&Po(t))return!0;return!1}function Nn(e){var t=Xe;try{return Xe=!0,e()}finally{Xe=t}}function xl(e){F===null&&(I===null&&Ga(),za()),It&&Va()}function Rl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function bt(e,t){var n=F;n!==null&&(n.f&be)!==0&&(e|=be);var r={ctx:pe,deps:null,nodes:null,f:e|ue|Le,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};H?.register_created_effect(r);var i=r;if((e&En)!==0)gn!==null?gn.push(r):Jn.ensure().schedule(r);else if(t!==null){try{_n(r)}catch(o){throw Ee(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Sn)===0&&(i=i.first,(e&rt)!==0&&(e&dn)!==0&&i!==null&&(i.f|=dn))}if(i!==null&&(i.parent=n,n!==null&&Rl(i,n),I!==null&&(I.f&le)!==0&&(e&Zt)===0)){var s=I;(s.effects??(s.effects=[])).push(i)}return r}function Gi(){return I!==null&&!Xe}function kl(e){let t=bt(Or,null);return $(t,ie),t.teardown=e,t}function Fn(e){xl();var t=F.f,n=!I&&(t&Qe)!==0&&(t&Pt)===0;if(n){var r=pe;(r.e??(r.e=[])).push(e)}else return Lo(e)}function Lo(e){return bt(En|Ca,e)}function Al(e){Jn.ensure();let t=bt(Zt|Sn,e);return(n={})=>new Promise(r=>{n.outro?$t(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function Ol(e){return bt(En,e)}function Il(e){return bt(qn|Sn,e)}function Yi(e,t=0){return bt(Or|t,e)}function on(e,t=[],n=[],r=[]){_l(r,t,n,i=>{bt(Or,()=>e(...i.map(b)))})}function Hi(e,t=0){var n=bt(rt|t,e);return n}function Be(e){return bt(Qe|Sn,e)}function Wo(e){var t=e.teardown;if(t!==null){let n=It,r=I;ls(!0),Ue(null);try{t.call(null)}finally{ls(n),Ue(r)}}}function ji(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let i=n.ac;i!==null&&zi(()=>{i.abort(pt)});var r=n.next;(n.f&Zt)!==0?n.parent=null:Ee(n,t),n=r}}function Fl(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Qe)===0&&Ee(t),t=n}}function Ee(e,t=!0){var n=!1;(t||(e.f&Ta)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Pl(e.nodes.start,e.nodes.end),n=!0),$(e,ti),ji(e,t&&!n),Xn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let s of r)s.stop();Wo(e),e.f^=ti,e.f|=Te;var i=e.parent;i!==null&&i.first!==null&&Uo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Pl(e,t){for(;e!==null;){var n=e===t?null:ot(e);e.remove(),e=n}}function Uo(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function $t(e,t,n=!0){var r=[];Bo(e,r,!0);var i=()=>{n&&Ee(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function Bo(e,t,n){if((e.f&be)===0){e.f^=be;var r=e.nodes&&e.nodes.t;if(r!==null)for(let a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&dn)!==0||(i.f&Qe)!==0&&(e.f&rt)!==0;Bo(i,t,o?n:!1),i=s}}}function qi(e){Vo(e,!0)}function Vo(e,t){if((e.f&be)!==0){e.f^=be,(e.f&ie)===0&&($(e,ue),Jn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&dn)!==0||(n.f&Qe)!==0;Vo(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(let o of s)(o.is_global||t)&&o.in()}}function Xi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ot(n);t.append(n),n=i}}var an=Symbol("events"),zo=new Set,li=new Set;function Tn(e,t,n){(t[an]??(t[an]={}))[e]=n}function Ll(e){for(var t=0;t<e.length;t++)zo.add(e[t]);for(var n of li)n(e)}var us=null;function fs(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;us=e;var o=0,a=us===e&&e[an];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[an]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){Qs(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=I,f=F;Ue(null),it(null);try{for(var h,d=[];s!==null;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[an]?.[r];E!=null&&(!s.disabled||e.target===s)&&E.call(s,e)}catch(y){h?d.push(y):h=y}if(e.cancelBubble||m===t||m===null)break;s=m}if(h){for(let y of d)queueMicrotask(()=>{throw y});throw h}}finally{e[an]=t,delete e.currentTarget,Ue(u),it(f)}}}var Wl=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ul(e){return Wl?.createHTML(e)??e}function Go(e){var t=ul("template");return t.innerHTML=Ul(e.replaceAll("<!>","<!---->")),t.content}function Jt(e,t){var n=F;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Mn(e,t){var n=(t&sl)!==0,r,i=!e.startsWith("<!>");return()=>{if(W)return Jt(L,null),L;r===void 0&&(r=Go(i?e:"<!>"+e),r=Kt(r));var s=n||ao?document.importNode(r,!0):r.cloneNode(!0);return Jt(s,s),s}}function Bl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(W)return Jt(L,null),L;if(!s){var o=Go(i),a=Kt(o);s=Kt(a)}var l=s.cloneNode(!0);return Jt(l,l),l}}function Yo(e,t){return Bl(e,t,"svg")}function Vl(){if(W)return Jt(L,null),L;var e=document.createDocumentFragment(),t=document.createComment(""),n=Ke();return e.append(t,n),Jt(t,n),e}function ht(e,t){if(W){var n=F;((n.f&Pt)===0||n.nodes.end===null)&&(n.nodes.end=L),Ur();return}e!==null&&e.before(t)}var zl=["touchstart","touchmove"];function Gl(e){return zl.includes(e)}function cr(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=`${n}`)}function Ho(e,t){return jo(e,t)}function Yl(e,t){ii(),t.intro=t.intro??!1;let n=t.target,r=W,i=L;try{for(var s=Kt(n);s&&(s.nodeType!==Qn||s.data!==no);)s=ot(s);if(!s)throw mn;wt(!0),Ce(s);let o=jo(e,{...t,anchor:s});return wt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
3
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==
|
|
4
|
-
\r\f\xA0\v\uFEFF`];function
|
|
5
|
-
`);r=N===-1?r+_.length:_.length-N}function s(){let _={line:n,column:r};return g=>(g.position=new a(_),E(),g)}let o=class Ko{constructor(g){Ut(this,"content"),Ut(this,"start"),Ut(this,"end"),Ut(this,"source"),this.start=g,this.end={line:n,column:r},this.source=t.source,this.content=Ko.content}};Ut(o,"content");let a=o;a.content=e;let l=[];function c(_){let g=new Error(`${t.source||""}:${n}:${r}: ${_}`);if(g.reason=_,g.filename=t.source,g.line=n,g.column=r,g.source=e,t.silent)l.push(g);else throw g}function u(){let _=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:_,parsingErrors:l}}}function f(){return m(/^{\s*/)}function h(){return m(/^}/)}function d(){let _,g=[];for(E(),y(g);e.length&&e.charAt(0)!=="}"&&(_=Ve()||Ze());)_&&(g.push(_),y(g));return g}function m(_){let g=_.exec(e);if(!g)return;let N=g[0];return i(N),e=e.slice(N.length),g}function E(){m(/^\s*/)}function y(_=[]){let g;for(;g=v();)g&&_.push(g),g=v();return _}function v(){let _=s();if(e.charAt(0)!=="/"||e.charAt(1)!=="*")return;let g=2;for(;e.charAt(g)!==""&&(e.charAt(g)!=="*"||e.charAt(g+1)!=="/");)++g;if(g+=2,e.charAt(g-1)==="")return c("End of comment missing");let N=e.slice(2,g-2);return r+=2,i(N),e=e.slice(g),r+=2,_({type:"comment",comment:N})}function w(){let _=m(/^([^{]+)/);if(!_)return;let g=lt(_[0]).replace(/\/\*[\s\S]*?\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,K=>K.replace(/,/g,"\u200C")).split(/\s*(?![^(]*\)),\s*/);if(g.length<=1)return g.map(K=>K.replace(/\u200C/g,","));let N=0,D=0,U=g.length,O=[];for(;N<U;){let K=(g[N].match(/\(/g)||[]).length,ze=(g[N].match(/\)/g)||[]).length,Se=K-ze;if(Se>=1){let R=!1;for(D=N+1;D<U;){let V=(g[D].match(/\(/g)||[]).length,at=(g[D].match(/\)/g)||[]).length-V;if(at===Se){O.push(g.slice(N,D+1).join(",")),N=D+1,R=!0;break}D++,Se-=at}if(R)continue;g.slice(N,U).forEach(V=>V&&O.push(V));break}g[N]&&O.push(g[N]),N++}return O.map(K=>K.replace(/\u200C/g,","))}function S(){let _=s(),g=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!g)return;let N=lt(g[0]);if(!m(/^:\s*/))return c("property missing ':'");let D=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),U=_({type:"declaration",property:N.replace(ms,""),value:D?lt(D[0]).replace(ms,""):""});return m(/^[;\s]*/),U}function T(){let _=[];if(!f())return c("missing '{'");y(_);let g;for(;g=S();)g!==!1&&(_.push(g),y(_)),g=S();return h()?_:c("missing '}'")}function C(){let _,g=[],N=s();for(;_=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)g.push(_[1]),m(/^,\s*/);if(g.length)return N({type:"keyframe",values:g,declarations:T()})}function G(){let _=s(),g=m(/^@([-\w]+)?keyframes\s*/);if(!g)return;let N=g[1];if(g=m(/^([-\w]+)\s*/),!g)return c("@keyframes missing name");let D=g[1];if(!f())return c("@keyframes missing '{'");let U,O=y();for(;U=C();)O.push(U),O=O.concat(y());return h()?_({type:"keyframes",name:D,vendor:N,keyframes:O}):c("@keyframes missing '}'")}function X(){let _=s(),g=m(/^@supports *([^{]+)/);if(!g)return;let N=lt(g[1]);if(!f())return c("@supports missing '{'");let D=y().concat(d());return h()?_({type:"supports",supports:N,rules:D}):c("@supports missing '}'")}function A(){let _=s();if(!m(/^@host\s*/))return;if(!f())return c("@host missing '{'");let N=y().concat(d());return h()?_({type:"host",rules:N}):c("@host missing '}'")}function ne(){let _=s(),g=m(/^@media *([^{]+)/);if(!g)return;let N=lt(g[1]);if(!f())return c("@media missing '{'");let D=y().concat(d());return h()?_({type:"media",media:N,rules:D}):c("@media missing '}'")}function Z(){let _=s(),g=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(g)return _({type:"custom-media",name:lt(g[1]),media:lt(g[2])})}function fe(){let _=s();if(!m(/^@page */))return;let N=w()||[];if(!f())return c("@page missing '{'");let D=y(),U;for(;U=S();)D.push(U),D=D.concat(y());return h()?_({type:"page",selectors:N,declarations:D}):c("@page missing '}'")}function me(){let _=s(),g=m(/^@([-\w]+)?document *([^{]+)/);if(!g)return;let N=lt(g[1]),D=lt(g[2]);if(!f())return c("@document missing '{'");let U=y().concat(d());return h()?_({type:"document",document:D,vendor:N,rules:U}):c("@document missing '}'")}function se(){let _=s();if(!m(/^@font-face\s*/))return;if(!f())return c("@font-face missing '{'");let N=y(),D;for(;D=S();)N.push(D),N=N.concat(y());return h()?_({type:"font-face",declarations:N}):c("@font-face missing '}'")}let xe=q("import"),Je=q("charset"),ce=q("namespace");function q(_){let g=new RegExp("^@"+_+"\\s*((?:"+[/[^\\]"(?:\\"|[^"])*"/.source,/[^\\]'(?:\\'|[^'])*'/.source,"[^;]"].join("|")+")+);");return()=>{let N=s(),D=m(g);if(!D)return;let U={type:_};return U[_]=D[1].trim(),N(U)}}function Ve(){if(e[0]==="@")return G()||ne()||Z()||X()||xe()||Je()||ce()||me()||fe()||A()||se()}function Ze(){let _=s(),g=w();return g?(y(),_({type:"rule",selectors:g,declarations:T()})):c("selector missing")}return mi(u())}function lt(e){return e?e.replace(/^\s+|\s+$/g,""):""}function mi(e,t){let n=e&&typeof e.type=="string",r=n?e:t;for(let i of Object.keys(e)){let s=e[i];Array.isArray(s)?s.forEach(o=>{mi(o,r)}):s&&typeof s=="object"&&mi(s,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var vs={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"};function mc(e){let t=vs[e.tagName]?vs[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function vc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Qo=/([^\\]):hover/,gc=new RegExp(Qo.source,"g");function gs(e,t){let n=t?.stylesWithHoverClass.get(e);if(n)return n;if(e.length>=1e6)return e;let r=pc(e,{silent:!0});if(!r.stylesheet)return e;let i=[];if(r.stylesheet.rules.forEach(a=>{"selectors"in a&&(a.selectors||[]).forEach(l=>{Qo.test(l)&&i.push(l)})}),i.length===0)return e;let s=new RegExp(i.filter((a,l)=>i.indexOf(a)===l).sort((a,l)=>l.length-a.length).map(a=>vc(a)).join("|"),"g"),o=e.replace(s,a=>{let l=a.replace(gc,"$1.\\:hover");return`${a}, ${l}`});return t?.stylesWithHoverClass.set(e,o),o}function ys(){return{stylesWithHoverClass:new Map}}function yc(e,t){let{doc:n,hackCss:r,cache:i}=t;switch(e.type){case j.Document:return n.implementation.createDocument(null,"",null);case j.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case j.Element:{let s=mc(e),o;if(e.isSVG)o=n.createElementNS("http://www.w3.org/2000/svg",s);else{if(e.isCustom&&n.defaultView?.customElements&&!n.defaultView.customElements.get(e.tagName))try{n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{})}catch(l){console.warn("Cannot define custom element",l)}o=n.createElement(s)}let a={};for(let l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let c=e.attributes[l];if(s==="option"&&l==="selected"&&c===!1||c===null)continue;if(c===!0&&(c=""),l.startsWith("rr_")){a[l]=c;continue}let u=s==="textarea"&&l==="value",f=s==="style"&&l==="_cssText";if(f&&r&&typeof c=="string"&&(c=gs(c,i)),(u||f)&&typeof c=="string"){let h=n.createTextNode(c);for(let d of Array.from(o.childNodes))d.nodeType===o.TEXT_NODE&&o.removeChild(d);o.appendChild(h);continue}try{if(e.isSVG&&l==="xlink:href")o.setAttributeNS("http://www.w3.org/1999/xlink",l,c.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")o.setAttribute("_"+l,c.toString());else if(s==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){o.setAttribute("csp-content",c.toString());continue}else s==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||s==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&dc(e.attributes.href)==="js"||(s==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",e.attributes.srcset):o.setAttribute(l,c.toString()))}catch{}}for(let l in a){let c=a[l];if(s==="canvas"&&l==="rr_dataURL"){let u=n.createElement("img");u.onload=()=>{let f=o.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=c.toString(),o.RRNodeType&&(o.rr_dataURL=c.toString())}else if(s==="img"&&l==="rr_dataURL"){let u=o;u.currentSrc.startsWith("data:")||(u.setAttribute("rrweb-original-src",e.attributes.src),u.src=c.toString())}if(l==="rr_width")o.style.setProperty("width",c.toString());else if(l==="rr_height")o.style.setProperty("height",c.toString());else if(l==="rr_mediaCurrentTime"&&typeof c=="number")o.currentTime=c;else if(l==="rr_mediaState")switch(c){case"played":o.play().catch(u=>console.warn("media playback error",u));break;case"paused":o.pause();break}}if(e.isShadowHost)if(!o.shadowRoot)o.attachShadow({mode:"open"});else for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);return o}case j.Text:return n.createTextNode(e.isStyle&&r?gs(e.textContent,i):e.textContent);case j.CDATA:return n instanceof XMLDocument?n.createCDATASection(e.textContent):null;case j.Comment:return n.createComment(e.textContent);default:return null}}function Yn(e,t){let{doc:n,mirror:r,skipChild:i=!1,hackCss:s=!0,afterAppend:o,cache:a}=t;if(r.has(e.id)){let c=r.getNode(e.id),u=r.getMeta(c);if(hc(u,e))return r.getNode(e.id)}let l=yc(e,{doc:n,hackCss:s,cache:a});if(!l)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===j.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==j.DocumentType&&(e.childNodes[0].type===j.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" "">')),l=n),r.add(l,e),(e.type===j.Document||e.type===j.Element)&&!i)for(let c of e.childNodes){let u=Yn(c,{doc:n,mirror:r,skipChild:!1,hackCss:s,afterAppend:o,cache:a});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&uc(l)&&l.shadowRoot)l.shadowRoot.appendChild(u);else if(e.type===j.Document&&c.type==j.Element){let f=u,h=null;f.childNodes.forEach(d=>{d.nodeName==="BODY"&&(h=d)}),h?(f.removeChild(h),l.appendChild(u),f.appendChild(h)):l.appendChild(u)}else l.appendChild(u);o&&o(u,c.id)}return l}function _c(e,t){function n(r){t(r)}for(let r of e.getIds())e.has(r)&&n(e.getNode(r))}function wc(e,t){let n=t.getMeta(e);if(n?.type!==j.Element)return;let r=e;for(let i in n.attributes){if(!(Object.prototype.hasOwnProperty.call(n.attributes,i)&&i.startsWith("rr_")))continue;let s=n.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=s),i==="rr_scrollTop"&&(r.scrollTop=s)}}function bc(e,t){let{doc:n,onVisit:r,hackCss:i=!0,afterAppend:s,cache:o,mirror:a=new Er}=t,l=Yn(e,{doc:n,mirror:a,skipChild:!1,hackCss:i,afterAppend:s,cache:o});return _c(a,c=>{r&&r(c),wc(c,a)}),l}var nn=`Please stop import mirror directly. Instead of that,\r
|
|
2
|
+
"use strict";var Ba=Object.defineProperty,no=e=>{throw TypeError(e)},Va=(e,t,n)=>t in e?Ba(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fe=(e,t,n)=>Va(e,typeof t!="symbol"?t+"":t,n),ji=(e,t,n)=>t.has(e)||no("Cannot "+n),h=(e,t,n)=>(ji(e,t,"read from private field"),n?n.call(e):t.get(e)),R=(e,t,n)=>t.has(e)?no("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),x=(e,t,n,r)=>(ji(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),F=(e,t,n)=>(ji(e,t,"access private method"),n),We,wr,Ke,pn,Ce,Ze,Ee,Le,Rt,Pt,kt,In,br,Er,Nt,li,ae,ro,io,qi,so,Xi,zr,Gr,ci,ui,Kn,jt,mn,Qn,Fn,Wt,Dt,on,De,Sr,It,at,vt,Vn,an,ee,fi,zn,Ki,oo,ao,ln,za,Jn,Mt,je,gs,ot,dt,Ae,en,dr,pr,hi;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var fe=2,Mn=4,Hr=8,lo=1<<24,et=16,ze=32,bt=64,Qi=128,Ue=512,le=1024,re=2048,nt=4096,ve=8192,xe=16384,Jt=32768,di=1<<25,vn=65536,Nr=1<<17,Ga=1<<18,Dn=1<<19,Ha=1<<20,yt=1<<25,qt=65536,Mr=1<<21,gn=1<<22,At=1<<23,Gn=Symbol("$state"),co=Symbol("legacy props"),Ya=Symbol(""),pi=Symbol("attributes"),mi=Symbol("class"),vi=Symbol("style"),mr=Symbol("text"),Hn=Symbol("form reset"),tr=new class extends Error{constructor(){super(...arguments),Fe(this,"name","StaleReactionError"),Fe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},ja=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Yr=3,nr=8,uo=!1,fo=Array.isArray,qa=Array.prototype.indexOf,Dr=Array.prototype.includes,jr=Array.from,ho=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,Xa=Object.getOwnPropertyDescriptors,Ka=Object.prototype,Qa=Array.prototype,po=Object.getPrototypeOf,ys=Object.isExtensible,Ja=()=>{};function Za(e){for(var t=0;t<e.length;t++)e[t]()}function mo(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function vo(e){return e===this.v}function $a(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function go(e){return!$a(e,this.v)}function yo(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function el(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function tl(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function nl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function rl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function il(e){throw new Error("https://svelte.dev/e/effect_orphan")}function sl(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ol(){throw new Error("https://svelte.dev/e/hydration_failed")}function al(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ll(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function cl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ul(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fl(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var hl=!1,dl=1,pl=2,ml=16,vl=1,gl=4,yl=8,_l=16,wl=2,_o="[",Ji="[!",_s="[?",Zi="]",yn={},oe=Symbol("uninitialized"),bl="http://www.w3.org/1999/xhtml",de=null;function _n(e){de=e}function qr(e,t=!1,n){de={p:de,i:!1,c:null,e:null,s:e,x:null,r:A,l:null}}function Xr(e){var t=de,n=t.e;if(n!==null){t.e=null;for(var r of n)Zo(r)}return e!==void 0&&(t.x=e),t.i=!0,de=t.p,e??{}}function wo(){return!0}var Vt=[];function bo(){var e=Vt;Vt=[],Za(e)}function Ft(e){if(Vt.length===0&&!Yn){var t=Vt;queueMicrotask(()=>{t===Vt&&bo()})}Vt.push(e)}function El(){for(;Vt.length>0;)bo()}function Sl(){console.warn("https://svelte.dev/e/derived_inert")}function Kr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Nl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var B=!1;function _t(e){B=e}var W;function Re(e){if(e===null)throw Kr(),yn;return W=e}function Qr(){return Re(ct(W))}function qe(e){if(B){if(ct(W)!==null)throw Kr(),yn;W=e}}function Ml(e=1){if(B){for(var t=e,n=W;t--;)n=ct(n);W=n}}function Tr(e=!0){for(var t=0,n=W;;){if(n.nodeType===nr){var r=n.data;if(r===Zi){if(t===0)return n;t-=1}else(r===_o||r===Ji||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ct(n);e&&n.remove(),n=i}}function Eo(e){if(!e||e.nodeType!==nr)throw Kr(),yn;return e.data}function Tt(e){if(typeof e!="object"||e===null||Gn in e)return e;let t=po(e);if(t!==Ka&&t!==Qa)return e;var n=new Map,r=fo(e),i=me(0),s=Yt,o=a=>{if(Yt===s)return a();var l=L,c=Yt;Be(null),Ns(s);var u=a();return Be(l),Ns(c),u};return r&&n.set("length",me(e.length)),new Proxy(e,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&ll();var u=n.get(l);return u===void 0?o(()=>{var f=me(c.value);return n.set(l,f),f}):ne(u,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){let u=o(()=>me(oe));n.set(l,u),jn(i)}}else ne(c,oe),jn(i);return!0},get(a,l,c){if(l===Gn)return e;var u=n.get(l),f=l in a;if(u===void 0&&(!f||dn(a,l)?.writable)&&(u=o(()=>{var d=Tt(f?a[l]:oe),m=me(d);return m}),n.set(l,u)),u!==void 0){var p=b(u);return p===oe?void 0:p}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=n.get(l);u&&(c.value=b(u))}else if(c===void 0){var f=n.get(l),p=f?.v;if(f!==void 0&&p!==oe)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return c},has(a,l){if(l===Gn)return!0;var c=n.get(l),u=c!==void 0&&c.v!==oe||Reflect.has(a,l);if(c!==void 0||A!==null&&(!u||dn(a,l)?.writable)){c===void 0&&(c=o(()=>{var p=u?Tt(a[l]):oe,d=me(p);return d}),n.set(l,c));var f=b(c);if(f===oe)return!1}return u},set(a,l,c,u){var f=n.get(l),p=l in a;if(r&&l==="length")for(var d=c;d<f.v;d+=1){var m=n.get(d+"");m!==void 0?ne(m,oe):d in a&&(m=o(()=>me(oe)),n.set(d+"",m))}if(f===void 0)(!p||dn(a,l)?.writable)&&(f=o(()=>me(void 0)),ne(f,Tt(c)),n.set(l,f));else{p=f.v!==oe;var E=o(()=>Tt(c));ne(f,E)}var _=Reflect.getOwnPropertyDescriptor(a,l);if(_?.set&&_.set.call(u,c),!p){if(r&&typeof l=="string"){var v=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=v.v&&ne(v,w+1)}jn(i)}return!0},ownKeys(a){b(i);var l=Reflect.ownKeys(a).filter(f=>{var p=n.get(f);return p===void 0||p.v!==oe});for(var[c,u]of n)u.v!==oe&&!(c in a)&&l.push(c);return l},setPrototypeOf(){cl()}})}var ws,So,No,Mo;function gi(){if(ws===void 0){ws=window,So=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;No=dn(t,"firstChild").get,Mo=dn(t,"nextSibling").get,ys(e)&&(e[mi]=void 0,e[pi]=null,e[vi]=void 0,e.__e=void 0),ys(n)&&(n[mr]=void 0)}}function tt(e=""){return document.createTextNode(e)}function Xt(e){return No.call(e)}function ct(e){return Mo.call(e)}function Xe(e,t){if(!B)return Xt(e);var n=Xt(W);if(n===null)n=W.appendChild(tt());else if(t&&n.nodeType!==Yr){var r=tt();return n?.before(r),Re(r),r}return t&&$i(n),Re(n),n}function Dl(e,t=!1){if(!B){var n=Xt(e);return n instanceof Comment&&n.data===""?ct(n):n}if(t){if(W?.nodeType!==Yr){var r=tt();return W?.before(r),Re(r),r}$i(W)}return W}function Oe(e,t=1,n=!1){let r=B?W:e;for(var i;t--;)i=r,r=ct(r);if(!B)return r;if(n){if(r?.nodeType!==Yr){var s=tt();return r===null?i?.after(s):r.before(s),Re(s),s}$i(r)}return Re(r),r}function Do(e){e.textContent=""}function To(){return!1}function Tl(e,t,n){return n?document.createElement(e,{is:n}):document.createElement(e)}function $i(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Yr;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Co(e){var t=A;if(t===null)return L.f|=At,e;if((t.f&Jt)===0&&(t.f&Mn)===0)throw e;Ot(e,t)}function Ot(e,t){if(!(t!==null&&(t.f&xe)!==0)){for(;t!==null;){if((t.f&Qi)!==0){if((t.f&Jt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}var Cl=-7169;function Z(e,t){e.f=e.f&Cl|t}function es(e){(e.f&Ue)!==0||e.deps===null?Z(e,le):Z(e,nt)}function xo(e){if(e!==null)for(let t of e)(t.f&fe)===0||(t.f&qt)===0||(t.f^=qt,xo(t.deps))}function Ro(e,t,n){(e.f&re)!==0?t.add(e):(e.f&nt)!==0&&n.add(e),xo(e.deps),Z(e,le)}var cr=!1;function xl(e){var t=cr;try{return cr=!1,[e(),cr]}finally{cr=t}}var bs=!1;function ko(){bs||(bs=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Hn]?.()})},{capture:!0}))}function rr(e){var t=L,n=A;Be(null),lt(null);try{return e()}finally{Be(t),lt(n)}}function Rl(e,t,n,r=n){e.addEventListener(t,()=>rr(n));let i=e[Hn];i?e[Hn]=()=>{i(),r(!0)}:e[Hn]=()=>r(!0),ko()}function kl(e){let t=0,n=Kt(0),r;return()=>{ss()&&(b(n),os(()=>(t===0&&(r=Tn(()=>e(()=>jn(n)))),t+=1,()=>{Ft(()=>{t-=1,t===0&&(r?.(),r=void 0,jn(n))})})))}}var Al=vn|Dn;function Ol(e,t,n,r){new yi(e,t,n,r)}var yi=class{constructor(t,n,r,i){R(this,ae),Fe(this,"parent"),Fe(this,"is_pending",!1),Fe(this,"transform_error"),R(this,We),R(this,wr,B?W:null),R(this,Ke),R(this,pn),R(this,Ce),R(this,Ze,null),R(this,Ee,null),R(this,Le,null),R(this,Rt,null),R(this,Pt,0),R(this,kt,0),R(this,In,!1),R(this,br,new Set),R(this,Er,new Set),R(this,Nt,null),R(this,li,kl(()=>(x(this,Nt,Kt(h(this,Pt))),()=>{x(this,Nt,null)}))),x(this,We,t),x(this,Ke,n),x(this,pn,s=>{var o=A;o.b=this,o.f|=Qi,r(s)}),this.parent=A.b,this.transform_error=i??this.parent?.transform_error??(s=>s),x(this,Ce,as(()=>{if(B){let s=h(this,wr);Qr();let o=s.data===Ji;if(s.data.startsWith(_s)){let l=JSON.parse(s.data.slice(_s.length));F(this,ae,io).call(this,l)}else o?F(this,ae,so).call(this):F(this,ae,ro).call(this)}else F(this,ae,Xi).call(this)},Al)),B&&x(this,We,W)}defer_effect(t){Ro(t,h(this,br),h(this,Er))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!h(this,Ke).pending}update_pending_count(t,n){F(this,ae,ci).call(this,t,n),x(this,Pt,h(this,Pt)+t),!(!h(this,Nt)||h(this,In))&&(x(this,In,!0),Ft(()=>{x(this,In,!1),h(this,Nt)&&bn(h(this,Nt),h(this,Pt))}))}get_effect_pending(){return h(this,li).call(this),b(h(this,Nt))}error(t){if(!h(this,Ke).onerror&&!h(this,Ke).failed)throw t;U?.is_fork?(h(this,Ze)&&U.skip_effect(h(this,Ze)),h(this,Ee)&&U.skip_effect(h(this,Ee)),h(this,Le)&&U.skip_effect(h(this,Le)),U.oncommit(()=>{F(this,ae,ui).call(this,t)})):F(this,ae,ui).call(this,t)}};We=new WeakMap;wr=new WeakMap;Ke=new WeakMap;pn=new WeakMap;Ce=new WeakMap;Ze=new WeakMap;Ee=new WeakMap;Le=new WeakMap;Rt=new WeakMap;Pt=new WeakMap;kt=new WeakMap;In=new WeakMap;br=new WeakMap;Er=new WeakMap;Nt=new WeakMap;li=new WeakMap;ae=new WeakSet;ro=function(){try{x(this,Ze,Ve(()=>h(this,pn).call(this,h(this,We))))}catch(e){this.error(e)}};io=function(e){let t=h(this,Ke).failed,{reset:n,invoke_onerror:r}=F(this,ae,qi).call(this,e);Ft(r),t&&x(this,Le,Ve(()=>{t(h(this,We),()=>e,()=>n)}))};qi=function(e){var t=!1,n=!1;let r=()=>{if(t){Nl();return}t=!0,n&&fl(),h(this,Le)!==null&&Zt(h(this,Le),()=>{x(this,Le,null)}),F(this,ae,Gr).call(this,()=>{F(this,ae,Xi).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,h(this,Ke).onerror?.(e,r),n=!1}catch(s){Ot(s,h(this,Ce)&&h(this,Ce).parent)}}}};so=function(){let e=h(this,Ke).pending;e&&(this.is_pending=!0,x(this,Ee,Ve(()=>e(h(this,We)))),Ft(()=>{var t=x(this,Rt,document.createDocumentFragment()),n=tt();t.append(n),x(this,Ze,F(this,ae,Gr).call(this,()=>Ve(()=>h(this,pn).call(this,n)))),h(this,kt)===0&&(h(this,We).before(t),x(this,Rt,null),Zt(h(this,Ee),()=>{x(this,Ee,null)}),F(this,ae,zr).call(this,U))}))};Xi=function(){try{if(this.is_pending=this.has_pending_snippet(),x(this,kt,0),x(this,Pt,0),x(this,Ze,Ve(()=>{h(this,pn).call(this,h(this,We))})),h(this,kt)>0){var e=x(this,Rt,document.createDocumentFragment());cs(h(this,Ze),e);let t=h(this,Ke).pending;x(this,Ee,Ve(()=>t(h(this,We))))}else F(this,ae,zr).call(this,U)}catch(t){this.error(t)}};zr=function(e){this.is_pending=!1,e.transfer_effects(h(this,br),h(this,Er))};Gr=function(e){var t=A,n=L,r=de;lt(h(this,Ce)),Be(h(this,Ce)),_n(h(this,Ce).ctx);try{return ir.ensure(),e()}catch(i){return Co(i),null}finally{lt(t),Be(n),_n(r)}};ci=function(e,t){var n;if(!this.has_pending_snippet()){this.parent&&F(n=this.parent,ae,ci).call(n,e,t);return}x(this,kt,h(this,kt)+e),h(this,kt)===0&&(F(this,ae,zr).call(this,t),h(this,Ee)&&Zt(h(this,Ee),()=>{x(this,Ee,null)}),h(this,Rt)&&(h(this,We).before(h(this,Rt)),x(this,Rt,null)))};ui=function(e){h(this,Ze)&&(Se(h(this,Ze)),x(this,Ze,null)),h(this,Ee)&&(Se(h(this,Ee)),x(this,Ee,null)),h(this,Le)&&(Se(h(this,Le)),x(this,Le,null)),B&&(Re(h(this,wr)),Ml(),Re(Tr()));let t=h(this,Ke).failed,n=r=>{let{reset:i,invoke_onerror:s}=F(this,ae,qi).call(this,r);s(),t&&x(this,Le,F(this,ae,Gr).call(this,()=>{try{return Ve(()=>{var o=A;o.b=this,o.f|=Qi,t(h(this,We),()=>r,()=>i)})}catch(o){return Ot(o,h(this,Ce).parent),null}}))};Ft(()=>{var r;try{r=this.transform_error(e)}catch(i){Ot(i,h(this,Ce)&&h(this,Ce).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(n,i=>Ot(i,h(this,Ce)&&h(this,Ce).parent)):n(r)})};function Il(e,t,n,r){let i=Zn;var s=e.filter(d=>!d.settled),o=t.map(i);if(n.length===0&&s.length===0){r(o);return}var a=A,l=Fl(),c=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(d=>d.promise)):null;function u(d){if((a.f&xe)===0){l();try{r([...o,...d])}catch(m){Ot(m,a)}Cr()}}var f=Ao();if(n.length===0){c.then(()=>u([])).finally(f);return}function p(){Promise.all(n.map(d=>Ll(d))).then(u).catch(d=>Ot(d,a)).finally(f)}c?c.then(()=>{l(),p(),Cr()}):p()}function Fl(){var e=A,t=L,n=de,r=U;return function(s=!0){lt(e),Be(t),_n(n),s&&(e.f&xe)===0&&(r?.activate(),r?.apply())}}function Cr(e=!0){lt(null),Be(null),_n(null),e&&U?.deactivate()}function Ao(){var e=A,t=e.b,n=U,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Zn(e){var t=fe|re;return A!==null&&(A.f|=Dn),{ctx:de,deps:null,effects:null,equals:vo,f:t,fn:e,reactions:null,rv:0,v:oe,wv:0,parent:A,ac:null}}var Ln=Symbol("obsolete");function Ll(e,t,n){let r=A;r===null&&el();var i=void 0,s=Kt(oe),o=!L,a=new Set;return Ql(()=>{var l=A,c=mo();i=c.promise;try{Promise.resolve(e()).then(c.resolve,d=>{d!==tr&&c.reject(d)}).finally(Cr)}catch(d){c.reject(d),Cr()}var u=U;if(o){if((l.f&Jt)!==0)var f=Ao();if(r.b?.is_rendered())u.async_deriveds.get(l)?.reject(Ln);else for(let d of a.values())d.reject(Ln);a.add(c),u.async_deriveds.set(l,c)}let p=(d,m=void 0)=>{f?.(),a.delete(c),m!==Ln&&(u.activate(),m?(s.f|=At,bn(s,m)):((s.f&At)!==0&&(s.f^=At),bn(s,d)),u.deactivate())};c.promise.then(p,d=>p(null,d||"unknown"))}),ql(()=>{for(let l of a)l.reject(Ln)}),new Promise(l=>{function c(u){function f(){u===i?l(s):c(i)}u.then(f,f)}c(i)})}function Ut(e){let t=Zn(e);return Yo(t),t}function Oo(e){let t=Zn(e);return t.equals=go,t}function Pl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Se(t[n])}}function ts(e){var t,n=A,r=e.parent;if(!wt&&r!==null&&e.v!==oe&&(r.f&(xe|ve))!==0)return Sl(),e.v;lt(r);try{e.f&=~qt,Pl(e),t=Ko(e)}finally{lt(n)}return t}function Io(e){var t=ts(e);if(!e.equals(t)&&(e.wv=qo(),(!U?.is_fork||e.deps===null)&&(U!==null?(U.capture(e,t,!0),_i?.capture(e,t,!0)):e.v=t,e.deps===null))){Z(e,le);return}wt||(Qe!==null?(ss()||U?.is_fork)&&Qe.set(e,t):es(e))}function Wl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&rr(()=>{t.ac.abort(tr),t.ac=null}),t.fn!==null&&(t.teardown=Ja),$n(t,0),ls(t))}function Fo(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&En(t)}var ns=null,tn=null,U=null,_i=null,Qe=null,wi=null,Yn=!1,Jr=!1,wn=null,xr=null,Lo=0;var Ul=1,Po=class Wo{constructor(){R(this,ee),Fe(this,"id",Ul++),R(this,Kn,!1),Fe(this,"linked",!0),R(this,jt,null),R(this,mn,null),Fe(this,"async_deriveds",new Map),Fe(this,"current",new Map),Fe(this,"previous",new Map),R(this,Qn,new Set),R(this,Fn,new Set),R(this,Wt,0),R(this,Dt,new Map),R(this,on,null),R(this,De,[]),R(this,Sr,[]),R(this,It,new Set),R(this,at,new Set),R(this,vt,new Map),R(this,Vn,new Set),Fe(this,"is_fork",!1),R(this,an,!1),tn===null?ns=tn=this:(x(tn,mn,this),x(this,jt,tn)),tn=this}skip_effect(t){h(this,vt).has(t)||h(this,vt).set(t,{d:[],m:[]}),h(this,Vn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=h(this,vt).get(t);if(r){h(this,vt).delete(t);for(var i of r.d)Z(i,re),n(i);for(i of r.m)Z(i,nt),n(i)}h(this,Vn).add(t)}capture(t,n,r=!1){t.v!==oe&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&At)===0&&(this.current.set(t,[n,r]),Qe?.set(t,n)),this.is_fork||(t.v=n)}activate(){U=this}deactivate(){U=null,Qe=null}flush(){try{Jr=!0,U=this,F(this,ee,zn).call(this)}finally{Lo=0,wi=null,wn=null,xr=null,Jr=!1,U=null,Qe=null,Ht.clear()}}discard(){for(let t of h(this,Fn))t(this);h(this,Fn).clear();for(let t of this.async_deriveds.values())t.reject(Ln);F(this,ee,Jn).call(this),h(this,on)?.resolve()}register_created_effect(t){h(this,Sr).push(t)}increment(t,n){if(x(this,Wt,h(this,Wt)+1),t){let r=h(this,Dt).get(n)??0;h(this,Dt).set(n,r+1)}}decrement(t,n){if(x(this,Wt,h(this,Wt)-1),t){let r=h(this,Dt).get(n)??0;r===1?h(this,Dt).delete(n):h(this,Dt).set(n,r-1)}h(this,an)||(x(this,an,!0),Ft(()=>{x(this,an,!1),this.linked&&this.flush()}))}transfer_effects(t,n){for(let r of t)h(this,It).add(r);for(let r of n)h(this,at).add(r);t.clear(),n.clear()}oncommit(t){h(this,Qn).add(t)}ondiscard(t){h(this,Fn).add(t)}settled(){return(h(this,on)??x(this,on,mo())).promise}static ensure(){if(U===null){let t=U=new Wo;!Jr&&!Yn&&Ft(()=>{h(t,Kn)||t.flush()})}return U}apply(){{Qe=null;return}}schedule(t){if(wi=t,t.b?.is_pending&&(t.f&(Mn|Hr|lo))!==0&&(t.f&Jt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(wn!==null&&n===A&&(L===null||(L.f&fe)===0))return;if((r&(bt|ze))!==0){if((r&le)===0)return;n.f^=le}}h(this,De).push(n)}};Kn=new WeakMap;jt=new WeakMap;mn=new WeakMap;Qn=new WeakMap;Fn=new WeakMap;Wt=new WeakMap;Dt=new WeakMap;on=new WeakMap;De=new WeakMap;Sr=new WeakMap;It=new WeakMap;at=new WeakMap;vt=new WeakMap;Vn=new WeakMap;an=new WeakMap;ee=new WeakSet;fi=function(){if(this.is_fork)return!0;for(let n of h(this,Dt).keys()){for(var e=n,t=!1;e.parent!==null;){if(h(this,vt).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1};zn=function(){var e,t,n;x(this,Kn,!0),Lo++>1e3&&(F(this,ee,Jn).call(this),Vl());for(let u of h(this,It))h(this,at).delete(u),Z(u,re),this.schedule(u);for(let u of h(this,at))Z(u,nt),this.schedule(u);let r=h(this,De);x(this,De,[]),this.apply();var i=wn=[],s=[],o=xr=[];for(let u of r)try{F(this,ee,Ki).call(this,u,i,s)}catch(f){throw Vo(u),F(this,ee,fi).call(this)||this.discard(),f}if(U=null,o.length>0){var a=Po.ensure();for(let u of o)a.schedule(u)}if(wn=null,xr=null,F(this,ee,fi).call(this)){F(this,ee,ln).call(this,s),F(this,ee,ln).call(this,i);for(let[u,f]of h(this,vt))Bo(u,f);o.length>0&&F(e=U,ee,zn).call(e);return}let l=F(this,ee,oo).call(this);if(l){F(this,ee,ln).call(this,s),F(this,ee,ln).call(this,i),F(t=l,ee,ao).call(t,this);return}h(this,It).clear(),h(this,at).clear();for(let u of h(this,Qn))u(this);h(this,Qn).clear(),_i=this,Es(s),Es(i),_i=null,h(this,on)?.resolve();var c=U;if(h(this,Wt)===0&&(h(this,De).length===0||c!==null)&&F(this,ee,Jn).call(this),h(this,De).length>0)if(c!==null){let u=c;h(u,De).push(...h(this,De).filter(f=>!h(u,De).includes(f)))}else c=this;c!==null&&F(n=c,ee,zn).call(n)};Ki=function(e,t,n){e.f^=le;for(var r=e.first;r!==null;){var i=r.f,s=(i&(ze|bt))!==0,o=s&&(i&le)!==0,a=o||(i&ve)!==0||h(this,vt).has(r);if(!a&&r.fn!==null){s?r.f^=le:(i&Mn)!==0?t.push(r):sr(r)&&((i&et)!==0&&h(this,at).add(r),En(r));var l=r.first;if(l!==null){r=l;continue}}for(;r!==null;){var c=r.next;if(c!==null){r=c;break}r=r.parent}}};oo=function(){for(var e=h(this,jt);e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=h(e,jt)}return null};ao=function(e){var t;for(let[r,i]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,i);for(let[r,i]of e.async_deriveds){let s=this.async_deriveds.get(r);s&&i.promise.then(s.resolve).catch(s.reject)}e.async_deriveds.clear(),this.transfer_effects(h(e,It),h(e,at));let n=r=>{var i=r.reactions;if(i!==null&&!((r.f&fe)!==0&&(r.f&(re|nt))===0))for(let a of i){var s=a.f;if((s&fe)!==0)n(a);else{var o=a;s&(gn|et)&&!this.async_deriveds.has(o)&&(h(this,at).delete(o),Z(o,re),this.schedule(o))}}};for(let r of this.current.keys())n(r);this.oncommit(()=>e.discard()),F(t=e,ee,Jn).call(t),U=this,F(this,ee,zn).call(this)};ln=function(e){for(var t=0;t<e.length;t+=1)Ro(e[t],h(this,It),h(this,at))};za=function(){var e;for(let f=ns;f!==null;f=h(f,mn)){var t=f.id<this.id,n=[];for(let[p,[d,m]]of this.current){if(f.current.has(p)){var r=f.current.get(p)[0];if(t&&d!==r)f.current.set(p,[d,m]);else continue}n.push(p)}if(t)for(let[p,d]of this.async_deriveds){let m=f.async_deriveds.get(p);m&&d.promise.then(m.resolve).catch(m.reject)}var i=[...f.current.keys()].filter(p=>!f.current.get(p)[1]);if(!(!h(f,Kn)||i.length===0)){var s=i.filter(p=>!this.current.has(p));if(s.length===0)t&&f.discard();else if(n.length>0){if(t)for(let p of h(this,Vn))f.unskip_effect(p,d=>{var m;(d.f&(et|gn))!==0?f.schedule(d):F(m=f,ee,ln).call(m,[d])});f.activate();var o=new Set,a=new Map;for(var l of n)Uo(l,s,o,a);a=new Map;var c=[...f.current].filter(([p,d])=>{let m=this.current.get(p);return m?m[0]!==d[0]||m[1]!==d[1]:!0}).map(([p])=>p);if(c.length>0)for(let p of h(this,Sr))(p.f&(xe|ve|Nr))===0&&rs(p,c,a)&&((p.f&(gn|et))!==0?(Z(p,re),f.schedule(p)):h(f,It).add(p));if(h(f,De).length>0&&!h(f,an)){f.apply();for(var u of h(f,De))F(e=f,ee,Ki).call(e,u,[],[]);x(f,De,[])}f.deactivate()}}}};Jn=function(){if(this.linked){var e=h(this,jt),t=h(this,mn);e===null?ns=t:x(e,mn,t),t===null?tn=e:x(t,jt,e),this.linked=!1}};var ir=Po;function Bl(e){var t=Yn;Yn=!0;try{for(var n;;){if(El(),U===null)return n;U.flush()}}finally{Yn=t}}function Vl(){try{sl()}catch(e){Ot(e,wi)}}var pt=null;function Es(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(xe|ve))===0&&sr(r)&&(pt=new Set,En(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ea(r),pt?.size>0)){Ht.clear();for(let i of pt){if((i.f&(xe|ve))!==0)continue;let s=[i],o=i.parent;for(;o!==null;)pt.has(o)&&(pt.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){let l=s[a];(l.f&(xe|ve))===0&&En(l)}}pt.clear()}}pt=null}}function Uo(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let s=i.f;(s&fe)!==0?Uo(i,t,n,r):(s&(gn|et))!==0&&(s&re)===0&&rs(i,t,r)&&(Z(i,re),is(i))}}function rs(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let i of e.deps){if(Dr.call(t,i))return!0;if((i.f&fe)!==0&&rs(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function is(e){U.schedule(e)}function Bo(e,t){if(!((e.f&ze)!==0&&(e.f&le)!==0)){(e.f&re)!==0?t.d.push(e):(e.f&nt)!==0&&t.m.push(e),Z(e,le);for(var n=e.first;n!==null;)Bo(n,t),n=n.next}}function Vo(e){Z(e,le);for(var t=e.first;t!==null;)Vo(t),t=t.next}var Rr=new Set,Ht=new Map,zo=!1;function Kt(e,t){var n={f:0,v:e,reactions:null,equals:vo,rv:0,wv:0};return n}function me(e,t){let n=Kt(e);return Yo(n),n}function Go(e,t=!1,n=!0){let r=Kt(e);return t||(r.equals=go),r}function ne(e,t,n=!1){L!==null&&(!Je||(L.f&Nr)!==0)&&wo()&&(L.f&(fe|et|gn|Nr))!==0&&($e===null||!$e.has(e))&&ul();let r=n?Tt(t):t;return bn(e,r,xr)}function bn(e,t,n=null){if(!e.equals(t)){Ht.set(e,wt?t:e.v);var r=ir.ensure();if(r.capture(e,t),(e.f&fe)!==0){let i=e;(e.f&re)!==0&&ts(i),Qe===null&&es(i)}e.wv=qo(),Ho(e,re,n),A!==null&&(A.f&le)!==0&&(A.f&(ze|bt))===0&&(Ie===null?Gl([e]):Ie.push(e)),!r.is_fork&&Rr.size>0&&!zo&&zl()}return t}function zl(){zo=!1;for(let e of Rr){(e.f&le)!==0&&Z(e,nt);let t;try{t=sr(e)}catch{t=!0}t&&En(e)}Rr.clear()}function jn(e){ne(e,e.v+1)}function Ho(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],a=o.f,l=(a&re)===0;if(l&&Z(o,t),(a&Nr)!==0)Rr.add(o);else if((a&fe)!==0){var c=o;Qe?.delete(c),(a&qt)===0&&(a&Ue&&(A===null||(A.f&Mr)===0)&&(o.f|=qt),Ho(c,nt,n))}else if(l){var u=o;(a&et)!==0&&pt!==null&&pt.add(u),n!==null?n.push(u):is(u)}}}var vr=!1,wt=!1;function Ss(e){wt=e}var L=null,Je=!1;function Be(e){L=e}var A=null;function lt(e){A=e}var $e=null;function Yo(e){L!==null&&($e??($e=new Set)).add(e)}var be=null,Me=0,Ie=null;function Gl(e){Ie=e}var jo=1,zt=0,Yt=zt;function Ns(e){Yt=e}function qo(){return++jo}function sr(e){var t=e.f;if((t&re)!==0)return!0;if(t&fe&&(e.f&=~qt),(t&nt)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(sr(s)&&Io(s),s.wv>e.wv)return!0}(t&Ue)!==0&&Qe===null&&Z(e,le)}return!1}function Xo(e,t,n=!0){var r=e.reactions;if(r!==null&&!($e!==null&&$e.has(e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&fe)!==0?Xo(s,t,!1):t===s&&(n?Z(s,re):(s.f&le)!==0&&Z(s,nt),is(s))}}function Ko(e){var t,n=be,r=Me,i=Ie,s=L,o=$e,a=de,l=Je,c=Yt,u=e.f;be=null,Me=0,Ie=null,L=(u&(ze|bt))===0?e:null,$e=null,_n(e.ctx),Je=!1,Yt=++zt,e.ac!==null&&(rr(()=>{e.ac.abort(tr)}),e.ac=null);try{e.f|=Mr;var f=e.fn,p=f();e.f|=Jt;var d=e.deps,m=U?.is_fork;if(be!==null){var E;if(m||$n(e,Me),d!==null&&Me>0)for(d.length=Me+be.length,E=0;E<be.length;E++)d[Me+E]=be[E];else e.deps=d=be;if(ss()&&(e.f&Ue)!==0)for(E=Me;E<d.length;E++)((t=d[E]).reactions??(t.reactions=[])).push(e)}else!m&&d!==null&&Me<d.length&&($n(e,Me),d.length=Me);if(wo()&&Ie!==null&&!Je&&d!==null&&(e.f&(fe|nt|re))===0)for(E=0;E<Ie.length;E++)Xo(Ie[E],e);if(s!==null&&s!==e){if(zt++,s.deps!==null)for(let _=0;_<r;_+=1)s.deps[_].rv=zt;if(n!==null)for(let _ of n)_.rv=zt;Ie!==null&&(i===null?i=Ie:i.push(...Ie))}return(e.f&At)!==0&&(e.f^=At),p}catch(_){return Co(_)}finally{e.f^=Mr,be=n,Me=r,Ie=i,L=s,$e=o,_n(a),Je=l,Yt=c}}function Hl(e,t){let n=t.reactions;if(n!==null){var r=qa.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&fe)!==0&&(be===null||!Dr.call(be,t))){var s=t;(s.f&Ue)!==0&&(s.f^=Ue,s.f&=~qt),s.v!==oe&&es(s),s.ac!==null&&rr(()=>{s.ac.abort(tr),s.ac=null,Z(s,re)}),Wl(s),$n(s,0)}}function $n(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Hl(e,n[r])}function En(e){var t=e.f;if((t&xe)===0){Z(e,le);var n=A,r=vr;A=e,vr=(t&(ze|bt))===0;try{(t&(et|lo))!==0?Jl(e):ls(e),$o(e);var i=Ko(e);e.teardown=typeof i=="function"?i:null,e.wv=jo;var s;uo&&hl&&(e.f&re)!==0&&e.deps}finally{vr=r,A=n}}}function b(e){var t=e.f,n=(t&fe)!==0;if(L!==null&&!Je){var r=A!==null&&(A.f&xe)!==0;if(!r&&($e===null||!$e.has(e))){var i=L.deps;if((L.f&Mr)!==0)e.rv<zt&&(e.rv=zt,be===null&&i!==null&&i[Me]===e?Me++:be===null?be=[e]:be.push(e));else{L.deps??(L.deps=[]),Dr.call(L.deps,e)||L.deps.push(e);var s=e.reactions;s===null?e.reactions=[L]:Dr.call(s,L)||s.push(L)}}}if(wt&&Ht.has(e))return Ht.get(e);if(n){var o=e;if(wt){var a=o.v;return((o.f&le)===0&&o.reactions!==null||Jo(o))&&(a=ts(o)),Ht.set(o,a),a}var l=(o.f&Ue)===0&&!Je&&L!==null&&(vr||(L.f&Ue)!==0),c=(o.f&Jt)===0;sr(o)&&(l&&(o.f|=Ue),Io(o)),l&&!c&&(Fo(o),Qo(o))}if(Qe?.has(e))return Qe.get(e);if((e.f&At)!==0)throw e.v;return e.v}function Qo(e){if(e.f|=Ue,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&fe)!==0&&(t.f&Ue)===0&&(Fo(t),Qo(t))}function Jo(e){if(e.v===oe)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Ht.has(t)||(t.f&fe)!==0&&Jo(t))return!0;return!1}function Tn(e){var t=Je;try{return Je=!0,e()}finally{Je=t}}function Yl(e){A===null&&(L===null&&il(),rl()),wt&&nl()}function jl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Et(e,t){var n=A;n!==null&&(n.f&ve)!==0&&(e|=ve);var r={ctx:de,deps:null,nodes:null,f:e|re|Ue,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};U?.register_created_effect(r);var i=r;if((e&Mn)!==0)wn!==null?wn.push(r):ir.ensure().schedule(r);else if(t!==null){try{En(r)}catch(o){throw Se(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Dn)===0&&(i=i.first,(e&et)!==0&&(e&vn)!==0&&i!==null&&(i.f|=vn))}if(i!==null&&(i.parent=n,n!==null&&jl(i,n),L!==null&&(L.f&fe)!==0&&(e&bt)===0)){var s=L;(s.effects??(s.effects=[])).push(i)}return r}function ss(){return L!==null&&!Je}function ql(e){let t=Et(Hr,null);return Z(t,le),t.teardown=e,t}function Pn(e){Yl();var t=A.f,n=!L&&(t&ze)!==0&&de!==null&&!de.i;if(n){var r=de;(r.e??(r.e=[])).push(e)}else return Zo(e)}function Zo(e){return Et(Mn|Ha,e)}function Xl(e){ir.ensure();let t=Et(bt|Dn,e);return(n={})=>new Promise(r=>{n.outro?Zt(t,()=>{Se(t),r(void 0)}):(Se(t),r(void 0))})}function Kl(e){return Et(Mn,e)}function Ql(e){return Et(gn|Dn,e)}function os(e,t=0){return Et(Hr|t,e)}function cn(e,t=[],n=[],r=[]){Il(r,t,n,i=>{Et(Hr,()=>{e(...i.map(b))})})}function as(e,t=0){var n=Et(et|t,e);return n}function Ve(e){return Et(ze|Dn,e)}function $o(e){var t=e.teardown;if(t!==null){let n=wt,r=L;Ss(!0),Be(null);try{t.call(null)}finally{Ss(n),Be(r)}}}function ls(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let i=n.ac;i!==null&&rr(()=>{i.abort(tr)});var r=n.next;(n.f&bt)!==0?n.parent=null:Se(n,t),n=r}}function Jl(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&ze)===0&&Se(t),t=n}}function Se(e,t=!0){var n=!1;(t||(e.f&Ga)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Zl(e.nodes.start,e.nodes.end),n=!0),e.f|=di,ls(e,t&&!n),$n(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let s of r)s.stop();$o(e),e.f^=di,e.f|=xe;var i=e.parent;i!==null&&i.first!==null&&ea(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Zl(e,t){for(;e!==null;){var n=e===t?null:ct(e);e.remove(),e=n}}function ea(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Zt(e,t,n=!0){var r=[];ta(e,r,!0);var i=()=>{n&&Se(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function ta(e,t,n){if((e.f&ve)===0){e.f^=ve;var r=e.nodes&&e.nodes.t;if(r!==null)for(let a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next;if((i.f&bt)===0){var o=(i.f&vn)!==0||(i.f&ze)!==0&&(e.f&et)!==0;ta(i,t,o?n:!1)}i=s}}}function kr(e){na(e,!0)}function na(e,t){if((e.f&ve)!==0){e.f^=ve,(e.f&le)===0&&(Z(e,re),ir.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&vn)!==0||(n.f&ze)!==0;na(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(let o of s)(o.is_global||t)&&o.in()}}function cs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ct(n);t.append(n),n=i}}var un=Symbol("events"),ra=new Set,bi=new Set;function xn(e,t,n){(t[un]??(t[un]={}))[e]=n}function $l(e){for(var t=0;t<e.length;t++)ra.add(e[t]);for(var n of bi)n(e)}var Ms=null;function Ds(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Ms=e;var o=0,a=Ms===e&&e[un];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[un]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){ho(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=L,f=A;Be(null),lt(null);try{for(var p,d=[];s!==null&&s!==t;){try{var m=s[un]?.[r];m!=null&&(!s.disabled||e.target===s)&&m.call(s,e)}catch(E){p?d.push(E):p=E}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(p){for(let E of d)queueMicrotask(()=>{throw E});throw p}}finally{e[un]=t,delete e.currentTarget,Be(u),lt(f)}}}var ec=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function tc(e){return ec?.createHTML(e)??e}function ia(e){var t=Tl("template");return t.innerHTML=tc(e.replaceAll("<!>","<!---->")),t.content}function Qt(e,t){var n=A;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function or(e,t){var n=(t&wl)!==0,r,i=!e.startsWith("<!>");return()=>{if(B)return Qt(W,null),W;r===void 0&&(r=ia(i?e:"<!>"+e),r=Xt(r));var s=n||So?document.importNode(r,!0):r.cloneNode(!0);return Qt(s,s),s}}function nc(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(B)return Qt(W,null),W;if(!s){var o=ia(i),a=Xt(o);s=Xt(a)}var l=s.cloneNode(!0);return Qt(l,l),l}}function sa(e,t){return nc(e,t,"svg")}function rc(){if(B)return Qt(W,null),W;var e=document.createDocumentFragment(),t=document.createComment(""),n=tt();return e.append(t,n),Qt(t,n),e}function mt(e,t){if(B){var n=A;((n.f&Jt)===0||n.nodes.end===null)&&(n.nodes.end=W),Qr();return}e!==null&&e.before(t)}var ic=["touchstart","touchmove"];function sc(e){return ic.includes(e)}function gr(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[mr]??(e[mr]=e.nodeValue))&&(e[mr]=n,e.nodeValue=`${n}`)}function oa(e,t){return aa(e,t)}function oc(e,t){gi(),t.intro=t.intro??!1;let n=t.target,r=B,i=W;try{for(var s=Xt(n);s&&(s.nodeType!==nr||s.data!==_o);)s=ct(s);if(!s)throw yn;_t(!0),Re(s);let o=aa(e,{...t,anchor:s});return _t(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
3
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==yn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&ol(),gi(),Do(n),_t(!1),oa(e,t)}finally{_t(r),Re(i)}}var ur=new Map;function aa(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){gi();var l=void 0,c=Xl(()=>{var u=n??t.appendChild(tt());Ol(u,{pending:()=>{}},d=>{qr({});var m=de;if(s&&(m.c=s),i&&(r.$$events=i),B&&Qt(d,null),l=e(d,r)||{},B&&(A.nodes.end=W,W===null||W.nodeType!==nr||W.data!==Zi))throw Kr(),yn;Xr()},a);var f=new Set,p=d=>{for(var m=0;m<d.length;m++){var E=d[m];if(!f.has(E)){f.add(E);var _=sc(E);for(let S of[t,document]){var v=ur.get(S);v===void 0&&(v=new Map,ur.set(S,v));var w=v.get(E);w===void 0?(S.addEventListener(E,Ds,{passive:_}),v.set(E,1)):v.set(E,w+1)}}}};return p(jr(ra)),bi.add(p),()=>{for(var d of f)for(let _ of[t,document]){var m=ur.get(_),E=m.get(d);--E==0?(_.removeEventListener(d,Ds),m.delete(d),m.size===0&&ur.delete(_)):m.set(d,E)}bi.delete(p),u!==n&&u.parentNode?.removeChild(u)}});return Ei.set(l,c),l}var Ei=new WeakMap;function ac(e,t){let n=Ei.get(e);return n?(Ei.delete(e),n(t)):Promise.resolve()}function lc(e){return class extends Si{constructor(t){super({component:e,...t})}}}var Si=class{constructor(t){R(this,Mt),R(this,je);var n=new Map,r=(s,o)=>{var a=Go(o,!1,!1);return n.set(s,a),a};let i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return b(n.get(o)??r(o,Reflect.get(s,o)))},has(s,o){return o===co?!0:(b(n.get(o)??r(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return ne(n.get(o)??r(o,a),a),Reflect.set(s,o,a)}});x(this,je,(t.hydrate?oc:oa)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Bl(),x(this,Mt,i.$$events);for(let s of Object.keys(h(this,je)))s==="$set"||s==="$destroy"||s==="$on"||ho(this,s,{get(){return h(this,je)[s]},set(o){h(this,je)[s]=o},enumerable:!0});h(this,je).$set=s=>{Object.assign(i,s)},h(this,je).$destroy=()=>{ac(h(this,je))}}$set(t){h(this,je).$set(t)}$on(t,n){h(this,Mt)[t]=h(this,Mt)[t]||[];let r=(...i)=>n.call(this,...i);return h(this,Mt)[t].push(r),()=>{h(this,Mt)[t]=h(this,Mt)[t].filter(i=>i!==r)}}$destroy(){h(this,je).$destroy()}};Mt=new WeakMap;je=new WeakMap;var cc="5";typeof window<"u"&&((gs=window.__svelte??(window.__svelte={})).v??(gs.v=new Set)).add(cc);var Ni=class{constructor(t,n=!0){Fe(this,"anchor"),R(this,ot,new Map),R(this,dt,new Map),R(this,Ae,new Map),R(this,en,new Set),R(this,dr,!0),R(this,pr,r=>{if(h(this,ot).has(r)){var i=h(this,ot).get(r),s=h(this,dt).get(i);if(s)kr(s),h(this,en).delete(i);else{var o=h(this,Ae).get(i);o&&(kr(o.effect),h(this,dt).set(i,o.effect),h(this,Ae).delete(i),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),s=o.effect)}for(let[a,l]of h(this,ot)){if(h(this,ot).delete(a),a===r)break;let c=h(this,Ae).get(l);c&&(Se(c.effect),h(this,Ae).delete(l))}for(let[a,l]of h(this,dt)){if(a===i||h(this,en).has(a))continue;let c=()=>{if(Array.from(h(this,ot).values()).includes(a)){var f=document.createDocumentFragment();cs(l,f),f.append(tt()),h(this,Ae).set(a,{effect:l,fragment:f})}else Se(l);h(this,en).delete(a),h(this,dt).delete(a)};h(this,dr)||!s?(h(this,en).add(a),Zt(l,c,!1)):c()}}}),R(this,hi,r=>{h(this,ot).delete(r);let i=Array.from(h(this,ot).values());for(let[s,o]of h(this,Ae))i.includes(s)||(Se(o.effect),h(this,Ae).delete(s))}),this.anchor=t,x(this,dr,n)}ensure(t,n){var r=U,i=To();if(n&&!h(this,dt).has(t)&&!h(this,Ae).has(t))if(i){var s=document.createDocumentFragment(),o=tt();s.append(o),h(this,Ae).set(t,{effect:Ve(()=>n(o)),fragment:s})}else h(this,dt).set(t,Ve(()=>n(this.anchor)));if(h(this,ot).set(r,t),i){for(let[a,l]of h(this,dt))a===t?r.unskip_effect(l):r.skip_effect(l);for(let[a,l]of h(this,Ae))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(h(this,pr)),r.ondiscard(h(this,hi))}else B&&(this.anchor=W),h(this,pr).call(this,r)}};ot=new WeakMap;dt=new WeakMap;Ae=new WeakMap;en=new WeakMap;dr=new WeakMap;pr=new WeakMap;hi=new WeakMap;function us(e){de===null&&yo(),Pn(()=>{let t=Tn(e);if(typeof t=="function")return t})}function la(e){de===null&&yo(),us(()=>()=>Tn(e))}function Mi(e,t,n=!1){var r;B&&(r=W,Qr());var i=new Ni(e),s=n?vn:0;function o(a,l){if(B){var c=Eo(r);if(a!==parseInt(c.substring(1))){var u=Tr();Re(u),i.anchor=u,_t(!1),i.ensure(a,l),_t(!0);return}}i.ensure(a,l)}as(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function Zr(e,t){return t}function uc(e,t,n){for(var r=[],i=t.length,s,o=t.length,a=0;a<i;a++){let f=t[a];Zt(f,()=>{if(s){if(s.pending.delete(f),s.done.add(f),s.pending.size===0){var p=e.outrogroups;Di(e,jr(s.done)),p.delete(s),p.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var c=n,u=c.parentNode;Do(u),u.append(c),e.items.clear()}Di(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function Di(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let o of e.pending.values())for(let a of o)r.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=yt;let o=document.createDocumentFragment();cs(s,o)}else Se(t[i],n)}}var fr;function $r(e,t,n,r,i,s=null){var o=e,a=new Map;B&&Qr();var l=null,c=Oo(()=>{var v=n();return fo(v)?v:v==null?[]:jr(v)}),u,f=new Map,p=!0;function d(v){(_.effect.f&xe)===0&&(_.pending.delete(v),_.fallback=l,fc(_,u,o,t,r),l!==null&&(u.length===0?(l.f&yt)===0?kr(l):(l.f^=yt,Wn(l,null,o)):Zt(l,()=>{l=null})))}function m(v){_.pending.delete(v)}var E=as(()=>{u=b(c);var v=u.length;let w=!1;if(B){var S=Eo(o)===Ji;S!==(v===0)&&(o=Tr(),Re(o),_t(!1),w=!0)}for(var D=new Set,C=U,V=To(),K=0;K<v;K+=1){B&&W.nodeType===nr&&W.data===Zi&&(o=W,w=!0,_t(!1));var O=u[K],ie=r(O,K),$=p?null:a.get(ie);$?($.v&&bn($.v,O),$.i&&bn($.i,K),V&&C.unskip_effect($.e)):($=hc(a,p?o:fr??(fr=tt()),O,ie,K,i,t,n),p||($.e.f|=yt),a.set(ie,$)),D.add(ie)}if(v===0&&s&&!l&&(p?l=Ve(()=>s(o)):(l=Ve(()=>s(fr??(fr=tt()))),l.f|=yt)),v>D.size&&tl(),B&&v>0&&Re(Tr()),!p)if(f.set(C,D),V){for(let[pe,ge]of a)D.has(pe)||C.skip_effect(ge.e);C.oncommit(d),C.ondiscard(m)}else d(C);w&&_t(!0),b(c)}),_={effect:E,items:a,pending:f,outrogroups:null,fallback:l};p=!1,B&&(o=W)}function Rn(e){for(;e!==null&&(e.f&ze)===0;)e=e.next;return e}function fc(e,t,n,r,i){var s=t.length,o=e.items,a=Rn(e.effect.first),l,c=null,u=[],f=[],p,d,m,E;for(E=0;E<s;E+=1){if(p=t[E],d=i(p,E),m=o.get(d).e,e.outrogroups!==null)for(let O of e.outrogroups)O.pending.delete(m),O.done.delete(m);if((m.f&ve)!==0&&kr(m),(m.f&yt)!==0)if(m.f^=yt,m===a)Wn(m,null,n);else{var _=c?c.next:a;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),St(e,c,m),St(e,m,_),Wn(m,_,n),c=m,u=[],f=[],a=Rn(c.next);continue}if(m!==a){if(l!==void 0&&l.has(m)){if(u.length<f.length){var v=f[0],w;c=v.prev;var S=u[0],D=u[u.length-1];for(w=0;w<u.length;w+=1)Wn(u[w],v,n);for(w=0;w<f.length;w+=1)l.delete(f[w]);St(e,S.prev,D.next),St(e,c,S),St(e,D,v),a=v,c=D,E-=1,u=[],f=[]}else l.delete(m),Wn(m,a,n),St(e,m.prev,m.next),St(e,m,c===null?e.effect.first:c.next),St(e,c,m),c=m;continue}for(u=[],f=[];a!==null&&a!==m;)(l??(l=new Set)).add(a),f.push(a),a=Rn(a.next);if(a===null)continue}(m.f&yt)===0&&u.push(m),c=m,a=Rn(m.next)}if(e.outrogroups!==null){for(let O of e.outrogroups)O.pending.size===0&&(Di(e,jr(O.done)),e.outrogroups?.delete(O));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||l!==void 0){var C=[];if(l!==void 0)for(m of l)(m.f&ve)===0&&C.push(m);for(;a!==null;)(a.f&ve)===0&&a!==e.fallback&&C.push(a),a=Rn(a.next);var V=C.length;if(V>0){var K=null;uc(e,C,K)}}}function hc(e,t,n,r,i,s,o,a){var l=(o&dl)!==0?(o&ml)===0?Go(n,!1,!1):Kt(n):null,c=(o&pl)!==0?Kt(i):null;return{v:l,i:c,e:Ve(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function Wn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&yt)===0?t.nodes.start:n;r!==null;){var o=ct(r);if(s.before(r),r===i)return;r=o}}function St(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var Ts=[...`
|
|
4
|
+
\r\f\xA0\v\uFEFF`];function dc(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||Ts.includes(r[o-1]))&&(a===r.length||Ts.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function pc(e,t){return e==null?null:String(e)}function Ti(e,t,n,r,i,s){var o=e[mi];if(B||o!==n||o===void 0){var a=dc(n,r,s);(!B||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e[mi]=n}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function fn(e,t,n,r){var i=e[vi];if(B||i!==t){var s=pc(t);(!B||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e[vi]=t}return r}var mc=Symbol("is custom element"),vc=Symbol("is html"),gc=ja?"link":"LINK";function yc(e){if(B){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;gt(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;gt(e,"checked",null),e.checked=i}}};e[Hn]=n,Ft(n),ko()}}function gt(e,t,n,r){var i=_c(e);B&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===gc)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ya]=n),n==null?e.removeAttribute(t):typeof n!="string"&&wc(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function _c(e){return e[pi]??(e[pi]={[mc]:e.nodeName.includes("-"),[vc]:e.namespaceURI===bl})}var Cs=new Map;function wc(e){var t=e.getAttribute("is")||e.nodeName,n=Cs.get(t);if(n)return n;Cs.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Xa(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.push(o);i=po(i)}return n}function bc(e,t,n=t){Rl(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),(B&&e.defaultChecked!==e.checked||Tn(t)==null)&&n(e.checked),os(()=>{var r=t();e.checked=!!r})}function ei(e,t){return e===t||e?.[Gn]===t}function yr(e={},t,n,r){var i=de.r,s=A;return Kl(()=>{var o,a;return os(()=>{o=a,a=[],Tn(()=>{ei(n(...a),e)||(t(e,...a),o&&ei(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&di;)l=l.parent;let c=()=>{a&&ei(n(...a),e)&&t(null,...a)},u=l.teardown;l.teardown=()=>{c(),u?.()}}}),e}var Ec={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Sc(e,t,n){return new Proxy({props:e,exclude:t},Ec)}function we(e,t,n,r){var i=!0,s=(n&yl)!==0,o=(n&_l)!==0,a=r,l=!0,c=void 0,u=()=>o&&i?(c??(c=Zn(r)),b(c)):(l&&(l=!1,a=o?Tn(r):r),a);let f;if(s){var p=Gn in e||co in e;f=dn(e,t)?.set??(p&&t in e?D=>e[t]=D:void 0)}var d,m=!1;s?[d,m]=xl(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=u(),f&&(al(),f(d)));var E;if(E=()=>{var D=e[t];return D===void 0?u():(l=!0,D)},(n&gl)===0)return E;if(f){var _=e.$$legacy;return(function(D,C){return arguments.length>0?((!C||_||m)&&f(C?E():D),D):E()})}var v=!1,w=((n&vl)!==0?Zn:Oo)(()=>(v=!1,E()));s&&b(w);var S=A;return(function(D,C){if(arguments.length>0){let V=C?b(w):s?Tt(D):D;return ne(w,V),v=!0,a!==void 0&&(a=V),D}return wt&&v||(S.f&xe)!==0?w.v:b(w)})}var Nc=Object.defineProperty,Mc=(e,t,n)=>t in e?Nc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bt=(e,t,n)=>Mc(e,typeof t!="symbol"?t+"":t,n),q=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(q||{});function ca(e){return e.nodeType===e.ELEMENT_NODE}var Ar=class{constructor(){Bt(this,"idNodeMap",new Map),Bt(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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)),ca(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ua(){return new Ar}function Dc(e){return e.toLowerCase()}function Tc(e,t){return!e||!t||e.type!==t.type?!1:e.type===q.Document?e.compatMode===t.compatMode:e.type===q.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===q.Comment||e.type===q.Text||e.type===q.CDATA?e.textContent===t.textContent:e.type===q.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Cc(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}var xs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function xc(e,t={}){let n=1,r=1;function i(y){let g=y.match(/\n/g);g&&(n+=g.length);let N=y.lastIndexOf(`
|
|
5
|
+
`);r=N===-1?r+y.length:y.length-N}function s(){let y={line:n,column:r};return g=>(g.position=new a(y),E(),g)}let o=class fa{constructor(g){Bt(this,"content"),Bt(this,"start"),Bt(this,"end"),Bt(this,"source"),this.start=g,this.end={line:n,column:r},this.source=t.source,this.content=fa.content}};Bt(o,"content");let a=o;a.content=e;let l=[];function c(y){let g=new Error(`${t.source||""}:${n}:${r}: ${y}`);if(g.reason=y,g.filename=t.source,g.line=n,g.column=r,g.source=e,t.silent)l.push(g);else throw g}function u(){let y=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:l}}}function f(){return m(/^{\s*/)}function p(){return m(/^}/)}function d(){let y,g=[];for(E(),_(g);e.length&&e.charAt(0)!=="}"&&(y=Ge()||it());)y&&(g.push(y),_(g));return g}function m(y){let g=y.exec(e);if(!g)return;let N=g[0];return i(N),e=e.slice(N.length),g}function E(){m(/^\s*/)}function _(y=[]){let g;for(;g=v();)g&&y.push(g),g=v();return y}function v(){let y=s();if(e.charAt(0)!=="/"||e.charAt(1)!=="*")return;let g=2;for(;e.charAt(g)!==""&&(e.charAt(g)!=="*"||e.charAt(g+1)!=="/");)++g;if(g+=2,e.charAt(g-1)==="")return c("End of comment missing");let N=e.slice(2,g-2);return r+=2,i(N),e=e.slice(g),r+=2,y({type:"comment",comment:N})}function w(){let y=m(/^([^{]+)/);if(!y)return;let g=ft(y[0]).replace(/\/\*[\s\S]*?\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,Q=>Q.replace(/,/g,"\u200C")).split(/\s*(?![^(]*\)),\s*/);if(g.length<=1)return g.map(Q=>Q.replace(/\u200C/g,","));let N=0,T=0,z=g.length,I=[];for(;N<z;){let Q=(g[N].match(/\(/g)||[]).length,He=(g[N].match(/\)/g)||[]).length,Ne=Q-He;if(Ne>=1){let k=!1;for(T=N+1;T<z;){let H=(g[T].match(/\(/g)||[]).length,ut=(g[T].match(/\)/g)||[]).length-H;if(ut===Ne){I.push(g.slice(N,T+1).join(",")),N=T+1,k=!0;break}T++,Ne-=ut}if(k)continue;g.slice(N,z).forEach(H=>H&&I.push(H));break}g[N]&&I.push(g[N]),N++}return I.map(Q=>Q.replace(/\u200C/g,","))}function S(){let y=s(),g=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!g)return;let N=ft(g[0]);if(!m(/^:\s*/))return c("property missing ':'");let T=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),z=y({type:"declaration",property:N.replace(xs,""),value:T?ft(T[0]).replace(xs,""):""});return m(/^[;\s]*/),z}function D(){let y=[];if(!f())return c("missing '{'");_(y);let g;for(;g=S();)g!==!1&&(y.push(g),_(y)),g=S();return p()?y:c("missing '}'")}function C(){let y,g=[],N=s();for(;y=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)g.push(y[1]),m(/^,\s*/);if(g.length)return N({type:"keyframe",values:g,declarations:D()})}function V(){let y=s(),g=m(/^@([-\w]+)?keyframes\s*/);if(!g)return;let N=g[1];if(g=m(/^([-\w]+)\s*/),!g)return c("@keyframes missing name");let T=g[1];if(!f())return c("@keyframes missing '{'");let z,I=_();for(;z=C();)I.push(z),I=I.concat(_());return p()?y({type:"keyframes",name:T,vendor:N,keyframes:I}):c("@keyframes missing '}'")}function K(){let y=s(),g=m(/^@supports *([^{]+)/);if(!g)return;let N=ft(g[1]);if(!f())return c("@supports missing '{'");let T=_().concat(d());return p()?y({type:"supports",supports:N,rules:T}):c("@supports missing '}'")}function O(){let y=s();if(!m(/^@host\s*/))return;if(!f())return c("@host missing '{'");let N=_().concat(d());return p()?y({type:"host",rules:N}):c("@host missing '}'")}function ie(){let y=s(),g=m(/^@media *([^{]+)/);if(!g)return;let N=ft(g[1]);if(!f())return c("@media missing '{'");let T=_().concat(d());return p()?y({type:"media",media:N,rules:T}):c("@media missing '}'")}function $(){let y=s(),g=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(g)return y({type:"custom-media",name:ft(g[1]),media:ft(g[2])})}function pe(){let y=s();if(!m(/^@page */))return;let N=w()||[];if(!f())return c("@page missing '{'");let T=_(),z;for(;z=S();)T.push(z),T=T.concat(_());return p()?y({type:"page",selectors:N,declarations:T}):c("@page missing '}'")}function ge(){let y=s(),g=m(/^@([-\w]+)?document *([^{]+)/);if(!g)return;let N=ft(g[1]),T=ft(g[2]);if(!f())return c("@document missing '{'");let z=_().concat(d());return p()?y({type:"document",document:T,vendor:N,rules:z}):c("@document missing '}'")}function ce(){let y=s();if(!m(/^@font-face\s*/))return;if(!f())return c("@font-face missing '{'");let N=_(),T;for(;T=S();)N.push(T),N=N.concat(_());return p()?y({type:"font-face",declarations:N}):c("@font-face missing '}'")}let ke=X("import"),rt=X("charset"),he=X("namespace");function X(y){let g=new RegExp("^@"+y+"\\s*((?:"+[/[^\\]"(?:\\"|[^"])*"/.source,/[^\\]'(?:\\'|[^'])*'/.source,"[^;]"].join("|")+")+);");return()=>{let N=s(),T=m(g);if(!T)return;let z={type:y};return z[y]=T[1].trim(),N(z)}}function Ge(){if(e[0]==="@")return V()||ie()||$()||K()||ke()||rt()||he()||ge()||pe()||O()||ce()}function it(){let y=s(),g=w();return g?(_(),y({type:"rule",selectors:g,declarations:D()})):c("selector missing")}return Ci(u())}function ft(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Ci(e,t){let n=e&&typeof e.type=="string",r=n?e:t;for(let i of Object.keys(e)){let s=e[i];Array.isArray(s)?s.forEach(o=>{Ci(o,r)}):s&&typeof s=="object"&&Ci(s,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Rs={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"};function Rc(e){let t=Rs[e.tagName]?Rs[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function kc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var ha=/([^\\]):hover/,Ac=new RegExp(ha.source,"g");function ks(e,t){let n=t?.stylesWithHoverClass.get(e);if(n)return n;if(e.length>=1e6)return e;let r=xc(e,{silent:!0});if(!r.stylesheet)return e;let i=[];if(r.stylesheet.rules.forEach(a=>{"selectors"in a&&(a.selectors||[]).forEach(l=>{ha.test(l)&&i.push(l)})}),i.length===0)return e;let s=new RegExp(i.filter((a,l)=>i.indexOf(a)===l).sort((a,l)=>l.length-a.length).map(a=>kc(a)).join("|"),"g"),o=e.replace(s,a=>{let l=a.replace(Ac,"$1.\\:hover");return`${a}, ${l}`});return t?.stylesWithHoverClass.set(e,o),o}function As(){return{stylesWithHoverClass:new Map}}function Oc(e,t){let{doc:n,hackCss:r,cache:i}=t;switch(e.type){case q.Document:return n.implementation.createDocument(null,"",null);case q.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case q.Element:{let s=Rc(e),o;if(e.isSVG)o=n.createElementNS("http://www.w3.org/2000/svg",s);else{if(e.isCustom&&n.defaultView?.customElements&&!n.defaultView.customElements.get(e.tagName))try{n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{})}catch(l){console.warn("Cannot define custom element",l)}o=n.createElement(s)}let a={};for(let l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let c=e.attributes[l];if(s==="option"&&l==="selected"&&c===!1||c===null)continue;if(c===!0&&(c=""),l.startsWith("rr_")){a[l]=c;continue}let u=s==="textarea"&&l==="value",f=s==="style"&&l==="_cssText";if(f&&r&&typeof c=="string"&&(c=ks(c,i)),(u||f)&&typeof c=="string"){let p=n.createTextNode(c);for(let d of Array.from(o.childNodes))d.nodeType===o.TEXT_NODE&&o.removeChild(d);o.appendChild(p);continue}try{if(e.isSVG&&l==="xlink:href")o.setAttributeNS("http://www.w3.org/1999/xlink",l,c.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")o.setAttribute("_"+l,c.toString());else if(s==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){o.setAttribute("csp-content",c.toString());continue}else s==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||s==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Cc(e.attributes.href)==="js"||(s==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",e.attributes.srcset):o.setAttribute(l,c.toString()))}catch{}}for(let l in a){let c=a[l];if(s==="canvas"&&l==="rr_dataURL"){let u=n.createElement("img");u.onload=()=>{let f=o.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=c.toString(),o.RRNodeType&&(o.rr_dataURL=c.toString())}else if(s==="img"&&l==="rr_dataURL"){let u=o;u.currentSrc.startsWith("data:")||(u.setAttribute("rrweb-original-src",e.attributes.src),u.src=c.toString())}if(l==="rr_width")o.style.setProperty("width",c.toString());else if(l==="rr_height")o.style.setProperty("height",c.toString());else if(l==="rr_mediaCurrentTime"&&typeof c=="number")o.currentTime=c;else if(l==="rr_mediaState")switch(c){case"played":o.play().catch(u=>console.warn("media playback error",u));break;case"paused":o.pause();break}}if(e.isShadowHost)if(!o.shadowRoot)o.attachShadow({mode:"open"});else for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);return o}case q.Text:return n.createTextNode(e.isStyle&&r?ks(e.textContent,i):e.textContent);case q.CDATA:return n instanceof XMLDocument?n.createCDATASection(e.textContent):null;case q.Comment:return n.createComment(e.textContent);default:return null}}function qn(e,t){let{doc:n,mirror:r,skipChild:i=!1,hackCss:s=!0,afterAppend:o,cache:a}=t;if(r.has(e.id)){let c=r.getNode(e.id),u=r.getMeta(c);if(Tc(u,e))return r.getNode(e.id)}let l=Oc(e,{doc:n,hackCss:s,cache:a});if(!l)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===q.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==q.DocumentType&&(e.childNodes[0].type===q.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" "">')),l=n),r.add(l,e),(e.type===q.Document||e.type===q.Element)&&!i)for(let c of e.childNodes){let u=qn(c,{doc:n,mirror:r,skipChild:!1,hackCss:s,afterAppend:o,cache:a});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&ca(l)&&l.shadowRoot)l.shadowRoot.appendChild(u);else if(e.type===q.Document&&c.type==q.Element){let f=u,p=null;f.childNodes.forEach(d=>{d.nodeName==="BODY"&&(p=d)}),p?(f.removeChild(p),l.appendChild(u),f.appendChild(p)):l.appendChild(u)}else l.appendChild(u);o&&o(u,c.id)}return l}function Ic(e,t){function n(r){t(r)}for(let r of e.getIds())e.has(r)&&n(e.getNode(r))}function Fc(e,t){let n=t.getMeta(e);if(n?.type!==q.Element)return;let r=e;for(let i in n.attributes){if(!(Object.prototype.hasOwnProperty.call(n.attributes,i)&&i.startsWith("rr_")))continue;let s=n.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=s),i==="rr_scrollTop"&&(r.scrollTop=s)}}function Lc(e,t){let{doc:n,onVisit:r,hackCss:i=!0,afterAppend:s,cache:o,mirror:a=new Ar}=t,l=qn(e,{doc:n,mirror:a,skipChild:!1,hackCss:i,afterAppend:s,cache:o});return Ic(a,c=>{r&&r(c),Fc(c,a)}),l}var nn=`Please stop import mirror directly. Instead of that,\r
|
|
6
6
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
7
|
-
or you can use record.mirror to access the mirror instance during recording.`,_s={map:{},getId(){return console.error(nn),-1},getNode(){return console.error(nn),null},removeNodeFromMap(){console.error(nn)},has(){return console.error(nn),!1},reset(){console.error(nn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(_s=new Proxy(_s,{get(e,t,n){return t==="map"&&console.error(nn),Reflect.get(e,t,n)}}));Date.now().toString();function Ec(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),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 Sc(e){let t={},n=(i,s)=>{let o={value:i,parent:s,children:[]};return t[i.node.id]=o,o},r=[];for(let i of e){let{nextId:s,parentId:o}=i;if(s&&s in t){let a=t[s];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,n(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,n(i,null))}continue}if(o in t){let a=t[o];a.children.push(n(i,a));continue}r.push(n(i,null))}return r}function Jo(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)Jo(e.children[n],t)}function Yr(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zo(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=Zo(n,t),s=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:s,absoluteScale:i.absoluteScale*s}}function ir(e){return!!e?.shadowRoot}function Ln(e,t){let n=e[t[0]];return t.length===1?n:Ln(n.cssRules[t[1]].cssRules,t.slice(2))}function ws(e){let t=[...e],n=t.pop();return{positions:t,index:n}}function Nc(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}var vi=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-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++}},bs={};function Qi(e){let t=bs[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return bs[e]=r.bind(window)}function Hr(...e){return Qi("requestAnimationFrame")(...e)}function en(...e){return Qi("setTimeout")(...e)}function Mc(...e){return Qi("clearTimeout")(...e)}var J=(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))(J||{}),z=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(z||{}),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||{}),Sr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Sr||{}),fr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(fr||{}),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||{}),Es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(xn=0;xn<Es.length;xn++)Wn[Es.charCodeAt(xn)]=xn;var xn,Dc=function(e){var t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)s=Wn[e.charCodeAt(r)],o=Wn[e.charCodeAt(r+1)],a=Wn[e.charCodeAt(r+2)],l=Wn[e.charCodeAt(r+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},Tc=Object.defineProperty,Cc=(e,t,n)=>t in e?Tc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>Cc(e,typeof t!="symbol"?t+"":t,n),xc=Object.defineProperty,Rc=(e,t,n)=>t in e?xc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ss=(e,t,n)=>Rc(e,typeof t!="symbol"?t+"":t,n),P=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(P||{}),kc=class{constructor(){Ss(this,"idNodeMap",new Map),Ss(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ac(){return new kc}function Oc(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(n).forEach(function(s){if(s){let o=s.split(r);o.length>1&&(t[gi(o[0].trim())]=o[1].trim())}}),t}function Ns(e){let t=[];for(let n in e){let r=e[n];if(typeof r!="string")continue;let i=Lc(n);t.push(`${i}: ${r};`)}return t.join(" ")}var Ic=/-([a-z])/g,Fc=/^--[a-zA-Z0-9-]+$/,gi=e=>Fc.test(e)?e:e.replace(Ic,(t,n)=>n?n.toUpperCase():""),Pc=/\B([A-Z])/g,Lc=e=>e.replace(Pc,"-$1").toLowerCase(),Ft=class e{constructor(...t){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(this,"RRNodeType")}get childNodes(){let t=[],n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},yi=class e extends Ft{constructor(...t){super(t),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",P.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HTML")||null}get body(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="BODY")||null}get head(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HEAD")||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let n=t.RRNodeType;if((n===P.Element||n===P.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${n===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=Ji(this,t);return r.parentElement=null,r}insertBefore(t,n){let r=t.RRNodeType;if((r===P.Element||r===P.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=$o(this,t,n);return i.parentElement=null,i}removeChild(t){return ea(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let n;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?n="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(n="-//W3C//DTD HTML 4.0 Transitional//EN"),n){let r=this.createDocumentType("html",n,"");this.open(),this.appendChild(r)}}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new Nr(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=new Kn(t);return n.ownerDocument=this,n}createElementNS(t,n){return this.createElement(n)}createTextNode(t){let n=new Mr(t);return n.ownerDocument=this,n}createComment(t){let n=new Dr(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new Tr(t);return n.ownerDocument=this,n}toString(){return"RRDocument"}},Nr=class extends Ft{constructor(t,n,r){super(),M(this,"nodeType",10),M(this,"RRNodeType",P.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}},Kn=class extends Ft{constructor(t){super(),M(this,"nodeType",1),M(this,"RRNodeType",P.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new wi(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let t=this.attributes.style?Oc(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,i,s)=>{if(n.test(r))return;let o=gi(r);i?t[o]=i:delete t[o],s==="important"&&(t[o]+=" !important"),this.attributes.style=Ns(t)},t.removeProperty=r=>{if(n.test(r))return"";let i=gi(r),s=t[i]||"";return delete t[i],this.attributes.style=Ns(t),s},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Ji(this,t)}insertBefore(t,n){return $o(this,t,n)}removeChild(t){return ea(this,t)}attachShadow(t){let n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(let n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}},_i=class extends Kn{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},Mr=class extends Ft{constructor(t){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",P.Text),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Dr=class extends Ft{constructor(t){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",P.Comment),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Tr=class extends Ft{constructor(t){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",P.CDATA),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},wi=class{constructor(t,n){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...r)=>{for(let i of r){let s=String(i);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))}),M(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){let r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}};function Ji(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function $o(e,t,n){if(!n)return Ji(e,t);if(n.parentNode!==e)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 t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function ea(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var De=(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",e))(De||{});function ge(e){try{return e.contentDocument}catch{}}function Wc(e){try{return e.contentWindow}catch{}}var bi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Uc={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"},zt=null;function Cr(e,t,n,r=t.mirror||t.ownerDocument.mirror){e=Bc(e,t,n,r),ta(e,t,n,r),Vc(e,t,n)}function Bc(e,t,n,r){if(n.afterAppend&&!zt&&(zt=new WeakSet,setTimeout(()=>{zt=null},0)),!Zi(e,t)){let i=xr(t,n.mirror,r);e.parentNode?.replaceChild(i,e),e=i}switch(t.RRNodeType){case P.Document:{if(!rn(e,t,n.mirror,r)){let i=r.getMeta(t);i&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,i),zt?.add(e))}break}case P.Element:{let i=e,s=t;switch(s.tagName){case"IFRAME":{let o=ge(e);if(!o)break;Cr(o,t.contentDocument,n,r);break}}s.shadowRoot&&(i.shadowRoot||i.attachShadow({mode:"open"}),ta(i.shadowRoot,s.shadowRoot,n,r)),zc(i,s,r);break}}return e}function Vc(e,t,n){switch(t.RRNodeType){case P.Document:{let r=t.scrollData;r&&n.applyScroll(r,!0);break}case P.Element:{let r=e,i=t;switch(i.scrollData&&n.applyScroll(i.scrollData,!0),i.inputData&&n.applyInput(i.inputData),i.tagName){case"AUDIO":case"VIDEO":{let s=e,o=i;if(o.paused!==void 0){let a=o.paused?s.pause():s.play();typeof a?.catch=="function"&&a.catch(l=>{console.warn(l)})}o.muted!==void 0&&(s.muted=o.muted),o.volume!==void 0&&(s.volume=o.volume),o.currentTime!==void 0&&(s.currentTime=o.currentTime),o.playbackRate!==void 0&&(s.playbackRate=o.playbackRate);break}case"CANVAS":{let s=t;if(s.rr_dataURL!==null){let o=document.createElement("img");o.onload=()=>{let a=r.getContext("2d");a&&a.drawImage(o,0,0,o.width,o.height)},o.src=s.rr_dataURL}s.canvasMutations.forEach(o=>n.applyCanvas(o.event,o.mutation,e));break}case"STYLE":{let s=r.sheet;s&&t.rules.forEach(o=>n.applyStyleSheetMutation(o,s));break}}break}case P.Text:case P.Comment:case P.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}zt?.has(e)&&(zt.delete(e),n.afterAppend?.(e,n.mirror.getId(e)))}function zc(e,t,n){let r=e.attributes,i=t.attributes;for(let s in i){let o=i[s];if(n.getMeta(t)?.isSVG&&bi[s])e.setAttributeNS(bi[s],s,o);else if(t.tagName==="CANVAS"&&s==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let c=e.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(t.tagName==="IFRAME"&&s==="srcdoc")continue;try{e.setAttribute(s,o)}catch(l){console.warn(l)}}}for(let{name:s}of Array.from(r))s in i||e.removeAttribute(s);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function ta(e,t,n,r){let i=Array.from(e.childNodes),s=t.childNodes;if(i.length===0&&s.length===0)return;let o=0,a=i.length-1,l=0,c=s.length-1,u=i[o],f=i[a],h=s[l],d=s[c],m,E;for(;o<=a&&l<=c;)if(u===void 0)u=i[++o];else if(f===void 0)f=i[--a];else if(rn(u,h,n.mirror,r))u=i[++o],h=s[++l];else if(rn(f,d,n.mirror,r))f=i[--a],d=s[--c];else if(rn(u,d,n.mirror,r)){try{Rn(e,u,f.nextSibling)}catch(w){console.warn(w)}u=i[++o],d=s[--c]}else if(rn(f,h,n.mirror,r)){try{Rn(e,f,u)}catch(w){console.warn(w)}f=i[--a],h=s[++l]}else{if(!m){m={};for(let S=o;S<=a;S++){let T=i[S];T&&n.mirror.hasNode(T)&&(m[n.mirror.getId(T)]=S)}}E=m[r.getId(h)];let w=i[E];if(E!==void 0&&w&&rn(w,h,n.mirror,r)){try{Rn(e,w,u)}catch(S){console.warn(S)}i[E]=void 0}else{let S=xr(h,n.mirror,r);e.nodeName==="#document"&&u&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(e.removeChild(u),n.mirror.removeNodeFromMap(u),u=i[++o]);try{Rn(e,S,u||null)}catch(T){console.warn(T)}}h=s[++l]}if(o>a){let w=s[c+1],S=null;for(w&&(S=n.mirror.getNode(r.getId(w)));l<=c;++l){let T=xr(s[l],n.mirror,r);try{Rn(e,T,S)}catch(C){console.warn(C)}}}else if(l>c)for(;o<=a;o++){let w=i[o];if(!(!w||w.parentNode!==e))try{e.removeChild(w),n.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let y=e.firstChild,v=t.firstChild;for(;y!==null&&v!==null;)Cr(y,v,n,r),y=y.nextSibling,v=v.nextSibling}function xr(e,t,n){let r=n.getId(e),i=n.getMeta(e),s=null;if(r>-1&&(s=t.getNode(r)),s!==null&&Zi(s,e))return s;switch(e.RRNodeType){case P.Document:s=new Document;break;case P.DocumentType:s=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case P.Element:{let o=e.tagName.toLowerCase();o=Uc[o]||o,i&&"isSVG"in i&&i?.isSVG?s=document.createElementNS(bi.svg,o):s=document.createElement(e.tagName);break}case P.Text:s=document.createTextNode(e.data);break;case P.Comment:s=document.createComment(e.data);break;case P.CDATA:s=document.createCDATASection(e.data);break}i&&t.add(s,{...i});try{zt?.add(s)}catch{}return s}function Zi(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function rn(e,t,n,r){let i=n.getId(e),s=r.getId(t);return i===-1||i!==s?!1:Zi(e,t)}function Gc(e){let t=e.sheet?.cssRules;if(!t||!t.length)return;let n=new CSSStyleSheet;n.replaceSync(e.innerText);let r={};for(let s=0;s<n.cssRules.length;s++)r[n.cssRules[s].cssText]=n.cssRules[s];let i=[];for(let s=0;s<t?.length;s++){let o=t[s].cssText;r[o]||i.push({index:s,cssRuleText:o})}return i}function Rn(e,t,n){let r;t.nodeName==="STYLE"&&(r=Gc(t)),e.insertBefore(t,n),r&&r.length&&r.forEach(({cssRuleText:i,index:s})=>{t.sheet?.insertRule(i,s)})}var wn=class e extends yi{constructor(t){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",Qc()),M(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new Yc(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=t.toUpperCase(),r;switch(n){case"AUDIO":case"VIDEO":r=new Ei(n);break;case"IFRAME":r=new Mi(n,this.mirror);break;case"CANVAS":r=new Si(n);break;case"STYLE":r=new Ni(n);break;default:r=new bn(n);break}return r.ownerDocument=this,r}createComment(t){let n=new jc(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new qc(t);return n.ownerDocument=this,n}createTextNode(t){let n=new Hc(t);return n.ownerDocument=this,n}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Yc=Nr,bn=class extends Kn{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}},Ei=class extends _i{},Si=class extends bn{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}},Ni=class extends bn{constructor(){super(...arguments),M(this,"rules",[])}},Mi=class extends bn{constructor(t,n){super(t),M(this,"contentDocument",new wn),this.contentDocument.mirror=n}},Hc=Mr,jc=Dr,qc=Tr;function Xc(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function na(e,t,n,r){let i;switch(e.nodeType){case De.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case De.DOCUMENT_TYPE_NODE:{let o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case De.ELEMENT_NODE:{let o=e,a=Xc(o);i=t.createElement(a);let l=i;for(let{name:c,value:u}of Array.from(o.attributes))l.attributes[c]=u;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case De.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case De.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case De.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case De.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let s=n.getMeta(e);return t instanceof wn&&(s||(s=ra(i,t.unserializedId),n.add(e,s)),t.mirror.add(i,{...s})),i}function Kc(e,t=Ac(),n=new wn){function r(i,s){let o=na(i,n,t,s);if(o!==null)if(s?.nodeName!=="IFRAME"&&i.nodeType!==De.DOCUMENT_FRAGMENT_NODE&&(s?.appendChild(o),o.parentNode=s,o.parentElement=s),i.nodeName==="IFRAME"){let a=ge(i);a&&r(a,o)}else(i.nodeType===De.DOCUMENT_NODE||i.nodeType===De.ELEMENT_NODE||i.nodeType===De.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===De.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(e,null),n}function Qc(){return new Di}var Di=class{constructor(){M(this,"idNodeMap",new Map),M(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ra(e,t){switch(e.RRNodeType){case P.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case P.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case P.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case P.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Xo();function ia(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(i){i(n)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,n)})}}}var Jc=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"}));function Zc(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(v){let w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(v)}let a=o(e.navigator.userAgent)?1:0;function l(v,w){this.scrollLeft=v,this.scrollTop=w}function c(v){return .5*(1-Math.cos(Math.PI*v))}function u(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(v,w){if(w==="Y")return v.clientHeight+a<v.scrollHeight;if(w==="X")return v.clientWidth+a<v.scrollWidth}function h(v,w){let S=e.getComputedStyle(v,null)["overflow"+w];return S==="auto"||S==="scroll"}function d(v){let w=f(v,"Y")&&h(v,"Y"),S=f(v,"X")&&h(v,"X");return w||S}function m(v){for(;v!==t.body&&d(v)===!1;)v=v.parentNode||v.host;return v}function E(v){let w=s(),S,T,C,G=(w-v.startTime)/r;G=G>1?1:G,S=c(G),T=v.startX+(v.x-v.startX)*S,C=v.startY+(v.y-v.startY)*S,v.method.call(v.scrollable,T,C),(T!==v.x||C!==v.y)&&e.requestAnimationFrame(E.bind(e,v))}function y(v,w,S){let T,C,G,X,A=s();v===t.body?(T=e,C=e.scrollX||e.pageXOffset,G=e.scrollY||e.pageYOffset,X=i.scroll):(T=v,C=v.scrollLeft,G=v.scrollTop,X=l),E({scrollable:T,method:X,startTime:A,startX:C,startY:G,x:w,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.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}y.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(u(arguments[0])){i.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}y.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(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.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 v=arguments[0].left,w=arguments[0].top;y.call(this,this,typeof v>"u"?this.scrollLeft:~~v,typeof w>"u"?this.scrollTop:~~w)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.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(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let v=m(this),w=v.getBoundingClientRect(),S=this.getBoundingClientRect();v!==t.body?(y.call(this,v,v.scrollLeft+S.left-w.left,v.scrollTop+S.top-w.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}var Ti=class{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}addAction(t){let n=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{let r=this.findActionIndex(t);this.actions.splice(r,0,t)}n&&(this.raf=Hr(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=Hr(this.rafCheck.bind(this))}rafCheck(){let t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){let n=this.actions[0];if(this.timeOffset>=n.delay)this.actions.shift(),n.doAction();else break}this.actions.length>0?this.raf=Hr(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);if(this.actions[i].delay<t.delay)n=i+1;else if(this.actions[i].delay>t.delay)r=i-1;else return i+1}return n}};function Ms(e,t){if(e.type===J.IncrementalSnapshot&&e.data.source===z.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}function Ds(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}var cn;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(cn||(cn={}));var sa={type:"xstate.init"};function jr(e){return e===void 0?[]:[].concat(e)}function sn(e){return{type:"xstate.assign",assignment:e}}function Ts(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 Rr(e){return function(t){return e===t}}function oa(e){return typeof e=="string"?{type:e}:e}function Cs(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Rr(e)}}function xs(e,t,n){var r=t,i=!1;return[e.filter((function(s){if(s.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof s.assignment=="function"?o=s.assignment(r,n):Object.keys(s.assignment).forEach((function(a){o[a]=typeof s.assignment[a]=="function"?s.assignment[a](r,n):s.assignment[a]})),r=o,!1}return!0})),r,i]}function aa(e,t){t===void 0&&(t={});var n=Ds(xs(jr(e.states[e.initial].entry).map((function(o){return Ts(o,t.actions)})),e.context,sa),2),r=n[0],i=n[1],s={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Rr(e.initial)},transition:function(o,a){var l,c,u=typeof o=="string"?{value:o,context:e.context}:o,f=u.value,h=u.context,d=oa(a),m=e.states[f];if(m.on){var E=jr(m.on[d.type]);try{for(var y=(function(q){var Ve=typeof Symbol=="function"&&Symbol.iterator,Ze=Ve&&q[Ve],_=0;if(Ze)return Ze.call(q);if(q&&typeof q.length=="number")return{next:function(){return q&&_>=q.length&&(q=void 0),{value:q&&q[_++],done:!q}}};throw new TypeError(Ve?"Object is not iterable.":"Symbol.iterator is not defined.")})(E),v=y.next();!v.done;v=y.next()){var w=v.value;if(w===void 0)return Cs(f,h);var S=typeof w=="string"?{target:w}:w,T=S.target,C=S.actions,G=C===void 0?[]:C,X=S.cond,A=X===void 0?function(){return!0}:X,ne=T===void 0,Z=T??f,fe=e.states[Z];if(A(h,d)){var me=Ds(xs((ne?jr(G):[].concat(m.exit,G,fe.entry).filter((function(q){return q}))).map((function(q){return Ts(q,s._options.actions)})),h,d),3),se=me[0],xe=me[1],Je=me[2],ce=T??f;return{value:ce,context:xe,actions:se,changed:T!==f||se.length>0||Je,matches:Rr(ce)}}}}catch(q){l={error:q}}finally{try{v&&!v.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}}return Cs(f,h)}};return s}var Rs=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function la(e){var t=e.initialState,n=cn.NotStarted,r=new Set,i={_machine:e,send:function(s){n===cn.Running&&(t=e.transition(t,s),Rs(t,oa(s)),r.forEach((function(o){return o(t)})))},subscribe:function(s){return r.add(s),s(t),{unsubscribe:function(){return r.delete(s)}}},start:function(s){if(s){var o=typeof s=="object"?s:{context:e.config.context,value:s};t={value:o.value,actions:[],context:o.context,matches:Rr(o.value)}}return n=cn.Running,Rs(t,sa),i},stop:function(){return n=cn.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function $c(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===J.Meta&&r.timestamp<=t)return e.slice(n)}return e}function eu(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){let i=aa({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:sn({lastPlayedEvent:(s,o)=>o.type==="CAST_EVENT"?o.payload.event:s.lastPlayedEvent}),recordTimeOffset:sn((s,o)=>{let a=s.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...s,timeOffset:a,baselineTime:s.events[0].timestamp+a}}),play(s){let{timer:o,events:a,baselineTime:l,lastPlayedEvent:c}=s;o.clear();for(let d of a)Ms(d,l);let u=$c(a,l),f=c?.timestamp;c?.type===J.IncrementalSnapshot&&c.data.source===z.MouseMove&&(f=c.timestamp+c.data.positions[0]?.timeOffset),l<(f||0)&&r.emit(Y.PlayBack);let h=new Array;for(let d of u)if(!(f&&f<l&&(d.timestamp<=f||d===c)))if(d.timestamp<l)h.push(d);else{let m=t(d,!1);o.addAction({doAction:()=>{m()},delay:d.delay})}n(h),r.emit(Y.Flush),o.start()},pause(s){s.timer.clear()},resetLastPlayedEvent:sn(s=>({...s,lastPlayedEvent:null})),startLive:sn({baselineTime:(s,o)=>(s.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:sn((s,o)=>{let{baselineTime:a,timer:l,events:c}=s;if(o.type==="ADD_EVENT"){let{event:u}=o.payload;Ms(u,a);let f=c.length-1;if(!c[f]||c[f].timestamp<=u.timestamp)c.push(u);else{let m=-1,E=0;for(;E<=f;){let y=Math.floor((E+f)/2);c[y].timestamp<=u.timestamp?E=y+1:f=y-1}m===-1&&(m=E),c.splice(m,0,u)}let h=u.timestamp<a,d=t(u,h);h?d():l.isActive()&&l.addAction({doAction:()=>{d()},delay:u.delay})}return{...s,events:c}})}});return la(i)}function tu(e){let t=aa({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:sn({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return la(t)}var nu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],ks=new Map;function ca(e,t){let n=ks.get(e);return n||(n=new Map,ks.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Ct(e,t,n){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await Ct(e,t,n)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(n||t===null)return r;let{rr_type:i,index:s}=r;return ca(t,i)[s]}else if("args"in r){let{rr_type:i,args:s}=r,o=window[i];return new o(...await Promise.all(s.map(Ct(e,t,n))))}else{if("base64"in r)return Dc(r.base64);if("src"in r){let i=e.get(r.src);if(i)return i;{let s=new Image;return s.src=r.src,e.set(r.src,s),s}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(Ct(e,t,n)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ct(e,t,n)));return r}}function ru(e,t){try{return t===Sr.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}var iu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function su(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!iu.includes(n))return;let r=ca(e,n);r.includes(t)||r.push(t)}async function ou({mutation:e,target:t,type:n,imageMap:r,errorHandler:i}){try{let s=ru(t,n);if(!s)return;if(e.setter){s[e.property]=e.args[0];return}let o=s[e.property],a=await Promise.all(e.args.map(Ct(r,s))),l=o.apply(s,a);su(s,l);let c=!1}catch(s){i(e,s)}}async function au({event:e,mutations:t,target:n,imageMap:r,errorHandler:i}){let s=n.getContext("2d");if(!s){i(t[0],new Error("Canvas context is null"));return}let o=t.map(async l=>Promise.all(l.args.map(Ct(r,s))));(await Promise.all(o)).forEach((l,c)=>{let u=t[c];try{if(u.setter){s[u.property]=u.args[0];return}let f=s[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(r.get(e),f.apply(s,u.args)):f.apply(s,l)}catch(f){i(u,f)}})}async function As({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:i,errorHandler:s}){try{let o=i.get(e)||t,a="commands"in o?o.commands:[o];if([Sr.WebGL,Sr.WebGL2].includes(t.type)){for(let l=0;l<a.length;l++){let c=a[l];await ou({mutation:c,type:t.type,target:n,imageMap:r,errorHandler:s})}return}await au({event:e,mutations:a,target:n,imageMap:r,errorHandler:s})}catch(o){s(t,o)}}var Os=5*1e3,lu=ia||Jc,Is="[replayer]";function cu(e,t){let n=-1;if(e.length===0)return n;let r=0,i=e.length-1;for(;r<=i;){let s=Math.floor((r+i)/2);e[s].timestamp<=t?(n=s,r=s+1):i=s-1}return n}var qr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function uu(e){return e.type==J.IncrementalSnapshot&&(e.data.source==z.TouchMove||e.data.source==z.MouseInteraction&&e.data.type==re.TouchStart)}function Fs(e){return"pointerId"in e&&typeof e.pointerId=="number"?e.pointerId:-1}var Ci=class{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new wn,this.emitter=lu(),this.legacy_missingNodeRetryMap={},this.cache=ys(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=Xo(),this.styleMirror=new vi,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.pointers={},this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=a=>{this.iframe.style.display="inherit";for(let l of[...Object.values(this.pointers).flatMap(c=>c.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 J.DomContentLoaded:case J.Load:case J.Custom:continue;case J.FullSnapshot:case J.Meta:case J.Plugin:case J.IncrementalSnapshot:break}this.getCastFn(l,!0)()}},this.getCastFn=(a,l=!1)=>{let c;switch(a.type){case J.DomContentLoaded:case J.Load:break;case J.Custom:c=()=>{this.emitter.emit(Y.CustomEvent,a)};break;case J.Meta:c=()=>this.emitter.emit(Y.Resize,{width:a.data.width,height:a.data.height});break;case J.FullSnapshot:c=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(a,l),this.iframe.contentWindow?.scrollTo(a.data.initialOffset),this.styleMirror.reset()};break;case J.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let f of this.service.state.context.events)if(!(f.timestamp<=a.timestamp)&&this.isUserInteraction(f)){f.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){let f=this.nextUserInteractionEvent.delay-a.delay,h={speed:Math.min(Math.round(f/Os),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(Y.SkipStart,h)}}};break}return()=>{c&&c();for(let h of this.config.plugins||[])h.handler&&h.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let f=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[f]){let h=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Y.Finish))},d=50;a.type===J.IncrementalSnapshot&&a.data.source===z.MouseMove&&a.data.positions.length&&(d+=Math.max(0,-a.data.positions[0].timeOffset)),en(h,d)}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,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:qr,useVirtualDom:!0,logger:console};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:(c,u,f)=>{As({event:c,mutation:u,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,u)=>{c.source===z.StyleSheetRule?this.applyStyleSheetRule(c,u):c.source===z.StyleDeclaration&&this.applyStyleDeclaration(c,u)},afterAppend:(c,u)=>{for(let f of this.config.plugins||[])f.onBuild&&f.onBuild(c,{id:u,replayer:this})}},l=ge(this.iframe);if(l)try{Cr(l,this.virtualDom,a,this.virtualDom.mirror)}catch(c){console.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let c in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[c],f=xr(u.node,this.mirror,this.virtualDom.mirror);Cr(f,u.node,a,this.virtualDom.mirror),u.node=f}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}for(let[a,{pointerPosition:l,touchActive:c}]of Object.entries(this.pointers)){let u=parseInt(a),f=this.pointers[u];l&&(this.moveAndHover(l.x,l.y,l.id,!0,l.debugData,u),f.pointerPosition=null),c===!0?f.pointerEl.classList.add("touch-active"):c===!1&&f.pointerEl.classList.remove("touch-active"),f.touchActive=null}if(this.lastMouseDownEvent){let[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=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 i=new Ti([],{speed:this.config.speed});this.service=eu({events:t.map(a=>n&&n.unpackFn?n.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,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=tu({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(Y.StateChange,{speed:a})});let s=this.service.state.context.events.find(a=>a.type===J.Meta),o=this.service.state.context.events.find(a=>a.type===J.FullSnapshot);if(s){let{width:a,height:l}=s.data;en(()=>{this.emitter.emit(Y.Resize,{width:a,height:l})},0)}o&&en(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),this.iframe.contentWindow?.scrollTo(o.data.initialOffset))},1)}get timer(){return this.service.state.context.timer}createPointer(t,n){let r=document.createElement("canvas");r.classList.add("replayer-mouse-tail"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),this.wrapper.insertBefore(r,this.iframe),r.style.display=this.config.mouseTail===!1?"none":"inherit";let i=document.createElement("div");i.classList.add("replayer-mouse"),this.pointers[t]={touchActive:null,pointerEl:i,tailPositions:[],pointerPosition:null,mouseTail:r},uu(n)&&i.classList.add("touch-device"),this.wrapper.appendChild(i)}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){let n=this.config.skipInactive;if(Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive?n===!1&&this.config.skipInactive===!0&&this.reevaluateFastForward():this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u")if(t.mouseTail===!1)for(let{mouseTail:r}of Object.values(this.pointers))r&&(r.style.display="none");else for(let{mouseTail:r}of Object.values(this.pointers))r||(r=document.createElement("canvas"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),r.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(r,this.iframe)),r.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){this.config.skipInactive&&this.speedService.state.matches("skipping")&&this.backToNormal(),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}})),ge(this.iframe)?.getElementsByTagName("html")[0]?.classList.remove("rrweb-paused"),this.emitter.emit(Y.Start),this.config.skipInactive&&this.reevaluateFastForward()}pause(t){t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),ge(this.iframe)?.getElementsByTagName("html")[0]?.classList.add("rrweb-paused"),this.emitter.emit(Y.Pause)}resume(t=0){this.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;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=ys()}reevaluateFastForward(){if(!this.config.skipInactive)return;this.nextUserInteractionEvent=null;let t=this.service.state.context.events,n=t[0];if(!n)return;let r=n.timestamp+this.getCurrentTime(),i=cu(t,r);if(i===-1)return;let s=t[i],o=this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed;for(let a=i+1;a<t.length;a++){let l=t[a];if(this.isUserInteraction(l)){let c=l.timestamp-s.timestamp;if(c>o){this.nextUserInteractionEvent=l;let u={speed:Math.min(Math.round(c/Os),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(Y.SkipStart,u)}break}}}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),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);let n=ge(this.iframe),r=Wc(this.iframe);r&&n&&(Zc(r,n),Ec(r))}rebuildFullSnapshot(t,n=!1){let r=ge(this.iframe);if(!r)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let i=[],s=(l,c)=>{this.collectIframeAndAttachDocument(i,l);for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),bc(t.data.node,{doc:r,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(r,t.data.node.id);for(let{mutationInQueue:l,builtNode:c}of i)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);let{documentElement:o,head:a}=r;if(this.insertStyleRules(o,a),!this.service.state.matches("playing")){let l=r.getElementsByTagName("html")[0];l&&l.classList.add("rrweb-paused")}this.emitter.emit(Y.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){let r=nu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.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,ra(i,this.virtualDom.unserializedId)),t.insertBefore(i,n),i.rules.push({source:z.StyleSheetRule,adds:r.map((s,o)=>({rule:s,index:o}))})}else{let i=document.createElement("style");t.insertBefore(i,n);for(let s=0;s<r.length;s++)i.sheet?.insertRule(r[s],s)}}attachDocumentToIframe(t,n){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=ge(n),s=[],o=(a,l)=>{this.collectIframeAndAttachDocument(s,a);let c=r.getMeta(a);if(c?.type===j.Element&&c?.tagName.toUpperCase()==="HTML"&&i){let{documentElement:u,head:f}=i;this.insertStyleRules(u,f)}if(!this.usingVirtualDom)for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:l,replayer:this})};Yn(t.node,{doc:i,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(i,t.node.id);for(let{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a)}collectIframeAndAttachDocument(t,n){if(Yr(n,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){let n=ge(this.iframe)?.head;if(n){let r=new Set,i,s=this.service.state,o=()=>{s=this.service.state};this.emitter.on(Y.Start,o),this.emitter.on(Y.Pause,o);let a=()=>{this.emitter.off(Y.Start,o),this.emitter.off(Y.Pause,o)};n.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(s.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Y.LoadStylesheetEnd),i&&Mc(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Y.LoadStylesheetStart),i=en(()=>{s.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let t=[];for(let n of this.service.state.context.events)n.type===J.IncrementalSnapshot&&n.data.source===z.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach(i=>{this.preloadImages(i,n)}));return Promise.all(t)}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){let r=document.createElement("canvas"),i=r.getContext("2d"),s=i?.createImageData(r.width,r.height);i?.putImageData(s,0,0)}}async deserializeAndPreloadCanvasEvents(t,n){if(!this.canvasEventMap.has(n)){let r={isUnchanged:!0};if("commands"in t){let i=await Promise.all(t.commands.map(async s=>{let o=await Promise.all(s.args.map(Ct(this.imageMap,null,r)));return{...s,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,commands:i})}else{let i=await Promise.all(t.args.map(Ct(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,args:i})}}}applyIncremental(t,n){let{data:r}=t;switch(r.source){case z.Mutation:{try{this.applyMutation(r,n)}catch(i){this.warn(`Exception in mutation ${i.message||i}`,r)}break}case z.Drag:case z.TouchMove:case z.MouseMove:{let i=Fs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(n){let o=r.positions[r.positions.length-1];s.pointerPosition={x:o.x,y:o.y,id:o.id,debugData:r}}else r.positions.forEach(o=>{let a={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,n,r,i)},delay:o.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:t.delay-r.positions[0]?.timeOffset});break}case z.MouseInteraction:{let i=Fs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(r.id===-1)break;let o=new Event(fc(re[r.type])),a=this.mirror.getNode(r.id);if(!a)return this.debugNodeNotFound(r,r.id);this.emitter.emit(Y.MouseInteraction,{type:r.type,target:a});let{triggerFocus:l}=this.config;switch(r.type){case re.Blur:"blur"in a&&a.blur();break;case re.Focus:l&&a.focus&&a.focus({preventScroll:!0});break;case re.Click:case re.TouchStart:case re.TouchEnd:case re.MouseDown:case re.MouseUp:n?(r.type===re.TouchStart?(s.touchActive=!0,Object.values(this.pointers).forEach(c=>{c!==s&&!c.touchActive&&(c.touchActive=!1)})):r.type===re.TouchEnd&&(s.touchActive=!1,s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]),r.type===re.MouseDown?this.lastMouseDownEvent=[a,o]:r.type===re.MouseUp&&(this.lastMouseDownEvent=null),s.pointerPosition={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===re.TouchStart&&(s.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,n,r,i),r.type===re.Click?(s.pointerEl.classList.remove("active"),s.pointerEl.offsetWidth,s.pointerEl.classList.add("active")):r.type===re.TouchStart?(s.pointerEl.offsetWidth,s.pointerEl.classList.add("touch-active")):r.type===re.TouchEnd?(s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]):a.dispatchEvent(o));break;case re.TouchCancel:n?s.touchActive=!1:s.pointerEl.classList.remove("touch-active");break;default:a.dispatchEvent(o)}break}case z.Scroll:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.scrollData=r;break}this.applyScroll(r,n);break}case z.ViewportResize:this.emitter.emit(Y.Resize,{width:r.width,height:r.height});break;case z.Input:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.inputData=r;break}this.applyInput(r);break}case z.MediaInteraction:{let i=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);let s=i;try{if(r.currentTime!==void 0&&(s.currentTime=r.currentTime),r.volume!==void 0&&(s.volume=r.volume),r.muted!==void 0&&(s.muted=r.muted),r.type===fr.Pause&&s.pause(),r.type===fr.Play){let o=s.play();typeof o?.catch=="function"&&o.catch(a=>{console.warn(a)})}r.type===fr.RateChange&&(s.playbackRate=r.playbackRate)}catch(o){this.warn(`Failed to replay media interactions: ${o.message||o}`)}break}case z.StyleSheetRule:case z.StyleDeclaration:{this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&this.virtualDom.mirror.getNode(r.id)?.rules?.push(r):this.applyStyleSheetMutation(r);break}case z.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.canvasMutations.push({event:t,mutation:r})}else{let i=this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);As({event:t,mutation:r,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case z.Font:{try{let i=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);ge(this.iframe)?.fonts.add(i)}catch(i){this.warn(i)}break}case z.Selection:{if(n){this.lastSelectionData=r;break}this.applySelection(r);break}case z.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r);break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n){this.usingVirtualDom=!0;let c=ge(this.iframe);if(c&&Kc(c,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length)for(let u in this.legacy_missingNodeRetryMap)try{let f=this.legacy_missingNodeRetryMap[u],h=na(f.node,this.virtualDom,this.mirror);h&&(f.node=h)}catch(f){this.warn(f)}}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{let u=r.getNode(c.id);if(!u)return;let f=r.getNode(c.parentId);if(!f)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&ir(f)&&(f=f.shadowRoot),r.removeNodeFromMap(u),f)try{f.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.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 i={...this.legacy_missingNodeRetryMap},s=[],o=c=>{let u=null;return c.nextId&&(u=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},a=c=>{let u=ge(this.iframe);if(!u)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(c.parentId);if(!f)return c.node.type===j.Document?this.newDocumentQueue.push(c):s.push(c);c.node.isShadow&&(ir(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let h=null,d=null;if(c.previousId&&(h=r.getNode(c.previousId)),c.nextId&&(d=r.getNode(c.nextId)),o(c))return s.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;let m=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:u;if(Yr(f,r)){this.attachDocumentToIframe(c,f);return}let E=(w,S)=>{if(!this.usingVirtualDom)for(let T of this.config.plugins||[])T.onBuild&&T.onBuild(w,{id:S,replayer:this})},y=Yn(c.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:E});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:y,mutation:c};return}let v=r.getMeta(f);if(v&&v.type===j.Element&&v.tagName==="textarea"&&c.node.type===j.Text){let w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);for(let S of w)S.nodeType===f.TEXT_NODE&&f.removeChild(S)}else if(v?.type===j.Document){let w=f;c.node.type===j.DocumentType&&w.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(h&&h.nextSibling&&h.nextSibling.parentNode?f.insertBefore(y,h.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(y,d):f.insertBefore(y,null):f.appendChild(y),E(y,c.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.length>0&&(f.rules=[]),Yr(y,this.mirror)){let w=this.mirror.getId(y),S=this.newDocumentQueue.find(T=>T.parentId===w);S&&(this.attachDocumentToIframe(S,y),this.newDocumentQueue=this.newDocumentQueue.filter(T=>T!==S))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,y,c)};t.adds.forEach(c=>{a(c)});let l=Date.now();for(;s.length;){let c=Sc(s);if(s.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(let u of c)r.getNode(u.value.parentId)?Jo(u,h=>{a(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Nc(t.texts).forEach(c=>{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;f?.rules?.length>0&&(f.rules=[])}}),t.attributes.forEach(c=>{let u=r.getNode(c.id);if(!u)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(let f in c.attributes)if(typeof f=="string"){let h=c.attributes[f];if(h===null)u.removeAttribute(f);else if(typeof h=="string")try{if(f==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{let d=r.getMeta(u),m=Yn({...d,attributes:{...d.attributes,...c.attributes}},{doc:u.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),E=u.nextSibling,y=u.parentNode;if(m&&y){y.removeChild(u),y.insertBefore(m,E),r.replace(c.id,m);break}}catch{}u.nodeType!==3&&u.setAttribute(f,h)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){let d=h,m=u;for(let E in d)if(d[E]===!1)m.style.removeProperty(E);else if(d[E]instanceof Array){let y=d[E];m.style.setProperty(E,y[0],y[1])}else{let y=d[E];m.style.setProperty(E,y)}}}})}applyScroll(t,n){let r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);let i=this.mirror.getMeta(r),s=ge(this.iframe);if(r===s)this.iframe.contentWindow?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(i?.type===j.Document)r.defaultView?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{r.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:i,startOffset:s,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!l||!c)return;let u=new Range;u.setStart(l,s),u.setEnd(c,a);let h=l.ownerDocument?.getSelection();return h&&n.add(h),{range:u,selection:h}});n.forEach(i=>i.removeAllRanges()),r.forEach(i=>i&&i.selection?.addRange(i.range))}catch{}}applyStyleSheetMutation(t){let n=null;t.styleId?n=this.styleMirror.getStyle(t.styleId):t.id&&(n=this.mirror.getNode(t.id)?.sheet||null),n&&(t.source===z.StyleSheetRule?this.applyStyleSheetRule(t,n):t.source===z.StyleDeclaration&&this.applyStyleDeclaration(t,n))}applyStyleSheetRule(t,n){if(t.adds?.forEach(({rule:r,index:i})=>{try{if(Array.isArray(i)){let{positions:s,index:o}=ws(i);Ln(n.cssRules,s).insertRule(r,o)}else{let s=i===void 0?void 0:Math.min(i,n.cssRules.length);n?.insertRule(r,s)}}catch{}}),t.removes?.forEach(({index:r})=>{try{if(Array.isArray(r)){let{positions:i,index:s}=ws(r);Ln(n.cssRules,i).deleteRule(s||0)}else n?.deleteRule(r)}catch{}}),t.replace)try{n.replace?.(t.replace)}catch{}if(t.replaceSync)try{n.replaceSync?.(t.replaceSync)}catch{}}applyStyleDeclaration(t,n){if(t.set){let r=Ln(n.rules,t.index);r&&r.style&&r.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){let r=Ln(n.rules,t.index);r&&r.style&&r.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){let n=this.mirror.getNode(t.id);if(!n)return;t.styles?.forEach(o=>{let a=null,l=null;if(ir(n)?l=n.ownerDocument?.defaultView||null:n.nodeName==="#document"&&(l=n.defaultView),!!l)try{a=new l.CSSStyleSheet,this.styleMirror.add(a,o.styleId),this.applyStyleSheetRule({source:z.StyleSheetRule,adds:o.rules},a)}catch{}});let r=10,i=0,s=(o,a)=>{let l=a.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);ir(o)?o.shadowRoot.adoptedStyleSheets=l:o.nodeName==="#document"&&(o.adoptedStyleSheets=l),l.length!==a.length&&i<r&&(en(()=>s(o,a),0+100*i),i++)};s(n,t.styleIds)}legacy_resolveMissingNode(t,n,r,i){let{previousId:s,nextId:o}=i,a=s&&t[s],l=o&&t[o];if(a){let{node:c,mutation:u}=a;n.insertBefore(c,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}if(l){let{node:c,mutation:u}=l;n.insertBefore(c,r.nextSibling),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}}moveAndHover(t,n,r,i,s,o){let a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(s,r);let l=Zo(a,this.iframe),c=t*l.absoluteScale+l.x,u=n*l.absoluteScale+l.y,f=this.pointers[o];f&&f.pointerEl&&(f.pointerEl.style.left=`${c}px`,f.pointerEl.style.top=`${u}px`),i||this.drawMouseTail({x:c,y:u},o),this.hoverElements(a)}drawMouseTail(t,n){let r=this.pointers[n];if(!r||!r.mouseTail)return;let{lineCap:i,lineWidth:s,strokeStyle:o,duration:a}=this.config.mouseTail===!0?qr:Object.assign({},qr,this.config.mouseTail),l=()=>{if(!r||!r.mouseTail)return;let c=r.mouseTail,u=c.getContext("2d");!u||!r.tailPositions.length||(u.clearRect(0,0,c.width,c.height),u.beginPath(),u.lineWidth=s,u.lineCap=i,u.strokeStyle=o,u.moveTo(r.tailPositions[0].x,r.tailPositions[0].y),r.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};r.tailPositions.push(t),l(),en(()=>{n in this.pointers&&(r.tailPositions=r.tailPositions.filter(c=>c!==t),l())},a/this.speedService.state.context.timer.speed)}hoverElements(t){let n=ge(this.iframe),r=this.lastHoveredRootNode||n;r&&typeof r.querySelectorAll=="function"&&r.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let i=t;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type!==J.IncrementalSnapshot?!1:t.data.source>z.Mutation&&t.data.source<=z.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(`Node with id '${n}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Is,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Is,...t)}},Pe=Uint8Array,xt=Uint16Array,xi=Uint32Array,ua=new Pe([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]),fa=new Pe([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]),fu=new Pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ha=function(e,t){for(var n=new xt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new xi(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},da=ha(ua,2),pa=da[0],hu=da[1];pa[28]=258,hu[258]=28;var du=ha(fa,0),pu=du[0],Ri=new xt(32768);for(B=0;B<32768;++B)ct=(B&43690)>>>1|(B&21845)<<1,ct=(ct&52428)>>>2|(ct&13107)<<2,ct=(ct&61680)>>>4|(ct&3855)<<4,Ri[B]=((ct&65280)>>>8|(ct&255)<<8)>>>1;var ct,B,Hn=(function(e,t,n){for(var r=e.length,i=0,s=new xt(t);i<r;++i)++s[e[i]-1];var o=new xt(t);for(i=0;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var a;if(n){a=new xt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],f=o[e[i]-1]++<<u,h=f|(1<<u)-1;f<=h;++f)a[Ri[f]>>>l]=c}else for(a=new xt(r),i=0;i<r;++i)a[i]=Ri[o[e[i]-1]++]>>>15-e[i];return a}),$n=new Pe(288);for(B=0;B<144;++B)$n[B]=8;var B;for(B=144;B<256;++B)$n[B]=9;var B;for(B=256;B<280;++B)$n[B]=7;var B;for(B=280;B<288;++B)$n[B]=8;var B,ma=new Pe(32);for(B=0;B<32;++B)ma[B]=5;var B,mu=Hn($n,9,1),vu=Hn(ma,5,1),Xr=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Ge=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(t&7)&n},Kr=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(t&7)},gu=function(e){return(e/8>>0)+(e&7&&1)},va=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof xt?xt:e instanceof xi?xi:Pe)(n-t);return r.set(e.subarray(t,n)),r},yu=function(e,t,n){var r=e.length,i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Pe(r*3));var o=function(K){var ze=t.length;if(K>ze){var Se=new Pe(Math.max(ze*2,K));Se.set(t),t=Se}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,f=n.d,h=n.m,d=n.n,m=r*8;do{if(!u){n.f=a=Ge(e,l,1);var E=Ge(e,l+1,3);if(l+=3,E)if(E==1)u=mu,f=vu,h=9,d=5;else if(E==2){var S=Ge(e,l,31)+257,T=Ge(e,l+10,15)+4,C=S+Ge(e,l+5,31)+1;l+=14;for(var G=new Pe(C),X=new Pe(19),A=0;A<T;++A)X[fu[A]]=Ge(e,l+A*3,7);l+=T*3;var ne=Xr(X),Z=(1<<ne)-1;if(!s&&l+C*(ne+7)>m)break;for(var fe=Hn(X,ne,1),A=0;A<C;){var me=fe[Ge(e,l,Z)];l+=me&15;var y=me>>>4;if(y<16)G[A++]=y;else{var se=0,xe=0;for(y==16?(xe=3+Ge(e,l,3),l+=2,se=G[A-1]):y==17?(xe=3+Ge(e,l,7),l+=3):y==18&&(xe=11+Ge(e,l,127),l+=7);xe--;)G[A++]=se}}var Je=G.subarray(0,S),ce=G.subarray(S);h=Xr(Je),d=Xr(ce),u=Hn(Je,h,1),f=Hn(ce,d,1)}else throw"invalid block type";else{var y=gu(l)+4,v=e[y-4]|e[y-3]<<8,w=y+v;if(w>r){if(s)throw"unexpected EOF";break}i&&o(c+v),t.set(e.subarray(y,w),c),n.b=c+=v,n.p=l=w*8;continue}if(l>m)throw"unexpected EOF"}i&&o(c+131072);for(var q=(1<<h)-1,Ve=(1<<d)-1,Ze=h+d+18;s||l+Ze<m;){var se=u[Kr(e,l)&q],_=se>>>4;if(l+=se&15,l>m)throw"unexpected EOF";if(!se)throw"invalid length/literal";if(_<256)t[c++]=_;else if(_==256){u=null;break}else{var g=_-254;if(_>264){var A=_-257,N=ua[A];g=Ge(e,l,(1<<N)-1)+pa[A],l+=N}var D=f[Kr(e,l)&Ve],U=D>>>4;if(!D)throw"invalid distance";l+=D&15;var ce=pu[U];if(U>3){var N=fa[U];ce+=Kr(e,l)&(1<<N)-1,l+=N}if(l>m)throw"unexpected EOF";i&&o(c+131072);for(var O=c+g;c<O;c+=4)t[c]=t[c-ce],t[c+1]=t[c+1-ce],t[c+2]=t[c+2-ce],t[c+3]=t[c+3-ce];c=O}}n.l=u,n.p=l,n.b=c,u&&(a=1,n.m=h,n.d=f,n.n=d)}while(!a);return c==t.length?t:va(t,0,c)},_u=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"};function wu(e,t){return yu((_u(e),e.subarray(2,-4)),t)}function bu(e,t){for(var n=e.length,r=new Pe(e.length+(e.length>>>1)),i=0,s=function(c){r[i++]=c},o=0;o<n;++o){if(i+5>r.length){var a=new Pe(i+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);s(l)}return va(r,0,i)}function Eu(e,t){var n="";if(typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((i&31)<<6|e[r++]&63):i<240?n+=String.fromCharCode((i&15)<<12|(e[r++]&63)<<6|e[r++]&63):(i=((i&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,n+=String.fromCharCode(55296|i>>10,56320|i&1023))}return n}var Ps="v1",Su=e=>{if(typeof e!="string")return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch{}try{let t=JSON.parse(Eu(wu(bu(e,!0))));if(t.v===Ps)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${Ps}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}},ga=(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))(ga||{}),ki=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ki||{});function Ls(e){let t="";return Object.keys(e).forEach(n=>{t+=`${n}: ${e[n]};`}),t}function kn(e,t=2){let n=String(e),r=Math.pow(10,t-1);if(e<r)for(;String(r).length>n.length;)n=`0${e}`;return n}var ya=1e3,Ai=60*ya,Ws=60*Ai;function Us(e){if(e<=0)return"00:00";let t=Math.floor(e/Ws);e=e%Ws;let n=Math.floor(e/Ai);e=e%Ai;let r=Math.floor(e/ya);return t?`${kn(t)}:${kn(n)}:${kn(r)}`:`${kn(n)}:${kn(r)}`}function Nu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function Mu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function Bs(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function Du(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function Vs(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function Tu(e){return e.type!==ga.IncrementalSnapshot?!1:e.data.source>ki.Mutation&&e.data.source<=ki.Input}function Cu(e,t){let n=[],r=e[0].timestamp;for(let i of e)Tu(i)&&(i.timestamp-r>t&&n.push([r,i.timestamp]),r=i.timestamp);return n}var xu=Mn('<div><input type="checkbox" class="svelte-184lr04"/> <label class="svelte-184lr04"></label> <span class="label svelte-184lr04"> </span></div>');function Ru(e,t){Pr(t,!0);let n=ye(t,"checked",15);var r=xu();let i;var s=je(r);nc(s);var o=ke(s,2),a=ke(o,2),l=je(a,!0);He(a),He(r),on(()=>{i=pi(r,1,"switch svelte-184lr04",null,i,{disabled:t.disabled}),gt(s,"id",t.id),s.disabled=t.disabled,gt(o,"for",t.id),cr(l,t.label)}),sc(s,n),ht(e,r),Lr()}var ku=Mn("<div></div>"),Au=Mn("<div></div>"),Ou=Yo(`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
|
|
7
|
+
or you can use record.mirror to access the mirror instance during recording.`,Os={map:{},getId(){return console.error(nn),-1},getNode(){return console.error(nn),null},removeNodeFromMap(){console.error(nn)},has(){return console.error(nn),!1},reset(){console.error(nn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Os=new Proxy(Os,{get(e,t,n){return t==="map"&&console.error(nn),Reflect.get(e,t,n)}}));Date.now().toString();function Pc(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 Wc(e){let t={},n=(i,s)=>{let o={value:i,parent:s,children:[]};return t[i.node.id]=o,o},r=[];for(let i of e){let{nextId:s,parentId:o}=i;if(s&&s in t){let a=t[s];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,n(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,n(i,null))}continue}if(o in t){let a=t[o];a.children.push(n(i,a));continue}r.push(n(i,null))}return r}function da(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)da(e.children[n],t)}function ti(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function pa(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=pa(n,t),s=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:s,absoluteScale:i.absoluteScale*s}}function hr(e){return!!e?.shadowRoot}function Un(e,t){let n=e[t[0]];return t.length===1?n:Un(n.cssRules[t[1]].cssRules,t.slice(2))}function Is(e){let t=[...e],n=t.pop();return{positions:t,index:n}}function Uc(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}var xi=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-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++}},ni={};function fs(e){let t=ni[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement=="function")try{let s=i.createElement("iframe");s.hidden=!0,i.head.appendChild(s);let o=s.contentWindow;if(o&&o[e]){let a=o[e].bind(window);r=(...l)=>{try{return a(...l)}catch{return ni[e]=n,n(...l)}}}i.head.removeChild(s)}catch{}return ni[e]=r}function ri(...e){return fs("requestAnimationFrame")(...e)}function $t(...e){return fs("setTimeout")(...e)}function Bc(...e){return fs("clearTimeout")(...e)}var J=(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))(J||{}),Y=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Y||{}),se=(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))(se||{}),Or=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Or||{}),_r=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(_r||{}),j=(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))(j||{}),Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(kn=0;kn<Fs.length;kn++)Bn[Fs.charCodeAt(kn)]=kn;var kn,Vc=function(e){var t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)s=Bn[e.charCodeAt(r)],o=Bn[e.charCodeAt(r+1)],a=Bn[e.charCodeAt(r+2)],l=Bn[e.charCodeAt(r+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},zc=Object.defineProperty,Gc=(e,t,n)=>t in e?zc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>Gc(e,typeof t!="symbol"?t+"":t,n),Hc=Object.defineProperty,Yc=(e,t,n)=>t in e?Hc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t,n)=>Yc(e,typeof t!="symbol"?t+"":t,n),P=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(P||{});function jc(e){return e.nodeType===e.ELEMENT_NODE}var qc=class{constructor(){Ls(this,"idNodeMap",new Map),Ls(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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)),jc(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xc(){return new qc}function Kc(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(n).forEach(function(s){if(s){let o=s.split(r);o.length>1&&(t[Ri(o[0].trim())]=o[1].trim())}}),t}function Ps(e){let t=[];for(let n in e){let r=e[n];if(typeof r!="string")continue;let i=$c(n);t.push(`${i}: ${r};`)}return t.join(" ")}var Qc=/-([a-z])/g,Jc=/^--[a-zA-Z0-9-]+$/,Ri=e=>Jc.test(e)?e:e.replace(Qc,(t,n)=>n?n.toUpperCase():""),Zc=/\B([A-Z])/g,$c=e=>e.replace(Zc,"-$1").toLowerCase(),Lt=class e{constructor(...t){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(this,"RRNodeType")}get childNodes(){let t=[],n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ki=class e extends Lt{constructor(...t){super(t),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",P.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HTML")||null}get body(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="BODY")||null}get head(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HEAD")||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let n=t.RRNodeType;if((n===P.Element||n===P.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${n===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=hs(this,t);return r.parentElement=null,r}insertBefore(t,n){let r=t.RRNodeType;if((r===P.Element||r===P.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=ma(this,t,n);return i.parentElement=null,i}removeChild(t){return va(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let n;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?n="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(n="-//W3C//DTD HTML 4.0 Transitional//EN"),n){let r=this.createDocumentType("html",n,"");this.open(),this.appendChild(r)}}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new Ir(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=new er(t);return n.ownerDocument=this,n}createElementNS(t,n){return this.createElement(n)}createTextNode(t){let n=new Fr(t);return n.ownerDocument=this,n}createComment(t){let n=new Lr(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new Pr(t);return n.ownerDocument=this,n}toString(){return"RRDocument"}},Ir=class extends Lt{constructor(t,n,r){super(),M(this,"nodeType",10),M(this,"RRNodeType",P.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}},er=class extends Lt{constructor(t){super(),M(this,"nodeType",1),M(this,"RRNodeType",P.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Oi(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let t=this.attributes.style?Kc(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,i,s)=>{if(n.test(r))return;let o=Ri(r);i?t[o]=i:delete t[o],s==="important"&&(t[o]+=" !important"),this.attributes.style=Ps(t)},t.removeProperty=r=>{if(n.test(r))return"";let i=Ri(r),s=t[i]||"";return delete t[i],this.attributes.style=Ps(t),s},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return hs(this,t)}insertBefore(t,n){return ma(this,t,n)}removeChild(t){return va(this,t)}attachShadow(t){let n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(let n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}},Ai=class extends er{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},Fr=class extends Lt{constructor(t){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",P.Text),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Lr=class extends Lt{constructor(t){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",P.Comment),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Pr=class extends Lt{constructor(t){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",P.CDATA),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},Oi=class{constructor(t,n){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...r)=>{for(let i of r){let s=String(i);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))}),M(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){let r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}};function hs(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function ma(e,t,n){if(!n)return hs(e,t);if(n.parentNode!==e)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 t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function va(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Te=(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",e))(Te||{});function _e(e){try{return e.contentDocument}catch{}}function eu(e){try{return e.contentWindow}catch{}}var Ii={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},tu={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"},Gt=null;function Wr(e,t,n,r=t.mirror||t.ownerDocument.mirror){e=nu(e,t,n,r),ga(e,t,n,r),ru(e,t,n)}function nu(e,t,n,r){if(n.afterAppend&&!Gt&&(Gt=new WeakSet,setTimeout(()=>{Gt=null},0)),!ds(e,t)){let i=Ur(t,n.mirror,r);e.parentNode?.replaceChild(i,e),e=i}switch(t.RRNodeType){case P.Document:{if(!rn(e,t,n.mirror,r)){let i=r.getMeta(t);i&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,i),Gt?.add(e))}break}case P.Element:{let i=e,s=t;switch(s.tagName){case"IFRAME":{let o=_e(e);if(!o)break;Wr(o,t.contentDocument,n,r);break}}s.shadowRoot&&(i.shadowRoot||i.attachShadow({mode:"open"}),ga(i.shadowRoot,s.shadowRoot,n,r)),iu(i,s,r);break}}return e}function ru(e,t,n){switch(t.RRNodeType){case P.Document:{let r=t.scrollData;r&&n.applyScroll(r,!0);break}case P.Element:{let r=e,i=t;switch(i.scrollData&&n.applyScroll(i.scrollData,!0),i.inputData&&n.applyInput(i.inputData),i.tagName){case"AUDIO":case"VIDEO":{let s=e,o=i;if(o.paused!==void 0){let a=o.paused?s.pause():s.play();typeof a?.catch=="function"&&a.catch(l=>{console.warn(l)})}o.muted!==void 0&&(s.muted=o.muted),o.volume!==void 0&&(s.volume=o.volume),o.currentTime!==void 0&&(s.currentTime=o.currentTime),o.playbackRate!==void 0&&(s.playbackRate=o.playbackRate);break}case"CANVAS":{let s=t;if(s.rr_dataURL!==null){let o=document.createElement("img");o.onload=()=>{let a=r.getContext("2d");a&&a.drawImage(o,0,0,o.width,o.height)},o.src=s.rr_dataURL}s.canvasMutations.forEach(o=>n.applyCanvas(o.event,o.mutation,e));break}case"STYLE":{let s=r.sheet;s&&t.rules.forEach(o=>n.applyStyleSheetMutation(o,s));break}}break}case P.Text:case P.Comment:case P.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}Gt?.has(e)&&(Gt.delete(e),n.afterAppend?.(e,n.mirror.getId(e)))}function iu(e,t,n){let r=e.attributes,i=t.attributes;for(let s in i){let o=i[s];if(n.getMeta(t)?.isSVG&&Ii[s])e.setAttributeNS(Ii[s],s,o);else if(t.tagName==="CANVAS"&&s==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let c=e.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(t.tagName==="IFRAME"&&s==="srcdoc")continue;try{e.setAttribute(s,o)}catch(l){console.warn(l)}}}for(let{name:s}of Array.from(r))s in i||e.removeAttribute(s);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function ga(e,t,n,r){let i=Array.from(e.childNodes),s=t.childNodes;if(i.length===0&&s.length===0)return;let o=0,a=i.length-1,l=0,c=s.length-1,u=i[o],f=i[a],p=s[l],d=s[c],m,E;for(;o<=a&&l<=c;)if(u===void 0)u=i[++o];else if(f===void 0)f=i[--a];else if(rn(u,p,n.mirror,r))u=i[++o],p=s[++l];else if(rn(f,d,n.mirror,r))f=i[--a],d=s[--c];else if(rn(u,d,n.mirror,r)){try{An(e,u,f.nextSibling)}catch(w){console.warn(w)}u=i[++o],d=s[--c]}else if(rn(f,p,n.mirror,r)){try{An(e,f,u)}catch(w){console.warn(w)}f=i[--a],p=s[++l]}else{if(!m){m={};for(let S=o;S<=a;S++){let D=i[S];D&&n.mirror.hasNode(D)&&(m[n.mirror.getId(D)]=S)}}E=m[r.getId(p)];let w=i[E];if(E!==void 0&&w&&rn(w,p,n.mirror,r)){try{An(e,w,u)}catch(S){console.warn(S)}i[E]=void 0}else{let S=Ur(p,n.mirror,r);e.nodeName==="#document"&&u&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(e.removeChild(u),n.mirror.removeNodeFromMap(u),u=i[++o]);try{An(e,S,u||null)}catch(D){console.warn(D)}}p=s[++l]}if(o>a){let w=s[c+1],S=null;for(w&&(S=n.mirror.getNode(r.getId(w)));l<=c;++l){let D=Ur(s[l],n.mirror,r);try{An(e,D,S)}catch(C){console.warn(C)}}}else if(l>c)for(;o<=a;o++){let w=i[o];if(!(!w||w.parentNode!==e))try{e.removeChild(w),n.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let _=e.firstChild,v=t.firstChild;for(;_!==null&&v!==null;)Wr(_,v,n,r),_=_.nextSibling,v=v.nextSibling}function Ur(e,t,n){let r=n.getId(e),i=n.getMeta(e),s=null;if(r>-1&&(s=t.getNode(r)),s!==null&&ds(s,e))return s;switch(e.RRNodeType){case P.Document:s=new Document;break;case P.DocumentType:s=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case P.Element:{let o=e.tagName.toLowerCase();o=tu[o]||o,i&&"isSVG"in i&&i?.isSVG?s=document.createElementNS(Ii.svg,o):s=document.createElement(e.tagName);break}case P.Text:s=document.createTextNode(e.data);break;case P.Comment:s=document.createComment(e.data);break;case P.CDATA:s=document.createCDATASection(e.data);break}i&&t.add(s,{...i});try{Gt?.add(s)}catch{}return s}function ds(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function rn(e,t,n,r){let i=n.getId(e),s=r.getId(t);return i===-1||i!==s?!1:ds(e,t)}function su(e){let t=e.sheet?.cssRules;if(!t||!t.length)return;let n=new CSSStyleSheet;n.replaceSync(e.innerText);let r={};for(let s=0;s<n.cssRules.length;s++)r[n.cssRules[s].cssText]=n.cssRules[s];let i=[];for(let s=0;s<t?.length;s++){let o=t[s].cssText;r[o]||i.push({index:s,cssRuleText:o})}return i}function An(e,t,n){let r;t.nodeName==="STYLE"&&(r=su(t)),e.insertBefore(t,n),r&&r.length&&r.forEach(({cssRuleText:i,index:s})=>{t.sheet?.insertRule(i,s)})}var Sn=class e extends ki{constructor(t){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",hu()),M(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new ou(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=t.toUpperCase(),r;switch(n){case"AUDIO":case"VIDEO":r=new Fi(n);break;case"IFRAME":r=new Wi(n,this.mirror);break;case"CANVAS":r=new Li(n);break;case"STYLE":r=new Pi(n);break;default:r=new Nn(n);break}return r.ownerDocument=this,r}createComment(t){let n=new lu(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new cu(t);return n.ownerDocument=this,n}createTextNode(t){let n=new au(t);return n.ownerDocument=this,n}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},ou=Ir,Nn=class extends er{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}},Fi=class extends Ai{},Li=class extends Nn{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}},Pi=class extends Nn{constructor(){super(...arguments),M(this,"rules",[])}},Wi=class extends Nn{constructor(t,n){super(t),M(this,"contentDocument",new Sn),this.contentDocument.mirror=n}},au=Fr,lu=Lr,cu=Pr;function uu(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function ya(e,t,n,r){let i;switch(e.nodeType){case Te.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case Te.DOCUMENT_TYPE_NODE:{let o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case Te.ELEMENT_NODE:{let o=e,a=uu(o);i=t.createElement(a);let l=i;for(let{name:c,value:u}of Array.from(o.attributes))l.attributes[c]=u;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case Te.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case Te.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case Te.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case Te.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let s=n.getMeta(e);return t instanceof Sn&&(s||(s=_a(i,t.unserializedId),n.add(e,s)),t.mirror.add(i,{...s})),i}function fu(e,t=Xc(),n=new Sn){function r(i,s){let o=ya(i,n,t,s);if(o!==null)if(s?.nodeName!=="IFRAME"&&i.nodeType!==Te.DOCUMENT_FRAGMENT_NODE&&(s?.appendChild(o),o.parentNode=s,o.parentElement=s),i.nodeName==="IFRAME"){let a=_e(i);a&&r(a,o)}else(i.nodeType===Te.DOCUMENT_NODE||i.nodeType===Te.ELEMENT_NODE||i.nodeType===Te.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Te.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(e,null),n}function hu(){return new Ui}var Ui=class{constructor(){M(this,"idNodeMap",new Map),M(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function _a(e,t){switch(e.RRNodeType){case P.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case P.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case P.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case P.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}ua();function wa(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(i){i(n)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,n)})}}}var du=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"}));function pu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(v){let w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(v)}let a=o(e.navigator.userAgent)?1:0;function l(v,w){this.scrollLeft=v,this.scrollTop=w}function c(v){return .5*(1-Math.cos(Math.PI*v))}function u(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(v,w){if(w==="Y")return v.clientHeight+a<v.scrollHeight;if(w==="X")return v.clientWidth+a<v.scrollWidth}function p(v,w){let S=e.getComputedStyle(v,null)["overflow"+w];return S==="auto"||S==="scroll"}function d(v){let w=f(v,"Y")&&p(v,"Y"),S=f(v,"X")&&p(v,"X");return w||S}function m(v){for(;v!==t.body&&d(v)===!1;)v=v.parentNode||v.host;return v}function E(v){let w=s(),S,D,C,V=(w-v.startTime)/r;V=V>1?1:V,S=c(V),D=v.startX+(v.x-v.startX)*S,C=v.startY+(v.y-v.startY)*S,v.method.call(v.scrollable,D,C),(D!==v.x||C!==v.y)&&e.requestAnimationFrame(E.bind(e,v))}function _(v,w,S){let D,C,V,K,O=s();v===t.body?(D=e,C=e.scrollX||e.pageXOffset,V=e.scrollY||e.pageYOffset,K=i.scroll):(D=v,C=v.scrollLeft,V=v.scrollTop,K=l),E({scrollable:D,method:K,startTime:O,startX:C,startY:V,x:w,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.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}_.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(u(arguments[0])){i.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}_.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(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.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 v=arguments[0].left,w=arguments[0].top;_.call(this,this,typeof v>"u"?this.scrollLeft:~~v,typeof w>"u"?this.scrollTop:~~w)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.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(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let v=m(this),w=v.getBoundingClientRect(),S=this.getBoundingClientRect();v!==t.body?(_.call(this,v,v.scrollLeft+S.left-w.left,v.scrollTop+S.top-w.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}var Bi=class{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}addAction(t){let n=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{let r=this.findActionIndex(t);this.actions.splice(r,0,t)}n&&(this.raf=ri(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=ri(this.rafCheck.bind(this))}rafCheck(){let t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){let n=this.actions[0];if(this.timeOffset>=n.delay)this.actions.shift(),n.doAction();else break}this.actions.length>0?this.raf=ri(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);if(this.actions[i].delay<t.delay)n=i+1;else if(this.actions[i].delay>t.delay)r=i-1;else return i+1}return n}};function Ws(e,t){if(e.type===J.IncrementalSnapshot&&e.data.source===Y.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}function Us(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}var hn;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(hn||(hn={}));var ba={type:"xstate.init"};function ii(e){return e===void 0?[]:[].concat(e)}function sn(e){return{type:"xstate.assign",assignment:e}}function Bs(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 Br(e){return function(t){return e===t}}function Ea(e){return typeof e=="string"?{type:e}:e}function Vs(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Br(e)}}function zs(e,t,n){var r=t,i=!1;return[e.filter((function(s){if(s.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof s.assignment=="function"?o=s.assignment(r,n):Object.keys(s.assignment).forEach((function(a){o[a]=typeof s.assignment[a]=="function"?s.assignment[a](r,n):s.assignment[a]})),r=o,!1}return!0})),r,i]}function Sa(e,t){t===void 0&&(t={});var n=Us(zs(ii(e.states[e.initial].entry).map((function(o){return Bs(o,t.actions)})),e.context,ba),2),r=n[0],i=n[1],s={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Br(e.initial)},transition:function(o,a){var l,c,u=typeof o=="string"?{value:o,context:e.context}:o,f=u.value,p=u.context,d=Ea(a),m=e.states[f];if(m.on){var E=ii(m.on[d.type]);try{for(var _=(function(X){var Ge=typeof Symbol=="function"&&Symbol.iterator,it=Ge&&X[Ge],y=0;if(it)return it.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&y>=X.length&&(X=void 0),{value:X&&X[y++],done:!X}}};throw new TypeError(Ge?"Object is not iterable.":"Symbol.iterator is not defined.")})(E),v=_.next();!v.done;v=_.next()){var w=v.value;if(w===void 0)return Vs(f,p);var S=typeof w=="string"?{target:w}:w,D=S.target,C=S.actions,V=C===void 0?[]:C,K=S.cond,O=K===void 0?function(){return!0}:K,ie=D===void 0,$=D??f,pe=e.states[$];if(O(p,d)){var ge=Us(zs((ie?ii(V):[].concat(m.exit,V,pe.entry).filter((function(X){return X}))).map((function(X){return Bs(X,s._options.actions)})),p,d),3),ce=ge[0],ke=ge[1],rt=ge[2],he=D??f;return{value:he,context:ke,actions:ce,changed:D!==f||ce.length>0||rt,matches:Br(he)}}}}catch(X){l={error:X}}finally{try{v&&!v.done&&(c=_.return)&&c.call(_)}finally{if(l)throw l.error}}}return Vs(f,p)}};return s}var Gs=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function Na(e){var t=e.initialState,n=hn.NotStarted,r=new Set,i={_machine:e,send:function(s){n===hn.Running&&(t=e.transition(t,s),Gs(t,Ea(s)),r.forEach((function(o){return o(t)})))},subscribe:function(s){return r.add(s),s(t),{unsubscribe:function(){return r.delete(s)}}},start:function(s){if(s){var o=typeof s=="object"?s:{context:e.config.context,value:s};t={value:o.value,actions:[],context:o.context,matches:Br(o.value)}}return n=hn.Running,Gs(t,ba),i},stop:function(){return n=hn.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function mu(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===J.Meta&&r.timestamp<=t)return e.slice(n)}return e}function vu(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){let i=Sa({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:sn({lastPlayedEvent:(s,o)=>o.type==="CAST_EVENT"?o.payload.event:s.lastPlayedEvent}),recordTimeOffset:sn((s,o)=>{let a=s.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...s,timeOffset:a,baselineTime:s.events[0].timestamp+a}}),play(s){let{timer:o,events:a,baselineTime:l,lastPlayedEvent:c}=s;o.clear();for(let d of a)Ws(d,l);let u=mu(a,l),f=c?.timestamp;c?.type===J.IncrementalSnapshot&&c.data.source===Y.MouseMove&&(f=c.timestamp+c.data.positions[0]?.timeOffset),l<(f||0)&&r.emit(j.PlayBack);let p=new Array;for(let d of u)if(!(f&&f<l&&(d.timestamp<=f||d===c)))if(d.timestamp<l)p.push(d);else{let m=t(d,!1);o.addAction({doAction:()=>{m()},delay:d.delay})}n(p),r.emit(j.Flush),o.start()},pause(s){s.timer.clear()},resetLastPlayedEvent:sn(s=>({...s,lastPlayedEvent:null})),startLive:sn({baselineTime:(s,o)=>(s.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:sn((s,o)=>{let{baselineTime:a,timer:l,events:c}=s;if(o.type==="ADD_EVENT"){let{event:u}=o.payload;Ws(u,a);let f=c.length-1;if(!c[f]||c[f].timestamp<=u.timestamp)c.push(u);else{let m=-1,E=0;for(;E<=f;){let _=Math.floor((E+f)/2);c[_].timestamp<=u.timestamp?E=_+1:f=_-1}m===-1&&(m=E),c.splice(m,0,u)}let p=u.timestamp<a,d=t(u,p);p?d():l.isActive()&&l.addAction({doAction:()=>{d()},delay:u.delay})}return{...s,events:c}})}});return Na(i)}function gu(e){let t=Sa({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:sn({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return Na(t)}var yu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Hs=new Map;function Ma(e,t){let n=Hs.get(e);return n||(n=new Map,Hs.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Ct(e,t,n){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await Ct(e,t,n)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(n||t===null)return r;let{rr_type:i,index:s}=r;return Ma(t,i)[s]}else if("args"in r){let{rr_type:i,args:s}=r,o=window[i];return new o(...await Promise.all(s.map(Ct(e,t,n))))}else{if("base64"in r)return Vc(r.base64);if("src"in r){let i=e.get(r.src);if(i)return i;{let s=new Image;return s.src=r.src,e.set(r.src,s),s}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(Ct(e,t,n)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ct(e,t,n)));return r}}function _u(e,t){try{return t===Or.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}var wu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function bu(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!wu.includes(n))return;let r=Ma(e,n);r.includes(t)||r.push(t)}async function Eu({mutation:e,target:t,type:n,imageMap:r,errorHandler:i}){try{let s=_u(t,n);if(!s)return;if(e.setter){s[e.property]=e.args[0];return}let o=s[e.property],a=await Promise.all(e.args.map(Ct(r,s))),l=o.apply(s,a);bu(s,l);let c=!1}catch(s){i(e,s)}}async function Su({event:e,mutations:t,target:n,imageMap:r,errorHandler:i}){let s=n.getContext("2d");if(!s){i(t[0],new Error("Canvas context is null"));return}let o=t.map(async l=>Promise.all(l.args.map(Ct(r,s))));(await Promise.all(o)).forEach((l,c)=>{let u=t[c];try{if(u.setter){s[u.property]=u.args[0];return}let f=s[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(r.get(e),f.apply(s,u.args)):f.apply(s,l)}catch(f){i(u,f)}})}async function Ys({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:i,errorHandler:s}){try{let o=i.get(e)||t,a="commands"in o?o.commands:[o];if([Or.WebGL,Or.WebGL2].includes(t.type)){for(let l=0;l<a.length;l++){let c=a[l];await Eu({mutation:c,type:t.type,target:n,imageMap:r,errorHandler:s})}return}await Su({event:e,mutations:a,target:n,imageMap:r,errorHandler:s})}catch(o){s(t,o)}}var js=5*1e3,Nu=wa||du,qs="[replayer]";function Mu(e,t){let n=-1;if(e.length===0)return n;let r=0,i=e.length-1;for(;r<=i;){let s=Math.floor((r+i)/2);e[s].timestamp<=t?(n=s,r=s+1):i=s-1}return n}var si={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Du(e){return e.type==J.IncrementalSnapshot&&(e.data.source==Y.TouchMove||e.data.source==Y.MouseInteraction&&e.data.type==se.TouchStart)}function Xs(e){return"pointerId"in e&&typeof e.pointerId=="number"?e.pointerId:-1}var Vi=class{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new Sn,this.emitter=Nu(),this.legacy_missingNodeRetryMap={},this.cache=As(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=ua(),this.styleMirror=new xi,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.pointers={},this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=a=>{this.iframe.style.display="inherit";for(let l of[...Object.values(this.pointers).flatMap(c=>c.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 J.DomContentLoaded:case J.Load:case J.Custom:continue;case J.FullSnapshot:case J.Meta:case J.Plugin:case J.IncrementalSnapshot:break}this.getCastFn(l,!0)()}},this.getCastFn=(a,l=!1)=>{let c;switch(a.type){case J.DomContentLoaded:case J.Load:break;case J.Custom:c=()=>{this.emitter.emit(j.CustomEvent,a)};break;case J.Meta:c=()=>this.emitter.emit(j.Resize,{width:a.data.width,height:a.data.height});break;case J.FullSnapshot:c=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(a,l),this.iframe.contentWindow?.scrollTo(a.data.initialOffset),this.styleMirror.reset()};break;case J.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let f of this.service.state.context.events)if(!(f.timestamp<=a.timestamp)&&this.isUserInteraction(f)){f.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){let f=this.nextUserInteractionEvent.delay-a.delay,p={speed:Math.min(Math.round(f/js),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:p}),this.emitter.emit(j.SkipStart,p)}}};break}return()=>{c&&c();for(let p of this.config.plugins||[])p.handler&&p.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let f=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[f]){let p=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(j.Finish))},d=50;a.type===J.IncrementalSnapshot&&a.data.source===Y.MouseMove&&a.data.positions.length&&(d+=Math.max(0,-a.data.positions[0].timeOffset)),$t(p,d)}this.emitter.emit(j.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,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:si,useVirtualDom:!0,logger:console};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(j.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(j.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(c,u,f)=>{Ys({event:c,mutation:u,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,u)=>{c.source===Y.StyleSheetRule?this.applyStyleSheetRule(c,u):c.source===Y.StyleDeclaration&&this.applyStyleDeclaration(c,u)},afterAppend:(c,u)=>{for(let f of this.config.plugins||[])f.onBuild&&f.onBuild(c,{id:u,replayer:this})}},l=_e(this.iframe);if(l)try{Wr(l,this.virtualDom,a,this.virtualDom.mirror)}catch(c){console.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let c in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[c],f=Ur(u.node,this.mirror,this.virtualDom.mirror);Wr(f,u.node,a,this.virtualDom.mirror),u.node=f}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}for(let[a,{pointerPosition:l,touchActive:c}]of Object.entries(this.pointers)){let u=parseInt(a),f=this.pointers[u];l&&(this.moveAndHover(l.x,l.y,l.id,!0,l.debugData,u),f.pointerPosition=null),c===!0?f.pointerEl.classList.add("touch-active"):c===!1&&f.pointerEl.classList.remove("touch-active"),f.touchActive=null}if(this.lastMouseDownEvent){let[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(j.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset()});let i=new Bi([],{speed:this.config.speed});this.service=vu({events:t.map(a=>n&&n.unpackFn?n.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,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(j.StateChange,{player:a})}),this.speedService=gu({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(j.StateChange,{speed:a})});let s=this.service.state.context.events.find(a=>a.type===J.Meta),o=this.service.state.context.events.find(a=>a.type===J.FullSnapshot);if(s){let{width:a,height:l}=s.data;$t(()=>{this.emitter.emit(j.Resize,{width:a,height:l})},0)}o&&$t(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),this.iframe.contentWindow?.scrollTo(o.data.initialOffset))},1)}get timer(){return this.service.state.context.timer}createPointer(t,n){let r=document.createElement("canvas");r.classList.add("replayer-mouse-tail"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),this.wrapper.insertBefore(r,this.iframe),r.style.display=this.config.mouseTail===!1?"none":"inherit";let i=document.createElement("div");i.classList.add("replayer-mouse"),this.pointers[t]={touchActive:null,pointerEl:i,tailPositions:[],pointerPosition:null,mouseTail:r},Du(n)&&i.classList.add("touch-device"),this.wrapper.appendChild(i)}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){let n=this.config.skipInactive;if(Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive?n===!1&&this.config.skipInactive===!0&&this.reevaluateFastForward():this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u")if(t.mouseTail===!1)for(let{mouseTail:r}of Object.values(this.pointers))r&&(r.style.display="none");else for(let{mouseTail:r}of Object.values(this.pointers))r||(r=document.createElement("canvas"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),r.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(r,this.iframe)),r.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){this.config.skipInactive&&this.speedService.state.matches("skipping")&&this.backToNormal(),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}})),_e(this.iframe)?.getElementsByTagName("html")[0]?.classList.remove("rrweb-paused"),this.emitter.emit(j.Start),this.config.skipInactive&&this.reevaluateFastForward()}pause(t){t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),_e(this.iframe)?.getElementsByTagName("html")[0]?.classList.add("rrweb-paused"),this.emitter.emit(j.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(j.Resume)}destroy(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(j.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){let n=this.config.unpackFn?this.config.unpackFn(t):t;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=As()}reevaluateFastForward(){if(!this.config.skipInactive)return;this.nextUserInteractionEvent=null;let t=this.service.state.context.events,n=t[0];if(!n)return;let r=n.timestamp+this.getCurrentTime(),i=Mu(t,r);if(i===-1)return;let s=t[i],o=this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed;for(let a=i+1;a<t.length;a++){let l=t[a];if(this.isUserInteraction(l)){let c=l.timestamp-s.timestamp;if(c>o){this.nextUserInteractionEvent=l;let u={speed:Math.min(Math.round(c/js),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(j.SkipStart,u)}break}}}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),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);let n=_e(this.iframe),r=eu(this.iframe);r&&n&&(pu(r,n),Pc(r))}rebuildFullSnapshot(t,n=!1){let r=_e(this.iframe);if(!r)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let i=[],s=(l,c)=>{this.collectIframeAndAttachDocument(i,l);for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Lc(t.data.node,{doc:r,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(r,t.data.node.id);for(let{mutationInQueue:l,builtNode:c}of i)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);let{documentElement:o,head:a}=r;if(this.insertStyleRules(o,a),!this.service.state.matches("playing")){let l=r.getElementsByTagName("html")[0];l&&l.classList.add("rrweb-paused")}this.emitter.emit(j.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){let r=yu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.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,_a(i,this.virtualDom.unserializedId)),t.insertBefore(i,n),i.rules.push({source:Y.StyleSheetRule,adds:r.map((s,o)=>({rule:s,index:o}))})}else{let i=document.createElement("style");t.insertBefore(i,n);for(let s=0;s<r.length;s++)i.sheet?.insertRule(r[s],s)}}attachDocumentToIframe(t,n){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=_e(n),s=[],o=(a,l)=>{this.collectIframeAndAttachDocument(s,a);let c=r.getMeta(a);if(c?.type===q.Element&&c?.tagName.toUpperCase()==="HTML"&&i){let{documentElement:u,head:f}=i;this.insertStyleRules(u,f)}if(!this.usingVirtualDom)for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:l,replayer:this})};qn(t.node,{doc:i,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(i,t.node.id);for(let{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a)}collectIframeAndAttachDocument(t,n){if(ti(n,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){let n=_e(this.iframe)?.head;if(n){let r=new Set,i,s=this.service.state,o=()=>{s=this.service.state};this.emitter.on(j.Start,o),this.emitter.on(j.Pause,o);let a=()=>{this.emitter.off(j.Start,o),this.emitter.off(j.Pause,o)};n.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(s.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(j.LoadStylesheetEnd),i&&Bc(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(j.LoadStylesheetStart),i=$t(()=>{s.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let t=[];for(let n of this.service.state.context.events)n.type===J.IncrementalSnapshot&&n.data.source===Y.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach(i=>{this.preloadImages(i,n)}));return Promise.all(t)}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){let r=document.createElement("canvas"),i=r.getContext("2d"),s=i?.createImageData(r.width,r.height);i?.putImageData(s,0,0)}}async deserializeAndPreloadCanvasEvents(t,n){if(!this.canvasEventMap.has(n)){let r={isUnchanged:!0};if("commands"in t){let i=await Promise.all(t.commands.map(async s=>{let o=await Promise.all(s.args.map(Ct(this.imageMap,null,r)));return{...s,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,commands:i})}else{let i=await Promise.all(t.args.map(Ct(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,args:i})}}}applyIncremental(t,n){let{data:r}=t;switch(r.source){case Y.Mutation:{try{this.applyMutation(r,n)}catch(i){this.warn(`Exception in mutation ${i.message||i}`,r)}break}case Y.Drag:case Y.TouchMove:case Y.MouseMove:{let i=Xs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(n){let o=r.positions[r.positions.length-1];s.pointerPosition={x:o.x,y:o.y,id:o.id,debugData:r}}else r.positions.forEach(o=>{let a={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,n,r,i)},delay:o.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:t.delay-r.positions[0]?.timeOffset});break}case Y.MouseInteraction:{let i=Xs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(r.id===-1)break;let o=new Event(Dc(se[r.type])),a=this.mirror.getNode(r.id);if(!a)return this.debugNodeNotFound(r,r.id);this.emitter.emit(j.MouseInteraction,{type:r.type,target:a});let{triggerFocus:l}=this.config;switch(r.type){case se.Blur:"blur"in a&&a.blur();break;case se.Focus:l&&a.focus&&a.focus({preventScroll:!0});break;case se.Click:case se.TouchStart:case se.TouchEnd:case se.MouseDown:case se.MouseUp:n?(r.type===se.TouchStart?(s.touchActive=!0,Object.values(this.pointers).forEach(c=>{c!==s&&!c.touchActive&&(c.touchActive=!1)})):r.type===se.TouchEnd&&(s.touchActive=!1,s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]),r.type===se.MouseDown?this.lastMouseDownEvent=[a,o]:r.type===se.MouseUp&&(this.lastMouseDownEvent=null),s.pointerPosition={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===se.TouchStart&&(s.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,n,r,i),r.type===se.Click?(s.pointerEl.classList.remove("active"),s.pointerEl.offsetWidth,s.pointerEl.classList.add("active")):r.type===se.TouchStart?(s.pointerEl.offsetWidth,s.pointerEl.classList.add("touch-active")):r.type===se.TouchEnd?(s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]):a.dispatchEvent(o));break;case se.TouchCancel:n?s.touchActive=!1:s.pointerEl.classList.remove("touch-active");break;default:a.dispatchEvent(o)}break}case Y.Scroll:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.scrollData=r;break}this.applyScroll(r,n);break}case Y.ViewportResize:this.emitter.emit(j.Resize,{width:r.width,height:r.height});break;case Y.Input:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.inputData=r;break}this.applyInput(r);break}case Y.MediaInteraction:{let i=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);let s=i;try{if(r.currentTime!==void 0&&(s.currentTime=r.currentTime),r.volume!==void 0&&(s.volume=r.volume),r.muted!==void 0&&(s.muted=r.muted),r.type===_r.Pause&&s.pause(),r.type===_r.Play){let o=s.play();typeof o?.catch=="function"&&o.catch(a=>{console.warn(a)})}r.type===_r.RateChange&&(s.playbackRate=r.playbackRate)}catch(o){this.warn(`Failed to replay media interactions: ${o.message||o}`)}break}case Y.StyleSheetRule:case Y.StyleDeclaration:{this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&this.virtualDom.mirror.getNode(r.id)?.rules?.push(r):this.applyStyleSheetMutation(r);break}case Y.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.canvasMutations.push({event:t,mutation:r})}else{let i=this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);Ys({event:t,mutation:r,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case Y.Font:{try{let i=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);_e(this.iframe)?.fonts.add(i)}catch(i){this.warn(i)}break}case Y.Selection:{if(n){this.lastSelectionData=r;break}this.applySelection(r);break}case Y.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r);break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n){this.usingVirtualDom=!0;let c=_e(this.iframe);if(c&&fu(c,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length)for(let u in this.legacy_missingNodeRetryMap)try{let f=this.legacy_missingNodeRetryMap[u],p=ya(f.node,this.virtualDom,this.mirror);p&&(f.node=p)}catch(f){this.warn(f)}}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{let u=r.getNode(c.id);if(!u)return;let f=r.getNode(c.parentId);if(!f)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&hr(f)&&(f=f.shadowRoot),r.removeNodeFromMap(u),f)try{f.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.length>0&&(f.rules=[])}catch(p){if(p instanceof DOMException)this.warn("parent could not remove child in mutation",f,u,t);else throw p}});let i={...this.legacy_missingNodeRetryMap},s=[],o=c=>{let u=null;return c.nextId&&(u=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},a=c=>{let u=_e(this.iframe);if(!u)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(c.parentId);if(!f)return c.node.type===q.Document?this.newDocumentQueue.push(c):s.push(c);c.node.isShadow&&(hr(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let p=null,d=null;if(c.previousId&&(p=r.getNode(c.previousId)),c.nextId&&(d=r.getNode(c.nextId)),o(c))return s.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;let m=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:u;if(ti(f,r)){this.attachDocumentToIframe(c,f);return}let E=(w,S)=>{if(!this.usingVirtualDom)for(let D of this.config.plugins||[])D.onBuild&&D.onBuild(w,{id:S,replayer:this})},_=qn(c.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:E});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:_,mutation:c};return}let v=r.getMeta(f);if(v&&v.type===q.Element&&v.tagName==="textarea"&&c.node.type===q.Text){let w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);for(let S of w)S.nodeType===f.TEXT_NODE&&f.removeChild(S)}else if(v?.type===q.Document){let w=f;c.node.type===q.DocumentType&&w.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),_.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(p&&p.nextSibling&&p.nextSibling.parentNode?f.insertBefore(_,p.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(_,d):f.insertBefore(_,null):f.appendChild(_),E(_,c.node.id),this.usingVirtualDom&&_.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.length>0&&(f.rules=[]),ti(_,this.mirror)){let w=this.mirror.getId(_),S=this.newDocumentQueue.find(D=>D.parentId===w);S&&(this.attachDocumentToIframe(S,_),this.newDocumentQueue=this.newDocumentQueue.filter(D=>D!==S))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,_,c)};t.adds.forEach(c=>{a(c)});let l=Date.now();for(;s.length;){let c=Wc(s);if(s.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(let u of c)r.getNode(u.value.parentId)?da(u,p=>{a(p)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Uc(t.texts).forEach(c=>{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;f?.rules?.length>0&&(f.rules=[])}}),t.attributes.forEach(c=>{let u=r.getNode(c.id);if(!u)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(let f in c.attributes)if(typeof f=="string"){let p=c.attributes[f];if(p===null)u.removeAttribute(f);else if(typeof p=="string")try{if(f==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{let d=r.getMeta(u),m=qn({...d,attributes:{...d.attributes,...c.attributes}},{doc:u.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),E=u.nextSibling,_=u.parentNode;if(m&&_){_.removeChild(u),_.insertBefore(m,E),r.replace(c.id,m);break}}catch{}u.nodeType!==3&&u.setAttribute(f,p)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){let d=p,m=u;for(let E in d)if(d[E]===!1)m.style.removeProperty(E);else if(d[E]instanceof Array){let _=d[E];m.style.setProperty(E,_[0],_[1])}else{let _=d[E];m.style.setProperty(E,_)}}}})}applyScroll(t,n){let r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);let i=this.mirror.getMeta(r),s=_e(this.iframe);if(r===s)this.iframe.contentWindow?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(i?.type===q.Document)r.defaultView?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{r.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:i,startOffset:s,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!l||!c)return;let u=new Range;u.setStart(l,s),u.setEnd(c,a);let p=l.ownerDocument?.getSelection();return p&&n.add(p),{range:u,selection:p}});n.forEach(i=>i.removeAllRanges()),r.forEach(i=>i&&i.selection?.addRange(i.range))}catch{}}applyStyleSheetMutation(t){let n=null;t.styleId?n=this.styleMirror.getStyle(t.styleId):t.id&&(n=this.mirror.getNode(t.id)?.sheet||null),n&&(t.source===Y.StyleSheetRule?this.applyStyleSheetRule(t,n):t.source===Y.StyleDeclaration&&this.applyStyleDeclaration(t,n))}applyStyleSheetRule(t,n){if(t.adds?.forEach(({rule:r,index:i})=>{try{if(Array.isArray(i)){let{positions:s,index:o}=Is(i);Un(n.cssRules,s).insertRule(r,o)}else{let s=i===void 0?void 0:Math.min(i,n.cssRules.length);n?.insertRule(r,s)}}catch{}}),t.removes?.forEach(({index:r})=>{try{if(Array.isArray(r)){let{positions:i,index:s}=Is(r);Un(n.cssRules,i).deleteRule(s||0)}else n?.deleteRule(r)}catch{}}),t.replace)try{n.replace?.(t.replace)}catch{}if(t.replaceSync)try{n.replaceSync?.(t.replaceSync)}catch{}}applyStyleDeclaration(t,n){if(t.set){let r=Un(n.rules,t.index);r&&r.style&&r.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){let r=Un(n.rules,t.index);r&&r.style&&r.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){let n=this.mirror.getNode(t.id);if(!n)return;t.styles?.forEach(o=>{let a=null,l=null;if(hr(n)?l=n.ownerDocument?.defaultView||null:n.nodeName==="#document"&&(l=n.defaultView),!!l)try{a=new l.CSSStyleSheet,this.styleMirror.add(a,o.styleId),this.applyStyleSheetRule({source:Y.StyleSheetRule,adds:o.rules},a)}catch{}});let r=10,i=0,s=(o,a)=>{let l=a.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);hr(o)?o.shadowRoot.adoptedStyleSheets=l:o.nodeName==="#document"&&(o.adoptedStyleSheets=l),l.length!==a.length&&i<r&&($t(()=>s(o,a),0+100*i),i++)};s(n,t.styleIds)}legacy_resolveMissingNode(t,n,r,i){let{previousId:s,nextId:o}=i,a=s&&t[s],l=o&&t[o];if(a){let{node:c,mutation:u}=a;n.insertBefore(c,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}if(l){let{node:c,mutation:u}=l;n.insertBefore(c,r.nextSibling),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}}moveAndHover(t,n,r,i,s,o){let a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(s,r);let l=pa(a,this.iframe),c=t*l.absoluteScale+l.x,u=n*l.absoluteScale+l.y,f=this.pointers[o];f&&f.pointerEl&&(f.pointerEl.style.left=`${c}px`,f.pointerEl.style.top=`${u}px`),i||this.drawMouseTail({x:c,y:u},o),this.hoverElements(a)}drawMouseTail(t,n){let r=this.pointers[n];if(!r||!r.mouseTail)return;let{lineCap:i,lineWidth:s,strokeStyle:o,duration:a}=this.config.mouseTail===!0?si:Object.assign({},si,this.config.mouseTail),l=()=>{if(!r||!r.mouseTail)return;let c=r.mouseTail,u=c.getContext("2d");!u||!r.tailPositions.length||(u.clearRect(0,0,c.width,c.height),u.beginPath(),u.lineWidth=s,u.lineCap=i,u.strokeStyle=o,u.moveTo(r.tailPositions[0].x,r.tailPositions[0].y),r.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};r.tailPositions.push(t),l(),$t(()=>{n in this.pointers&&(r.tailPositions=r.tailPositions.filter(c=>c!==t),l())},a/this.speedService.state.context.timer.speed)}hoverElements(t){let n=_e(this.iframe),r=this.lastHoveredRootNode||n;r&&typeof r.querySelectorAll=="function"&&r.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let i=t;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type!==J.IncrementalSnapshot?!1:t.data.source>Y.Mutation&&t.data.source<=Y.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(j.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(`Node with id '${n}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(qs,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(qs,...t)}},Pe=Uint8Array,xt=Uint16Array,zi=Uint32Array,Da=new Pe([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]),Ta=new Pe([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]),Tu=new Pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ca=function(e,t){for(var n=new xt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new zi(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},xa=Ca(Da,2),Ra=xa[0],Cu=xa[1];Ra[28]=258,Cu[258]=28;var xu=Ca(Ta,0),Ru=xu[0],Gi=new xt(32768);for(G=0;G<32768;++G)ht=(G&43690)>>>1|(G&21845)<<1,ht=(ht&52428)>>>2|(ht&13107)<<2,ht=(ht&61680)>>>4|(ht&3855)<<4,Gi[G]=((ht&65280)>>>8|(ht&255)<<8)>>>1;var ht,G,Xn=(function(e,t,n){for(var r=e.length,i=0,s=new xt(t);i<r;++i)++s[e[i]-1];var o=new xt(t);for(i=0;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var a;if(n){a=new xt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],f=o[e[i]-1]++<<u,p=f|(1<<u)-1;f<=p;++f)a[Gi[f]>>>l]=c}else for(a=new xt(r),i=0;i<r;++i)a[i]=Gi[o[e[i]-1]++]>>>15-e[i];return a}),ar=new Pe(288);for(G=0;G<144;++G)ar[G]=8;var G;for(G=144;G<256;++G)ar[G]=9;var G;for(G=256;G<280;++G)ar[G]=7;var G;for(G=280;G<288;++G)ar[G]=8;var G,ka=new Pe(32);for(G=0;G<32;++G)ka[G]=5;var G,ku=Xn(ar,9,1),Au=Xn(ka,5,1),oi=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Ye=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(t&7)&n},ai=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(t&7)},Ou=function(e){return(e/8>>0)+(e&7&&1)},Aa=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof xt?xt:e instanceof zi?zi:Pe)(n-t);return r.set(e.subarray(t,n)),r},Iu=function(e,t,n){var r=e.length,i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Pe(r*3));var o=function(Q){var He=t.length;if(Q>He){var Ne=new Pe(Math.max(He*2,Q));Ne.set(t),t=Ne}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,f=n.d,p=n.m,d=n.n,m=r*8;do{if(!u){n.f=a=Ye(e,l,1);var E=Ye(e,l+1,3);if(l+=3,E)if(E==1)u=ku,f=Au,p=9,d=5;else if(E==2){var S=Ye(e,l,31)+257,D=Ye(e,l+10,15)+4,C=S+Ye(e,l+5,31)+1;l+=14;for(var V=new Pe(C),K=new Pe(19),O=0;O<D;++O)K[Tu[O]]=Ye(e,l+O*3,7);l+=D*3;var ie=oi(K),$=(1<<ie)-1;if(!s&&l+C*(ie+7)>m)break;for(var pe=Xn(K,ie,1),O=0;O<C;){var ge=pe[Ye(e,l,$)];l+=ge&15;var _=ge>>>4;if(_<16)V[O++]=_;else{var ce=0,ke=0;for(_==16?(ke=3+Ye(e,l,3),l+=2,ce=V[O-1]):_==17?(ke=3+Ye(e,l,7),l+=3):_==18&&(ke=11+Ye(e,l,127),l+=7);ke--;)V[O++]=ce}}var rt=V.subarray(0,S),he=V.subarray(S);p=oi(rt),d=oi(he),u=Xn(rt,p,1),f=Xn(he,d,1)}else throw"invalid block type";else{var _=Ou(l)+4,v=e[_-4]|e[_-3]<<8,w=_+v;if(w>r){if(s)throw"unexpected EOF";break}i&&o(c+v),t.set(e.subarray(_,w),c),n.b=c+=v,n.p=l=w*8;continue}if(l>m)throw"unexpected EOF"}i&&o(c+131072);for(var X=(1<<p)-1,Ge=(1<<d)-1,it=p+d+18;s||l+it<m;){var ce=u[ai(e,l)&X],y=ce>>>4;if(l+=ce&15,l>m)throw"unexpected EOF";if(!ce)throw"invalid length/literal";if(y<256)t[c++]=y;else if(y==256){u=null;break}else{var g=y-254;if(y>264){var O=y-257,N=Da[O];g=Ye(e,l,(1<<N)-1)+Ra[O],l+=N}var T=f[ai(e,l)&Ge],z=T>>>4;if(!T)throw"invalid distance";l+=T&15;var he=Ru[z];if(z>3){var N=Ta[z];he+=ai(e,l)&(1<<N)-1,l+=N}if(l>m)throw"unexpected EOF";i&&o(c+131072);for(var I=c+g;c<I;c+=4)t[c]=t[c-he],t[c+1]=t[c+1-he],t[c+2]=t[c+2-he],t[c+3]=t[c+3-he];c=I}}n.l=u,n.p=l,n.b=c,u&&(a=1,n.m=p,n.d=f,n.n=d)}while(!a);return c==t.length?t:Aa(t,0,c)},Fu=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"};function Lu(e,t){return Iu((Fu(e),e.subarray(2,-4)),t)}function Pu(e,t){for(var n=e.length,r=new Pe(e.length+(e.length>>>1)),i=0,s=function(c){r[i++]=c},o=0;o<n;++o){if(i+5>r.length){var a=new Pe(i+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);s(l)}return Aa(r,0,i)}function Wu(e,t){var n="";if(typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((i&31)<<6|e[r++]&63):i<240?n+=String.fromCharCode((i&15)<<12|(e[r++]&63)<<6|e[r++]&63):(i=((i&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,n+=String.fromCharCode(55296|i>>10,56320|i&1023))}return n}var Ks="v1",Uu=e=>{if(typeof e!="string")return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch{}try{let t=JSON.parse(Wu(Lu(Pu(e,!0))));if(t.v===Ks)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${Ks}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}},Oa=(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))(Oa||{}),Hi=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Hi||{});function Qs(e){let t="";return Object.keys(e).forEach(n=>{t+=`${n}: ${e[n]};`}),t}function On(e,t=2){let n=String(e),r=Math.pow(10,t-1);if(e<r)for(;String(r).length>n.length;)n=`0${e}`;return n}var Ia=1e3,Yi=60*Ia,Js=60*Yi;function Zs(e){if(e<=0)return"00:00";let t=Math.floor(e/Js);e=e%Js;let n=Math.floor(e/Yi);e=e%Yi;let r=Math.floor(e/Ia);return t?`${On(t)}:${On(n)}:${On(r)}`:`${On(n)}:${On(r)}`}function Bu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function Vu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function $s(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function zu(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function eo(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function Gu(e){return e.type!==Oa.IncrementalSnapshot?!1:e.data.source>Hi.Mutation&&e.data.source<=Hi.Input}function Hu(e,t){let n=[],r=e[0].timestamp;for(let i of e)Gu(i)&&(i.timestamp-r>t&&n.push([r,i.timestamp]),r=i.timestamp);return n}var Yu=or('<div><input type="checkbox" class="svelte-184lr04"/> <label class="svelte-184lr04"></label> <span class="label svelte-184lr04"> </span></div>');function ju(e,t){qr(t,!0);let n=we(t,"checked",15);var r=Yu();let i;var s=Xe(r);yc(s);var o=Oe(s,2),a=Oe(o,2),l=Xe(a,!0);qe(a),qe(r),cn(()=>{i=Ti(r,1,"switch svelte-184lr04",null,i,{disabled:t.disabled}),gt(s,"id",t.id),s.disabled=t.disabled,gt(o,"for",t.id),gr(l,t.label)}),bc(s,n),mt(e,r),Xr()}var to=or("<div></div>"),qu=sa(`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
|
|
8
8
|
512q0 53.00224-37.49888 90.50112t-90.50112
|
|
9
9
|
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
|
|
10
10
|
37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0
|
|
@@ -17,17 +17,17 @@ or you can use record.mirror to access the mirror instance during recording.`,_s
|
|
|
17
17
|
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
|
|
18
18
|
213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
|
|
19
19
|
17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
|
|
20
|
-
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"></path></svg>`),
|
|
21
|
-
512l-388.66944-233.32864 0 466.65728z"></path></svg>`),
|
|
20
|
+
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"></path></svg>`),Xu=sa(`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M170.65984 896l0-768 640 384zM644.66944
|
|
21
|
+
512l-388.66944-233.32864 0 466.65728z"></path></svg>`),Ku=or("<button> </button>"),Qu=or(`<div class="rr-controller svelte-14v7dbr"><div class="rr-timeline svelte-14v7dbr"><span class="rr-timeline__time svelte-14v7dbr"> </span> <div role="slider" tabindex="0"><div class="rr-progress__step svelte-14v7dbr"></div> <!> <!> <div class="rr-progress__handler svelte-14v7dbr"></div></div> <span class="rr-timeline__time svelte-14v7dbr"> </span></div> <div class="rr-controller__btns svelte-14v7dbr"><button class="svelte-14v7dbr"><!></button> <!> <!> <button aria-label="fullscreen" class="svelte-14v7dbr"><svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
|
|
22
22
|
18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
|
|
23
23
|
0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
|
|
24
24
|
224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
|
|
25
25
|
48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
|
|
26
26
|
48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
|
|
27
|
-
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg></button></div></div>`);function
|
|
28
|
-
${b(
|
|
29
|
-
2px;transform: translate(-50%, -50%);background: ${b(
|
|
30
|
-
${b(
|
|
27
|
+
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg></button></div></div>`);function Ju(e,t){qr(t,!0);let n=we(t,"skipInactive",15),r=we(t,"speed",31,()=>Tt(t.speedOption.length?t.speedOption[0]:1)),i=we(t,"tags",19,()=>({})),s=me(0);Pn(()=>{t.onuiupdatecurrenttime?.({payload:b(s)})});let o=null,a=me("paused");Pn(()=>{t.onuiupdateplayerstate?.({payload:b(a)})});let l=me("normal"),c=me(void 0),u,f=!1,p=null,d=null,m=me(Tt(t.replayer.getMetaData())),E=Ut(()=>Math.min(1,b(s)/b(m).totalTime)),_=Ut(()=>`${100*b(E)}%`);Pn(()=>{t.onuiupdateprogress?.({payload:b(E)})});function v(y,g,N){let T=g-y;return(100-(g-N)/T*100).toFixed(2)}let w=Ut(()=>{let{context:y}=t.replayer.service.state,g=y.events.length,N=y.events[0].timestamp,T=y.events[g-1].timestamp,z=[];return y.events.forEach(I=>{if(I.type===J.Custom){let Q={name:I.data.tag,background:i()[I.data.tag]||"rgb(73, 80, 246)",position:`${v(N,T,I.timestamp)}%`};z.push(Q)}}),z}),S=Ut(()=>{try{let{context:y}=t.replayer.service.state,g=y.events.length,N=y.events[0].timestamp,T=y.events[g-1].timestamp,z=Hu(y.events,t.replayer.config.inactivePeriodThreshold),I=(Q,He,Ne,k)=>{let H=He-Q;return((k-Ne)/H*100).toFixed(2)};return z.map(Q=>({name:"inactive period",background:t.inactiveColor,position:`${v(N,T,Q[0])}%`,width:`${I(N,T,Q[0],Q[1])}%`}))}catch{return[]}}),D=()=>{C();function y(){ne(s,t.replayer.getCurrentTime(),!0),f&&b(s)>=f&&(d?$(d.start,d.end,!0,void 0):(t.replayer.pause(),p&&(p(),p=null))),b(s)<b(m).totalTime&&(o=requestAnimationFrame(y))}o=requestAnimationFrame(y)},C=()=>{o&&(cancelAnimationFrame(o),o=null)},V=()=>{switch(b(a)){case"playing":O();break;case"paused":K();break}},K=()=>{b(a)==="paused"&&(u?(t.replayer.play(),u=!1):t.replayer.play(b(s)))},O=()=>{b(a)==="playing"&&(t.replayer.pause(),f=!1)},ie=(y,g)=>{ne(s,y,!0),f=!1,u=!1,(typeof g=="boolean"?g:b(a)==="playing")?t.replayer.play(y):t.replayer.pause(y)},$=(y,g,N=!1,T=void 0)=>{N?d={start:y,end:g}:d=null,ne(s,y,!0),f=g,p=T||null,t.replayer.play(y)},pe=y=>{if(b(l)==="skipping")return;let g=b(c).getBoundingClientRect(),T=(y.clientX-g.left)/g.width;T<0?T=0:T>1&&(T=1);let z=b(m).totalTime*T;ie(z)},ge=y=>{b(l)!=="skipping"&&(y.key==="ArrowLeft"?ie(b(s)-5):y.key==="ArrowRight"&&ie(b(s)+5))},ce=y=>{let g=b(a)==="playing";r(y),g&&t.replayer.pause(),t.replayer.setConfig({speed:r()}),g&&t.replayer.play(b(s))},ke=()=>{n(!n())},rt=()=>Promise.resolve().then(()=>{ne(m,t.replayer.getMetaData(),!0)});us(()=>{ne(a,t.replayer.service.state.value,!0),ne(l,t.replayer.speedService.state.value,!0),t.replayer.on("state-change",y=>{let{player:g,speed:N}=y;if(g?.value&&b(a)!==g.value)switch(ne(a,g.value,!0),b(a)){case"playing":D();break;case"paused":C();break}N?.value&&b(l)!==N.value&&ne(l,N.value,!0)}),t.replayer.on("finish",()=>{u=!0,p&&(p(),p=null)}),t.autoPlay&&t.replayer.play()}),Pn(()=>{n()!==t.replayer.config.skipInactive&&t.replayer.setConfig({skipInactive:n()})}),la(()=>{t.replayer.pause(),C()});var he={toggle:V,play:K,pause:O,goto:ie,playRange:$,setSpeed:ce,toggleSkipInactive:ke,triggerUpdateMeta:rt},X=rc(),Ge=Dl(X);{var it=y=>{var g=Qu(),N=Xe(g),T=Xe(N),z=Xe(T,!0);qe(T);var I=Oe(T,2);let Q;gt(I,"aria-valuemin",0);var He=Xe(I),Ne=Oe(He,2);$r(Ne,17,()=>b(S),Zr,(ue,te)=>{var ye=to();cn(()=>{gt(ye,"title",b(te).name),fn(ye,`width: ${b(te).width??""};height: 4px;position: absolute;background: ${b(te).background??""};left:
|
|
28
|
+
${b(te).position??""};`)}),mt(ue,ye)});var k=Oe(Ne,2);$r(k,17,()=>b(w),Zr,(ue,te)=>{var ye=to();cn(()=>{gt(ye,"title",b(te).name),fn(ye,`width: 10px;height: 5px;position: absolute;top:
|
|
29
|
+
2px;transform: translate(-50%, -50%);background: ${b(te).background??""};left:
|
|
30
|
+
${b(te).position??""};`)}),mt(ue,ye)});var H=Oe(k,2);qe(I),yr(I,ue=>ne(c,ue),()=>b(c));var st=Oe(I,2),ut=Xe(st,!0);qe(st),qe(N);var Cn=Oe(N,2),lr=Xe(Cn),Fa=Xe(lr);{var La=ue=>{var te=qu();mt(ue,te)},Pa=ue=>{var te=Xu();mt(ue,te)};Mi(Fa,ue=>{b(a)==="playing"?ue(La):ue(Pa,-1)})}qe(lr);var ps=Oe(lr,2);$r(ps,17,()=>t.speedOption,Zr,(ue,te)=>{var ye=Ku();let vs;var Ua=Xe(ye);qe(ye),cn(()=>{ye.disabled=b(l)==="skipping",vs=Ti(ye,1,"svelte-14v7dbr",null,vs,{active:b(te)===r()&&b(l)!=="skipping"}),gr(Ua,`${b(te)??""}x`)}),xn("click",ye,()=>ce(b(te))),mt(ue,ye)});var ms=Oe(ps,2);{let ue=Ut(()=>b(l)==="skipping");ju(ms,{id:"skip",get disabled(){return b(ue)},label:"skip inactive",get checked(){return n()},set checked(te){n(te)}})}var Wa=Oe(ms,2);qe(Cn),qe(g),cn((ue,te)=>{gr(z,ue),Q=Ti(I,1,"rr-progress svelte-14v7dbr",null,Q,{disabled:b(l)==="skipping"}),gt(I,"aria-valuenow",b(s)),gt(I,"aria-valuemax",b(m).totalTime),fn(He,`width: ${b(_)??""}`),fn(H,`left: ${b(_)??""}`),gr(ut,te)},[()=>Zs(b(s)),()=>Zs(b(m).totalTime)]),xn("click",I,pe),xn("keydown",I,ge),xn("click",lr,V),xn("click",Wa,()=>t.onfullscreen?.()),mt(y,g)};Mi(Ge,y=>{t.showController&&y(it)})}return mt(e,X),Xr(he)}$l(["click","keydown"]);var Zu=new Set(["$$slots","$$events","$$legacy","width","height","maxScale","events","skipInactive","autoPlay","speedOption","speed","showController","tags","inactiveColor"]),$u=or('<div class="rr-player"><div class="rr-player__frame"></div> <!></div>');function ef(e,t){qr(t,!0);let n=we(t,"width",15,1024),r=we(t,"height",15,576),i=we(t,"maxScale",3,1),s=we(t,"skipInactive",7,!0),o=we(t,"autoPlay",3,!0),a=we(t,"speedOption",19,()=>[1,2,4,8]),l=we(t,"speed",3,1),c=we(t,"showController",3,!0),u=we(t,"tags",19,()=>({})),f=we(t,"inactiveColor",3,"#D4D4D4"),p=Sc(t,Zu),d=me(void 0),m=()=>b(d).getMirror(),E=80,_,v,w,S=n(),D=r(),C=me(void 0),V=Ut(()=>Qs({width:`${n()}px`,height:`${r()}px`})),K=Ut(()=>Qs({width:`${n()}px`,height:`${r()+(c()?E:0)}px`})),O=(k,H)=>{let st=n()/H.width,ut=r()/H.height,Cn=[st,ut];i()&&Cn.push(i()),k.style.transform=`scale(${Math.min(...Cn)})translate(-50%, -50%)`},ie=()=>{O(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight})},$=()=>{_&&($s()?Vu():Bu(_))},pe={},ge=(k,H)=>{switch(b(d).on(k,H),k){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":pe[k]||(pe[k]=[]),pe[k].push(H)}};function ce(k,H){if(pe[k])for(let st of pe[k])st(H)}let ke=k=>{b(d).addEvent(k),b(C).triggerUpdateMeta()},rt=()=>b(d).getMetaData(),he=()=>b(d),X=()=>{b(C).toggle()},Ge=k=>{b(C).setSpeed(k)},it=()=>{b(C).toggleSkipInactive()},y=()=>{b(C).play()},g=()=>{b(C).pause()},N=(k,H)=>{b(C).goto(k,H)},T=(k,H,st=!1,ut=void 0)=>{b(C).playRange(k,H,st,ut)};us(()=>{if(a()!==void 0&&eo(a())!=="array")throw new Error("speedOption must be array");if(a().forEach(k=>{if(eo(k)!=="number")throw new Error("item of speedOption must be number")}),a().indexOf(l())<0)throw new Error(`speed must be one of speedOption,
|
|
31
31
|
current config:
|
|
32
32
|
{
|
|
33
33
|
...
|
|
@@ -35,7 +35,7 @@ or you can use record.mirror to access the mirror instance during recording.`,_s
|
|
|
35
35
|
speedOption: [${a().toString()}]
|
|
36
36
|
...
|
|
37
37
|
}
|
|
38
|
-
`);
|
|
38
|
+
`);ne(d,new Vi(t.events,{speed:l(),skipInactive:s(),root:v,unpackFn:Uu,...p}),!0),b(d).on("resize",k=>{O(b(d).wrapper,k)}),w=zu(()=>{$s()?setTimeout(()=>{S=n(),D=r(),n(_.offsetWidth),r(_.offsetHeight-(c()?E:0)),O(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight})},0):(n(S),r(D),O(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight}))})}),la(()=>{w&&w()});var z={getMirror:m,triggerResize:ie,toggleFullscreen:$,addEventListener:ge,addEvent:ke,getMetaData:rt,getReplayer:he,toggle:X,setSpeed:Ge,toggleSkipInactive:it,play:y,pause:g,goto:N,playRange:T},I=$u(),Q=Xe(I);yr(Q,k=>v=k,()=>v);var He=Oe(Q,2);{var Ne=k=>{yr(Ju(k,{get replayer(){return b(d)},get showController(){return c()},get autoPlay(){return o()},get speedOption(){return a()},get tags(){return u()},get inactiveColor(){return f()},onfullscreen:()=>$(),onuiupdatecurrenttime:H=>ce("ui-update-current-time",H),onuiupdateprogress:H=>ce("ui-update-progress",H),onuiupdateplayerstate:H=>ce("ui-update-player-state",H),get skipInactive(){return s()},set skipInactive(H){s(H)}}),H=>ne(C,H,!0),()=>b(C))};Mi(He,k=>{b(d)&&k(Ne)})}return qe(I),yr(I,k=>_=k,()=>_),cn(()=>{fn(I,b(K)),fn(Q,b(V))}),mt(e,I),Xr(z)}var tf=lc(ef),Vr=class extends tf{constructor(t){super({target:t.target,props:t.data||t.props})}};exports.Player=Vr;exports.default=Vr;
|
|
39
39
|
/*! *****************************************************************************
|
|
40
40
|
Copyright (c) Microsoft Corporation.
|
|
41
41
|
|