tdem-web-sdk 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/lib/packages/core/src/index.d.ts +4 -0
- package/lib/packages/core/src/interface/event.d.ts +2 -0
- package/lib/packages/core/src/pipes/event-pipes.d.ts +6 -5
- package/lib/packages/core/src/pipes/tdem-sample-gate.d.ts +3 -23
- package/lib/packages/core/src/sample/evaluate.d.ts +2 -0
- package/lib/packages/core/src/sample/eventTypes.d.ts +9 -0
- package/lib/packages/core/src/sample/resolve.d.ts +2 -0
- package/lib/packages/core/src/sample/types.d.ts +51 -0
- package/lib/packages/web-sdk/src/interface/index.d.ts +5 -6
- package/lib/packages/web-sdk/src/plugins/session-replay/constants.d.ts +13 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/event-buffer.d.ts +10 -2
- package/lib/packages/web-sdk/src/plugins/session-replay/replay-handoff.d.ts +20 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/replay-policy.d.ts +2 -2
- package/lib/packages/web-sdk/src/plugins/session-replay/uploader.d.ts +13 -5
- package/lib/packages/web-sdk/src/plugins/tdem-config.d.ts +1 -8
- package/lib/packages/web-sdk/src/tdem.d.ts +6 -1
- package/lib/packages/web-sdk/src/transport/browser-transport.d.ts +1 -1
- package/lib/tdem.f.min.js +3 -3
- package/lib/tdem.global.min.js +3 -3
- package/lib/tdem.ie.min.js +3 -3
- package/lib/tdem.min.js +3 -3
- package/package.json +1 -1
package/lib/tdem.ie.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ===========================================================================
|
|
3
|
-
* tdem-web-sdk@1.0.
|
|
3
|
+
* tdem-web-sdk@1.0.12 (c) 2026 TencentCloud Real User Monitoring.
|
|
4
4
|
* Author pumpkincai.
|
|
5
|
-
* Last Release Time
|
|
5
|
+
* Last Release Time Tue Oct 20 2026 16:42:37 GMT+0800 (China Standard Time).
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
* Thanks for supporting TDEM!
|
|
8
8
|
* ===========================================================================
|
|
9
9
|
**/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function S(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function i(e){w(r,t,n,i,o,"next",e)}function o(e){w(r,t,n,i,o,"throw",e)}i(void 0)})}}function u(e,t,n){t=U(t);var r=e,e=z()?Reflect.construct(t,n||[],U(e).constructor):t.apply(e,n);if(!e||"object"!=typeof e&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t,n){var r;return z()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&G(t,n.prototype),t)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function k(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ie(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a["return"]||a["return"]()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=K(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e,t,n){return(t=Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(){return(F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=J(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(z=function(){return!!e})()}function B(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach(function(e){N(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function W(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function H(){var p,m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,a,s,u,l,c,d,f,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return q(t,"_invoke",(i=e,o=n,c=r||[],d=!1,f={p:l=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,t){return a=e,s=0,u=p,f.n=t,g}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(d&&1===t&&h(t,n),s=t,u=n;(m=s<2?p:u)||!d;){a||(s?s<3?(1<s&&(f.n=-1),h(s,u)):f.n=u:f.v=u);try{if(l=2,a){if(m=a[e=s?e:"next"]){if(!(m=m.call(a,u)))throw TypeError("iterator result is not an object");if(!m.done)return m;u=m.value,s<2&&(s=0)}else 1===s&&(m=a["return"])&&m.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),s=1);a=p}else if((m=(d=f.n<0)?u:i.call(o,f))!==g)break}catch(m){a=p,s=1,u=m}finally{l=1}}return{value:m,done:d}}),!0),t;function h(e,t){for(s=e,u=t,m=0;!d&&l&&!n&&m<c.length;m++){var n,r=c[m],i=f.p,o=r[2];3<e?(n=o===t)&&(u=r[(s=r[4])?5:s=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(s=0,f.v=t,f.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,f.n=o,s=0))}if(n||1<e)return g;throw d=!0,t}}var g={};function v(){}function i(){}function o(){}m=Object.getPrototypeOf;var e=[][t]?m(m([][t]())):(q(m={},t,function(){return this}),m),a=o.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,q(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return q(a,"constructor",i.prototype=o),q(o,"constructor",i),q(o,n,i.displayName="GeneratorFunction"),q(a),q(a,n,"Generator"),q(a,t,function(){return this}),q(a,"toString",function(){return"[object Generator]"}),(H=function(){return{w:r,m:s}})()}function q(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(q=function(e,t,n,r){function i(t,n){q(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,r)}function V(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function G(e,t){return(G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||K(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=U(e)););return e}function $(e,t,n,r){var i=F(U(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ne(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||K(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){e=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);e=t.call(e,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){var n;if(e)return"string"==typeof e?y(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}function Y(e){var n="function"==typeof Map?new Map:void 0;return(Y=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(Z_){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return Le(e,arguments,U(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),G(t,e)})(e)}var g=function(e){try{return!!e()}catch(w){return!0}},R=void 0,Q=void 0,v=(R({target:"Array",stat:!0},{isArray:Q}),void 0),ee=v({}.toString),te=v("".slice),ne=function(e){return te(ee(e),8,-1)},re=(Array.isArray,"object"==("undefined"==typeof document?"undefined":T(document))&&document.all),_=void 0===re&&re!==undefined?function(e){return"function"==typeof e||e===re}:function(e){return"function"==typeof e},O=function(e){return"object"==T(e)?null!==e:_(e)},ie=function(e){return null===e||e===undefined},oe=TypeError,ae=function(e){if(ie(e))throw new oe("Can't call method on "+e);return e},se=Object,ue=function(e){return se(ae(e))},le=void 0,ce=(R({target:"Math",stat:!0},{trunc:le}),Math.ceil,function(e){e=+e;return e!=e||0==e?0:le(e)}),de=Math.min,fe=function(e){e=ce(e);return 0<e?de(e,9007199254740991):0},he=function(e){return fe(e.length)},pe=TypeError,me=function(e){if(9007199254740991<e)throw new pe("Maximum allowed index exceeded");return e},x=void 0,ge=x.document,ve=O(ge)&&O(ge.createElement),ye=function(e){return ve?ge.createElement(e):{}},f=void 0,we=(f||g(function(){return 7!==Object.defineProperty(ye("div"),"a",{get:function(){return 7}}).a}),f&&g(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})),be=String,ke=TypeError,E=function(e){if(O(e))return e;throw new ke(be(e)+" is not an object")},Se=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),_e=Function.prototype.call,M=Se?_e.bind(_e):function(){return _e.apply(_e,arguments)},Ee=function(e,t){return arguments.length<2?(n=x[e],_(n)?n:undefined):x[e]&&x[e][t];var n},Ce=v({}.isPrototypeOf),Re=String,Oe=function(e){try{return Re(e)}catch(w){return"Object"}},xe=TypeError,Te=function(e){if(_(e))return e;throw new xe(Oe(e)+" is not a function")},Me=void 0,Fe=!g(function(){Reflect.apply(function(){})}),Fe=(R({target:"Reflect",stat:!0,forced:Fe},{apply:function(e,t,n){return Me(Te(e),t,E(n))}}),Function.prototype),Ue=Fe.apply,Fe=Fe.call,je=("object"==("undefined"==typeof Reflect?"undefined":T(Reflect))&&Reflect.apply||Se&&Fe.bind(Ue),v({}.hasOwnProperty)),I=Object.hasOwn||function(e,t){return je(ue(e),t)},Ue=Function.prototype,Fe=f&&Object.getOwnPropertyDescriptor,ze=I(Ue,"name"),Be={EXISTS:ze,PROPER:ze&&"something"===function(){}.name,CONFIGURABLE:ze&&(!f||Fe(Ue,"name").configurable)},ze=function(e,t){var n=[][e];return!!n&&g(function(){n.call(null,t||function(){return 1},1)})},We=void 0,He=void 0,qe=v([].join),Ue=We!==Object||!ze("join",","),Fe=(R({target:"Array",proto:!0,forced:Ue},{join:function(e){return qe(He(this),e===undefined?",":e)}}),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function Ve(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var Ge=Object.defineProperty,Je=function(e,t){try{Ge(x,e,{value:t,configurable:!0,writable:!0})}catch(S){x[e]=t}return t},$e=Ve(function(e){e=e.exports=x["__core-js_shared__"]||Je("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Ze=v(Function.toString);_($e.inspectSource)||($e.inspectSource=function(e){return Ze(e)});var Ke,Ye=$e.inspectSource,Xe=void 0,Qe=Xe("toStringTag"),et=Object,tt="Arguments"===ne(function(){return arguments}()),nt=function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=et(e),Qe))?n:tt?ne(e):"Object"===(t=ne(e))&&_(e.callee)?"Arguments":t},rt=String,C=function(e){if("Symbol"===nt(e))throw new TypeError("Cannot convert a Symbol value to a string");return rt(e)},Ue=(Ke=!1,(Ue=/[ac]/).exec=function(){return Ke=!0,/./.exec.apply(this,arguments)},!0===Ue.test("abc")&&Ke),it=/./.test,Ue=(R({target:"RegExp",proto:!0,forced:!Ue},{test:function(e){var t=E(this),e=C(e),n=t.exec;return _(n)?null!==(n=M(n,t,e))&&(E(n),!0):M(it,t,e)}}),x.WeakMap),Ue=_(Ue)&&/native code/.test(String(Ue)),ot=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},at=void 0,st=f?function(e,t,n){return at.f(e,t,ot(1,n))}:function(e,t,n){return e[t]=n,e},ut=void 0,lt=ut.f,ct=(R({target:"Object",stat:!0,forced:Object.defineProperties!==lt,sham:!f},{defineProperties:lt}),void 0),lt=g(function(){ct(1)}),lt=(R({target:"Object",stat:!0,forced:lt},{keys:function(e){return ct(ue(e))}}),function(e){if("Function"===ne(e))return v(e)}),dt=Math.max,ft=Math.min,ht=function(e,t){e=ce(e);return e<0?dt(e+t,0):ft(e,t)},e=function(s){return function(e,t,n){var r=He(e),i=he(r);if(0!==i){var o,a=ht(n,i);if(s&&t!=t){for(;a<i;)if((o=r[a++])!=o)return!0}else for(;a<i;a++)if((s||a in r)&&r[a]===t)return s||a||0}return!s&&-1}},e={includes:e(!0),indexOf:e(!1)},pt=e.indexOf,mt=lt([].indexOf),gt=!!mt&&1/mt([1],1,-0)<0,t=gt||!ze("indexOf");R({target:"Array",proto:!0,forced:t},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return gt?mt(this,e,t)||0:pt(this,e,t)}});var vt,yt={},wt=(v([].push),["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),bt=(Object.keys,f&&!we&&Object.defineProperties,Ee("document","documentElement")),t=void 0,kt=t("IE_PROTO"),St=function(){},_t=function(e){return"<script>"+e+"<\/script>"},Et=function(e){e.write(_t("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ct=function(){try{vt=new ActiveXObject("htmlfile")}catch(u){}var e;Ct="undefined"==typeof document||document.domain&&vt?Et(vt):((e=ye("iframe")).style.display="none",bt.appendChild(e),e.src=String("javascript:"),(e=e.contentWindow.document).open(),e.write(_t("document.F=Object")),e.close(),e.F);for(var t=wt.length;t--;)delete Ct.prototype[wt[t]];return Ct()},Rt=(yt[kt]=!0,Object.create||function(e,t){var n;return null!==e?(St.prototype=E(e),n=new St,St.prototype=null,n[kt]=e):n=Ct(),t===undefined?n:ut.f(n,t)});R({target:"Object",stat:!0,sham:!f},{create:Rt});var Ot,xt,Tt,Mt,It=Object.create||Object,we=function(e,t){return $e[e]||($e[e]=t||It(null))},At=0,Pt=Math.random(),Lt=v(1.1.toString),Dt=function(e){return"Symbol("+(e===undefined?"":e)+")_"+Lt(++At+Pt,36)},Nt=(we("keys"),x.TypeError),Ft=x.WeakMap,Ut=Ue||$e.state?((Tt=$e.state||($e.state=new Ft)).get=Tt.get,Tt.has=Tt.has,Tt.set=Tt.set,Ot=function(e,t){if(Tt.has(e))throw new Nt("Object already initialized");return t.facade=e,Tt.set(e,t),t},xt=function(e){return Tt.get(e)||{}},function(e){return Tt.has(e)}):(Mt=t("state"),yt[Mt]=!0,Ot=function(e,t){if(I(e,Mt))throw new Nt("Object already initialized");return t.facade=e,st(e,Mt,t),t},xt=function(e){return I(e,Mt)?e[Mt]:{}},function(e){return I(e,Mt)}),jt={set:Ot,get:xt,has:Ut,enforce:function(e){return Ut(e)?xt(e):Ot(e,{})},getterFor:function(t){return function(e){if(O(e)&&(e=xt(e)).type===t)return e;throw new Nt("Incompatible receiver, "+t+" required")}}},zt=Ve(function(e){var r=Be.CONFIGURABLE,i=jt.enforce,t=jt.get,o=String,a=Object.defineProperty,s=v("".slice),u=v("".replace),l=v([].join),c=f&&!g(function(){return 8!==a(function(){},"length",{value:8}).length}),d=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===s(o(t),0,7)&&(t="["+u(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!I(e,"name")||r&&e.name!==t)&&(f?a(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&I(n,"arity")&&e.length!==n.arity&&a(e,"length",{value:n.arity});try{n&&I(n,"constructor")&&n.constructor?f&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(z){}n=i(e);return I(n,"source")||(n.source=l(d,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return _(this)&&t(this).source||Ye(this)},"toString")}),Bt=function(e,t,n){return n.get&&zt(n.get,t,{getter:!0}),n.set&&zt(n.set,t,{setter:!0}),at.f(e,t,n)},Ft=Be.EXISTS,Wt=Function.prototype,Ht=v(Wt.toString),qt=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Vt=v(qt.exec),Gt=(f&&!Ft&&Bt(Wt,"name",{configurable:!0,get:function(){try{return Vt(qt,Ht(this))[1]}catch(y){return""}}}),function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(_(n)&&zt(n,o,r),r.global)i?e[t]=n:Je(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(D){}i?e[t]=n:at.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}),Jt=void 0,$t=Xe("species"),Zt=RegExp.prototype,Ft=function(r,e,t,n){var a,i=Xe(r),s=!g(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=s&&!g(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[$t]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});s&&o&&!t||(a=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===Jt||o===Zt.exec?s&&!i?{done:!0,value:M(a,t,n,r)}:{done:!0,value:M(e,n,t,r)}:{done:!1}}),Gt(String.prototype,r,o[0]),Gt(Zt,i,o[1])),n&&st(Zt[i],"sham",!0)},Kt=v("".charAt),Yt=v("".charCodeAt),Xt=v("".slice),Wt=function(i){return function(e,t){var n,e=C(ae(e)),t=ce(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=Yt(e,t))<55296||56319<n||t+1===r||(r=Yt(e,t+1))<56320||57343<r?i?Kt(e,t):n:i?Xt(e,t,t+2):r-56320+(n-55296<<10)+65536}},Wt={codeAt:Wt(!1),charAt:Wt(!0)},Qt=Wt.charAt,en=function(e,t,n){return t+(n&&Qt(e,t).length||1)},tn=function(e,t){t=e[t];return ie(t)?undefined:Te(t)},nn=Math.floor,rn=v("".charAt),on=v("".replace),an=v("".slice),sn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,un=/\$([$&'`]|\d{1,2})/g,ln=x.RegExp,cn={correct:!g(function(){var e=!0;try{ln(".","d")}catch(k){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(ln.prototype,"flags").get.call(n)!==i||r!==i})},dn=function(){var e=E(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fn=(f&&!cn.correct&&(Bt(RegExp.prototype,"flags",{configurable:!0,get:dn}),cn.correct=!0),RegExp.prototype),hn=cn.correct?function(e){return e.flags}:function(e){return cn.correct||!Ce(fn,e)||I(e,"flags")?e.flags:M(dn,e)},pn=TypeError,mn=function(e,t){var n=e.exec;if(_(n))return null!==(n=M(n,e,t))&&E(n),n;if("RegExp"===ne(e))return M(Jt,e,t);throw new pn("RegExp#exec called on incompatible receiver")},gn=Xe("replace"),vn=Math.max,yn=Math.min,wn=v([].concat),bn=v([].push),kn=v("".indexOf),Sn=v("".slice),n="$0"==="a".replace(/./,"$0"),_n=!!/./[gn]&&""===/./[gn]("a","$0"),En=(Ft("replace",function(e,b,k){var S=_n?"$":"$0";return[function(e,t){var n=ae(this),r=O(e)?tn(e,gn):undefined;return r?M(r,e,n,t):M(b,C(n),e,t)},function(e,t){var n=E(this),r=C(e),i=_(t),e=(i||(t=C(t)),C(hn(n)));if("string"==typeof t&&!~kn(t,S)&&!~kn(t,"$<")&&!~kn(e,"y")){var o=k(b,n,r,t);if(o.done)return o.value}var a,s=!!~kn(e,"g");s&&(a=!!~kn(e,"u")||!!~kn(e,"v"),n.lastIndex=0);for(var u,l=[];null!==(u=mn(n,r))&&(bn(l,u),s);)""===C(u[0])&&(n.lastIndex=en(r,fe(n.lastIndex),a));for(var c,d="",f=0,h=0;h<l.length;h++){for(var p=C((u=l[h])[0]),m=vn(yn(ce(u.index),r.length),0),g=[],v=1;v<u.length;v++)bn(g,(c=u[v])===undefined?c:String(c));var y=u.groups,w=i?(w=wn([p],g,m,r),y!==undefined&&bn(w,y),C(Me(t,undefined,w))):function(o,a,s,u,l,e){var c=s+o.length,d=u.length,t=un;return l!==undefined&&(l=ue(l),t=sn),on(e,t,function(e,t){var n;switch(rn(t,0)){case"$":return"$";case"&":return o;case"`":return an(a,0,s);case"'":return an(a,c);case"<":n=l[an(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(d<i)return 0!==(r=nn(i/10))&&r<=d?u[r-1]===undefined?rn(t,1):u[r-1]+rn(t,1):e;n=u[i-1]}return n===undefined?"":n})}(p,r,m,g,y,t);f<=m&&(d+=Sn(r,f,m)+w,f=m+p.length)}return d+Sn(r,f)}]},!!g(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!n||_n),function(){}),Cn=Ee("Reflect","construct"),Rn=/^\s*(?:class|function)\b/,On=v(Rn.exec),xn=!Rn.test(En),Tn=function(e){if(!_(e))return!1;try{return Cn(En,[],e),!0}catch(w){return!1}},n=function(e){if(!_(e))return!1;switch(nt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!On(Rn,Ye(e))}catch(w){return!0}},Mn=(n.sham=!0,!Cn||g(function(){var e;return Tn(Tn.call)||!Tn(Object)||!Tn(function(){e=!0})||e})?n:Tn),In=TypeError,An=Object.getOwnPropertyDescriptor,Pn=f&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(y){return y instanceof TypeError}}()?function(e,t){if(Q(e)&&!An(e,"length").writable)throw new In("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ln=v("".indexOf);Ft("match",function(r,s,u){return[function(e){var t=ae(this),n=O(e)?tn(e,r):undefined;return n?M(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),n=C(e),e=u(s,t,n);if(e.done)return e.value;e=C(hn(t));if(!~Ln(e,"g"))return mn(t,n);for(var r=!!~Ln(e,"u")||!!~Ln(e,"v"),i=[],o=t.lastIndex=0;null!==(a=mn(t,n));){var a=C(a[0]);""===(i[o]=a)&&(t.lastIndex=en(n,fe(t.lastIndex),r)),o++}return 0===o?null:i}]});var Dn,Nn,Fn,Un,jn,zn,Bn,Wn,Hn,n=x.navigator,n=n&&n.userAgent,qn=n?String(n):"",n=x.process,r=x.Deno,n=n&&n.versions||r&&r.version,r=n&&n.v8,Vn=i=!(i=r?0<(nr=r.split("."))[0]&&nr[0]<4?1:+(nr[0]+nr[1]):i)&&qn&&(!(nr=qn.match(/Edge\/(\d+)/))||74<=nr[1])&&(nr=qn.match(/Chrome\/(\d+)/))?+nr[1]:i,Gn=Xe("species"),n=function(t){return 51<=Vn||!g(function(){var e=[];return(e.constructor={})[Gn]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Jn=void 0,$n=void 0,r=n("slice"),Zn=Xe("species"),Kn=Array,Yn=Math.max,Xn=(R({target:"Array",proto:!0,forced:!r},{slice:function(e,t){var n,r,i,o=He(this),a=he(o),s=ht(e,a),u=ht(t===undefined?a:t,a);if(Q(o)&&(n=o.constructor,(n=Mn(n)&&(n===Kn||Q(n.prototype))||O(n)&&null===(n=n[Zn])?undefined:n)===Kn||n===undefined))return $n(o,s,u);for(r=new(n===undefined?Kn:n)(Yn(u-s,0)),i=0;s<u;s++,i++)s in o&&Jn(r,i,o[s]);return Pn(r,i),r}}),v([].slice),void 0),Qn=Xn.f,er="object"==("undefined"==typeof window?"undefined":T(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tr={f:function(e){if(!er||"Window"!==ne(e))return Qn(He(e));try{return Qn(e)}catch(w){return $n(er)}}},nr=tr.f,i=g(function(){return!Object.getOwnPropertyNames(1)}),rr=(R({target:"Object",stat:!0,forced:i},{getOwnPropertyNames:nr}),wt.concat("length","prototype"),Object.getOwnPropertyNames,{f:Object.getOwnPropertySymbols}),ir=v([].concat),or=Ee("Reflect","ownKeys")||function(e){var t=Xn.f(E(e)),n=rr.f;return n?ir(t,n(e)):t},ar=void 0,r=function(e,t,n){for(var r=or(t),i=at.f,o=ar.f,a=0;a<r.length;a++){var s=r[a];I(e,s)||n&&I(n,s)||i(e,s,o(t,s))}},sr=x.Symbol,ur=sr&&sr.prototype,lr=(!f||!_(sr)||"description"in ur&&sr().description===undefined||(Dn={},r(i=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:C(arguments[0]),t=Ce(ur,this)?new sr(e):e===undefined?sr():sr(e);return""===e&&(Dn[t]=!0),t},sr),Nn=i["for"],i["for"]=function(e){var e=C(e),t=M(Nn,this,e);return""===e&&(Dn[t]=!0),t},(i.prototype=ur).constructor=i,Fn="Symbol(description detection)"===String(sr("description detection")),Un=v(ur.valueOf),jn=v(ur.toString),zn=/^Symbol\((.*)\)[^)]+$/,Bn=v("".replace),Wn=v("".slice),Bt(ur,"description",{configurable:!0,get:function(){var e=Un(this);return I(Dn,e)?"":(e=jn(e),""===(e=Fn?Wn(e,7,-1):Bn(e,zn,"$1"))?undefined:e)}}),R({global:!0,constructor:!0,forced:!0},{Symbol:i})),TypeError),cr=function(e,t){if(Ce(t,e))return e;throw new lr("Incorrect invocation")},nr=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),dr=void 0,r=g(function(){dr(1)}),i=(R({target:"Object",stat:!0,forced:r,sham:!nr},{getPrototypeOf:function(e){return dr(ue(e))}}),t("IE_PROTO"),Object),r=(i.prototype,nr&&i.getPrototypeOf,at.f),fr=Xe("unscopables"),hr=Array.prototype,nr=(hr[fr]===undefined&&r(hr,fr,{configurable:!0,value:Rt(null)}),function(e){hr[fr][e]=!0}),pr=Object.create?Object.create(null):{},mr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},i=ye("span").classList,r=i&&i.constructor&&i.constructor.prototype,i=r===Object.prototype?undefined:r,gr=at.f,vr=Xe("toStringTag"),yr=function(e,t,n){(e=e&&!n?e.prototype:e)&&!I(e,vr)&&gr(e,vr,{configurable:!0,value:t})},wr=void 0,br=Xe("iterator"),kr=wr.values,Sr=function(e,t){if(e){if(e[br]!==kr)try{st(e,br,kr)}catch(u){e[br]=kr}if(yr(e,t,!0),mr[t])for(var n in wr)if(e[n]!==wr[n])try{st(e,n,wr[n])}catch(u){e[n]=wr[n]}}};for(Hn in mr)Sr(x[Hn]&&x[Hn].prototype,Hn);Sr(i,"DOMTokenList");var r=void 0,_r=r.IteratorPrototype,Er=function(){return this},Cr=function(e,t,n,r){t+=" Iterator";return e.prototype=Rt(_r,{next:ot(+!r,n)}),yr(e,t,!1),pr[t]=Er,e},Rr=void 0,Or=(R({target:"Object",stat:!0},{setPrototypeOf:Rr}),String,TypeError,Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e){try{return v(Te(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(u){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(u){}}():undefined),Be.PROPER),xr=Be.CONFIGURABLE,Tr=r.IteratorPrototype,Mr=r.BUGGY_SAFARI_ITERATORS,Ir=Xe("iterator"),Ar=function(){return this},Pr=function(e,t){return{value:e,done:t}},Lr=function(e,t,n,r,i,o,a){Cr(n,t,r);var s,u,r=function(e){if(e===i&&h)return h;if(!Mr&&e&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,d=e.prototype,f=d[Ir]||d["@@iterator"]||i&&d[i],h=!Mr&&f||r(i),p="Array"===t&&d.entries||f;if(p&&(e=dr(p.call(new e)))!==Object.prototype&&e.next&&(dr(e)!==Tr&&(Rr?Rr(e,Tr):_(e[Ir])||Gt(e,Ir,Ar)),yr(e,l,!0)),Or&&"values"===i&&f&&"values"!==f.name&&(xr?st(d,"name","values"):(c=!0,h=function(){return M(f,this)})),i)if(s={values:r("values"),keys:o?h:r("keys"),entries:r("entries")},a)for(u in s)!Mr&&!c&&u in d||Gt(d,u,s[u]);else R({target:t,proto:!0,forced:Mr||c},s);return d[Ir]!==h&&Gt(d,Ir,h,{name:i}),pr[t]=h,s},o=at.f,Dr=jt.set,Nr=jt.getterFor("Array Iterator"),a=(Lr(Array,"Array",function(e,t){Dr(this,{type:"Array Iterator",target:He(e),index:0,kind:t})},function(){var e=Nr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pr(undefined,!0);switch(e.kind){case"keys":return Pr(n,!1);case"values":return Pr(t[n],!1)}return Pr([n,t[n]],!1)},"values"),pr.Arguments=pr.Array);if(nr("keys"),nr("values"),nr("entries"),f&&"values"!==a.name)try{o(a,"name",{value:"values"})}catch(X){}var Fr,Ur,jr=Xe("iterator"),zr=([].keys&&("next"in(a=[].keys())?(o=dr(dr(a)))!==Object.prototype&&(Fr=o):0),O(Fr)&&!g(function(){var e={};return Fr[jr].call(e)!==e})||(Fr={}),_(Fr[jr])||Gt(Fr,jr,function(){return this}),r.IteratorPrototype),a=Xe("toStringTag"),Br=TypeError,Wr=x.Iterator,o=!_(Wr)||Wr.prototype!==zr||!g(function(){Wr({})}),Hr=function(){if(cr(this,zr),dr(this)===zr)throw new Br("Abstract class Iterator not directly constructable")},qr=function(t,e){f?Bt(zr,t,{configurable:!0,get:function(){return e},set:function(e){if(E(this),this===zr)throw new Br("You can't redefine this property");I(this,t)?this[t]=e:Jn(this,t,e)}}):zr[t]=e},Vr=(I(zr,a)||qr(a,"Iterator"),!o&&I(zr,"constructor")&&zr.constructor!==Object||qr("constructor",Hr),Hr.prototype=zr,R({global:!0,constructor:!0,forced:o},{Iterator:Hr}),lt(lt.bind)),Gr=function(e,t){return Te(e),t===undefined?e:Se?Vr(e,t):function(){return e.apply(t,arguments)}},Jr=Xe("iterator"),$r=Array.prototype,Zr=function(e){return e!==undefined&&(pr.Array===e||$r[Jr]===e)},Kr=Xe("iterator"),Yr=Array.prototype,Xr=function(e){if(!ie(e))return tn(e,Kr)||tn(e,"@@iterator")||("Arguments"===ne(e)?Yr[Kr]:undefined)},Qr=TypeError,ei=function(e,t){t=arguments.length<2?Xr(e):t;if(_(t))return E(M(t,e));throw new Qr(Oe(e)+" is not iterable")},ti=function(e,t,n){var r,i;E(e);try{if(!(r=tn(e,"return"))){if("throw"===t)throw n;return n}r=M(r,e)}catch(X){i=!0,r=X}if("throw"===t)throw n;if(i)throw r;return E(r),n},ni=TypeError,ri=function(e,t){this.stopped=e,this.result=t},ii=ri.prototype,oi=function(e,t,n){var r,i,o,a,s,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),h=Gr(t,u),p=function(e){var t=r;return r=undefined,t&&ti(t,"normal"),new ri(!0,e)},m=function(e){return l?(E(e),f?h(e[0],e[1],p):h(e[0],e[1])):f?h(e,p):h(e)};if(c)r=e.iterator;else if(d)r=e;else{if(!(n=Xr(e)))throw new ni(Oe(e)+" is not iterable");if(Zr(n)){for(i=0,o=he(e);i<o;i++)if((a=m(e[i]))&&Ce(ii,a))return a;return new ri(!1)}r=ei(e,n)}for(s=(c?e:r).next;!(g=M(s,r)).done;){var g=g.value;try{a=m(g)}catch(X){if(!r)throw X;ti(r,"throw",X)}if("object"==T(a)&&a&&Ce(ii,a))return a}return new ri(!1)},ai=function(e){return{iterator:e,next:e.next,done:!1}},a=function(e,t){var n=x.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(X){X instanceof t||(r=!1)}if(!r)return e},si=a("forEach",TypeError),ui=(R({target:"Iterator",proto:!0,real:!0,forced:si},{forEach:function(t){E(this);try{Te(t)}catch(X){ti(this,"throw",X)}if(si)return M(si,this,t);var e=ai(this),n=0;oi(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),void 0),li=function(e){if(e&&e.forEach!==ui)try{st(e,"forEach",ui)}catch(X){e.forEach=ui}};for(Ur in mr)mr[Ur]&&li(x[Ur]&&x[Ur].prototype);li(i);var ci,di=Xe("species"),fi=Array,hi=function(e,t){return new((n=Q(e=e)&&(n=e.constructor,Mn(n)&&(n===fi||Q(n.prototype))||O(n)&&null===(n=n[di]))?undefined:n)===undefined?fi:n)(0===t?0:t);var n},qr=function(f){var h=1===f,p=2===f,m=3===f,g=4===f,v=6===f,y=7===f,w=5===f||v;return function(e,t,n){for(var r,i,o=ue(e),a=We(o),s=he(a),u=Gr(t,n),l=0,c=0,d=h?hi(e,s):p||y?hi(e,0):undefined;l<s;l++)if((w||l in a)&&(i=u(r=a[l],l,o),f))if(h)Jn(d,l,i);else if(i)switch(f){case 3:return!0;case 5:return r;case 6:return l;case 2:Jn(d,c++,r)}else switch(f){case 4:return!1;case 7:Jn(d,c++,r)}return v?-1:m||g?g:d}},pi={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},mi=(ze("forEach"),R({target:"Array",proto:!0,forced:[].forEach!==ui},{forEach:ui}),x.String),o=!!Object.getOwnPropertySymbols&&!g(function(){var e=Symbol("symbol detection");return!mi(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Vn&&Vn<41}),Hr={}.propertyIsEnumerable,gi=Object.getOwnPropertyDescriptor,vi={f:gi&&!Hr.call({1:2},1)?function(e){e=gi(this,e);return!!e&&e.enumerable}:Hr},yi={f:Xe},wi=x,bi=at.f,ki=function(e){var t=wi.Symbol||(wi.Symbol={});I(t,e)||bi(t,e,{value:yi.f(e)})},Si=void 0,_i=pi.forEach,Ei=t("hidden"),Ci=jt.set,Ri=jt.getterFor("Symbol"),Oi=Object.prototype,i=x.Symbol,xi=i&&i.prototype,Ti=x.RangeError,Mi=x.TypeError,qr=x.QObject,Ii=ar.f,Ai=at.f,Pi=tr.f,Li=vi.f,Di=v([].push),Ni=we("symbols"),Fi=we("op-symbols"),Hr=we("wks"),Ui=!qr||!qr.prototype||!qr.prototype.findChild,ji=function(e,t,n){var r=Ii(Oi,t);return r&&delete Oi[t],Ai(e,t,n),r&&e!==Oi&&Ai(Oi,t,r),e},zi=f&&g(function(){return 7!==Rt(Ai({},"a",{get:function(){return Ai(this,"a",{value:7}).a}})).a})?ji:Ai,Bi=function(e,t){var n=Ni[e]=Rt(xi);return Ci(n,{type:"Symbol",tag:e,description:t}),f||(n.description=t),n},Wi=function(e,t,n){e===Oi&&Wi(Fi,t,n),E(e);t=Si(t);return E(n),(I(Ni,t)?(("enumerable"in n?!n.enumerable:!I(e,t)||I(e,Ei)&&e[Ei][t])?(I(e,Ei)||Ai(e,Ei,ot(1,Rt(null))),e[Ei][t]=!0):(I(e,Ei)&&e[Ei][t]&&(e[Ei][t]=!1),n=Rt(n,{enumerable:ot(0,!1)})),zi):Ai)(e,t,n)},Hi=function(t,e){E(t);var n=He(e),e=ct(n).concat(Vi(n));return _i(e,function(e){f&&!M(qi,n,e)||Wi(t,e,n[e])}),t},qi=function(e){var e=Si(e),t=M(Li,this,e);return!(this===Oi&&I(Ni,e)&&!I(Fi,e))&&(!(t||!I(this,e)||!I(Ni,e)||I(this,Ei)&&this[Ei][e])||t)},t=function(e,t){var n,e=He(e),t=Si(t);if(e!==Oi||!I(Ni,t)||I(Fi,t))return!(n=Ii(e,t))||!I(Ni,t)||I(e,Ei)&&e[Ei][t]||(n.enumerable=!0),n},qr=function(e){var e=Pi(He(e)),t=[];return _i(e,function(e){I(Ni,e)||I(yt,e)||Di(t,e)}),t},Vi=function(e){var t=e===Oi,e=Pi(t?Fi:He(e)),n=[];return _i(e,function(e){!I(Ni,e)||t&&!I(Oi,e)||Di(n,Ni[e])}),n},qr=(o||(xi=(i=function(){if(Ce(xi,this))throw new Mi("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?C(arguments[0]):undefined,n=Dt(e),r=function(e){var t=this===undefined?x:this,e=(t===Oi&&M(r,Fi,e),I(t,Ei)&&I(t[Ei],n)&&(t[Ei][n]=!1),ot(1,e));try{zi(t,n,e)}catch(X){if(!(X instanceof Ti))throw X;ji(t,n,e)}};return f&&Ui&&zi(Oi,n,{configurable:!0,set:r}),Bi(n,e)}).prototype,Gt(xi,"toString",function(){return Ri(this).tag}),Gt(i,"withoutSetter",function(e){return Bi(Dt(e),e)}),vi.f=qi,at.f=Wi,ut.f=Hi,ar.f=t,Xn.f=tr.f=qr,rr.f=Vi,yi.f=function(e){return Bi(Xe(e),e)},f&&(Bt(xi,"description",{configurable:!0,get:function(){return Ri(this).description}}),Gt(Oi,"propertyIsEnumerable",qi,{unsafe:!0}))),R({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:i}),_i(ct(Hr),function(e){ki(e)}),R({target:"Symbol",stat:!0,forced:!o},{useSetter:function(){Ui=!0},useSimple:function(){Ui=!1}}),R({target:"Object",stat:!0,forced:!o,sham:!f},{create:function(e,t){return t===undefined?Rt(e):Hi(Rt(e),t)},defineProperty:Wi,defineProperties:Hi,getOwnPropertyDescriptor:t}),R({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:qr}),Hr=(Hr=Ee("Symbol"))&&Hr.prototype,ci=Hr&&Hr.valueOf,t=Xe("toPrimitive"),Hr&&!Hr[t]&&Gt(Hr,t,function(e){return M(ci,this)},{arity:1}),yr(i,"Symbol"),yt[Ei]=!0,o&&!!Symbol["for"]&&!!Symbol.keyFor),Gi=we("string-to-symbol-registry"),Ji=we("symbol-to-string-registry"),$i=(R({target:"Symbol",stat:!0,forced:!qr},{"for":function(e){var t,e=C(e);return I(Gi,e)?Gi[e]:(t=Ee("Symbol")(e),Gi[e]=t,Ji[t]=e,t)}}),void 0),Zi=we("symbol-to-string-registry"),Ki=(R({target:"Symbol",stat:!0,forced:!qr},{keyFor:function(e){if(!$i(e))throw new TypeError(Oe(e)+" is not a symbol");if(I(Zi,e))return Zi[e]}}),Xe("match")),Yi=function(e){var t;return O(e)&&((t=e[Ki])!==undefined?!!t:"RegExp"===ne(e))},Xi=TypeError,Qi=function(e){if(Yi(e))throw new Xi("The method doesn't accept regular expressions");return e},eo=Xe("match"),Hr=function(e){var t=/./;try{"/./"[e](t)}catch(S){try{return t[eo]=!1,"/./"[e](t)}catch(u){}}return!1},to=v("".indexOf),no=(R({target:"String",proto:!0,forced:!Hr("includes")},{includes:function(e){return!!~to(C(ae(this)),C(Qi(e)),1<arguments.length?arguments[1]:undefined)}}),e.includes),t=g(function(){return!Array(1).includes()}),i=g(function(){return[,1].includes(undefined,1)}),ro=(R({target:"Array",proto:!0,forced:t||i},{includes:function(e){return no(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("includes"),RangeError),io=Math.floor,qr=function(e){var t=C(ae(this)),n="",r=ce(e);if(r<0||r===Infinity)throw new ro("Wrong number of repetitions");for(;0<r;(r=io(r/2))&&(t+=t))r%2&&(n+=t);return n},oo=v(qr),ao=v("".slice),so=Math.ceil,t=function(i){return function(e,t,n){var e=C(ae(e)),t=fe(t),r=e.length;return t<=r||""===(n=n===undefined?" ":C(n))?e:((r=oo(n,so((t=t-r)/n.length))).length>t&&(r=ao(r,0,t)),i?e+r:r+e)}},uo=[t(!1),t(!0)][0],lo=RangeError,co=isFinite,fo=Math.abs,i=Date.prototype,ho=i.toISOString,po=v(i.getTime),mo=v(i.getUTCDate),go=v(i.getUTCFullYear),vo=v(i.getUTCHours),yo=v(i.getUTCMilliseconds),wo=v(i.getUTCMinutes),bo=v(i.getUTCMonth),ko=v(i.getUTCSeconds),t=g(function(){return"0385-07-25T07:06:39.999Z"!==ho.call(new Date(-50000000000001))})||!g(function(){ho.call(new Date(NaN))})?function(){var e,t,n;if(co(po(this)))return e=go(this),t=yo(this),(n=e<0?"-":9999<e?"+":"")+uo(fo(e),n?6:4,0)+"-"+uo(bo(this)+1,2,0)+"-"+uo(mo(this),2,0)+"T"+uo(vo(this),2,0)+":"+uo(wo(this),2,0)+":"+uo(ko(this),2,0)+"."+uo(t,3,0)+"Z";throw new lo("Invalid time value")}:ho,So=(R({target:"Date",proto:!0,forced:Date.prototype.toISOString!==t},{toISOString:t}),void 0),i=g(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});R({target:"Date",proto:!0,forced:i},{toJSON:function(e){var t=ue(this),n=So(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var _o,Eo=jt.get,Co=v(1.1.valueOf),Ro="\t\n\x0B\f\r \u2028\u2029\ufeff",Oo=v("".replace),xo=RegExp("^["+Ro+"]+"),To=RegExp("(^|[^"+Ro+"])["+Ro+"]+$"),t=function(t){return function(e){e=C(ae(e));return 1&t&&(e=Oo(e,xo,"")),e=2&t?Oo(e,To,"$1"):e}},i={start:t(1),end:t(2),trim:t(3)},Mo=Be.PROPER,Io=i.trim,Ao=(R({target:"String",proto:!0,forced:(_o="trim",g(function(){return!!Ro[_o]()||"
"!=="
"[_o]()||Mo&&Ro[_o].name!==_o}))},{trim:function(){return Io(this)}}),i.trim),Po=x.parseInt,t=x.Symbol,Lo=t&&t.iterator,Do=/^[+-]?0x/i,No=v(Do.exec),t=8!==Po(Ro+"08")||22!==Po(Ro+"0x16")||Lo&&!g(function(){Po(Object(Lo))})?function(e,t){e=Ao(C(e));return Po(e,t>>>0||(No(Do,e)?16:10))}:Po,Fo=(R({global:!0,forced:parseInt!==t},{parseInt:t}),SyntaxError),Uo=parseInt,jo=String.fromCharCode,zo=v("".charAt),Bo=v("".slice),Wo=v(/./.exec),Ho={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},qo=/^[\da-f]{4}$/i,Vo=/^[\u0000-\u001F]$/,Go=void 0,Jo=Go.ArrayBuffer,$o=Go.DataView,t=$o.prototype,Zo=lt(Jo.prototype.slice),Ko=lt(t.getUint8),Yo=lt(t.setUint8),t=g(function(){return!new Jo(2).slice(1,undefined).byteLength}),t=(R({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:t},{slice:function(e,t){if(Zo&&t===undefined)return Zo(E(this),e);for(var n=E(this).byteLength,r=ht(e,n),i=ht(t===undefined?n:t,n),e=new Jo(fe(i-r)),o=new $o(this),a=new $o(e),s=0;r<i;)Yo(a,s++,Ko(o,r++));return e}}),void 0),Xo=(R({global:!0,constructor:!0,forced:!0},{DataView:Go.DataView}),function(e,t,n){for(var r in t)Gt(e,r,t[r],n);return e}),Qo=RangeError,ea=function(e){if(e===undefined)return 0;var e=ce(e),t=fe(e);if(e!==t)throw new Qo("Wrong length or index");return t},ta=(R({target:"Math",stat:!0},{fround:void 0}),R({target:"Math",stat:!0},{sign:void 0}),Math.sign,Array),na=Math.abs,ra=Math.pow,ia=Math.floor,oa=Math.log,aa=Math.LN2,sa=void 0,ua=(R({target:"Array",proto:!0},{fill:sa}),nr("fill"),function(e,t,n){return Rr&&_(t=t.constructor)&&t!==n&&O(t=t.prototype)&&t!==n.prototype&&Rr(e,t),e}),la=jt.getterFor("ArrayBuffer"),ca=jt.getterFor("DataView"),da=jt.set,s=x.ArrayBuffer,fa=s&&s.prototype,l=x.DataView,ha=l&&l.prototype,pa=(Object.prototype,x.Array),ma=x.RangeError,ga=v(sa),va=v([].reverse),ya=function(e,t,n){var r,i,o,a=ta(n),s=8*n-t-1,n=(1<<s)-1,u=n>>1,l=23===t?ra(2,-24)-ra(2,-77):0,c=e<0||0===e&&1/e<0?1:0,d=0;for((e=na(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=ia(oa(e)/aa),e*(o=ra(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+u?l/o:l*ra(2,1-u))*o&&(r++,o/=2),n<=r+u?(i=0,r=n):1<=r+u?(i=(e*o-1)*ra(2,t),r+=u):(i=e*ra(2,u-1)*ra(2,t),r=0));8<=t;)a[d++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;0<s;)a[d++]=255&r,r/=256,s-=8;return a[d-1]|=128*c,a},wa=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,i=e[u--],l=127&i;for(i>>=7;0<s;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;0<s;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:i?-Infinity:Infinity;n+=ra(2,t),l-=a}return(i?-1:1)*n*ra(2,l-t)},ba=function(e){return[255&e]},ka=function(e){return[255&e,e>>8&255]},Sa=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},_a=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ea=function(e){return ya((void 0)(e),23,4)},Ca=function(e){return ya(e,52,8)},c=function(e,t,n){Bt(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},Ra=function(e,t,n,r){e=ca(e),n=ea(n),r=!!r;if(n+t>e.byteLength)throw new ma("Wrong index");n+=e.byteOffset,e=$n(e.bytes,n,n+t);return r?e:va(e)},Oa=function(e,t,n,r,i,o){var e=ca(e),n=ea(n),a=r(+i),s=!!o;if(n+t>e.byteLength)throw new ma("Wrong index");for(var u=e.bytes,l=n+e.byteOffset,c=0;c<t;c++)u[l+c]=a[s?c:t-c-1]},fa=(s=function(e){cr(this,fa);e=ea(e);da(this,{type:"ArrayBuffer",bytes:ga(pa(e),0),byteLength:e}),f||(this.byteLength=e,this.detached=!1)}).prototype,ha=(l=function(e,t,n){cr(this,ha),cr(e,fa);var r=la(e),i=r.byteLength,t=ce(t);if(t<0||i<t)throw new ma("Wrong offset");if(t+(n=n===undefined?i-t:ea(n))>i)throw new ma("Wrong length");da(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),f||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,xa=(f&&(c(s,"byteLength",la),c(l,"buffer",ca),c(l,"byteLength",ca),c(l,"byteOffset",ca)),Xo(ha,{getInt8:function(e){return Ra(this,1,e)[0]<<24>>24},getUint8:function(e){return Ra(this,1,e)[0]},getInt16:function(e){e=Ra(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=Ra(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return _a(Ra(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return _a(Ra(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return wa(Ra(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return wa(Ra(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){Oa(this,1,e,ba,t)},setUint8:function(e,t){Oa(this,1,e,ba,t)},setInt16:function(e,t){Oa(this,2,e,ka,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){Oa(this,2,e,ka,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){Oa(this,4,e,Sa,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){Oa(this,4,e,Sa,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){Oa(this,4,e,Ea,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){Oa(this,8,e,Ca,t,2<arguments.length&&arguments[2])}}),yr(s,"ArrayBuffer"),yr(l,"DataView"),Xe("species")),Ta=function(e){e=Ee(e);f&&e&&!e[xa]&&Bt(e,xa,{configurable:!0,get:function(){return this}})},c=Go.ArrayBuffer,s=x.ArrayBuffer,Ma=(R({global:!0,constructor:!0,forced:s!==c},{ArrayBuffer:c}),Ta("ArrayBuffer"),g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})})),Ia=Object.isExtensible,Aa=g(function(){Ia(1)})||Ma?function(e){return!!O(e)&&(!Ma||"ArrayBuffer"!==ne(e))&&(!Ia||Ia(e))}:Ia,Pa=(R({target:"Object",stat:!0,forced:Object.isExtensible!==Aa},{isExtensible:Aa}),TypeError),La=function(e,t){if(!delete e[t])throw new Pa("Cannot delete property "+Oe(t)+" of "+Oe(e))},l=n("splice"),Da=Math.max,Na=Math.min,Fa=(R({target:"Array",proto:!0,forced:!l},{splice:function(e,t){var n,r,i,o,a,s,u=ue(this),l=he(u),c=ht(e,l),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,l-c):(n=e-2,Na(Da(ce(t),0),l-c)),me(l+n-r),i=hi(u,r),o=0;o<r;o++)(a=c+o)in u&&Jn(i,o,u[a]);if(Pn(i,r),n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:La(u,s);for(o=l;l-r+n<o;o--)La(u,o-1)}else if(r<n)for(o=l-r;c<o;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:La(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Pn(u,l-r+n),i}}),Ve(function(e){var t=at.f,a=Dt("meta"),n=0,r=function(e){t(e,a,{value:{objectID:"O"+n++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},0;var i=Xn.f,o=v([].splice),e={};e[a]=1,i(e).length&&(Xn.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===a){o(t,n,1);break}return t},R({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tr.f}))},fastKey:function(e,t){if(!O(e))return"symbol"==T(e)?e:("string"==typeof e?"S":"P")+e;if(!I(e,a)){if(!Aa(e))return"F";if(!t)return"E";r(e)}return e[a].objectID},getWeakData:function(e,t){if(!I(e,a)){if(!Aa(e))return!0;if(!t)return!1;r(e)}return e[a].weakData},onFreeze:function(e){return e}};yt[a]=!0})),Ua=Fa.onFreeze,ja=Object.preventExtensions,s=g(function(){ja(1)}),za=(R({target:"Object",stat:!0,forced:s,sham:!0},{preventExtensions:function(e){return ja&&O(e)?ja(Ua(e)):e}}),g(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fa.onFreeze),Ba=Object.freeze,c=g(function(){Ba(1)}),Wa=(R({target:"Object",stat:!0,forced:c,sham:!0},{freeze:function(e){return Ba&&O(e)?Ba(za(e)):e}}),!g(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)})),Ha=e.includes,qa=String,Va=TypeError,Ga=Ee("JSON","stringify"),l=Ee("BigInt"),Ja=v("".valueOf),$a=v((!0).valueOf),Za=l&&v(l.prototype.valueOf),Ka=v(/./.exec),Ya=v("".charAt),Xa=v("".charCodeAt),Qa=v("".replace),es=v("".slice),ts=v([].push),ns=v([].pop),rs=v(1.1.toString),is=/[\uD800-\uDFFF]/g,os=/^[\uD800-\uDBFF]$/,as=/^[\uDC00-\uDFFF]$/,ss=/^\d+$/,us=Dt(),ls=Dt(),cs=Dt(),ds=us.length,fs=ls.length,s=!o||g(function(){var e=Ee("Symbol")("stringify detection");return"[null]"!==Ga([e])||"{}"!==Ga({a:e})||"{}"!==Ga(Object(e))}),hs=g(function(){return'"\\udf06\\ud834"'!==Ga("\udf06\ud834")||'"\\udead"'!==Ga("\udead")}),ps=Wa?Ee("JSON","isRawJSON"):function(e){return!!O(e)&&!!(e=Eo(e))&&"RawJSON"===e.type},ms=s?function(e,n,t){return Ga(e,function(e,t){e=M(n,this,e,t);if(!$i(e))return e},t)}:Ga,gs=function(e,t,n){var r=Ya(n,t-1),n=Ya(n,t+1);return Ka(os,e)&&!Ka(as,n)||Ka(as,e)&&!Ka(os,r)?"\\u"+rs(Xa(e,0),16):e},vs=function(e,t){try{return e(t),!0}catch(X){return!1}},c=(Ga&&R({target:"JSON",stat:!0,arity:3,forced:s||hs||!Wa},{stringify:function(e,t,n){var r,i=_(t)?t:undefined,o=i?undefined:function(e){if(Q(e)){for(var t=e.length,n=[],r=Rt(null),i=0;i<t;i++){var o,a=e[i];if("string"==typeof a)o=a;else{if("number"!=typeof a&&"Number"!==ne(a)&&"String"!==ne(a))continue;o=C(a)}I(r,o)||(r[o]=!0,ts(n,o))}return n}}(t),a=o&&function(e){for(var t=0,n=e.length;t<n;t++)if(Ka(ss,e[t]))return ls;return""}(o),s=[],u=[],l=[],c=!1,d=!0,f=ms(e,function(e,t){if(e=qa(e),o){if(e===cs)return ns(u),void(r=ns(l));if(d)d=!1;else if(this!==r&&!Q(this)&&!Ha(o,e))return}else i&&(t=M(i,this,e,t));if(ps(t))return Wa?t:(c=!0,us+(ts(s,t.rawJSON)-1));if(o&&function(e){if(!O(e)||_(e)||Q(e))return!1;try{return!("Number"===(n=ne(t=e))&&vs(Co,t)||"String"===n&&vs(Ja,t)||"Boolean"===n&&vs($a,t)||Za&&"BigInt"===n&&vs(Za,t))}catch(X){return!0}var t,n}(t)){if(Ha(u,t))throw new Va("Converting circular structure to JSON");e=function(e,t,n){for(var r=Rt(null),i=0,o=t.length;i<o;i++){var a=t[i];r[n+a]=function(n,r){return{toJSON:function(){var e,t=n[r];return t=(O(t)||"bigint"==typeof t)&&(e=t.toJSON,_(e))?M(e,t,r):t}}}(e,a)}return r[cs]=null,r}(t,o,a);return ts(u,t),ts(l,r),a&&(c=!0),r=e}return t},n);if("string"!=typeof f)return f;if(hs&&(f=Qa(f,is,gs)),!c)return f;for(var h="",p=f.length,m=0;m<p;m++){var g,v,y=Ya(f,m);'"'===y?(g=function(e,t){for(var n=!0,r="";t<e.length;){var i=zo(e,t);if("\\"===i){var o=Bo(e,t,t+2);if(I(Ho,o))r+=Ho[o],t+=2;else{if("\\u"!==o)throw new Fo('Unknown escape sequence: "'+o+'"');o=Bo(e,t+=2,t+4);if(!Wo(qo,o))throw new Fo("Bad Unicode escape at: "+t);r+=jo(Uo(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(Wo(Vo,i))throw new Fo("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new Fo("Unterminated string at: "+t);return{value:r,end:t}}(f,++m).end-1,v=es(f,m,g),es(v,0,ds)===us?h+=s[es(v,ds)]:es(v,0,fs)===ls?h+='"'+es(v,fs)+'"':h+='"'+v+'"',m=g):h+=y}return h}}),!o||g(function(){rr.f(1)})),ys=(R({target:"Object",stat:!0,forced:c},{getOwnPropertySymbols:function(e){var t=rr.f;return t?t(ue(e)):[]}}),ki("iterator"),Wt.charAt),ws=jt.set,bs=jt.getterFor("String Iterator"),l=(Lr(String,"String",function(e){ws(this,{type:"String Iterator",string:C(e),index:0})},function(){var e=bs(this),t=e.string,n=e.index;return n>=t.length?Pr(undefined,!0):(t=ys(t,n),e.index+=t.length,Pr(t,!1))}),o&&!Symbol.sham&&"symbol"==T(Symbol.iterator)),s=(Object,TypeError,TypeError,Xe("toPrimitive"),TypeError,Object.defineProperty,at.f),ks=(R({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!f},{defineProperty:s}),g(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Xe("isConcatSpreadable")),c=51<=Vn||!g(function(){var e=[];return e[ks]=!1,e.concat()[0]!==e}),o=!c||!n("concat"),Ss=(R({target:"Array",proto:!0,arity:1,forced:o},{concat:function(e){for(var t,n,r,i,o,a=ue(this),s=hi(a,0),u=0,l=-1,c=arguments.length;l<c;l++)if(i=r=-1===l?a:arguments[l],o=void 0,!O(i)||((o=i[ks])!==undefined?!o:!Q(i)))me(u+1),Jn(s,u++,r);else for(n=he(r),me(u+n),t=0;t<n;t++,u++)t in r&&Jn(s,u,r[t]);return Pn(s,u),s}}),Function),_s=v([].concat),Es=v([].join),Cs={},Rs=Se?Ss.bind:function(t){var n=Te(this),e=n.prototype,r=$n(arguments,1),i=function(){var e=_s(r,$n(arguments));return this instanceof i?function(e,t,n){if(!I(Cs,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Cs[t]=Ss("C,a","return new C("+Es(r,",")+")")}return Cs[t](e,n)}(n,e.length,e):n.apply(t,e)};return O(e)&&(i.prototype=e),i},s=(R({target:"Function",proto:!0,forced:Function.bind!==Rs},{bind:Rs}),Function.prototype),c=s.call,o=(Se&&s.bind.bind(c,c),Date.prototype),Os=v(o.toString),xs=v(o.getTime),c=("Invalid Date"!==String(new Date(NaN))&&Gt(o,"toString",function(){var e=xs(this);return e==e?Os(this):"Invalid Date"}),Be.PROPER),s=RegExp.prototype,Ts=s.toString,o=g(function(){return"/a/b"!==Ts.call({source:"a",flags:"b"})}),c=c&&"toString"!==Ts.name,Ms=((o||c)&&Gt(s,"toString",function(){var e=E(this);return"/"+C(e.source)+"/"+C(hn(e))},{unsafe:!0}),x.RegExp),o=g(function(){var e=Ms("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),c=o||g(function(){return!Ms("a","y").sticky}),s={BROKEN_CARET:o||g(function(){var e=Ms("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:c,UNSUPPORTED_Y:o},Is=jt.get,As=RegExp.prototype,Ps=TypeError,Ls=(f&&s.MISSED_STICKY&&Bt(As,"sticky",{configurable:!0,get:function(){if(this!==As){if("RegExp"===ne(this))return!!Is(this).sticky;throw new Ps("Incompatible receiver, RegExp required")}}}),/#|\.prototype\./),c=function(e,t){e=Ns[Ds(e)];return e===Us||e!==Fs&&(_(t)?g(t):!!t)},Ds=c.normalize=function(e){return String(e).replace(Ls,".").toLowerCase()},Ns=c.data={},Fs=c.NATIVE="N",Us=c.POLYFILL="P",js=c,zs=at.f,Bs=x.RegExp,Ws=g(function(){var e=Bs(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),Hs=x.RegExp,qs=g(function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),o=Xn.f,Vs=jt.enforce,Gs=Xe("match"),Js=x.RegExp,$s=Js.prototype,Zs=x.SyntaxError,Ks=v($s.exec),Ys=v("".charAt),Xs=v("".replace),Qs=v("".indexOf),eu=v("".slice),tu=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,nu=/a/g,ru=/a/g,c=new Js(nu)!==nu,iu=s.MISSED_STICKY,ou=s.UNSUPPORTED_Y,c=f&&(!c||iu||Ws||qs||g(function(){return ru[Gs]=!1,Js(nu)!==nu||Js(ru)===ru||"/a/i"!==String(Js(nu,"i"))}));if(js("RegExp",c)){for(var au=function(e,t){var n,r,i=Ce($s,this),o=Yi(e),a=t===undefined,s=[],u=e;if(!i&&o&&a&&e.constructor===au)return e;if((o||Ce($s,e))&&(e=e.source,a)&&(t=hn(u)),e=e===undefined?"":C(e),t=t===undefined?"":C(t),u=e,o=t=Ws&&"dotAll"in nu&&(n=!!t&&-1<Qs(t,"s"))?Xs(t,/s/g,""):t,iu&&"sticky"in nu&&(r=!!t&&-1<Qs(t,"y"))&&ou&&(t=Xs(t,/y/g,"")),qs&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",o=[],a=Rt(null),s=!1,u=!1,l=0,c="";r<n;r++){if("\\"===(t=Ys(e,r))){if(t+=Ys(e,++r),!u&&"\\"===Ys(t,1)){i+="\\x5c";continue}}else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:i+=t,Ks(tu,eu(e,r+1))?(r+=2,u=!0,l++):"?"!==Ys(e,r+1)&&l++;continue;case">"===t&&u:if(""===c||I(a,c))throw new Zs("Invalid capture group name");a[c]=!0,u=!(o[o.length]=[c,l]),c="";continue}u?c+=t:i+=t}for(var d=0;d<o.length;d++)for(var f="\\k<"+o[d][0]+">",h="\\"+o[d][1];-1<Qs(i,f);)i=Xs(i,f,h);return[i,o]}(e))[0],s=a[1]),a=ua(Js(e,t),i?this:$s,au),(n||r||s.length)&&(t=Vs(a),n&&(t.dotAll=!0,t.raw=au(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=Ys(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Ys(e,++r);return i}(e),o)),r&&(t.sticky=!0),s.length)&&(t.groups=s),e!==u)try{st(a,"source",""===u?"(?:)":u)}catch(X){}return a},su=o(Js),uu=0;su.length>uu;)!function(e,t,n){n in e||zs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(au,Js,su[uu++]);($s.constructor=au).prototype=$s,Gt(x,"RegExp",au,{constructor:!0})}Ta("RegExp");we("native-string-replace",String.prototype.replace);var lu=RegExp.prototype.exec,cu=(v("".charAt),v("".indexOf),v("".replace),v("".slice),c=/b*/g,M(lu,o=/a/,"a"),M(lu,c,"a"),/()??/.exec("")[1],undefined,R({target:"RegExp",proto:!0,forced:/./.exec!==Jt},{exec:Jt}),TypeError),du=function(e){if(Mn(e))return e;throw new cu(Oe(e)+" is not a constructor")},fu=Xe("species"),hu=function(e,t){var e=E(e).constructor;return e===undefined||ie(e=E(e)[fu])?t:du(e)},pu=s.UNSUPPORTED_Y,mu=Math.min,gu=v([].push),vu=v("".slice),yu=v("".indexOf),o=!g(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),wu="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,bu=(Ft("split",function(i,p,m){var g="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:M(p,this,e,t)}:p;return[function(e,t){var n=ae(this),r=O(e)?tn(e,i):undefined;return r?M(r,e,n,t):M(g,C(n),e,t)},function(e,t){var n=E(this),r=C(e);if(!wu){e=m(g,n,r,t,g!==p);if(e.done)return e.value}var e=hu(n,RegExp),i=C(hn(n)),o=!!~yu(i,"u")||!!~yu(i,"v"),a=(pu?~yu(i,"g")||(i+="g"):~yu(i,"y")||(i+="y"),new e(pu?"^(?:"+n.source+")":n,i)),s=t===undefined?4294967295:t>>>0;if(0==s)return[];if(0===r.length)return null===mn(a,r)?[r]:[];for(var u=0,l=0,c=[];l<r.length;){a.lastIndex=pu?0:l;var d,f=mn(a,pu?vu(r,l):r);if(null===f||(d=mu(fe(a.lastIndex+(pu?l:0)),r.length))===u)l=en(r,l,o);else{if(gu(c,vu(r,u,l)),c.length===s)return c;for(var h=1;h<=f.length-1;h++)if(gu(c,f[h]),c.length===s)return c;l=u=d}}return gu(c,vu(r,u)),c}]},wu||!o,pu),Object),ku=(v("".split),g(function(){return!bu("z").propertyIsEnumerable(0)}),ar.f),c=!f||g(function(){ku(1)}),s=(R({target:"Object",stat:!0,forced:c,sham:!f},{getOwnPropertyDescriptor:function(e,t){return ku(He(e),t)}}),Object.getOwnPropertyDescriptor,ar.f,R({global:!0,forced:x.globalThis!==x},{globalThis:x}),function(e){return e&&e.Math===Math&&e}),o=(s("object"==("undefined"==typeof globalThis?"undefined":T(globalThis))&&globalThis)||s("object"==("undefined"==typeof window?"undefined":T(window))&&window)||s("object"==("undefined"==typeof self?"undefined":T(self))&&self)||s("object"==T(Fe)&&Fe)||s("object"==T(Fe)&&Fe)||function(){return this}()||Function("return this")(),x.Symbol),c=(we("wks"),l?o["for"]:o&&o.withoutSetter,{}),Su=(c[Xe("toStringTag")]="z",String(c),Gt(Object.prototype,"toString",function(){return"[object "+nt(this)+"]"},{unsafe:!0}),a("find",TypeError)),_u=(R({target:"Iterator",proto:!0,real:!0,forced:Su},{find:function(n){E(this);try{Te(n)}catch(X){ti(this,"throw",X)}var e,r;return Su?M(Su,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),pi.find),Eu=!0,Cu=("find"in[]&&Array(1).find(function(){Eu=!1}),R({target:"Array",proto:!0,forced:Eu},{find:function(e){return _u(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("find"),Date),Ru=v(Cu.prototype.getTime),Ou=(R({target:"Date",stat:!0},{now:function(){return Ru(new Cu)}}),function(e,t,n,r){try{return r?t(E(n)[0],n[1]):t(n)}catch(X){ti(e,"throw",X)}}),xu=Array,Tu=function(e){var t=Mn(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=Gr(r,2<n?arguments[2]:undefined));var o,a,s,u,l,c,d=ue(e),n=Xr(d),f=0;if(!n||this===xu&&Zr(n))for(o=he(d),a=t?new this(o):xu(o);f<o;f++)c=i?r(d[f],f):d[f],Jn(a,f,c);else for(a=t?new this:[],l=(u=ei(d,n)).next;!(s=M(l,u)).done;f++){try{me(f)}catch(X){ti(u,"throw",X)}c=i?Ou(u,r,[s.value,f],!0):s.value;try{Jn(a,f,c)}catch(X){ti(u,"throw",X)}}return Pn(a,f),a},Mu=void 0,Fe=!Mu(function(e){Array.from(e)}),s=(R({target:"Array",stat:!0,forced:Fe},{from:Tu}),Xe("iterator"));try{var Iu=0,Au={next:function(){return{done:!!Iu++}},"return":function(){0}};Au[s]=function(){return this},Array.from(Au,function(){throw 2})}catch(X){}var Pu,Lu,we=function(e,t,n){var r,i,o,a,s,u=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),c=u?"set":"add",d=x[e],f=d&&d.prototype,h=d,p={},m=function(e){var n=v(f[e]);Gt(f,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return l&&!O(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return js(e,!_(d)||!(l||f.forEach&&!g(function(){(new d).entries().next()})))?(h=n.getConstructor(t,e,u,c),Fa.enable()):js(e,!0)&&(i=(r=new h)[c](l?{}:-0,1)!==r,o=g(function(){r.has(1)}),a=Mu(function(e){new d(e)}),s=!l&&g(function(){for(var e=new d,t=5;t--;)e[c](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){cr(e,f);e=ua(new d,e,h);return ie(t)||oi(t,e[c],{that:e,AS_ENTRIES:u}),e})).prototype=f).constructor=h),(o||s)&&(m("delete"),m("has"),u)&&m("get"),(s||i)&&m(c),l)&&f.clear&&delete f.clear,R({global:!0,constructor:!0,forced:(p[e]=h)!==d},p),yr(h,e),l||n.setStrong(h,e,u),h},Du=pi.findIndex,Nu=!0,Fu=("findIndex"in[]&&Array(1).findIndex(function(){Nu=!1}),R({target:"Array",proto:!0,forced:Nu},{findIndex:function(e){return Du(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("findIndex"),Fa.getWeakData),Uu=jt.set,ju=jt.getterFor,zu=pi.find,Bu=pi.findIndex,Wu=v([].splice),Hu=0,qu=function(e){return e.frozen||(e.frozen=new Vu)},Vu=function(){this.entries=[]},Gu=function(e,t){return zu(e.entries,function(e){return e[0]===t})},l=(Vu.prototype={get:function(e){e=Gu(this,e);if(e)return e[1]},has:function(e){return!!Gu(this,e)},set:function(e,t){var n=Gu(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=Bu(this.entries,function(e){return e[0]===t});return~e&&Wu(this.entries,e,1),!!~e}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){cr(e,o),Uu(e,{type:n,id:Hu++,frozen:null}),ie(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=ju(n),s=function(e,t,n){var r=a(e),i=Fu(E(t),!0);return!0===i?qu(r).set(t,n):i[r.id]=n,e};return Xo(o,{"delete":function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Fu(e))?qu(n)["delete"](e):t&&I(t,n.id)&&delete t[n.id])},has:function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Fu(e))?qu(n).has(e):t&&I(t,n.id))}}),Xo(o,r?{get:function(e){var t,n=a(this);if(O(e))return!0===(t=Fu(e))?qu(n).get(e):t?t[n.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),e}});function Ju(e){this.name="__st"+(1e9*Math.random()>>>0)+Pu+"__",null!=e&&e.forEach(this.add,this),Pu+=1}we("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},l),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(Pu=Date.now()%1e9,Ju.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},Ju.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},Ju.prototype.has=function(e){return!!e[this.name]},Lu=Ju,Object.defineProperty(window,"WeakSet",{value:function(e){return new Lu(e)}}));var $u=Object.assign,Zu=Object.defineProperty,Ku=v([].concat),o=!$u||g(function(){var e,t,n;return!(!f||1===$u({b:1},$u(Zu({},"a",{enumerable:!0,get:function(){Zu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==$u({},e)[n])||"abcdefghijklmnopqrst"!==ct($u({},t)).join("")})?function(e,t){for(var n=ue(e),r=arguments.length,i=1,o=rr.f,a=vi.f;i<r;)for(var s,u=We(arguments[i++]),l=o?Ku(ct(u),o(u)):ct(u),c=l.length,d=0;d<c;)s=l[d++],f&&!M(a,u,s)||(n[s]=u[s]);return n}:$u,Yu=(R({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,a=i.length;o<a;o++){var s=i[o],u=Object.getOwnPropertyDescriptor(r,s);null!=u&&u.enumerable&&(t[s]=r[s])}return t}}),function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}),Xu=r.IteratorPrototype,c=Xe("toStringTag"),Qu=jt.set,Fe=function(c){var d=jt.getterFor(c?"WrapForValidIterator":"IteratorHelper");return Xo(Rt(Xu),{next:function(){var e=d(this);if(c)return e.nextHandler();if(e.done)return Pr(undefined,!0);try{var t=e.nextHandler();return e.done&&Yu(e),e.returnHandlerResult?t:Pr(t,e.done)}catch(X){throw e.done=!0,Yu(e),X}},"return":function(){var e,t=d(this),n=t.iterator,r=t.inner,i=t.openIters,o=t.done;if(t.done=!0,c)return(e=tn(n,"return"))?M(e,n):Pr(undefined,!0);if(Yu(t),!o){if(r)try{ti(r.iterator,"normal")}catch(X){return ti(n,"throw",X)}if(i)try{for(var a=i,s="normal",u=void 0,l=a.length-1;0<=l;l--)if(a[l]!==undefined)try{u=ti(a[l].iterator,s,u)}catch(X){s="throw",u=X}if("throw"===s)throw u}catch(X){if(n)return ti(n,"throw",X);throw X}n&&ti(n,"normal")}return Pr(undefined,!0)}})},el=Fe(!0),tl=Fe(!1),s=(st(tl,c,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,Qu(this,t)};return e.prototype=r?el:tl,e}),Au=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(X){return!0}},r=!Au("filter",function(){}),nl=!r&&a("filter",TypeError),Fe=r||nl,rl=s(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=E(M(r,t)),this.done=!!e.done)return;if(Ou(t,n,[e=e.value,this.counter++],!0))return e}}),il=(R({target:"Iterator",proto:!0,real:!0,forced:Fe},{filter:function(e){E(this);try{Te(e)}catch(X){ti(this,"throw",X)}return nl?M(nl,this,e):new rl(ai(this),{predicate:e})}}),pi.filter),c=n("filter"),r=(R({target:"Array",proto:!0,forced:!c},{filter:function(e){return il(this,e,1<arguments.length?arguments[1]:undefined)}}),!Au("map",function(){})),ol=!r&&a("map",TypeError),Fe=r||ol,al=s(function(){var e=this.iterator,t=E(M(this.next,e));if(!(this.done=!!t.done))return Ou(e,this.mapper,[t.value,this.counter++],!0)}),sl=(R({target:"Iterator",proto:!0,real:!0,forced:Fe},{map:function(e){E(this);try{Te(e)}catch(X){ti(this,"throw",X)}return ol?M(ol,this,e):new al(ai(this),{mapper:e})}}),pi.map),c=n("map"),ul=(R({target:"Array",proto:!0,forced:!c},{map:function(e){return sl(this,e,1<arguments.length?arguments[1]:undefined)}}),TypeError),ll="Reduce of empty array with no initial value",r=function(l){return function(e,t,n,r){var i=ue(e),o=We(i),a=he(i);if(Te(t),0===a&&n<2)throw new ul(ll);var s=l?a-1:0,u=l?-1:1;if(n<2)for(;;){if(s in o){r=o[s],s+=u;break}if(s+=u,l?s<0:a<=s)throw new ul(ll)}for(;l?0<=s:s<a;s+=u)s in o&&(r=t(r,o[s],s,i));return r}},Fe={left:r(!1),right:r(!0)},n=function(e){return qn.slice(0,e.length)===e},cl=n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":x.Bun&&"string"==typeof Bun.version?"BUN":x.Deno&&"object"==T(Deno.version)?"DENO":"process"===ne(x.process)?"NODE":x.window&&x.document?"BROWSER":"REST",dl="NODE"==cl,fl=Fe.left,c=!dl&&79<Vn&&Vn<83||!ze("reduce"),hl=(R({target:"Array",proto:!0,forced:c},{reduce:function(e){var t=arguments.length;return fl(this,e,t,1<t?arguments[1]:undefined)}}),Fa.fastKey),pl=jt.set,ml=jt.getterFor,r={getConstructor:function(e,n,r,i){var e=e(function(e,t){cr(e,o),pl(e,{type:n,index:Rt(null),first:null,last:null,size:0}),f||(e.size=0),ie(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=ml(n),s=function(e,t,n){var r,i=a(e),o=u(e,t);return o?o.value=n:(i.last=o={index:r=hl(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),f?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},u=function(e,t){var n,e=a(e),r=hl(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Xo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=Rt(null),f?e.size=0:this.size=0},"delete":function(e){var t,n,r=a(this),e=u(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),f?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=a(this),r=Gr(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Xo(o,r?{get:function(e){e=u(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),f&&Bt(o,"size",{configurable:!0,get:function(){return a(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=ml(t),o=ml(r);Lr(e,t,function(e,t){pl(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Pr("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Pr(undefined,!0))},n?"entries":"values",!n,!0),Ta(t)}},gl=(we("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},r),TypeError),n=g(function(){[].keys().reduce(function(){},undefined)}),vl=!n&&a("reduce",gl),yl=(R({target:"Iterator",proto:!0,real:!0,forced:n||vl},{reduce:function(t){E(this);try{Te(t)}catch(X){ti(this,"throw",X)}var n=arguments.length<2,r=n?undefined:arguments[1];if(vl)return Me(vl,this,n?[t]:[t,r]);var e=ai(this),i=0;if(oi(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new gl("Reduce of empty iterator with no initial value");return r}}),function(e,t){return(yl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function wl(e,a,s,u){return new(s=s||Promise)(function(n,t){function r(e){try{o(u.next(e))}catch(a){t(a)}}function i(e){try{o(u["throw"](e))}catch(a){t(a)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((u=u.apply(e,a||[])).next())})}function bl(r,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((s=0<(s=u.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(r,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function kl(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var Sl=/_?t(\d)?(imestamp)?=\d+&?/g,_l=function(e,t){void 0===t&&(t="https://dem.rumt-zh.com");t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com");return e.url=t,e.hostUrl=t,e.offlineUrl=t+"/offline",e.whiteListUrl=t+"/collect/whitelist",e.pvUrl=t+"/collect/pv",e.eventUrl=t+"/collect/events",e.speedUrl=t+"/speed",e.customTimeUrl=t+"/speed/custom",e.performanceUrl=t+"/speed/performance",e.performanceUrlForHippy=t+"/speed/hippyPerformance",e.webVitalsUrl=t+"/speed/webvitals",e.setDataReportUrl=t+"/speed/miniProgramData",e},El=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],Cl=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],Rl=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],Ol=["static","fetch"],xl="unknown",Tl=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&Gr(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],0<o&&Q(u)?(l=he(u),c=Tl(e,t,u,l,c,o-1)-1):(me(c+1),Jn(e,c,u)),c++),d++;return c},Ml=Tl,Il=(R({target:"Array",proto:!0},{flatMap:function(e){var t,n=ue(this),r=he(n);return Te(e),t=hi(n,0),Ml(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),a("some",TypeError)),Al=(R({target:"Iterator",proto:!0,real:!0,forced:Il},{some:function(n){E(this);try{Te(n)}catch(X){ti(this,"throw",X)}var e,r;return Il?M(Il,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.some),c=ze("some"),n=(R({target:"Array",proto:!0,forced:!c},{some:function(e){return Al(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("flatMap"),g(function(){return 1!==[1].values().flatMap(function(){return[1]}).find(function(){return!0})})),c=!n&&!Au("flatMap",function(){}),Pl=!n&&!c&&a("flatMap",TypeError),Au=n||c||Pl,Ll=s(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=E(M(t.next,t.iterator))).done)return e.value;this.inner=null}catch(X){ti(n,"throw",X)}if(e=E(M(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||E(e);t=Xr(e);return ai(E(t!==undefined?M(t,e):e))}(r(e.value,this.counter++),!1)}catch(X){ti(n,"throw",X)}}}),Dl=(R({target:"Iterator",proto:!0,real:!0,forced:Au},{flatMap:function(e){E(this);try{Te(e)}catch(X){ti(this,"throw",X)}return Pl?M(Pl,this,e):new Ll(ai(this),{mapper:e,inner:null})}}),Hl.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},Hl.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},Hl.prototype.one=function(e,t){this.on(e,t,1)},Hl.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(b){}}return null}},Hl.prototype.clear=function(){this.eventsList={}},Hl),Nl=function(e){try{return localStorage.getItem(e)}catch(N0){return null}},Fl=function(e,t){try{localStorage.setItem(e,t)}catch(N0){}},Ul=function(e,t){try{return e?JSON.parse(e):t}catch(N0){return t}},n=Xn.f,jl=ar.f,zl=at.f,Bl=i.trim,Wl=x.Number;function Hl(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(r=a.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===o)break}catch(k){throw k}}return a}},this.eventsList={}}wi.Number;var ql=Wl.prototype,Vl=x.TypeError,Gl=v("".slice),Jl=v("".charCodeAt),$l=function(e){var t,n,r,i,o,a,s,u=So(e,"number");if($i(u))throw new Vl("Cannot convert a Symbol value to a number");if("string"==typeof u&&2<u.length)if(u=Bl(u),43===(e=Jl(u,0))||45===e){if(88===(t=Jl(u,2))||120===t)return NaN}else if(48===e){switch(Jl(u,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+u}for(o=(i=Gl(u,2)).length,a=0;a<o;a++)if((s=Jl(i,a))<48||r<s)return NaN;return parseInt(i,n)}return+u},c=js("Number",!Wl(" 0o1")||!Wl("0b1")||Wl("+0x1")),Zl=function(e){var t,e=arguments.length<1?0:Wl(function(e){e=So(e,"number");return"bigint"==typeof e?e:$l(e)}(e));return Ce(ql,t=this)&&g(function(){Co(t)})?ua(Object(e),this,Zl):e};if(Zl.prototype=ql,c&&(ql.constructor=Zl),R({global:!0,constructor:!0,wrap:!0,forced:c},{Number:Zl}),c)for(var Kl=wi.Number,Yl=Wl,Xl,Ql=f?n(Yl):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),ec=0;Ql.length>ec;ec++)I(Yl,Xl=Ql[ec])&&!I(Kl,Xl)&&zl(Kl,Xl,jl(Yl,Xl));var tc,nc=x.isFinite,s=Number.isFinite||function(e){return"number"==typeof e&&nc(e)};function rc(e){var t;return e===undefined||null===e||!(e=String(e).trim())||(t=e.toLowerCase())===xl||"undefined"===t||"null"===t||"未知"===e?undefined:e}R({target:"Number",stat:!0},{isFinite:s}),(Au=tc=tc||{})[Au.number=-1]="number",Au.string="";var ic,oc=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?tc.string:tc.number},ac=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},sc=function(e,t){return void 0===t&&(t=2048),String(e).replace(Sl,"").slice(0,t)},uc=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},lc=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],cc=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,dc=["ret","retcode","code","errcode"],fc=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?xl:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:xl,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(dc=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==dc.indexOf(e.toLowerCase())});return a.length?{code:""+(o="未知"!==(o=e[a[0]])&&""!==o?o:xl),isErr:0!==o&&"0"!==o&&o!==xl}:{code:xl,isErr:!1}}catch(Ie){return{code:xl,isErr:!1}}},hc=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return vc(r).slice(0,10240)}catch(b){return""}},pc=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===T(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},mc=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,pc(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,pc(),2)||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},gc=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,pc())||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},vc=function(n,r){void 0===r&&(r=3);var i,o,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){"object"===T(e)&&1<r?s+=vc(e,r-1):s+=wc(e),s+=t===i-1?"":","}),s+="]"):n instanceof Object||"object"===T(n)?(s="{",o=Object.keys(n),a=o.length,o.forEach(function(e,t){"object"===T(n[e])&&1<r?s+='"'+e+'":'+vc(n[e],r-1):s+=yc(e,n[e]),s+=t===a-1||t<a-1&&"undefined"==typeof n[o[t+1]]?"":","}),s+="}"):s+=n,s},yc=function(e,t){var n=T(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===T(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},wc=function(e){var t=T(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},bc=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},kc=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=bc(e);r[e.type].push(t)}):(n=bc(e),r[e.type].push(n)),i.append("payload",gc(A({duration:r},t))),i},Sc=/data:(image|text|application|font)\/.*;base64/,_c=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||Sc.test(t)||El.some(function(e){return-1<t.indexOf(e)})};(c=ic=ic||{}).LOG="log",c.SPEED="speed",c.PERFORMANCE="performance",c.OFFLINE="offline",c.WHITE_LIST="whiteList",c.VITALS="vitals",c.PV="pv",c.CUSTOM_PV="customPV",c.EVENT="event",c.CUSTOM="custom",c.SDK_ERROR="sdkError",c.SET_DATA="setData",c.LOAD_PACKAGE="loadPackage",c.MEMORY="memory";var Ec,P,Cc,Rc={maxAttempts:3,delays:[0,1e3,3e3]};function Oc(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function xc(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,a,s,u,l,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],a=d[2],s=d[3],u=d[4],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":o||"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(a=d[1],s=d[2],u=d[3],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++}))}return t}(n=Ec=Ec||{}).production="production",n.development="development",n.gray="gray",n.pre="pre",n.daily="daily",n.local="local",n.test="test",n.others="others",(s=P=P||{}).JS_ERROR="js_error",s.PROMISE_ERROR="promise_error",s.RESOURCE_ERROR="resource_error",s.API_ERROR="api_error",s.BLANK_SCREEN="blank_screen",s.PAGE_LOAD="page_load",s.RESOURCE_LOAD="resource_load",s.API_CALL="api_call",s.SSE_CALL="sse_call",s["true"]="web_vitals",s.LAG_DETECTED="lag_detected",s.NO_RESPONSE="no_response",s.MEMORY_USAGE="memory_usage",s.APP_METRICS="app_metrics",s.PROCESS_SIGNAL="process_signal",s.MEMORY_OOM="memory_oom",s.FILE_IO="file_io",s.CLICK="click",s.SCROLL="scroll",s.LONG_PRESS="long_press",s.PAGE_VIEW="page_view",s.TAB_HIDDEN="tab_hidden",s.TAB_VISIBLE="tab_visible",s.WINDOW_BLUR="window_blur",s.WINDOW_FOCUS="window_focus",s.FORM_FOCUS="form_focus",s.FORM_BLUR="form_blur",s.FORM_CHANGE="form_change",s.FORM_SUBMIT="form_submit",s.FORM_SUBMIT_RESULT="form_submit_result",s.STRUGGLE="struggle",s.CUSTOM="custom",s.LOG="log",(c=Cc=Cc||{}).ERROR="error",c.PERFORMANCE="performance",c.BEHAVIOR="behavior",c.NETWORK="network",c.LOG="log",c.CUSTOM="custom";var Tc=TypeError,Mc=function(e,t){if(e<t)throw new Tc("Not enough arguments");return e},Ic=x.Function,Ac=/MSIE .\./.test(qn)||"BUN"==cl&&((n=x.Bun.version.split(".")).length<3||"0"===n[0]&&(n[1]<3||"3"===n[1]&&"0"===n[2])),s=function(o,a){var s=a?2:1;return Ac?function(e,t){var n=Mc(arguments.length,1)>s,r=_(e)?e:Ic(e),i=n?$n(arguments,s):[],e=n?function(){Me(r,this,i)}:r;return a?o(e,t):o(e)}:o},c=s(x.setInterval,!0),n=(R({global:!0,bind:!0,forced:x.setInterval!==c},{setInterval:c}),s(x.setTimeout,!0)),Pc=(R({global:!0,bind:!0,forced:x.setTimeout!==n},{setTimeout:n}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),Lc=(R({target:"String",proto:!0},{repeat:qr}),{}),Dc={},Nc=function(e){return Lc[e]||(Lc[e]=setTimeout(function(){Dc[e]={},Lc[e]=null},6e4)),Lc[e]},Fc=function(c,d){return function(i,o){var a,s,u,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(s=function(e,t){var n,r,t=A(A({},c.bean),{from:t}),i=A({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(a){}}()?kc(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(A({duration:r},e)),i)},u=function(e,t,n,r){switch(t){case ic.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),a={};return o.forEach(function(t){a[t]=i.map(function(e){return e[t]||""})}),a.count=i.length,gc(a);case ic.SPEED:return s(e,n);case ic.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(l={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,l[t]||(l[t]=[]),l[t].push(e)}),Object.keys(l).forEach(function(e){var t,n=l[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,data:u(n,d,e,i.data)}))):(t=i.url+r+"from="+e,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:kl(i.beanFilter||[],["from"]),data:u(n,d,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(a=i.url)&&a.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(A(A({},i),{url:n,log:e,beanFilter:kl(i.beanFilter||[],["from"]),data:u(e,d,t,i.data)}))):(n=""+i.url,o(A(A({},i),{url:n,log:e,data:u(e,d,t,i.data)}))))):o(i)}},Uc=function(u,l){return function(e,t){var n,r,i,o=Array.isArray(e),a=o?e:[e],s=(u.lifeCycle.emit("beforeRequest",e),u.config.beforeRequest);(a="function"==typeof s?a.map(function(e){try{var t=s({logs:e,logType:l});return(null==t?void 0:t.logType)===l&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(X){return e}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=Rl,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),A(A({},t),e)}))),a=n,t(o?a:a[0]))}},jc=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===T(r)&&"url"in r&&(e=r)}catch(X){console.error(X)}t(e)}},zc=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},Bc={generateTraceId:Hc(16),generateSpanId:Hc(8)},Wc=Array(32);function Hc(t){return function(){for(var e=0;e<2*t;e++)Wc[e]=Math.floor(16*Math.random())+48,58<=Wc[e]&&(Wc[e]+=39);return String.fromCharCode.apply(null,Wc.slice(0,2*t))}}function qc(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Vc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Jc=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$c=function(e){for(var t,n,r,i="",o=0,a=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=Gc.charAt((t=t<<16|n<<8|r)>>18&63)+Gc.charAt(t>>12&63)+Gc.charAt(t>>6&63)+Gc.charAt(63&t)}return a?i.slice(0,a-3)+"===".substring(a):i},Zc=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Jc.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=Gc.indexOf(e.charAt(o++))<<18|Gc.indexOf(e.charAt(o++))<<12|(n=Gc.indexOf(e.charAt(o++)))<<6|(r=Gc.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},Kc=(Qc.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},Qc.prototype.createTraceparent=function(){var e=Bc.generateSpanId();return"00-"+Bc.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},Qc.prototype.createB3=function(){var e=Bc.generateSpanId();return Bc.generateTraceId()+"-"+e+"-"+this.traceFlag},Qc.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:$c,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Vc(),i=Vc();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.11"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},Qc.prototype.createSentryTrace=function(){var e=qc().substring(16);return qc()+"-"+e+"-"+this.traceFlag},Qc.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},Qc.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},Qc.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},Qc),Yc={sw8:function(e){var t="function"==typeof atob?atob:Zc,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},Xc=function(e){var t,n="";return n="object"===T(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Yc)))[0])?Yc[t](e[1]):n};function Qc(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function ed(i){return function(e){e&&0!==e.length&&i.sendPipeline([function(t,e){var n={protocol_version:2,project_key:String(i.config.id||""),sdk:{name:i.sdkName,version:i.sdkVersion},app:{version:String(i.config.version||"1.0.0")},context:function(e){var t=String((null==(n=null==(t=null==(n=e.sessionManager)?void 0:n.getSession)?void 0:t.call(n))?void 0:n.id)||e.bean.sessionId||""),n=String(e.config.userId||e.config.uin||""),t={session_id:t,platform:(t=String(e.runtimePlatform||e.config.platform||"web").trim().toLowerCase(),["web","miniprogram","uniapp","android","ios","electron","unknown"].includes(t)?t:["wx","my","qq","tt"].includes(t)?"miniprogram":"undefined"!=typeof window?"web":"unknown")};n&&(t.user_id=n);(n=String(e.bean.aid||"").trim())&&"true"!==n&&(t.device_id=n);var n=e.bean.runtime?String(e.bean.runtime):"",r=e.bean.processType?String(e.bean.processType):"",i=e.bean.windowId!==undefined?String(e.bean.windowId):"",o=e.bean.webContentsId!==undefined?String(e.bean.webContentsId):"",e=e.bean.appVersion?String(e.bean.appVersion):"";return n&&(t.runtime=n),r&&(t.process_type=r),i&&(t.window_id=i),o&&(t.web_contents_id=o),e&&(t.app_version=e),"undefined"!=typeof navigator&&(t.user_agent=navigator.userAgent,t.language=navigator.language),"undefined"!=typeof screen&&(t.screen_resolution=screen.width+"x"+screen.height),t}(i),events:t},r=String(i.config.url||"").replace(/\/+$/,"");r&&e({url:r+"/api/v1/collect/events",data:JSON.stringify(n),method:"POST",contentType:"application/json",addBean:!1,type:ic.EVENT,log:t,success:function(){i.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){i.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],ic.EVENT)(e)}}function td(e){e=null==(e=e)?void 0:e._tdemSampleGate;return!!e&&e.isDecided&&e.isSampled}var nd=function(){},rd=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||nd)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=nd),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},id=(R({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,n,r=He(e),i=ar.f,o=or(r),a={},s=0;o.length>s;)(n=i(r,t=o[s++]))!==undefined&&Jn(a,t,n);return a}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),od={low:1,medium:3,high:5},ad=new Set(["custom_struggle_name","form_id","field_id","trigger_event_id","struggle_status","struggle_owner_type","struggle_owner_key","detection_source","rule_version"]),sd={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},ud={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},ld=(d.use=function(e){-1===d.installedPlugins.indexOf(e)&&e.tdemPlugin&&d.installedPlugins.push(e)},d.unuse=function(e){e=d.installedPlugins.indexOf(e);-1!==e&&d.installedPlugins.splice(e,1)},d.prototype.getInternalTransport=function(){return this.internalTransport},d.prototype.setInternalTransport=function(e){this.internalTransport=e},d.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},d.prototype.transportRequest=function(t,n){return wl(this,void 0,void 0,function(){return bl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,this.internalTransport.request(t,n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t}]}})})},d.prototype.transportHandoff=function(t,n){return wl(this,void 0,void 0,function(){return bl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,A(A({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},d.prototype.init=function(e){this.setConfig(e),this.config=_l(this.config,e.hostUrl);for(var t=0;t<d.installedPlugins.length;t++)try{d.installedPlugins[t].patch(this)}catch(u){this.sendSDKError(u)}this.lifeCycle.emit("onInited")},d.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=d.instances.indexOf(this);-1!==r&&d.instances.splice(r,1);for(var i=d.installedPlugins.length-1;0<=i;i--)try{d.installedPlugins[i].unpatch(this)}catch(N){this.sendSDKError(N)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&id(o,this),o=Object.getPrototypeOf(o););0===d.instances.length&&(r=Object.getPrototypeOf(this).constructor,id(r),id(d))}},d.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.aid,o=e.env,a=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(n!==undefined&&null!==n?String(n):""),n=this.bean.id!==t||this.bean.uin!==e||this.bean.aid!==i;return this.bean.id=t||"",this.bean.uin=e,this.bean.version=r||"1.0.11",this.bean.aid=i||"",this.bean.env=function(){switch(a){case Ec.production:case Ec.development:case Ec.gray:case Ec.pre:case Ec.daily:case Ec.local:case Ec.test:case Ec.others:return 1;default:return}}()?a:Ec.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},d.prototype.extendBean=function(e,t){this.bean[e]=t},d.prototype.send=function(e,i,o){var t=this;return rd([jc(this),Fc(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},zc(this)])(e)},d.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(mc(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.11)",addBean:!1,method:"get",type:ic.SDK_ERROR,log:e})}],ic.SDK_ERROR)(e)},d.prototype.sendPipeline=function(e,t){var n,o=this;return rd(kl([function(e,t){if(e&&e.type===ic.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},Uc(n=this,t)],e,[Fc(this,t),jc(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,kl([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,kl([r],t))})},zc(this)]))},d.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:Oc(),event_type:P.CUSTOM,event_category:Cc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(),data:{event_name:e,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},d.prototype.trackStruggle=function(e,t){void 0===t&&(t={});var n,e="string"==typeof e?e.trim():"";!e||128<e.length?console.warn("trackStruggle: name must be a non-empty string limited to 128 characters"):(n=t.severity||"medium",(n=od[n])?this.reportStruggle({type:"custom_struggle",ownerType:"business",ownerKey:e,severity:n,detectionSource:"custom",ruleVersion:"custom-v1",tags:t.tags,properties:A(A({},t.properties||{}),{custom_struggle_name:e})}):console.warn("trackStruggle: severity must be low, medium, or high"))},d.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return A(A({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:A(A(A({},e.data),null!=(t=e.data)&&t.replay_id||!n.getCurrentReplayId()?{}:{replay_id:n.getCurrentReplayId()}),n.mergeEventTags(null==(t=e.data)?void 0:t.tags)?{tags:n.mergeEventTags(null==(t=e.data)?void 0:t.tags)}:{})})}),this.lifeCycle.emit("tdemEventCreated",e),this.tdemEventPipeline(e))},d.prototype.measure=function(e,t,n){void 0===n&&(n={}),e&&"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("measure: duration must between 0 and 2147483646"):this.submitMeasure(e,t,n):console.warn("measure: duration must be a number"):console.warn("measure: name must be a non-empty string")},d.prototype.startMeasure=function(e){"string"==typeof e&&e?this.timeMap[e]?console.warn("Measure "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("startMeasure: name must be a non-empty string")},d.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n=this.getTimeEventDuration(e))!==undefined?(this.submitMeasure(e,n,t),delete this.timeMap[e]):console.warn("Measure "+e+" does not exist"):console.warn("endMeasure: name must be a non-empty string")},d.prototype.captureMessage=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n="error"===t.level?"error":"warn"===t.level?"warn":"info",n={event_id:Oc(),event_type:P.LOG,event_category:Cc.LOG,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{log_level:n,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},d.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:Oc(),event_type:P.JS_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:xc(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},d.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:A(A({},this.config.defaultTags||{}),e||{})})},d.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=A({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},d.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},d.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},d.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},d.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:sd[r],n="number"==typeof e.weight?e.weight:ud[r],r={event_id:Oc(),event_type:P.STRUGGLE,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:A(A({},this.sanitizeStruggleProperties(e.properties)),{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()})}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},d.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:Oc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},d.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:Oc(),event_type:P.PAGE_VIEW,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:e,data:{page_title:t.pageTitle||"",referrer:t.referrer,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A(A(A(A(A(A({},t.properties||{}),t.navigationType?{navigation_type:t.navigationType}:{}),t.fromPage?{from_page:t.fromPage}:{}),t.toPage?{to_page:t.toPage}:{}),"boolean"==typeof t.isFirstVisit?{is_first_visit:t.isFirstVisit?"1":"0"}:{}),"boolean"==typeof t.isFirstLoad?{is_first_load:t.isFirstLoad?"1":"0"}:{}),t.deviceType?{device_type:t.deviceType}:{}))}};this.reportTDEMEvent(e)},d.prototype.setPage=function(e,t){var n;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,this.reportPageView(e,{pageTitle:null==t?void 0:t.pageTitle,navigationType:"push",fromPage:(n||"").slice(0,512),toPage:e.slice(0,512),isFirstVisit:!1,tags:A({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{})}),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},d.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},d.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(Pe){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},d.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},d.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},d.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||undefined},d.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(A(A({},this.config.defaultTags||{}),e||{}))},d.prototype.sanitizeStringMap=function(n,r){var i;return void 0===r&&(r=1024),n&&"object"===T(n)&&(i={},Object.keys(n).forEach(function(e){var t=n[e];e&&t!==undefined&&null!==t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length)?i:undefined},d.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},d.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},d.prototype.sanitizeStruggleProperties=function(e){var n=this.sanitizeEventProperties(e);return n?Object.keys(n).reduce(function(e,t){return ad.has(t)&&"custom_struggle_name"!==t||(e[t]=n[t]),e},{}):undefined},d.prototype.sanitizeEventPayload=function(n,e){var r,i=this;return n&&"object"===T(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=i.sanitizePayloadValue(n[e]))!==undefined&&(r[e]=t)}),Object.keys(r).length)?r:undefined},d.prototype.sanitizePayloadValue=function(n,r){var i=this;if(void 0===r&&(r=0),n===undefined||null===n)return undefined;if("string"==typeof n)return n.slice(0,256);if("number"==typeof n||"boolean"==typeof n)return n;if(Array.isArray(n))return n.slice(0,10).map(function(e){e=i.sanitizePayloadValue(e,r+1);return e===undefined?null:e});if("object"!==T(n))return String(n).slice(0,256);if(2<=r)try{return JSON.stringify(n).slice(0,256)}catch(N0){return undefined}var o={};return Object.keys(n).slice(0,20).forEach(function(e){var t=i.sanitizePayloadValue(n[e],r+1);t!==undefined&&(o[e]=t)}),Object.keys(o).length?o:undefined},d.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(kl(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},d.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},d.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},d.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},d.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},d.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(d.prototype,"__version__",{get:function(){return"1.0.11"},enumerable:!1,configurable:!0}),d.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:Oc(),event_type:P.CUSTOM,event_category:Cc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(n.pageUrl),data:{event_name:e,measurements:{duration:t},replay_id:this.getEventReplayId(n.replayId),tags:this.sanitizeEventTags(n.tags),payload:this.sanitizeEventPayload(n.payload),event_properties:this.sanitizeEventProperties(n.properties)}};this.reportTDEMEvent(e)},d.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},d.version="1.0.11",d.instances=[],d.environment=Ec,d.installedPlugins=[],d),c=(bd.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},bd.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},bd.prototype.countInstance=function(){return this.instances.length},bd.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},bd.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},bd.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==T(e))||!!e},bd.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},bd.prototype.exist=function(e){return-1===this.instances.indexOf(e)},bd.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},bd.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},bd),s=new c({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Vc(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(S){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),cd=RangeError,dd=String,fd=Math.floor,hd=v(qr),pd=v("".slice),md=v(1.1.toFixed),gd=function(e,t,n){return 0===t?n:t%2==1?gd(e,t-1,n*e):gd(e*e,t/2,n)},vd=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=fd(i/1e7)},yd=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=fd(r/t),r=r%t*1e7},wd=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=dd(e[n]),r=""===r?t:r+hd("0",7-t.length)+t);return r},n=g(function(){return"0.000"!==md(8e-5,3)||"1"!==md(.9,0)||"1.25"!==md(1.255,2)||"1000000000000000128"!==md(0xde0b6b3a7640080,0)})||!g(function(){md({})});function bd(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function d(e,t){var n,r,i,o,a,s,u,l,c;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=d.version,this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,lagMonitor:!0,blankScreen:!0,memoryMonitor:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,env:"production",url:"",reportImmediately:!0,tdemConfig:!0,hostUrl:"https://dem.rumt-zh.com",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:""},this.isWhiteList=!1,this.lifeCycle=new Dl,this.bean={},this.internalRetrySchedule=Rc,this._customPageUrl=null,this.tdemEventPipeline=rd([(r=n=!1,i=[],this._tdemSampleGate={decide:function(e){n=!0,(r=e)&&i.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),i=[]},reDecide:function(e){return r=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return r}},function(e,t){n?r&&t(e):i.length<1e3&&i.push({event:e,resolve:t})}),(a=20,l=Math.max(Number(a)||1,1),c=[],function(e,t){var e=Array.isArray(e)?e:[e],n=(c.push.apply(c,e),function(){for(clearTimeout(s),clearTimeout(u),s=undefined,u=undefined;0<c.length;)t(c.splice(0,l))});l<=c.length?n():(clearTimeout(s),s=setTimeout(function(){0<c.length&&n()},5e3),u=u||setTimeout(function(){0<c.length&&n()},3e4))}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(o.lifeCycle.emit("beforeReport",r),o.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(D){t(e)}},ed(o=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||Rc,d.instances.push(this)}R({target:"Number",proto:!0,forced:n},{toFixed:function(e){var t,n,r,i=Co(this),e=ce(e),o=[0,0,0,0,0,0],a="",s="0";if(e<0||20<e)throw new cd("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return dd(i);if(i<0&&(a="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*gd(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*gd(2,-t,1):i/gd(2,t,1),r*=4503599627370496,0<(t=52-t)){for(vd(o,0,r),n=e;7<=n;)vd(o,1e7,0),n-=7;for(vd(o,gd(10,n,1),0),n=t-1;23<=n;)yd(o,1<<23),n-=23;yd(o,1<<n),vd(o,1,1),yd(o,2),s=wd(o)}else vd(o,0,r),vd(o,1<<-t,0),s=wd(o)+hd("0",e);return 0<e?a+((r=s.length)<=e?"0."+hd("0",e-r)+s:pd(s,0,r-e)+"."+pd(s,r-e)):a+s}});var kd=function(t){return"string"!=typeof t||!t||Cl.some(function(e){return-1<t.indexOf(e)})||El.some(function(e){return-1<t.indexOf(e)})},Sd=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function _d(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var Ed=new c({name:"assets"}),qr=Ed=new c({name:"assets",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},onNewTdem:function(e){var t=this;Sd()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:Oc(),event_type:P.RESOURCE_LOAD,event_category:Cc.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:_d(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var a=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(a.initiatorType)||_c(a.name,n.hostUrl)||this.publish(this.generateLog(a,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,a=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=a.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),_c(t,a.hostUrl))||(n=o.getFromParam(i),r={url:sc(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:uc(t),urlQuery:ac(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===Ed.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:sc(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:uc(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:ac(e.name,!0),domainLookup:oc(e.domainLookupEnd-e.domainLookupStart),connectTime:oc(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Sd()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}});we("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},r);var Cd,Rd,n=/ipad|iphone|ipod/i.test(qn)&&/applewebkit/i.test(qn),r=x.setImmediate,Od=x.clearImmediate,xd=x.process,Td=x.Dispatch,Md=x.Function,Id=x.MessageChannel,Ad=x.String,Pd=0,Ld={},Dd=(g(function(){Cd=x.location}),function(e){var t;I(Ld,e)&&(t=Ld[e],delete Ld[e],t())}),Nd=function(e){return function(){Dd(e)}},Fd=function(e){Dd(e.data)},Ud=function(e){x.postMessage(Ad(e),Cd.protocol+"//"+Cd.host)},Id=(r&&Od||(r=function(e){Mc(arguments.length,1);var t=_(e)?e:Md(e),n=$n(arguments,1);return Ld[++Pd]=function(){Me(t,undefined,n)},Rd(Pd),Pd},Od=function(e){delete Ld[e]},dl?Rd=function(e){xd.nextTick(Nd(e))}:Td&&Td.now?Rd=function(e){Td.now(Nd(e))}:Id&&!n?(zd=(Id=new Id).port2,Id.port1.onmessage=Fd,Rd=Gr(zd.postMessage,zd)):x.addEventListener&&_(x.postMessage)&&!x.importScripts&&Cd&&"file:"!==Cd.protocol&&!g(Ud)?(Rd=Ud,x.addEventListener("message",Fd,!1)):Rd="onreadystatechange"in ye("script")?function(e){bt.appendChild(ye("script")).onreadystatechange=function(){bt.removeChild(this),Dd(e)}}:function(e){setTimeout(Nd(e),0)}),{set:r,clear:Od}),jd=Object.getOwnPropertyDescriptor,zd=function(e){var t;return f?(t=jd(x,e))&&t.value:x[e]},Ud=function(){this.head=null,this.tail=null};Ud.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Bd,Wd,Hd,qd,Vd,Gd,Jd=Ud,Fd=/ipad|iphone|ipod/i.test(qn)&&"undefined"!=typeof Pebble,r=/web0s(?!.*chrome)/i.test(qn),$d=Id.set,Od=x.MutationObserver||x.WebKitMutationObserver,Ud=x.document,Zd=x.process,Kd=x.Promise,Yd=zd("queueMicrotask"),Xd=(Yd||(qd=new Jd,Vd=function(){var e,t;for(dl&&(e=Zd.domain)&&e.exit();t=qd.get();)try{t()}catch(X){throw qd.head&&Gd(),X}e&&e.enter()},Gd=n||dl||r||!Od||!Ud?!Fd&&Kd&&Kd.resolve?((n=Kd.resolve(undefined)).constructor=Kd,Hd=Gr(n.then,n),function(){Hd(Vd)}):dl?function(){Zd.nextTick(Vd)}:($d=Gr($d,x),function(){$d(Vd)}):(Bd=!0,Wd=Ud.createTextNode(""),new Od(Vd).observe(Wd,{characterData:!0}),function(){Wd.data=Bd=!Bd}),Yd=function(e){qd.head||Gd(),qd.add(e)}),Yd),Qd=function(e){try{return{error:!1,value:e()}}catch(X){return{error:!0,value:X}}},ef=x.Promise,tf=TypeError,nf=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new tf("Bad Promise constructor");n=e,r=t}),this.resolve=Te(n),this.reject=Te(r)},rf={f:function(e){return new nf(e)}},of=function(e,t){return E(e),O(t)&&t.constructor===e?t:((0,(e=rf.f(e)).resolve)(t),e.promise)},af=ef&&ef.prototype,r=!!ef&&g(function(){af["finally"].call({then:function(){}},function(){})});R({target:"Promise",proto:!0,real:!0,forced:r},{"finally":function(t){var n=hu(this,Ee("Promise")),e=_(t);return this.then(e?function(e){return of(n,t()).then(function(){return e})}:t,e?function(e){return of(n,t()).then(function(){throw e})}:t)}}),_(ef)&&(Fd=Ee("Promise").prototype["finally"],af["finally"]!==Fd)&&Gt(af,"finally",Fd,{unsafe:!0}),ef&&ef.prototype;var sf,uf,lf,cf,df=Xe("species"),ff=!1,hf=_(x.PromiseRejectionEvent),Kd={CONSTRUCTOR:js("Promise",function(){var e=Ye(ef),t=e!==String(ef);if(!t&&66===Vn)return!0;if(!Vn||Vn<51||!/native code/.test(e)){var e=new ef(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[df]=n,!(ff=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=cl&&"DENO"!=cl||hf)}),REJECTION_EVENT:hf,SUBCLASSING:ff},pf=Id.set,n=Kd.CONSTRUCTOR,mf=Kd.REJECTION_EVENT,Ud=Kd.SUBCLASSING,gf=jt.getterFor("Promise"),vf=jt.set,Od=ef&&ef.prototype,yf=ef,wf=Od,bf=x.TypeError,kf=x.document,Sf=x.process,_f=rf.f,Ef=_f,Cf=!!(kf&&kf.createEvent&&x.dispatchEvent),Rf=function(e){var t;return!(!O(e)||!_(t=e.then))&&t},Of=function(e,t){var n,r,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Af(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(new bf("Promise-chain cycle")):(r=Rf(n))?M(r,n,u,l):u(n)):l(o)}catch(X){c&&!i&&c.exit(),l(X)}},xf=function(n,r){n.notified||(n.notified=!0,Xd(function(){for(var e,t=n.reactions;e=t.get();)Of(e,n);n.notified=!1,r&&!n.rejection&&Mf(n)}))},Tf=function(e,t,n){var r;Cf?((r=kf.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),x.dispatchEvent(r)):r={promise:t,reason:n},!mf&&(t=x["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(X){}}("Unhandled promise rejection",n)},Mf=function(r){M(pf,x,function(){var e,t=r.facade,n=r.value;if(If(r)&&(e=Qd(function(){dl?Sf.emit("unhandledRejection",n,t):Tf("unhandledrejection",t,n)}),r.rejection=dl||If(r)?2:1,e.error))throw e.value})},If=function(e){return 1!==e.rejection&&!e.parent},Af=function(t){M(pf,x,function(){var e=t.facade;dl?Sf.emit("rejectionHandled",e):Tf("rejectionhandled",e,t.value)})},Pf=function(t,n,r){return function(e){t(n,e,r)}},Lf=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,xf(e,!0))},Df=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new bf("Promise can't be resolved itself");var r=Rf(n);r?Xd(function(){var e={done:!1};try{M(r,n,Pf(Df,e,t),Pf(Lf,e,t))}catch(X){Lf(e,X,t)}}):(t.value=n,t.state=1,xf(t,!1))}catch(X){Lf({done:!1},X,t)}}};if(n&&(wf=(yf=function(e){cr(this,wf),Te(e),M(sf,this);var t=gf(this);try{e(Pf(Df,t),Pf(Lf,t))}catch(X){Lf(t,X)}}).prototype,(sf=function(e){vf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Jd,rejection:!1,state:0,value:null})}).prototype=Gt(wf,"then",function(e,t){var n=gf(this),r=_f(hu(this,yf));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(t)&&t,r.domain=dl?Sf.domain:undefined,0===n.state?n.reactions.add(r):Xd(function(){Of(r,n)}),r.promise}),uf=function(){var e=new sf,t=gf(e);this.promise=e,this.resolve=Pf(Df,t),this.reject=Pf(Lf,t)},rf.f=_f=function(e){return e===yf||e===lf?new uf:Ef(e)},_(ef))&&Od!==Object.prototype){cf=Od.then,Ud||Gt(Od,"then",function(e,t){var n=this;return new yf(function(e,t){M(cf,n,e,t)}).then(e,t)},{unsafe:!0});try{delete Od.constructor}catch(X){}Rr&&Rr(Od,wf)}R({global:!0,constructor:!0,wrap:!0,forced:n},{Promise:yf}),lf=wi.Promise,yr(yf,"Promise",!1),Ta("Promise");var Nf,Ff,Uf,Yd=Kd.CONSTRUCTOR||!Mu(function(e){ef.all(e).then(undefined,function(){})}),r=(R({target:"Promise",stat:!0,forced:Yd},{all:function(e){var s=this,t=rf.f(s),u=t.resolve,l=t.reject,n=Qd(function(){var r=Te(s.resolve),i=[],o=0,a=1;oi(e,function(e){var t=o++,n=!1;a++,M(r,s,e).then(function(e){n||(n=!0,i[t]=e,--a)||u(i)},l)}),--a||u(i)});return n.error&&l(n.value),t.promise}}),Kd.CONSTRUCTOR),Fd=ef&&ef.prototype,Ud=(R({target:"Promise",proto:!0,forced:r,real:!0},{"catch":function(e){return this.then(undefined,e)}}),_(ef)&&(Id=Ee("Promise").prototype["catch"],Fd["catch"]!==Id)&&Gt(Fd,"catch",Id,{unsafe:!0}),R({target:"Promise",stat:!0,forced:Yd},{race:function(e){var n=this,r=rf.f(n),i=r.reject,t=Qd(function(){var t=Te(n.resolve);oi(e,function(e){M(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),R({target:"Promise",stat:!0,forced:Kd.CONSTRUCTOR},{reject:function(e){var t=rf.f(this);return(0,t.reject)(e),t.promise}}),Kd.CONSTRUCTOR),jf=(Ee("Promise"),R({target:"Promise",stat:!0,forced:Ud},{resolve:function(e){return of(this,e)}}),window.navigator.userAgent.toLowerCase()),h={},zf=function(e){return-1!==jf.indexOf(e)},Bf=(h.macos=function(){return zf("mac")},h.ios=function(){return h.iphone()||h.ipod()||h.ipad()},h.iphone=function(){return!h.windows()&&zf("iphone")},h.ipod=function(){return zf("ipod")},h.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return zf("ipad")||e},h.android=function(){return!h.windows()&&zf("android")},h.androidPhone=function(){return h.android()&&zf("mobile")},h.androidTablet=function(){return h.android()&&!zf("mobile")},h.blackberry=function(){return zf("blackberry")||zf("bb10")},h.blackberryPhone=function(){return h.blackberry()&&!zf("tablet")},h.blackberryTablet=function(){return h.blackberry()&&zf("tablet")},h.windows=function(){return zf("windows")},h.windowsPhone=function(){return h.windows()&&zf("phone")},h.windowsTablet=function(){return h.windows()&&zf("touch")&&!h.windowsPhone()},h.fxos=function(){return(zf("(mobile")||zf("(tablet"))&&zf(" rv:")},h.fxosPhone=function(){return h.fxos()&&zf("mobile")},h.fxosTablet=function(){return h.fxos()&&zf("tablet")},h.meego=function(){return zf("meego")},h.cordova=function(){return window.cordova&&"file:"===location.protocol},h.nodeWebkit=function(){return"object"===T(window.process)},h.mobile=function(){return h.androidPhone()||h.iphone()||h.ipod()||h.windowsPhone()||h.blackberryPhone()||h.fxosPhone()||h.meego()},h.tablet=function(){return h.ipad()||h.androidTablet()||h.blackberryTablet()||h.windowsTablet()||h.fxosTablet()},h.desktop=function(){return!h.tablet()&&!h.mobile()},h.isIE=function(){return"ActiveXObject"in window},void 0),Wf=(R({target:"Object",stat:!0},{is:Bf}),Object.is,Ft("search",function(r,i,o){return[function(e){var t=ae(this),n=O(e)?tn(e,r):undefined;return n?M(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),e=C(e),n=o(i,t,e);return n.done?n.value:(n=t.lastIndex,Bf(n,0)||(t.lastIndex=0),e=mn(t,e),Bf(t.lastIndex,n)||(t.lastIndex=n),null===e?-1:e.index)}]}),Math.floor),Hf=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=Wf(n/2),s=Hf($n(e,0,a),t),u=Hf($n(e,a),t),l=s.length,c=u.length,d=0,f=0;d<l||f<c;)e[d+f]=d<l&&f<c?t(s[d],u[f])<=0?s[d++]:u[f++]:d<l?s[d++]:u[f++];return e},qf=Hf,Od=qn.match(/firefox\/(\d+)/i),Vf=!!Od&&+Od[1],Gf=/MSIE|Trident/.test(qn),n=qn.match(/AppleWebKit\/(\d+)\./),Jf=!!n&&+n[1],$f=[],Zf=v($f.sort),Kf=v($f.push),r=g(function(){$f.sort(undefined)}),Fd=g(function(){$f.sort(null)}),Id=ze("sort"),Yf=!g(function(){if(Vn)return Vn<70;if(!(Vf&&3<Vf)){if(Gf)return!0;if(Jf)return Jf<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)$f.push({k:e+n,v:t})}for($f.sort(function(e,t){return t.v-e.v}),n=0;n<$f.length;n++)e=$f[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),Xf=(R({target:"Array",proto:!0,forced:r||!Fd||!Id||!Yf},{sort:function(e){e!==undefined&&Te(e);var t=ue(this);if(Yf)return e===undefined?Zf(t):Zf(t,e);for(var n,r,i=[],o=he(t),a=0;a<o;a++)a in t&&Kf(i,t[a]);for(qf(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=C(e))===(t=C(t))?0:t<e?1:-1})),n=he(i),a=0;a<n;)t[a]=i[a++];for(;a<o;)La(t,a++);return t}}),(Yd=(Yd=x.URL)&&Yd.prototype)&&Yd.toString),Qf=(R({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return M(Xf,this)}}),RangeError),eh=String.fromCharCode,Kd=String.fromCodePoint,th=v([].join),Ud=!!Kd&&1!==Kd.length,nh=(R({target:"String",stat:!0,arity:1,forced:Ud},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(ht(t=+arguments[i],1114111)!==t)throw new Qf(t+" is not a valid code point");n[i++]=t<65536?eh(t):eh(55296+((t-=65536)>>10),t%1024+56320)}return th(n,"")}}),String.fromCharCode),rh=Ee("String","fromCodePoint"),ih=encodeURIComponent,oh=parseInt,ah=v("".charAt),sh=v([].push),uh=v("".replace),lh=v("".slice),ch=v(/./.exec),dh=/^[0-9a-f]+$/i,fh=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,hh=function(e,t){e=lh(e,t,t+2);return ch(dh,e)?oh(e,16):NaN},ph=function(e){return 2===e.length?e:"�"},Ft=function(e){for(var t=e.length,n="",r=0;r<t;){var i=ah(e,r);if("%"===i){if("%"===ah(e,r+1)||t<r+3){n+="%",r++;continue}var o=hh(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===a)i=nh(o);else{if(1===a||4<a){n+="�",r++;continue}for(var s=[o],u=1;u<a&&!(++r+3>t||"%"!==ah(e,r));){var l=hh(e,r+1);if(l!=l||191<l||l<128)break;if(1===u){if(224===o&&l<160)break;if(237===o&&159<l)break;if(240===o&&l<144)break;if(244===o&&143<l)break}sh(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(s);if(null===c){for(var d=0;d<a;d++)n+="�";r++;continue}i=rh(c)}}n+=i,r++}return n},Od=function(e){try{return ih(e)}catch(X){return ih(uh(e,fh,ph))}},n=Xe("iterator"),mh=jt.set,gh=jt.getterFor("URLSearchParams"),vh=jt.getterFor("URLSearchParamsIterator"),yh=Ft,wh=Od,bh=zd("fetch"),kh=zd("Request"),Sh=zd("Headers"),_h=kh&&kh.prototype,r=Sh&&Sh.prototype,Eh=x.TypeError,Ch=v("".charAt),Rh=v([].join),Oh=v([].push),xh=v("".replace),Th=v([].shift),Mh=v([].splice),Ih=v("".split),Ah=v("".slice),Ph=/\+/g,Lh=function(e){return yh(xh(e,Ph," "))},Dh=/[!'()~]|%20/g,Nh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Fh=function(e){return Nh[e]},Uh=function(e){return xh(wh(e),Dh,Fh)},jh=Cr(function(e,t){mh(this,{type:"URLSearchParamsIterator",target:gh(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=vh(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pr(undefined,!0);var r=t[n];switch(e.kind){case"keys":return Pr(r.key,!1);case"values":return Pr(r.value,!1)}return Pr([r.key,r.value],!1)},!0),zh=function(e){this.entries=[],this.url=null,e!==undefined&&(O(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Ch(e,0)?Ah(e,1):e:C(e)))},Fd=(zh.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s=this.entries,u=Xr(e);if(u)for(n=(t=ei(e,u)).next;!(r=M(n,t)).done;){if(i=(r=ei(E(r.value))).next,(o=M(i,r)).done||(a=M(i,r)).done||!M(i,r).done)throw new Eh("Expected sequence with length 2");Oh(s,{key:C(o.value),value:C(a.value)})}else for(var l in e)I(e,l)&&Oh(s,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=Ih(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=Ih(t,"="),Oh(n,{key:Lh(Th(t)),value:Lh(Rh(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Oh(n,Uh(e.key)+"="+Uh(e.value));return Rh(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){cr(this,Bh);var e=0<arguments.length?arguments[0]:undefined,e=mh(this,new zh(e));f||(this.size=e.entries.length)}),Bh=Fd.prototype;Xo(Bh,{append:function(e,t){var n=gh(this);Mc(arguments.length,2),Oh(n.entries,{key:C(e),value:C(t)}),f||this.size++,n.updateURL()},"delete":function(e){for(var t=gh(this),n=Mc(arguments.length,1),r=t.entries,i=C(e),e=n<2?undefined:arguments[1],o=e===undefined?e:C(e),a=0;a<r.length;){var s=r[a];s.key!==i||o!==undefined&&s.value!==o?a++:Mh(r,a,1)}f||(this.size=r.length),t.updateURL()},get:function(e){var t=gh(this).entries;Mc(arguments.length,1);for(var n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=gh(this).entries;Mc(arguments.length,1);for(var n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Oh(r,t[i].value);return r},has:function(e){for(var t=gh(this).entries,n=Mc(arguments.length,1),r=C(e),e=n<2?undefined:arguments[1],i=e===undefined?e:C(e),o=0;o<t.length;){var a=t[o++];if(a.key===r&&(i===undefined||a.value===i))return!0}return!1},set:function(e,t){var n=gh(this);Mc(arguments.length,2);for(var r,i=n.entries,o=!1,a=C(e),s=C(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?Mh(i,u--,1):(o=!0,r.value=s));o||Oh(i,{key:a,value:s}),f||(this.size=i.length),n.updateURL()},sort:function(){var e=gh(this);qf(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=gh(this).entries,r=Gr(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new jh(this,"keys")},values:function(){return new jh(this,"values")},entries:function(){return new jh(this,"entries")}},{enumerable:!0}),Gt(Bh,n,Bh.entries,{name:"entries"}),Gt(Bh,"toString",function(){return gh(this).serialize()},{enumerable:!0}),f&&Bt(Bh,"size",{get:function(){return gh(this).entries.length},configurable:!0,enumerable:!0}),yr(Fd,"URLSearchParams"),R({global:!0,constructor:!0,forced:!0},{URLSearchParams:Fd}),_(Sh)&&(Nf=v(r.has),Ff=v(r.set),Uf=function(e){if(O(e)){var t,n=e.body;if("URLSearchParams"===nt(n))return t=e.headers?new Sh(e.headers):new Sh,Nf(t,"content-type")||Ff(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Rt(e,{body:ot(0,C(n)),headers:ot(0,t)})}return e},_(bh)&&R({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return bh(e,1<arguments.length?Uf(arguments[1]):{})}}),_(kh))&&((_h.constructor=Id=function(e){return cr(this,_h),new kh(e,1<arguments.length?Uf(arguments[1]):{})}).prototype=_h,R({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Id}));var Wh,Yd={URLSearchParams:Fd,getState:gh},Hh=Xe("iterator"),qh=(g(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!f||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[Hh]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),/[^\0-\u007E]/),Vh=/[.\u3002\uFF0E\uFF61]/g,Gh="Overflow: input needs wider integers to process",Jh=RangeError,$h=v(Vh.exec),Zh=Math.floor,Kh=String.fromCharCode,Yh=v("".charCodeAt),Xh=v([].join),Qh=v([].push),ep=v("".replace),tp=v("".split),np=v("".toLowerCase),rp=function(e){return e+22+75*(e<26)},ip=function(e,t,n){var r=0;for(e=n?Zh(e/700):e>>1,e+=Zh(e/t);455<e;)e=Zh(e/35),r+=36;return Zh(r+36*e/(e+38))},op=function(e){for(var t,n=[],r=tp(ep(np(e),Vh,"."),"."),i=0;i<r.length;i++)t=r[i],Qh(n,$h(qh,t)?"xn--"+function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=Yh(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=Yh(e,n++)))?Qh(t,((1023&o)<<10)+(1023&i)+65536):(Qh(t,o),n--):Qh(t,o)}return t}(e)).length,i=128,o=0,a=72;for(c=0;c<e.length;c++)(t=e[c])<128&&Qh(n,Kh(t));var s=n.length,u=s;for(s&&Qh(n,"-");u<r;){for(var l=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<l&&(l=t);var d=u+1;if(l-i>Zh((2147483647-o)/d))throw new Jh(Gh);for(o+=(l-i)*d,i=l,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new Jh(Gh);if(t===i){for(var f=o,h=36;;){var p=h<=a?1:a+26<=h?26:h-a;if(f<p)break;var m=f-p,g=36-p;Qh(n,Kh(rp(p+m%g))),f=Zh(m/g),h+=36}Qh(n,Kh(rp(f))),a=ip(o,d,u===s),o=0,u++}}o++,i++}return Xh(n,"")}(t):t);return Xh(n,".")},ap=Wt.codeAt,sp=jt.set,up=jt.getterFor("URL"),lp=Yd.URLSearchParams,cp=Yd.getState,dp=Ft,fp=Od,Kd=x.URL,hp=x.TypeError,pp=x.parseInt,mp=Math.floor,gp=Math.pow,vp=String.fromCharCode,yp=v("".charAt),wp=v(/./.exec),bp=v([].join),kp=v(1.1.toString),Sp=v([].pop),_p=v([].push),Ep=v("".replace),Cp=v([].shift),Rp=v("".split),Op=v("".indexOf),xp=v("".slice),Tp=v("".toLowerCase),Mp=v([].unshift),Ip=/[a-z]/i,Ap=/[\d+\-.a-z]/i,Pp=/\d/,Lp=/^0x/i,Dp=/^[0-7]+$/,Np=/^\d+$/,Fp=/^[\da-f]+$/i,Up=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,jp=/[\0\t\n\r #/:<>?@[\\\]^|]/,zp=/^[\u0000-\u0020]+/,Bp=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Wp=/[\t\n\r]/g,Hp=/[^\u0000-\u007F]/,qp=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Mp(t,e%256),e=mp(e/256);return bp(t,".")}if("object"!=T(e))return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=kp(e[n],16),n<7&&(t+=":")));return"["+t+"]"},Vp={},Gp=o({},Vp,{" ":1,'"':1,"#":1,"<":1,">":1}),Jp=o({},Gp,{"'":1}),$p=o({},Vp,{" ":1,'"':1,"<":1,">":1,"`":1}),Zp=o({},$p,{"#":1,"?":1,"{":1,"}":1,"^":1}),Kp=o({},Zp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Yp=function(e,t){var n=ap(e,0);return 32<=n&&n<127&&!I(t,e)?e:"'"===e&&I(t,e)?"%27":fp(e)},Xp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Qp=function(e,t){return 2===e.length&&wp(Ip,yp(e,0))&&(":"===(e=yp(e,1))||!t&&"|"===e)},em=function(e){return 1<e.length&&Qp(xp(e,0,2))&&(2===e.length||"/"===(e=yp(e,2))||"\\"===e||"?"===e||"#"===e)},tm={},nm={},rm={},im={},om={},am={},sm={},um={},lm={},cm={},dm={},fm={},hm={},pm={},mm={},gm={},vm={},ym={},wm={},bm={},km={},Sm=function(e,t,n){var r,i,e=C(e);if(t){if(i=this.parse(e))throw new hp(i);this.searchParams=null}else{if(n!==undefined&&(r=new Sm(n,!0)),i=this.parse(e,null,r))throw new hp(i);(t=cp(new lp)).bindURL(this),this.searchParams=t}},_m=(Sm.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,u=t||tm,l=0,c="",d=!1,f=!1,h=!1;for(e=C(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=Ep(e,zp,""),e=Ep(e,Bp,"$1")),e=Ep(e,Wp,""),r=Tu(e);l<=r.length;){switch(i=r[l],u){case tm:if(!i||!wp(Ip,i)){if(t)return"Invalid scheme";u=rm;continue}c+=Tp(i),u=nm;break;case nm:if(i&&wp(Ap,i))c+=Tp(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",u=rm,l=0;continue}if(t&&(s.isSpecial()!==I(Xp,c)||"file"===c&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&""===s.host))return;if(s.scheme=c,t)return void(s.isSpecial()&&Xp[s.scheme]===s.port&&(s.port=null));c="","file"===s.scheme?u=pm:s.isSpecial()&&n&&n.scheme===s.scheme?u=im:s.isSpecial()?u=um:"/"===r[l+1]?(u=om,l++):(s.cannotBeABaseURL=!0,_p(s.path,""),u=wm)}break;case rm:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){s.scheme=n.scheme,s.path=$n(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,u=km;break}u="file"===n.scheme?pm:am;continue;case im:if("/"!==i||"/"!==r[l+1]){u=am;continue}u=lm,l++;break;case om:if("/"===i){u=cm;break}u=ym;continue;case am:if(s.scheme=n.scheme,i===Wh)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=$n(n.path),s.query=n.query;else if("/"===i||"\\"===i&&s.isSpecial())u=sm;else if("?"===i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=$n(n.path),s.query="",u=bm;else{if("#"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=$n(n.path),s.path.length&&s.path.length--,u=ym;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=$n(n.path),s.query=n.query,s.fragment="",u=km}break;case sm:if(!s.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,u=ym;continue}u=cm}else u=lm;break;case um:if(u=lm,"/"!==i||"/"!==r[l+1])continue;l++;break;case lm:if("/"===i||"\\"===i)break;u=cm;continue;case cm:if("@"===i){d&&(c="%40"+c);for(var d=!0,p=Tu(c),m=0;m<p.length;m++){var g=p[m];":"!==g||h?(g=Yp(g,Kp),h?s.password+=g:s.username+=g):h=!0}c=""}else if(i===Wh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(d&&""===c)return"Invalid authority";l-=Tu(c).length+1,c="",u=dm}else c+=i;break;case dm:case fm:if(t&&"file"===s.scheme){u=gm;continue}if(":"!==i||f){if(i===Wh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(s.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(s.includesCredentials()||null!==s.port))return;if(o=s.parseHost(c))return o;if(c="",u=vm,t)return;continue}"["===i?f=!0:"]"===i&&(f=!1),c+=i}else{if(""===c)return"Invalid host";if(t===fm)return;if(o=s.parseHost(c))return o;c="",u=hm}break;case hm:if(!wp(Pp,i)){if(i===Wh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()||t){if(""!==c){var v=pp(c,10);if(65535<v)return"Invalid port";s.port=s.isSpecial()&&v===Xp[s.scheme]?null:v,c=""}if(t)return;u=vm;continue}return"Invalid port"}c+=i;break;case pm:if(s.scheme="file",s.host="","/"===i||"\\"===i)u=mm;else{if(!n||"file"!==n.scheme){u=ym;continue}switch(i){case Wh:s.host=n.host,s.path=$n(n.path),s.query=n.query;break;case"?":s.host=n.host,s.path=$n(n.path),s.query="",u=bm;break;case"#":s.host=n.host,s.path=$n(n.path),s.query=n.query,s.fragment="",u=km;break;default:s.host=n.host,em(bp($n(r,l),""))||(s.path=$n(n.path),s.shortenPath()),u=ym;continue}}break;case mm:if("/"===i||"\\"===i){u=gm;break}n&&"file"===n.scheme&&(s.host=n.host,!em(bp($n(r,l),"")))&&Qp(n.path[0],!0)&&_p(s.path,n.path[0]),u=ym;continue;case gm:if(i===Wh||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Qp(c))u=ym;else{if(""===c){if(s.host="",t)return}else{if(o=s.parseHost(c))return o;if("localhost"===s.host&&(s.host=""),t)return;c=""}u=vm}continue}c+=i;break;case vm:if(s.isSpecial()){if(u=ym,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Wh&&(u=ym,"/"!==i))continue}else s.fragment="",u=km;else s.query="",u=bm;break;case ym:if(i===Wh||"/"===i||"\\"===i&&s.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(v=Tp(c))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(s.shortenPath(),"/"===i||"\\"===i&&s.isSpecial()||_p(s.path,"")):"."===(a=c)||"%2e"===Tp(a)?"/"===i||"\\"===i&&s.isSpecial()||_p(s.path,""):("file"===s.scheme&&!s.path.length&&Qp(c)&&(null!==s.host&&""!==s.host&&(s.host=""),c=yp(c,0)+":"),_p(s.path,c)),c="","file"===s.scheme&&(i===Wh||"?"===i||"#"===i))for(;1<s.path.length&&""===s.path[0];)Cp(s.path);"?"===i?(s.query="",u=bm):"#"===i&&(s.fragment="",u=km)}else c+=Yp(i,Zp);break;case wm:"?"===i?(s.query="",u=bm):"#"===i?(s.fragment="",u=km):i!==Wh&&(s.path[0]+=" "===i?"?"===r[l+1]||"#"===r[l+1]?"%20":" ":Yp(i,Vp));break;case bm:t||"#"!==i?i!==Wh&&(s.query+=Yp(i,s.isSpecial()?Jp:Gp)):(s.fragment="",u=km);break;case km:i!==Wh&&(s.fragment+=Yp(i,$p))}l++}},parseHost:function(u){var e,t,n;if("["===yp(u,0))return"]"===yp(u,u.length-1)&&(e=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,d=0,f=function(){return yp(e,d)};if(":"===f()){if(":"!==yp(e,1))return;d+=2,c=++l}for(;f();){if(8===l)return;if(":"!==f()){for(t=n=0;n<4&&wp(Fp,f());)t=16*t+pp(f(),16),d++,n++;if("."===f()){if(0===n)return;if(d-=n,6<l)return;for(r=0;f();){if(i=null,0<r){if(!("."===f()&&r<4))return;d++}if(!wp(Pp,f()))return;for(;wp(Pp,f());){if(o=pp(f(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;d++}u[l]=256*u[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===f()){if(d++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;d++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&0<a;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(xp(u,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(null===(u=function(e){if(!wp(Hp,e))return""===e?null:op(e);for(var t,n,r=Tu(e),i="",o=0;o<r.length;o++){if(t=ap(r[o],0),65533===(n=t)||55296<=n&&n<=57343||128<=n&&n<=159||8206<=n&&n<=8207||8232<=n&&n<=8233||8234<=n&&n<=8238||8293<=n&&n<=8297||64976<=n&&n<=65007||65534==(65534&n)||57344<=n&&n<=63743||983040<=n&&n<=1114109)return null;173===(n=t)||847===n||8203===n||12644===n||65279===n||65440===n||4447<=n&&n<=4448||6068<=n&&n<=6069||6155<=n&&n<=6159||8288<=n&&n<=8292||8298<=n&&n<=8303||65024<=n&&n<=65039||917760<=n&&n<=917999||(i+=(n=65281<=(n=t)&&n<=65374?n-65248:160===n||5760===n||8239===n||8287===n||12288===n||8192<=n&&n<=8202||n<=65535&&-1<Op("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",vp(n))?32:n)===t?r[o]:vp(n))}return""===i?null:op(i)}(dp(u)))||wp(Up,u))return"Invalid host";if(function(){var e=Rp(u,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return wp(Np,e=e[e.length-1])||wp(Lp,e)&&(""===(e=xp(e,2))||wp(Fp,e))}()){if(null===(e=function(){var e,t,n,r,i,o,a,s=Rp(u,".");if(s.length&&""===s[s.length-1]&&s.length--,4<(e=s.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=s[n]))return null;if(i=10,1<r.length&&"0"===yp(r,0)&&(i=wp(Lp,r)?16:8,r=xp(r,8===i?1:2)),""===r)o=0;else{if(!wp(10===i?Np:8===i?Dp:Fp,r))return null;o=pp(r,i)}_p(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=gp(256,5-e))return null}else if(255<o)return null;for(a=Sp(t),n=0;n<t.length;n++)a+=t[n]*gp(256,3-n);return a}()))return"Invalid host";this.host=e}else this.host=u}else{if(wp(jp,u))return"Invalid host";for(e="",t=Tu(u),n=0;n<t.length;n++)e+=Yp(t[n],Vp);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return I(Xp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Qp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=qp(i),null!==o&&(l+=":"+o)):"file"===t&&(l+="//"),null===i&&!e.cannotBeABaseURL&&1<a.length&&""===a[0]&&(l+="/."),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+bp(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){e=this.parse(e);if(e)throw new hp(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new _m(this.path[0]).origin}catch(X){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+qp(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(C(e)+":",tm)},getUsername:function(){return this.username},setUsername:function(e){var t=Tu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Yp(t[n],Kp)}},getPassword:function(){return this.password},setPassword:function(e){var t=Tu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Yp(t[n],Kp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?qp(e):qp(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,dm)},getHostname:function(){var e=this.host;return null===e?"":qp(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,fm)},getPort:function(){var e=this.port;return null===e?"":C(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=C(e))?this.port=null:this.parse(e,hm))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+bp(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,vm))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=C(e))?this.query=null:("?"===yp(e,0)&&(e=xp(e,1)),this.query="",this.parse(e,bm)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=C(e))?("#"===yp(e,0)&&(e=xp(e,1)),this.fragment="",this.parse(e,km)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=cr(this,Em),n=1<Mc(arguments.length,1)?arguments[1]:undefined,e=sp(t,new Sm(e,!1,n));f||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),Em=_m.prototype,Ud=function(e,t){return{get:function(){return up(this)[e]()},set:t&&function(e){return up(this)[t](e)},configurable:!0,enumerable:!0}};f&&(Bt(Em,"href",Ud("serialize","setHref")),Bt(Em,"origin",Ud("getOrigin")),Bt(Em,"protocol",Ud("getProtocol","setProtocol")),Bt(Em,"username",Ud("getUsername","setUsername")),Bt(Em,"password",Ud("getPassword","setPassword")),Bt(Em,"host",Ud("getHost","setHost")),Bt(Em,"hostname",Ud("getHostname","setHostname")),Bt(Em,"port",Ud("getPort","setPort")),Bt(Em,"pathname",Ud("getPathname","setPathname")),Bt(Em,"search",Ud("getSearch","setSearch")),Bt(Em,"searchParams",Ud("getSearchParams")),Bt(Em,"hash",Ud("getHash","setHash"))),Gt(Em,"toJSON",function(){return up(this).serialize()},{enumerable:!0}),Gt(Em,"toString",function(){return up(this).serialize()},{enumerable:!0}),Kd&&(zd=Kd.createObjectURL,n=Kd.revokeObjectURL,zd&&Gt(_m,"createObjectURL",Gr(zd,Kd)),n)&&Gt(_m,"revokeObjectURL",Gr(n,Kd)),yr(_m,"URL"),R({global:!0,constructor:!0,forced:!0,sham:!f},{URL:_m});var Cm,Rm,Om,xm,Tm=function(){return{host:new URL(location.href).host,pathname:location.pathname}},Mm=!1,Im=[],Am=/^\/[^/]/;function Pm(e,t){return xm(e,t)}var Lm=!1,Dm=[],Nm=function(O,x){if(void 0===x&&(x=/\.flv(\?|$)/i),Dm.find(function(e){return e.name===O.name}))throw new Error("name '"+O.name+"' is already in hackFetch option list");Dm.push(O),!Lm&&window.fetch&&(Lm=!0,xm=window.fetch,window.fetch=function(e,t){void 0===t&&(t={});var i="string"==typeof(f=e)?f:f&&"object"===T(f)?"string"==typeof(d=f.url)&&d?d:"string"==typeof(d=f.href)&&d?d:"":"";if(i&&null!=(f=null==x?void 0:x.test)&&f.call(x,i))return Pm(e,t);Am.test(i)&&(i=""+location.origin+i);var n,r,o,a,s,u,l,c,d=O||{},f=d.traceRequestHeader,h=d.shouldInjectTrace;if(f&&(!h||h()))try{var p=function(e,t){e="undefined"!=typeof Request&&"string"!=typeof e&&e instanceof Request?Fm(e.headers):{};return A(A({},e),Fm(t.headers))}(e,t),m=Tm(),g=m.host,v=m.pathname,y=f.generate(i,p,{host:g,pathname:v})||{},w=y.name,b=y.value;w&&b&&(n=e,r=t,o=w,a=b,u="undefined"!=typeof Headers?Headers:null,l="undefined"!=typeof Request&&"string"!=typeof n&&n instanceof Request,c=r.headers,u&&(l||c&&c instanceof u)?(s=new u(l?n.headers:undefined),c instanceof u?c.forEach(function(e,t){return s.set(t,e)}):Array.isArray(c)?c.forEach(function(e){e&&e[0]&&s.set(String(e[0]),String(e[1]))}):c&&"object"===T(c)&&Object.keys(c).forEach(function(e){s.set(e,String(c[e]))}),s.has(o)||s.set(o,a),r.headers=s):(l=Fm(c))[o]||l[o.toLowerCase()]||(r.headers=Object.assign({},l,((n={})[o]=a,n))))}catch(J){}for(var k=new Map,S=window.location.href,_=0;_<Dm.length;_++){var E=Dm[_];try{"function"==typeof E.beforeFetch&&E.beforeFetch(i,t),"function"==typeof E.getCurrentFrom&&k.set(E.name,E.getCurrentFrom())}catch(J){}}var C=Date.now(),R=Object.assign({},t,{method:(h=e,(m=t)&&m.method?String(m.method).toUpperCase():"string"!=typeof h&&h&&h.method?String(h.method).toUpperCase():"GET")});return Pm(e,t).then(function(e){var t;try{t=e.clone()}catch(X){for(var n=0;n<Dm.length;n++){var r=Dm[n];try{"function"==typeof r.cloneError&&r.cloneError(e,Date.now()-C,i,R,C,k.get(r.name),S)}catch(J){}}return e}for(n=0;n<Dm.length;n++){r=Dm[n];try{"function"==typeof r.then&&r.then(t,Date.now()-C,i,R,C,k.get(r.name),S)}catch(J){}}return e})["catch"](function(e){for(var t=0;t<Dm.length;t++){var n=Dm[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-C,i,R,C,k.get(n.name),S)}catch(J){}}throw e})})};function Fm(e){var n;return e?"undefined"!=typeof Headers&&e instanceof Headers?(n={},e.forEach(function(e,t){n[t]=e,n[t.toLowerCase()]=e}),n):Array.isArray(e)?e.reduce(function(e,t){return t&&t[0]&&(e[String(t[0])]=String(t[1])),e},{}):A({},e):{}}var Um=function(r,e,i){return null!=e&&e.length&&"object"===T(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},jm={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},zm={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},Bm=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},Wm=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===Ol.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=cc.test(i)||lc.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},Hm=function(e,t){return e?zm.AJAX_ERROR:t?zm.RET_ERROR:zm.API_RESPONSE},qm=function(e,t,n){if(!e)return!1;t=null==t?void 0:t.api;if(null!=t&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(X){return console.warn("[TDEM] isSlowApi function happen error:",X,", this data will not be reported."),!1}n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold;return n&&"number"==typeof n?n<e:1e3<e},Vm=function(e,t){var e=e.api;if(null!=e&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:uc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:oc(e.domainLookupEnd-e.domainLookupStart),connectTime:oc(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:uc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:tc.number,connectTime:tc.number}};function Gm(e){return!e||"boolean"==typeof e||"number"!=typeof(e=e.sseStallThresholdMs)||!Number.isFinite(e)||e<=0?6e4:e}var r=ar.f,Jm=lt("".slice),$m=Math.min,Id=Hr("startsWith"),Wt=!(Id||!(Fd=r(String.prototype,"startsWith"))||Fd.writable);function Zm(e){return e&&"text/event-stream"===e.split(";")[0].trim().toLowerCase()}R({target:"String",proto:!0,forced:!Wt&&!Id},{startsWith:function(e){var t=C(ae(this)),e=(Qi(e),C(e)),n=fe($m(1<arguments.length?arguments[1]:undefined,t.length));return Jm(t,n,n+e.length)===e}});var Km=function(e){return"string"==typeof e&&""!==e.trim()};function Ym(e){var t=String(e.requestUrl||""),n=String(e.finalUrl||""),r=t&&ac(t)||t,i=n&&ac(n)||n||r,n=!0===e.redirected||!!n&&!!t&&n!==t;return{url:i,originalUrl:r&&i&&r!==i?r:undefined,httpMethod:String(e.httpMethod||"GET").toUpperCase(),redirectCount:n?1:0}}function Xm(n){var r,i,o,a,t,s=n.now||Date.now,u=s(),l={gap_lt_500_count:0,gap_500_999_count:0,gap_1000_2999_count:0,gap_3000_9999_count:0,gap_10000_59999_count:0,gap_ge_60000_count:0},c="",d=!1,f=0,h=!1,p=[],m=function(){t!==undefined&&(clearTimeout(t),t=undefined)},g=function(){m();var e=n.stallThresholdMs;0<e&&(t=setTimeout(function(){y("stalled")},e))},v=function(){var e,t,n=s();r===undefined?r=n:i!==undefined&&(e=n-i,(o===undefined||o<e)&&(o=e),t=l,(e=e)<500?t.gap_lt_500_count+=1:e<1e3?t.gap_500_999_count+=1:e<3e3?t.gap_1000_2999_count+=1:e<1e4?t.gap_3000_9999_count+=1:e<6e4?t.gap_10000_59999_count+=1:t.gap_ge_60000_count+=1),i=n,f+=1,g()},y=function(e){if(!h){h=!0,m(),p.splice(0).forEach(function(e){try{e()}catch(X){}});var t=Math.max(0,s()-u),t=A({duration:t,redirect_count:Math.max(0,n.redirectCount||0),message_count:f,stall_threshold_ms:n.stallThresholdMs},l),e=(r!==undefined&&(t.time_to_first_message=Math.max(0,r-u)),i!==undefined&&(t.last_message_offset=Math.max(0,i-u)),o!==undefined&&(t.max_message_gap=o),{http_method:n.httpMethod||"GET",outcome:e}),t=(a!==undefined&&0<a&&(e.http_status=String(a)),n.originalUrl&&n.originalUrl!==n.url&&(e.original_url=n.originalUrl),{event_id:Oc(),event_type:P.SSE_CALL,event_category:Cc.NETWORK,timestamp:s(),page_url:n.pageUrl||"",data:{url:n.url,resource_type:"sse",measurements:t,replay_id:n.replayId||undefined,event_properties:e}});try{n.report(t)}catch(X){}}};return g(),{ingestText:function(e){if(!h){e=e.replace(/\r\n/g,"\n");if(d){var t=e.indexOf("\n\n");if(-1===t)return;d=!1,e=e.slice(t+2)}for(var n=(c=(c+=e).replace(/\r\n/g,"\n")).indexOf("\n\n");-1!==n;){var r=c.slice(0,n);c=c.slice(n+2),r.replace(/\r\n/g,"\n").split("\n").some(function(e){return e.startsWith("data:")||"data"===e})&&v(),n=c.indexOf("\n\n")}1048576<c.length&&(d=!(c=""))}},ingestCompleteMessage:function(){h||v()},noteHttpStatus:function(e){0<e&&(a=e)},succeed:function(){return y("success")},failTransport:function(){return y("transport_error")},httpError:function(){return y("http_error")},cancel:function(){return y("cancelled")},pauseStall:function(){h||m()},resumeStall:function(){h||g()},onSeal:function(t){if(h){try{t()}catch(X){}return function(){return undefined}}return p.push(t),function(){var e=p.indexOf(t);-1!==e&&p.splice(e,1)}},seal:y,get sealed(){return h},get messageCount(){return f},get httpStatus(){return a}}}function Qm(h,p){var m;return wl(this,void 0,void 0,function(){var o,a,s,u,l,c,d,f;return bl(this,function(e){switch(e.label){case 0:if(!h||"function"!=typeof h.getReader)return p.succeed(),[2];o=h.getReader(),s=a=!1,u=function(){if(!a&&!s&&"function"==typeof o.cancel){s=!0;try{var e=o.cancel();e&&"function"==typeof e["catch"]&&e["catch"](function(){return undefined})}catch(X){}}},l=p.onSeal(u),c="undefined"!=typeof TextDecoder?new TextDecoder:{decode:function(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("utf8"):Array.from(e).map(function(e){return String.fromCharCode(e)}).join("")}},e.label=1;case 1:e.trys.push([1,5,6,7]),e.label=2;case 2:return p.sealed?[3,4]:[4,o.read()];case 3:return d=e.sent(),f=d.done,d=d.value,f?(a=!0,p.succeed(),[2]):(d&&p.ingestText(c.decode(d,{stream:!0})),[3,2]);case 4:return[3,7];case 5:return f=e.sent(),p.sealed||p[t=f,n=p.messageCount,r=p.httpStatus,!(i=t)||"object"!==T(i)||"AbortError"!==i.name&&"ABORT_ERR"!==i.code&&"ECONNABORTED"!==i.code&&!0!==i.aborted?(0<n||"number"==typeof r&&200<=r&&r<400)&&(function(e){if(Km(e)&&-1!==e.toLowerCase().indexOf("terminated"))return 1;for(var t=e,n=new Set;t&&"object"===T(t)&&!n.has(t);){n.add(t);var r=String(t.name||""),i=String(t.code||""),o=String(t.message||"").toLowerCase();if("TypeError"===r&&-1!==o.indexOf("terminated"))return 1;if("ERR_INVALID_STATE"===i)return 1;t=t.cause}}(t)||Km(t))?"succeed":"failTransport":"cancel"](),[3,7];case 6:l(),u();try{null!=(m=o.releaseLock)&&m.call(o)}catch(X){}return[7];case 7:return[2]}var t,n,r,i})})}var eg,tg,ng=!1;function rg(e){var t=e.__tdemXhrHooks;t&&(e.removeEventListener("readystatechange",t.onReadyStateChange),e.removeEventListener("progress",t.onProgress),e.removeEventListener("loadend",t.onLoadEnd),e.removeEventListener("abort",t.onAbort),e.removeEventListener("error",t.onError),e.removeEventListener("timeout",t.onTimeout),e.__tdemXhrHooks=undefined)}function ig(e){var t=String(e.responseType||"").toLowerCase();if(t&&"text"!==t)return undefined;try{return"string"==typeof e.responseText?e.responseText:""}catch(X){return undefined}}new c({name:"api"});var og,ag,sg,Yd=new c({name:"api",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new Kc(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e),!1!==n&&this.overrideEventSource(e.config,e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(k,S){var _=this,s=k.api,e={name:this.name,traceRequestHeader:null!=s&&s.injectTraceHeader?this.traceRequestHeader:null,shouldInjectTrace:function(){return td(S)},getCurrentFrom:function(){return _.getFromParam(S)},cloneError:function(e,t,n,r,i,o){var a;_c(n,k.hostUrl)||(a=e.headers?e.headers.get("content-type"):"",!1!==s&&Zm(a)&&((n=Xm({url:(a=Ym({requestUrl:n,finalUrl:e&&e.url,httpMethod:null==r?void 0:r.method,redirected:!!e.redirected})).url,originalUrl:a.originalUrl,httpMethod:a.httpMethod,redirectCount:a.redirectCount,stallThresholdMs:Gm(s),report:function(e){var t;return null==(t=S.reportTDEMEvent)?void 0:t.call(S,e)},pageUrl:o||_.getFromParam(S),replayId:_d(S)})).noteHttpStatus(e.status),400<=e.status?n.httpError():n.succeed()))},then:function(h,p,m,g,v,y,w){if(!_c(m,k.hostUrl)){var e,t,n=h.headers?h.headers.get("content-type"):"";if(!1!==s&&Zm(n))return e=Ym({requestUrl:m,finalUrl:h&&h.url,httpMethod:null==g?void 0:g.method,redirected:!!h.redirected}),(t=Xm({url:e.url,originalUrl:e.originalUrl,httpMethod:e.httpMethod,redirectCount:e.redirectCount,stallThresholdMs:Gm(s),report:function(e){var t;return null==(t=S.reportTDEMEvent)?void 0:t.call(S,e)},pageUrl:y||_.getFromParam(S),replayId:_d(S)})).noteHttpStatus(h.status),h.__tdemSseObserver=t,400<=h.status?(t.httpError(),void Qm(h.body,t)["catch"](function(){return undefined})):void Qm(h.body,t)["catch"](function(){t.sealed||t.failTransport()});var b=Wm(k,n||"",m);"fetch"===b?h.clone().text().then(function(i){var e,o=h.status<=0||400<=h.status,t=(null==(t=k.api)?void 0:t.reqHeaders)||[],a=Um(null==g?void 0:g.headers,t,"req"),t=(null==(t=k.api)?void 0:t.resHeaders)||[],s=Um(h.headers,t,"res"),u=Xc(null==g?void 0:g.headers),t=fc(i,k.api,{url:m,ctx:h,payload:null==g?void 0:g.body}),l=t.code,c=t.isErr,t=null==(t=k.api)?void 0:t.apiDetail,d=t?hc(null==g?void 0:g.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:m}):"",f=t?hc(i,null==(e=k.api)?void 0:e.resBodyHandler,{url:m,ctx:h}):"";setTimeout(function(){var e=Vm(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"}),t=[o?"FETCH_ERROR: "+i:"","fetch req url: "+m,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+v,a,s,"req method: "+(e.method||"GET"),"res retcode: "+l,Bm(d,"req param"),Bm(f,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==g?void 0:g.body,e.ret=l,e.isErr=+c,e.from=y||_.getFromParam(S),{msg:t,code:l,trace:u,errorMsg:"",from:y||_.getFromParam(S),originFrom:w,level:zm.API_RESPONSE}),n=qm(null==e?void 0:e.duration,k,e),r=Hm(o,c);t.level=r===zm.API_RESPONSE&&n?zm.SLOW_NET_REQUEST:r,t.isErr=c,(n||t.level!==zm.API_RESPONSE||S.isWhiteList||null!=(n=null==(r=S.config)?void 0:r.api)&&n.reportRequest||null!=(n=null==(r=S.config)?void 0:r.api)&&n.injectTraceHeader)&&_.publishNormalLog(t,S),_.publishSpeed(e,S)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=Vm(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"});e.type="static",e.urlQuery=ac(m,!0),e.from=y||_.getFromParam(S),_.publishSpeed(e,S)},0)}},"catch":function(t,n,r,i,o,a,s){var u,e,l,c,d;if(_c(r,k.hostUrl))throw t;if("AbortError"!==(t&&t.name))throw u=Wm(k,"",r),e=(null==(e=k.api)?void 0:e.reqHeaders)||[],l=Um(null==i?void 0:i.headers,e,"req"),c=Xc(null==i?void 0:i.headers),d=null!=(e=k.api)&&e.apiDetail?hc(null==i?void 0:i.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=Vm(k,{url:r,duration:n,type:u,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=a||_.getFromParam(S),_.publishSpeed(e,S),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+d+"\n \nres startTime: "+o+"\n \n"+l);_.publishNormalLog({msg:e,level:zm.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:a||_.getFromParam(S),originFrom:s},S)},0),t}};this.hackFetchOptions=e,Nm(this.hackFetchOptions,null==(e=k.api)?void 0:e.ignoreHackReg)},overrideXhr:function(R,O){var e,i,x=this,o={name:this.name,ignoreHackReg:null==(e=R.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=R.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return x.getFromParam(O)},open:function(e){var t;(t=(e=e).__tdemSseObserver)&&!t.sealed&&t.cancel(),rg(e),e.__tdemSseClaimed=!1,e.__tdemSseObserver=undefined,e.failType=undefined},send:function(k,S,_,E){var C=Date.now(),n=(((null==R?void 0:R.api)||{}).injectTraceHeader&&td(O)&&(t=(e=Tm()).host,e=(t=x.traceRequestHeader.generate(k.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&k.setRequestHeader(e,t),0),e=function(){k.failType="abort"},t=function(){k.failType="error"},r=function(){k.failType="timeout"},i=function(){var e;!1===R.api||k.__tdemSseClaimed||(e=k.tdemUrl||"",_c(e,R.hostUrl))||Zm(("function"==typeof k.getResponseHeader?k.getResponseHeader("content-type"):"")||"")&&(k.__tdemSseClaimed=!0,(e=Xm({url:(e=Ym({requestUrl:k.tdemUrl||"",finalUrl:("string"==typeof k.responseURL?k.responseURL:"")||undefined,httpMethod:k.tdemMethod})).url,originalUrl:e.originalUrl,httpMethod:e.httpMethod,redirectCount:e.redirectCount,stallThresholdMs:Gm(R.api),report:function(e){var t;return null==(t=O.reportTDEMEvent)?void 0:t.call(O,e)},pageUrl:_||x.getFromParam(O),replayId:_d(O)})).noteHttpStatus(k.status),k.__tdemSseObserver=e)},o=function(){i()},a=function(){i();var e,t=k.__tdemSseObserver;t&&(e=ig(k))!==undefined&&e.length>n&&(t.ingestText(e.slice(n)),n=e.length)},s=function(){var e,v,y,t,w,b=k.tdemUrl||"";k.__tdemSseClaimed?((e=k.__tdemSseObserver)&&!e.sealed&&((t=ig(k))!==undefined&&t.length>n&&e.ingestText(t.slice(n)),e.noteHttpStatus(k.status),"abort"===k.failType?e.cancel():400<=k.status?e.httpError():k.failType?e.failTransport():e.succeed()),rg(k)):(rg(k),_c(b,R.hostUrl)||"abort"===k.failType||(v="",(k.failType||!k.status||400<=k.status)&&(v=k.failType||"failed"),y=Date.now()-C,t=k.getResponseHeader("content-type")||"",w=Wm(R,t,b),setTimeout(function(){var e,a=Vm(R,{url:b,duration:y,type:w,status:k.status,method:k.tdemMethod||"get"});if(a.from=_||x.getFromParam(O),"fetch"===w){var t=(null==(e=R.api)?void 0:e.reqHeaders)||[],s=Um(k.tdemXhrReqHeader,t,"req"),t=(null==(t=R.api)?void 0:t.resHeaders)||[],n=k.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),u=Um(n,t,"res"),l=Xc(k.tdemXhrReqHeader),t=null==(n=R.api)?void 0:n.apiDetail,c=t?hc(S,null==(n=R.api)?void 0:n.reqParamHandler,{url:b}):"",d=t?hc(k.response,null==(n=R.api)?void 0:n.resBodyHandler,{url:b}):"";try{var r,i,o,f=k.response,h=R.api,p={url:b,ctx:k,payload:S},m=function(e){var t,n=e.code,e=e.isErr,r=[v?"AJAX_ERROR: request "+v:"","fetch req url: "+b,"res status: "+(a.status||0),"res duration: "+a.duration+"ms","res startTime: "+C,s,u,"req method: "+(a.method||"GET"),"res retcode: "+n,Bm(c,"req param"),Bm(d,"res data")].filter(function(e){return e}).join("\n\n"),i=(a.ret=n,a.isErr=+e,a.payload=S,Hm(!!v,e)),o=qm(null==a?void 0:a.duration,R,a);(i!==zm.API_RESPONSE||o||O.isWhiteList||null!=(t=null==(t=O.config)?void 0:t.api)&&t.reportRequest||null!=(t=null==(t=O.config)?void 0:t.api)&&t.injectTraceHeader)&&x.publishNormalLog({msg:r,level:i===zm.API_RESPONSE&&o?zm.SLOW_NET_REQUEST:i,code:n,isErr:e,trace:l,errorMsg:"",from:_||x.getFromParam(O),originFrom:E},O),x.publishSpeed(a,O)};try{if("function"==typeof(null==h?void 0:h.retCodeHandlerAsync))return void h.retCodeHandlerAsync(f,null==p?void 0:p.url,null==p?void 0:p.ctx,function(e){var t=e.code;null!=m&&m({code:void 0===t?xl:t,isErr:e.isErr})});if("function"==typeof(null==h?void 0:h.retCodeHandler))return void(o=(i=h.retCodeHandler(f,null==p?void 0:p.url,null==p?void 0:p.ctx,null==p?void 0:p.payload)||{}).code,null!=m&&m({code:void 0===o?xl:o,isErr:i.isErr}));if(!(f="string"==typeof f?JSON.parse(f):f))return void(null!=m&&m({code:xl,isErr:!1}));"function"==typeof(null==(r=null==h?void 0:h.ret)?void 0:r.join)&&(dc=[].concat(h.ret.map(function(e){return e.toLowerCase()})));var g=Object.getOwnPropertyNames(f).filter(function(e){return-1!==dc.indexOf(e.toLowerCase())});if(g.length)return void("未知"!==(o=f[g[0]])&&""!==o||(o=xl),null!=m&&m({code:""+o,isErr:0!==o&&"0"!==o&&o!==xl}));null!=m&&m({code:xl,isErr:!1})}catch(e){null!=m&&m({code:xl,isErr:!1})}}catch(K){a.ret=xl,x.publishSpeed(a,O)}}else a.type="static",a.urlQuery=ac(b,!0),x.publishSpeed(a,O)},0)))};k.__tdemXhrHooks={onReadyStateChange:o,onProgress:a,onLoadEnd:s,onAbort:e,onError:t,onTimeout:r},k.addEventListener("readystatechange",o),k.addEventListener("progress",a),k.addEventListener("loadend",s),k.addEventListener("abort",e),k.addEventListener("error",t),k.addEventListener("timeout",r)}};this.hackXHROptions=o,i=this.hackXHROptions,Im.find(function(e){return e.name===i.name})||(Im.push(i),!Mm&&window.XMLHttpRequest&&(Cm=window.XMLHttpRequest.prototype.send,Rm=window.XMLHttpRequest.prototype.open,Om=window.XMLHttpRequest.prototype.setRequestHeader,Mm=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Am.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)h.isIE()||(this.timeout=5e3);else for(var n=0;n<Im.length;n++){var r=Im[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return Rm.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?Om.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],Om.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<Im.length;n++){var r=Im[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(x){}}return Cm.apply(this,arguments)}))},overrideEventSource:function(i,o){var n,a=this;function e(e,t){t=new n(e,t);try{null!=tg&&tg(t,String(e))}catch(X){}return t}tg={onCreate:function(t,e){if(!_c(e,i.hostUrl)){var n=Xm({url:ac(e)||e,httpMethod:"GET",stallThresholdMs:Gm(i.api),report:function(e){var t;return null===(t=o.reportTDEMEvent)||void 0===t?void 0:t.call(o,e)},pageUrl:a.getFromParam(o),replayId:_d(o)});n.pauseStall(),t.addEventListener("open",function(){return n.resumeStall()}),t.addEventListener("message",function(){return n.ingestCompleteMessage()}),t.addEventListener("error",function(){if(!n.sealed){var e=t.readyState;0!==e?2===e&&n.failTransport():n.pauseStall()}});var r=t.close.bind(t);t.close=function(){try{n.sealed||n.cancel()}finally{r()}}}}}.onCreate,"undefined"!=typeof window&&window.EventSource&&!ng&&(ng=!0,n=eg=window.EventSource,e.prototype=n.prototype,e.CONNECTING=n.CONNECTING,e.OPEN=n.OPEN,e.CLOSED=n.CLOSED,window.EventSource=e)},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,a,s,u,l;[zm.API_RESPONSE,zm.AJAX_ERROR,zm.RET_ERROR,zm.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",s=(s=null==(s=e.msg)?void 0:s.match(/res status:\s*(\d+)/))?parseInt(s[1],10):0,i=(i=null==(i=e.msg)?void 0:i.match(/res duration:\s*([\d.]+)ms/))?parseFloat(i[1]):0,o=(o=null==(o=e.msg)?void 0:o.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?o[1].trim().slice(0,1e3):undefined,a={},e.trace&&(a.trace_id=e.trace),(l=(u={httpStatus:s,isTransportFailure:s<=0,isBusinessError:e.level===zm.RET_ERROR||!!e.isErr,businessCode:e.code}).aborted?{report:!1,eventType:null}:(l=Number(u.httpStatus),u.isTransportFailure||!Number.isFinite(l)||l<=0?{report:!0,eventType:"api_error",outcome:"transport_error"}:400<=l?{report:!0,eventType:"api_error",outcome:"http_error"}:u.isBusinessError?{report:!0,eventType:"api_error",outcome:"business_error",businessCode:rc(u.businessCode)||xl}:{report:!0,eventType:"api_call",businessCode:rc(u.businessCode)})).report)&&l.eventType&&(u={http_method:r,http_status:String(s)},l.outcome&&(u.outcome=l.outcome),l.businessCode&&(u.business_code=l.businessCode),"api_error"===l.eventType?(s={event_id:Oc(),event_type:P.API_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:e.from||(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href,data:{url:n,measurements:{duration:i},response_body:o,replay_id:_d(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}},null!=(r=t.reportTDEMEvent)&&r.call(t,s)):(s={event_id:Oc(),event_type:P.API_CALL,event_category:Cc.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(o=t.getOriginFrom)?void 0:o.call(t))||window.location.href,data:{url:n,measurements:{duration:i},replay_id:_d(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}},null!=(r=t.reportTDEMEvent)&&r.call(t,s)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=Im.findIndex(function(e){return e.name===n.name})))&&Im.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Dm.findIndex(function(e){return e.name===t.name})))&&Dm.splice(e,1),eg&&(window.EventSource=eg),ng=!1,eg=undefined,tg=undefined,this.option.override=!1}}),ug={},Ft=new c({name:"bridge",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,d=l.config,e="object"===T(d.bridge)?d.bridge:undefined,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var u=t[e];ug[e]=u,t[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],a=Date.now(),s=c.getFromParam(l);u(r,i,n,function(e){var t=fc(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t,from:s};c.publishSpeed(n,l),o(e)})}})},unHackBridge:function(e){var e="object"===T(e.config.bridge)?e.config.bridge:undefined,t=null==e?void 0:e.target;ug=(t&&Object.keys(ug).forEach(function(e){ug[e]&&(t[e]=ug[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),zd=((Od=og=og||{})[Od.unknown=100]="unknown",Od[Od.wifi=1]="wifi",Od[Od.net2g=2]="net2g",Od[Od.net3g=3]="net3g",Od[Od.net4g=4]="net4g",Od[Od.net5g=5]="net5g",Od[Od.net6g=6]="net6g",(o=ag=ag||{})[o.android=1]="android",o[o.ios=2]="ios",o[o.windows=3]="windows",o[o.macos=4]="macos",o[o.linux=5]="linux",o[o.other=100]="other",(Ud=sg=sg||{})[Ud.unknown=100]="unknown",Ud[Ud.normal=0]="normal",Ud[Ud.weak=1]="weak",Ud[Ud.disconnected=2]="disconnected",new c({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",og.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?ag[e]:ag.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:lg)(function(e){og[e]||(e=og.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){sg[e]===undefined&&(e=sg.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),lg=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||xl,0<=(n=String(n).toLowerCase()).indexOf("4g")?og.net4g:0<=n.indexOf("wifi")?og.wifi:0<=n.indexOf("5g")?og.net5g:0<=n.indexOf("6g")?og.net6g:0<=n.indexOf("3g")?og.net3g:0<=n.indexOf("2g")?og.net2g:og.unknown))},cg=window.WebSocket,dg=[],fg={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=dg&&dg.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:dg.forEach(function(e){e=e.sendErr;null!=e&&e(A({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:dg.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:dg.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},hg=new c({name:"onError"}),n=hg=new c({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},startListen:function(s){var e,t,n,u=this,l=window.onerror,r=(window.onerror=function(e,t,n,r,i){var o,a=mc(e);kd(a)||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?xc(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],a={event_id:Oc(),event_type:P.JS_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:a,exception_frames:o,replay_id:_d(s),tags:{environment:s.config.env||"production",version:String(s.config.version||"")}}},null!=(o=s.reportTDEMEvent)&&o.call(s,a)),null!=l&&l.call(window,e,t,n,r,i)},function(e){var t,n=e&&mc(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?xc(e.reason):[],e={event_id:Oc(),event_type:P.PROMISE_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:t,exception_frames:n,replay_id:_d(s),tags:{environment:s.config.env||"production"}}},null!=(t=s.reportTDEMEvent))&&t.call(s,e)}),i=(window.addEventListener("unhandledrejection",r),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if((!r||null!=e&&e.error)&&!(_c(i=t,s.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:Oc(),event_type:P.RESOURCE_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{url:t,resource_type:i,replay_id:_d(s),tags:A({environment:s.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=s.reportTDEMEvent)&&i.call(s,t)}}}),o=(window.document.addEventListener("error",i,!0),s.lifeCycle.on("destroy",function(){0===hg.countInstance()&&(window.removeEventListener("unhandledrejection",r),window.document.removeEventListener("error",i,!0))}),s.config.websocket);(("object"===T(o)?!1!==o.enabled:o)||s.config.websocketHack)&&(o={key:s.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(e=window.WebSocket,window&&!e.isHack&&(t=new Proxy(WebSocket,fg),e.isHack=!0,window.WebSocket=t),n=o,dg.find(function(e){return e.key===n.key})||n&&dg.push(n))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:Oc(),event_type:P.JS_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:_d(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=cg,-1!==(e=dg.findIndex(function(e){return e.key===t.key})))&&dg.splice(e,1)}}),Kd=vi.f,pg=v(Kd),mg=v([].push),gg=f&&g(function(){var e=Object.create(null);return e[2]=2,!pg(e,2)}),r=function(u){return function(e){for(var t,n=He(e),r=ct(n),i=gg&&null===dr(n),o=r.length,a=0,s=[];a<o;)t=r[a++],f&&!(i?t in n:pg(n,t))||mg(s,u?[t,n[t]]:n[t]);return s}},Fd={entries:r(!0),values:r(!1)},vg=Fd.entries,yg=(R({target:"Object",stat:!0},{entries:function(e){return vg(e)}}),new c({name:"click"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return yg(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),wg=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},bg=function(e,t){return"string"==typeof e?e.split(t):[]},kg=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=kg(n);return t},Wt=new c({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(a){for(var e=function(o){var e,t,n,r,i;s.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){e="object"===T((e=e).click)?e.click:undefined,n=wg((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:wg((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),a=t,s=(bg(t.getAttribute("id")||""," "),bg(t.getAttribute("class")||"",""),0),u=!1;a&&o&&a.getAttribute;){if(u)return!0;if(10<=s)break;for(var l=bg(a.getAttribute("id")||""," "),c=bg(a.getAttribute("class")||"",""),d=0,f=l;d<f.length;d++){var h=f[d];if(i.has(h)){u=!0;break}}for(var p=0,m=c;p<m.length;p++){var g=m[p];if(r.has(g)){u=!0;break}}s+=1,a=a.parentNode||a.parentElement}return!1}(a.config,t)&&(i=yg(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=kg(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:Oc(),event_type:P.CLICK,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:_d(a),tags:{environment:a.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=a.reportTDEMEvent))&&n.call(a,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},s=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),Sg=(new c({name:"console"}),["log","error","warn","info","debug","trace"]),_g={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace};var Eg,Cg,Rg,Og,xg,Tg,Mg,Ig,Ag,Pg,Lg,Id=new c({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var f,h;h="object"===T((f=e).config.console)?f.config.console:undefined,Sg.forEach(function(c){var d=_g[c];console[c]=function(){for(var e,t,n,r,i,o,a,s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];try{d.apply(console,u),o=c,a=f.isWhiteList,("all"===(s=(null==(s=h)?void 0:s.level)||"error")||a||("error"===s?"error"===o:"warn"===s?"error"===o||"warn"===o:"info"===s?["error","warn","info"].includes(o):"log"===s?["error","warn","info","log"].includes(o):"error"===o))&&(r=u.map(function(e){if("object"===T(e)&&null!==e)try{return JSON.stringify(e)}catch(h){}return String(e)}).join(" "),i={event_id:Oc(),event_type:P.LOG,event_category:Cc.LOG,timestamp:Date.now(),page_url:(null==(e=f.getOriginFrom)?void 0:e.call(f))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:_d(f),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=f.reportTDEMEvent)&&n.call(f,i))}catch(U){_g.error("Console hook error:",U)}}})},destroy:function(){Object.keys(_g).forEach(function(e){console[e]=_g[e]})}}),Dg=(xg={passive:!0,capture:!0},Tg=new Date,Od=function(){Og=[],Cg=-1,Eg=null,Pg(addEventListener)},Mg=function(e,t){Eg||(Eg=t,Cg=e,Rg=new Date,Pg(removeEventListener),Ig())},Ig=function(){var t;0<=Cg&&Cg<Rg-Tg&&(t={entryType:"first-input",name:Eg.type,target:Eg.target,cancelable:Eg.cancelable,startTime:Eg.timeStamp,processingStart:Eg.timeStamp+Cg},Og.forEach(function(e){e(t)}),Og=[])},Ag=function(e){var t,n,r,i,o,a;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){Mg(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,xg),removeEventListener("pointercancel",o,xg)},addEventListener("pointerup",i,xg),addEventListener("pointercancel",o,xg)):Mg(t,e))},Pg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Ag,xg)})},Lg="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function j(e){"hidden"===document.visibilityState&&(Lg=e.timeStamp,removeEventListener("visibilitychange",j,!0))},!0),Od(),self.webVitals={firstInputPolyfill:function(e){Og.push(e),Ig()},resetFirstInputPolyfill:Od,get firstHiddenTime(){return Lg}},function(e,t){var n,r=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)};r("visibilitychange",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.visibilitychange),r("pagehide",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.pagehide),r("beforeunload",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.beforeunload)});new c({name:"webVitals"});var Ng,Fg={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},Ug=(new c({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),jg=new Map,o=new c({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Sd()&&(jg.set(t,{isPagePerformanceReported:!1}),Ng?this.publish(Ng,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),Dg(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=jg.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=jg.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(D){}(Ng=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(Ng,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:Ug(i.domainLookupEnd-i.domainLookupStart),tcp:Ug(i.connectEnd-i.connectStart),ssl:Ug(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:Ug(i.responseStart-i.requestStart),contentDownload:Ug(i.responseEnd-i.responseStart),domParse:Ug(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:Ug(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:Ug(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=A(A({},n),{engineInit:Ug(t,0,1e4),bundleLoad:Ug(e,0,1e4)})),n):undefined},publish:function(r,i){this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:Oc(),event_type:P.PAGE_LOAD,event_category:Cc.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:Fg.lcp,fcp:Fg.fcp,fid:Fg.fid,cls:Fg.cls,ttfb:Fg.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:_d(e),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=jg.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){Ng=n.buildPerformanceLog(t,e,r,i);e=jg.get(t);!Ng||null!=e&&e.isPagePerformanceReported||n.publish(Ng,t)})}catch(b){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==T(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),zg=Math.min,Bg=[].lastIndexOf,Wg=!!Bg&&1/[1].lastIndexOf(1,-0)<0,Ud=ze("lastIndexOf"),Hg=Wg||!Ud?function(e){if(Wg)return Me(Bg,this,arguments)||0;var t=He(this),n=he(t);if(0!==n){var r=n-1;for((r=1<arguments.length?zg(r,ce(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:Bg,qg=(R({target:"Array",proto:!0,forced:Hg!==[].lastIndexOf},{lastIndexOf:Hg}),new c({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),Kd=new c({name:"spa",originFireUrl:"",lastPageUrl:"",navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),qg.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(s,e){var u=this;void 0===e&&(e="reload"),setTimeout(function(){s._customPageUrl=null;var r=location.pathname+location.hash+s.config.id,i=s.getOriginFrom(),o=u.lastPageUrl||undefined,a=u.resolveNavigationType(e,location.href);u.$walk(function(e){var t,n;e===s&&r&&r!==u.originFireUrl&&(n={event_id:Oc(),event_type:P.PAGE_VIEW,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:_d(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:a,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),u.originFireUrl=r,u.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),Vg="__MONITOR_SESSION_V1__";function Gg(e,t){"undefined"!=typeof document&&(e=[e+"="+encodeURIComponent(t),"path=/","SameSite=Lax"],"undefined"!=typeof location&&"https:"===location.protocol&&e.push("Secure"),document.cookie=e.join("; "))}function Jg(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function $g(e,t){var n,r,i;return"undefined"==typeof window?Jg(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[Vg],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),n):(i=Jg(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),window[Vg]=i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),Gg("_tdem_s",n.sessionId),n):(i=Jg(t(),e),Gg("_tdem_s",(window[Vg]=i).sessionId),i))}rv.prototype.request=function(o,a){var s=this;return void 0===a&&(a={}),o.sendBeacon||o.handoff?this.handoff(o,a):new Promise(function(n){var e,r,t,i=new XMLHttpRequest;i.sendByTdem=!0,i.addEventListener("readystatechange",function(){var e,t;4===i.readyState&&((e={ok:0<i.status&&i.status<400,status:i.status,statusText:i.statusText,body:i.response,request:o}).ok?(null!=(t=a.success)&&t.call(a,i.response),null!=(t=a["final"])&&t.call(a,e),n(e)):(t=A(A({},e),{error:i.response}),null!=(e=a.fail)&&e.call(a,i.response),null!=(e=a["final"])&&e.call(a,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"===T(r)&&r?(t=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),e+(-1===e.indexOf("?")?"?":"&")+t):e)),s.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),s.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),t=o.body!==undefined?o.body:o.data,s.shouldSanitizeEvalKeyword(o,t)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},rv.prototype.shouldSanitizeEvalKeyword=function(e,t){return"string"==typeof t&&!("replay"===e.kind||(e=null!=(t=null==(t=e.headers)?void 0:t["Content-Encoding"])?t:null==(t=e.headers)?void 0:t["content-encoding"])&&/gzip/i.test(e))},rv.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:undefined;return r&&"function"==typeof r.sendBeacon?(n=e.body!==undefined?e.body:e.data,r={ok:n=r.sendBeacon(e.url,n),request:e,handoffAccepted:n,error:n?undefined:new Error("navigator.sendBeacon rejected the payload")},n?null!=(n=t.success)&&n.call(t,{accepted:!0}):null!=(n=t.fail)&&n.call(t,r.error),null!=(n=t["final"])&&n.call(t,r),Promise.resolve(r)):(n={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(r=t.fail)&&r.call(t,n.error),null!=(e=t["final"])&&e.call(t,n),Promise.resolve(n))},rv.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var Zg,Kg,Yg=rv,Xg=new Map,Qg=(yl(Kg=tv,r=Zg=ld),Kg.prototype=null===r?Object.create(r):(nv.prototype=r.prototype,new nv),tv.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=_l(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},tv.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},tv.prototype._prefetchConfigAndInit=function(a){return wl(this,void 0,void 0,function(){var t,n,r,i,o;return bl(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=!1,i=null,!t||!n)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transportRequest({kind:"config",url:n,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(o=e.sent()).ok&&0===(o="string"==typeof o.body?JSON.parse(o.body):o.body).code&&o.data&&(r=!!o.data.enabled,i=o.data),[3,4];case 3:return e.sent(),(o=this._loadPrefetchDataFromCache(t))&&(r=!!o.enabled,i=o),[3,4];case 4:if(r){i&&(this._prefetchedConfigData=i);try{this._initAfterPreparedConfig(a)}catch(N){console.warn(N),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),this.sendSDKError(N)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},tv.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},tv.prototype._loadPrefetchDataFromCache=function(e){try{var t,n,r=localStorage.getItem("TDEM_SAMPLE_CONFIG");return r?!((t=JSON.parse(r)).projectKey!==e||6048e5<=Date.now()-t.timestamp)&&0<t.sampleRate?(n={enabled:t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,tdem_sample_rate:t.sampleRate},t.replaySampleRate!==undefined&&(n.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(n.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(n.error_sample_rate=t.errorSampleRate),n):null:null}catch(N0){return null}},tv.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<ld.installedPlugins.length;t++)try{ld.installedPlugins[t].patch(this)}catch(S){this.sendSDKError(S)}this.lifeCycle.emit("onInited"),this._afterInit(e)},tv.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",tv.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=Ul(Nl("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],Fl("tdem-web-retry-report-requests",JSON.stringify(t)),n.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Xg.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{o()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Xg.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},tv.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},tv.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},tv.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(Pe){return""}},tv.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},tv.prototype.request=function(u,n,l){var c,d,f=this;this.config.reportImmediately||this.isReportReady?this.$request(u,c=function(e){var t=Ul(Nl("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&u.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===u.extraRetryOptions.requestId}),1),Fl("tdem-web-retry-report-requests",JSON.stringify(t)),Xg["delete"](u.extraRetryOptions.success),Xg["delete"](u.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!f.config.reportRetry)return null==l?void 0:l(e);var t,n="boolean"==typeof f.config.reportRetry?jm:A(A({},jm),f.config.reportRetry),r=n.maxRetryCount,i=void 0===r?jm.maxRetryCount:r,r=n.retryInterval,r=void 0===r?jm.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?jm.whenRetryEndStillFail:n,a=(u.extraRetryOptions||(u.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),u.extraRetryOptions),s=(a.requestId=a.requestId||u.url+"-"+Date.now()+"-"+Math.random(),a.requestId),n=(a.retriedCount=a.retriedCount||0,a.success=a.success||s+"_successCallback",a.fail=a.fail||s+"_failCallback",Ul(Nl("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===s})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===s}),n[t]=u):n.push(u),Fl("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;a.retriedCount<i?(u.extraRetryOptions.retriedCount+=1,f.$request(u,c,d)):("discard"===o&&((e=Ul(Nl("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==s})).length?Fl("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(N0){}}("tdem-web-retry-report-requests")),Xg["delete"](a.success),Xg["delete"](a.fail))},"function"==typeof r?r(u.extraRetryOptions.retriedCount):r),null!=l&&l(e),Xg.has(a.success)||Xg.set(a.success,c),Xg.has(a.fail)||Xg.set(a.fail,d)}):this.reportRequestQueue.push({options:u,success:n,fail:l})},tv.prototype.$request=function(s,e,t){var n,r;if(s&&"string"==typeof s.url&&""!==s.url&&this.bean.id)return n=s.url,!1!==s.addBean&&(n=function(e,t){var n,r,i,o=e,a=s.beanFilter||[];for(n in t)-1===a.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(n,A(A({},this.bean),{from:this.getCurrentPageUrl()}))),s.url=n,n=s.method||"get",r=this.config.onBeforeRequest,(s=r?r(s,this):s)?s.url?(r={success:e,fail:t},void((e={kind:s.type===ic.WHITE_LIST?"config":"events",url:s.url,method:n.toUpperCase(),contentType:s.contentType,data:s.data,body:s.data,sendBeacon:!!(null!=s&&s.sendBeacon||this.sendNow),source:s}).sendBeacon?this.transportHandoff(e,r):this.transportRequest(e,r))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},tv.prototype.publishPluginsLogs=function(){var e=tv.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},tv.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},tv.prototype.reportWebVitals=function(e){try{var t=tv.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(Pe){}},tv.sessionID=$g("tdem",qc).sessionId,tv),Od=(new c({name:"ie"}),new c({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var a=this,s=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=mc(t[0]);kd(i)||(r={event_id:Oc(),event_type:P.JS_ERROR,event_category:Cc.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},a.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=s&&s.call.apply(s,kl([window],t))}},overrideTdemSend:function(){Qg.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),Ud=(new c({name:"onClose"}),new c({name:"onClose",onNewTdem:function(n){var r,i=this;h.desktop()?(r=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=r&&r.call.apply(r,kl([window],e))}):Dg(this.publishNotReportedLog.bind(this,n),{once:!0})},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),ev=void 0;function tv(e,t){var n,r,i,a,o,s,u,l,c,d,f=Zg.call(this,e,t=void 0===t?{}:t)||this;f.sendNow=!1,f.isReportReady=!1,f.reportRequestQueue=[],f._sdkInitialized=!1,f.speedLogPipeline=rd([(l=[],c=(o=f).config,o.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),s&&l.length>=s||o.sendNow&&0<l.length?(l=Pc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,l=Pc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},c.delay))}),(a=f.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=Dc[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],Dc[n]=r):Lc[n]||Nc(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Dc[n]=r,t(e)):Lc[n]||Nc(n))}),(i=f,function(t,n){lg(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=f.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=f.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return f.sendPipeline([function(e,t){t({type:ic.SPEED,url:""+f.config.speedUrl,method:"post",data:kc(e,A(A({},f.bean),{from:f.getCurrentPageUrl()})),log:e})}],ic.SPEED)(e)}]),f.getInternalTransport()||f.setInternalTransport(new Yg),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(d=String(e.userId||e.uin||(null!=(n=document.cookie.match(/\buin=\D+(\d*)/))?n:[])[1]||(null!=(r=document.cookie.match(/\bilive_uin=\D*(\d+)/))?r:[])[1]||""),e.userId=d,e.uin=e.uin||d),f._bootstrapInit(e)}catch(Ie){console.warn(Ie),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),f.sendSDKError(Ie)}return f}function nv(){this.constructor=Kg}function rv(){}R({target:"Math",stat:!0},{log1p:ev});Math.log;var r=Math.acosh,iv=Math.log,ov=Math.sqrt,av=Math.LN2,r=!r||710!==Math.floor(r(Number.MAX_VALUE))||r(Infinity)!==Infinity,r=(R({target:"Math",stat:!0,forced:r},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?iv(e)+av:ev(e-1+ov(e-1)*ov(1+e))}}),Math.asinh),sv=Math.log,uv=Math.sqrt,lv=Math.LN2,r=!(r&&0<1/r(0)),r=(R({target:"Math",stat:!0,forced:r},{asinh:function HO(e){e=+e;return isFinite(e)&&0!=e?e<0?-HO(-e):94906265.62425156<e?sv(e)+lv:e<1e-8?e:ev(e+e*e/(1+uv(e*e+1))):e}}),Math.atanh),r=!(r&&1/r(-0)<0),cv=(R({target:"Math",stat:!0,forced:r},{atanh:function(e){e=+e;return 0==e?e:ev(2*e/(1-e))/2}}),void 0),r=(R({target:"Math",stat:!0,forced:cv!==Math.expm1},{expm1:cv}),Math.expm1),r=(!r||22025.465794806718<r(10)||r(10)<22025.465794806718||r(-2e-17),Math.cosh),dv=Math.abs,fv=Math.E,r=!r||r(710)===Infinity,hv=(R({target:"Math",stat:!0,forced:r},{cosh:function(e){e=cv(dv(e)-1)+1;return(e+1/(e*fv*fv))*(fv/2)}}),Math.abs),pv=Math.exp,mv=Math.E,r=g(function(){return-2e-17!==Math.sinh(-2e-17)}),gv=(R({target:"Math",stat:!0,forced:r},{sinh:function(e){e=+e;return hv(e)<1?(cv(e)-cv(-e))/2:(pv(e-1)-pv(-e-1))*(mv/2)}}),Math.exp),vv=(R({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=cv(e),n=cv(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/(gv(e)+gv(-e))}}),Fd.values);R({target:"Object",stat:!0},{values:function(e){return vv(e)}});var yv,wv,bv,kv=jt.enforce,Sv=jt.get,r=x.Int8Array,_v=r&&r.prototype,Fd=x.Uint8ClampedArray,Fd=Fd&&Fd.prototype,Ev=r&&dr(r),Cv=_v&&dr(_v),r=Object.prototype,Rv=x.TypeError,Ov=Xe("toStringTag"),xv=Dt("TYPED_ARRAY_TAG"),Tv=t,t=!1,Mv={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Iv={BigInt64Array:8,BigUint64Array:8},Av=function(e){var t,e=dr(e);if(O(e))return(t=Sv(e))&&I(t,"TypedArrayConstructor")?t.TypedArrayConstructor:Av(e)},Pv=function(e){return!!O(e)&&(e=nt(e),I(Mv,e)||I(Iv,e))};for(yv in Mv)(bv=(wv=x[yv])&&wv.prototype)?kv(bv).TypedArrayConstructor=wv:Tv=!1;for(yv in Iv)(bv=(wv=x[yv])&&wv.prototype)&&(kv(bv).TypedArrayConstructor=wv);if((!Tv||!_(Ev)||Ev===Function.prototype)&&(Ev=function(){throw new Rv("Incorrect invocation")},Tv))for(yv in Mv)x[yv]&&Rr(x[yv],Ev);if((!Tv||!Cv||Cv===r)&&(Cv=Ev.prototype,Tv))for(yv in Mv)x[yv]&&Rr(x[yv].prototype,Cv);if(Tv&&dr(Fd)!==Cv&&Rr(Fd,Cv),f&&!I(Cv,Ov))for(yv in Bt(Cv,Ov,{configurable:t=!0,get:function(){return O(this)?this[xv]:undefined}}),Mv)x[yv]&&st(x[yv].prototype,xv,yv);var L={NATIVE_ARRAY_BUFFER_VIEWS:Tv,TYPED_ARRAY_TAG:t&&xv,aTypedArray:function(e){if(Pv(e))return e;throw new Rv("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!_(e)||Rr&&!Ce(Ev,e))throw new Rv(Oe(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(f){if(n)for(var i in Mv){i=x[i];if(i&&I(i.prototype,e))try{delete i.prototype[e]}catch(X){try{i.prototype[e]=t}catch(D){}}}Cv[e]&&!n||Gt(Cv,e,!n&&Tv&&_v[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(f){if(Rr){if(n)for(r in Mv)if((i=x[r])&&I(i,e))try{delete i[e]}catch(X){}if(Ev[e]&&!n)return;try{return Gt(Ev,e,!n&&Tv&&Ev[e]||t)}catch(X){}}for(r in Mv)!(i=x[r])||i[e]&&!n||Gt(i,e,t)}},getTypedArrayConstructor:Av,isView:function(e){return!!O(e)&&("DataView"===(e=nt(e))||I(Mv,e)||I(Iv,e))},isTypedArray:Pv,TypedArray:Ev,TypedArrayPrototype:Cv},Lv=x.ArrayBuffer,Dv=x.Int8Array,Nv=!L.NATIVE_ARRAY_BUFFER_VIEWS||!g(function(){Dv(1)})||!g(function(){new Dv(-1)})||!Mu(function(e){new Dv,new Dv(null),new Dv(1.5),new Dv(e)},!0)||g(function(){return 1!==new Dv(new Lv(2),1,undefined).length}),Fv=(R({target:"Number",stat:!0},{isInteger:void 0}),Math.floor,Number.isInteger,RangeError),Uv=RangeError,jv=function(t,e){var n=function(){var e=ce(t);if(e<0)throw new Fv("The argument can't be less than 0");return e}();if(n%e)throw new Uv("Wrong offset");return n},zv=Math.floor,Bv=TypeError,Wv=function(e){e=So(e,"number");if("number"==typeof e)throw new Bv("Can't convert number to bigint");return BigInt(e)},Hv=L.aTypedArrayConstructor,qv=function(e){var t=du(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&Te(r);var o,a,s,u,l,c,d,f,h=ue(e),e=Xr(h);if(e&&!Zr(e))for(f=(d=ei(h,e)).next,h=[];!(c=M(f,d)).done;)h.push(c.value);for(i&&2<n&&(r=Gr(r,arguments[2])),a=he(h),u=function(e){e=nt(e);return"BigInt64Array"===e||"BigUint64Array"===e}(s=new(Hv(t))(a)),o=0;o<a;o++)l=i?r(h[o],o):h[o],s[o]=u?Wv(l):+l;return s},Vv=function(e,t,n){for(var r=0,i=2<arguments.length?n:he(t),o=new e(i);r<i;)o[r]=t[r++];return o},r=Ve(function(e){var r=Xn.f,u=pi.forEach,h=jt.get,p=jt.set,m=jt.enforce,g=at.f,n=ar.f,v=x.RangeError,y=Go.ArrayBuffer,t=y.prototype,w=Go.DataView,b=L.NATIVE_ARRAY_BUFFER_VIEWS,k=L.TYPED_ARRAY_TAG,S=L.TypedArray,_=L.TypedArrayPrototype,E=L.isTypedArray,i=function(e,t){Bt(e,t,{configurable:!0,get:function(){return h(this)[t]}})},C=function(e){return Ce(t,e)||"ArrayBuffer"===(e=nt(e))||"SharedArrayBuffer"===e},o=function(e,t){return E(e)&&!$i(t)&&t in e&&(void 0)(+t)&&0<=t},a=function(e,t){return t=Si(t),o(e,t)?ot(2,e[t]):n(e,t)},s=function(e,t,n){return t=Si(t),!(o(e,t)&&O(n)&&I(n,"value"))||I(n,"get")||I(n,"set")||n.configurable||I(n,"writable")&&!n.writable||I(n,"enumerable")&&!n.enumerable?g(e,t,n):(e[t]=n.value,e)};f?(b||(ar.f=a,at.f=s,i(_,"buffer"),i(_,"byteOffset"),i(_,"byteLength"),i(_,"length")),R({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:a,defineProperty:s}),e.exports=function(e,t,i){var l=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=x[n],c=s,d=c&&c.prototype,e={},f=function(e,r){g(e,r,{get:function(){var e=this,t=r;return(e=h(e)).view[o](t*l+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=h(n=this)).view[a](t*l+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=zv(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?Nv&&(c=t(function(e,t,n,r){return cr(e,d),ua(O(t)?C(t)?r!==undefined?new s(t,jv(n,l),r):n!==undefined?new s(t,jv(n,l)):new s(t):E(t)?Vv(c,t):M(qv,c,t):new s(ea(t)),e,c)}),Rr&&Rr(c,S),u(r(s),function(e){e in c||st(c,e,s[e])}),c.prototype=d):(c=t(function(e,t,n,r){cr(e,d);var i,o,a=0,s=0;if(O(t)){if(!C(t))return E(t)?Vv(c,t):M(qv,c,t);var u=t,s=jv(n,l),n=t.byteLength;if(r===undefined){if(n%l)throw new v("Wrong length");if((i=n-s)<0)throw new v("Wrong length")}else if((i=ea(r)*l)+s>n)throw new v("Wrong length");o=i/l}else o=ea(t),u=new y(i=o*l);for(p(e,{buffer:u,byteOffset:s,byteLength:i,length:o,view:new w(u)});a<o;)f(e,a++)}),Rr&&Rr(c,S),d=c.prototype=Rt(_)),d.constructor!==c&&st(d,"constructor",c),m(d).TypedArrayConstructor=c,k&&st(d,k,n),c!==s);e[n]=c,R({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||st(c,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in d||st(d,"BYTES_PER_ELEMENT",l),Ta(n)}):e.exports=function(){}}),Gv=(r("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),r("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),R({target:"Array",proto:!0},{copyWithin:void 0}),nr("copyWithin"),Math.min,v(void 0)),Jv=L.aTypedArray,$v=((0,L.exportTypedArrayMethod)("copyWithin",function(e,t){return Gv(Jv(this),e,t,2<arguments.length?arguments[2]:undefined)}),a("every",TypeError)),Zv=(R({target:"Iterator",proto:!0,real:!0,forced:$v},{every:function(n){E(this);try{Te(n)}catch(X){ti(this,"throw",X)}var e,r;return $v?M($v,this,n):(e=ai(this),!oi(e,function(e,t){if(!n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.every),Fd=ze("every"),Kv=(R({target:"Array",proto:!0,forced:!Fd},{every:function(e){return Zv(this,e,1<arguments.length?arguments[1]:undefined)}}),pi.every),Yv=L.aTypedArray,Xv=((0,L.exportTypedArrayMethod)("every",function(e){return Kv(Yv(this),e,1<arguments.length?arguments[1]:undefined)}),r("Int8",function(r){return function(e,t,n){return r(this,e,t,n)}}),L.getTypedArrayConstructor),Qv=function(e,t){return Vv(Xv(e),t)},ey=pi.filter,ty=L.aTypedArray,ny=((0,L.exportTypedArrayMethod)("filter",function(e){e=ey(ty(this),e,1<arguments.length?arguments[1]:undefined);return Qv(this,e)}),pi.find),ry=L.aTypedArray,iy=((0,L.exportTypedArrayMethod)("find",function(e){return ny(ry(this),e,1<arguments.length?arguments[1]:undefined)}),pi.findIndex),oy=L.aTypedArray,ay=((0,L.exportTypedArrayMethod)("findIndex",function(e){return iy(oy(this),e,1<arguments.length?arguments[1]:undefined)}),pi.forEach),sy=L.aTypedArray,uy=((0,L.exportTypedArrayMethod)("forEach",function(e){ay(sy(this),e,1<arguments.length?arguments[1]:undefined)}),e.includes),ly=L.aTypedArray,cy=((0,L.exportTypedArrayMethod)("includes",function(e){return uy(ly(this),e,1<arguments.length?arguments[1]:undefined)}),e.indexOf),dy=L.aTypedArray,fy=((0,L.exportTypedArrayMethod)("indexOf",function(e){return cy(dy(this),e,1<arguments.length?arguments[1]:undefined)}),Xe("iterator")),Ov=x.Uint8Array,hy=v(wr.values),py=v(wr.keys),my=v(wr.entries),gy=L.aTypedArray,t=L.exportTypedArrayMethod,vy=Ov&&Ov.prototype,nr=!g(function(){vy[fy].call([1])}),a=!!vy&&vy.values&&vy[fy]===vy.values&&"values"===vy.values.name,ze=function(){return hy(gy(this))},yy=(t("entries",function(){return my(gy(this))},nr),t("keys",function(){return py(gy(this))},nr),t("values",ze,nr||!a,{name:"values"}),t(fy,ze,nr||!a,{name:"values"}),L.aTypedArray),Fd=L.exportTypedArrayMethod,wy=v([].join),by=(Fd("join",function(e){return wy(yy(this),e)}),L.aTypedArray),ky=((0,L.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return Me(Hg,by(this),1<t?[e,arguments[1]]:[e])}),pi.map),Sy=L.aTypedArray,_y=((0,L.exportTypedArrayMethod)("map",function(e){e=ky(Sy(this),e,1<arguments.length?arguments[1]:undefined);return Qv(this,e)}),Fe.left),Ey=L.aTypedArray,Cy=((0,L.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return _y(Ey(this),e,t,1<t?arguments[1]:undefined)}),Fe.right),Ry=L.aTypedArray,Oy=((0,L.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return Cy(Ry(this),e,t,1<t?arguments[1]:undefined)}),L.aTypedArray),e=L.exportTypedArrayMethod,xy=Math.floor,Ty=(e("reverse",function(){for(var e,t=Oy(this).length,n=xy(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),r("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}},!0),pi.some),My=L.aTypedArray,Iy=((0,L.exportTypedArrayMethod)("some",function(e){return Ty(My(this),e,1<arguments.length?arguments[1]:undefined)}),L.aTypedArray),Ov=L.exportTypedArrayMethod,Ay=x.Uint16Array,Py=Ay&<(Ay.prototype.sort),ze=!(!Py||g(function(){Py(new Ay(2),null)})&&g(function(){Py(new Ay(2),{})})),Ly=!!Py&&!g(function(){if(Vn)return Vn<74;if(Vf)return Vf<67;if(Gf)return!0;if(Jf)return Jf<602;for(var e,t=new Ay(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(Py(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),Dy=(Ov("sort",function(e){return e!==undefined&&Te(e),Ly?Py(this,e):qf(Iy(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!Ly||ze),L.aTypedArray),Ny=L.getTypedArrayConstructor,Fy=((0,L.exportTypedArrayMethod)("subarray",function(e,t){var n=Dy(this),r=n.length,e=ht(e,r);return new(Ny(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,fe((t===undefined?r:ht(t,r))-e))}),x.Int8Array),Uy=L.aTypedArray,nr=L.exportTypedArrayMethod,jy=[].toLocaleString,zy=!!Fy&&g(function(){jy.call(new Fy(1))}),a=(nr("toLocaleString",function(){return Me(jy,zy?$n(Uy(this)):Uy(this),$n(arguments))},g(function(){return[1,2].toLocaleString()!==new Fy([1,2]).toLocaleString()})||!g(function(){Fy.prototype.toLocaleString.call([1,2])})),L.exportTypedArrayMethod),t=x.Uint8Array,Fd=t&&t.prototype||{},By=[].toString,Wy=v([].join),Fe=(g(function(){By.call({})})&&(By=function(){return Wy(this)}),Fd.toString!==By),Hy=(a("toString",By,Fe),L.aTypedArray),qy=L.getTypedArrayConstructor,Vy=((0,L.exportTypedArrayMethod)("slice",function(e,t){for(var n=$n(Hy(this),e,t),e=qy(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},g(function(){new Int8Array(1).slice()})),x.RangeError),Gy=x.Int8Array,e=Gy&&Gy.prototype,Jy=e&&e.set,$y=L.aTypedArray,ze=L.exportTypedArrayMethod,Zy=!g(function(){var e=new Uint8ClampedArray(2);return M(Jy,e,{length:1,0:3},1),3!==e[1]}),Ov=Zy&&L.NATIVE_ARRAY_BUFFER_VIEWS&&g(function(){var e=new Gy(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),Ky=(ze("set",function(e){$y(this);var t=jv(1<arguments.length?arguments[1]:undefined,1),n=ue(e);if(Zy)return M(Jy,this,n,t);var e=this.length,r=he(n),i=0;if(e<r+t)throw new Vy("Wrong length");for(;i<r;)this[t+i]=n[i++]},!Zy||Ov),L.aTypedArray),nr=L.exportTypedArrayMethod,Yy=v("".slice);function Xy(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}nr("fill",function(e){var t=arguments.length,e=(Ky(this),"Big"===Yy(nt(this),0,3)?Wv(e):+e);return M(sa,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},g(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),new c({name:"aid"});n0.generate=function(){return"rep_"+this.uuid32()},n0.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var Qy=n0,e0="[SessionReplay]",t0=!1;function n0(){}function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t0&&console.log.apply(console,kl([e0+"["+e+"]"],t))}function r0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t0&&console.debug.apply(console,kl([e0+"["+e+"]"],t))}function i0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t0&&console.log.apply(console,kl([e0+"["+e+"] WARN:"],t))}function o0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t0&&console.log.apply(console,kl([e0+"["+e+"] ERROR:"],t))}c0.prototype.setTdemInstance=function(e){this.tdemInstance=e},c0.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=$g("tdem",Xy),n=A({id:n.sessionId,replayId:Qy.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),p("SessionManager","Document replay session created:",n.id,n.replayId),n},c0.prototype.restoreSession=function(){return this.session},c0.prototype.saveSession=function(){},c0.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},c0.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},c0.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},c0.prototype.shouldRefreshSession=function(){return!1},c0.prototype.getSession=function(){return this.session},c0.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},c0.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},c0.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(w){}},c0.prototype.syncSharedSession=function(e){var t,n,r;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,"undefined"!=typeof window&&(t=Date.now(),(n=window[Vg])?(r=n.sessionId!==e,n.sessionId=e,n.version=r?n.version+1:n.version,n.source="tdem",r&&(n.createdAt=t),n.lastActivity=t):window[Vg]=Jg(e,"tdem"),Gg("_tdem_s",e),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:"tdem"}})))};var a0=c0,s0=((t={})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t),u0=(l0.prototype.ensureReady=function(){return wl(this,void 0,void 0,function(){return bl(this,function(e){return[2,this.ready]})})},l0.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},l0.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},l0);function l0(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function c0(e){this.session=null,this.tdemInstance=null}f0.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),p("CompressionWorker","Worker created successfully"),new u0(n))}catch(u){return i0("CompressionWorker","Failed to create worker, will fallback to sync buffer:",u),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,p("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){i0("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):p("EventBuffer","Worker not available, using sync buffer")},f0.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady){var e=this.events;this.events=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addEventToWorker(r)}this.currentSize=0}},f0.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(S){i0("EventBuffer","Failed to send event to worker:",S)}},f0.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(i0("EventBuffer","Worker buffer size limit exceeded, dropping old events"),this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e)):(t=this.estimateEventSize(e),this.currentSize+t>this.config.maxSize&&(i0("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},f0.prototype.getEvents=function(){return kl(this.events)},f0.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},f0.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},f0.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},f0.prototype.finishAsync=function(){return wl(this,void 0,void 0,function(){var t,n,r;return bl(this,function(e){switch(e.label){case 0:if(!(this.useWorker&&this.workerReady&&this.workerHandler&&0<this.workerEventCount))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.workerHandler.postMessage("finish")];case 2:return t=e.sent(),r=this.workerEventCount,n=this.workerSize,this.workerEventCount=0,this.workerSize=0,[2,{events:[],eventCount:r,uncompressedSize:n,eventsJson:t}];case 3:return i0("EventBuffer","Worker finish failed, falling back to sync:",e.sent()),[3,4];case 4:return[2,{events:r=this.getEvents(),eventCount:r.length,uncompressedSize:this.currentSize}]}})})},f0.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},f0.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},f0.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},f0.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(N0){return 1024}},f0.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===s0.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===s0.Meta){r=n;break}for(var i,o=0,a=Math.max(e,.2*this.config.maxSize),s=0;s<r&&o<a;)s++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<a;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},f0.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===s0.Meta||e.type===s0.FullSnapshot})},f0.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===s0.FullSnapshot)return t.timestamp}return null},f0.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var d0=f0;function f0(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}ki("toStringTag"),yr(Ee("Symbol"),"Symbol"),yr(x.JSON,"JSON",!0),yr(Math,"Math",!0),R({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var h0=i.trim,p0=v("".charAt),m0=x.parseFloat,Fd=x.Symbol,g0=Fd&&Fd.iterator,Fe=1/m0(Ro+"-0")!=-Infinity||g0&&!g(function(){m0(Object(g0))})?function(e){var e=h0(C(e)),t=m0(e);return 0===t&&"-"===p0(e,0)?-0:t}:m0,v0=(R({target:"Number",stat:!0,forced:Number.parseFloat!==Fe},{parseFloat:Fe}),Ee("Reflect","construct")),y0=Object.prototype,w0=[].push,b0=g(function(){function e(){}return!(v0(function(){},[],e)instanceof e)}),k0=!g(function(){v0(function(){})}),a=b0||k0,S0=(R({target:"Reflect",stat:!0,forced:a,sham:a},{construct:function(e,t){du(e);var n=arguments.length<3?e:du(arguments[2]);if(E(t),k0&&!b0)return v0(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Me(w0,r,t),new(Me(Rs,e,r))}r=n.prototype,n=Rt(O(r)?r:y0),r=Me(e,n,t);return O(r)?r:n}}),function(e,t,n){var r,i;return E(e)===n?e[t]:(r=ar.f(e,t))?(i=r)!==undefined&&(I(i,"value")||I(i,"writable"))?r.value:r.get===undefined?undefined:M(r.get,n):(i=dr(e),O(i)?S0(i,t,n):void 0)}),e=(R({target:"Reflect",stat:!0},{get:function(e,t){return S0(E(e),Si(t),arguments.length<3?e:arguments[2])}}),ar.f),_0=lt("".slice),E0=Math.min,Ov=Hr("endsWith"),nr=!(Ov||!(ze=e(String.prototype,"endsWith"))||ze.writable),C0=(R({target:"String",proto:!0,forced:!nr&&!Ov},{endsWith:function(e){var t=C(ae(this)),e=(Qi(e),C(e)),n=1<arguments.length?arguments[1]:undefined,r=t.length,n=n===undefined?r:E0(fe(n),r);return _0(t,n-e.length,n)===e}}),v("".replace),R({target:"String",proto:!0,forced:g(function(){var e="".bold('"');return e!==e.toLowerCase()||3<e.split('"').length})},{bold:function(){return 0,"<b"+">"+C(ae(this))+"</b>"}}),r("Float64",function(r){return function(e,t,n){return r(this,e,t,n)}}),r("Int16",function(r){return function(e,t,n){return r(this,e,t,n)}}),r("Int32",function(r){return function(e,t,n){return r(this,e,t,n)}}),r("Uint16",function(r){return function(e,t,n){return r(this,e,t,n)}}),r("Uint32",function(r){return function(e,t,n){return r(this,e,t,n)}}),Object.isFrozen),t=Ma||g(function(){C0(1)}),R0=(R({target:"Object",stat:!0,forced:t},{isFrozen:function(e){return!O(e)||!(!Ma||"ArrayBuffer"!==ne(e))||!!C0&&C0(e)}}),Object.isSealed),i=Ma||g(function(){R0(1)}),O0=(R({target:"Object",stat:!0,forced:i},{isSealed:function(e){return!O(e)||!(!Ma||"ArrayBuffer"!==ne(e))||!!R0&&R0(e)}}),Fa.onFreeze),x0=Object.seal,Fd=g(function(){x0(1)});R({target:"Object",stat:!0,forced:Fd,sham:!0},{seal:function(e){return x0&&O(e)?x0(O0(e)):e}});var T0,M0,I0,A0,P0=jt.enforce,Fe=Object,L0=(Array.isArray,Fe.isExtensible),a=!x.ActiveXObject&&"ActiveXObject"in x,lt=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Hr=we("WeakMap",lt,l),e=Hr.prototype,D0=v(e.set);Ue&&a&&(T0=l.getConstructor(lt,"WeakMap",!0),Fa.enable(),M0=v(e["delete"]),I0=v(e.has),A0=v(e.get),Xo(e,{"delete":function(e){var t;return O(e)&&!L0(e)?((t=P0(this)).frozen||(t.frozen=new T0),M0(this,e)||t.frozen["delete"](e)):M0(this,e)},has:function(e){var t;return O(e)&&!L0(e)?((t=P0(this)).frozen||(t.frozen=new T0),I0(this,e)||t.frozen.has(e)):I0(this,e)},get:function(e){var t;return!O(e)||L0(e)||((t=P0(this)).frozen||(t.frozen=new T0),I0(this,e))?A0(this,e):t.frozen.get(e)},set:function(e,t){var n;return!O(e)||L0(e)||((n=P0(this)).frozen||(n.frozen=new T0),I0(this,e))?D0(this,e,t):n.frozen.set(e,t),this}}));var N0,F0=["inputs"],U0=["inputId"],j0=["inputs"],z0=["inputId"],B0=["type"],W0=Object.defineProperty,m=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?W0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},H0=Object.defineProperty,q0=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},V0=((ze=V0||{})[ze.Document=0]="Document",ze[ze.DocumentType=1]="DocumentType",ze[ze.Element=2]="Element",ze[ze.Text=3]="Text",ze[ze.CDATA=4]="CDATA",ze[ze.Comment=5]="Comment",ze),G0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},J0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},$0={},Z0={};function K0(e){if($0[e])return $0[e];var t=globalThis[e],n=t.prototype,r=e in G0?G0[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in J0?J0[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return $0[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),Z0[e]=function(){return s.remove()}):s.remove(),$0[e]=o):(s.remove(),n):t.prototype}catch(U){return n}}var Y0={};function X0(e,t,n){var r="".concat(e,".").concat(String(n));return Y0[r]?Y0[r].call(t):(e=K0(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(Y0[r]=e).call(t):t[n])}var Q0={};function ew(e,t,n){var r="".concat(e,".").concat(String(n));return Q0[r]?Q0[r].bind(t):"function"!=typeof(e=K0(e)[n])?t[n]:(Q0[r]=e).bind(t)}var nr=Date.now,tw={ownerDocument:function(e){return X0("Node",e,"ownerDocument")},childNodes:function(e){return X0("Node",e,"childNodes")},parentNode:function(e){return X0("Node",e,"parentNode")},parentElement:function(e){return X0("Node",e,"parentElement")},textContent:function(e){return X0("Node",e,"textContent")},contains:function(e,t){return ew("Node",e,"contains")(t)},getRootNode:function(e){return ew("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?X0("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?X0("Element",e,"shadowRoot"):null},querySelector:function(e,t){return X0("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return X0("Element",e,"querySelectorAll")(t)},nowTimestamp:nr=/[1-9][0-9]{12}/.test(Date.now().toString())?nr:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[K0("MutationObserver").constructor,null!=(e=Z0.MutationObserver)?e:function(){}]},patch:function(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}};function nw(e){return e.nodeType===e.ELEMENT_NODE}function rw(e){var t=e&&"host"in e&&"mode"in e&&tw.host(e)||null;return Boolean(t&&"shadowRoot"in t&&tw.shadowRoot(t)===e)}function iw(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ow(e){try{var t,n=e.rules||e.cssRules;return n?(!(t=e.href)&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,function(e){return aw(e,t)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r):null}catch(X){return null}var r}function aw(e,t){if("styleSheet"in e){var n;try{n=ow(e.styleSheet)||((r=(i=e).cssText).split('"').length<3?r:(r=["@import","url(".concat(JSON.stringify(i.href),")")],""===i.layerName?r.push("layer"):i.layerName&&r.push("layer(".concat(i.layerName,")")),i.supportsText&&r.push("supports(".concat(i.supportsText,")")),i.media.length&&r.push(i.media.mediaText),r.join(" ")+";"))}catch(X){n=e.cssText}return e.styleSheet.href?gw(n,e.styleSheet.href):n}var r,i=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?gw(i,t):i}var sw=k(function y(){b(this,y),q0(this,"idNodeMap",new Map),q0(this,"nodeMetaMap",new WeakMap)},[{key:"getId",value:function(e){return e&&null!=(e=null==(e=this.getMeta(e))?void 0:e.id)?e:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);n&&(n=this.nodeMetaMap.get(n))&&this.nodeMetaMap.set(t,n),this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]);function uw(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&lw(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function lw(e){return e.toLowerCase()}function cw(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?lw(t):null}function dw(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(Pe){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(t=null==e?void 0:e[1])?t:null}var fw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hw=/^(?:[a-z+]+:)?\/\//i,pw=/^www\..*/i,mw=/^(data:)([^,]*),(.*)/i;function gw(e,c){return(e||"").replace(fw,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(hw.test(n)||pw.test(n))return"url(".concat(i).concat(n).concat(i,")");if(mw.test(n))return"url(".concat(i).concat(n).concat(i,")");if("/"===n[0])return"url(".concat(i).concat((-1<(o=c).indexOf("//")?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+n).concat(i,")");var t=n.split("#")[0],r=n.substring(t.length),a=c.split("#")[0].split("/"),e=t.split("/");a.pop();var s,u=Ie(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;"."!==l&&(".."===l?a.pop():a.push(l))}}catch(Pe){u.e(Pe)}finally{u.f()}return"url(".concat(i).concat(a.join("/")).concat(r).concat(i,")")})}function vw(e,t){return 1<arguments.length&&t!==undefined&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var yw,ww,bw=1,kw=new RegExp("[^a-z0-9-_:]");function Sw(){return bw++}var _w=/^[^ \t\n\r\u000c]+/,Ew=/^[, \t\n\r\u000c]+/,Cw=new WeakMap;function Rw(e,t){return t&&""!==t.trim()?Ow(e,t):t}function Ow(e,t){var n=Cw.get(e);if(n||(n=e.createElement("a"),Cw.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function xw(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?Rw(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var e=e.exec(t.substring(n));return e?(e=e[0],n+=e.length,e):""}for(var i=[];r(Ew),!(n>=t.length);)if(","===(a=r(_w)).slice(-1))a=Rw(e,a.substring(0,a.length-1)),i.push(a);else for(var o="",a=Rw(e,a),s=!1;;){var u=t.charAt(n);if(""===u){i.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,n+=1}return i.join(", ")}(e,r):"style"===n?gw(r,Ow(e)):"object"===t&&"data"===n?Rw(e,r):r)}function Tw(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function Mw(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE)for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Mw(tw.parentNode(e),t,n)}function Iw(e,t,n,r){var i;if(nw(e)){if(!tw.childNodes(i=e).length)return!1}else{if(null===tw.parentElement(e))return!1;i=tw.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(Mw(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(Le){}return!1}function Aw(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,c=t.maskInputFn,s=t.dataURLOptions,d=void 0===s?{}:s,f=t.inlineImages,N=t.recordCanvas,F=t.keepIframeSrcFn,s=t.newlyAddedElement,U=void 0!==s&&s,s=t.cssCaptured,j=void 0!==s&&s,h=(s=n,!(t=t.mirror).hasNode(s)||1===(s=t.getId(s))?void 0:s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:V0.Document,childNodes:[],compatMode:e.compatMode}:{type:V0.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:V0.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:for(var p,m,g,v,y,w,b=e,k=(I={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:u,maskInputFn:c,dataURLOptions:d,inlineImages:f,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:U,rootId:h}).doc,S=I.blockSelector,_=I.inlineStylesheet,E=void 0===(E=I.maskInputOptions)?{}:E,C=I.maskInputFn,R=void 0===(O=I.dataURLOptions)?{}:O,O=I.inlineImages,x=I.recordCanvas,T=I.keepIframeSrcFn,M=void 0!==(M=I.newlyAddedElement)&&M,z=I.rootId,I=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(S){}return!1}(b,I.blockClass,S),A=(m=b)instanceof HTMLFormElement?"form":(m=lw(m.tagName),kw.test(m)?"div":m),P={},B=b.attributes.length,L=0;L<B;L++){var D=b.attributes[L];Tw(A,D.name)||(P[D.name]=xw(k,A,lw(D.name),D.value))}"link"===A&&_&&(m=null,m=(_=Array.from(k.styleSheets).find(function(e){return e.href===b.href}))?ow(_):m)&&(delete P.rel,delete P.href,P._cssText=m),"style"===A&&b.sheet&&(_=ow(b.sheet))&&(1<b.childNodes.length&&(_=function(e,t,n){var r=2<arguments.length&&n!==undefined&&n,i=Array.from(t.childNodes),o=[],a=0;if(1<i.length&&e&&"string"==typeof e)for(var s=vw(e,r),u=s.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var c=vw(i[l].textContent,r),d=3;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,d),1));d++);for(;d<c.length;d++){var f,h=c.substring(0,d),p=s.split(h),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[l-1].textContent)m=s.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),(p=s.split(h)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(m=s.indexOf(h));if(-1!==(m=2<=p.length&&100<d&&((f=i[l-1].textContent)&&"string"==typeof f&&(f=vw(f).length,m=s.indexOf(h,f)),-1===m)?p[0].length:m)){for(var g=Math.floor(m/u);0<g&&g<e.length;){if((a+=1)>50*i.length)return o.push(e),o;var v=vw(e.substring(0,g),r);if(v.length===m){o.push(e.substring(0,g)),e=e.substring(g),s=s.substring(m);break}v.length<m?g+=Math.max(1,Math.floor((m-v.length)/u)):g-=Math.max(1,Math.floor((v.length-m)*u))}break}}}return o.push(e),o}(_,b).join("/* rr_split */")),P._cssText=_),["input","textarea","select"].includes(A)&&(m=b.value,_=b.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&m?P.value=uw({element:b,type:cw(b),tagName:A,value:m,maskInputOptions:E,maskInputFn:C}):_&&(P.checked=_)),"option"===A&&(b.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&b.open&&(P.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&x&&("2d"===b.__context?function(e){var t=e.getContext("2d");if(t)for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return}return 1}(b)||(P.rr_dataURL=b.toDataURL(R.type,R.quality)):"__context"in b||(m=b.toDataURL(R.type,R.quality),(C=k.createElement("canvas")).width=b.width,C.height=b.height,m!==C.toDataURL(R.type,R.quality)&&(P.rr_dataURL=m))),"img"===A&&O&&(yw||(yw=k.createElement("canvas"),ww=yw.getContext("2d")),v=(g=b).currentSrc||g.getAttribute("src")||"<unknown-src>",y=g.crossOrigin,w=function(){g.removeEventListener("load",w);try{yw.width=g.naturalWidth,yw.height=g.naturalHeight,ww.drawImage(g,0,0),P.rr_dataURL=yw.toDataURL(R.type,R.quality)}catch(Pe){if("anonymous"!==g.crossOrigin)return g.crossOrigin="anonymous",void(g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w));console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(Pe))}"anonymous"===g.crossOrigin&&(y?P.crossOrigin=y:g.removeAttribute("crossorigin"))},g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w)),["audio","video"].includes(A)&&((_=P).rr_mediaState=b.paused?"paused":"played",_.rr_mediaCurrentTime=b.currentTime,_.rr_mediaPlaybackRate=b.playbackRate,_.rr_mediaMuted=b.muted,_.rr_mediaLoop=b.loop,_.rr_mediaVolume=b.volume),M||(b.scrollLeft&&(P.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(P.rr_scrollTop=b.scrollTop)),I&&(x=(E=b.getBoundingClientRect()).width,C=E.height,P={"class":P["class"],rr_width:"".concat(x,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||T(P.src)||(b.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(p=!0)}catch(oe){}return{type:V0.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0,needBlock:I,rootId:z,isCustom:p};case e.TEXT_NODE:return m=e,_=(O={doc:n,needsMask:o,maskTextFn:l,rootId:h,cssCaptured:j}).needsMask,M=O.maskTextFn,E=O.rootId,x=O.cssCaptured,C=(C=tw.parentNode(m))&&C.tagName,T="",I="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?T="SCRIPT_PLACEHOLDER":x||(T=tw.textContent(m),I&&(T=T&&gw(T,Ow(O.doc)))),!I&&!C&&T&&_&&(T=M?M(T,tw.parentElement(m)):T.replace(/[\S]/g,"*")),{type:V0.Text,textContent:T||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:V0.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:V0.Comment,textContent:tw.textContent(e)||"",rootId:h};default:return!1}}function Pw(e){return null==e?"":e.toLowerCase()}function Lw(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function Dw(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,u=e.skipChild,u=void 0!==u&&u,l=e.inlineStylesheet,c=void 0===l||l,l=e.maskInputOptions,d=void 0===l?{}:l,f=e.maskTextFn,h=e.maskInputFn,p=e.slimDOMOptions,l=e.dataURLOptions,m=void 0===l?{}:l,l=e.inlineImages,g=void 0!==l&&l,l=e.recordCanvas,v=void 0!==l&&l,y=e.onSerialize,w=e.onIframeLoad,l=e.iframeLoadTimeout,b=void 0===l?5e3:l,k=e.onStylesheetLoad,l=e.stylesheetLoadTimeout,S=void 0===l?5e3:l,l=e.keepIframeSrcFn,_=void 0===l?function(){return!1}:l,l=e.newlyAddedElement,l=void 0!==l&&l,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,R=void 0===e||e,C=C||Iw(t,a,s,void 0===C),e=Aw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:l,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var l=r.hasNode(t)?r.getId(t):function(e,t){if(t.comment&&e.type===V0.Comment)return 1;if(e.type===V0.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===dw(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Pw(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Pw(e.attributes.name)||"icon"===Pw(e.attributes.rel)||"apple-touch-icon"===Pw(e.attributes.rel)||"shortcut icon"===Pw(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Pw(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(Pw(e.attributes.property).match(/^(og|twitter|fb):/)||Pw(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Pw(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===Pw(e.attributes.name)||"googlebot"===Pw(e.attributes.name)||"bingbot"===Pw(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===Pw(e.attributes.name)||"generator"===Pw(e.attributes.name)||"framework"===Pw(e.attributes.name)||"publisher"===Pw(e.attributes.name)||"progid"===Pw(e.attributes.name)||Pw(e.attributes.property).match(/^article:/)||Pw(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===Pw(e.attributes.name)||"yandex-verification"===Pw(e.attributes.name)||"csrf-token"===Pw(e.attributes.name)||"p:domain_verify"===Pw(e.attributes.name)||"verify-v1"===Pw(e.attributes.name)||"verification"===Pw(e.attributes.name)||"shopify-checkout-api-token"===Pw(e.attributes.name)))return 1}}}(e,p)||!R&&e.type===V0.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:bw++,O=Object.assign(e,{id:l});if(r.add(t,O),-2===l)return null;y&&y(t);E=!u;if(O.type===V0.Element&&(E=E&&!O.needBlock,delete O.needBlock,e=tw.shadowRoot(t))&&iw(e)&&(O.isShadowHost=!0),(O.type===V0.Document||O.type===V0.Element)&&E){p.headWhitespace&&O.type===V0.Element&&"head"===O.tagName&&(R=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(O.type!==V0.Element||"textarea"!==O.tagName||void 0===O.attributes.value){O.type===V0.Element&&void 0!==O.attributes._cssText&&"string"==typeof O.attributes._cssText&&(x.cssCaptured=!0);for(var T=0,M=Array.from(tw.childNodes(t));T<M.length;T++){var I=Dw(M[T],x);I&&O.childNodes.push(I)}}var A=null;if(nw(t)&&(A=tw.shadowRoot(t)))for(var P=0,L=Array.from(tw.childNodes(A));P<L.length;P++){var D=Dw(L[P],x);D&&(iw(A)&&(D.isShadow=!0),O.childNodes.push(D))}}l=tw.parentNode(t);return l&&rw(l)&&iw(l)&&(O.isShadow=!0),O.type===V0.Element&&"iframe"===O.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(X){return}if("complete"===i){if("about:blank"!==r.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(t,function(){var e=t.contentDocument;e&&w&&(e=Dw(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&w(t,e)},b),O.type===V0.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===dw(O.attributes.href))&&function(e,t,n){var r,i,o=!1;try{r=e.sheet}catch(X){return}r||(i=setTimeout(function(){o||(t(),o=!0)},n),e.addEventListener("load",function(){clearTimeout(i),o=!0,t()}))}(t,function(){var e;k&&(e=Dw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&k(t,e)},S),O}var Nw,Fw={exports:{}};var Uw,jw,zw,Bw,Ww,Hw=(zw=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?zw:("function"==typeof(Bw=zw["default"])?(Ww=function zw(){return this instanceof zw?Reflect.construct(Bw,arguments,this.constructor):Bw.apply(this,arguments)}).prototype=Bw.prototype:Ww={},Object.defineProperty(Ww,"__esModule",{value:!0}),Object.keys(zw).forEach(function(e){var t=Object.getOwnPropertyDescriptor(zw,e);Object.defineProperty(Ww,e,t.get?t:{enumerable:!0,get:function(){return zw[e]}})}),Ww);function qw(){var d,f,e,t,n;return jw||(jw=1,Nw||(Nw=1,t=String,Fw.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),Fw.exports.createColors=n),d=Fw.exports,f=Hw,n=Y(Error),j(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(Uw=e)["default"]=e),Uw;function s(e,t,n,r,i,o){var a;return b(this,s),(a=u(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var Vw,Gw,Jw,$w,Zw,Kw,Yw,Xw,Qw,eb,tb,nb,rb,ib,ob,ab,sb,ub,lb,cb,db,fb,hb,pb,mb,gb,vb,yb,wb,bb,kb,Sb,_b,Eb,Cb,Rb,Ob,xb,Tb,Mb,Ib,Ab,Pb,Lb,Db,Nb,Fb,Ub,jb,zb,Bb,Wb={};function Hb(){return Vw||(Vw=1,Wb.isClean=Symbol("isClean"),Wb.my=Symbol("my")),Wb}function qb(){var a,t;return Jw||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(Jw=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(Gw=t)["default"]=t),Gw}function Vb(){var n;return Zw||(Zw=1,n=qb(),($w=e)["default"]=e),$w;function e(e,t){new n(t).stringify(e)}}function Gb(){var o,a,s,i,n,r,e;return Yw||(Yw=1,a=(o=Hb()).isClean,s=o.my,i=qw(),n=qb(),r=Vb(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Ie(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Kw=e)["default"]=e),Kw}function Jb(){var e;return Qw||(Qw=1,e=Gb(),j(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(Xw=e)["default"]=e),Xw;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=u(this,t,[e])).type="decl",e}}function $b(){var r,i,t,n,o,a,s;return rb||(rb=1,r=Hw.SourceMapConsumer,i=Hw.SourceMapGenerator,t=Hw.existsSync,n=Hw.readFileSync,o=Hw.dirname,a=Hw.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(nb=s)["default"]=s),nb}function Zb(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return ob||(ob=1,n=Hw.SourceMapConsumer,t=Hw.SourceMapGenerator,a=Hw.fileURLToPath,u=Hw.pathToFileURL,s=Hw.isAbsolute,r=Hw.resolve,i=(tb?eb:(tb=1,eb={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=Hw,l=qw(),o=$b(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(ib=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),ib}function Kb(){if(sb)return ab;sb=1;var a=Hw.SourceMapConsumer,t=Hw.SourceMapGenerator,s=Hw.dirname,n=Hw.relative,r=Hw.resolve,i=Hw.sep,o=Hw.pathToFileURL,u=Zb(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return ab=k(function z(e,t,n,r){b(this,z),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Ie(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Yb(){var e;return lb||(lb=1,e=Gb(),j(t,e),e=k(t),(ub=e)["default"]=e),ub;function t(e){return b(this,t),(e=u(this,t,[e])).type="comment",e}}function Xb(){var l,c,d,t,f,h,p,m,n,e;return db||(db=1,e=Hb(),f=e.isClean,h=e.my,p=Jb(),m=Yb(),e=Gb(),j(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Ie(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ie(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function q(e){return e.map(function(e){return e.nodes&&(e.nodes=q(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ie(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Ie(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Ie(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Ie(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Ie(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Ie(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((cb=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),cb;function g(){return b(this,g),u(this,g,arguments)}}function Qb(){var t,n,e;return hb||(hb=1,e=Xb(),j(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(fb=e)["default"]=e),fb;function r(e){return b(this,r),(e=u(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function e1(){if(mb)return pb;mb=1;var t={};return pb=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function t1(){var r;return vb||(vb=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(gb=r)["default"]=r),gb}function n1(){var n,r;return wb||(wb=1,n=t1(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(yb=r)["default"]=r),yb}function r1(){var e,t;return _b||(_b=1,e=Xb(),j(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"prepend",this,3)(t)}}]),(Sb=t)["default"]=t,e.registerAtRule(t)),Sb;function r(e){return b(this,r),(e=u(this,r,[e])).type="atrule",e}}function i1(){var t,n,e,r;return Cb||(Cb=1,e=Xb(),j(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=$(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Ie(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),$(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},Eb=r,e.registerRoot(r["default"]=r)),Eb;function o(e){return b(this,o),(e=u(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function o1(){var t;return Ob||(Ob=1,(Rb=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Ie(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),Rb}function a1(){var e,t,n;return Tb||(Tb=1,e=Xb(),t=o1(),j(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(xb=n)["default"]=n,e.registerRule(n)),xb;function r(e){return b(this,r),(e=u(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function s1(){if(Ib)return Mb;Ib=1;var p=Jb(),e=function(){if(kb)return bb;kb=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),M="(".charCodeAt(0),I=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return bb=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case _:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===_||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case L:case I:var n=String.fromCharCode(r);d=[n,n,m];break;case M:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||z.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==R&&r!==O&&r!==C&&(i+=1,B.test(f.charAt(i)))){for(;B.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&f.charCodeAt(m+1)===D?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=Yb(),l=r1(),t=i1(),r=a1(),f={empty:!0,space:!0};return Mb=k(function F(e){b(this,F),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Ie(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function u1(){var e,n,r;return Pb||(Pb=1,e=Xb(),n=s1(),r=Zb(),Ab=t,e.registerParse(t["default"]=t)),Ab;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(D){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===D.name&&t&&t.from&&(/\.scss$/i.test(t.from)?D.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?D.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(D.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),D}return e.root}}function l1(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return Db||(Db=1,t=Hb(),d=t.isClean,a=t.my,n=Kb(),r=Vb(),u=Xb(),s=Qb(),i=e1(),c=n1(),l=u1(),e=i1(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Ie(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=S(H().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ie(this.listeners.OnceExit),e.p=15,a=H().m(function f(){var t,n,r;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(V(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Ie(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ie(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Ie(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Ie(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},Lb=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),Lb;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function c1(){var n,r,t,e,i,o,a,s,u,l,c;return jb||(jb=1,Fb||(Fb=1,o=Kb(),a=Vb(),s=e1(),u=u1(),l=n1(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(Nb=c)["default"]=c),n=Nb,r=l1(),t=Qb(),e=i1(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Ie(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(Ub=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),Ub}WE||(WE=1,Ov=qw(),d1=Jb(),r=l1(),t=Xb(),f1=c1(),i=Vb(),xO||(xO=1,y1=Jb(),w1=$b(),b1=Yb(),k1=r1(),S1=Zb(),_1=i1(),E1=a1(),(zb=C1)["default"]=C1),Fd=zb,h1=Qb(),Fe=t1(),p1=Yb(),m1=r1(),we=n1(),Hr=Zb(),Ue=u1(),a=o1(),g1=a1(),v1=i1(),lt=Gb(),R1.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new f1).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return R1([i(n)]).process(e,t)},i},R1.stringify=i,R1.parse=Ue,R1.fromJSON=Fd,R1.list=a,R1.comment=function(e){return new p1(e)},R1.atRule=function(e){return new m1(e)},R1.decl=function(e){return new d1(e)},R1.rule=function(e){return new g1(e)},R1.root=function(e){return new v1(e)},R1.document=function(e){return new h1(e)},R1.CssSyntaxError=Ov,R1.Declaration=d1,R1.Container=t,R1.Processor=f1,R1.Document=h1,R1.Comment=p1,R1.Warning=Fe,R1.AtRule=m1,R1.Result=we,R1.Input=Hr,R1.Rule=g1,R1.Root=v1,R1.Node=lt,r.registerPostcss(R1),(Bb=R1)["default"]=R1);var d1,f1,h1,p1,m1,g1,v1,y1,w1,b1,k1,S1,_1,E1,e=(l=Bb)&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l["default"]:l;function C1(e,t){if(Array.isArray(e))return e.map(function(e){return C1(e)});var n,r=e.inputs,i=W(e,F0);if(r){t=[];var o,a=Ie(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:S1.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:w1.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return C1(e,t)})),i.source&&(n=(r=i.source).inputId,r=W(r,U0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new _1(i);if("decl"===i.type)return new y1(i);if("rule"===i.type)return new E1(i);if("comment"===i.type)return new b1(i);if("atrule"===i.type)return new k1(i);throw new Error("Unknown node type: "+e.type)}function R1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new f1(t)}e.stringify;var O1=Object.defineProperty,x1=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?O1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};Date.now().toString();var T1,M1={exports:{}};var I1,A1,P1,L1,D1,N1=(P1=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?P1:("function"==typeof(L1=P1["default"])?(D1=function P1(){return this instanceof P1?Reflect.construct(L1,arguments,this.constructor):L1.apply(this,arguments)}).prototype=L1.prototype:D1={},Object.defineProperty(D1,"__esModule",{value:!0}),Object.keys(P1).forEach(function(e){var t=Object.getOwnPropertyDescriptor(P1,e);Object.defineProperty(D1,e,t.get?t:{enumerable:!0,get:function(){return P1[e]}})}),D1);function F1(){var d,f,e,t,n;return A1||(A1=1,T1||(T1=1,t=String,M1.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),M1.exports.createColors=n),d=M1.exports,f=N1,n=Y(Error),j(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(I1=e)["default"]=e),I1;function s(e,t,n,r,i,o){var a;return b(this,s),(a=u(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var U1,j1,z1,B1,W1,H1,q1,V1,G1,J1,$1,Z1,K1,Y1,X1,Q1,ek,tk,nk,rk,ik,ok,ak,sk,uk,lk,ck,dk,fk,hk,pk,mk,gk,vk,yk,wk,bk,kk,Sk,_k,Ek,Ck,Rk,Ok,xk,Tk,Mk,Ik,Ak,Pk,Lk,Dk={};function Nk(){return U1||(U1=1,Dk.isClean=Symbol("isClean"),Dk.my=Symbol("my")),Dk}function Fk(){var a,t;return z1||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(z1=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(j1=t)["default"]=t),j1}function Uk(){var n;return W1||(W1=1,n=Fk(),(B1=e)["default"]=e),B1;function e(e,t){new n(t).stringify(e)}}function jk(){var o,a,s,i,n,r,e;return q1||(q1=1,a=(o=Nk()).isClean,s=o.my,i=F1(),n=Fk(),r=Uk(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Ie(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(H1=e)["default"]=e),H1}function zk(){var e;return G1||(G1=1,e=jk(),j(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(V1=e)["default"]=e),V1;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=u(this,t,[e])).type="decl",e}}function Bk(){var r,i,t,n,o,a,s;return K1||(K1=1,r=N1.SourceMapConsumer,i=N1.SourceMapGenerator,t=N1.existsSync,n=N1.readFileSync,o=N1.dirname,a=N1.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(Z1=s)["default"]=s),Z1}function Wk(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return X1||(X1=1,n=N1.SourceMapConsumer,t=N1.SourceMapGenerator,a=N1.fileURLToPath,u=N1.pathToFileURL,s=N1.isAbsolute,r=N1.resolve,i=($1?J1:($1=1,J1={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=N1,l=F1(),o=Bk(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(Y1=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),Y1}function Hk(){if(ek)return Q1;ek=1;var a=N1.SourceMapConsumer,t=N1.SourceMapGenerator,s=N1.dirname,n=N1.relative,r=N1.resolve,i=N1.sep,o=N1.pathToFileURL,u=Wk(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return Q1=k(function z(e,t,n,r){b(this,z),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Ie(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function qk(){var e;return nk||(nk=1,e=jk(),j(t,e),e=k(t),(tk=e)["default"]=e),tk;function t(e){return b(this,t),(e=u(this,t,[e])).type="comment",e}}function Vk(){var l,c,d,t,f,h,p,m,n,e;return ik||(ik=1,e=Nk(),f=e.isClean,h=e.my,p=zk(),m=qk(),e=jk(),j(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Ie(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ie(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Ie(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function q(e){return e.map(function(e){return e.nodes&&(e.nodes=q(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ie(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Ie(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Ie(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Ie(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Ie(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Ie(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((rk=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),rk;function g(){return b(this,g),u(this,g,arguments)}}function Gk(){var t,n,e;return ak||(ak=1,e=Vk(),j(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(ok=e)["default"]=e),ok;function r(e){return b(this,r),(e=u(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Jk(){if(uk)return sk;uk=1;var t={};return sk=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function $k(){var r;return ck||(ck=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(lk=r)["default"]=r),lk}function Zk(){var n,r;return fk||(fk=1,n=$k(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(dk=r)["default"]=r),dk}function Kk(){var e,t;return gk||(gk=1,e=Vk(),j(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"prepend",this,3)(t)}}]),(mk=t)["default"]=t,e.registerAtRule(t)),mk;function r(e){return b(this,r),(e=u(this,r,[e])).type="atrule",e}}function Yk(){var t,n,e,r;return yk||(yk=1,e=Vk(),j(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=$(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Ie(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),$(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},vk=r,e.registerRoot(r["default"]=r)),vk;function o(e){return b(this,o),(e=u(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Xk(){var t;return bk||(bk=1,(wk=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Ie(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),wk}function Qk(){var e,t,n;return Sk||(Sk=1,e=Vk(),t=Xk(),j(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(kk=n)["default"]=n,e.registerRule(n)),kk;function r(e){return b(this,r),(e=u(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function eS(){if(Ek)return _k;Ek=1;var p=zk(),e=function(){if(pk)return hk;pk=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),M="(".charCodeAt(0),I=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return hk=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case _:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===_||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case L:case I:var n=String.fromCharCode(r);d=[n,n,m];break;case M:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||z.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==R&&r!==O&&r!==C&&(i+=1,B.test(f.charAt(i)))){for(;B.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===S&&f.charCodeAt(m+1)===D?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=qk(),l=Kk(),t=Yk(),r=Qk(),f={empty:!0,space:!0};return _k=k(function F(e){b(this,F),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Ie(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function tS(){var e,n,r;return Rk||(Rk=1,e=Vk(),n=eS(),r=Wk(),Ck=t,e.registerParse(t["default"]=t)),Ck;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(D){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===D.name&&t&&t.from&&(/\.scss$/i.test(t.from)?D.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?D.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(D.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),D}return e.root}}function nS(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return xk||(xk=1,t=Nk(),d=t.isClean,a=t.my,n=Hk(),r=Uk(),u=Vk(),s=Gk(),i=Jk(),c=Zk(),l=tS(),e=Yk(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Ie(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=S(H().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ie(this.listeners.OnceExit),e.p=15,a=H().m(function f(){var t,n,r;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(V(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Ie(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ie(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Ie(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Ie(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},Ok=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),Ok;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function rS(){var n,r,t,e,i,o,a,s,u,l,c;return Ak||(Ak=1,Mk||(Mk=1,o=Hk(),a=Uk(),s=Jk(),u=tS(),l=Zk(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(Tk=c)["default"]=c),n=Tk,r=nS(),t=Gk(),e=Yk(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Ie(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(Ik=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),Ik}dO||(dO=1,ze=F1(),iS=zk(),nr=nS(),WE=Vk(),oS=rS(),xO=Uk(),vO||(vO=1,dS=zk(),fS=Bk(),hS=qk(),pS=Kk(),mS=Wk(),gS=Yk(),vS=Qk(),(Pk=yS)["default"]=yS),i=Pk,aS=Gk(),Ue=$k(),sS=qk(),uS=Kk(),Fd=Zk(),a=Wk(),Ov=tS(),t=Xk(),lS=Qk(),cS=Yk(),Fe=jk(),wS.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new oS).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return wS([i(n)]).process(e,t)},i},wS.stringify=xO,wS.parse=Ov,wS.fromJSON=i,wS.list=t,wS.comment=function(e){return new sS(e)},wS.atRule=function(e){return new uS(e)},wS.decl=function(e){return new iS(e)},wS.rule=function(e){return new lS(e)},wS.root=function(e){return new cS(e)},wS.document=function(e){return new aS(e)},wS.CssSyntaxError=ze,wS.Declaration=iS,wS.Container=WE,wS.Processor=oS,wS.Document=aS,wS.Comment=sS,wS.Warning=Ue,wS.AtRule=uS,wS.Result=Fd,wS.Input=a,wS.Rule=lS,wS.Root=cS,wS.Node=Fe,nr.registerPostcss(wS),(Lk=wS)["default"]=wS);var iS,oS,aS,sS,uS,lS,cS,dS,fS,hS,pS,mS,gS,vS,Hr=(we=Lk)&&we.__esModule&&Object.prototype.hasOwnProperty.call(we,"default")?we["default"]:we;function yS(e,t){if(Array.isArray(e))return e.map(function(e){return yS(e)});var n,r=e.inputs,i=W(e,j0);if(r){t=[];var o,a=Ie(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:mS.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:fS.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return yS(e,t)})),i.source&&(n=(r=i.source).inputId,r=W(r,z0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new gS(i);if("decl"===i.type)return new dS(i);if("rule"===i.type)return new vS(i);if("comment"===i.type)return new hS(i);if("atrule"===i.type)return new pS(i);throw new Error("Unknown node type: "+e.type)}function wS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new oS(t)}Hr.stringify;var bS=k(CS,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(e){if(e instanceof CS&&e.ownerDocument===this.ownerDocument){if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),kS={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},SS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_S={},ES={};function CS(){b(this,CS),x1(this,"parentElement",null),x1(this,"parentNode",null),x1(this,"ownerDocument"),x1(this,"firstChild",null),x1(this,"lastChild",null),x1(this,"previousSibling",null),x1(this,"nextSibling",null),x1(this,"ELEMENT_NODE",1),x1(this,"TEXT_NODE",3),x1(this,"nodeType"),x1(this,"nodeName"),x1(this,"RRNodeType")}function RS(e){if(_S[e])return _S[e];var t=globalThis[e],n=t.prototype,r=e in kS?kS[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in SS?SS[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return _S[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),ES[e]=function(){return s.remove()}):s.remove(),_S[e]=o):(s.remove(),n):t.prototype}catch(U){return n}}var OS={};function xS(e,t,n){var r="".concat(e,".").concat(String(n));return OS[r]?OS[r].call(t):(e=RS(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(OS[r]=e).call(t):t[n])}var TS={};function MS(e,t,n){var r="".concat(e,".").concat(String(n));return TS[r]?TS[r].bind(t):"function"!=typeof(e=RS(e)[n])?t[n]:(TS[r]=e).bind(t)}function IS(){var e;return[RS("MutationObserver").constructor,null!=(e=ES.MutationObserver)?e:function(){}]}var AS=Date.now;function PS(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}var LS={ownerDocument:function(e){return xS("Node",e,"ownerDocument")},childNodes:function(e){return xS("Node",e,"childNodes")},parentNode:function(e){return xS("Node",e,"parentNode")},parentElement:function(e){return xS("Node",e,"parentElement")},textContent:function(e){return xS("Node",e,"textContent")},contains:function(e,t){return MS("Node",e,"contains")(t)},getRootNode:function(e){return MS("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?xS("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?xS("Element",e,"shadowRoot"):null},querySelector:function(e,t){return xS("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return xS("Element",e,"querySelectorAll")(t)},nowTimestamp:AS=/[1-9][0-9]{12}/.test(Date.now().toString())?AS:function(){return(new Date).getTime()},mutationObserverCtor:IS,patch:PS};function DS(e,t,n){var r=2<arguments.length&&n!==undefined?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var NS="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",lt={map:{},getId:function(){return console.error(NS),-1},getNode:function(){return console.error(NS),null},removeNodeFromMap:function(){console.error(NS)},has:function(){return console.error(NS),!1},reset:function(){console.error(NS)}};function FS(a,s,e){var u=2<arguments.length&&e!==undefined?e:{},l=null,c=0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Date.now(),i=(c||!1!==u.leading||(c=r),s-(r-c)),o=this;i<=0||s<i?(l&&(clearTimeout(l),l=null),c=r,a.apply(o,t)):l||!1===u.trailing||(l=setTimeout(function(){c=!1===u.leading?0:Date.now(),l=null,a.apply(o,t)},i))}}function US(e,t,n,r,i){var i=4<arguments.length&&i!==undefined?i:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return US(e,t,o||{},!0)}}function jS(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=LS.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=LS.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function zS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function BS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function WS(e){return e?e.nodeType===e.ELEMENT_NODE?e:LS.parentElement(e):null}function HS(e,t,n,r){if(e){e=WS(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(Mw(e,t,r))return 1}catch(Le){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function qS(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function VS(e){return Boolean(e.changedTouches)}function GS(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function JS(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function $S(e){return e&&(e instanceof bS&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(LS.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(lt,{get:function(e,t,n){return"map"===t&&console.error(NS),Reflect.get(e,t,n)}});var ZS=k(function y(){b(this,y),m(this,"id",1),m(this,"styleIDMap",new WeakMap),m(this,"idStyleMap",new Map)},[{key:"getId",value:function(e){return null!=(e=this.styleIDMap.get(e))?e:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]);function KS(e){var t,n=null;return n="getRootNode"in e&&(null==(t=LS.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&LS.host(LS.getRootNode(e))?LS.host(LS.getRootNode(e)):n}function YS(e){var n,t=LS.ownerDocument(e);return t&&(LS.contains(t,e)||(n=e,!!(t=LS.ownerDocument(n))&&(e=function(){for(var e,t=n;e=KS(t);)t=e;return t}(),LS.contains(t,e))))}(r={})[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r[r.Asset=7]="Asset";var XS=r,QS=((l=QS||{})[l.Mutation=0]="Mutation",l[l.MouseMove=1]="MouseMove",l[l.MouseInteraction=2]="MouseInteraction",l[l.Scroll=3]="Scroll",l[l.ViewportResize=4]="ViewportResize",l[l.Input=5]="Input",l[l.TouchMove=6]="TouchMove",l[l.MediaInteraction=7]="MediaInteraction",l[l.StyleSheetRule=8]="StyleSheetRule",l[l.CanvasMutation=9]="CanvasMutation",l[l.Font=10]="Font",l[l.Log=11]="Log",l[l.Drag=12]="Drag",l[l.StyleDeclaration=13]="StyleDeclaration",l[l.Selection=14]="Selection",l[l.AdoptedStyleSheet=15]="AdoptedStyleSheet",l[l.CustomElement=16]="CustomElement",l),e_=((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),t_=((dO=t_||{})[dO.Mouse=0]="Mouse",dO[dO.Pen=1]="Pen",dO[dO.Touch=2]="Touch",dO),n_=((vO={})[vO["2D"]=0]="2D",vO[vO.WebGL=1]="WebGL",vO[vO.WebGL2=2]="WebGL2",vO),r_=((xO=r_||{})[xO.Play=0]="Play",xO[xO.Pause=1]="Pause",xO[xO.Seeked=2]="Seeked",xO[xO.VolumeChange=3]="VolumeChange",xO[xO.RateChange=4]="RateChange",xO),i_=((Ov={})[Ov.Document=0]="Document",Ov[Ov.DocumentType=1]="DocumentType",Ov[Ov.Element=2]="Element",Ov[Ov.Text=3]="Text",Ov[Ov.CDATA=4]="CDATA",Ov[Ov.Comment=5]="Comment",Ov);function o_(e){return"__ln"in e}var a_,s_=k(function y(){b(this,y),m(this,"length",0),m(this,"head",null),m(this,"tail",null)},[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&o_(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&o_(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),u_=function(e,t){return"".concat(e,"@").concat(t)},l_=k(function y(){var w=this;b(this,y),m(this,"frozen",!1),m(this,"locked",!1),m(this,"texts",[]),m(this,"attributes",[]),m(this,"attributeMap",new WeakMap),m(this,"removes",[]),m(this,"mapRemoves",[]),m(this,"movedMap",{}),m(this,"addedSet",new Set),m(this,"movedSet",new Set),m(this,"droppedSet",new Set),m(this,"removesSubTreeCache",new Set),m(this,"mutationCb"),m(this,"blockClass"),m(this,"blockSelector"),m(this,"maskTextClass"),m(this,"maskTextSelector"),m(this,"inlineStylesheet"),m(this,"maskInputOptions"),m(this,"maskTextFn"),m(this,"maskInputFn"),m(this,"keepIframeSrcFn"),m(this,"recordCanvas"),m(this,"inlineImages"),m(this,"slimDOMOptions"),m(this,"dataURLOptions"),m(this,"doc"),m(this,"mirror"),m(this,"iframeManager"),m(this,"stylesheetManager"),m(this,"shadowDomManager"),m(this,"canvasManager"),m(this,"processedNodeManager"),m(this,"unattachedDoc"),m(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),m(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,a=new s_,s=function(e){for(var t=e,n=-2;-2===n;)n=(t=t&&t.nextSibling)&&w.mirror.getId(t);return n},e=function(t){var e=LS.parentNode(t);if(e&&YS(t)){var n=!1;if(t.nodeType===Node.TEXT_NODE){var r=e.tagName;if("TEXTAREA"===r)return;"STYLE"===r&&w.addedSet.has(e)&&(n=!0)}r=rw(e)?w.mirror.getId(KS(t)):w.mirror.getId(e),e=s(t);if(-1===r||-1===e)return a.addNode(t);n=Dw(t,{doc:w.doc,mirror:w.mirror,blockClass:w.blockClass,blockSelector:w.blockSelector,maskTextClass:w.maskTextClass,maskTextSelector:w.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:w.inlineStylesheet,maskInputOptions:w.maskInputOptions,maskTextFn:w.maskTextFn,maskInputFn:w.maskInputFn,slimDOMOptions:w.slimDOMOptions,dataURLOptions:w.dataURLOptions,recordCanvas:w.recordCanvas,inlineImages:w.inlineImages,onSerialize:function(e){GS(e,w.mirror)&&w.iframeManager.addIframe(e),JS(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),$S(t)&&w.shadowDomManager.addShadowRoot(LS.shadowRoot(t),w.doc)},onIframeLoad:function(e,t){w.iframeManager.attachIframe(e,t),w.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,t){w.stylesheetManager.attachLinkElement(e,t)},cssCaptured:n});n&&(i.push({parentId:r,nextId:e,node:n}),o.add(n.id))}};w.mapRemoves.length;)w.mirror.removeNodeFromMap(w.mapRemoves.shift());var t,n=Ie(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;d_(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(LS.parentNode(r))||e(r)}}catch(Pe){n.e(Pe)}finally{n.f()}var u,l=Ie(w.addedSet);try{for(l.s();!(u=l.n()).done;){var c=u.value;!f_(w.droppedSet,c)&&!d_(w.removesSubTreeCache,c,w.mirror)||f_(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(var d=null;a.length;){var f,h,p=null;if(!(p=d&&(f=w.mirror.getId(LS.parentNode(d.value)),h=s(d.value),-1!==f)&&-1!==h?d:p))for(var m=a.tail;m;){var g=m,m=m.previous;if(g){var v=w.mirror.getId(LS.parentNode(g.value));if(-1!==s(g.value)){if(-1!==v){p=g;break}v=g.value,v=LS.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=LS.host(v);if(-1!==w.mirror.getId(v)){p=g;break}}}}}if(!p){for(;a.head;)a.removeNode(a.head.value);break}d=p.previous,a.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=LS.parentNode(t);return n&&"TEXTAREA"===n.tagName&&w.genTextAreaValueMutation(n),{id:w.mirror.getId(t),value:e.value}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),attributes:w.attributes.map(function(e){var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:w.mirror.getId(e.node),attributes:r}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),removes:w.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(w.texts=[],w.attributes=[],w.attributeMap=new WeakMap,w.removes=[],w.addedSet=new Set,w.movedSet=new Set,w.droppedSet=new Set,w.removesSubTreeCache=new Set,w.movedMap={},w.mutationCb(y))}}),m(this,"genTextAreaValueMutation",function(e){var t=w.attributeMap.get(e),n=(t||(w.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),w.attributeMap.set(e,t)),Array.from(LS.childNodes(e),function(e){return LS.textContent(e)||""}).join(""));t.attributes.value=uw({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:cw(e),value:n,maskInputFn:w.maskInputFn})}),m(this,"processMutation",function(a){if(!qS(a.target,w.mirror,w.slimDOMOptions))switch(a.type){case"characterData":var e=LS.textContent(a.target);HS(a.target,w.blockClass,w.blockSelector,!1)||e===a.oldValue||w.texts.push({value:Iw(a.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,WS(a.target)):e.replace(/[\S]/g,"*"):e,node:a.target});break;case"attributes":var t,n=a.target,e=a.attributeName,s=a.target.getAttribute(e);if("value"===e&&(t=cw(n),s=uw({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:s,maskInputFn:w.maskInputFn})),!HS(a.target,w.blockClass,w.blockSelector,!1)&&s!==a.oldValue){var r=w.attributeMap.get(a.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(s)){if(n.contentDocument)return;e="rr_src"}if(r||(r={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(r),w.attributeMap.set(a.target,r)),"type"===e&&"INPUT"===n.tagName&&"password"===(a.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Tw(n.tagName,e))if(r.attributes[e]=xw(w.doc,lw(n.tagName),lw(e),s),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(H){w.unattachedDoc=w.doc}var i=w.unattachedDoc.createElement("span");a.oldValue&&i.setAttribute("style",a.oldValue);for(var o=0,u=Array.from(n.style);o<u.length;o++){var l=u[o],c=n.style.getPropertyValue(l),d=n.style.getPropertyPriority(l);c!==i.style.getPropertyValue(l)||d!==i.style.getPropertyPriority(l)?r.styleDiff[l]=""===d?c:[c,d]:r._unchangedStyles[l]=[c,d]}for(var f=0,h=Array.from(i.style);f<h.length;f++){var p=h[f];""===n.style.getPropertyValue(p)&&(r.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break;case"childList":return HS(a.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===a.target.tagName?void w.genTextAreaValueMutation(a.target):(a.addedNodes.forEach(function(e){return w.genAdds(e,a.target)}),void a.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=rw(a.target)?w.mirror.getId(LS.host(a.target)):w.mirror.getId(a.target);if(!HS(a.target,w.blockClass,w.blockSelector,!1)&&!qS(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))c_(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(a.target)&&-1===t||function s(e,t){var n;return!rw(e)&&(n=t.getId(e),!t.has(n)||(!(n=LS.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||s(n,t)))}(a.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[u_(t,n)])c_(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!rw(a.target)||!iw(a.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),LS.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),m(this,"genAdds",function(t,e){if(!w.processedNodeManager.inOtherBuffer(t,w)&&!w.addedSet.has(t)&&!w.movedSet.has(t)){if(w.mirror.hasNode(t)){if(qS(t,w.mirror,w.slimDOMOptions))return;w.movedSet.add(t);var n=null;(n=e&&w.mirror.hasNode(e)?w.mirror.getId(e):n)&&-1!==n&&(w.movedMap[u_(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet["delete"](t);HS(t,w.blockClass,w.blockSelector,!1)||(LS.childNodes(t).forEach(function(e){return w.genAdds(e)}),$S(t)&&LS.childNodes(LS.shadowRoot(t)).forEach(function(e){w.processedNodeManager.add(e,w),w.genAdds(e,t)}))}})},[{key:"init",value:function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(e){n[e]=t[e]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]);function c_(t,e){t["delete"](e),LS.childNodes(e).forEach(function(e){return c_(t,e)})}function d_(e,t){return 0!==e.size&&(e=e,t=LS.parentNode(t))&&e.has(t)}function f_(e,t){return 0!==e.size&&function S(e,t){t=LS.parentNode(t);return!!t&&(!!e.has(t)||S(e,t))}(e,t)}var h_=function(e){return a_?function(){try{return e.apply(void 0,arguments)}catch(X){if(!a_||!0!==a_(X))throw X}}:e},p_=[];function m_(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(S){}return e&&e.target}function g_(e,t){var n=new l_,e=(p_.push(n),n.init(e),De(IS(),2)),r=e[0],e=e[1],n=new r(h_(n.processMutations.bind(n)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[n,e]}function v_(e){var t,r,a,s=e.mouseInteractionCb,i=e.doc,u=e.mirror,l=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],a=null,Object.keys(e_).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){var o,t=lw(e),n=(o=e,function(e){var t=m_(e);if(!HS(t,l,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=t_.Mouse;break;case"touch":n=t_.Touch;break;case"pen":n=t_.Pen}n===t_.Touch?e_[o]===e_.MouseDown?r="TouchStart":e_[o]===e_.MouseUp&&(r="TouchEnd"):t_.Pen}else VS(e)&&(n=t_.Touch);null!==n?(a=n,(r.startsWith("Touch")&&n===t_.Touch||r.startsWith("Mouse")&&n===t_.Mouse)&&(n=null)):e_[o]===e_.Click&&(n=a,a=null);var i,e=VS(e)?e.changedTouches[0]:e;e&&(t=u.getId(t),i=e.clientX,e=e.clientY,h_(s)(Ae({type:e_[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}});if(window.PointerEvent)switch(e_[e]){case e_.MouseDown:case e_.MouseUp:t=t.replace("mouse","pointer");break;case e_.TouchStart:case e_.TouchEnd:return}r.push(DS(t,n,i))}),h_(function(){r.forEach(function(e){return e()})}))}function y_(e){var r=e.scrollCb,i=e.doc,o=e.mirror,a=e.blockClass,s=e.blockSelector,e=e.sampling;return DS("scroll",h_(FS(h_(function(e){var t,n,e=m_(e);e&&!HS(e,a,s,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=jS(i.defaultView),r({id:t,x:n.left,y:n.top})):r({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),i)}var w_=["INPUT","TEXTAREA","SELECT"],b_=new WeakMap;function k_(e){return function w(e,t){var n;return C_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||C_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||C_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||C_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n),w(e.parentRule,t)):(e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t)}(e,[])}function S_(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function __(e,t){var n,r=e.mirror,i=e.stylesheetManager,o="#document"===t.nodeName?r.getId(t):r.getId(LS.host(t)),e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(r=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:r.ShadowRoot,a=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&e&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:function(){var e;return null==(e=a.get)?void 0:e.call(this)},set:function(e){var t=null==(t=a.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{i.adoptStyleSheets(e,o)}catch(n){}return t}}),h_(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):function(){}}function E_(e){var t,n,D,N,F,U,j,z,B,W,H,q,V,G,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};t=r,n=(r=e).mutationCb,D=r.mousemoveCb,N=r.mouseInteractionCb,F=r.scrollCb,U=r.viewportResizeCb,j=r.inputCb,z=r.mediaInteractionCb,B=r.styleSheetRuleCb,W=r.styleDeclarationCb,H=r.canvasMutationCb,q=r.fontCb,V=r.selectionCb,G=r.customElementCb,r.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},r.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),D.apply(void 0,arguments)},r.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),N.apply(void 0,arguments)},r.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),F.apply(void 0,arguments)},r.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),U.apply(void 0,arguments)},r.inputCb=function(){t.input&&t.input.apply(t,arguments),j.apply(void 0,arguments)},r.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),z.apply(void 0,arguments)},r.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),B.apply(void 0,arguments)},r.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),W.apply(void 0,arguments)},r.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),H.apply(void 0,arguments)},r.fontCb=function(){t.font&&t.font.apply(t,arguments),q.apply(void 0,arguments)},r.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),V.apply(void 0,arguments)},r.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),G.apply(void 0,arguments)};var o,J,$,Z,K,Y,X,Q,a,ee,te,ne,re,s,u,ie,l,c,d,oe,f,h,p,m,ae,se,ue,le,g,v,y,ce,w,b,k,S,_,E,C,R,de=function(){},fe=(e.recordDOM&&(r=De(g_(e,e.doc),2),o=r[0],de=r[1]),ue=(r=e).mousemoveCb,x=r.doc,le=r.mirror,!1===(O=r.sampling).mousemove?function(){}:(r="number"==typeof O.mousemove?O.mousemove:50,O="number"==typeof O.mousemoveCallback?O.mousemoveCallback:500,m=[],ae=FS(h_(function(e){var t=Date.now()-p;ue(m.map(function(e){return e.timeOffset-=t,e}),e),m=[],p=null}),O),O=h_(FS(h_(function(e){var t=m_(e),n=VS(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;p=p||AS(),m.push({x:r,y:n,id:le.getId(t),timeOffset:AS()-p}),ae("undefined"!=typeof DragEvent&&e instanceof DragEvent?QS.Drag:e instanceof MouseEvent?QS.MouseMove:QS.TouchMove)}),r,{trailing:!1})),se=[DS("mousemove",O,x),DS("touchmove",O,x),DS("drag",O,x)],h_(function(){se.forEach(function(e){return e()})}))),he=v_(e),pe=y_(e),me=(r={win:i},oe=(O=e).viewportResizeCb,O=r.win,h=f=-1,DS("resize",h_(FS(h_(function(){var e=zS(),t=BS();f===e&&h===t||(oe({width:Number(t),height:Number(e)}),f=e,h=t)}),200)),O)),ge=(Q=(x=e).inputCb,a=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,s=x.ignoreSelector,u=x.maskInputOptions,ie=x.maskInputFn,l=x.userTriggeredOnInput,c=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return DS(e,h_(Se),a)}),(d=a.defaultView)?(x=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),r=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]],x&&x.set&&c.push.apply(c,Ne(r.map(function(e){return US(e[0],e[1],{set:function(){h_(Se)({target:this,isTrusted:!1})}},!1,d)}))),h_(function(){c.forEach(function(e){return e()})})):function(){c.forEach(function(e){return e()})}),ve=(J=(O=e).mediaInteractionCb,$=O.blockClass,Z=O.blockSelector,K=O.mirror,Y=O.sampling,O=O.doc,x=h_(function(a){return FS(h_(function(e){var t,n,r,i,o,e=m_(e);e&&!HS(e,$,Z,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,J({type:a,id:K.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),Y.media||500)}),X=[DS("play",x(r_.Play),O),DS("pause",x(r_.Pause),O),DS("seeked",x(r_.Seeked),O),DS("volumechange",x(r_.VolumeChange),O),DS("ratechange",x(r_.RateChange),O)],h_(function(){X.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function Se(e){var t,n,r,i=m_(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?LS.parentElement(i):i)||!o||w_.indexOf(o)<0||HS(i,te,ne,!0)||i.classList.contains(re)||s&&i.matches(s)||(t=i.value,n=!1,"radio"===(r=cw(i)||"")||"checkbox"===r?n=i.checked:(u[o.toLowerCase()]||u[r])&&(t=uw({element:i,maskInputOptions:u,tagName:o,type:r,value:t,maskInputFn:ie})),_e(i,l?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&a.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,_e(e,l?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function _e(e,t){var n=b_.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(b_.set(e,t),n=ee.getId(e),h_(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=function(e,t){var s=e.styleSheetRuleCb,u=e.mirror,l=e.stylesheetManager,r=t.win;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return function(){};var n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:h_(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=S_(t,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,a=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:h_(function(e,t,n){var r=De(n,1)[0],i=S_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:h_(function(e,t,n){var r=De(n,1)[0],i=S_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:h_(function(e,t,n){var r=De(n,1)[0],i=S_(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),d=(R_("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(R_("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),R_("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),R_("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];d[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(d[t].insertRule,{apply:h_(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=S_(t.parentStyleSheet,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:[].concat(Ne(k_(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:h_(function(e,t,n){var r=De(n,1)[0],i=S_(t.parentStyleSheet,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:[].concat(Ne(k_(t)),[r])}]}),e.apply(t,n)})})}),h_(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];e.prototype.insertRule=d[t].insertRule,e.prototype.deleteRule=d[t].deleteRule})})}(e,{win:i}),we=__(e,e.doc),r={win:i},b=(x=e).styleDeclarationCb,k=x.mirror,S=x.ignoreCSSAttributes,_=x.stylesheetManager,E=r.win,C=E.CSSStyleDeclaration.prototype.setProperty,E.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:h_(function(e,t,n){var r,i,o=De(n,3),a=o[0],s=o[1],o=o[2];return S.has(a)?C.apply(t,[a,s,o]):(r=(i=S_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,set:{property:a,value:s,priority:o},index:k_(t.parentRule)}),e.apply(t,n))})}),R=E.CSSStyleDeclaration.prototype.removeProperty,E.CSSStyleDeclaration.prototype.removeProperty=new Proxy(R,{apply:h_(function(e,t,n){var r,i,o=De(n,1)[0];return S.has(o)?R.apply(t,[o]):(r=(i=S_(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,remove:{property:o},index:k_(t.parentRule)}),e.apply(t,n))})}),be=h_(function(){E.CSSStyleDeclaration.prototype.setProperty=C,E.CSSStyleDeclaration.prototype.removeProperty=R}),e.collectFonts)&&(ce=(O=e).fontCb,w=(O=O.doc).defaultView,ke=w?(g=[],v=new WeakMap,y=w.FontFace,w.FontFace=function(e,t,n){var r=new y(e,t,n);return v.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},O=PS(O.fonts,"add",function(e){return function(t){return setTimeout(h_(function(){var e=v.get(t);e&&(ce(e),v["delete"](t))}),0),e.apply(this,[t])}}),g.push(function(){w.FontFace=y}),g.push(O),h_(function(){g.forEach(function(e){return e()})})):function(){});Re=(x=e).doc,T=x.mirror,M=x.blockClass,I=x.blockSelector,Oe=x.selectionCb,A=!0,(x=h_(function(){var e=Re.getSelection();if(!(!e||A&&null!=e&&e.isCollapsed)){A=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,a=i.startOffset,s=i.endContainer,i=i.endOffset;HS(o,M,I,!0)||HS(s,M,I,!0)||t.push({start:T.getId(o),startOffset:a,end:T.getId(s),endOffset:i})}Oe({ranges:t})}}))();var Ee,O,Ce,x,Re,T,M,I,Oe,A,xe=DS("selectionchange",x),Te=(O=(r=e).doc,Ce=r.customElementCb,(r=O.defaultView)&&r.customElements?PS(r.customElements,"define",function(r){return function(e,t,n){try{Ce({define:{name:e}})}catch(Le){console.warn("Custom element callback failed for ".concat(e))}return r.apply(this,[e,t,n])}}):function(){}),Me=[],P=Ie(e.plugins);try{for(P.s();!(Ee=P.n()).done;){var L=Ee.value;Me.push(L.observer(L.callback,i,L.options))}}catch(Pe){P.e(Pe)}finally{P.f()}return h_(function(){p_.forEach(function(e){return e.reset()}),null!=o&&o.disconnect(),de(),fe(),he(),pe(),me(),ge(),ve(),ye(),we(),be(),ke(),xe(),Te(),Me.forEach(function(e){return e()})})}function C_(e){return"undefined"!=typeof window[e]}function R_(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var O_=k(function y(e){b(this,y),m(this,"iframeIdToRemoteIdMap",new WeakMap),m(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e},[{key:"getId",value:function(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e),e=n.get(t);return e||(e=this.generateIdFn(),n.set(t,e),r.set(e,t)),e}},{key:"getIds",value:function(t,e){var n=this,r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getId(t,e,r,i)})}},{key:"getRemoteId",value:function(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}},{key:"getRemoteIds",value:function(t,e){var n=this,r=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getRemoteId(t,e,r)})}},{key:"reset",value:function(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),x_=k(function y(e){b(this,y),m(this,"iframes",new WeakMap),m(this,"crossOriginIframeMap",new WeakMap),m(this,"crossOriginIframeMirror",new O_(Sw)),m(this,"crossOriginIframeStyleMirror"),m(this,"crossOriginIframeRootIdMap",new WeakMap),m(this,"mirror"),m(this,"mutationCb"),m(this,"wrappedEmit"),m(this,"loadListener"),m(this,"stylesheetManager"),m(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new O_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))},[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=this.crossOriginIframeMap.get(e.source))&&(e=this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}},{key:"transformCrossOriginEvent",value:function(n,e){var t,r=this;switch(e.type){case XS.FullSnapshot:this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:XS.IncrementalSnapshot,data:{source:QS.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case XS.Meta:case XS.Load:case XS.DomContentLoaded:return!1;case XS.Plugin:return e;case XS.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case XS.IncrementalSnapshot:switch(e.data.source){case QS.Mutation:return e.data.adds.forEach(function(e){r.replaceIds(e,n,["parentId","nextId","previousId"]),r.replaceIdOnNode(e.node,n);var t=r.crossOriginIframeRootIdMap.get(n);t&&r.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(function(e){r.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(function(e){r.replaceIds(e,n,["id"])}),e.data.texts.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case QS.Drag:case QS.TouchMove:case QS.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case QS.ViewportResize:return!1;case QS.MediaInteraction:case QS.MouseInteraction:case QS.Scroll:case QS.CanvasMutation:case QS.Input:return this.replaceIds(e.data,n,["id"]),e;case QS.StyleSheetRule:case QS.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case QS.Font:return e;case QS.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case QS.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(function(e){r.replaceStyleIds(e,n,["styleId"])}),e}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=Ie(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(Pe){o.e(Pe)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===i_.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),T_=k(function y(e){b(this,y),m(this,"shadowDoms",new WeakSet),m(this,"mutationCb"),m(this,"scrollCb"),m(this,"bypassOptions"),m(this,"mirror"),m(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;iw(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=De(g_(Ae(Ae({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),1)[0],this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(y_(Ae(Ae({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(LS.host(e))),r.restoreHandlers.push(__({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0))}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,r){var i=this;this.restoreHandlers.push(PS(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=LS.shadowRoot(this);return t&&YS(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(w){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),M_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I_="undefined"==typeof Uint8Array?[]:new Uint8Array(256),A_=0;A_<M_.length;A_++)I_[M_.charCodeAt(A_)]=A_;var P_=new Map,L_=function(e,t,n){var r;if(e&&(N_(e,t)||"object"===T(e)))return t=n,n=e.constructor.name,(r=P_.get(t))||(r=new Map,P_.set(t,r)),r.has(n)||r.set(n,[]),-1===(n=(t=r.get(n)).indexOf(e))&&(n=t.length,t.push(e)),n};var D_=function(e,t,n){return e.map(function(e){return function r(i,t,n){return i instanceof Array?i.map(function(e){return r(e,t,n)}):null===i?i:i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray?{rr_type:i.constructor.name,args:[Object.values(i)]}:i instanceof ArrayBuffer?{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=M_[e[r]>>2])+M_[(3&e[r])<<4|e[r+1]>>4])+M_[(15&e[r+1])<<2|e[r+2]>>6])+M_[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()}:i instanceof DataView?{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]}:i instanceof HTMLImageElement?{rr_type:i.constructor.name,src:i.src}:i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:N_(i,t)||"object"===T(i)?{rr_type:i.constructor.name,index:L_(i,t,n)}:i}(e,t,n)})},N_=function(t,n){var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof n[e]});return Boolean(e.find(function(e){return t instanceof n[e]}))};function F_(e,a,s,u){var t=[];try{var n=PS(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return HS(this,a,s,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),u&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===T(r[0])?(t=r[0]).preserveDrawingBuffer||(t.preserveDrawingBuffer=!0):r.splice(0,1,{preserveDrawingBuffer:!0}))),o.apply(this,[e].concat(r))}});t.push(n)}catch(D){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function U_(t,s,u,l,c,d){var n,r=[],e=Ie(Object.getOwnPropertyNames(t));try{for(e.s();!(n=e.n()).done;)!function(){var a=n.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return;try{if("function"!=typeof t[a])return;var e=PS(t,a,function(o){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=o.apply(this,t);return L_(i,d,this),"tagName"in this.canvas&&!HS(this.canvas,l,c,!0)&&(r=D_(t,d,this),u(this.canvas,{type:s,property:a,args:r})),i}});r.push(e)}catch(U){e=US(t,a,{set:function(e){u(this.canvas,{type:s,property:a,args:[e],setter:!0})}});r.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return r}var j_='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',z_="undefined"!=typeof self&&self.Blob&&new Blob([j_],{type:"text/javascript;charset=utf-8"});function B_(e){var t,n;try{if(t=z_&&(self.URL||self.webkitURL).createObjectURL(z_))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(u){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(j_),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var W_,H_,q_,V_=k(function y(e){var n=this,t=(b(this,y),m(this,"pendingCanvasMutations",new Map),m(this,"rafStamps",{latestId:0,invokeId:null}),m(this,"mirror"),m(this,"mutationCb"),m(this,"resetObservers"),m(this,"frozen",!1),m(this,"locked",!1),m(this,"processMutation",function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)}),e.sampling),t=void 0===t?"all":t,r=e.win,i=e.blockClass,o=e.blockSelector,a=e.recordCanvas,s=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,i,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:s})},[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,o,r,i,a){var s=this,t=F_(o,r,i,!0),u=new Map,l=new B_;l.onmessage=function(e){var t,n=e.data.id;u.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,s.mutationCb({id:n,type:n_["2D"],commands:[{property:"clearRect",args:[0,0,e.width,e.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e.type}]},0,0]}]}))};var c=1e3/e,d=0,f=function(e){var t,n;h=(d&&e-d<c||(d=e,t=[],o.document.querySelectorAll("canvas").forEach(function(e){HS(e,r,i,!0)||t.push(e)}),t.forEach((n=S(H().m(function o(t){var n,r,i;return H().w(function(e){for(;;)switch(e.n){case 0:if(n=s.mirror.getId(t),u.get(n))return e.a(2);e.n=1;break;case 1:if(0===t.width||0===t.height)return e.a(2);e.n=2;break;case 2:return u.set(n,!0),["webgl","webgl2"].includes(t.__context)&&(r=t.getContext(t.__context),!1===(null==(i=null==r?void 0:r.getContextAttributes())?void 0:i.preserveDrawingBuffer))&&r.clear(r.COLOR_BUFFER_BIT),e.n=3,createImageBitmap(t);case 3:i=e.v,l.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:a.dataURLOptions},[i]);case 4:return e.a(2)}},o)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(f))},h=requestAnimationFrame(f);this.resetObservers=function(){t(),cancelAnimationFrame(h)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=F_(e,t,n,!1),a=function(a,s,u,l){var t,n=[],e=Ie(Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype));try{for(e.s();!(t=e.n()).done;)!function(){var o=t.value;try{if("function"!=typeof s.CanvasRenderingContext2D.prototype[o])return;var e=PS(s.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return HS(this.canvas,u,l,!0)||setTimeout(function(){var e=D_(n,s,t);a(t.canvas,{type:n_["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(e)}catch(N){e=US(s.CanvasRenderingContext2D.prototype,o,{set:function(e){a(this.canvas,{type:n_["2D"],property:o,args:[e],setter:!0})}});n.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return function(){n.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),s=(r=this.processMutation.bind(this),t=t,n=n,i=[],"undefined"!=typeof(e=e).WebGLRenderingContext&&i.push.apply(i,Ne(U_(e.WebGLRenderingContext.prototype,n_.WebGL,r,t,n,e))),"undefined"!=typeof e.WebGL2RenderingContext&&i.push.apply(i,Ne(U_(e.WebGL2RenderingContext.prototype,n_.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),a(),s()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var t=this,n=function(e){t.rafStamps.latestId=e,requestAnimationFrame(n)};requestAnimationFrame(n)}},{key:"flushPendingCanvasMutations",value:function(){var r=this;this.pendingCanvasMutations.forEach(function(e,t){var n=r.mirror.getId(t);r.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(function(){return r.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(function(e){return e.type,W(e,B0)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}]),G_=k(function y(e){b(this,y),m(this,"trackedLinkElements",new WeakSet),m(this,"mutationCb"),m(this,"adoptedStyleSheetCb"),m(this,"styleMirror",new ZS),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb},[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){var r=this;if(0!==e.length){var i,o={id:t,styleIds:[]},a=[],n=Ie(e);try{for(n.s();!(i=n.n()).done;)!function(){var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),a.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:aw(e,n.href),index:t}})})),o.styleIds.push(e)}()}catch(Pe){n.e(Pe)}finally{n.f()}0<a.length&&(o.styles=a),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),J_=k(function y(){b(this,y),m(this,"nodeMap",new WeakMap),m(this,"active",!1)},[{key:"inOtherBuffer",value:function(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),$_=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(WO=document.createElement("iframe"),document.body.appendChild(WO),Array.from=(null==(N0=WO.contentWindow)?void 0:N0.Array.from)||Array.from,document.body.removeChild(WO))}catch(Pe){console.debug("Unable to override Array.from",Pe)}var Z_,K_=new sw;function Y_(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,u=void 0===t?"rr-block":t,t=e.blockSelector,l=void 0===t?null:t,t=e.ignoreClass,D=void 0===t?"rr-ignore":t,t=e.ignoreSelector,N=void 0===t?null:t,t=e.maskTextClass,c=void 0===t?"rr-mask":t,t=e.maskTextSelector,d=void 0===t?null:t,t=e.inlineStylesheet,f=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,h=e.maskInputFn,p=e.maskTextFn,U=e.hooks,j=e.packFn,a=e.sampling,s=void 0===a?{}:a,a=e.dataURLOptions,m=void 0===a?{}:a,a=e.mousemoveWait,g=e.recordDOM,z=void 0===g||g,g=e.recordCanvas,v=void 0!==g&&g,g=e.recordCrossOriginIframes,g=void 0!==g&&g,y=e.recordAfter,B=void 0===y?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":y,y=e.userTriggeredOnInput,W=void 0!==y&&y,y=e.collectFonts,H=void 0!==y&&y,y=e.inlineImages,w=void 0!==y&&y,b=e.plugins,y=e.keepIframeSrcFn,k=void 0===y?function(){return!1}:y,y=e.ignoreCSSAttributes,q=void 0===y?new Set([]):y,S=(a_=e.errorHandler,!g||window.parent===window),_=!1;if(!S)try{window.parent.document&&(_=!1)}catch(xe){_=!0}if(S&&!r)throw new Error("emit function is required");if(!S&&!_)return function(){};void 0!==a&&void 0===s.mousemove&&(s.mousemove=a),K_.reset();var V,E=!0===t?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==n?n:{password:!0},C=Lw(F),R=(!function(e){"NodeList"in(e=0<arguments.length&&e!==undefined?e:window)&&!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)}(),0),G=function(e){var t,n=Ie(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(Pe){n.e(Pe)}finally{n.f()}return e=j&&!_?j(e):e};W_=function(e,t){var n;e.timestamp=AS(),null==(n=p_[0])||!n.isFrozen()||e.type===XS.FullSnapshot||e.type===XS.IncrementalSnapshot&&e.data.source===QS.Mutation||p_.forEach(function(e){return e.unfreeze()}),S?null!=r&&r(G(e),t):_&&(n={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(n,"*")),e.type===XS.FullSnapshot?(V=e,R=0):e.type!==XS.IncrementalSnapshot||e.data.source===QS.Mutation&&e.data.isAttachIframe||(R++,t=o&&o<=R,n=i&&e.timestamp-V.timestamp>i,(t||n)&&H_(!0))};var J,O=function(e){W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.Mutation},e)})},$=function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.Scroll},e)})},Z=function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.CanvasMutation},e)})},x=new G_({mutationCb:O,adoptedStyleSheetCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.AdoptedStyleSheet},e)})}}),T=new x_({mirror:K_,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:g,wrappedEmit:W_}),M=Ie(b||[]);try{for(M.s();!(J=M.n()).done;){var K=J.value;K.getMirror&&K.getMirror({nodeMirror:K_,crossOriginIframeMirror:T.crossOriginIframeMirror,crossOriginIframeStyleMirror:T.crossOriginIframeStyleMirror})}}catch(Pe){M.e(Pe)}finally{M.f()}var I=new J_,A=(q_=new V_({recordCanvas:v,mutationCb:Z,win:window,blockClass:u,blockSelector:l,mirror:K_,sampling:s.canvas,dataURLOptions:m}),new T_({mutationCb:O,scrollCb:$,bypassOptions:{blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskInputOptions:E,dataURLOptions:m,maskTextFn:p,maskInputFn:h,recordCanvas:v,inlineImages:w,sampling:s,slimDOMOptions:C,iframeManager:T,stylesheetManager:x,canvasManager:q_,keepIframeSrcFn:k,processedNodeManager:I},mirror:K_}));H_=function(){var e,t,n,r,i,o,a=0<arguments.length&&arguments[0]!==undefined&&arguments[0];if(z){W_({type:XS.Meta,data:{href:window.location.href,width:BS(),height:zS()}},a),x.reset(),A.init(),p_.forEach(function(e){return e.lock()});s=document,r=void 0===(r=(e={mirror:K_,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskAllInputs:E,maskTextFn:p,maskInputFn:h,slimDOM:C,dataURLOptions:m,recordCanvas:v,inlineImages:w,onSerialize:function(e){GS(e,K_)&&T.addIframe(e),JS(e,K_)&&x.trackLinkElement(e),$S(e)&&A.addShadowRoot(LS.shadowRoot(e),document)},onIframeLoad:function(e,t){T.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:function(e,t){x.attachLinkElement(e,t)},keepIframeSrcFn:k}).mirror)?new sw:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var s=Dw(s,{doc:s,mirror:r,blockClass:void 0===(s=e.blockClass)?"rr-block":s,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(s=e.maskTextClass)?"rr-mask":s,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(s=e.inlineStylesheet)||s,maskInputOptions:!0===(r=void 0!==(r=e.maskAllInputs)&&r)?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:Lw(void 0!==i&&i),dataURLOptions:e.dataURLOptions,inlineImages:void 0!==t&&t,recordCanvas:void 0!==n&&n,preserveWhiteSpace:e.preserveWhiteSpace,onSerialize:e.onSerialize,onIframeLoad:e.onIframeLoad,iframeLoadTimeout:e.iframeLoadTimeout,onStylesheetLoad:e.onStylesheetLoad,stylesheetLoadTimeout:e.stylesheetLoadTimeout,keepIframeSrcFn:void 0===o?function(){return!1}:o,newlyAddedElement:!1});if(!s)return console.warn("Failed to snapshot the document");W_({type:XS.FullSnapshot,data:{node:s,initialOffset:jS(window)}},a),p_.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,K_.getId(document))}};try{var P=[],Y=function(e){return h_(E_)({mutationCb:O,mousemoveCb:function(e,t){return W_({type:XS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.MouseInteraction},e)})},scrollCb:$,viewportResizeCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.ViewportResize},e)})},inputCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.Input},e)})},mediaInteractionCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.StyleDeclaration},e)})},canvasMutationCb:Z,fontCb:function(e){return W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.Font},e)})},selectionCb:function(e){W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.Selection},e)})},customElementCb:function(e){W_({type:XS.IncrementalSnapshot,data:Ae({source:QS.CustomElement},e)})},blockClass:u,ignoreClass:D,ignoreSelector:N,maskTextClass:c,maskTextSelector:d,maskInputOptions:E,inlineStylesheet:f,sampling:s,recordDOM:z,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:C,dataURLOptions:m,mirror:K_,iframeManager:T,stylesheetManager:x,shadowDomManager:A,processedNodeManager:I,canvasManager:q_,ignoreCSSAttributes:q,plugins:(null==(e=null==b?void 0:b.filter(function(e){return e.observer}))?void 0:e.map(function(t){return{observer:t.observer,options:t.options,callback:function(e){return W_({type:XS.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},L=(T.addLoadListener(function(e){try{P.push(Y(e.contentDocument))}catch(X){console.warn(X)}}),function(){H_(),P.push(Y(document)),$_=!0});return["interactive","complete"].includes(document.readyState)?L():(P.push(DS("DOMContentLoaded",function(){W_({type:XS.DomContentLoaded,data:{}}),"DOMContentLoaded"===B&&L()})),P.push(DS("load",function(){W_({type:XS.Load,data:{}}),"load"===B&&L()},window))),function(){P.forEach(function(e){try{e()}catch(X){String(X).toLowerCase().includes("cross-origin")||console.warn(X)}}),I.destroy(),$_=!1,a_=void 0}}catch(X){console.warn(X)}}Y_.addCustomEvent=function(e,t){if(!$_)throw new Error("please add custom event after start recording");W_({type:XS.Custom,data:{tag:e,payload:t}})},Y_.freezePage=function(){p_.forEach(function(e){return e.freeze()})},Y_.takeFullSnapshot=function(e){if(!$_)throw new Error("please take full snapshot after start recording");H_(e)},Y_.mirror=K_,(i=Z_=Z_||{})[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped";var X_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Q_={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},eE=(tE.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},tE.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},tE.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},tE.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},tE.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},tE.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},tE.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},tE.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,tE.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,tE.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,tE.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,tE.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,tE);function tE(){}function nE(e,t){return void 0===e&&(e={}),A(A(A({},t=void 0===t?Q_:t),e),{mask:rE(t.mask,e.mask),block:rE(t.block,e.block),ignore:rE(t.ignore,e.ignore),maskInputOptions:A(A({},t.maskInputOptions),e.maskInputOptions)})}function rE(e,t){e=new Set(kl(e||[],t||[]));return Array.from(e)}lE.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},lE.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},lE.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},lE.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},lE.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},lE.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},lE.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var a=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var s=this,u=0,l=null!=(t=e.removes)?t:[];u<l.length;u++)!function(t){var e=(null!=(n=a.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(a.adds.splice(e,1),s.cancelledByOffset++):(a.removes=null!=(n=a.removes)?n:[],a.removes.push(t))}(l[u]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var f=d[c];a.adds=null!=(r=a.adds)?r:[],a.adds.push(f)}for(var h=0,p=null!=(t=e.attributes)?t:[];h<p.length;h++)!function(t){a.attributes=null!=(i=a.attributes)?i:[];var e=a.attributes.findIndex(function(e){return e.id===t.id});0<=e?a.attributes[e]=t:a.attributes.push(t)}(p[h]);for(var m=0,g=null!=(t=e.texts)?t:[];m<g.length;m++)!function(t){a.texts=null!=(o=a.texts)?o:[];var e=a.texts.findIndex(function(e){return e.id===t.id});0<=e?a.texts[e]=t:a.texts.push(t)}(g[m])}},lE.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:kl(null!=(e=t.adds)?e:[]),removes:kl(null!=(e=t.removes)?e:[]),attributes:kl(null!=(e=t.attributes)?e:[]),texts:kl(null!=(e=t.texts)?e:[])}}},lE.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},lE.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var iE=lE,oE=(uE.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,a=nE(e.privacy||{},Q_),s=A(A(A(A({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!h.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=a).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(s=o.mask)&&s.length&&(t.maskTextSelector=o.mask.join(",")),null!=(s=o.block)&&s.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+X_:X_,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(s=o.ignore)&&s.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=eE.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=Y_(s),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),p("RecorderManager","Recording started with config:",{maskAllText:a.maskAllText,maskAllInputs:a.maskAllInputs,autoDetectSensitiveData:a.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(X){o0("RecorderManager","Failed to start recording:",X),this.state="stopped"}}else i0("RecorderManager","Already recording")},uE.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",p("RecorderManager","Recording stopped")},uE.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",p("RecorderManager","Recording paused"))},uE.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),p("RecorderManager","Recording resumed"))},uE.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},r0("RecorderManager","MutationObserver hooked"))}catch(Pe){i0("RecorderManager","Failed to hook MutationObserver:",Pe)}},uE.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,r0("RecorderManager","MutationObserver restored"))},uE.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,o0("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},uE.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(o0("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},uE.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=Y_.addCustomEvent)&&n.call(Y_,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(b){}},uE.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=Y_.takeFullSnapshot;"function"==typeof o&&(o(!0),r0("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(Pe){i0("RecorderManager","Inline checkpoint failed:",Pe)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},uE.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,i0("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=Y_.addCustomEvent)&&e.call(Y_,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(u){}}return!1}return!0},uE.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=Y_.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),r0("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(Pe){i0("RecorderManager","Checkpoint FullSnapshot failed:",Pe)}},12e4)},uE.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},uE.prototype.getState=function(){return this.state},uE.prototype.isRecording=function(){return"recording"===this.state},uE.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},uE.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},uE.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},uE),aE=(sE.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,p("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,p("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,p("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},sE.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},sE.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},sE.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,p("SamplerManager","Mode switched: "+t+" -> "+e)},sE.prototype.getCurrentMode=function(){return this.currentMode},sE.prototype.isSampled=function(){return!0===this.samplingDecision},sE.prototype.isSessionMode=function(){return"session"===this.currentMode},sE.prototype.isBufferMode=function(){return"buffer"===this.currentMode},sE.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",p("SamplerManager","Upgraded to session mode due to error"),!0)},sE.prototype.updateRates=function(e,t){"number"==typeof e&&(this.config.sessionSampleRate=e),"number"==typeof t&&(this.config.errorSampleRate=t)},sE.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},sE.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},sE.prototype.getConfig=function(){return A({},this.config)},sE);function sE(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function uE(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new iE({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function lE(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function cE(e){for(var t=e.length;0<=--t;)e[t]=0}var dE=new Uint8Array([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]),fE=new Uint8Array([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]),hE=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),pE=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mE=new Array(576),gE=(cE(mE),new Array(60)),vE=(cE(gE),new Array(512)),yE=(cE(vE),new Array(256)),wE=(cE(yE),new Array(29));cE(wE);var bE,kE,SE,_E=new Array(30);function EE(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function CE(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}cE(_E);var RE=function(e){return e<256?vE[e]:vE[256+(e>>>7)]},OE=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},xE=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,OE(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},TE=function(e,t,n){xE(e,n[2*t],n[2*t+1])},ME=function(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},IE=function(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=ME(i[s]++,s))}},AE=function(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},PE=function(e){8<e.bi_valid?OE(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},LE=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},DE=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&LE(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!LE(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},NE=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0==r?TE(e,i,t):(o=yE[i],TE(e,o+256+1,t),0!==(a=dE[o])&&(i-=wE[o],xE(e,i,a)),o=RE(--r),TE(e,o,n),0!==(a=fE[o])&&(r-=_E[o],xE(e,r,a))),s<e.sym_next;);TE(e,256,t)},FE=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)DE(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],DE(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,DE(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,d,f,h,p,m=e,g=t.dyn_tree,v=t.max_code,y=t.stat_desc.static_tree,w=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,k=t.stat_desc.extra_base,S=t.stat_desc.max_length,_=0,E=0;E<=15;E++)m.bl_count[E]=0;for(g[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(E=g[2*g[2*(d=m.heap[c])+1]+1]+1)>S&&(E=S,_++),g[2*d+1]=E,v<d||(m.bl_count[E]++,h=0,k<=d&&(h=b[d-k]),p=g[2*d],m.opt_len+=p*(E+h),w&&(m.static_len+=p*(y[2*d+1]+h)));if(0!==_){do{for(E=S-1;0===m.bl_count[E];)E--}while(m.bl_count[E]--,m.bl_count[E+1]+=2,m.bl_count[S]--,0<(_-=2));for(E=S;0!==E;E--)for(d=m.bl_count[E];0!==d;)(f=m.heap[--c])>v||(g[2*f+1]!==E&&(m.opt_len+=(E-g[2*f+1])*g[2*f],g[2*f+1]=E),d--)}IE(o,l,e.bl_count)},UE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))},jE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)for(;TE(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(TE(e,i,e.bl_tree),s--),TE(e,16,e.bl_tree),xE(e,s-3,2)):s<=10?(TE(e,17,e.bl_tree),xE(e,s-3,3)):(TE(e,18,e.bl_tree),xE(e,s-11,7));o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}},zE=!1,BE=function(e,t,n,r){xE(e,0+(r?1:0),3),PE(e),OE(e,n),OE(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},t=function(e){if(!zE){for(var t,n,r,i=new Array(16),o=0,a=0;a<28;a++)for(wE[a]=o,t=0;t<1<<dE[a];t++)yE[o++]=a;for(yE[o-1]=a,a=r=0;a<16;a++)for(_E[a]=r,t=0;t<1<<fE[a];t++)vE[r++]=a;for(r>>=7;a<30;a++)for(_E[a]=r<<7,t=0;t<1<<fE[a]-7;t++)vE[256+r++]=a;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)mE[2*t+1]=8,t++,i[8]++;for(;t<=255;)mE[2*t+1]=9,t++,i[9]++;for(;t<=279;)mE[2*t+1]=7,t++,i[7]++;for(;t<=287;)mE[2*t+1]=8,t++,i[8]++;for(IE(mE,287,i),t=0;t<30;t++)gE[2*t+1]=5,gE[2*t]=ME(t,5);bE=new EE(mE,dE,257,286,15),kE=new EE(gE,fE,0,30,15),SE=new EE(new Array(0),hE,0,19,7),zE=!0}e.l_desc=new CE(e.dyn_ltree,bE),e.d_desc=new CE(e.dyn_dtree,kE),e.bl_desc=new CE(e.bl_tree,SE),e.bi_buf=0,e.bi_valid=0,AE(e)},ze=BE,WE=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),FE(e,e.l_desc),FE(e,e.d_desc),s=function(e){var t;for(UE(e,e.dyn_ltree,e.l_desc.max_code),UE(e,e.dyn_dtree,e.d_desc.max_code),FE(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*pE[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(o=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)BE(e,t,n,r);else if(4===e.strategy||o===i)xE(e,2+(r?1:0),3),NE(e,mE,gE);else{xE(e,4+(r?1:0),3);var u=e,l=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(xE(u,t-257,5),xE(u,n-1,5),xE(u,l-4,4),a=0;a<l;a++)xE(u,u.bl_tree[2*pE[a]+1],3);jE(u,u.dyn_ltree,t-1),jE(u,u.dyn_dtree,n-1),NE(e,e.dyn_ltree,e.dyn_dtree)}AE(e),r&&PE(e)},Ue=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(yE[n]+256+1)]++,e.dyn_dtree[2*RE(t)]++),e.sym_next===e.sym_end},Fd=function(e){xE(e,2,3),TE(e,256,mE),16===(e=e).bi_valid?(OE(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},HE=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0},qE=new Uint32Array(function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}()),VE=function(e,t,n,r){var i=qE,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},GE={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},a={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},JE=t,$E=ze,ZE=WE,KE=Ue,YE=Fd,XE=a.Z_NO_FLUSH,QE=a.Z_PARTIAL_FLUSH,eC=a.Z_FULL_FLUSH,tC=a.Z_FINISH,nC=a.Z_BLOCK,rC=a.Z_OK,iC=a.Z_STREAM_END,oC=a.Z_STREAM_ERROR,aC=a.Z_DATA_ERROR,sC=a.Z_BUF_ERROR,uC=a.Z_DEFAULT_COMPRESSION,lC=a.Z_FILTERED,cC=a.Z_HUFFMAN_ONLY,dC=a.Z_RLE,fC=a.Z_FIXED,hC=a.Z_UNKNOWN,pC=a.Z_DEFLATED,Pe=function(e,t){return e.msg=GE[t],t},mC=function(e){return 2*e-(4<e?9:0)},gC=function(e){for(var t=e.length;0<=--t;)e[t]=0},vC=function(e){for(var t,n,r=e.w_size,i=t=e.hash_size;n=e.head[--i],e.head[i]=r<=n?n-r:0,--t;);for(i=t=r;n=e.prev[--i],e.prev[i]=r<=n?n-r:0,--t;);},yC=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},wC=function(e,t){n=e.legacy_hash?e.ins_h=yC(e,e.ins_h,e.window[t+3-1]):(n=(n=e.window)[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,e.ins_h=Math.imul(n,66521)+66521>>>16&e.hash_mask);var n,r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},bC=function(e){var t=e.state,n=t.pending;0!==(n=e.avail_out<n?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},kC=function(e,t){ZE(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,bC(e.strm)},SC=function(e,t){e.pending_buf[e.pending++]=t},_C=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},EC=function(e,t,n,r){var i=e.avail_in;return 0===(i=r<i?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=HE(e.adler,t,i,n):2===e.state.wrap&&(e.adler=VE(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},CC=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,d=e.prev,f=e.strstart+258,h=l[o+a-1],p=l[o+a];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){for(o+=2,n++;l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<f;);if(r=258-(f-o),o=f-258,a<r){if(e.match_start=t,s<=(a=r))break;h=l[o+a-1],p=l[o+a]}}}while((t=d[t&c])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},RC=function(e){var t,n,r=e.w_size;do{if(t=e.window_size-e.lookahead-e.strstart,r+(r-262)<=e.strstart&&(e.window.set(e.window.subarray(r,r+r-t),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.strstart<e.insert&&(e.insert=e.strstart),vC(e),t+=r),0===e.strm.avail_in)break;if(t=EC(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,e.legacy_hash){if(3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=yC(e,e.ins_h,e.window[n+1]);e.insert&&(wC(e,n),n++,e.insert--,!(e.lookahead+e.insert<3)););}else if(3<e.lookahead+e.insert)for(n=e.strstart-e.insert;e.insert&&(wC(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},OC=function(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(n=(i=e.strm.avail_out-i)<(n=n>(r=e.strstart-e.block_start)+e.strm.avail_in?r+e.strm.avail_in:n)?i:n)<o&&(0===n&&t!==tC||t===XE||n!==r+e.strm.avail_in)||(a=t===tC&&n===r+e.strm.avail_in?1:0,$E(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,bC(e.strm),r&&(n<r&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(EC(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==a)););return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=e.w_size-e.insert<s?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==XE&&t!==tC&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(EC(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=e.w_size-e.insert<i?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),o=(i=65535<e.pending_buf_size-(i=e.bi_valid+42>>3)?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===tC)&&t!==XE&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,a=t===tC&&0===e.strm.avail_in&&n===r?1:0,$E(e,e.block_start,n,a),e.block_start+=n,bC(e.strm)),a?3:1)},Fe=function(e,t){for(var n,r;;){if(e.lookahead<262){if(RC(e),e.lookahead<262&&t===XE)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?wC(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=CC(e,n)),3<=e.match_length)if(r=KE(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,n=wC(e,e.strstart),0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=yC(e,e.ins_h,e.window[e.strstart+1]));else r=KE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(kC(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===tC?(kC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(kC(e,!1),0===e.strm.avail_out)?1:2},we=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(RC(e),e.lookahead<262&&t===XE)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=wC(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=CC(e,n),e.match_length<=5)&&(e.strategy===lC||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=KE(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(n=wC(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(kC(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=KE(e,0,e.window[e.strstart-1]))&&kC(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=KE(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===tC?(kC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(kC(e,!1),0===e.strm.avail_out)?1:2};function xC(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var TC=[new xC(0,0,0,0,OC),new xC(4,4,8,4,Fe),new xC(4,5,16,8,Fe),new xC(4,6,32,32,Fe),new xC(4,4,16,16,we),new xC(8,16,32,32,we),new xC(8,16,128,128,we),new xC(8,32,128,256,we),new xC(32,128,258,1024,we),new xC(32,258,258,4096,we)];function MC(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=pC,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),gC(this.dyn_ltree),gC(this.dyn_dtree),gC(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),gC(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),gC(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var IC=function(e){var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},AC=function(e){if(IC(e))return Pe(e,oC);e.total_in=e.total_out=0,e.data_type=hC;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,JE(t),rC},PC=function(e){var t=AC(e);return t===rC&&((e=e.state).window_size=2*e.w_size,gC(e.head),e.max_lazy_match=TC[e.level].max_lazy,e.good_match=TC[e.level].good_length,e.nice_match=TC[e.level].nice_length,e.max_chain_length=TC[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t},Hr=function(e,t,n,r,i,o,a){if(!e)return oC;var s=1;if(t===uC&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==pC||r<8||15<r||t<0||9<t||o<0||fC<o||8===r&&1!==s)return Pe(e,oC);8===r&&(r=9);var u=new MC;return(e.state=u).strm=e,u.status=42,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=a?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=3*(u.lit_bufsize-1),u.level=t,u.strategy=o,u.method=n,PC(e)},LC=Hr,DC=function(e,t){return IC(e)||2!==e.state.wrap?oC:(e.state.gzhead=t,rC)},NC=function(e,t){if(IC(e)||nC<t||t<0)return e?Pe(e,oC):oC;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==tC)return Pe(e,0===e.avail_out?sC:oC);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(bC(e),0===e.avail_out)return n.last_flush=-1,rC}else if(0===e.avail_in&&mC(t)<=mC(r)&&t!==tC)return Pe(e,sC);if(666===n.status&&0!==e.avail_in)return Pe(e,sC);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=pC+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=cC||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),_C(n,r+=31-r%31),0!==n.strstart&&(_C(n,e.adler>>>16),_C(n,65535&e.adler)),e.adler=1,n.status=113,bC(e),0!==n.pending)return n.last_flush=-1,rC}if(57===n.status)if(e.adler=0,SC(n,31),SC(n,139),SC(n,8),n.gzhead)SC(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),SC(n,255&n.gzhead.time),SC(n,n.gzhead.time>>8&255),SC(n,n.gzhead.time>>16&255),SC(n,n.gzhead.time>>24&255),SC(n,9===n.level?2:n.strategy>=cC||n.level<2?4:0),SC(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(SC(n,255&n.gzhead.extra.length),SC(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=VE(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(SC(n,0),SC(n,0),SC(n,0),SC(n,0),SC(n,0),SC(n,9===n.level?2:n.strategy>=cC||n.level<2?4:0),SC(n,3),n.status=113,bC(e),0!==n.pending)return n.last_flush=-1,rC;if(69===n.status){if(n.gzhead.extra){for(var i=n.pending,o=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+o>n.pending_buf_size;){var a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=VE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,bC(e),0!==n.pending)return n.last_flush=-1,rC;i=0,o-=a}r=new Uint8Array(n.gzhead.extra);n.pending_buf.set(r.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=VE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var s,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=VE(e.adler,n.pending_buf,n.pending-u,u)),bC(e),0!==n.pending)return n.last_flush=-1,rC;u=0}}while(s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,SC(n,s),0!=s);n.gzhead.hcrc&&n.pending>u&&(e.adler=VE(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var l,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=VE(e.adler,n.pending_buf,n.pending-c,c)),bC(e),0!==n.pending)return n.last_flush=-1,rC;c=0}}while(l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,SC(n,l),0!=l);n.gzhead.hcrc&&n.pending>c&&(e.adler=VE(e.adler,n.pending_buf,n.pending-c,c))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(bC(e),0!==n.pending))return n.last_flush=-1,rC;SC(n,255&e.adler),SC(n,e.adler>>8&255),e.adler=0}if(n.status=113,bC(e),0!==n.pending)return n.last_flush=-1,rC}if(0!==e.avail_in||0!==n.lookahead||t!==XE&&666!==n.status){r=0===n.level?OC(n,t):n.strategy===cC?function(e,t){for(var n;;){if(0===e.lookahead&&(RC(e),0===e.lookahead)){if(t===XE)return 1;break}if(e.match_length=0,n=KE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(kC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===tC?(kC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(kC(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===dC?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(RC(e),e.lookahead<=258&&t===XE)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){for(o=e.strstart+258;r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=KE(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=KE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(kC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===tC?(kC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(kC(e,!1),0===e.strm.avail_out)?1:2}(n,t):TC[n.level].func(n,t);if(3!==r&&4!==r||(n.status=666),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),rC;if(2===r&&(t===QE?YE(n):t!==nC&&($E(n,0,0,!1),t===eC)&&(gC(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),bC(e),0===e.avail_out))return n.last_flush=-1,rC}return t!==tC||!(n.wrap<=0)&&(2===n.wrap?(SC(n,255&e.adler),SC(n,e.adler>>8&255),SC(n,e.adler>>16&255),SC(n,e.adler>>24&255),SC(n,255&e.total_in),SC(n,e.total_in>>8&255),SC(n,e.total_in>>16&255),SC(n,e.total_in>>24&255)):(_C(n,e.adler>>>16),_C(n,65535&e.adler)),bC(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?rC:iC},FC=function(e){var t;return IC(e)?oC:(t=e.state.status,e.state=null,113===t?Pe(e,aC):rC)},UC=function(e,t){var n=t.length;if(IC(e))return oC;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return oC;1===i&&(e.adler=HE(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(gC(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,RC(r);3<=r.lookahead;){for(var u=r.strstart,l=r.lookahead-2;wC(r,u),u++,--l;);r.strstart=u,r.lookahead=2,RC(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,rC},jC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},zC=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==T(n))throw new TypeError(n+"must be non-object");for(var r in n)jC(n,r)&&(e[r]=n[r])}}return e},BC=function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var u=e[o];i.set(u,a),a+=u.length}return i},WC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(qO){WC=!1}for(var HC=new Uint8Array(256),qC=0;qC<256;qC++)HC[qC]=252<=qC?6:248<=qC?5:240<=qC?4:224<=qC?3:192<=qC?2:1;HC[254]=HC[255]=1;var VC=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,a=0,s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=i=0;i<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},GC=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},JC=Object.prototype.toString,$C=a.Z_NO_FLUSH,ZC=a.Z_SYNC_FLUSH,KC=a.Z_FULL_FLUSH,YC=a.Z_FINISH,XC=a.Z_OK,QC=a.Z_STREAM_END,eR={level:a.Z_DEFAULT_COMPRESSION,method:a.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:a.Z_DEFAULT_STRATEGY,legacyHash:!0};function tR(e){this.options=zC({},eR,e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new GC,this.strm.avail_out=0,LC(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==XC)throw new Error(GE[t]);if(e.header&&DC(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?VC(e.dictionary):"[object ArrayBuffer]"===JC.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=UC(this.strm,e))!==XC)throw new Error(GE[t]);this._dict_set=!0}}function nR(e,t){t=new tR(t);if(t.push(e,!0),t.err)throw t.msg||GE[t.err];return t.result}tR.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?YC:$C,"string"==typeof e?i.input=VC(e):"[object ArrayBuffer]"===JC.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===ZC||r===KC)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(NC(i,r)===QC)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=FC(this.strm),this.onEnd(n),this.ended=!0,n===XC;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},tR.prototype.onData=function(e){this.chunks.push(e)},tR.prototype.onEnd=function(e){e===XC&&(this.result=BC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var lt={Deflate:tR,deflate:nR,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nR(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nR(e,t)},constants:a},rR=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),iR=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),oR=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),aR=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),sR=function(e,t,n,r,i,o,a,s){for(var u,l,c,d,f,h,p,m,g,v=s.bits,y=0,w=0,b=0,k=0,S=0,_=0,E=0,C=0,R=0,O=0,x=null,T=new Uint16Array(16),M=new Uint16Array(16),I=null,y=0;y<=15;y++)T[y]=0;for(w=0;w<r;w++)T[t[n+w]]++;for(S=v,k=15;1<=k&&0===T[k];k--);if(k<S&&(S=k),0===k)i[o++]=20971520,i[o++]=20971520,s.bits=1;else{for(b=1;b<k&&0===T[b];b++);for(S<b&&(S=b),y=C=1;y<=15;y++)if((C=(C<<1)-T[y])<0)return-1;if(0<C&&(0===e||1!==k))return-1;for(M[1]=0,y=1;y<15;y++)M[y+1]=M[y]+T[y];for(w=0;w<r;w++)0!==t[n+w]&&(a[M[t[n+w]]++]=w);if(h=0===e?(x=I=a,20):1===e?(x=rR,I=iR,257):(x=oR,I=aR,0),y=b,f=o,E=w=O=0,c=-1,d=(R=1<<(_=S))-1,1===e&&852<R||2===e&&592<R)return 1;for(;;){for(g=a[w]+1<h?(m=0,a[w]):a[w]>=h?(m=I[a[w]-h],x[a[w]-h]):(m=96,0),u=1<<(p=y-E),b=l=1<<_;i[f+(O>>E)+(l-=u)]=p<<24|m<<16|g|0,0!==l;);for(u=1<<y-1;O&u;)u>>=1;if(0!==u?O=(O&u-1)+u:O=0,w++,0==--T[y]){if(y===k)break;y=t[n+a[w]]}if(S<y&&(O&d)!==c){for(f+=b,C=1<<(_=y-(E=0===E?S:E));_+E<k&&!((C-=T[_+E])<=0);)_++,C<<=1;if(R+=1<<_,1===e&&852<R||2===e&&592<R)return 1;i[c=O&d]=S<<24|_<<16|f-o|0}}0!==O&&(i[f+O]=y-E<<24|64<<16|0),s.bits=S}return 0},uR=a.Z_FINISH,lR=a.Z_BLOCK,cR=a.Z_TREES,dR=a.Z_OK,fR=a.Z_STREAM_END,hR=a.Z_NEED_DICT,pR=a.Z_STREAM_ERROR,mR=a.Z_DATA_ERROR,gR=a.Z_MEM_ERROR,vR=a.Z_BUF_ERROR,yR=a.Z_DEFLATED,wR=16209,bR=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function kR(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var SR,_R,ER=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},CR=function(e){var t;return ER(e)?pR:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,dR)},RR=function(e){var t;return ER(e)?pR:((t=e.state).wsize=0,t.whave=0,t.wnext=0,CR(e))},OR=function(e,t){var n,r;return ER(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?pR:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,RR(e))},r=function(e,t){var n;return e?(n=new kR,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=OR(e,t))!==dR&&(e.state=null),n):pR},xR=!0,TR=function(e,t,n,r){var i,e=e.state;return null===e.window&&(e.window=new Uint8Array(1<<e.wbits)),0===e.wsize&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0},MR=RR,IR=r,AR=function(e,t){var n,r,i,o,a,s,u,l,c,d,f,h,p,m,g,v,y,w,b,k,S,_,E,C,R=0,O=new Uint8Array(4),x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ER(e)||!e.output||!e.input&&0!==e.avail_in)return pR;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,o=e.next_in,r=e.input,l=n.hold,c=n.bits,d=s=e.avail_in,f=u=e.avail_out,_=dR;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}2&n.wrap&&35615===l?(0===n.wbits&&(n.wbits=15),O[n.check=0]=255&l,O[1]=l>>>8&255,n.check=VE(n.check,O,2,0),c=l=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31?(e.msg="incorrect header check",n.mode=wR):(15&l)!==yR?(e.msg="unknown compression method",n.mode=wR):(c-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),15<S||S>n.wbits?(e.msg="invalid window size",n.mode=wR):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:16191,c=l=0)))}break;case 16181:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(255&n.flags)!==yR){e.msg="unknown compression method",n.mode=wR;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=wR;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=VE(n.check,O,2,0)),c=l=0,n.mode=16182;case 16182:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,O[2]=l>>>16&255,O[3]=l>>>24&255,n.check=VE(n.check,O,4,0)),c=l=0,n.mode=16183;case 16183:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=VE(n.check,O,2,0)),c=l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=VE(n.check,O,2,0)),c=l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=(h=n.length)>s?s:h)&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),S)),512&n.flags&&4&n.wrap&&(n.check=VE(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=VE(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=VE(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=wR;break}c=l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=bR(l),c=l=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,hR;e.adler=n.check=1,n.mode=16191;case 16191:if(t===lR||t===cR)break e;case 16192:if(n.last)l>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=1&l,--c,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(function(e){if(xR){SR=new Int32Array(512),_R=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sR(1,e.lens,0,288,SR,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sR(2,e.lens,0,32,_R,0,e.work,{bits:5}),xR=!1}e.lencode=SR,e.lenbits=9,e.distcode=_R,e.distbits=5}(n),n.mode=16199,t!==cR)break;l>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=wR}l>>>=2,c-=2}break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=wR;break}if(n.length=65535&l,c=l=0,n.mode=16194,t===cR)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(0===(h=u<(h=s<h?s:h)?u:h))break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h}else n.mode=16191;break;case 16196:for(;c<14;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=wR;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.lens[x[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},_=sR(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid code lengths set",n.mode=wR;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(y<16)l>>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(C=g+2;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=wR;break}S=n.lens[n.have-1],h=3+(3&l),l>>>=2,c-=2}else if(17===y){for(C=g+3;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=3+(7&(l>>>=g)),l>>>=3,c=c-g-3}else{for(C=g+7;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=11+(127&(l>>>=g)),l>>>=7,c=c-g-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=wR;break}for(;h--;)n.lens[n.have++]=S}}if(n.mode===wR)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=wR;break}if(n.lenbits=9,E={bits:n.lenbits},_=sR(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid literal/lengths set",n.mode=wR;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},_=sR(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,_){e.msg="invalid distances set",n.mode=wR;break}if(n.mode=16199,t===cR)break e;case 16199:n.mode=16200;case 16200:if(6<=s&&258<=u){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,function(e,t){var n,r,i,o,a,s,u=e.state,l=e.next_in,c=e.input,d=l+(e.avail_in-5),f=e.next_out,h=e.output,p=f-(t-e.avail_out),m=f+(e.avail_out-257),g=u.dmax,v=u.wsize,y=u.whave,w=u.wnext,b=u.window,k=u.hold,S=u.bits,_=u.lencode,E=u.distcode,C=(1<<u.lenbits)-1,R=(1<<u.distbits)-1;t:do{for(S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=_[k&C];;){if(k>>>=r=n>>>24,S-=r,0==(r=n>>>16&255))h[f++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=_[(65535&n)+(k&(1<<r)-1)];continue}if(32&r){u.mode=16191;break t}e.msg="invalid literal/length code",u.mode=16209;break t}for(i=65535&n,(r&=15)&&(S<r&&(k+=c[l++]<<S,S+=8),i+=k&(1<<r)-1,k>>>=r,S-=r),S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=E[k&R];;){if(k>>>=r=n>>>24,S-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=E[(65535&n)+(k&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=16209;break t}if(o=65535&n,S<(r&=15)&&(k+=c[l++]<<S,(S+=8)<r)&&(k+=c[l++]<<S,S+=8),(o+=k&(1<<r)-1)>g){e.msg="invalid distance too far back",u.mode=16209;break t}if(k>>>=r,S-=r,o>(r=f-p)){if((r=o-r)>y&&u.sane){e.msg="invalid distance too far back",u.mode=16209;break t}if(s=b,(a=0)===w){if(a+=v-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}}else if(w<r){if(a+=v+w-r,(r-=w)<i){for(i-=r;h[f++]=b[a++],--r;);if(a=0,w<i){for(i-=r=w;h[f++]=b[a++],--r;);a=f-o,s=h}}}else if(a+=w-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}for(;2<i;)h[f++]=s[a++],h[f++]=s[a++],h[f++]=s[a++],i-=3;i&&(h[f++]=s[a++],1<i)&&(h[f++]=s[a++])}else{for(a=f-o;h[f++]=h[a++],h[f++]=h[a++],h[f++]=h[a++],2<(i-=3););i&&(h[f++]=h[a++],1<i)&&(h[f++]=h[a++])}break}}break}}while(l<d&&f<m);l-=i=S>>3,k&=(1<<(S-=i<<3))-1,e.next_in=l,e.next_out=f,e.avail_in=l<d?d-l+5:5-(l-d),e.avail_out=f<m?m-f+257:257-(f-m),u.hold=k,u.bits=S}(e,f),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(v&&0==(240&v)){for(w=g,b=v,k=y;v=(R=n.lencode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=16191;break}if(64&v){e.msg="invalid literal/length code",n.mode=wR;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;v=(R=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(0==(240&v)){for(w=g,b=v,k=y;v=(R=n.distcode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=wR;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=wR;break}n.mode=16204;case 16204:if(0===u)break e;if(n.offset>(h=f-u)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=wR;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=a-n.offset,h=n.length;for(u-=h=u<h?u:h,n.length-=h;i[a++]=m[p++],--h;);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break e;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===s)break e;s--,l|=r[o++]<<c,c+=8}if(f-=u,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?VE:HE)(n.check,i,f,a-f)),f=u,4&n.wrap&&(n.flags?l:bR(l))!==n.check){e.msg="incorrect data check",n.mode=wR;break}c=l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=wR;break}c=l=0}n.mode=16208;case 16208:_=fR;break e;case wR:_=mR;break e;case 16210:return gR;default:return pR}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||f!==e.avail_out&&n.mode<wR&&(n.mode<16206||t!==uR))&&TR(e,e.output,e.next_out,f-e.avail_out),f-=e.avail_out,e.total_in+=d-=e.avail_in,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?VE:HE)(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),_=(0==d&&0===f||t===uR)&&_===dR?vR:_},PR=function(e){var t;return ER(e)?pR:((t=e.state).window&&(t.window=null),e.state=null,dR)},LR=function(e,t){return ER(e)||0==(2&(e=e.state).wrap)?pR:((e.head=t).done=!1,dR)},DR=function(e,t){var n,r=t.length;return ER(e)||0!==(n=e.state).wrap&&16190!==n.mode?pR:16190===n.mode&&HE(1,t,r,0)!==n.check?mR:TR(e,t,r,r)?(n.mode=16210,gR):(n.havedict=1,dR)},NR=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},FR=Object.prototype.toString,UR=a.Z_NO_FLUSH,jR=a.Z_FINISH,zR=a.Z_OK,BR=a.Z_STREAM_END,WR=a.Z_NEED_DICT,HR=a.Z_STREAM_ERROR,qR=a.Z_DATA_ERROR,VR=a.Z_MEM_ERROR,GR=a.Z_BUF_ERROR,JR={chunkSize:65536,windowBits:15,to:""};function $R(e){this.options=zC({},JR,e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new GC,this.strm.avail_out=0,IR(this.strm,t.windowBits));if(e!==zR)throw new Error(GE[e]);if(this.header=new NR,LR(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=VC(t.dictionary):"[object ArrayBuffer]"===FR.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=DR(this.strm,t.dictionary))!==zR)throw new Error(GE[e])}function ZR(e,t){t=new $R(t);if(t.push(e,!0),t.err)throw t.msg||GE[t.err];return t.result}$R.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?jR:UR,"[object ArrayBuffer]"===FR.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(n=AR(i,r))===WR&&a&&((n=DR(i,a))===zR?n=AR(i,r):n===qR&&(n=WR));0<i.avail_in&&n===BR&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)MR(i),n=AR(i,r);switch(n){case HR:case qR:case WR:case VR:return this.onEnd(n),!(this.ended=!0)}var s,u,l,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===BR||0<r)&&("string"===this.options.to?(s=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+HC[e[n]]>t?n:t}(i.output,i.next_out),u=i.next_out-s,l=function(e,t){var n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(var r=new Array(2*n),i=0,o=0;o<n;){var a=e[o++];if(a<128)r[i++]=a;else{var s=HC[a];if(4<s)r[i++]=65533,o+=s-1;else{for(a&=2===s?31:3===s?15:7;1<s&&o<n;)a=a<<6|63&e[o++],s--;1<s?r[i++]=65533:a<65536?r[i++]=a:(a-=65536,r[i++]=55296|a>>10&1023,r[i++]=56320|1023&a)}}}var u=r,l=i;if(l<65534&&u.subarray&&WC)return String.fromCharCode.apply(null,u.length===l?u:u.subarray(0,l));for(var c="",d=0;d<l;d++)c+=String.fromCharCode(u[d]);return c}(i.output,s),i.next_out=u,i.avail_out=o-u,u&&i.output.set(i.output.subarray(s,s+u),0),this.onData(l)):(this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0)),n!==zR&&n!==GR||0!==c){if(n===BR)return n=PR(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===jR)return n=PR(this.strm),this.onEnd(n===zR?GR:n),!(this.ended=!0);break}}}return!0},$R.prototype.onData=function(e){this.chunks.push(e)},$R.prototype.onEnd=function(e){e===zR&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=BC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var l={Inflate:$R,inflate:ZR,inflateRaw:function(e,t){return(t=t||{}).raw=!0,ZR(e,t)},ungzip:ZR,constants:a},KR={Deflate:lt.Deflate,deflate:lt.deflate,deflateRaw:lt.deflateRaw,gzip:lt.gzip,Inflate:l.Inflate,inflate:l.inflate,inflateRaw:l.inflateRaw,ungzip:l.ungzip,constants:a},YR=(tO.prototype.uploadReplay=function(n){return wl(this,void 0,void 0,function(){var t;return bl(this,function(e){switch(e.label){case 0:if(this.isUploading)return i0("Uploader","Upload in progress, skipping"),[2,!1];this.isUploading=!0,e.label=1;case 1:return e.trys.push([1,3,4,5]),(t=this.config.beforeSend(n))?[4,this.doUploadWithRetry(t,0)]:(p("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),p("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return o0("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},tO.prototype.doUploadWithRetry=function(r,i){return wl(this,void 0,void 0,function(){var t,n;return bl(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,5]),[4,this.doUpload(r)];case 1:return e.sent(),[3,5];case 2:return t=e.sent(),i<this.config.maxRetries?(p("Uploader","Retrying in "+(n=1e3*Math.pow(2,i))+"ms (attempt "+(i+1)+"/"+this.config.maxRetries+")"),[4,this.sleep(n)]):[3,4];case 3:return e.sent(),[2,this.doUploadWithRetry(r,i+1)];case 4:throw t;case 5:return[2]}})})},tO.prototype.prepareUploadPayload=function(e){var t=e.replay_format||"rrweb",n=e.events_encoding||"plain_json";if("rrweb"!==t)return e;if(!this.config.eventsCompression||"gzip_base64"===n)return A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=KR.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,a=r.length,s=i.length;return p("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(a/1024)+"KB -> base64 "+Math.round(s/1024)+"KB"),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(X){return i0("Uploader","Events compression failed, fallback to plain_json:",X),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},tO.prototype.uint8ArrayToBase64=function(e){for(var t="",n=0;n<e.length;n+=32768){for(var r=e.subarray(n,n+32768),i="",o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);t+=i}if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("base64 encode is not supported")},tO.prototype.doUpload=function(i){return wl(this,void 0,void 0,function(){var t,n,r;return bl(this,function(e){switch(e.label){case 0:if(t=this.prepareUploadPayload(i),r=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},p("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),r.length<65536||p("Uploader","Data size "+Math.round(r.length/1024)+"KB exceeds keepalive limit, using normal fetch"),this.config.transport)return[4,this.config.transport.request({kind:"replay",url:this.config.uploadUrl,method:"POST",headers:n,body:r})];throw new Error("Replay Transport is not configured");case 1:if(t=e.sent(),!(n=t||{ok:!1,status:0,statusText:"Transport failed"}).ok)throw new Error("HTTP "+(n.status||0)+": "+(n.statusText||"Transport failed"));if(0!==(r="string"==typeof n.body?JSON.parse(n.body):n.body).code)throw new Error("Server error (code "+r.code+"): "+r.message);return[2]}})})},tO.prototype.sendBeacon=function(e){var t;try{var n=this.prepareUploadPayload(e),r=JSON.stringify(n);return!(null==(t=this.config.transport)||!t.handoff||(this.config.transport.handoff({kind:"replay",url:this.config.uploadUrl,method:"POST",contentType:"application/json",body:r,sendBeacon:!0}),0))}catch(X){return o0("Uploader","sendBeacon failed:",X),!1}},tO.prototype.isUploadInProgress=function(){return this.isUploading},tO.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},tO),XR=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),QR=(eO.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,p("ClickDetector","Started"))},eO.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,p("ClickDetector","Stopped"))},eO.prototype.handlePointerDown=function(e){var t,n,r=this,i=e.target;i&&i instanceof Element&&(i=this.getClickableElement(i))&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=i,t=this.getNodeInfo(i),n=this.getExternalNavigationReason(e,i),this.options.onClickStart({node:t,timestamp:this.clickStartTime,target:i,event:e,effectiveActionReason:n||undefined}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},eO.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},eO.prototype.startMutationObserver=function(){var t=this;this.clickNode&&document.body&&"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&(t.emitEffectiveAction("dom_mutation"),t.handleSlowClick("mutation"))}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"],characterData:!0}))},eO.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("characterData"===r.type)return!0;if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).concat(Array.from(r.removedNodes)).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if(["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"].includes(r||""))return!0}}return!1},eO.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},eO.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},eO.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},eO.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},eO.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},eO.prototype.getClickableElement=function(e){return e.matches(XR)?e:e.closest(XR)},eO.prototype.getExternalNavigationReason=function(e,t){var n=t.closest("a");if(n){if(n.download)return"download";var r=(n.getAttribute("target")||"").toLowerCase();if(r&&"_self"!==r)return"external_navigation";if(n.href&&(1===e.button||e.metaKey||e.ctrlKey||e.shiftKey))return"external_navigation"}r=t.closest("form"),n=((null==r?void 0:r.getAttribute("target"))||"").toLowerCase();return n&&"_self"!==n?"external_navigation":t.hasAttribute("data-tdem-ignore-dead-click")||t.closest("[data-tdem-ignore-dead-click]")||t.hasAttribute("data-tdem-effective-action")||t.closest("[data-tdem-effective-action]")?"custom":null},eO.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},eO.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},eO.prototype.isActive=function(){return this.isRunning},eO);function eO(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onClickStart:e.onClickStart||function(){},onEffectiveAction:e.onEffectiveAction||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function tO(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){},eventsCompression:null==(t=e.eventsCompression)||t,transport:e.transport}}function nO(e){return Number.isNaN(e)?0:Math.max(0,Math.min(1,e))}function rO(e){return nO((e=e,(Number.isNaN(e)?0:Math.max(0,Math.min(100,e)))/100))}function iO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function oO(e,t){var e=!1===(e=e)||e===undefined?{enabled:!1,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:!0===e?{enabled:!0,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:{enabled:!1!==e.enabled,sessionSampleRate:"number"==typeof e.sessionSampleRate?nO(e.sessionSampleRate):.1,errorSampleRate:"number"==typeof e.errorSampleRate?nO(e.errorSampleRate):1,errorTraceback:e.errorTraceback===undefined||!!e.errorTraceback},t=t&&"object"===T(t)?t:null,n=e.enabled,r=(t&&iO(t,"enabled")&&(n=e.enabled&&!!t.enabled),e.sessionSampleRate),i=e.errorSampleRate,e=e.errorTraceback;return n&&t&&(iO(t,"replay_sample_rate")&&t.replay_sample_rate!==undefined&&null!==t.replay_sample_rate&&(r=rO(Number(t.replay_sample_rate))),iO(t,"error_traceback")&&t.error_traceback!==undefined&&null!==t.error_traceback&&(e=!!t.error_traceback),iO(t,"error_sample_rate"))&&t.error_sample_rate!==undefined&&null!==t.error_sample_rate&&(i=rO(Number(t.error_sample_rate))),{enabled:n,sessionSampleRate:r,errorSampleRate:e?i:0,errorTraceback:e}}function aO(e,t){return A(A({},e),{enabled:t.enabled,sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,errorTraceback:t.errorTraceback})}function sO(e){var t=null==(t=e)?void 0:t._tdemSampleGate;if(!t)return 1;if(t.isDecided&&t.isSampled)return(!(t=e._effectiveReplayPolicy)||t.enabled)&&!1!==e._replaySampled}new c({name:"sessionReplay"});var e=new c({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,errorTraceback:!0,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,init:function(e){},applyEffectivePolicy:function(e){var t,n;if(this.errorTraceback=e.errorTraceback,this.replayConfig&&(this.replayConfig=aO(this.replayConfig,e)),this.samplerManager&&this.samplerManager.updateRates(e.sessionSampleRate,e.errorSampleRate),this.isInitialized){if(e.enabled)return(n=this.samplerManager)?0<e.sessionSampleRate||e.errorTraceback&&0<e.errorSampleRate?!e.errorTraceback&&n.isBufferMode()?(p("Plugin","Error traceback off while in buffer, stopping replay"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void(e.errorTraceback&&e.sessionSampleRate<=0&&0<e.errorSampleRate&&n.isSessionMode()&&(p("Plugin","Remote SSR=0 with traceback on: demote session→buffer"),n.forceMode("buffer"),this.flushTimer)&&(clearInterval(this.flushTimer),this.flushTimer=null)):(p("Plugin","Effective policy no longer allows recording, stopping"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void 0;p("Plugin","Effective policy disabled, stopping replay"),this.stopReplay(),null!=(e=this.eventBuffer)&&e.clear()}},shouldSkipBufferFlush:function(){var e;return!0===(null==(e=this.samplerManager)?void 0:e.isBufferMode())},onNewTdem:function(e,t){var n,r,t=this.parseConfig(t),i=null!=(i=t.debug)&&i,i=(t0=i,e._effectiveReplayPolicy);i||(i=oO(t,(n=e._prefetchedConfigData)&&"object"===T(n)&&("replay_sample_rate"in n||"error_traceback"in n||"error_sample_rate"in n||"tdem_sample_rate"in n||"enabled"in n)?(r={},Object.prototype.hasOwnProperty.call(n,"enabled")&&(r.enabled=!!n.enabled),Object.prototype.hasOwnProperty.call(n,"replay_sample_rate")&&(r.replay_sample_rate=Number(n.replay_sample_rate)),Object.prototype.hasOwnProperty.call(n,"error_traceback")&&(r.error_traceback=!!n.error_traceback),Object.prototype.hasOwnProperty.call(n,"error_sample_rate")&&(r.error_sample_rate=Number(n.error_sample_rate)),r):null),e._effectiveReplayPolicy=i,e._replaySampled=i.enabled),i.enabled?(n=aO(A(A({},t),{enabled:!0}),i),this.replayConfig=n,this.errorTraceback=i.errorTraceback,this._tdemRef=e,this.initializeModules(e,n),(r=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,n,r.mode),this.registerReplaySamplingCheck(e,n),this.listenForErrors(e,n),this.listenForPerformance(e),this.listenForLifecycle(e,n),this.listenForUnload(e),this.isInitialized=!0):p("Plugin","Not sampled by sampler, skipping")):p("Plugin","disabled by effective policy")},registerReplaySamplingCheck:function(t,e){var n=this,r=function(e){clearInterval(i),e?(p("Plugin","Session/policy rejected, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):p("Plugin","Session sampled, replay continues")},i=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled&&(!(e=t._effectiveReplayPolicy)||e.enabled)?r(!1):r(!0))},50);t.lifeCycle.on("destroy",function(){clearInterval(i)})},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===T(e)?A(A({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new a0({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new d0({},null!=(r=e.useCompression)&&r),this.samplerManager=new aE({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new oE({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?p("SessionReplay","Checkout in buffer mode (error traceback), skip flush"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(p("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0)))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),(t.config.url||t.config.hostUrl||"").replace(/\/+$/,""));this.uploader=new YR({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError,eventsCompression:null==(r=e.eventsCompression)||r,transport:null==(r=t.getInternalTransport)?void 0:r.call(t)}),this.clickDetector=new QR({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),p("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(p("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=nE(A({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):p("Plugin","Buffer mode - flush on error only")):o0("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){this.eventBuffer&&this.sessionManager&&(this.sanitizeDataURLs(e),this.eventBuffer.addEvent(e),this.sessionManager.updateActivity())},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var a=0,s=n.attributes;a<s.length;a++){var u=s[a];if(null!=u&&u.attributes)for(var l=0,c=Object.entries(u.attributes);l<c.length;l++){var d=c[l],f=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(u.attributes[f]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&a.length>t&&a.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var s=0,u=e.childNodes;s<u.length;s++){var l=u[s];this.sanitizeNodeTree(l,t)}}},handleSlowClick:function(e,t){p("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){p("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:A({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},flushReplayData:function(c,d,f){return void 0===f&&(f=!1),wl(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,l;return bl(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&sO(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(p("Plugin","Session expired, refreshing"),this.stopReplay(),i=this.sessionManager.refreshSession(),c.lifeCycle.emit("sessionRefreshed"),n=c._replaySampled,i.sampled&&!1!==n&&this.startReplay(c,d,i.sampled),[2]):this.eventBuffer.isEmpty()?[2]:(n=this.eventBuffer.getEventCount(),!f&&n<10?(p("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(i0("Flush","First segment missing FullSnapshot, triggering manual checkout"),this.recorderManager&&this.recorderManager.takeFullSnapshot()),[4,this.eventBuffer.finishAsync()])):[2];case 1:if(0===(r=e.sent()).eventCount)return[2];if(0===(i=r.events).length&&r.eventsJson)try{i=JSON.parse(r.eventsJson)}catch(V){return o0("Flush","Failed to parse eventsJson from worker:",V),[2]}s=this.splitEventsIntoChunks(i),p("Flush","Flushing "+r.eventCount+" events in "+s.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,a=0,s=s,e.label=2;case 2:return a<s.length?(u=s[a],u=JSON.stringify(u),u={project_key:String(c.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:u},[4,this.uploader.uploadReplay(u)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return a++,[3,2];case 5:return u=this.eventBuffer.isUsingWorker(),l=u?"(worker)":"(sync)",p("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+l),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e,t,n){if(void 0===t&&(t=3145728),void 0===n&&(n=5242880),0===e.length)return[];var r=JSON.stringify(e);if(r.length<=t)return[e];i0("Split","Events size "+Math.round(r.length/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],a=2,s=0,u=e;s<u.length;s++){var l,c,d=u[s],f=JSON.stringify(d).length+1;0<o.length&&t<a+f&&(i.push(o),o=[],a=2),n<f?((c=2===(l=d.type)||4===l)?o0:i0)("Split","Single event too large ("+Math.round(f/1024)+"KB), type="+l+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(d),a+=f)}return 0<o.length&&i.push(o),i},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),p("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(p("Plugin","Converting to session mode due to error"),this.flushReplayData(t,n,!0),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(Le){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForLifecycle:function(o,t){var n,e,a=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=a.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(i=null==(r=o)?void 0:r.getOriginFrom)?void 0:i.call(r))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:Oc(),event_type:e,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:r,data:{page_title:i,replay_id:n,is_effective_action:!1,tags:{environment:o.config.env||"production",version:String(o.config.version||"")},event_properties:{visibility_state:"undefined"!=typeof document?document.visibilityState:"",lifecycle_type:e}}})},document.addEventListener("visibilitychange",e=function(){var e;if("undefined"!=typeof document){if("hidden"===document.visibilityState)return n(P.TAB_HIDDEN),a.shouldSkipBufferFlush()?void p("Lifecycle","Buffer mode (error traceback), skip flush on hidden"):void a.flushReplayData(o,t,!0);"visible"===document.visibilityState&&(n(P.TAB_VISIBLE),(e=Date.now())-a._lastLifecycleSnapshotAt<5e3||(a._lastLifecycleSnapshotAt=e,null!=(e=a.recorderManager)&&e.takeFullSnapshot(),a.shouldSkipBufferFlush()?p("Lifecycle","Buffer mode (error traceback), skip flush on visible"):a.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){var t=this,n=function(){t.flushOnUnload(e)};window.addEventListener("beforeunload",n),window.addEventListener("pagehide",n),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&sO(e))if(this.shouldSkipBufferFlush())p("Unload","Buffer mode (error traceback), skip flush on unload");else{var t=this.sessionManager.getSession();if(t&&(this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),!this.eventBuffer.isEmpty())){var n=this.eventBuffer.finish();if(0!==n.eventCount){for(var n=this.splitEventsIntoChunks(n.events,51200,51200),r=0,i=0,o=0,a=n;o<a.length;o++){var s=a[o],s={project_key:String(e.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:JSON.stringify(s)};this.uploader.sendBeacon(s)?r++:(i++,i0("Unload","sendBeacon rejected chunk (segment_id="+s.segment_id+"), likely exceeds 64KB browser limit or queue full"))}p("SessionReplay","sendBeacon on unload: "+r+"/"+n.length+" chunk(s) queued, "+i+" rejected")}}}},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this._lastLifecycleSnapshotAt=0,this.isInitialized=!1,p("Plugin","destroyed")}}),uO={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{enabled:!0,deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3,resolveOnDomMutation:!0,resolveOnSpaNavigation:!0,resolveOnExternalNavigation:!0,resolveOnWindowOpen:!0,resolveOnPageUnload:!0,resolveOnFormAction:!0,resolveOnApiSuccess:!0,ignoreDeadClickSelectors:[],effectiveActionSelectors:[]},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},lO=new Set([P.JS_ERROR,P.PROMISE_ERROR,P.RESOURCE_ERROR,P.API_ERROR]),cO=new Set([P.FORM_CHANGE,P.FORM_SUBMIT,P.FORM_SUBMIT_RESULT]),dO=(new c({name:"struggleMonitor"}),new c({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?A({},uO):e&&"object"===T(e)?A(A(A({},uO),e),{click:A(A({},uO.click),e.click||{}),performance:A(A({},uO.performance),e.performance||{}),form:A(A({},uO.form),e.form||{}),navigation:A(A({},uO.navigation),e.navigation||{}),custom:A(A({},uO.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:uO).payloadAllowlist,enabled:!1!==e.enabled}):A(A({},uO),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],pendingDeadClicks:new Map,focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new QR({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onClickStart:function(e){r.onClickStart(t,n,e)},onEffectiveAction:function(e){r.onEffectiveAction(n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start(),this.initClickEffectiveActionListeners(n),this.initWindowOpenHook())},initClickEffectiveActionListeners:function(n){var e,t=this;"undefined"!=typeof window&&((e=function(e,t){window.addEventListener(e,t),n.removeDomListeners.push(function(){window.removeEventListener(e,t)})})("pagehide",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}),e("beforeunload",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}))},initWindowOpenHook:function(){var r,i;"undefined"==typeof window||this.windowOpenHooked||(r=window.open,this.originalWindowOpen=r,this.windowOpenHooked=!0,i=this,window.open=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(window,e);return i.resolveWindowOpenActions(),n})},resolveWindowOpenActions:function(){var n=this,r=Date.now();this.instanceStates.forEach(function(e){var t;!1!==(null==(t=e.config.click)?void 0:t.resolveOnWindowOpen)&&(null!=(t=e.clickDetector)&&t.markEffectiveAction("window_open"),n.resolvePendingDeadClicks(e,"window_open",r,n.getCurrentPageUrl()))})},restoreWindowOpenHook:function(){"undefined"!=typeof window&&this.windowOpenHooked&&this.originalWindowOpen&&(window.open=this.originalWindowOpen,this.originalWindowOpen=null,this.windowOpenHooked=!1)},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,P.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:Oc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Cc.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:A(A({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:A(A({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:_d(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:Oc(),timestamp:Date.now(),page_url:i};n!==P.FORM_FOCUS?n!==P.FORM_BLUR?n!==P.FORM_CHANGE?(i=A(A({},r),{event_type:P.FORM_SUBMIT,event_category:Cc.BEHAVIOR,data:A(A({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_CHANGE,event_category:Cc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_BLUR,event_category:Cc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_FOCUS,event_category:Cc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onClickStart:function(e,t,n){var r,i=t.config.click||uO.click;!1!==i.enabled&&(r=n.node.selector||n.node.tagName||"unknown",this.shouldIgnoreDeadClick(n.target,i)?this.resolvePendingDeadClicks(t,"custom",n.timestamp,this.getCurrentPageUrl()):this.scheduleDeadClick(e,t,{pendingId:"pending_"+n.timestamp+"_"+Math.random().toString(16).slice(2),timestamp:n.timestamp,pageUrl:this.getCurrentPageUrl(),ownerKey:r,node:n.node}))},onEffectiveAction:function(e,t){this.shouldResolveByReason(e,t.reason)&&this.resolvePendingDeadClicks(e,t.reason,t.timestamp,this.getCurrentPageUrl())},scheduleDeadClick:function(t,n,r){var i=this,o=null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,e=setTimeout(function(){var e=n.pendingDeadClicks.get(r.pendingId);e&&(n.pendingDeadClicks["delete"](r.pendingId),i.emitDeadClick(t,n,e,o))},o);n.pendingDeadClicks.set(r.pendingId,A(A({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:undefined;null!=(i=e.reportStruggle)&&i.call(e,{type:"dead_click",ownerType:"element",ownerKey:n.ownerKey,pageUrl:n.pageUrl,triggerEventId:n.clickEventId,relatedEventIds:o,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeout_ms:r,selector:n.node.selector||""}})},resolvePendingDeadClicks:function(r,i,o,a){void 0===o&&(o=Date.now());var e,s=null!=(e=null==(e=r.config.click)?void 0:e.deadClickWindowMs)?e:3e3;r.pendingDeadClicks.forEach(function(e,t){var n=o-e.timestamp;n<0||s<n||"spa_navigation"!==i&&"page_unload"!==i&&a&&e.pageUrl&&a!==e.pageUrl||(clearTimeout(e.timeout),r.pendingDeadClicks["delete"](t))})},linkPendingDeadClickToClickEvent:function(e,n,r){var i=n.timestamp||Date.now(),o=this.getEventPageUrl(n);e.pendingDeadClicks.forEach(function(e){var t;e.clickEventId||(t=i-e.timestamp)<0||1e3<t||o&&e.pageUrl&&o!==e.pageUrl||(e.clickEventId=n.event_id,r&&"unknown"!==r&&(e.ownerKey=r))})},shouldResolveByReason:function(e,t){e=e.config.click||uO.click;return!1!==e.enabled&&("dom_mutation"===t?!1!==e.resolveOnDomMutation:"spa_navigation"===t?!1!==e.resolveOnSpaNavigation:"external_navigation"===t||"download"===t?!1!==e.resolveOnExternalNavigation:"window_open"===t?!1!==e.resolveOnWindowOpen:"page_unload"===t?!1!==e.resolveOnPageUnload:"form_change"===t||"form_submit"===t?!1!==e.resolveOnFormAction:"api_success"!==t||!1!==e.resolveOnApiSuccess)},shouldIgnoreDeadClick:function(t,e){return kl(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(Pe){return!1}})},getCurrentPageUrl:function(){return"undefined"==typeof window?"":window.location.href},getEventPageUrl:function(e){return(null==e?void 0:e.page_url)||(null==(e=null==e?void 0:e.data)?void 0:e.page_url)||""},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){},handleEventCreated:function(i,o,e){var t,a=this,s=Date.now(),n=o.config.click||uO.click,r=Math.max(null!=(t=n.errorClickWindowMs)?t:3e3,null!=(t=n.rageClickWindowMs)?t:1e3,null!=(t=n.deadClickWindowMs)?t:3e3);o.recentClicks=o.recentClicks.filter(function(e){return s-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==P.STRUGGLE&&(t=e.timestamp||s,n=a.getEventPageUrl(e),e.event_type===P.CLICK?(r=(null==(r=e.data)?void 0:r.target_element)||(null==(r=e.data)?void 0:r.target_id)||(null==(r=e.data)?void 0:r.target_class)||"unknown",o.recentClicks.push({eventId:e.event_id,timestamp:t,pageUrl:n,ownerKey:r}),a.linkPendingDeadClickToClickEvent(o,e,r)):(a.isEffectiveActionEvent(o,e)&&(a.resolvePendingDeadClicks(o,a.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(a.getEffectiveActionReason(e))),lO.has(e.event_type)?a.tryReportErrorClick(i,o,e):e.event_type===P.PAGE_LOAD||e.event_type===P["true"]?a.tryReportSlowPage(i,o,e):e.event_type===P.FORM_FOCUS?(a.trackFormFocus(o,e),a.trackFormChangeAndZigzag(i,o,e)):e.event_type===P.FORM_CHANGE?a.trackFormChangeAndZigzag(i,o,e):e.event_type===P.FORM_BLUR?a.tryReportLongFocusTime(i,o,e):e.event_type===P.FORM_SUBMIT?a.trackFormSubmitResult(o,e):e.event_type===P.FORM_SUBMIT_RESULT?(a.trackFormSubmitResult(o,e),a.tryReportFormValidationError(i,o,e)):e.event_type===P.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&a.tryReportBackForward(i,o,e)),a.tryReportCustomStruggle(i,o,e))})},isEffectiveActionEvent:function(e,t){var n;return!1!==(null==(n=e.config.click)?void 0:n.enabled)&&(t.event_type===P.API_CALL?!1!==(null==(n=e.config.click)?void 0:n.resolveOnApiSuccess):t.event_type===P.PAGE_VIEW&&null!=(n=null==(n=t.data)?void 0:n.event_properties)&&n.navigation_type?!1!==(null==(n=e.config.click)?void 0:n.resolveOnSpaNavigation):cO.has(t.event_type)?!1!==(null==(n=e.config.click)?void 0:n.resolveOnFormAction):!0===(null==(e=t.data)?void 0:e.is_effective_action))},getEffectiveActionReason:function(e){return e.event_type===P.API_CALL?"api_success":e.event_type===P.PAGE_VIEW?"spa_navigation":e.event_type===P.FORM_CHANGE?"form_change":e.event_type===P.FORM_SUBMIT||e.event_type===P.FORM_SUBMIT_RESULT?"form_submit":"custom"},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===P.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,a,s;n.event_type!==P.FORM_CHANGE?n.event_type!==P.FORM_FOCUS||(s=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(s=s.slice(-4))[0],a=s[1],!o)||!a||o===a||o!==s[2]||a!==s[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,s=null!=(a=null==(o=t.config.form)?void 0:o.zigzagMinCount)?a:2,i.zigzagHits<s)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(a=null==r?void 0:r.data)?void 0:a.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==P.FORM_SUBMIT&&t.event_type!==P.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==P.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,a,s;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(a=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(a=n.changedFieldIds.size/a)<(s=null!=(s=null==(s=t.config.form)?void 0:s.incompleteMinFieldRatio)?s:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(a.toFixed(4)),threshold_ratio:s}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,a,s=String((null==(s=null==n?void 0:n.data)?void 0:s.field_id)||"");s&&(i=t.focusStartMap.get(s))&&(t.focusStartMap["delete"](s),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(a=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:s,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:s,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:a,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||uO.click).errorClickWindowMs)?o:3e3,o=kl(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,a=t.config.performance||uO.performance;a.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=a.slowPageLcpThreshold)?o:4e3,a=null!=(a=a.slowPageInpThreshold)?a:500,o<=r||a<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,a,s=(null==(s=null==n?void 0:n.data)?void 0:s.event_properties)||{},u=(null==n?void 0:n.data)||{};"fail"===String((null==s?void 0:s.status)||(null===(i=u)?void 0:i.status)||"")&&(i=String((null==s?void 0:s.field_id)||(null===(i=u)?void 0:i.field_id)||""),o=String((null==s?void 0:s.form_id)||(null===(o=u)?void 0:o.form_id)||""),a=i||o||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i?"field":"form",ownerKey:a,pageUrl:null==n?void 0:n.page_url,formId:o,fieldId:i,triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:(null==s?void 0:s.validation_code)||(null===(e=u)?void 0:e.validation_code),validation_message:null==(a=null==n?void 0:n.data)?void 0:a.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||uO.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||uO.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=A(A({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),t.pendingDeadClicks.forEach(function(e){clearTimeout(e.timeout)}),t.pendingDeadClicks.clear(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e),0===this.instanceStates.size)&&this.restoreWindowOpenHook()},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear(),this.restoreWindowOpenHook()}})),fO=function(e,t){return void 0===t&&(t=2),"number"==typeof e&&Number.isFinite(e)?(t=Math.pow(10,Math.max(0,Math.min(12,Math.floor(t)))),Math.round(e*t)/t):0},hO=function(e,t){return void 0===t&&(t=2048),"string"==typeof e&&e.trim()?e.trim().slice(0,Math.max(1,Math.floor(t))):"unknown"},pO={enabled:!0,threshold:2e3,noResponseThreshold:5e3,sampleRate:1},mO=new Map,gO=function(e){var t,n=mO.get(e);if(n){n.destroyed=!0;try{null!=(t=n.observer)&&t.disconnect()}catch(u){}n.observer=null,n.lagRecords.length=0,e.lifeCycle.remove("destroy",n.onDestroy),mO["delete"](e)}},vO=new c({name:"lagMonitor",onNewTdem:function(o,e){e=e,void 0===(r=null!=(n=o.config)&&n.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(r=function(){return undefined});var r,t,n,a=!1===e?A(A({},pO),{enabled:!1}):!0===e||e===undefined?A({},pO):!e||"object"!==T(e)||Array.isArray(e)?(r("lagMonitor","invalid_type"),A({},pO)):(n=A({},pO),e.enabled!==undefined&&("boolean"==typeof e.enabled?n.enabled=e.enabled:r("lagMonitor.enabled","invalid_type")),n.threshold=(t=function(e,t,n){return e===undefined?n:"number"!=typeof e?(r(t,"invalid_type"),n):Number.isFinite(e)?e<=0?(r(t,"out_of_range"),n):e:(r(t,"invalid_number"),n)})(e.threshold,"lagMonitor.threshold",pO.threshold),n.noResponseThreshold=t(e.noResponseThreshold,"lagMonitor.noResponseThreshold",pO.noResponseThreshold),e.sampleRate!==undefined&&("number"!=typeof e.sampleRate?r("lagMonitor.sampleRate","invalid_type"):Number.isFinite(e.sampleRate)?e.sampleRate<0||1<e.sampleRate?r("lagMonitor.sampleRate","out_of_range"):n.sampleRate=e.sampleRate:r("lagMonitor.sampleRate","invalid_number")),n.noResponseThreshold<=n.threshold&&(n.noResponseThreshold=Math.max(5e3,n.threshold+1),r("lagMonitor.noResponseThreshold","relation_conflict")),n);if(a.enabled&&"undefined"!=typeof PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")&&(i=a.sampleRate,Math.random()<i)){var i,s=[],u={observer:null,lagRecords:s,sampled:!0,destroyed:!1,onDestroy:function(){return gO(o)}};mO.set(o,u),o.lifeCycle.on("destroy",u.onDestroy);try{u.observer=new PerformanceObserver(function(e){if(!u.destroyed)try{e.getEntries().forEach(function(e){var t,n,r,i;u.destroyed||e.duration<=a.threshold||(t=null==(t=e.scripts)?void 0:t[0],e={name:e.name,timestamp:Date.now(),entryType:e.entryType,startTime:e.startTime,duration:e.duration,invoker:null==t?void 0:t.invoker,sourceURL:null==t?void 0:t.sourceURL},s.push(e),100<s.length&&s.shift(),t=o,r=(e=e).duration>=(n=a).noResponseThreshold,i=_d(t),e={event_id:Oc(),event_type:r?P.NO_RESPONSE:P.LAG_DETECTED,event_category:r?Cc.ERROR:Cc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href,data:A(A({measurements:{duration:fO(e.duration),start_time_ms:fO(e.startTime),lag_threshold_ms:n.threshold,no_response_threshold_ms:n.noResponseThreshold},event_properties:{entry_type:e.entryType||"long-animation-frame",source_url:hO(e.sourceURL,2048),invoker:hO(e.invoker,256)}},i?{replay_id:i}:{}),{tags:{environment:(null==(r=t.config)?void 0:r.env)||"production",version:String((null==(n=t.config)?void 0:n.version)||"")}})},t.reportTDEMEvent(e))})}catch(i){}}),u.observer.observe({type:"long-animation-frame",buffered:!1})}catch(D){gO(o)}}},getLagRecords:function(e){return kl((null==(e=mO.get(e))?void 0:e.lagRecords)||[])},destroy:function(){Array.from(mO.keys()).forEach(gO)}}),yO={enabled:!0,containers:["body","html","#app","#root"],ignoreContainers:[],containerMatchers:{tagName:["body","html"],id:["app","root"],className:[]},ignoreMatchers:{tagName:[],id:[],className:[]},detectStartPosition:{x:0,y:0},emptyElementsPercent:70,sameElementsPercent:70,debounceDuration:2e3,everySideSampleNumber:9,disableSameElementsCheck:!0,ignoreElesWhenDomChange:[],reDetectInterval:2e3,samePointDepth:5,customBlankScreenDector:null},wO=["canvas","img","svg","iframe"],bO=(0,function(e){var t=e.nodeName.toLowerCase(),n=e.id||"",e="string"==typeof(e=e).className?e.className:e.getAttribute("class")||"",r=e.split(" ").filter(Boolean).map(function(e){return"."+e}).join("");return{tagName:t,id:n,className:e,selector:t+(n?"#"+n:"")+r}}),kO=function(t,e){var n;if(null!=(n=null==e?void 0:e.tagName)&&n.some(function(e){return t.tagName===e.toLowerCase().trim()}))return!0;if(t.id&&null!=(n=null==e?void 0:e.id)&&n.some(function(e){return t.id===e.trim()}))return!0;if(t.className&&null!=(n=null==e?void 0:e.className)&&n.length){var r=t.className.split(" ").map(function(e){return e.trim()}).filter(Boolean);if(e.className.some(function(e){return r.includes(e.trim())}))return!0}return!1},SO=function(t,e){return e.some(function(e){return t.selector.includes(e)})},_O=function(e){return{tagName:kl(e.tagName||[]),id:kl(e.id||[]),className:kl(e.className||[])}},EO=function(){return A(A({},yO),{containers:kl(yO.containers),ignoreContainers:kl(yO.ignoreContainers),containerMatchers:_O(yO.containerMatchers),ignoreMatchers:_O(yO.ignoreMatchers),detectStartPosition:A({},yO.detectStartPosition),ignoreElesWhenDomChange:kl(yO.ignoreElesWhenDomChange)})},CO=function(e,t){void 0===t&&(t=2);t=Math.pow(10,t);return Math.round(e*t)/t},RO=new Map,OO=function(e){var t,n=RO.get(e);n&&(n.destroyed=!0,n.detectTimer&&clearTimeout(n.detectTimer),n.bodyWaitTimer&&clearTimeout(n.bodyWaitTimer),null!==n.idleCallbackId&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(n.idleCallbackId),n.idleCallbackId=null),null!==n.bodyWaitFrame&&(window.cancelAnimationFrame||clearTimeout)(n.bodyWaitFrame),null!=(t=n.observer)&&t.disconnect(),e.lifeCycle.remove("errorOccurred",n.onErrorOccurred),e.lifeCycle.remove("destroy",n.onDestroy),window.removeEventListener("pagehide",n.handlePageHide),window.removeEventListener("beforeunload",n.handleBeforeUnload),document.removeEventListener("visibilitychange",n.handleVisibilityChange),RO["delete"](e))},xO=new c({name:"blankScreen",onNewTdem:function(S,e){var _,E,C,R,O,t,x,n,r,i,o,a,s,u,l,c,d,f,h,p,m,g=this;"undefined"!=typeof document&&document.elementsFromPoint&&(e=e,void 0===(s=null!=(m=S.config)&&m.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(s=function(){return undefined}),m=EO(),(_=!1===e?A(A({},m),{enabled:!1}):!0===e||e===undefined?m:!e||"object"!==T(e)||Array.isArray(e)?(s("blankScreen","invalid_type"),m):(u="containerMatchers"in(e=e)||"ignoreMatchers"in e,p="containers"in e||"ignoreContainers"in e,l=function(e,t,n,r){return e===undefined?kl(t):Array.isArray(e)&&e.length<=100&&e.every(function(e){return"string"==typeof e&&0<e.trim().length&&e.trim().length<=r})?e.map(function(e){return e.trim()}):(s(n,"invalid_array"),kl(t))},h=function(e,t,n){return e===undefined?_O(t):!e||"object"!==T(e)||Array.isArray(e)?(s(n,"invalid_type"),_O(t)):{tagName:l((e=e).tagName,t.tagName||[],n+".tagName",128),id:l(e.id,t.id||[],n+".id",128),className:l(e.className,t.className||[],n+".className",128)}},c=function(e,t,n,r){return e===undefined?t:"number"!=typeof e?(s(n,"invalid_type"),t):Number.isFinite(e)?r(e)?e:(s(n,"out_of_range"),t):(s(n,"invalid_number"),t)},d=function(e,t,n,r,i){return c(e,t,n,function(e){return Number.isInteger(e)&&r<=e&&e<=i})},f=EO(),e.enabled!==undefined&&("boolean"==typeof e.enabled?f.enabled=e.enabled:s("blankScreen.enabled","invalid_type")),f.containers=l(e.containers,m.containers,"blankScreen.containers",256),f.ignoreContainers=l(e.ignoreContainers,m.ignoreContainers,"blankScreen.ignoreContainers",256),f.containerMatchers=h(e.containerMatchers,m.containerMatchers,"blankScreen.containerMatchers"),f.ignoreMatchers=h(e.ignoreMatchers,m.ignoreMatchers,"blankScreen.ignoreMatchers"),p&&!u&&(f.containerMatchers={tagName:[],id:[],className:[]},f.ignoreMatchers={tagName:[],id:[],className:[]}),(h=e.detectStartPosition)===undefined||h&&"object"===T(h)&&!Array.isArray(h)?f.detectStartPosition={x:c((p=h||{}).x,m.detectStartPosition.x,"blankScreen.detectStartPosition.x",function(e){return 0<=e}),y:c(p.y,m.detectStartPosition.y,"blankScreen.detectStartPosition.y",function(e){return 0<=e})}:s("blankScreen.detectStartPosition","invalid_type"),f.emptyElementsPercent=c(e.emptyElementsPercent,m.emptyElementsPercent,"blankScreen.emptyElementsPercent",function(e){return 0<e&&e<=100}),f.sameElementsPercent=c(e.sameElementsPercent,m.sameElementsPercent,"blankScreen.sameElementsPercent",function(e){return 0<e&&e<=100}),f.debounceDuration=c(e.debounceDuration,m.debounceDuration,"blankScreen.debounceDuration",function(e){return 0<=e}),f.reDetectInterval=c(e.reDetectInterval,m.reDetectInterval,"blankScreen.reDetectInterval",function(e){return 0<e}),f.everySideSampleNumber=d(e.everySideSampleNumber,m.everySideSampleNumber,"blankScreen.everySideSampleNumber",2,50),f.samePointDepth=d(e.samePointDepth,m.samePointDepth,"blankScreen.samePointDepth",1,20),e.disableSameElementsCheck!==undefined&&("boolean"==typeof e.disableSameElementsCheck?f.disableSameElementsCheck=e.disableSameElementsCheck:s("blankScreen.disableSameElementsCheck","invalid_type")),f.ignoreElesWhenDomChange=l(e.ignoreElesWhenDomChange,m.ignoreElesWhenDomChange,"blankScreen.ignoreElesWhenDomChange",256),e.customBlankScreenDector!==undefined&&(null===e.customBlankScreenDector||"function"==typeof e.customBlankScreenDector?f.customBlankScreenDector=e.customBlankScreenDector:s("blankScreen.customBlankScreenDector","invalid_type")),f)).enabled)&&(u=function(e,t,n){e=4*e-3;return{totalSamplePoints:e,whitePointThreshold:Math.floor(e*t/100),samePointThreshold:Math.floor(e*n/100)}}(_.everySideSampleNumber,_.emptyElementsPercent,_.sameElementsPercent),E=u.totalSamplePoints,C=u.whitePointThreshold,R=u.samePointThreshold,O={observer:null,detectTimer:null,bodyWaitTimer:null,bodyWaitFrame:null,idleCallbackId:null,destroyed:!1,initialDetectionPending:!0,incidentStatus:"healthy",preDetectResult:null,triggerType:"dom_change",onErrorOccurred:function(){return undefined},onDestroy:function(){return OO(S)},handlePageHide:function(){return undefined},handleBeforeUnload:function(){return undefined},handleVisibilityChange:function(){return undefined}},RO.set(S,O),t=function(){return wl(g,void 0,void 0,function(){var l,c,d,f,h,p,m,g,v,y,w,b,k;return bl(this,function(e){var t,n,r,i,o,a,s,u;if(!O.destroyed)try{if("initial_load"===O.triggerType&&(O.initialDetectionPending=!1),l=window.innerHeight,c=window.innerWidth,d=_.detectStartPosition,f=d.x,h=d.y,c<=f||l<=h)return[2];if(p=[],g=m=0,function(e,t,n,r){for(var i=r.x,o=r.y,a=i+(e-i)/2,s=o+(t-o)/2,u=n+1,l=[],c=1;c<u;c+=1){var d=i+(e-i)*c/u,f=o+(t-o)*c/u;l.push({x:d,y:s}),c!==u/2&&l.push({x:a,y:f},{x:d,y:f},{x:d,y:t-f})}return l}(c,l,_.everySideSampleNumber,_.detectStartPosition).forEach(function(e){a=e.x,s=e.y,e=document.elementsFromPoint(a,s),e=(u=function(e){var t=e[0];if(t&&null!==t.shadowRoot){t=(null==(t=t.shadowRoot)?void 0:t.elementsFromPoint(a,s))||[];if(t.length>e.length)return u(t)}return e})(e),t=_.containers,n=_.ignoreContainers,r=_.containerMatchers,l=_.ignoreMatchers,e=e.map(bO),o=e.map(function(e){return e.selector});var t,n,r,i,o,a,s,u,l=(e=e[0])?(r=(i=!(!r||!(null!=(i=r.tagName)&&i.length||null!=(i=r.id)&&i.length||null!=(i=r.className)&&i.length)))?kO(e,r):SO(e,t),t=i?kO(e,l):SO(e,n),{isWhitePoint:r&&!t,selectorPointers:o}):{isWhitePoint:!1,selectorPointers:o};l.isWhitePoint&&(m+=1),p.push(l.selectorPointers)}),v=C<=m,y=!1,_.disableSameElementsCheck||(w=p.map(function(e){return e.slice(0,_.samePointDepth)}),o={},w.map(function(e){return e.join(" < ")}).forEach(function(e){o[e]=o[e]?o[e]+1:1}),a=Object.keys(o).map(function(e){return[e,o[e]]}).sort(function(e,t){return t[1]-e[1]})[0]||["",0],s=a[0],b={samePointerMap:o,maximumSamePointerClass:s,maximumSamePointerCounter:a[1]},y=R<=(g=b.maximumSamePointerCounter)&&(u=b.maximumSamePointerClass,!wO.some(function(e){return u.startsWith(e)}))),k=!1,_.customBlankScreenDector)try{k=!0===_.customBlankScreenDector()}catch(J){k=!1}if(!(v||y||k))return O.incidentStatus="healthy",O.preDetectResult=null,[2];if("reported"===O.incidentStatus)return[2];if("suspect"===O.incidentStatus&&O.preDetectResult)return t=O.preDetectResult,r=t.customTriggered?"custom":t.whitePointTriggered&&t.sameElementTriggered?"both":t.whitePointTriggered?"white_point":"same_element",i=_d(S),t={event_id:Oc(),event_type:P.BLANK_SCREEN,event_category:Cc.ERROR,timestamp:Date.now(),page_url:(null==(n=S.getOriginFrom)?void 0:n.call(S))||window.location.href,data:A(A({measurements:{white_point_count:t.whitePointCount,same_point_count:t.samePointCount,total_sample_points:E,white_point_threshold:C,same_point_threshold:R,white_point_ratio:CO(t.whitePointCount/E,6),same_point_ratio:CO(t.samePointCount/E,6),viewport_width_px:Math.max(0,Math.round(window.innerWidth)),viewport_height_px:Math.max(0,Math.round(window.innerHeight))},event_properties:{trigger_reason:r,trigger_type:t.triggerType,detection_method:t.customTriggered?"custom_detector":"viewport_sampling",same_elements_check_enabled:String(!_.disableSameElementsCheck)}},i?{replay_id:i}:{}),{tags:{environment:(null==(n=S.config)?void 0:n.env)||"production",version:String((null==(r=S.config)?void 0:r.version)||"")}})},S.reportTDEMEvent(t),O.incidentStatus="reported",O.preDetectResult=null,[2];O.preDetectResult={whitePointCount:m,samePointCount:g,whitePointTriggered:v,sameElementTriggered:y,customTriggered:k,triggerType:O.triggerType},O.incidentStatus="suspect",O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},_.reDetectInterval)}catch(J){}return[2]})})},x=function(){return wl(g,void 0,void 0,function(){return bl(this,function(e){switch(e.label){case 0:if(O.destroyed)return[2];if("function"!=typeof window.requestIdleCallback)return[3,5];e.label=1;case 1:return e.trys.push([1,2,,4]),O.idleCallbackId=window.requestIdleCallback(function(e){O.idleCallbackId=null,O.destroyed||(0<e.timeRemaining()?t():O.detectTimer=setTimeout(function(){O.detectTimer=null,t()},0))}),[3,4];case 2:return e.sent(),[4,t()];case 3:return e.sent(),[3,4];case 4:return[3,7];case 5:return[4,t()];case 6:e.sent(),e.label=7;case 7:return[2]}})})},n=function(e){void 0===e&&(e="dom_change"),O.destroyed||"suspect"===O.incidentStatus||"initial_load"!==e&&O.initialDetectionPending||(O.triggerType=e,O.detectTimer&&clearTimeout(O.detectTimer),O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},_.debounceDuration))},O.onErrorOccurred=function(){return n("error")},S.lifeCycle.on("errorOccurred",O.onErrorOccurred),S.lifeCycle.on("destroy",O.onDestroy),r=function(){!O.destroyed&&document.body&&(O.observer=new MutationObserver(function(e){var t=null==(t=e[0])?void 0:t.target;if(1===e.length&&t instanceof Element){e=bO(t).selector;if(_.ignoreElesWhenDomChange.includes(e))return}n("dom_change")}),O.observer.observe(document.body,{childList:!0,subtree:!0}))},document.body?r():(i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=function(){document.body?(O.bodyWaitTimer&&clearTimeout(O.bodyWaitTimer),r()):O.bodyWaitFrame=i(o)},O.bodyWaitFrame=i(o),O.bodyWaitTimer=setTimeout(function(){null!==O.bodyWaitFrame&&((window.cancelAnimationFrame||clearTimeout)(O.bodyWaitFrame),O.bodyWaitFrame=null)},1e4)),O.handlePageHide=a=function(){O.destroyed||(O.detectTimer&&clearTimeout(O.detectTimer),O.triggerType="page_state",O.preDetectResult&&(O.preDetectResult.triggerType="page_state"),t())},O.handleBeforeUnload=a,O.handleVisibilityChange=function(){"hidden"===document.visibilityState&&a()},window.addEventListener("pagehide",O.handlePageHide),window.addEventListener("beforeunload",O.handleBeforeUnload),document.addEventListener("visibilitychange",O.handleVisibilityChange),n("initial_load"))},destroy:function(){Array.from(RO.keys()).forEach(OO)}}),TO={enabled:!0,enableMemoryReport:!0,enableOOMReport:!0,oomThreshold:100,memoryReportInterval:6e4,oomCheckInterval:1e4,monitorPages:[],sampleRate:1},MO=new Map,IO=function(e,t,n){null!=(e=null==e?void 0:e.config)&&e.debug&&"undefined"!=typeof console&&console.warn("[TDEM] "+t+": "+n+", fallback applied")},AO=function(e){return"number"==typeof e&&Number.isFinite(e)},PO=function(){var e;try{var t=null==(e=window.performance)?void 0:e.memory;return!t||!AO(t.usedJSHeapSize)||!AO(t.totalJSHeapSize)||!AO(t.jsHeapSizeLimit)||t.usedJSHeapSize<0||t.totalJSHeapSize<0||t.jsHeapSizeLimit<0?null:{used:t.usedJSHeapSize,total:t.totalJSHeapSize,limit:t.jsHeapSizeLimit,ratio:0<t.jsHeapSizeLimit?Math.min(1,t.usedJSHeapSize/t.jsHeapSizeLimit):0}}catch(S){return null}},LO=function(e){var t=MO.get(e);t&&(t.destroyed=!0,t.reportTimer&&clearInterval(t.reportTimer),t.oomCheckTimer&&clearInterval(t.oomCheckTimer),t.records.length=0,e.lifeCycle.remove("destroy",t.onDestroy),"undefined"!=typeof window&&(window.removeEventListener("pagehide",t.onPageExit),window.removeEventListener("beforeunload",t.onPageExit)),MO["delete"](e))},DO=function(e,t,n){var r,i,o;t.destroyed||(i=PO())&&(t.records.push(i),50<t.records.length&&t.records.shift(),o=_d(e),n={event_id:Oc(),event_type:n,event_category:Cc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=e.getOriginFrom)?void 0:r.call(e))||window.location.href,data:A(A({measurements:A({used_js_heap_size_bytes:i.used,total_js_heap_size_bytes:i.total,js_heap_size_limit_bytes:i.limit,usage_ratio:i.ratio},n===P.MEMORY_OOM?{oom_threshold_mb:t.config.oomThreshold}:{}),event_properties:{detection_source:"performance_memory"}},o?{replay_id:o}:{}),{tags:{environment:(null==(r=e.config)?void 0:r.env)||"production",version:String((null==(i=e.config)?void 0:i.version)||"")}})},e.reportTDEMEvent(n))},Ov=new c({name:"memoryMonitor",onNewTdem:function(n,t){r=n;var r,i,o,a,e,s,u=!1===(e=t)?A(A({},TO),{enabled:!1}):(i=e&&"object"===T(e)?e:{},e===undefined||!0===e||e&&"object"===T(e)&&!Array.isArray(e)||IO(r,"memoryMonitor","invalid_type"),o=A(A({},TO),{oomThreshold:0<(e=(null==(e=PO())?void 0:e.limit)||0)?Math.round(e/1024/1024*.9):100}),["enabled","enableMemoryReport","enableOOMReport"].forEach(function(e){i[e]!==undefined&&("boolean"==typeof i[e]?o[e]=i[e]:IO(r,"memoryMonitor."+e,"invalid_type"))}),["oomThreshold","memoryReportInterval","oomCheckInterval"].forEach(function(e){var t=i[e];t!==undefined&&(AO(t)&&0<t?o[e]=t:IO(r,"memoryMonitor."+e,AO(t)?"out_of_range":"invalid_number"))}),i.sampleRate!==undefined&&(AO(i.sampleRate)&&0<=i.sampleRate&&i.sampleRate<=1?o.sampleRate=i.sampleRate:IO(r,"memoryMonitor.sampleRate","out_of_range")),i.monitorPages!==undefined&&(Array.isArray(i.monitorPages)&&i.monitorPages.length<=100&&i.monitorPages.every(function(e){return"string"==typeof e&&!!e||e instanceof RegExp})?o.monitorPages=kl(i.monitorPages):IO(r,"memoryMonitor.monitorPages","invalid_value")),o);!u.enabled||!function(){var e;try{return"undefined"!=typeof window&&null!=(e=window.performance)&&e.memory}catch(t){}}()||Math.random()>=u.sampleRate||(e=u.monitorPages).length&&(s="undefined"==typeof window?"":window.location.href,!e.some(function(e){return"string"==typeof e?s.includes(e):(e.lastIndex=0,e.test(s))}))||(a={config:u,reportTimer:null,oomCheckTimer:null,lastOOMTime:0,records:[],destroyed:!1,onDestroy:function(){return LO(n)},onPageExit:function(){return LO(n)}},MO.set(n,a),n.lifeCycle.on("destroy",a.onDestroy),"undefined"!=typeof window&&(window.addEventListener("pagehide",a.onPageExit),window.addEventListener("beforeunload",a.onPageExit)),u.enableMemoryReport&&(a.reportTimer=setInterval(function(){return DO(n,a,P.MEMORY_USAGE)},u.memoryReportInterval)),u.enableOOMReport&&(a.oomCheckTimer=setInterval(function(){var e=PO(),t=Date.now();e&&e.used/1024/1024>u.oomThreshold&&3e5<t-a.lastOOMTime&&(a.lastOOMTime=t,DO(n,a,P.MEMORY_OOM))},u.oomCheckInterval)))},destroy:function(){Array.from(MO.keys()).forEach(LO)}});function NO(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:n.replay_sample_rate!==undefined?Number(n.replay_sample_rate):1,errorTraceback:n.error_traceback,errorSampleRate:n.error_sample_rate,remoteEnabled:n.enabled,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(r))}catch(N0){}}function FO(e){return e._tdemSampleGate||null}function UO(e,t,n){e=FO(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random(),e.decide(n<t)):console.warn("[TDEM] Sample gate not found")}function jO(e,t){var t=oO(e.config.sessionReplay,t),e=(e._effectiveReplayPolicy=t,e._replaySampled=t.enabled,null==(n=null==(e=e.constructor.installedPlugins)?void 0:e.find)?void 0:n.call(e,function(e){return e&&"sessionReplay"===e.name})),n=null==(n=null==e?void 0:e.option)?void 0:n.applyEffectivePolicy;"function"==typeof n&&n.call(e.option,t)}function zO(e){var t={};return e&&"object"===T(e)&&(Object.prototype.hasOwnProperty.call(e,"enabled")&&(t.enabled=!!e.enabled),Object.prototype.hasOwnProperty.call(e,"replay_sample_rate")&&(t.replay_sample_rate=Number(e.replay_sample_rate)),Object.prototype.hasOwnProperty.call(e,"error_traceback")&&(t.error_traceback=!!e.error_traceback),Object.prototype.hasOwnProperty.call(e,"error_sample_rate"))&&(t.error_sample_rate=Number(e.error_sample_rate)),t}function BO(e,t,n){var r,i=FO(e);i&&((t=t?function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5?t:null:null}catch(N0){return null}}(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate),n._cachedSampleRate=t.sampleRate,r={},t.remoteEnabled!==undefined&&(r.enabled=t.remoteEnabled),t.replaySampleRate!==undefined&&(r.replay_sample_rate=t.replaySampleRate),t.errorTraceback!==undefined&&(r.error_traceback=t.errorTraceback),t.errorSampleRate!==undefined&&(r.error_sample_rate=t.errorSampleRate),n._cachedRemote=r,n=t.remoteEnabled!==undefined?!!t.remoteEnabled:0<t.sampleRate,UO(e,t.sampleRate,n),jO(e,r)):(console.warn("[TDEM] No cached config, default to not report"),i.decide(!1),jO(e,null)))}var WO=new c({name:"tdemConfig",_cachedSampleRate:null,_cachedRemote:null,onNewTdem:function(e){var t=this,n=e._prefetchedConfigData;jO(e,n?zO(n):null),function(u,l){wl(this,void 0,void 0,function(){var n,r,i,o,a,s;return bl(this,function(e){switch(e.label){case 0:if(!(n=u.config.id))return BO(u,n,l),[2];if(r=u._prefetchedConfigData)return delete u._prefetchedConfigData,i=r.tdem_sample_rate,o=r.enabled,a=zO(r),NO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,UO(u,i,o),jO(u,a),[2];if(t=(u.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return BO(u,n,l),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,u.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(s=e.sent()).ok)throw new Error("HTTP "+s.status);if(0===(s="string"==typeof s.body?JSON.parse(s.body):s.body).code&&s.data)return i=s.data.tdem_sample_rate,o=s.data.enabled,a=zO(s.data),NO(n,i,a),l._cachedSampleRate=i,l._cachedRemote=a,UO(u,i,o),jO(u,a),[3,4];throw new Error("API error: code="+s.code);case 3:return s=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",s),BO(u,n,l),[3,4];case 4:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=FO(e);n&&n.isDecided&&null!==(t=this._cachedSampleRate)&&t!==undefined&&(t=n.reDecide(t),n=e._effectiveReplayPolicy,e._replaySampled=t&&(!n||n.enabled),console.info("[TDEM] Session refreshed, session="+t+", replayPolicyEnabled="+(null==n?void 0:n.enabled)))}});return Qg.use(n),Qg.use(Yd),Qg.use(qr),Qg.use(o),Qg.use(s),Qg.use(zd),Qg.use(Kd),Qg.use(Od),Qg.use(Ud),Qg.use(Wt),Qg.use(Id),Qg.use(Ft),Qg.use(WO),Qg.use(e),Qg.use(dO),Qg.use(vO),Qg.use(xO),Qg.use(Ov),Qg});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function _(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function i(e){w(r,t,n,i,o,"next",e)}function o(e){w(r,t,n,i,o,"throw",e)}i(void 0)})}}function u(e,t,n){t=U(t);var r=e,e=B()?Reflect.construct(t,n||[],U(e).constructor):t.apply(e,n);if(!e||"object"!=typeof e&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t,n){var r;return B()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&G(t,n.prototype),t)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function k(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a["return"]||a["return"]()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=K(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function N(e,t,n){return(t=Z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(){return(F="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=J(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(B=function(){return!!e})()}function z(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach(function(e){N(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function W(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function H(){var p,m,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,a,s,u,l,c,d,f,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return q(t,"_invoke",(i=e,o=n,c=r||[],d=!1,f={p:l=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,t){return a=e,s=0,u=p,f.n=t,g}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(d&&1===t&&h(t,n),s=t,u=n;(m=s<2?p:u)||!d;){a||(s?s<3?(1<s&&(f.n=-1),h(s,u)):f.n=u:f.v=u);try{if(l=2,a){if(m=a[e=s?e:"next"]){if(!(m=m.call(a,u)))throw TypeError("iterator result is not an object");if(!m.done)return m;u=m.value,s<2&&(s=0)}else 1===s&&(m=a["return"])&&m.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),s=1);a=p}else if((m=(d=f.n<0)?u:i.call(o,f))!==g)break}catch(m){a=p,s=1,u=m}finally{l=1}}return{value:m,done:d}}),!0),t;function h(e,t){for(s=e,u=t,m=0;!d&&l&&!n&&m<c.length;m++){var n,r=c[m],i=f.p,o=r[2];3<e?(n=o===t)&&(u=r[(s=r[4])?5:s=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(s=0,f.v=t,f.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,f.n=o,s=0))}if(n||1<e)return g;throw d=!0,t}}var g={};function v(){}function i(){}function o(){}m=Object.getPrototypeOf;var e=[][t]?m(m([][t]())):(q(m={},t,function(){return this}),m),a=o.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,q(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return q(a,"constructor",i.prototype=o),q(o,"constructor",i),q(o,n,i.displayName="GeneratorFunction"),q(a),q(a,n,"Generator"),q(a,t,function(){return this}),q(a,"toString",function(){return"[object Generator]"}),(H=function(){return{w:r,m:s}})()}function q(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(q=function(e,t,n,r){function i(t,n){q(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,r)}function V(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function G(e,t){return(G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||K(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=U(e)););return e}function $(e,t,n,r){var i=F(U(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ne(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||K(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e){e=function(e){if("object"!=typeof e||!e)return e;var t;if("undefined"==typeof Symbol||void 0===(t=e[Symbol.toPrimitive]))return String(e);e=t.call(e,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){var n;if(e)return"string"==typeof e?m(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}function Y(e){var n="function"==typeof Map?new Map:void 0;return(Y=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(KS){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return Le(e,arguments,U(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),G(t,e)})(e)}var g=function(e){try{return!!e()}catch(w){return!0}},R=void 0,Q=void 0,v=(R({target:"Array",stat:!0},{isArray:Q}),void 0),ee=v({}.toString),te=v("".slice),ne=function(e){return te(ee(e),8,-1)},re=(Array.isArray,"object"==("undefined"==typeof document?"undefined":T(document))&&document.all),S=void 0===re&&re!==undefined?function(e){return"function"==typeof e||e===re}:function(e){return"function"==typeof e},O=function(e){return"object"==T(e)?null!==e:S(e)},ie=function(e){return null===e||e===undefined},oe=TypeError,ae=function(e){if(ie(e))throw new oe("Can't call method on "+e);return e},se=Object,ue=function(e){return se(ae(e))},le=void 0,ce=(R({target:"Math",stat:!0},{trunc:le}),Math.ceil,function(e){e=+e;return e!=e||0==e?0:le(e)}),de=Math.min,fe=function(e){e=ce(e);return 0<e?de(e,9007199254740991):0},he=function(e){return fe(e.length)},pe=TypeError,me=function(e){if(9007199254740991<e)throw new pe("Maximum allowed index exceeded");return e},x=void 0,ge=x.document,ve=O(ge)&&O(ge.createElement),ye=function(e){return ve?ge.createElement(e):{}},f=void 0,e=(f||g(function(){return 7!==Object.defineProperty(ye("div"),"a",{get:function(){return 7}}).a}),f&&g(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})),we=String,be=TypeError,E=function(e){if(O(e))return e;throw new be(we(e)+" is not an object")},ke=!g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),_e=Function.prototype.call,I=ke?_e.bind(_e):function(){return _e.apply(_e,arguments)},Se=function(e,t){return arguments.length<2?(n=x[e],S(n)?n:undefined):x[e]&&x[e][t];var n},Ee=v({}.isPrototypeOf),Ce=String,Re=function(e){try{return Ce(e)}catch(w){return"Object"}},Oe=TypeError,xe=function(e){if(S(e))return e;throw new Oe(Re(e)+" is not a function")},Te=void 0,Ie=!g(function(){Reflect.apply(function(){})}),Ie=(R({target:"Reflect",stat:!0,forced:Ie},{apply:function(e,t,n){return Te(xe(e),t,E(n))}}),Function.prototype),Fe=Ie.apply,Ie=Ie.call,Ue=("object"==("undefined"==typeof Reflect?"undefined":T(Reflect))&&Reflect.apply||ke&&Ie.bind(Fe),v({}.hasOwnProperty)),M=Object.hasOwn||function(e,t){return Ue(ue(e),t)},Fe=Function.prototype,Ie=f&&Object.getOwnPropertyDescriptor,je=M(Fe,"name"),Be={EXISTS:je,PROPER:je&&"something"===function(){}.name,CONFIGURABLE:je&&(!f||Ie(Fe,"name").configurable)},je=function(e,t){var n=[][e];return!!n&&g(function(){n.call(null,t||function(){return 1},1)})},ze=void 0,We=void 0,He=v([].join),Fe=ze!==Object||!je("join",","),Ie=(R({target:"Array",proto:!0,forced:Fe},{join:function(e){return He(We(this),e===undefined?",":e)}}),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function qe(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var Ve=Object.defineProperty,Ge=function(e,t){try{Ve(x,e,{value:t,configurable:!0,writable:!0})}catch(_){x[e]=t}return t},Je=qe(function(e){e=e.exports=x["__core-js_shared__"]||Ge("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.51.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.51.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),$e=v(Function.toString);S(Je.inspectSource)||(Je.inspectSource=function(e){return $e(e)});var Ze,Ke=Je.inspectSource,Ye=void 0,Xe=Ye("toStringTag"),Qe=Object,et="Arguments"===ne(function(){return arguments}()),tt=function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=Qe(e),Xe))?n:et?ne(e):"Object"===(t=ne(e))&&S(e.callee)?"Arguments":t},nt=String,C=function(e){if("Symbol"===tt(e))throw new TypeError("Cannot convert a Symbol value to a string");return nt(e)},Fe=(Ze=!1,(Fe=/[ac]/).exec=function(){return Ze=!0,/./.exec.apply(this,arguments)},!0===Fe.test("abc")&&Ze),rt=/./.test,Fe=(R({target:"RegExp",proto:!0,forced:!Fe},{test:function(e){var t=E(this),e=C(e),n=t.exec;return S(n)?null!==(n=I(n,t,e))&&(E(n),!0):I(rt,t,e)}}),x.WeakMap),Fe=S(Fe)&&/native code/.test(String(Fe)),it=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ot=void 0,at=f?function(e,t,n){return ot.f(e,t,it(1,n))}:function(e,t,n){return e[t]=n,e},st=void 0,ut=st.f,lt=(R({target:"Object",stat:!0,forced:Object.defineProperties!==ut,sham:!f},{defineProperties:ut}),void 0),ut=g(function(){lt(1)}),ut=(R({target:"Object",stat:!0,forced:ut},{keys:function(e){return lt(ue(e))}}),function(e){if("Function"===ne(e))return v(e)}),ct=Math.max,dt=Math.min,ft=function(e,t){e=ce(e);return e<0?ct(e+t,0):dt(e,t)},t=function(s){return function(e,t,n){var r=We(e),i=he(r);if(0!==i){var o,a=ft(n,i);if(s&&t!=t){for(;a<i;)if((o=r[a++])!=o)return!0}else for(;a<i;a++)if((s||a in r)&&r[a]===t)return s||a||0}return!s&&-1}},t={includes:t(!0),indexOf:t(!1)},ht=t.indexOf,pt=ut([].indexOf),mt=!!pt&&1/pt([1],1,-0)<0,n=mt||!je("indexOf");R({target:"Array",proto:!0,forced:n},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return mt?pt(this,e,t)||0:ht(this,e,t)}});var gt,vt={},yt=(v([].push),["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),wt=(Object.keys,f&&!e&&Object.defineProperties,Se("document","documentElement")),n=void 0,bt=n("IE_PROTO"),kt=function(){},_t=function(e){return"<script>"+e+"<\/script>"},St=function(e){e.write(_t("")),e.close();var t=e.parentWindow.Object;return e=null,t},Et=function(){try{gt=new ActiveXObject("htmlfile")}catch(u){}var e;Et="undefined"==typeof document||document.domain&>?St(gt):((e=ye("iframe")).style.display="none",wt.appendChild(e),e.src=String("javascript:"),(e=e.contentWindow.document).open(),e.write(_t("document.F=Object")),e.close(),e.F);for(var t=yt.length;t--;)delete Et.prototype[yt[t]];return Et()},Ct=(vt[bt]=!0,Object.create||function(e,t){var n;return null!==e?(kt.prototype=E(e),n=new kt,kt.prototype=null,n[bt]=e):n=Et(),t===undefined?n:st.f(n,t)});R({target:"Object",stat:!0,sham:!f},{create:Ct});var Rt,Ot,xt,Tt,It=Object.create||Object,e=function(e,t){return Je[e]||(Je[e]=t||It(null))},Mt=0,At=Math.random(),Pt=v(1.1.toString),Lt=function(e){return"Symbol("+(e===undefined?"":e)+")_"+Pt(++Mt+At,36)},Dt=(e("keys"),x.TypeError),Nt=x.WeakMap,Ft=Fe||Je.state?((xt=Je.state||(Je.state=new Nt)).get=xt.get,xt.has=xt.has,xt.set=xt.set,Rt=function(e,t){if(xt.has(e))throw new Dt("Object already initialized");return t.facade=e,xt.set(e,t),t},Ot=function(e){return xt.get(e)||{}},function(e){return xt.has(e)}):(Tt=n("state"),vt[Tt]=!0,Rt=function(e,t){if(M(e,Tt))throw new Dt("Object already initialized");return t.facade=e,at(e,Tt,t),t},Ot=function(e){return M(e,Tt)?e[Tt]:{}},function(e){return M(e,Tt)}),Ut={set:Rt,get:Ot,has:Ft,enforce:function(e){return Ft(e)?Ot(e):Rt(e,{})},getterFor:function(t){return function(e){if(O(e)&&(e=Ot(e)).type===t)return e;throw new Dt("Incompatible receiver, "+t+" required")}}},jt=qe(function(e){var r=Be.CONFIGURABLE,i=Ut.enforce,t=Ut.get,o=String,a=Object.defineProperty,s=v("".slice),u=v("".replace),l=v([].join),c=f&&!g(function(){return 8!==a(function(){},"length",{value:8}).length}),d=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===s(o(t),0,7)&&(t="["+u(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!M(e,"name")||r&&e.name!==t)&&(f?a(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&M(n,"arity")&&e.length!==n.arity&&a(e,"length",{value:n.arity});try{n&&M(n,"constructor")&&n.constructor?f&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(B){}n=i(e);return M(n,"source")||(n.source=l(d,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return S(this)&&t(this).source||Ke(this)},"toString")}),Bt=function(e,t,n){return n.get&&jt(n.get,t,{getter:!0}),n.set&&jt(n.set,t,{setter:!0}),ot.f(e,t,n)},Nt=Be.EXISTS,zt=Function.prototype,Wt=v(zt.toString),Ht=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,qt=v(Ht.exec),Vt=(f&&!Nt&&Bt(zt,"name",{configurable:!0,get:function(){try{return qt(Ht,Wt(this))[1]}catch(m){return""}}}),function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(S(n)&&jt(n,o,r),r.global)i?e[t]=n:Ge(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(D){}i?e[t]=n:ot.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}),Gt=void 0,Jt=Ye("species"),$t=RegExp.prototype,Nt=function(r,e,t,n){var a,i=Ye(r),s=!g(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=s&&!g(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[Jt]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});s&&o&&!t||(a=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===Gt||o===$t.exec?s&&!i?{done:!0,value:I(a,t,n,r)}:{done:!0,value:I(e,n,t,r)}:{done:!1}}),Vt(String.prototype,r,o[0]),Vt($t,i,o[1])),n&&at($t[i],"sham",!0)},Zt=v("".charAt),Kt=v("".charCodeAt),Yt=v("".slice),zt=function(i){return function(e,t){var n,e=C(ae(e)),t=ce(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=Kt(e,t))<55296||56319<n||t+1===r||(r=Kt(e,t+1))<56320||57343<r?i?Zt(e,t):n:i?Yt(e,t,t+2):r-56320+(n-55296<<10)+65536}},zt={codeAt:zt(!1),charAt:zt(!0)},Xt=zt.charAt,Qt=function(e,t,n){return t+(n&&Xt(e,t).length||1)},en=function(e,t){t=e[t];return ie(t)?undefined:xe(t)},tn=Math.floor,nn=v("".charAt),rn=v("".replace),on=v("".slice),an=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,sn=/\$([$&'`]|\d{1,2})/g,un=x.RegExp,ln={correct:!g(function(){var e=!0;try{un(".","d")}catch(k){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(un.prototype,"flags").get.call(n)!==i||r!==i})},cn=function(){var e=E(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},dn=(f&&!ln.correct&&(Bt(RegExp.prototype,"flags",{configurable:!0,get:cn}),ln.correct=!0),RegExp.prototype),fn=ln.correct?function(e){return e.flags}:function(e){return ln.correct||!Ee(dn,e)||M(e,"flags")?e.flags:I(cn,e)},hn=TypeError,pn=function(e,t){var n=e.exec;if(S(n))return null!==(n=I(n,e,t))&&E(n),n;if("RegExp"===ne(e))return I(Gt,e,t);throw new hn("RegExp#exec called on incompatible receiver")},mn=Ye("replace"),gn=Math.max,vn=Math.min,yn=v([].concat),wn=v([].push),bn=v("".indexOf),kn=v("".slice),r="$0"==="a".replace(/./,"$0"),_n=!!/./[mn]&&""===/./[mn]("a","$0"),Sn=(Nt("replace",function(e,b,k){var _=_n?"$":"$0";return[function(e,t){var n=ae(this),r=O(e)?en(e,mn):undefined;return r?I(r,e,n,t):I(b,C(n),e,t)},function(e,t){var n=E(this),r=C(e),i=S(t),e=(i||(t=C(t)),C(fn(n)));if("string"==typeof t&&!~bn(t,_)&&!~bn(t,"$<")&&!~bn(e,"y")){var o=k(b,n,r,t);if(o.done)return o.value}var a,s=!!~bn(e,"g");s&&(a=!!~bn(e,"u")||!!~bn(e,"v"),n.lastIndex=0);for(var u,l=[];null!==(u=pn(n,r))&&(wn(l,u),s);)""===C(u[0])&&(n.lastIndex=Qt(r,fe(n.lastIndex),a));for(var c,d="",f=0,h=0;h<l.length;h++){for(var p=C((u=l[h])[0]),m=gn(vn(ce(u.index),r.length),0),g=[],v=1;v<u.length;v++)wn(g,(c=u[v])===undefined?c:String(c));var y=u.groups,w=i?(w=yn([p],g,m,r),y!==undefined&&wn(w,y),C(Te(t,undefined,w))):function(o,a,s,u,l,e){var c=s+o.length,d=u.length,t=sn;return l!==undefined&&(l=ue(l),t=an),rn(e,t,function(e,t){var n;switch(nn(t,0)){case"$":return"$";case"&":return o;case"`":return on(a,0,s);case"'":return on(a,c);case"<":n=l[on(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(d<i)return 0!==(r=tn(i/10))&&r<=d?u[r-1]===undefined?nn(t,1):u[r-1]+nn(t,1):e;n=u[i-1]}return n===undefined?"":n})}(p,r,m,g,y,t);f<=m&&(d+=kn(r,f,m)+w,f=m+p.length)}return d+kn(r,f)}]},!!g(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!r||_n),function(){}),En=Se("Reflect","construct"),Cn=/^\s*(?:class|function)\b/,Rn=v(Cn.exec),On=!Cn.test(Sn),xn=function(e){if(!S(e))return!1;try{return En(Sn,[],e),!0}catch(w){return!1}},r=function(e){if(!S(e))return!1;switch(tt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return On||!!Rn(Cn,Ke(e))}catch(w){return!0}},Tn=(r.sham=!0,!En||g(function(){var e;return xn(xn.call)||!xn(Object)||!xn(function(){e=!0})||e})?r:xn),In=TypeError,Mn=Object.getOwnPropertyDescriptor,An=f&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(m){return m instanceof TypeError}}()?function(e,t){if(Q(e)&&!Mn(e,"length").writable)throw new In("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Pn=v("".indexOf);Nt("match",function(r,s,u){return[function(e){var t=ae(this),n=O(e)?en(e,r):undefined;return n?I(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),n=C(e),e=u(s,t,n);if(e.done)return e.value;e=C(fn(t));if(!~Pn(e,"g"))return pn(t,n);for(var r=!!~Pn(e,"u")||!!~Pn(e,"v"),i=[],o=t.lastIndex=0;null!==(a=pn(t,n));){var a=C(a[0]);""===(i[o]=a)&&(t.lastIndex=Qt(n,fe(t.lastIndex),r)),o++}return 0===o?null:i}]});var Ln,Dn,Nn,Fn,Un,jn,Bn,zn,Wn,r=x.navigator,r=r&&r.userAgent,Hn=r?String(r):"",r=x.process,i=x.Deno,r=r&&r.versions||i&&i.version,i=r&&r.v8,qn=o=!(o=i?0<(tr=i.split("."))[0]&&tr[0]<4?1:+(tr[0]+tr[1]):o)&&Hn&&(!(tr=Hn.match(/Edge\/(\d+)/))||74<=tr[1])&&(tr=Hn.match(/Chrome\/(\d+)/))?+tr[1]:o,Vn=Ye("species"),r=function(t){return 51<=qn||!g(function(){var e=[];return(e.constructor={})[Vn]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Gn=void 0,Jn=void 0,i=r("slice"),$n=Ye("species"),Zn=Array,Kn=Math.max,Yn=(R({target:"Array",proto:!0,forced:!i},{slice:function(e,t){var n,r,i,o=We(this),a=he(o),s=ft(e,a),u=ft(t===undefined?a:t,a);if(Q(o)&&(n=o.constructor,(n=Tn(n)&&(n===Zn||Q(n.prototype))||O(n)&&null===(n=n[$n])?undefined:n)===Zn||n===undefined))return Jn(o,s,u);for(r=new(n===undefined?Zn:n)(Kn(u-s,0)),i=0;s<u;s++,i++)s in o&&Gn(r,i,o[s]);return An(r,i),r}}),v([].slice),void 0),Xn=Yn.f,Qn="object"==("undefined"==typeof window?"undefined":T(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],er={f:function(e){if(!Qn||"Window"!==ne(e))return Xn(We(e));try{return Xn(e)}catch(w){return Jn(Qn)}}},tr=er.f,o=g(function(){return!Object.getOwnPropertyNames(1)}),nr=(R({target:"Object",stat:!0,forced:o},{getOwnPropertyNames:tr}),yt.concat("length","prototype"),Object.getOwnPropertyNames,{f:Object.getOwnPropertySymbols}),rr=v([].concat),ir=Se("Reflect","ownKeys")||function(e){var t=Yn.f(E(e)),n=nr.f;return n?rr(t,n(e)):t},or=void 0,i=function(e,t,n){for(var r=ir(t),i=ot.f,o=or.f,a=0;a<r.length;a++){var s=r[a];M(e,s)||n&&M(n,s)||i(e,s,o(t,s))}},ar=x.Symbol,sr=ar&&ar.prototype,ur=(!f||!S(ar)||"description"in sr&&ar().description===undefined||(Ln={},i(o=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:C(arguments[0]),t=Ee(sr,this)?new ar(e):e===undefined?ar():ar(e);return""===e&&(Ln[t]=!0),t},ar),Dn=o["for"],o["for"]=function(e){var e=C(e),t=I(Dn,this,e);return""===e&&(Ln[t]=!0),t},(o.prototype=sr).constructor=o,Nn="Symbol(description detection)"===String(ar("description detection")),Fn=v(sr.valueOf),Un=v(sr.toString),jn=/^Symbol\((.*)\)[^)]+$/,Bn=v("".replace),zn=v("".slice),Bt(sr,"description",{configurable:!0,get:function(){var e=Fn(this);return M(Ln,e)?"":(e=Un(e),""===(e=Nn?zn(e,7,-1):Bn(e,jn,"$1"))?undefined:e)}}),R({global:!0,constructor:!0,forced:!0},{Symbol:o})),TypeError),lr=function(e,t){if(Ee(t,e))return e;throw new ur("Incorrect invocation")},tr=!g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),cr=void 0,i=g(function(){cr(1)}),o=(R({target:"Object",stat:!0,forced:i,sham:!tr},{getPrototypeOf:function(e){return cr(ue(e))}}),n("IE_PROTO"),Object),i=(o.prototype,tr&&o.getPrototypeOf,ot.f),dr=Ye("unscopables"),fr=Array.prototype,tr=(fr[dr]===undefined&&i(fr,dr,{configurable:!0,value:Ct(null)}),function(e){fr[dr][e]=!0}),hr=Object.create?Object.create(null):{},pr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},o=ye("span").classList,i=o&&o.constructor&&o.constructor.prototype,o=i===Object.prototype?undefined:i,mr=ot.f,gr=Ye("toStringTag"),vr=function(e,t,n){(e=e&&!n?e.prototype:e)&&!M(e,gr)&&mr(e,gr,{configurable:!0,value:t})},yr=void 0,wr=Ye("iterator"),br=yr.values,kr=function(e,t){if(e){if(e[wr]!==br)try{at(e,wr,br)}catch(u){e[wr]=br}if(vr(e,t,!0),pr[t])for(var n in yr)if(e[n]!==yr[n])try{at(e,n,yr[n])}catch(u){e[n]=yr[n]}}};for(Wn in pr)kr(x[Wn]&&x[Wn].prototype,Wn);kr(o,"DOMTokenList");var i=void 0,_r=i.IteratorPrototype,Sr=function(){return this},Er=function(e,t,n,r){t+=" Iterator";return e.prototype=Ct(_r,{next:it(+!r,n)}),vr(e,t,!1),hr[t]=Sr,e},Cr=void 0,Rr=(R({target:"Object",stat:!0},{setPrototypeOf:Cr}),String,TypeError,Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e){try{return v(xe(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(u){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(u){}}():undefined),Be.PROPER),Or=Be.CONFIGURABLE,xr=i.IteratorPrototype,Tr=i.BUGGY_SAFARI_ITERATORS,Ir=Ye("iterator"),Mr=function(){return this},Ar=function(e,t){return{value:e,done:t}},Pr=function(e,t,n,r,i,o,a){Er(n,t,r);var s,u,r=function(e){if(e===i&&h)return h;if(!Tr&&e&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,d=e.prototype,f=d[Ir]||d["@@iterator"]||i&&d[i],h=!Tr&&f||r(i),p="Array"===t&&d.entries||f;if(p&&(e=cr(p.call(new e)))!==Object.prototype&&e.next&&(cr(e)!==xr&&(Cr?Cr(e,xr):S(e[Ir])||Vt(e,Ir,Mr)),vr(e,l,!0)),Rr&&"values"===i&&f&&"values"!==f.name&&(Or?at(d,"name","values"):(c=!0,h=function(){return I(f,this)})),i)if(s={values:r("values"),keys:o?h:r("keys"),entries:r("entries")},a)for(u in s)!Tr&&!c&&u in d||Vt(d,u,s[u]);else R({target:t,proto:!0,forced:Tr||c},s);return d[Ir]!==h&&Vt(d,Ir,h,{name:i}),hr[t]=h,s},a=ot.f,Lr=Ut.set,Dr=Ut.getterFor("Array Iterator"),Nr=(Pr(Array,"Array",function(e,t){Lr(this,{type:"Array Iterator",target:We(e),index:0,kind:t})},function(){var e=Dr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ar(undefined,!0);switch(e.kind){case"keys":return Ar(n,!1);case"values":return Ar(t[n],!1)}return Ar([n,t[n]],!1)},"values"),hr.Arguments=hr.Array);if(tr("keys"),tr("values"),tr("entries"),f&&"values"!==Nr.name)try{a(Nr,"name",{value:"values"})}catch(X){}var Fr,Ur,jr=Ye("iterator"),Br=([].keys&&("next"in(Nr=[].keys())?(a=cr(cr(Nr)))!==Object.prototype&&(Fr=a):0),O(Fr)&&!g(function(){var e={};return Fr[jr].call(e)!==e})||(Fr={}),S(Fr[jr])||Vt(Fr,jr,function(){return this}),i.IteratorPrototype),Nr=Ye("toStringTag"),zr=TypeError,Wr=x.Iterator,a=!S(Wr)||Wr.prototype!==Br||!g(function(){Wr({})}),Hr=function(){if(lr(this,Br),cr(this)===Br)throw new zr("Abstract class Iterator not directly constructable")},qr=function(t,e){f?Bt(Br,t,{configurable:!0,get:function(){return e},set:function(e){if(E(this),this===Br)throw new zr("You can't redefine this property");M(this,t)?this[t]=e:Gn(this,t,e)}}):Br[t]=e},Vr=(M(Br,Nr)||qr(Nr,"Iterator"),!a&&M(Br,"constructor")&&Br.constructor!==Object||qr("constructor",Hr),Hr.prototype=Br,R({global:!0,constructor:!0,forced:a},{Iterator:Hr}),ut(ut.bind)),Gr=function(e,t){return xe(e),t===undefined?e:ke?Vr(e,t):function(){return e.apply(t,arguments)}},Jr=Ye("iterator"),$r=Array.prototype,Zr=function(e){return e!==undefined&&(hr.Array===e||$r[Jr]===e)},Kr=Ye("iterator"),Yr=Array.prototype,Xr=function(e){if(!ie(e))return en(e,Kr)||en(e,"@@iterator")||("Arguments"===ne(e)?Yr[Kr]:undefined)},Qr=TypeError,ei=function(e,t){t=arguments.length<2?Xr(e):t;if(S(t))return E(I(t,e));throw new Qr(Re(e)+" is not iterable")},ti=function(e,t,n){var r,i;E(e);try{if(!(r=en(e,"return"))){if("throw"===t)throw n;return n}r=I(r,e)}catch(X){i=!0,r=X}if("throw"===t)throw n;if(i)throw r;return E(r),n},ni=TypeError,ri=function(e,t){this.stopped=e,this.result=t},ii=ri.prototype,oi=function(e,t,n){var r,i,o,a,s,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),h=Gr(t,u),p=function(e){var t=r;return r=undefined,t&&ti(t,"normal"),new ri(!0,e)},m=function(e){return l?(E(e),f?h(e[0],e[1],p):h(e[0],e[1])):f?h(e,p):h(e)};if(c)r=e.iterator;else if(d)r=e;else{if(!(n=Xr(e)))throw new ni(Re(e)+" is not iterable");if(Zr(n)){for(i=0,o=he(e);i<o;i++)if((a=m(e[i]))&&Ee(ii,a))return a;return new ri(!1)}r=ei(e,n)}for(s=(c?e:r).next;!(g=I(s,r)).done;){var g=g.value;try{a=m(g)}catch(X){if(!r)throw X;ti(r,"throw",X)}if("object"==T(a)&&a&&Ee(ii,a))return a}return new ri(!1)},ai=function(e){return{iterator:e,next:e.next,done:!1}},Nr=function(e,t){var n=x.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(X){X instanceof t||(r=!1)}if(!r)return e},si=Nr("forEach",TypeError),ui=(R({target:"Iterator",proto:!0,real:!0,forced:si},{forEach:function(t){E(this);try{xe(t)}catch(X){ti(this,"throw",X)}if(si)return I(si,this,t);var e=ai(this),n=0;oi(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),void 0),li=function(e){if(e&&e.forEach!==ui)try{at(e,"forEach",ui)}catch(X){e.forEach=ui}};for(Ur in pr)pr[Ur]&&li(x[Ur]&&x[Ur].prototype);li(o);var ci,di=Ye("species"),fi=Array,hi=function(e,t){return new((n=Q(e=e)&&(n=e.constructor,Tn(n)&&(n===fi||Q(n.prototype))||O(n)&&null===(n=n[di]))?undefined:n)===undefined?fi:n)(0===t?0:t);var n},qr=function(f){var h=1===f,p=2===f,m=3===f,g=4===f,v=6===f,y=7===f,w=5===f||v;return function(e,t,n){for(var r,i,o=ue(e),a=ze(o),s=he(a),u=Gr(t,n),l=0,c=0,d=h?hi(e,s):p||y?hi(e,0):undefined;l<s;l++)if((w||l in a)&&(i=u(r=a[l],l,o),f))if(h)Gn(d,l,i);else if(i)switch(f){case 3:return!0;case 5:return r;case 6:return l;case 2:Gn(d,c++,r)}else switch(f){case 4:return!1;case 7:Gn(d,c++,r)}return v?-1:m||g?g:d}},pi={forEach:qr(0),map:qr(1),filter:qr(2),some:qr(3),every:qr(4),find:qr(5),findIndex:qr(6),filterReject:qr(7)},mi=(je("forEach"),R({target:"Array",proto:!0,forced:[].forEach!==ui},{forEach:ui}),x.String),a=!!Object.getOwnPropertySymbols&&!g(function(){var e=Symbol("symbol detection");return!mi(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qn&&qn<41}),Hr={}.propertyIsEnumerable,gi=Object.getOwnPropertyDescriptor,vi={f:gi&&!Hr.call({1:2},1)?function(e){e=gi(this,e);return!!e&&e.enumerable}:Hr},yi={f:Ye},wi=x,bi=ot.f,ki=function(e){var t=wi.Symbol||(wi.Symbol={});M(t,e)||bi(t,e,{value:yi.f(e)})},_i=void 0,Si=pi.forEach,Ei=n("hidden"),Ci=Ut.set,Ri=Ut.getterFor("Symbol"),Oi=Object.prototype,o=x.Symbol,xi=o&&o.prototype,Ti=x.RangeError,Ii=x.TypeError,qr=x.QObject,Mi=or.f,Ai=ot.f,Pi=er.f,Li=vi.f,Di=v([].push),Ni=e("symbols"),Fi=e("op-symbols"),Hr=e("wks"),Ui=!qr||!qr.prototype||!qr.prototype.findChild,ji=function(e,t,n){var r=Mi(Oi,t);return r&&delete Oi[t],Ai(e,t,n),r&&e!==Oi&&Ai(Oi,t,r),e},Bi=f&&g(function(){return 7!==Ct(Ai({},"a",{get:function(){return Ai(this,"a",{value:7}).a}})).a})?ji:Ai,zi=function(e,t){var n=Ni[e]=Ct(xi);return Ci(n,{type:"Symbol",tag:e,description:t}),f||(n.description=t),n},Wi=function(e,t,n){e===Oi&&Wi(Fi,t,n),E(e);t=_i(t);return E(n),(M(Ni,t)?(("enumerable"in n?!n.enumerable:!M(e,t)||M(e,Ei)&&e[Ei][t])?(M(e,Ei)||Ai(e,Ei,it(1,Ct(null))),e[Ei][t]=!0):(M(e,Ei)&&e[Ei][t]&&(e[Ei][t]=!1),n=Ct(n,{enumerable:it(0,!1)})),Bi):Ai)(e,t,n)},Hi=function(t,e){E(t);var n=We(e),e=lt(n).concat(Vi(n));return Si(e,function(e){f&&!I(qi,n,e)||Wi(t,e,n[e])}),t},qi=function(e){var e=_i(e),t=I(Li,this,e);return!(this===Oi&&M(Ni,e)&&!M(Fi,e))&&(!(t||!M(this,e)||!M(Ni,e)||M(this,Ei)&&this[Ei][e])||t)},n=function(e,t){var n,e=We(e),t=_i(t);if(e!==Oi||!M(Ni,t)||M(Fi,t))return!(n=Mi(e,t))||!M(Ni,t)||M(e,Ei)&&e[Ei][t]||(n.enumerable=!0),n},qr=function(e){var e=Pi(We(e)),t=[];return Si(e,function(e){M(Ni,e)||M(vt,e)||Di(t,e)}),t},Vi=function(e){var t=e===Oi,e=Pi(t?Fi:We(e)),n=[];return Si(e,function(e){!M(Ni,e)||t&&!M(Oi,e)||Di(n,Ni[e])}),n},qr=(a||(xi=(o=function(){if(Ee(xi,this))throw new Ii("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?C(arguments[0]):undefined,n=Lt(e),r=function(e){var t=this===undefined?x:this,e=(t===Oi&&I(r,Fi,e),M(t,Ei)&&M(t[Ei],n)&&(t[Ei][n]=!1),it(1,e));try{Bi(t,n,e)}catch(X){if(!(X instanceof Ti))throw X;ji(t,n,e)}};return f&&Ui&&Bi(Oi,n,{configurable:!0,set:r}),zi(n,e)}).prototype,Vt(xi,"toString",function(){return Ri(this).tag}),Vt(o,"withoutSetter",function(e){return zi(Lt(e),e)}),vi.f=qi,ot.f=Wi,st.f=Hi,or.f=n,Yn.f=er.f=qr,nr.f=Vi,yi.f=function(e){return zi(Ye(e),e)},f&&(Bt(xi,"description",{configurable:!0,get:function(){return Ri(this).description}}),Vt(Oi,"propertyIsEnumerable",qi,{unsafe:!0}))),R({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:o}),Si(lt(Hr),function(e){ki(e)}),R({target:"Symbol",stat:!0,forced:!a},{useSetter:function(){Ui=!0},useSimple:function(){Ui=!1}}),R({target:"Object",stat:!0,forced:!a,sham:!f},{create:function(e,t){return t===undefined?Ct(e):Hi(Ct(e),t)},defineProperty:Wi,defineProperties:Hi,getOwnPropertyDescriptor:n}),R({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:qr}),Hr=(Hr=Se("Symbol"))&&Hr.prototype,ci=Hr&&Hr.valueOf,n=Ye("toPrimitive"),Hr&&!Hr[n]&&Vt(Hr,n,function(e){return I(ci,this)},{arity:1}),vr(o,"Symbol"),vt[Ei]=!0,a&&!!Symbol["for"]&&!!Symbol.keyFor),Gi=e("string-to-symbol-registry"),Ji=e("symbol-to-string-registry"),$i=(R({target:"Symbol",stat:!0,forced:!qr},{"for":function(e){var t,e=C(e);return M(Gi,e)?Gi[e]:(t=Se("Symbol")(e),Gi[e]=t,Ji[t]=e,t)}}),void 0),Zi=e("symbol-to-string-registry"),Ki=(R({target:"Symbol",stat:!0,forced:!qr},{keyFor:function(e){if(!$i(e))throw new TypeError(Re(e)+" is not a symbol");if(M(Zi,e))return Zi[e]}}),Ye("match")),Yi=function(e){var t;return O(e)&&((t=e[Ki])!==undefined?!!t:"RegExp"===ne(e))},Xi=TypeError,Qi=function(e){if(Yi(e))throw new Xi("The method doesn't accept regular expressions");return e},eo=Ye("match"),Hr=function(e){var t=/./;try{"/./"[e](t)}catch(_){try{return t[eo]=!1,"/./"[e](t)}catch(u){}}return!1},to=v("".indexOf),no=(R({target:"String",proto:!0,forced:!Hr("includes")},{includes:function(e){return!!~to(C(ae(this)),C(Qi(e)),1<arguments.length?arguments[1]:undefined)}}),t.includes),n=g(function(){return!Array(1).includes()}),o=g(function(){return[,1].includes(undefined,1)}),ro=(R({target:"Array",proto:!0,forced:n||o},{includes:function(e){return no(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("includes"),RangeError),io=Math.floor,qr=function(e){var t=C(ae(this)),n="",r=ce(e);if(r<0||r===Infinity)throw new ro("Wrong number of repetitions");for(;0<r;(r=io(r/2))&&(t+=t))r%2&&(n+=t);return n},oo=v(qr),ao=v("".slice),so=Math.ceil,n=function(i){return function(e,t,n){var e=C(ae(e)),t=fe(t),r=e.length;return t<=r||""===(n=n===undefined?" ":C(n))?e:((r=oo(n,so((t=t-r)/n.length))).length>t&&(r=ao(r,0,t)),i?e+r:r+e)}},uo=[n(!1),n(!0)][0],lo=RangeError,co=isFinite,fo=Math.abs,o=Date.prototype,ho=o.toISOString,po=v(o.getTime),mo=v(o.getUTCDate),go=v(o.getUTCFullYear),vo=v(o.getUTCHours),yo=v(o.getUTCMilliseconds),wo=v(o.getUTCMinutes),bo=v(o.getUTCMonth),ko=v(o.getUTCSeconds),n=g(function(){return"0385-07-25T07:06:39.999Z"!==ho.call(new Date(-50000000000001))})||!g(function(){ho.call(new Date(NaN))})?function(){var e,t,n;if(co(po(this)))return e=go(this),t=yo(this),(n=e<0?"-":9999<e?"+":"")+uo(fo(e),n?6:4,0)+"-"+uo(bo(this)+1,2,0)+"-"+uo(mo(this),2,0)+"T"+uo(vo(this),2,0)+":"+uo(wo(this),2,0)+":"+uo(ko(this),2,0)+"."+uo(t,3,0)+"Z";throw new lo("Invalid time value")}:ho,_o=(R({target:"Date",proto:!0,forced:Date.prototype.toISOString!==n},{toISOString:n}),void 0),o=g(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});R({target:"Date",proto:!0,forced:o},{toJSON:function(e){var t=ue(this),n=_o(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var So,Eo=Ut.get,Co=v(1.1.valueOf),Ro="\t\n\x0B\f\r \u2028\u2029\ufeff",Oo=v("".replace),xo=RegExp("^["+Ro+"]+"),To=RegExp("(^|[^"+Ro+"])["+Ro+"]+$"),n=function(t){return function(e){e=C(ae(e));return 1&t&&(e=Oo(e,xo,"")),e=2&t?Oo(e,To,"$1"):e}},o={start:n(1),end:n(2),trim:n(3)},Io=Be.PROPER,Mo=o.trim,Ao=(R({target:"String",proto:!0,forced:(So="trim",g(function(){return!!Ro[So]()||"
"!=="
"[So]()||Io&&Ro[So].name!==So}))},{trim:function(){return Mo(this)}}),o.trim),Po=x.parseInt,n=x.Symbol,Lo=n&&n.iterator,Do=/^[+-]?0x/i,No=v(Do.exec),n=8!==Po(Ro+"08")||22!==Po(Ro+"0x16")||Lo&&!g(function(){Po(Object(Lo))})?function(e,t){e=Ao(C(e));return Po(e,t>>>0||(No(Do,e)?16:10))}:Po,Fo=(R({global:!0,forced:parseInt!==n},{parseInt:n}),SyntaxError),Uo=parseInt,jo=String.fromCharCode,Bo=v("".charAt),zo=v("".slice),Wo=v(/./.exec),Ho={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},qo=/^[\da-f]{4}$/i,Vo=/^[\u0000-\u001F]$/,Go=void 0,Jo=Go.ArrayBuffer,$o=Go.DataView,n=$o.prototype,Zo=ut(Jo.prototype.slice),Ko=ut(n.getUint8),Yo=ut(n.setUint8),n=g(function(){return!new Jo(2).slice(1,undefined).byteLength}),n=(R({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:n},{slice:function(e,t){if(Zo&&t===undefined)return Zo(E(this),e);for(var n=E(this).byteLength,r=ft(e,n),i=ft(t===undefined?n:t,n),e=new Jo(fe(i-r)),o=new $o(this),a=new $o(e),s=0;r<i;)Yo(a,s++,Ko(o,r++));return e}}),void 0),Xo=(R({global:!0,constructor:!0,forced:!0},{DataView:Go.DataView}),function(e,t,n){for(var r in t)Vt(e,r,t[r],n);return e}),Qo=RangeError,ea=function(e){if(e===undefined)return 0;var e=ce(e),t=fe(e);if(e!==t)throw new Qo("Wrong length or index");return t},ta=(R({target:"Math",stat:!0},{fround:void 0}),R({target:"Math",stat:!0},{sign:void 0}),Math.sign,Array),na=Math.abs,ra=Math.pow,ia=Math.floor,oa=Math.log,aa=Math.LN2,sa=void 0,ua=(R({target:"Array",proto:!0},{fill:sa}),tr("fill"),function(e,t,n){return Cr&&S(t=t.constructor)&&t!==n&&O(t=t.prototype)&&t!==n.prototype&&Cr(e,t),e}),la=Ut.getterFor("ArrayBuffer"),ca=Ut.getterFor("DataView"),da=Ut.set,s=x.ArrayBuffer,fa=s&&s.prototype,l=x.DataView,ha=l&&l.prototype,pa=(Object.prototype,x.Array),ma=x.RangeError,ga=v(sa),va=v([].reverse),ya=function(e,t,n){var r,i,o,a=ta(n),s=8*n-t-1,n=(1<<s)-1,u=n>>1,l=23===t?ra(2,-24)-ra(2,-77):0,c=e<0||0===e&&1/e<0?1:0,d=0;for((e=na(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=ia(oa(e)/aa),e*(o=ra(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+u?l/o:l*ra(2,1-u))*o&&(r++,o/=2),n<=r+u?(i=0,r=n):1<=r+u?(i=(e*o-1)*ra(2,t),r+=u):(i=e*ra(2,u-1)*ra(2,t),r=0));8<=t;)a[d++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;0<s;)a[d++]=255&r,r/=256,s-=8;return a[d-1]|=128*c,a},wa=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,i=e[u--],l=127&i;for(i>>=7;0<s;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;0<s;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:i?-Infinity:Infinity;n+=ra(2,t),l-=a}return(i?-1:1)*n*ra(2,l-t)},ba=function(e){return[255&e]},ka=function(e){return[255&e,e>>8&255]},_a=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Sa=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ea=function(e){return ya((void 0)(e),23,4)},Ca=function(e){return ya(e,52,8)},c=function(e,t,n){Bt(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},Ra=function(e,t,n,r){e=ca(e),n=ea(n),r=!!r;if(n+t>e.byteLength)throw new ma("Wrong index");n+=e.byteOffset,e=Jn(e.bytes,n,n+t);return r?e:va(e)},Oa=function(e,t,n,r,i,o){var e=ca(e),n=ea(n),a=r(+i),s=!!o;if(n+t>e.byteLength)throw new ma("Wrong index");for(var u=e.bytes,l=n+e.byteOffset,c=0;c<t;c++)u[l+c]=a[s?c:t-c-1]},fa=(s=function(e){lr(this,fa);e=ea(e);da(this,{type:"ArrayBuffer",bytes:ga(pa(e),0),byteLength:e}),f||(this.byteLength=e,this.detached=!1)}).prototype,ha=(l=function(e,t,n){lr(this,ha),lr(e,fa);var r=la(e),i=r.byteLength,t=ce(t);if(t<0||i<t)throw new ma("Wrong offset");if(t+(n=n===undefined?i-t:ea(n))>i)throw new ma("Wrong length");da(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),f||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,xa=(f&&(c(s,"byteLength",la),c(l,"buffer",ca),c(l,"byteLength",ca),c(l,"byteOffset",ca)),Xo(ha,{getInt8:function(e){return Ra(this,1,e)[0]<<24>>24},getUint8:function(e){return Ra(this,1,e)[0]},getInt16:function(e){e=Ra(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=Ra(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return Sa(Ra(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return Sa(Ra(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return wa(Ra(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return wa(Ra(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){Oa(this,1,e,ba,t)},setUint8:function(e,t){Oa(this,1,e,ba,t)},setInt16:function(e,t){Oa(this,2,e,ka,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){Oa(this,2,e,ka,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){Oa(this,4,e,_a,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){Oa(this,4,e,_a,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){Oa(this,4,e,Ea,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){Oa(this,8,e,Ca,t,2<arguments.length&&arguments[2])}}),vr(s,"ArrayBuffer"),vr(l,"DataView"),Ye("species")),Ta=function(e){e=Se(e);f&&e&&!e[xa]&&Bt(e,xa,{configurable:!0,get:function(){return this}})},c=Go.ArrayBuffer,s=x.ArrayBuffer,Ia=(R({global:!0,constructor:!0,forced:s!==c},{ArrayBuffer:c}),Ta("ArrayBuffer"),g(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})})),Ma=Object.isExtensible,Aa=g(function(){Ma(1)})||Ia?function(e){return!!O(e)&&(!Ia||"ArrayBuffer"!==ne(e))&&(!Ma||Ma(e))}:Ma,Pa=(R({target:"Object",stat:!0,forced:Object.isExtensible!==Aa},{isExtensible:Aa}),TypeError),La=function(e,t){if(!delete e[t])throw new Pa("Cannot delete property "+Re(t)+" of "+Re(e))},l=r("splice"),Da=Math.max,Na=Math.min,Fa=(R({target:"Array",proto:!0,forced:!l},{splice:function(e,t){var n,r,i,o,a,s,u=ue(this),l=he(u),c=ft(e,l),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,l-c):(n=e-2,Na(Da(ce(t),0),l-c)),me(l+n-r),i=hi(u,r),o=0;o<r;o++)(a=c+o)in u&&Gn(i,o,u[a]);if(An(i,r),n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:La(u,s);for(o=l;l-r+n<o;o--)La(u,o-1)}else if(r<n)for(o=l-r;c<o;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:La(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return An(u,l-r+n),i}}),qe(function(e){var t=ot.f,a=Lt("meta"),n=0,r=function(e){t(e,a,{value:{objectID:"O"+n++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},0;var i=Yn.f,o=v([].splice),e={};e[a]=1,i(e).length&&(Yn.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===a){o(t,n,1);break}return t},R({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:er.f}))},fastKey:function(e,t){if(!O(e))return"symbol"==T(e)?e:("string"==typeof e?"S":"P")+e;if(!M(e,a)){if(!Aa(e))return"F";if(!t)return"E";r(e)}return e[a].objectID},getWeakData:function(e,t){if(!M(e,a)){if(!Aa(e))return!0;if(!t)return!1;r(e)}return e[a].weakData},onFreeze:function(e){return e}};vt[a]=!0})),Ua=Fa.onFreeze,ja=Object.preventExtensions,s=g(function(){ja(1)}),Ba=(R({target:"Object",stat:!0,forced:s,sham:!0},{preventExtensions:function(e){return ja&&O(e)?ja(Ua(e)):e}}),g(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fa.onFreeze),za=Object.freeze,c=g(function(){za(1)}),Wa=(R({target:"Object",stat:!0,forced:c,sham:!0},{freeze:function(e){return za&&O(e)?za(Ba(e)):e}}),!g(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)})),Ha=t.includes,qa=String,Va=TypeError,Ga=Se("JSON","stringify"),l=Se("BigInt"),Ja=v("".valueOf),$a=v((!0).valueOf),Za=l&&v(l.prototype.valueOf),Ka=v(/./.exec),Ya=v("".charAt),Xa=v("".charCodeAt),Qa=v("".replace),es=v("".slice),ts=v([].push),ns=v([].pop),rs=v(1.1.toString),is=/[\uD800-\uDFFF]/g,os=/^[\uD800-\uDBFF]$/,as=/^[\uDC00-\uDFFF]$/,ss=/^\d+$/,us=Lt(),ls=Lt(),cs=Lt(),ds=us.length,fs=ls.length,s=!a||g(function(){var e=Se("Symbol")("stringify detection");return"[null]"!==Ga([e])||"{}"!==Ga({a:e})||"{}"!==Ga(Object(e))}),hs=g(function(){return'"\\udf06\\ud834"'!==Ga("\udf06\ud834")||'"\\udead"'!==Ga("\udead")}),ps=Wa?Se("JSON","isRawJSON"):function(e){return!!O(e)&&!!(e=Eo(e))&&"RawJSON"===e.type},ms=s?function(e,n,t){return Ga(e,function(e,t){e=I(n,this,e,t);if(!$i(e))return e},t)}:Ga,gs=function(e,t,n){var r=Ya(n,t-1),n=Ya(n,t+1);return Ka(os,e)&&!Ka(as,n)||Ka(as,e)&&!Ka(os,r)?"\\u"+rs(Xa(e,0),16):e},vs=function(e,t){try{return e(t),!0}catch(X){return!1}},c=(Ga&&R({target:"JSON",stat:!0,arity:3,forced:s||hs||!Wa},{stringify:function(e,t,n){var r,i=S(t)?t:undefined,o=i?undefined:function(e){if(Q(e)){for(var t=e.length,n=[],r=Ct(null),i=0;i<t;i++){var o,a=e[i];if("string"==typeof a)o=a;else{if("number"!=typeof a&&"Number"!==ne(a)&&"String"!==ne(a))continue;o=C(a)}M(r,o)||(r[o]=!0,ts(n,o))}return n}}(t),a=o&&function(e){for(var t=0,n=e.length;t<n;t++)if(Ka(ss,e[t]))return ls;return""}(o),s=[],u=[],l=[],c=!1,d=!0,f=ms(e,function(e,t){if(e=qa(e),o){if(e===cs)return ns(u),void(r=ns(l));if(d)d=!1;else if(this!==r&&!Q(this)&&!Ha(o,e))return}else i&&(t=I(i,this,e,t));if(ps(t))return Wa?t:(c=!0,us+(ts(s,t.rawJSON)-1));if(o&&function(e){if(!O(e)||S(e)||Q(e))return!1;try{return!("Number"===(n=ne(t=e))&&vs(Co,t)||"String"===n&&vs(Ja,t)||"Boolean"===n&&vs($a,t)||Za&&"BigInt"===n&&vs(Za,t))}catch(X){return!0}var t,n}(t)){if(Ha(u,t))throw new Va("Converting circular structure to JSON");e=function(e,t,n){for(var r=Ct(null),i=0,o=t.length;i<o;i++){var a=t[i];r[n+a]=function(n,r){return{toJSON:function(){var e,t=n[r];return t=(O(t)||"bigint"==typeof t)&&(e=t.toJSON,S(e))?I(e,t,r):t}}}(e,a)}return r[cs]=null,r}(t,o,a);return ts(u,t),ts(l,r),a&&(c=!0),r=e}return t},n);if("string"!=typeof f)return f;if(hs&&(f=Qa(f,is,gs)),!c)return f;for(var h="",p=f.length,m=0;m<p;m++){var g,v,y=Ya(f,m);'"'===y?(g=function(e,t){for(var n=!0,r="";t<e.length;){var i=Bo(e,t);if("\\"===i){var o=zo(e,t,t+2);if(M(Ho,o))r+=Ho[o],t+=2;else{if("\\u"!==o)throw new Fo('Unknown escape sequence: "'+o+'"');o=zo(e,t+=2,t+4);if(!Wo(qo,o))throw new Fo("Bad Unicode escape at: "+t);r+=jo(Uo(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(Wo(Vo,i))throw new Fo("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new Fo("Unterminated string at: "+t);return{value:r,end:t}}(f,++m).end-1,v=es(f,m,g),es(v,0,ds)===us?h+=s[es(v,ds)]:es(v,0,fs)===ls?h+='"'+es(v,fs)+'"':h+='"'+v+'"',m=g):h+=y}return h}}),!a||g(function(){nr.f(1)})),ys=(R({target:"Object",stat:!0,forced:c},{getOwnPropertySymbols:function(e){var t=nr.f;return t?t(ue(e)):[]}}),ki("iterator"),zt.charAt),ws=Ut.set,bs=Ut.getterFor("String Iterator"),l=(Pr(String,"String",function(e){ws(this,{type:"String Iterator",string:C(e),index:0})},function(){var e=bs(this),t=e.string,n=e.index;return n>=t.length?Ar(undefined,!0):(t=ys(t,n),e.index+=t.length,Ar(t,!1))}),a&&!Symbol.sham&&"symbol"==T(Symbol.iterator)),s=(Object,TypeError,TypeError,Ye("toPrimitive"),TypeError,Object.defineProperty,ot.f),ks=(R({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!f},{defineProperty:s}),g(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ye("isConcatSpreadable")),c=51<=qn||!g(function(){var e=[];return e[ks]=!1,e.concat()[0]!==e}),a=!c||!r("concat"),_s=(R({target:"Array",proto:!0,arity:1,forced:a},{concat:function(e){for(var t,n,r,i,o,a=ue(this),s=hi(a,0),u=0,l=-1,c=arguments.length;l<c;l++)if(i=r=-1===l?a:arguments[l],o=void 0,!O(i)||((o=i[ks])!==undefined?!o:!Q(i)))me(u+1),Gn(s,u++,r);else for(n=he(r),me(u+n),t=0;t<n;t++,u++)t in r&&Gn(s,u,r[t]);return An(s,u),s}}),Function),Ss=v([].concat),Es=v([].join),Cs={},Rs=ke?_s.bind:function(t){var n=xe(this),e=n.prototype,r=Jn(arguments,1),i=function(){var e=Ss(r,Jn(arguments));return this instanceof i?function(e,t,n){if(!M(Cs,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Cs[t]=_s("C,a","return new C("+Es(r,",")+")")}return Cs[t](e,n)}(n,e.length,e):n.apply(t,e)};return O(e)&&(i.prototype=e),i},s=(R({target:"Function",proto:!0,forced:Function.bind!==Rs},{bind:Rs}),Function.prototype),c=s.call,a=(ke&&s.bind.bind(c,c),Date.prototype),Os=v(a.toString),xs=v(a.getTime),c=("Invalid Date"!==String(new Date(NaN))&&Vt(a,"toString",function(){var e=xs(this);return e==e?Os(this):"Invalid Date"}),Be.PROPER),s=RegExp.prototype,Ts=s.toString,a=g(function(){return"/a/b"!==Ts.call({source:"a",flags:"b"})}),c=c&&"toString"!==Ts.name,Is=((a||c)&&Vt(s,"toString",function(){var e=E(this);return"/"+C(e.source)+"/"+C(fn(e))},{unsafe:!0}),x.RegExp),a=g(function(){var e=Is("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),c=a||g(function(){return!Is("a","y").sticky}),s={BROKEN_CARET:a||g(function(){var e=Is("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:c,UNSUPPORTED_Y:a},Ms=Ut.get,As=RegExp.prototype,Ps=TypeError,Ls=(f&&s.MISSED_STICKY&&Bt(As,"sticky",{configurable:!0,get:function(){if(this!==As){if("RegExp"===ne(this))return!!Ms(this).sticky;throw new Ps("Incompatible receiver, RegExp required")}}}),/#|\.prototype\./),c=function(e,t){e=Ns[Ds(e)];return e===Us||e!==Fs&&(S(t)?g(t):!!t)},Ds=c.normalize=function(e){return String(e).replace(Ls,".").toLowerCase()},Ns=c.data={},Fs=c.NATIVE="N",Us=c.POLYFILL="P",js=c,Bs=ot.f,zs=x.RegExp,Ws=g(function(){var e=zs(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),Hs=x.RegExp,qs=g(function(){var e=Hs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),a=Yn.f,Vs=Ut.enforce,Gs=Ye("match"),Js=x.RegExp,$s=Js.prototype,Zs=x.SyntaxError,Ks=v($s.exec),Ys=v("".charAt),Xs=v("".replace),Qs=v("".indexOf),eu=v("".slice),tu=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,nu=/a/g,ru=/a/g,c=new Js(nu)!==nu,iu=s.MISSED_STICKY,ou=s.UNSUPPORTED_Y,c=f&&(!c||iu||Ws||qs||g(function(){return ru[Gs]=!1,Js(nu)!==nu||Js(ru)===ru||"/a/i"!==String(Js(nu,"i"))}));if(js("RegExp",c)){for(var au=function(e,t){var n,r,i=Ee($s,this),o=Yi(e),a=t===undefined,s=[],u=e;if(!i&&o&&a&&e.constructor===au)return e;if((o||Ee($s,e))&&(e=e.source,a)&&(t=fn(u)),e=e===undefined?"":C(e),t=t===undefined?"":C(t),u=e,o=t=Ws&&"dotAll"in nu&&(n=!!t&&-1<Qs(t,"s"))?Xs(t,/s/g,""):t,iu&&"sticky"in nu&&(r=!!t&&-1<Qs(t,"y"))&&ou&&(t=Xs(t,/y/g,"")),qs&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",o=[],a=Ct(null),s=!1,u=!1,l=0,c="";r<n;r++){if("\\"===(t=Ys(e,r))){if(t+=Ys(e,++r),!u&&"\\"===Ys(t,1)){i+="\\x5c";continue}}else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:i+=t,Ks(tu,eu(e,r+1))?(r+=2,u=!0,l++):"?"!==Ys(e,r+1)&&l++;continue;case">"===t&&u:if(""===c||M(a,c))throw new Zs("Invalid capture group name");a[c]=!0,u=!(o[o.length]=[c,l]),c="";continue}u?c+=t:i+=t}for(var d=0;d<o.length;d++)for(var f="\\k<"+o[d][0]+">",h="\\"+o[d][1];-1<Qs(i,f);)i=Xs(i,f,h);return[i,o]}(e))[0],s=a[1]),a=ua(Js(e,t),i?this:$s,au),(n||r||s.length)&&(t=Vs(a),n&&(t.dotAll=!0,t.raw=au(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=Ys(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Ys(e,++r);return i}(e),o)),r&&(t.sticky=!0),s.length)&&(t.groups=s),e!==u)try{at(a,"source",""===u?"(?:)":u)}catch(X){}return a},su=a(Js),uu=0;su.length>uu;)!function(e,t,n){n in e||Bs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(au,Js,su[uu++]);($s.constructor=au).prototype=$s,Vt(x,"RegExp",au,{constructor:!0})}Ta("RegExp");e("native-string-replace",String.prototype.replace);var lu=RegExp.prototype.exec,cu=(v("".charAt),v("".indexOf),v("".replace),v("".slice),c=/b*/g,I(lu,a=/a/,"a"),I(lu,c,"a"),/()??/.exec("")[1],undefined,R({target:"RegExp",proto:!0,forced:/./.exec!==Gt},{exec:Gt}),TypeError),du=function(e){if(Tn(e))return e;throw new cu(Re(e)+" is not a constructor")},fu=Ye("species"),hu=function(e,t){var e=E(e).constructor;return e===undefined||ie(e=E(e)[fu])?t:du(e)},pu=s.UNSUPPORTED_Y,mu=Math.min,gu=v([].push),vu=v("".slice),yu=v("".indexOf),a=!g(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),wu="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,bu=(Nt("split",function(i,p,m){var g="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:I(p,this,e,t)}:p;return[function(e,t){var n=ae(this),r=O(e)?en(e,i):undefined;return r?I(r,e,n,t):I(g,C(n),e,t)},function(e,t){var n=E(this),r=C(e);if(!wu){e=m(g,n,r,t,g!==p);if(e.done)return e.value}var e=hu(n,RegExp),i=C(fn(n)),o=!!~yu(i,"u")||!!~yu(i,"v"),a=(pu?~yu(i,"g")||(i+="g"):~yu(i,"y")||(i+="y"),new e(pu?"^(?:"+n.source+")":n,i)),s=t===undefined?4294967295:t>>>0;if(0==s)return[];if(0===r.length)return null===pn(a,r)?[r]:[];for(var u=0,l=0,c=[];l<r.length;){a.lastIndex=pu?0:l;var d,f=pn(a,pu?vu(r,l):r);if(null===f||(d=mu(fe(a.lastIndex+(pu?l:0)),r.length))===u)l=Qt(r,l,o);else{if(gu(c,vu(r,u,l)),c.length===s)return c;for(var h=1;h<=f.length-1;h++)if(gu(c,f[h]),c.length===s)return c;l=u=d}}return gu(c,vu(r,u)),c}]},wu||!a,pu),Object),ku=(v("".split),g(function(){return!bu("z").propertyIsEnumerable(0)}),or.f),c=!f||g(function(){ku(1)}),s=(R({target:"Object",stat:!0,forced:c,sham:!f},{getOwnPropertyDescriptor:function(e,t){return ku(We(e),t)}}),Object.getOwnPropertyDescriptor,or.f,R({global:!0,forced:x.globalThis!==x},{globalThis:x}),function(e){return e&&e.Math===Math&&e}),a=(s("object"==("undefined"==typeof globalThis?"undefined":T(globalThis))&&globalThis)||s("object"==("undefined"==typeof window?"undefined":T(window))&&window)||s("object"==("undefined"==typeof self?"undefined":T(self))&&self)||s("object"==T(Ie)&&Ie)||s("object"==T(Ie)&&Ie)||function(){return this}()||Function("return this")(),x.Symbol),c=(e("wks"),l?a["for"]:a&&a.withoutSetter,{}),_u=(c[Ye("toStringTag")]="z",String(c),Vt(Object.prototype,"toString",function(){return"[object "+tt(this)+"]"},{unsafe:!0}),Nr("find",TypeError)),Su=(R({target:"Iterator",proto:!0,real:!0,forced:_u},{find:function(n){E(this);try{xe(n)}catch(X){ti(this,"throw",X)}var e,r;return _u?I(_u,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),pi.find),Eu=!0,Cu=("find"in[]&&Array(1).find(function(){Eu=!1}),R({target:"Array",proto:!0,forced:Eu},{find:function(e){return Su(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("find"),Date),Ru=v(Cu.prototype.getTime),Ou=(R({target:"Date",stat:!0},{now:function(){return Ru(new Cu)}}),function(e,t,n,r){try{return r?t(E(n)[0],n[1]):t(n)}catch(X){ti(e,"throw",X)}}),xu=Array,Tu=function(e){var t=Tn(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=Gr(r,2<n?arguments[2]:undefined));var o,a,s,u,l,c,d=ue(e),n=Xr(d),f=0;if(!n||this===xu&&Zr(n))for(o=he(d),a=t?new this(o):xu(o);f<o;f++)c=i?r(d[f],f):d[f],Gn(a,f,c);else for(a=t?new this:[],l=(u=ei(d,n)).next;!(s=I(l,u)).done;f++){try{me(f)}catch(X){ti(u,"throw",X)}c=i?Ou(u,r,[s.value,f],!0):s.value;try{Gn(a,f,c)}catch(X){ti(u,"throw",X)}}return An(a,f),a},Iu=void 0,Ie=!Iu(function(e){Array.from(e)}),s=(R({target:"Array",stat:!0,forced:Ie},{from:Tu}),Ye("iterator"));try{var Mu=0,Au={next:function(){return{done:!!Mu++}},"return":function(){0}};Au[s]=function(){return this},Array.from(Au,function(){throw 2})}catch(X){}var Pu,Lu,e=function(e,t,n){var r,i,o,a,s,u=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),c=u?"set":"add",d=x[e],f=d&&d.prototype,h=d,p={},m=function(e){var n=v(f[e]);Vt(f,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return l&&!O(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(l&&!O(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return js(e,!S(d)||!(l||f.forEach&&!g(function(){(new d).entries().next()})))?(h=n.getConstructor(t,e,u,c),Fa.enable()):js(e,!0)&&(i=(r=new h)[c](l?{}:-0,1)!==r,o=g(function(){r.has(1)}),a=Iu(function(e){new d(e)}),s=!l&&g(function(){for(var e=new d,t=5;t--;)e[c](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){lr(e,f);e=ua(new d,e,h);return ie(t)||oi(t,e[c],{that:e,AS_ENTRIES:u}),e})).prototype=f).constructor=h),(o||s)&&(m("delete"),m("has"),u)&&m("get"),(s||i)&&m(c),l)&&f.clear&&delete f.clear,R({global:!0,constructor:!0,forced:(p[e]=h)!==d},p),vr(h,e),l||n.setStrong(h,e,u),h},Du=pi.findIndex,Nu=!0,Fu=("findIndex"in[]&&Array(1).findIndex(function(){Nu=!1}),R({target:"Array",proto:!0,forced:Nu},{findIndex:function(e){return Du(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("findIndex"),Fa.getWeakData),Uu=Ut.set,ju=Ut.getterFor,Bu=pi.find,zu=pi.findIndex,Wu=v([].splice),Hu=0,qu=function(e){return e.frozen||(e.frozen=new Vu)},Vu=function(){this.entries=[]},Gu=function(e,t){return Bu(e.entries,function(e){return e[0]===t})},l=(Vu.prototype={get:function(e){e=Gu(this,e);if(e)return e[1]},has:function(e){return!!Gu(this,e)},set:function(e,t){var n=Gu(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=zu(this.entries,function(e){return e[0]===t});return~e&&Wu(this.entries,e,1),!!~e}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){lr(e,o),Uu(e,{type:n,id:Hu++,frozen:null}),ie(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=ju(n),s=function(e,t,n){var r=a(e),i=Fu(E(t),!0);return!0===i?qu(r).set(t,n):i[r.id]=n,e};return Xo(o,{"delete":function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Fu(e))?qu(n)["delete"](e):t&&M(t,n.id)&&delete t[n.id])},has:function(e){var t,n=a(this);return!!O(e)&&(!0===(t=Fu(e))?qu(n).has(e):t&&M(t,n.id))}}),Xo(o,r?{get:function(e){var t,n=a(this);if(O(e))return!0===(t=Fu(e))?qu(n).get(e):t?t[n.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),e}});function Ju(e){this.name="__st"+(1e9*Math.random()>>>0)+Pu+"__",null!=e&&e.forEach(this.add,this),Pu+=1}e("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},l),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(Pu=Date.now()%1e9,Ju.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},Ju.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},Ju.prototype.has=function(e){return!!e[this.name]},Lu=Ju,Object.defineProperty(window,"WeakSet",{value:function(e){return new Lu(e)}}));var $u=Object.assign,Zu=Object.defineProperty,Ku=v([].concat),a=!$u||g(function(){var e,t,n;return!(!f||1===$u({b:1},$u(Zu({},"a",{enumerable:!0,get:function(){Zu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==$u({},e)[n])||"abcdefghijklmnopqrst"!==lt($u({},t)).join("")})?function(e,t){for(var n=ue(e),r=arguments.length,i=1,o=nr.f,a=vi.f;i<r;)for(var s,u=ze(arguments[i++]),l=o?Ku(lt(u),o(u)):lt(u),c=l.length,d=0;d<c;)s=l[d++],f&&!I(a,u,s)||(n[s]=u[s]);return n}:$u,Yu=(R({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,a=i.length;o<a;o++){var s=i[o],u=Object.getOwnPropertyDescriptor(r,s);null!=u&&u.enumerable&&(t[s]=r[s])}return t}}),function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}),Xu=i.IteratorPrototype,c=Ye("toStringTag"),Qu=Ut.set,Ie=function(c){var d=Ut.getterFor(c?"WrapForValidIterator":"IteratorHelper");return Xo(Ct(Xu),{next:function(){var e=d(this);if(c)return e.nextHandler();if(e.done)return Ar(undefined,!0);try{var t=e.nextHandler();return e.done&&Yu(e),e.returnHandlerResult?t:Ar(t,e.done)}catch(X){throw e.done=!0,Yu(e),X}},"return":function(){var e,t=d(this),n=t.iterator,r=t.inner,i=t.openIters,o=t.done;if(t.done=!0,c)return(e=en(n,"return"))?I(e,n):Ar(undefined,!0);if(Yu(t),!o){if(r)try{ti(r.iterator,"normal")}catch(X){return ti(n,"throw",X)}if(i)try{for(var a=i,s="normal",u=void 0,l=a.length-1;0<=l;l--)if(a[l]!==undefined)try{u=ti(a[l].iterator,s,u)}catch(X){s="throw",u=X}if("throw"===s)throw u}catch(X){if(n)return ti(n,"throw",X);throw X}n&&ti(n,"normal")}return Ar(undefined,!0)}})},el=Ie(!0),tl=Ie(!1),s=(at(tl,c,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,Qu(this,t)};return e.prototype=r?el:tl,e}),Au=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(X){return!0}},i=!Au("filter",function(){}),nl=!i&&Nr("filter",TypeError),Ie=i||nl,rl=s(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=E(I(r,t)),this.done=!!e.done)return;if(Ou(t,n,[e=e.value,this.counter++],!0))return e}}),il=(R({target:"Iterator",proto:!0,real:!0,forced:Ie},{filter:function(e){E(this);try{xe(e)}catch(X){ti(this,"throw",X)}return nl?I(nl,this,e):new rl(ai(this),{predicate:e})}}),pi.filter),c=r("filter"),i=(R({target:"Array",proto:!0,forced:!c},{filter:function(e){return il(this,e,1<arguments.length?arguments[1]:undefined)}}),!Au("map",function(){})),ol=!i&&Nr("map",TypeError),Ie=i||ol,al=s(function(){var e=this.iterator,t=E(I(this.next,e));if(!(this.done=!!t.done))return Ou(e,this.mapper,[t.value,this.counter++],!0)}),sl=(R({target:"Iterator",proto:!0,real:!0,forced:Ie},{map:function(e){E(this);try{xe(e)}catch(X){ti(this,"throw",X)}return ol?I(ol,this,e):new al(ai(this),{mapper:e})}}),pi.map),c=r("map"),ul=(R({target:"Array",proto:!0,forced:!c},{map:function(e){return sl(this,e,1<arguments.length?arguments[1]:undefined)}}),TypeError),ll="Reduce of empty array with no initial value",i=function(l){return function(e,t,n,r){var i=ue(e),o=ze(i),a=he(i);if(xe(t),0===a&&n<2)throw new ul(ll);var s=l?a-1:0,u=l?-1:1;if(n<2)for(;;){if(s in o){r=o[s],s+=u;break}if(s+=u,l?s<0:a<=s)throw new ul(ll)}for(;l?0<=s:s<a;s+=u)s in o&&(r=t(r,o[s],s,i));return r}},Ie={left:i(!1),right:i(!0)},r=function(e){return Hn.slice(0,e.length)===e},cl=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":x.Bun&&"string"==typeof Bun.version?"BUN":x.Deno&&"object"==T(Deno.version)?"DENO":"process"===ne(x.process)?"NODE":x.window&&x.document?"BROWSER":"REST",dl="NODE"==cl,fl=Ie.left,c=!dl&&79<qn&&qn<83||!je("reduce"),hl=(R({target:"Array",proto:!0,forced:c},{reduce:function(e){var t=arguments.length;return fl(this,e,t,1<t?arguments[1]:undefined)}}),Fa.fastKey),pl=Ut.set,ml=Ut.getterFor,i={getConstructor:function(e,n,r,i){var e=e(function(e,t){lr(e,o),pl(e,{type:n,index:Ct(null),first:null,last:null,size:0}),f||(e.size=0),ie(t)||oi(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=ml(n),s=function(e,t,n){var r,i=a(e),o=u(e,t);return o?o.value=n:(i.last=o={index:r=hl(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),f?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},u=function(e,t){var n,e=a(e),r=hl(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Xo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=Ct(null),f?e.size=0:this.size=0},"delete":function(e){var t,n,r=a(this),e=u(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),f?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=a(this),r=Gr(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Xo(o,r?{get:function(e){e=u(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),f&&Bt(o,"size",{configurable:!0,get:function(){return a(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=ml(t),o=ml(r);Pr(e,t,function(e,t){pl(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Ar("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Ar(undefined,!0))},n?"entries":"values",!n,!0),Ta(t)}},gl=(e("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},i),TypeError),r=g(function(){[].keys().reduce(function(){},undefined)}),vl=!r&&Nr("reduce",gl),yl=(R({target:"Iterator",proto:!0,real:!0,forced:r||vl},{reduce:function(t){E(this);try{xe(t)}catch(X){ti(this,"throw",X)}var n=arguments.length<2,r=n?undefined:arguments[1];if(vl)return Te(vl,this,n?[t]:[t,r]);var e=ai(this),i=0;if(oi(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new gl("Reduce of empty iterator with no initial value");return r}}),function(e,t){return(yl=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)});function wl(e,t){function n(){this.constructor=e}yl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var A=function(){return(A=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function bl(e,a,s,u){return new(s=s||Promise)(function(n,t){function r(e){try{o(u.next(e))}catch(a){t(a)}}function i(e){try{o(u["throw"](e))}catch(a){t(a)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((u=u.apply(e,a||[])).next())})}function kl(r,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((s=0<(s=u.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(r,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function _l(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var Sl=/_?t(\d)?(imestamp)?=\d+&?/g,El=function(e,t){void 0===t&&(t="https://dem.rumt-zh.com");t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com");return e.url=t,e.hostUrl=t,e.offlineUrl=t+"/offline",e.whiteListUrl=t+"/collect/whitelist",e.pvUrl=t+"/collect/pv",e.eventUrl=t+"/collect/events",e.speedUrl=t+"/speed",e.customTimeUrl=t+"/speed/custom",e.performanceUrl=t+"/speed/performance",e.performanceUrlForHippy=t+"/speed/hippyPerformance",e.webVitalsUrl=t+"/speed/webvitals",e.setDataReportUrl=t+"/speed/miniProgramData",e},Cl=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],Rl=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],Ol=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],xl=["static","fetch"],Tl="unknown",Il=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,d=0,f=!!a&&Gr(a,s);d<r;)d in n&&(u=f?f(n[d],d,t):n[d],0<o&&Q(u)?(l=he(u),c=Il(e,t,u,l,c,o-1)-1):(me(c+1),Gn(e,c,u)),c++),d++;return c},Ml=Il,Al=(R({target:"Array",proto:!0},{flatMap:function(e){var t,n=ue(this),r=he(n);return xe(e),t=hi(n,0),Ml(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),Nr("some",TypeError)),Pl=(R({target:"Iterator",proto:!0,real:!0,forced:Al},{some:function(n){E(this);try{xe(n)}catch(X){ti(this,"throw",X)}var e,r;return Al?I(Al,this,n):(e=ai(this),oi(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.some),c=je("some"),r=(R({target:"Array",proto:!0,forced:!c},{some:function(e){return Pl(this,e,1<arguments.length?arguments[1]:undefined)}}),tr("flatMap"),g(function(){return 1!==[1].values().flatMap(function(){return[1]}).find(function(){return!0})})),c=!r&&!Au("flatMap",function(){}),Ll=!r&&!c&&Nr("flatMap",TypeError),Au=r||c||Ll,Dl=s(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=E(I(t.next,t.iterator))).done)return e.value;this.inner=null}catch(X){ti(n,"throw",X)}if(e=E(I(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||E(e);t=Xr(e);return ai(E(t!==undefined?I(t,e):e))}(r(e.value,this.counter++),!1)}catch(X){ti(n,"throw",X)}}}),Nl=(R({target:"Iterator",proto:!0,real:!0,forced:Au},{flatMap:function(e){E(this);try{xe(e)}catch(X){ti(this,"throw",X)}return Ll?I(Ll,this,e):new Dl(ai(this),{mapper:e,inner:null})}}),ql.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},ql.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},ql.prototype.one=function(e,t){this.on(e,t,1)},ql.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(b){}}return null}},ql.prototype.clear=function(){this.eventsList={}},ql),Fl=function(e){try{return localStorage.getItem(e)}catch(F0){return null}},Ul=function(e,t){try{localStorage.setItem(e,t)}catch(F0){}},jl=function(e,t){try{return e?JSON.parse(e):t}catch(F0){return t}},r=Yn.f,Bl=or.f,zl=ot.f,Wl=o.trim,Hl=x.Number;function ql(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(r=a.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===o)break}catch(k){throw k}}return a}},this.eventsList={}}wi.Number;var Vl=Hl.prototype,Gl=x.TypeError,Jl=v("".slice),$l=v("".charCodeAt),Zl=function(e){var t,n,r,i,o,a,s,u=_o(e,"number");if($i(u))throw new Gl("Cannot convert a Symbol value to a number");if("string"==typeof u&&2<u.length)if(u=Wl(u),43===(e=$l(u,0))||45===e){if(88===(t=$l(u,2))||120===t)return NaN}else if(48===e){switch($l(u,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+u}for(o=(i=Jl(u,2)).length,a=0;a<o;a++)if((s=$l(i,a))<48||r<s)return NaN;return parseInt(i,n)}return+u},c=js("Number",!Hl(" 0o1")||!Hl("0b1")||Hl("+0x1")),Kl=function(e){var t,e=arguments.length<1?0:Hl(function(e){e=_o(e,"number");return"bigint"==typeof e?e:Zl(e)}(e));return Ee(Vl,t=this)&&g(function(){Co(t)})?ua(Object(e),this,Kl):e};if(Kl.prototype=Vl,c&&(Vl.constructor=Kl),R({global:!0,constructor:!0,wrap:!0,forced:c},{Number:Kl}),c)for(var Yl=wi.Number,Xl=Hl,Ql,ec=f?r(Xl):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),tc=0;ec.length>tc;tc++)M(Xl,Ql=ec[tc])&&!M(Yl,Ql)&&zl(Yl,Ql,Bl(Xl,Ql));var nc,rc=x.isFinite,s=Number.isFinite||function(e){return"number"==typeof e&&rc(e)};function ic(e){var t;return e===undefined||null===e||!(e=String(e).trim())||(t=e.toLowerCase())===Tl||"undefined"===t||"null"===t||"未知"===e?undefined:e}R({target:"Number",stat:!0},{isFinite:s}),(Au=nc=nc||{})[Au.number=-1]="number",Au.string="";var oc,ac=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?nc.string:nc.number},sc=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},uc=function(e,t){return void 0===t&&(t=2048),String(e).replace(Sl,"").slice(0,t)},lc=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},cc=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],dc=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,fc=["ret","retcode","code","errcode"],hc=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?Tl:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:Tl,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(fc=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==fc.indexOf(e.toLowerCase())});return a.length?{code:""+(o="未知"!==(o=e[a[0]])&&""!==o?o:Tl),isErr:0!==o&&"0"!==o&&o!==Tl}:{code:Tl,isErr:!1}}catch(Me){return{code:Tl,isErr:!1}}},pc=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return yc(r).slice(0,10240)}catch(b){return""}},mc=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===T(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},gc=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,mc(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,mc(),2)||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},vc=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,mc())||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},yc=function(n,r){void 0===r&&(r=3);var i,o,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){"object"===T(e)&&1<r?s+=yc(e,r-1):s+=bc(e),s+=t===i-1?"":","}),s+="]"):n instanceof Object||"object"===T(n)?(s="{",o=Object.keys(n),a=o.length,o.forEach(function(e,t){"object"===T(n[e])&&1<r?s+='"'+e+'":'+yc(n[e],r-1):s+=wc(e,n[e]),s+=t===a-1||t<a-1&&"undefined"==typeof n[o[t+1]]?"":","}),s+="}"):s+=n,s},wc=function(e,t){var n=T(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===T(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},bc=function(e){var t=T(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},kc=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},_c=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=kc(e);r[e.type].push(t)}):(n=kc(e),r[e.type].push(n)),i.append("payload",vc(A({duration:r},t))),i},Sc=/data:(image|text|application|font)\/.*;base64/,Ec=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||Sc.test(t)||Cl.some(function(e){return-1<t.indexOf(e)})};(c=oc=oc||{}).LOG="log",c.SPEED="speed",c.PERFORMANCE="performance",c.OFFLINE="offline",c.WHITE_LIST="whiteList",c.VITALS="vitals",c.PV="pv",c.CUSTOM_PV="customPV",c.EVENT="event",c.CUSTOM="custom",c.SDK_ERROR="sdkError",c.SET_DATA="setData",c.LOAD_PACKAGE="loadPackage",c.MEMORY="memory";var Cc,P,Rc,Oc={maxAttempts:3,delays:[0,1e3,3e3]};function xc(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function Tc(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,a,s,u,l,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],a=d[2],s=d[3],u=d[4],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":o||"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(a=d[1],s=d[2],u=d[3],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++}))}return t}(r=Cc=Cc||{}).production="production",r.development="development",r.gray="gray",r.pre="pre",r.daily="daily",r.local="local",r.test="test",r.others="others",(s=P=P||{}).JS_ERROR="js_error",s.PROMISE_ERROR="promise_error",s.RESOURCE_ERROR="resource_error",s.API_ERROR="api_error",s.BLANK_SCREEN="blank_screen",s.PAGE_LOAD="page_load",s.RESOURCE_LOAD="resource_load",s.API_CALL="api_call",s.SSE_CALL="sse_call",s["true"]="web_vitals",s.LAG_DETECTED="lag_detected",s.NO_RESPONSE="no_response",s.MEMORY_USAGE="memory_usage",s.APP_METRICS="app_metrics",s.PROCESS_SIGNAL="process_signal",s.MEMORY_OOM="memory_oom",s.FILE_IO="file_io",s.CLICK="click",s.SCROLL="scroll",s.LONG_PRESS="long_press",s.PAGE_VIEW="page_view",s.TAB_HIDDEN="tab_hidden",s.TAB_VISIBLE="tab_visible",s.WINDOW_BLUR="window_blur",s.WINDOW_FOCUS="window_focus",s.FORM_FOCUS="form_focus",s.FORM_BLUR="form_blur",s.FORM_CHANGE="form_change",s.FORM_SUBMIT="form_submit",s.FORM_SUBMIT_RESULT="form_submit_result",s.STRUGGLE="struggle",s.CUSTOM="custom",s.LOG="log",(c=Rc=Rc||{}).ERROR="error",c.PERFORMANCE="performance",c.BEHAVIOR="behavior",c.NETWORK="network",c.LOG="log",c.CUSTOM="custom";var Ic=TypeError,Mc=function(e,t){if(e<t)throw new Ic("Not enough arguments");return e},Ac=x.Function,Pc=/MSIE .\./.test(Hn)||"BUN"==cl&&((r=x.Bun.version.split(".")).length<3||"0"===r[0]&&(r[1]<3||"3"===r[1]&&"0"===r[2])),s=function(o,a){var s=a?2:1;return Pc?function(e,t){var n=Mc(arguments.length,1)>s,r=S(e)?e:Ac(e),i=n?Jn(arguments,s):[],e=n?function(){Te(r,this,i)}:r;return a?o(e,t):o(e)}:o},c=s(x.setInterval,!0),r=(R({global:!0,bind:!0,forced:x.setInterval!==c},{setInterval:c}),s(x.setTimeout,!0)),Lc=(R({global:!0,bind:!0,forced:x.setTimeout!==r},{setTimeout:r}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),Dc=(R({target:"String",proto:!0},{repeat:qr}),{}),Nc={},Fc=function(e){return Dc[e]||(Dc[e]=setTimeout(function(){Nc[e]={},Dc[e]=null},6e4)),Dc[e]},Uc=function(c,d){return function(i,o){var a,s,u,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(s=function(e,t){var n,r,t=A(A({},c.bean),{from:t}),i=A({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(a){}}()?_c(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(A({duration:r},e)),i)},u=function(e,t,n,r){switch(t){case oc.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),a={};return o.forEach(function(t){a[t]=i.map(function(e){return e[t]||""})}),a.count=i.length,vc(a);case oc.SPEED:return s(e,n);case oc.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(l={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,l[t]||(l[t]=[]),l[t].push(e)}),Object.keys(l).forEach(function(e){var t,n=l[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,data:u(n,d,e,i.data)}))):(t=i.url+r+"from="+e,o(A(A({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:_l(i.beanFilter||[],["from"]),data:u(n,d,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(a=i.url)&&a.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(A(A({},i),{url:n,log:e,beanFilter:_l(i.beanFilter||[],["from"]),data:u(e,d,t,i.data)}))):(n=""+i.url,o(A(A({},i),{url:n,log:e,data:u(e,d,t,i.data)}))))):o(i)}},jc=function(u,l){return function(e,t){var n,r,i,o=Array.isArray(e),a=o?e:[e],s=(u.lifeCycle.emit("beforeRequest",e),u.config.beforeRequest);(a="function"==typeof s?a.map(function(e){try{var t=s({logs:e,logType:l});return(null==t?void 0:t.logType)===l&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(X){return e}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=Ol,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),A(A({},t),e)}))),a=n,t(o?a:a[0]))}},Bc=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===T(r)&&"url"in r&&(e=r)}catch(X){console.error(X)}t(e)}},zc=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},Wc={generateTraceId:qc(16),generateSpanId:qc(8)},Hc=Array(32);function qc(t){return function(){for(var e=0;e<2*t;e++)Hc[e]=Math.floor(16*Math.random())+48,58<=Hc[e]&&(Hc[e]+=39);return String.fromCharCode.apply(null,Hc.slice(0,2*t))}}function Vc(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Gc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Jc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",$c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Zc=function(e){for(var t,n,r,i="",o=0,a=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=Jc.charAt((t=t<<16|n<<8|r)>>18&63)+Jc.charAt(t>>12&63)+Jc.charAt(t>>6&63)+Jc.charAt(63&t)}return a?i.slice(0,a-3)+"===".substring(a):i},Kc=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!$c.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=Jc.indexOf(e.charAt(o++))<<18|Jc.indexOf(e.charAt(o++))<<12|(n=Jc.indexOf(e.charAt(o++)))<<6|(r=Jc.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},Yc=(ed.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},ed.prototype.createTraceparent=function(){var e=Wc.generateSpanId();return"00-"+Wc.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},ed.prototype.createB3=function(){var e=Wc.generateSpanId();return Wc.generateTraceId()+"-"+e+"-"+this.traceFlag},ed.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Zc,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Gc(),i=Gc();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.12"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},ed.prototype.createSentryTrace=function(){var e=Vc().substring(16);return Vc()+"-"+e+"-"+this.traceFlag},ed.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},ed.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},ed.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},ed),Xc={sw8:function(e){var t="function"==typeof atob?atob:Kc,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},Qc=function(e){var t,n="";return n="object"===T(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Xc)))[0])?Xc[t](e[1]):n};function ed(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function td(i){return function(e){e&&0!==e.length&&i.sendPipeline([function(t,e){var n={protocol_version:2,project_key:String(i.config.id||""),sdk:{name:i.sdkName,version:i.sdkVersion},app:{version:String(i.config.version||"1.0.0")},context:function(e){var t=String((null==(n=null==(t=null==(n=e.sessionManager)?void 0:n.getSession)?void 0:t.call(n))?void 0:n.id)||e.bean.sessionId||""),n=String(e.config.userId||e.config.uin||""),t={session_id:t,platform:(t=String(e.runtimePlatform||e.config.platform||"web").trim().toLowerCase(),["web","wx-miniprogram","uniapp","android","ios","electron","unknown"].includes(t)?t:"wx"===t?"wx-miniprogram":"my"!==t&&"qq"!==t&&"tt"!==t&&"undefined"!=typeof window?"web":"unknown")};n&&(t.user_id=n);(n=String(e.bean.aid||"").trim())&&"true"!==n&&(t.device_id=n);var n=e.bean.runtime?String(e.bean.runtime):"",r=e.bean.processType?String(e.bean.processType):"",i=e.bean.windowId!==undefined?String(e.bean.windowId):"",o=e.bean.webContentsId!==undefined?String(e.bean.webContentsId):"",e=e.bean.appVersion?String(e.bean.appVersion):"";return n&&(t.runtime=n),r&&(t.process_type=r),i&&(t.window_id=i),o&&(t.web_contents_id=o),e&&(t.app_version=e),"undefined"!=typeof navigator&&(t.user_agent=navigator.userAgent,t.language=navigator.language),"undefined"!=typeof screen&&(t.screen_resolution=screen.width+"x"+screen.height),t}(i),events:t},r=String(i.config.url||"").replace(/\/+$/,"");r&&e({url:r+"/api/v1/collect/events",data:JSON.stringify(n),method:"POST",contentType:"application/json",addBean:!1,type:oc.EVENT,log:t,success:function(){i.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){i.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],oc.EVENT)(e)}}var nd=Nr("every",TypeError),rd=(R({target:"Iterator",proto:!0,real:!0,forced:nd},{every:function(n){E(this);try{xe(n)}catch(X){ti(this,"throw",X)}var e,r;return nd?I(nd,this,n):(e=ai(this),!oi(e,function(e,t){if(!n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),pi.every),c=je("every");R({target:"Array",proto:!0,forced:!c},{every:function(e){return rd(this,e,1<arguments.length?arguments[1]:undefined)}});var id,od,ad,s=or.f,sd=ut("".slice),ud=Math.min,r=Hr("endsWith"),c=!(r||!(Nr=s(String.prototype,"endsWith"))||Nr.writable),s=(R({target:"String",proto:!0,forced:!c&&!r},{endsWith:function(e){var t=C(ae(this)),e=(Qi(e),C(e)),n=1<arguments.length?arguments[1]:undefined,r=t.length,n=n===undefined?r:ud(fe(n),r);return sd(t,n-e.length,n)===e}}),or.f),ld=ut("".slice),cd=Math.min,Nr=Hr("startsWith"),r=!(Nr||!(c=s(String.prototype,"startsWith"))||c.writable),dd=(R({target:"String",proto:!0,forced:!r&&!Nr},{startsWith:function(e){var t=C(ae(this)),e=(Qi(e),C(e)),n=fe(cd(1<arguments.length?arguments[1]:undefined,t.length));return ld(t,n,n+e.length)===e}}),void 0),fd=(R({target:"Object",stat:!0},{is:dd}),Object.is,Nt("search",function(r,i,o){return[function(e){var t=ae(this),n=O(e)?en(e,r):undefined;return n?I(n,e,t):(n=C(t),new RegExp(e)[r](n))},function(e){var t=E(this),e=C(e),n=o(i,t,e);return n.done?n.value:(n=t.lastIndex,dd(n,0)||(t.lastIndex=0),e=pn(t,e),dd(t.lastIndex,n)||(t.lastIndex=n),null===e?-1:e.index)}]}),Math.floor),hd=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=fd(n/2),s=hd(Jn(e,0,a),t),u=hd(Jn(e,a),t),l=s.length,c=u.length,d=0,f=0;d<l||f<c;)e[d+f]=d<l&&f<c?t(s[d],u[f])<=0?s[d++]:u[f++]:d<l?s[d++]:u[f++];return e},pd=hd,Hr=Hn.match(/firefox\/(\d+)/i),md=!!Hr&&+Hr[1],gd=/MSIE|Trident/.test(Hn),s=Hn.match(/AppleWebKit\/(\d+)\./),vd=!!s&&+s[1],yd=[],wd=v(yd.sort),bd=v(yd.push),c=g(function(){yd.sort(undefined)}),r=g(function(){yd.sort(null)}),Nr=je("sort"),kd=!g(function(){if(qn)return qn<70;if(!(md&&3<md)){if(gd)return!0;if(vd)return vd<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)yd.push({k:e+n,v:t})}for(yd.sort(function(e,t){return t.v-e.v}),n=0;n<yd.length;n++)e=yd[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),_d=(R({target:"Array",proto:!0,forced:c||!r||!Nr||!kd},{sort:function(e){e!==undefined&&xe(e);var t=ue(this);if(kd)return e===undefined?wd(t):wd(t,e);for(var n,r,i=[],o=he(t),a=0;a<o;a++)a in t&&bd(i,t[a]);for(pd(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=C(e))===(t=C(t))?0:t<e?1:-1})),n=he(i),a=0;a<n;)t[a]=i[a++];for(;a<o;)La(t,a++);return t}}),(Nt=(Nt=x.URL)&&Nt.prototype)&&Nt.toString),Sd=(R({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return I(_d,this)}}),Object.getOwnPropertyDescriptor),Hr=function(e){var t;return f?(t=Sd(x,e))&&t.value:x[e]},Ed=RangeError,Cd=String.fromCharCode,s=String.fromCodePoint,Rd=v([].join),c=!!s&&1!==s.length,Od=(R({target:"String",stat:!0,arity:1,forced:c},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(ft(t=+arguments[i],1114111)!==t)throw new Ed(t+" is not a valid code point");n[i++]=t<65536?Cd(t):Cd(55296+((t-=65536)>>10),t%1024+56320)}return Rd(n,"")}}),String.fromCharCode),xd=Se("String","fromCodePoint"),Td=encodeURIComponent,Id=parseInt,Md=v("".charAt),Ad=v([].push),Pd=v("".replace),Ld=v("".slice),Dd=v(/./.exec),Nd=/^[0-9a-f]+$/i,Fd=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF]/g,Ud=function(e,t){e=Ld(e,t,t+2);return Dd(Nd,e)?Id(e,16):NaN},jd=function(e){return 2===e.length?e:"�"},r=function(e){for(var t=e.length,n="",r=0;r<t;){var i=Md(e,r);if("%"===i){if("%"===Md(e,r+1)||t<r+3){n+="%",r++;continue}var o=Ud(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===a)i=Od(o);else{if(1===a||4<a){n+="�",r++;continue}for(var s=[o],u=1;u<a&&!(++r+3>t||"%"!==Md(e,r));){var l=Ud(e,r+1);if(l!=l||191<l||l<128)break;if(1===u){if(224===o&&l<160)break;if(237===o&&159<l)break;if(240===o&&l<144)break;if(244===o&&143<l)break}Ad(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(s);if(null===c){for(var d=0;d<a;d++)n+="�";r++;continue}i=xd(c)}}n+=i,r++}return n},Nr=function(e){try{return Td(e)}catch(X){return Td(Pd(e,Fd,jd))}},Nt=Ye("iterator"),Bd=Ut.set,zd=Ut.getterFor("URLSearchParams"),Wd=Ut.getterFor("URLSearchParamsIterator"),Hd=r,qd=Nr,Vd=Hr("fetch"),Gd=Hr("Request"),Jd=Hr("Headers"),$d=Gd&&Gd.prototype,s=Jd&&Jd.prototype,Zd=x.TypeError,Kd=v("".charAt),Yd=v([].join),Xd=v([].push),Qd=v("".replace),ef=v([].shift),tf=v([].splice),nf=v("".split),rf=v("".slice),of=/\+/g,af=function(e){return Hd(Qd(e,of," "))},sf=/[!'()~]|%20/g,uf={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},lf=function(e){return uf[e]},cf=function(e){return Qd(qd(e),sf,lf)},df=Er(function(e,t){Bd(this,{type:"URLSearchParamsIterator",target:zd(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=Wd(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ar(undefined,!0);var r=t[n];switch(e.kind){case"keys":return Ar(r.key,!1);case"values":return Ar(r.value,!1)}return Ar([r.key,r.value],!1)},!0),ff=function(e){this.entries=[],this.url=null,e!==undefined&&(O(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Kd(e,0)?rf(e,1):e:C(e)))},c=(ff.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s=this.entries,u=Xr(e);if(u)for(n=(t=ei(e,u)).next;!(r=I(n,t)).done;){if(i=(r=ei(E(r.value))).next,(o=I(i,r)).done||(a=I(i,r)).done||!I(i,r).done)throw new Zd("Expected sequence with length 2");Xd(s,{key:C(o.value),value:C(a.value)})}else for(var l in e)M(e,l)&&Xd(s,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=nf(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=nf(t,"="),Xd(n,{key:af(ef(t)),value:af(Yd(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Xd(n,cf(e.key)+"="+cf(e.value));return Yd(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){lr(this,hf);var e=0<arguments.length?arguments[0]:undefined,e=Bd(this,new ff(e));f||(this.size=e.entries.length)}),hf=c.prototype;Xo(hf,{append:function(e,t){var n=zd(this);Mc(arguments.length,2),Xd(n.entries,{key:C(e),value:C(t)}),f||this.size++,n.updateURL()},"delete":function(e){for(var t=zd(this),n=Mc(arguments.length,1),r=t.entries,i=C(e),e=n<2?undefined:arguments[1],o=e===undefined?e:C(e),a=0;a<r.length;){var s=r[a];s.key!==i||o!==undefined&&s.value!==o?a++:tf(r,a,1)}f||(this.size=r.length),t.updateURL()},get:function(e){var t=zd(this).entries;Mc(arguments.length,1);for(var n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=zd(this).entries;Mc(arguments.length,1);for(var n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Xd(r,t[i].value);return r},has:function(e){for(var t=zd(this).entries,n=Mc(arguments.length,1),r=C(e),e=n<2?undefined:arguments[1],i=e===undefined?e:C(e),o=0;o<t.length;){var a=t[o++];if(a.key===r&&(i===undefined||a.value===i))return!0}return!1},set:function(e,t){var n=zd(this);Mc(arguments.length,2);for(var r,i=n.entries,o=!1,a=C(e),s=C(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?tf(i,u--,1):(o=!0,r.value=s));o||Xd(i,{key:a,value:s}),f||(this.size=i.length),n.updateURL()},sort:function(){var e=zd(this);pd(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=zd(this).entries,r=Gr(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new df(this,"keys")},values:function(){return new df(this,"values")},entries:function(){return new df(this,"entries")}},{enumerable:!0}),Vt(hf,Nt,hf.entries,{name:"entries"}),Vt(hf,"toString",function(){return zd(this).serialize()},{enumerable:!0}),f&&Bt(hf,"size",{get:function(){return zd(this).entries.length},configurable:!0,enumerable:!0}),vr(c,"URLSearchParams"),R({global:!0,constructor:!0,forced:!0},{URLSearchParams:c}),S(Jd)&&(id=v(s.has),od=v(s.set),ad=function(e){if(O(e)){var t,n=e.body;if("URLSearchParams"===tt(n))return t=e.headers?new Jd(e.headers):new Jd,id(t,"content-type")||od(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ct(e,{body:it(0,C(n)),headers:it(0,t)})}return e},S(Vd)&&R({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Vd(e,1<arguments.length?ad(arguments[1]):{})}}),S(Gd))&&(($d.constructor=Nt=function(e){return lr(this,$d),new Gd(e,1<arguments.length?ad(arguments[1]):{})}).prototype=$d,R({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Nt}));var pf,s={URLSearchParams:c,getState:zd},mf=Ye("iterator"),gf=(g(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!f||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[mf]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),/[^\0-\u007E]/),vf=/[.\u3002\uFF0E\uFF61]/g,yf="Overflow: input needs wider integers to process",wf=RangeError,bf=v(vf.exec),kf=Math.floor,_f=String.fromCharCode,Sf=v("".charCodeAt),Ef=v([].join),Cf=v([].push),Rf=v("".replace),Of=v("".split),xf=v("".toLowerCase),Tf=function(e){return e+22+75*(e<26)},If=function(e,t,n){var r=0;for(e=n?kf(e/700):e>>1,e+=kf(e/t);455<e;)e=kf(e/35),r+=36;return kf(r+36*e/(e+38))},Mf=function(e){for(var t,n=[],r=Of(Rf(xf(e),vf,"."),"."),i=0;i<r.length;i++)t=r[i],Cf(n,bf(gf,t)?"xn--"+function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=Sf(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=Sf(e,n++)))?Cf(t,((1023&o)<<10)+(1023&i)+65536):(Cf(t,o),n--):Cf(t,o)}return t}(e)).length,i=128,o=0,a=72;for(c=0;c<e.length;c++)(t=e[c])<128&&Cf(n,_f(t));var s=n.length,u=s;for(s&&Cf(n,"-");u<r;){for(var l=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<l&&(l=t);var d=u+1;if(l-i>kf((2147483647-o)/d))throw new wf(yf);for(o+=(l-i)*d,i=l,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new wf(yf);if(t===i){for(var f=o,h=36;;){var p=h<=a?1:a+26<=h?26:h-a;if(f<p)break;var m=f-p,g=36-p;Cf(n,_f(Tf(p+m%g))),f=kf(m/g),h+=36}Cf(n,_f(Tf(f))),a=If(o,d,u===s),o=0,u++}}o++,i++}return Ef(n,"")}(t):t);return Ef(n,".")},Af=zt.codeAt,Pf=Ut.set,Lf=Ut.getterFor("URL"),Df=s.URLSearchParams,Nf=s.getState,Ff=r,Uf=Nr,Nt=x.URL,jf=x.TypeError,Bf=x.parseInt,zf=Math.floor,Wf=Math.pow,Hf=String.fromCharCode,qf=v("".charAt),Vf=v(/./.exec),Gf=v([].join),Jf=v(1.1.toString),$f=v([].pop),Zf=v([].push),Kf=v("".replace),Yf=v([].shift),Xf=v("".split),Qf=v("".indexOf),eh=v("".slice),th=v("".toLowerCase),nh=v([].unshift),rh=/[a-z]/i,ih=/[\d+\-.a-z]/i,oh=/\d/,ah=/^0x/i,sh=/^[0-7]+$/,uh=/^\d+$/,lh=/^[\da-f]+$/i,ch=/[\u0000-\u0020#%/:<>?@[\\\]^|\u007F]/,dh=/[\0\t\n\r #/:<>?@[\\\]^|]/,fh=/^[\u0000-\u0020]+/,hh=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ph=/[\t\n\r]/g,mh=/[^\u0000-\u007F]/,gh=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)nh(t,e%256),e=zf(e/256);return Gf(t,".")}if("object"!=T(e))return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=Jf(e[n],16),n<7&&(t+=":")));return"["+t+"]"},vh={},yh=a({},vh,{" ":1,'"':1,"#":1,"<":1,">":1}),wh=a({},yh,{"'":1}),bh=a({},vh,{" ":1,'"':1,"<":1,">":1,"`":1}),kh=a({},bh,{"#":1,"?":1,"{":1,"}":1,"^":1}),_h=a({},kh,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Sh=function(e,t){var n=Af(e,0);return 32<=n&&n<127&&!M(t,e)?e:"'"===e&&M(t,e)?"%27":Uf(e)},Eh={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ch=function(e,t){return 2===e.length&&Vf(rh,qf(e,0))&&(":"===(e=qf(e,1))||!t&&"|"===e)},Rh=function(e){return 1<e.length&&Ch(eh(e,0,2))&&(2===e.length||"/"===(e=qf(e,2))||"\\"===e||"?"===e||"#"===e)},Oh={},xh={},Th={},Ih={},Mh={},Ah={},Ph={},Lh={},Dh={},Nh={},Fh={},Uh={},jh={},Bh={},zh={},Wh={},Hh={},qh={},Vh={},Gh={},Jh={},$h=function(e,t,n){var r,i,e=C(e);if(t){if(i=this.parse(e))throw new jf(i);this.searchParams=null}else{if(n!==undefined&&(r=new $h(n,!0)),i=this.parse(e,null,r))throw new jf(i);(t=Nf(new Df)).bindURL(this),this.searchParams=t}},Zh=($h.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,u=t||Oh,l=0,c="",d=!1,f=!1,h=!1;for(e=C(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=Kf(e,fh,""),e=Kf(e,hh,"$1")),e=Kf(e,ph,""),r=Tu(e);l<=r.length;){switch(i=r[l],u){case Oh:if(!i||!Vf(rh,i)){if(t)return"Invalid scheme";u=Th;continue}c+=th(i),u=xh;break;case xh:if(i&&Vf(ih,i))c+=th(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",u=Th,l=0;continue}if(t&&(s.isSpecial()!==M(Eh,c)||"file"===c&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&""===s.host))return;if(s.scheme=c,t)return void(s.isSpecial()&&Eh[s.scheme]===s.port&&(s.port=null));c="","file"===s.scheme?u=Bh:s.isSpecial()&&n&&n.scheme===s.scheme?u=Ih:s.isSpecial()?u=Lh:"/"===r[l+1]?(u=Mh,l++):(s.cannotBeABaseURL=!0,Zf(s.path,""),u=Vh)}break;case Th:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){s.scheme=n.scheme,s.path=Jn(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,u=Jh;break}u="file"===n.scheme?Bh:Ah;continue;case Ih:if("/"!==i||"/"!==r[l+1]){u=Ah;continue}u=Dh,l++;break;case Mh:if("/"===i){u=Nh;break}u=qh;continue;case Ah:if(s.scheme=n.scheme,i===pf)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query=n.query;else if("/"===i||"\\"===i&&s.isSpecial())u=Ph;else if("?"===i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query="",u=Gh;else{if("#"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.path.length&&s.path.length--,u=qh;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Jn(n.path),s.query=n.query,s.fragment="",u=Jh}break;case Ph:if(!s.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,u=qh;continue}u=Nh}else u=Dh;break;case Lh:if(u=Dh,"/"!==i||"/"!==r[l+1])continue;l++;break;case Dh:if("/"===i||"\\"===i)break;u=Nh;continue;case Nh:if("@"===i){d&&(c="%40"+c);for(var d=!0,p=Tu(c),m=0;m<p.length;m++){var g=p[m];":"!==g||h?(g=Sh(g,_h),h?s.password+=g:s.username+=g):h=!0}c=""}else if(i===pf||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(d&&""===c)return"Invalid authority";l-=Tu(c).length+1,c="",u=Fh}else c+=i;break;case Fh:case Uh:if(t&&"file"===s.scheme){u=Wh;continue}if(":"!==i||f){if(i===pf||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(s.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(s.includesCredentials()||null!==s.port))return;if(o=s.parseHost(c))return o;if(c="",u=Hh,t)return;continue}"["===i?f=!0:"]"===i&&(f=!1),c+=i}else{if(""===c)return"Invalid host";if(t===Uh)return;if(o=s.parseHost(c))return o;c="",u=jh}break;case jh:if(!Vf(oh,i)){if(i===pf||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()||t){if(""!==c){var v=Bf(c,10);if(65535<v)return"Invalid port";s.port=s.isSpecial()&&v===Eh[s.scheme]?null:v,c=""}if(t)return;u=Hh;continue}return"Invalid port"}c+=i;break;case Bh:if(s.scheme="file",s.host="","/"===i||"\\"===i)u=zh;else{if(!n||"file"!==n.scheme){u=qh;continue}switch(i){case pf:s.host=n.host,s.path=Jn(n.path),s.query=n.query;break;case"?":s.host=n.host,s.path=Jn(n.path),s.query="",u=Gh;break;case"#":s.host=n.host,s.path=Jn(n.path),s.query=n.query,s.fragment="",u=Jh;break;default:s.host=n.host,Rh(Gf(Jn(r,l),""))||(s.path=Jn(n.path),s.shortenPath()),u=qh;continue}}break;case zh:if("/"===i||"\\"===i){u=Wh;break}n&&"file"===n.scheme&&(s.host=n.host,!Rh(Gf(Jn(r,l),"")))&&Ch(n.path[0],!0)&&Zf(s.path,n.path[0]),u=qh;continue;case Wh:if(i===pf||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Ch(c))u=qh;else{if(""===c){if(s.host="",t)return}else{if(o=s.parseHost(c))return o;if("localhost"===s.host&&(s.host=""),t)return;c=""}u=Hh}continue}c+=i;break;case Hh:if(s.isSpecial()){if(u=qh,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==pf&&(u=qh,"/"!==i))continue}else s.fragment="",u=Jh;else s.query="",u=Gh;break;case qh:if(i===pf||"/"===i||"\\"===i&&s.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(v=th(c))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(s.shortenPath(),"/"===i||"\\"===i&&s.isSpecial()||Zf(s.path,"")):"."===(a=c)||"%2e"===th(a)?"/"===i||"\\"===i&&s.isSpecial()||Zf(s.path,""):("file"===s.scheme&&!s.path.length&&Ch(c)&&(null!==s.host&&""!==s.host&&(s.host=""),c=qf(c,0)+":"),Zf(s.path,c)),c="","file"===s.scheme&&(i===pf||"?"===i||"#"===i))for(;1<s.path.length&&""===s.path[0];)Yf(s.path);"?"===i?(s.query="",u=Gh):"#"===i&&(s.fragment="",u=Jh)}else c+=Sh(i,kh);break;case Vh:"?"===i?(s.query="",u=Gh):"#"===i?(s.fragment="",u=Jh):i!==pf&&(s.path[0]+=" "===i?"?"===r[l+1]||"#"===r[l+1]?"%20":" ":Sh(i,vh));break;case Gh:t||"#"!==i?i!==pf&&(s.query+=Sh(i,s.isSpecial()?wh:yh)):(s.fragment="",u=Jh);break;case Jh:i!==pf&&(s.fragment+=Sh(i,bh))}l++}},parseHost:function(u){var e,t,n;if("["===qf(u,0))return"]"===qf(u,u.length-1)&&(e=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,d=0,f=function(){return qf(e,d)};if(":"===f()){if(":"!==qf(e,1))return;d+=2,c=++l}for(;f();){if(8===l)return;if(":"!==f()){for(t=n=0;n<4&&Vf(lh,f());)t=16*t+Bf(f(),16),d++,n++;if("."===f()){if(0===n)return;if(d-=n,6<l)return;for(r=0;f();){if(i=null,0<r){if(!("."===f()&&r<4))return;d++}if(!Vf(oh,f()))return;for(;Vf(oh,f());){if(o=Bf(f(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;d++}u[l]=256*u[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===f()){if(d++,!f())return}else if(f())return;u[l++]=t}else{if(null!==c)return;d++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&0<a;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(eh(u,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(null===(u=function(e){if(!Vf(mh,e))return""===e?null:Mf(e);for(var t,n,r=Tu(e),i="",o=0;o<r.length;o++){if(t=Af(r[o],0),65533===(n=t)||55296<=n&&n<=57343||128<=n&&n<=159||8206<=n&&n<=8207||8232<=n&&n<=8233||8234<=n&&n<=8238||8293<=n&&n<=8297||64976<=n&&n<=65007||65534==(65534&n)||57344<=n&&n<=63743||983040<=n&&n<=1114109)return null;173===(n=t)||847===n||8203===n||12644===n||65279===n||65440===n||4447<=n&&n<=4448||6068<=n&&n<=6069||6155<=n&&n<=6159||8288<=n&&n<=8292||8298<=n&&n<=8303||65024<=n&&n<=65039||917760<=n&&n<=917999||(i+=(n=65281<=(n=t)&&n<=65374?n-65248:160===n||5760===n||8239===n||8287===n||12288===n||8192<=n&&n<=8202||n<=65535&&-1<Qf("¨¯´¸˘˙˚˛˜˝ͺ΄΅᾽᾿῀῁῍῎῏῝῞῟῭΅´῾‗‾⁇⁈⁉℀℁℅℆⩴゛゜ﱞﱟﱠﱡﱢﱣﷺﷻ︓︖﹇﹈﹉﹊﹋﹌﹕﹖﹟﹤﹥﹨﹪﹫ﹰﹲﹴﹶﹸﹺﹼﹾ ̄",Hf(n))?32:n)===t?r[o]:Hf(n))}return""===i?null:Mf(i)}(Ff(u)))||Vf(ch,u))return"Invalid host";if(function(){var e=Xf(u,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return Vf(uh,e=e[e.length-1])||Vf(ah,e)&&(""===(e=eh(e,2))||Vf(lh,e))}()){if(null===(e=function(){var e,t,n,r,i,o,a,s=Xf(u,".");if(s.length&&""===s[s.length-1]&&s.length--,4<(e=s.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=s[n]))return null;if(i=10,1<r.length&&"0"===qf(r,0)&&(i=Vf(ah,r)?16:8,r=eh(r,8===i?1:2)),""===r)o=0;else{if(!Vf(10===i?uh:8===i?sh:lh,r))return null;o=Bf(r,i)}Zf(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=Wf(256,5-e))return null}else if(255<o)return null;for(a=$f(t),n=0;n<t.length;n++)a+=t[n]*Wf(256,3-n);return a}()))return"Invalid host";this.host=e}else this.host=u}else{if(Vf(dh,u))return"Invalid host";for(e="",t=Tu(u),n=0;n<t.length;n++)e+=Sh(t[n],vh);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return M(Eh,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Ch(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=gh(i),null!==o&&(l+=":"+o)):"file"===t&&(l+="//"),null===i&&!e.cannotBeABaseURL&&1<a.length&&""===a[0]&&(l+="/."),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Gf(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){e=this.parse(e);if(e)throw new jf(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new Zh(this.path[0]).origin}catch(X){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+gh(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(C(e)+":",Oh)},getUsername:function(){return this.username},setUsername:function(e){var t=Tu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Sh(t[n],_h)}},getPassword:function(){return this.password},setPassword:function(e){var t=Tu(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Sh(t[n],_h)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?gh(e):gh(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Fh)},getHostname:function(){var e=this.host;return null===e?"":gh(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Uh)},getPort:function(){var e=this.port;return null===e?"":C(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=C(e))?this.port=null:this.parse(e,jh))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Gf(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Hh))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=C(e))?this.query=null:("?"===qf(e,0)&&(e=eh(e,1)),this.query="",this.parse(e,Gh)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=C(e))?("#"===qf(e,0)&&(e=eh(e,1)),this.fragment="",this.parse(e,Jh)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=lr(this,Kh),n=1<Mc(arguments.length,1)?arguments[1]:undefined,e=Pf(t,new $h(e,!1,n));f||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),Kh=Zh.prototype,c=function(e,t){return{get:function(){return Lf(this)[e]()},set:t&&function(e){return Lf(this)[t](e)},configurable:!0,enumerable:!0}},r=(f&&(Bt(Kh,"href",c("serialize","setHref")),Bt(Kh,"origin",c("getOrigin")),Bt(Kh,"protocol",c("getProtocol","setProtocol")),Bt(Kh,"username",c("getUsername","setUsername")),Bt(Kh,"password",c("getPassword","setPassword")),Bt(Kh,"host",c("getHost","setHost")),Bt(Kh,"hostname",c("getHostname","setHostname")),Bt(Kh,"port",c("getPort","setPort")),Bt(Kh,"pathname",c("getPathname","setPathname")),Bt(Kh,"search",c("getSearch","setSearch")),Bt(Kh,"searchParams",c("getSearchParams")),Bt(Kh,"hash",c("getHash","setHash"))),Vt(Kh,"toJSON",function(){return Lf(this).serialize()},{enumerable:!0}),Vt(Kh,"toString",function(){return Lf(this).serialize()},{enumerable:!0}),Nt&&(zt=Nt.createObjectURL,s=Nt.revokeObjectURL,zt&&Vt(Zh,"createObjectURL",Gr(zt,Nt)),s)&&Vt(Zh,"revokeObjectURL",Gr(s,Nt)),vr(Zh,"URL"),R({global:!0,constructor:!0,forced:!0,sham:!f},{URL:Zh}),R({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=ue(this),n=he(t),e=e===undefined?1:ce(e),r=hi(t,0);return Ml(r,t,t,n,0,e),r}}),tr("flat"),vi.f),Yh=v(r),Xh=v([].push),Qh=f&&g(function(){var e=Object.create(null);return e[2]=2,!Yh(e,2)}),Nr=function(u){return function(e){for(var t,n=We(e),r=lt(n),i=Qh&&null===cr(n),o=r.length,a=0,s=[];a<o;)t=r[a++],f&&!(i?t in n:Yh(n,t))||Xh(s,u?[t,n[t]]:n[t]);return s}},a={entries:Nr(!0),values:Nr(!1)},ep=a.values,tp=(R({target:"Object",stat:!0},{values:function(e){return ep(e)}}),new Set(Object.values({error:["js_error","promise_error","resource_error","api_error","blank_screen","no_response"],performance:["page_load","web_vitals","lag_detected","memory_usage","memory_oom"],network:["resource_load","api_call","sse_call"],custom:["custom"],log:["log"]}).flat())),np={event:{enabled:!0,types:{}},replay:{enabled:!1,experience_sample_rate:0,error_traceback:!1,error_sample_rate:100}};function rp(e){return e===undefined||null===e?"":String(e)}function ip(i,e){return e.enabled&&e.conditions&&0!==e.conditions.length&&e.conditions.every(function(e){var t=i,n=e;if((t=function(e,t){if(t.startsWith("tags."))return n=t.slice("tags.".length),e.tags&&n in e.tags?e.tags[n]:undefined;if(t.startsWith("event_properties."))return n=t.slice("event_properties.".length),e.event_properties&&n in e.event_properties?e.event_properties[n]:undefined;if("page_path"===t){if(!e.page_url)return undefined;try{return new URL(e.page_url).pathname}catch(F0){return undefined}}var n=e;return t in n&&n[t]!==undefined&&null!==n[t]?n[t]:undefined}(t,n.field))===undefined)return!1;var r=rp(t);switch(n.operator){case"equals":return r===rp(n.value);case"not_equals":return r!==rp(n.value);case"contains":return r.includes(rp(n.value));case"not_contains":return!r.includes(rp(n.value));case"starts_with":return r.startsWith(rp(n.value));case"ends_with":return r.endsWith(rp(n.value));case"in":return(Array.isArray(n.value)?n.value.map(rp):[]).includes(r);case"not_in":return!(Array.isArray(n.value)?n.value.map(rp):[]).includes(r);default:return!1}})}function op(e,t,n){if(void 0===t&&(t=np),void 0===n&&(n=Math.random),null==(r=null==t?void 0:t.event)||!r.enabled)return!1;r=t,t=e.event_type;for(var r,t=tp.has(t)&&(null==(r=null==(r=r.event)?void 0:r.types)?void 0:r[t])||{sample_rate:100,rules:[]},i=t.sample_rate,o=0,a=t.rules||[];o<a.length;o++){var s=a[o];if(s.enabled&&ip(e,s)){i=s.sample_rate;break}}return 100<=i||!(i<=0)&&100*n()<i}function ap(e){e=null==(e=e)?void 0:e._tdemSampleGate;return!!e&&e.isDecided&&e.isSampled}function sp(e,t){var n=e.data||{},r=t.bean||{};return{event_type:String(e.event_type||""),event_category:e.event_category,event_name:e.event_name||n.event_name,page_url:e.page_url,user_id:r.user_id||t.config.userId,device_id:r.device_id||t.config.aid,env:t.config.env,version:String(null!=(t=null!=(t=t.config.version)?t:r.app_version)?t:""),tags:n.tags||e.tags,event_properties:n.event_properties||n.properties||n}}function up(e){return e._tdemSampleConfig||null}var lp=function(){},cp=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||lp)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=lp),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},dp=(R({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,n,r=We(e),i=or.f,o=ir(r),a={},s=0;o.length>s;)(n=i(r,t=o[s++]))!==undefined&&Gn(a,t,n);return a}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),fp={low:1,medium:3,high:5},hp=new Set(["custom_struggle_name","form_id","field_id","trigger_event_id","struggle_status","struggle_owner_type","struggle_owner_key","detection_source","rule_version"]),pp={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},mp={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},gp=(y.use=function(e){-1===y.installedPlugins.indexOf(e)&&e.tdemPlugin&&y.installedPlugins.push(e)},y.unuse=function(e){e=y.installedPlugins.indexOf(e);-1!==e&&y.installedPlugins.splice(e,1)},y.prototype.getInternalTransport=function(){return this.internalTransport},y.prototype.setInternalTransport=function(e){this.internalTransport=e},y.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},y.prototype.transportRequest=function(t,n){return bl(this,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,this.internalTransport.request(t,n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t}]}})})},y.prototype.transportHandoff=function(t,n){return bl(this,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,A(A({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},y.prototype.init=function(e){this.setConfig(e),this.config=El(this.config,e.hostUrl);for(var t=0;t<y.installedPlugins.length;t++)try{y.installedPlugins[t].patch(this)}catch(u){this.sendSDKError(u)}this.lifeCycle.emit("onInited")},y.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=y.instances.indexOf(this);-1!==r&&y.instances.splice(r,1);for(var i=y.installedPlugins.length-1;0<=i;i--)try{y.installedPlugins[i].unpatch(this)}catch(N){this.sendSDKError(N)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&dp(o,this),o=Object.getPrototypeOf(o););0===y.instances.length&&(r=Object.getPrototypeOf(this).constructor,dp(r),dp(y))}},y.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.aid,o=e.env,a=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(n!==undefined&&null!==n?String(n):""),n=this.bean.id!==t||this.bean.uin!==e||this.bean.aid!==i;return this.bean.id=t||"",this.bean.uin=e,this.bean.version=r||"1.0.12",this.bean.aid=i||"",this.bean.env=function(){switch(a){case Cc.production:case Cc.development:case Cc.gray:case Cc.pre:case Cc.daily:case Cc.local:case Cc.test:case Cc.others:return 1;default:return}}()?a:Cc.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},y.prototype.extendBean=function(e,t){this.bean[e]=t},y.prototype.send=function(e,i,o){var t=this;return cp([Bc(this),Uc(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},zc(this)])(e)},y.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(gc(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.12)",addBean:!1,method:"get",type:oc.SDK_ERROR,log:e})}],oc.SDK_ERROR)(e)},y.prototype.sendPipeline=function(e,t){var n,o=this;return cp(_l([function(e,t){if(e&&e.type===oc.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},jc(n=this,t)],e,[Uc(this,t),Bc(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,_l([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,_l([r],t))})},zc(this)]))},y.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:xc(),event_type:P.CUSTOM,event_category:Rc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(),data:{event_name:e,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},y.prototype.trackStruggle=function(e,t){void 0===t&&(t={});var n,e="string"==typeof e?e.trim():"";!e||128<e.length?console.warn("trackStruggle: name must be a non-empty string limited to 128 characters"):(n=t.severity||"medium",(n=fp[n])?this.reportStruggle({type:"custom_struggle",ownerType:"business",ownerKey:e,severity:n,detectionSource:"custom",ruleVersion:"custom-v1",tags:t.tags,properties:A(A({},t.properties||{}),{custom_struggle_name:e})}):console.warn("trackStruggle: severity must be low, medium, or high"))},y.prototype.reportTDEMEvent=function(e){var n,t,r,i=this,e=Array.isArray(e)?e:[e];e.length&&(n="string"==typeof(r=(t=this).viewId)&&r.trim()?r.trim():"string"==typeof(t=null==(r=t.bean)?void 0:r.viewId)&&t.trim()?t.trim():"",r=e.map(function(e){var t,e="string"!=typeof e.view_id&&n?A(A({},e),{view_id:n}):e;return A(A({},e),{page_url:e.page_url||i.getCurrentEventPageUrl(),data:A(A(A({},e.data),null!=(t=e.data)&&t.replay_id||!i.getCurrentReplayId()?{}:{replay_id:i.getCurrentReplayId()}),i.mergeEventTags(null==(t=e.data)?void 0:t.tags)?{tags:i.mergeEventTags(null==(t=e.data)?void 0:t.tags)}:{})})}),this.lifeCycle.emit("tdemEventCreated",r),this.tdemEventPipeline(r))},y.prototype.measure=function(e,t,n){void 0===n&&(n={}),e&&"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("measure: duration must between 0 and 2147483646"):this.submitMeasure(e,t,n):console.warn("measure: duration must be a number"):console.warn("measure: name must be a non-empty string")},y.prototype.startMeasure=function(e){"string"==typeof e&&e?this.timeMap[e]?console.warn("Measure "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("startMeasure: name must be a non-empty string")},y.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n=this.getTimeEventDuration(e))!==undefined?(this.submitMeasure(e,n,t),delete this.timeMap[e]):console.warn("Measure "+e+" does not exist"):console.warn("endMeasure: name must be a non-empty string")},y.prototype.captureMessage=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n="error"===t.level?"error":"warn"===t.level?"warn":"info",n={event_id:xc(),event_type:P.LOG,event_category:Rc.LOG,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{log_level:n,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},y.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:Tc(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},y.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:A(A({},this.config.defaultTags||{}),e||{})})},y.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=A({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},y.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},y.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},y.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},y.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:pp[r],n="number"==typeof e.weight?e.weight:mp[r],r={event_id:xc(),event_type:P.STRUGGLE,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:A(A({},this.sanitizeStruggleProperties(e.properties)),{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()})}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},y.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:xc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},y.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:xc(),event_type:P.PAGE_VIEW,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:e,data:{page_title:t.pageTitle||"",referrer:t.referrer,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(A(A(A(A(A(A(A({},t.properties||{}),t.navigationType?{navigation_type:t.navigationType}:{}),t.fromPage?{from_page:t.fromPage}:{}),t.toPage?{to_page:t.toPage}:{}),"boolean"==typeof t.isFirstVisit?{is_first_visit:t.isFirstVisit?"1":"0"}:{}),"boolean"==typeof t.isFirstLoad?{is_first_load:t.isFirstLoad?"1":"0"}:{}),t.deviceType?{device_type:t.deviceType}:{}))}};this.reportTDEMEvent(e)},y.prototype.setPage=function(e,t){var n;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,this.reportPageView(e,{pageTitle:null==t?void 0:t.pageTitle,navigationType:"push",fromPage:(n||"").slice(0,512),toPage:e.slice(0,512),isFirstVisit:!1,tags:A({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{})}),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},y.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},y.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(Pe){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},y.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},y.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},y.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||undefined},y.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(A(A({},this.config.defaultTags||{}),e||{}))},y.prototype.sanitizeStringMap=function(n,r){var i;return void 0===r&&(r=1024),n&&"object"===T(n)&&(i={},Object.keys(n).forEach(function(e){var t=n[e];e&&t!==undefined&&null!==t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length)?i:undefined},y.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},y.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},y.prototype.sanitizeStruggleProperties=function(e){var n=this.sanitizeEventProperties(e);return n?Object.keys(n).reduce(function(e,t){return hp.has(t)&&"custom_struggle_name"!==t||(e[t]=n[t]),e},{}):undefined},y.prototype.sanitizeEventPayload=function(n,e){var r,i=this;return n&&"object"===T(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=i.sanitizePayloadValue(n[e]))!==undefined&&(r[e]=t)}),Object.keys(r).length)?r:undefined},y.prototype.sanitizePayloadValue=function(n,r){var i=this;if(void 0===r&&(r=0),n===undefined||null===n)return undefined;if("string"==typeof n)return n.slice(0,256);if("number"==typeof n||"boolean"==typeof n)return n;if(Array.isArray(n))return n.slice(0,10).map(function(e){e=i.sanitizePayloadValue(e,r+1);return e===undefined?null:e});if("object"!==T(n))return String(n).slice(0,256);if(2<=r)try{return JSON.stringify(n).slice(0,256)}catch(F0){return undefined}var o={};return Object.keys(n).slice(0,20).forEach(function(e){var t=i.sanitizePayloadValue(n[e],r+1);t!==undefined&&(o[e]=t)}),Object.keys(o).length?o:undefined},y.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(_l(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},y.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},y.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},y.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},y.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},y.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(y.prototype,"__version__",{get:function(){return"1.0.12"},enumerable:!1,configurable:!0}),y.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:xc(),event_type:P.CUSTOM,event_category:Rc.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(n.pageUrl),data:{event_name:e,measurements:{duration:t},replay_id:this.getEventReplayId(n.replayId),tags:this.sanitizeEventTags(n.tags),payload:this.sanitizeEventPayload(n.payload),event_properties:this.sanitizeEventProperties(n.properties)}};this.reportTDEMEvent(e)},y.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},y.version="1.0.12",y.instances=[],y.environment=Cc,y.installedPlugins=[],y),c=(vp.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},vp.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},vp.prototype.countInstance=function(){return this.instances.length},vp.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},vp.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},vp.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==T(e))||!!e},vp.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},vp.prototype.exist=function(e){return-1===this.instances.indexOf(e)},vp.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},vp.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},vp);function vp(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function y(e,t){var i,o,a,s,n,u,r,l,c,d,f,h,p,m;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=y.version,this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,lagMonitor:!0,blankScreen:!0,memoryMonitor:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,env:"production",url:"",reportImmediately:!0,tdemConfig:!0,hostUrl:"https://dem.rumt-zh.com",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:""},this.isWhiteList=!1,this.lifeCycle=new Nl,this.bean={},this.internalRetrySchedule=Oc,this._customPageUrl=null,this.tdemEventPipeline=cp([(a=o=!1,s=[],n=function(e,t){var n,r;Array.isArray(e)&&0===e.length?t(e):(n=up(i))?Array.isArray(e)?(r=e.filter(function(e){return op(sp(e,i),n)})).length&&t(r):op(sp(e,i),n)&&t(e):o?a&&t(e):s.length<1e3&&s.push({event:e,resolve:t})},(i=this)._tdemSampleGate={decide:function(e){o=!0,a=e;e=s;s=[],up(i)?e.forEach(function(e){var t=e.event;return n(t,e.resolve)}):a&&e.forEach(function(e){var t=e.event;return(0,e.resolve)(t)})},reDecide:function(e){return!!up(i)||(e<=0?a=!1:100<=e?a=!0:a=100*Math.random()<e)},get isDecided(){return o||!!up(i)},get isSampled(){return a}},function(e,t){n(e,t)}),(r=this,l=20,f=Math.max(Number(l)||1,1),h=[],m=!(p=function(){return undefined}),function(e,t){var e=Array.isArray(e)?e:[e],n=(h.push.apply(h,e),function(){for(clearTimeout(c),clearTimeout(d),c=undefined,d=undefined;0<h.length;)t(h.splice(0,f))});p=n,!m&&e.some(function(e){return e.event_type===P.PAGE_VIEW})?(m=!0,n()):r.sendNow&&0<h.length?n():0!==e.length?f<=h.length?n():0!==h.length&&(clearTimeout(c),c=setTimeout(function(){0<h.length&&p()},5e3),d=d||setTimeout(function(){0<h.length&&p()},3e4)):0<h.length&&n()}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(u.lifeCycle.emit("beforeReport",r),u.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(D){t(e)}},td(u=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||Oc,y.instances.push(this)}var zt=new c({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Gc(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(_){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),yp=RangeError,wp=String,bp=Math.floor,kp=v(qr),_p=v("".slice),Sp=v(1.1.toFixed),Ep=function(e,t,n){return 0===t?n:t%2==1?Ep(e,t-1,n*e):Ep(e*e,t/2,n)},Cp=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=bp(i/1e7)},Rp=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=bp(r/t),r=r%t*1e7},Op=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=wp(e[n]),r=""===r?t:r+kp("0",7-t.length)+t);return r},s=g(function(){return"0.000"!==Sp(8e-5,3)||"1"!==Sp(.9,0)||"1.25"!==Sp(1.255,2)||"1000000000000000128"!==Sp(0xde0b6b3a7640080,0)})||!g(function(){Sp({})}),xp=(R({target:"Number",proto:!0,forced:s},{toFixed:function(e){var t,n,r,i=Co(this),e=ce(e),o=[0,0,0,0,0,0],a="",s="0";if(e<0||20<e)throw new yp("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return wp(i);if(i<0&&(a="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*Ep(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*Ep(2,-t,1):i/Ep(2,t,1),r*=4503599627370496,0<(t=52-t)){for(Cp(o,0,r),n=e;7<=n;)Cp(o,1e7,0),n-=7;for(Cp(o,Ep(10,n,1),0),n=t-1;23<=n;)Rp(o,1<<23),n-=23;Rp(o,1<<n),Cp(o,1,1),Rp(o,2),s=Op(o)}else Cp(o,0,r),Cp(o,1<<-t,0),s=Op(o)+kp("0",e);return 0<e?a+((r=s.length)<=e?"0."+kp("0",e-r)+s:_p(s,0,r-e)+"."+_p(s,r-e)):a+s}}),function(t){return"string"!=typeof t||!t||Rl.some(function(e){return-1<t.indexOf(e)})||Cl.some(function(e){return-1<t.indexOf(e)})}),Tp=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function Ip(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var Mp=new c({name:"assets"}),Nt=Mp=new c({name:"assets",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},onNewTdem:function(e){var t=this;Tp()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:xc(),event_type:P.RESOURCE_LOAD,event_category:Rc.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:Ip(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var a=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(a.initiatorType)||Ec(a.name,n.hostUrl)||this.publish(this.generateLog(a,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===Mp.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===Mp.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,a=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=a.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),Ec(t,a.hostUrl))||(n=o.getFromParam(i),r={url:uc(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:lc(t),urlQuery:sc(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===Mp.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:uc(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:lc(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:sc(e.name,!0),domainLookup:ac(e.domainLookupEnd-e.domainLookupStart),connectTime:ac(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Tp()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}});e("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},i);var Ap,Pp,r=/ipad|iphone|ipod/i.test(Hn)&&/applewebkit/i.test(Hn),Nr=x.setImmediate,qr=x.clearImmediate,Lp=x.process,Dp=x.Dispatch,Np=x.Function,s=x.MessageChannel,Fp=x.String,Up=0,jp={},Bp=(g(function(){Ap=x.location}),function(e){var t;M(jp,e)&&(t=jp[e],delete jp[e],t())}),zp=function(e){return function(){Bp(e)}},i=function(e){Bp(e.data)},Wp=function(e){x.postMessage(Fp(e),Ap.protocol+"//"+Ap.host)},s=(Nr&&qr||(Nr=function(e){Mc(arguments.length,1);var t=S(e)?e:Np(e),n=Jn(arguments,1);return jp[++Up]=function(){Te(t,undefined,n)},Pp(Up),Up},qr=function(e){delete jp[e]},dl?Pp=function(e){Lp.nextTick(zp(e))}:Dp&&Dp.now?Pp=function(e){Dp.now(zp(e))}:s&&!r?(Hp=(s=new s).port2,s.port1.onmessage=i,Pp=Gr(Hp.postMessage,Hp)):x.addEventListener&&S(x.postMessage)&&!x.importScripts&&Ap&&"file:"!==Ap.protocol&&!g(Wp)?(Pp=Wp,x.addEventListener("message",i,!1)):Pp="onreadystatechange"in ye("script")?function(e){wt.appendChild(ye("script")).onreadystatechange=function(){wt.removeChild(this),Bp(e)}}:function(e){setTimeout(zp(e),0)}),{set:Nr,clear:qr}),Hp=function(){this.head=null,this.tail=null};Hp.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qp,Vp,Gp,Jp,$p,Zp,Kp=Hp,Wp=/ipad|iphone|ipod/i.test(Hn)&&"undefined"!=typeof Pebble,i=/web0s(?!.*chrome)/i.test(Hn),Yp=s.set,Nr=x.MutationObserver||x.WebKitMutationObserver,qr=x.document,Xp=x.process,Hp=x.Promise,Hr=Hr("queueMicrotask"),Qp=(Hr||(Jp=new Kp,$p=function(){var e,t;for(dl&&(e=Xp.domain)&&e.exit();t=Jp.get();)try{t()}catch(X){throw Jp.head&&Zp(),X}e&&e.enter()},Zp=r||dl||i||!Nr||!qr?!Wp&&Hp&&Hp.resolve?((r=Hp.resolve(undefined)).constructor=Hp,Gp=Gr(r.then,r),function(){Gp($p)}):dl?function(){Xp.nextTick($p)}:(Yp=Gr(Yp,x),function(){Yp($p)}):(qp=!0,Vp=qr.createTextNode(""),new Nr($p).observe(Vp,{characterData:!0}),function(){Vp.data=qp=!qp}),Hr=function(e){Jp.head||Zp(),Jp.add(e)}),Hr),em=function(e){try{return{error:!1,value:e()}}catch(X){return{error:!0,value:X}}},tm=x.Promise,nm=TypeError,rm=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new nm("Bad Promise constructor");n=e,r=t}),this.resolve=xe(n),this.reject=xe(r)},im={f:function(e){return new rm(e)}},om=function(e,t){return E(e),O(t)&&t.constructor===e?t:((0,(e=im.f(e)).resolve)(t),e.promise)},am=tm&&tm.prototype,i=!!tm&&g(function(){am["finally"].call({then:function(){}},function(){})});R({target:"Promise",proto:!0,real:!0,forced:i},{"finally":function(t){var n=hu(this,Se("Promise")),e=S(t);return this.then(e?function(e){return om(n,t()).then(function(){return e})}:t,e?function(e){return om(n,t()).then(function(){throw e})}:t)}}),S(tm)&&(Wp=Se("Promise").prototype["finally"],am["finally"]!==Wp)&&Vt(am,"finally",Wp,{unsafe:!0}),tm&&tm.prototype;var sm,um,lm,cm,dm=Ye("species"),fm=!1,hm=S(x.PromiseRejectionEvent),Hp={CONSTRUCTOR:js("Promise",function(){var e=Ke(tm),t=e!==String(tm);if(!t&&66===qn)return!0;if(!qn||qn<51||!/native code/.test(e)){var e=new tm(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[dm]=n,!(fm=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=cl&&"DENO"!=cl||hm)}),REJECTION_EVENT:hm,SUBCLASSING:fm},pm=s.set,r=Hp.CONSTRUCTOR,mm=Hp.REJECTION_EVENT,qr=Hp.SUBCLASSING,gm=Ut.getterFor("Promise"),vm=Ut.set,Nr=tm&&tm.prototype,ym=tm,wm=Nr,bm=x.TypeError,km=x.document,_m=x.process,Sm=im.f,Em=Sm,Cm=!!(km&&km.createEvent&&x.dispatchEvent),Rm=function(e){var t;return!(!O(e)||!S(t=e.then))&&t},Om=function(e,t){var n,r,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Am(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(new bm("Promise-chain cycle")):(r=Rm(n))?I(r,n,u,l):u(n)):l(o)}catch(X){c&&!i&&c.exit(),l(X)}},xm=function(n,r){n.notified||(n.notified=!0,Qp(function(){for(var e,t=n.reactions;e=t.get();)Om(e,n);n.notified=!1,r&&!n.rejection&&Im(n)}))},Tm=function(e,t,n){var r;Cm?((r=km.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),x.dispatchEvent(r)):r={promise:t,reason:n},!mm&&(t=x["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(X){}}("Unhandled promise rejection",n)},Im=function(r){I(pm,x,function(){var e,t=r.facade,n=r.value;if(Mm(r)&&(e=em(function(){dl?_m.emit("unhandledRejection",n,t):Tm("unhandledrejection",t,n)}),r.rejection=dl||Mm(r)?2:1,e.error))throw e.value})},Mm=function(e){return 1!==e.rejection&&!e.parent},Am=function(t){I(pm,x,function(){var e=t.facade;dl?_m.emit("rejectionHandled",e):Tm("rejectionhandled",e,t.value)})},Pm=function(t,n,r){return function(e){t(n,e,r)}},Lm=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,xm(e,!0))},Dm=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new bm("Promise can't be resolved itself");var r=Rm(n);r?Qp(function(){var e={done:!1};try{I(r,n,Pm(Dm,e,t),Pm(Lm,e,t))}catch(X){Lm(e,X,t)}}):(t.value=n,t.state=1,xm(t,!1))}catch(X){Lm({done:!1},X,t)}}};if(r&&(wm=(ym=function(e){lr(this,wm),xe(e),I(sm,this);var t=gm(this);try{e(Pm(Dm,t),Pm(Lm,t))}catch(X){Lm(t,X)}}).prototype,(sm=function(e){vm(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Kp,rejection:!1,state:0,value:null})}).prototype=Vt(wm,"then",function(e,t){var n=gm(this),r=Sm(hu(this,ym));return n.parent=!0,r.ok=!S(e)||e,r.fail=S(t)&&t,r.domain=dl?_m.domain:undefined,0===n.state?n.reactions.add(r):Qp(function(){Om(r,n)}),r.promise}),um=function(){var e=new sm,t=gm(e);this.promise=e,this.resolve=Pm(Dm,t),this.reject=Pm(Lm,t)},im.f=Sm=function(e){return e===ym||e===lm?new um:Em(e)},S(tm))&&Nr!==Object.prototype){cm=Nr.then,qr||Vt(Nr,"then",function(e,t){var n=this;return new ym(function(e,t){I(cm,n,e,t)}).then(e,t)},{unsafe:!0});try{delete Nr.constructor}catch(X){}Cr&&Cr(Nr,wm)}R({global:!0,constructor:!0,wrap:!0,forced:r},{Promise:ym}),lm=wi.Promise,vr(ym,"Promise",!1),Ta("Promise");var Hr=Hp.CONSTRUCTOR||!Iu(function(e){tm.all(e).then(undefined,function(){})}),i=(R({target:"Promise",stat:!0,forced:Hr},{all:function(e){var s=this,t=im.f(s),u=t.resolve,l=t.reject,n=em(function(){var r=xe(s.resolve),i=[],o=0,a=1;oi(e,function(e){var t=o++,n=!1;a++,I(r,s,e).then(function(e){n||(n=!0,i[t]=e,--a)||u(i)},l)}),--a||u(i)});return n.error&&l(n.value),t.promise}}),Hp.CONSTRUCTOR),Wp=tm&&tm.prototype,qr=(R({target:"Promise",proto:!0,forced:i,real:!0},{"catch":function(e){return this.then(undefined,e)}}),S(tm)&&(s=Se("Promise").prototype["catch"],Wp["catch"]!==s)&&Vt(Wp,"catch",s,{unsafe:!0}),R({target:"Promise",stat:!0,forced:Hr},{race:function(e){var n=this,r=im.f(n),i=r.reject,t=em(function(){var t=xe(n.resolve);oi(e,function(e){I(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),R({target:"Promise",stat:!0,forced:Hp.CONSTRUCTOR},{reject:function(e){var t=im.f(this);return(0,t.reject)(e),t.promise}}),Hp.CONSTRUCTOR),Nm=(Se("Promise"),R({target:"Promise",stat:!0,forced:qr},{resolve:function(e){return om(this,e)}}),window.navigator.userAgent.toLowerCase()),d={},Fm=function(e){return-1!==Nm.indexOf(e)};d.macos=function(){return Fm("mac")},d.ios=function(){return d.iphone()||d.ipod()||d.ipad()},d.iphone=function(){return!d.windows()&&Fm("iphone")},d.ipod=function(){return Fm("ipod")},d.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return Fm("ipad")||e},d.android=function(){return!d.windows()&&Fm("android")},d.androidPhone=function(){return d.android()&&Fm("mobile")},d.androidTablet=function(){return d.android()&&!Fm("mobile")},d.blackberry=function(){return Fm("blackberry")||Fm("bb10")},d.blackberryPhone=function(){return d.blackberry()&&!Fm("tablet")},d.blackberryTablet=function(){return d.blackberry()&&Fm("tablet")},d.windows=function(){return Fm("windows")},d.windowsPhone=function(){return d.windows()&&Fm("phone")},d.windowsTablet=function(){return d.windows()&&Fm("touch")&&!d.windowsPhone()},d.fxos=function(){return(Fm("(mobile")||Fm("(tablet"))&&Fm(" rv:")},d.fxosPhone=function(){return d.fxos()&&Fm("mobile")},d.fxosTablet=function(){return d.fxos()&&Fm("tablet")},d.meego=function(){return Fm("meego")},d.cordova=function(){return window.cordova&&"file:"===location.protocol},d.nodeWebkit=function(){return"object"===T(window.process)},d.mobile=function(){return d.androidPhone()||d.iphone()||d.ipod()||d.windowsPhone()||d.blackberryPhone()||d.fxosPhone()||d.meego()},d.tablet=function(){return d.ipad()||d.androidTablet()||d.blackberryTablet()||d.windowsTablet()||d.fxosTablet()},d.desktop=function(){return!d.tablet()&&!d.mobile()};var Um,jm,Bm,zm,Wm=function(){return{host:new URL(location.href).host,pathname:location.pathname}},Hm=!(d.isIE=function(){return"ActiveXObject"in window}),qm=[],Vm=/^\/[^/]/;function Gm(e,t){return zm(e,t)}var Jm=!1,$m=[],Zm=function(O,x){if(void 0===x&&(x=/\.flv(\?|$)/i),$m.find(function(e){return e.name===O.name}))throw new Error("name '"+O.name+"' is already in hackFetch option list");$m.push(O),!Jm&&window.fetch&&(Jm=!0,zm=window.fetch,window.fetch=function(e,t){void 0===t&&(t={});var i="string"==typeof(f=e)?f:f&&"object"===T(f)?"string"==typeof(d=f.url)&&d?d:"string"==typeof(d=f.href)&&d?d:"":"";if(i&&null!=(f=null==x?void 0:x.test)&&f.call(x,i))return Gm(e,t);Vm.test(i)&&(i=""+location.origin+i);var n,r,o,a,s,u,l,c,d=O||{},f=d.traceRequestHeader,h=d.shouldInjectTrace;if(f&&(!h||h()))try{var p=function(e,t){e="undefined"!=typeof Request&&"string"!=typeof e&&e instanceof Request?Km(e.headers):{};return A(A({},e),Km(t.headers))}(e,t),m=Wm(),g=m.host,v=m.pathname,y=f.generate(i,p,{host:g,pathname:v})||{},w=y.name,b=y.value;w&&b&&(n=e,r=t,o=w,a=b,u="undefined"!=typeof Headers?Headers:null,l="undefined"!=typeof Request&&"string"!=typeof n&&n instanceof Request,c=r.headers,u&&(l||c&&c instanceof u)?(s=new u(l?n.headers:undefined),c instanceof u?c.forEach(function(e,t){return s.set(t,e)}):Array.isArray(c)?c.forEach(function(e){e&&e[0]&&s.set(String(e[0]),String(e[1]))}):c&&"object"===T(c)&&Object.keys(c).forEach(function(e){s.set(e,String(c[e]))}),s.has(o)||s.set(o,a),r.headers=s):(l=Km(c))[o]||l[o.toLowerCase()]||(r.headers=Object.assign({},l,((n={})[o]=a,n))))}catch(J){}for(var k=new Map,_=window.location.href,S=0;S<$m.length;S++){var E=$m[S];try{"function"==typeof E.beforeFetch&&E.beforeFetch(i,t),"function"==typeof E.getCurrentFrom&&k.set(E.name,E.getCurrentFrom())}catch(J){}}var C=Date.now(),R=Object.assign({},t,{method:(h=e,(m=t)&&m.method?String(m.method).toUpperCase():"string"!=typeof h&&h&&h.method?String(h.method).toUpperCase():"GET")});return Gm(e,t).then(function(e){var t;try{t=e.clone()}catch(X){for(var n=0;n<$m.length;n++){var r=$m[n];try{"function"==typeof r.cloneError&&r.cloneError(e,Date.now()-C,i,R,C,k.get(r.name),_)}catch(J){}}return e}for(n=0;n<$m.length;n++){r=$m[n];try{"function"==typeof r.then&&r.then(t,Date.now()-C,i,R,C,k.get(r.name),_)}catch(J){}}return e})["catch"](function(e){for(var t=0;t<$m.length;t++){var n=$m[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-C,i,R,C,k.get(n.name),_)}catch(J){}}throw e})})};function Km(e){var n;return e?"undefined"!=typeof Headers&&e instanceof Headers?(n={},e.forEach(function(e,t){n[t]=e,n[t.toLowerCase()]=e}),n):Array.isArray(e)?e.reduce(function(e,t){return t&&t[0]&&(e[String(t[0])]=String(t[1])),e},{}):A({},e):{}}var Ym=function(r,e,i){return null!=e&&e.length&&"object"===T(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},Xm={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},Qm={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},eg=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},tg=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===xl.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=dc.test(i)||cc.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},ng=function(e,t){return e?Qm.AJAX_ERROR:t?Qm.RET_ERROR:Qm.API_RESPONSE},rg=function(e,t,n){if(!e)return!1;t=null==t?void 0:t.api;if(null!=t&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(X){return console.warn("[TDEM] isSlowApi function happen error:",X,", this data will not be reported."),!1}n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold;return n&&"number"==typeof n?n<e:1e3<e},ig=function(e,t){var e=e.api;if(null!=e&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:lc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:ac(e.domainLookupEnd-e.domainLookupStart),connectTime:ac(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:lc(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:nc.number,connectTime:nc.number}};function og(e){return!e||"boolean"==typeof e||"number"!=typeof(e=e.sseStallThresholdMs)||!Number.isFinite(e)||e<=0?6e4:e}function ag(e){return e&&"text/event-stream"===e.split(";")[0].trim().toLowerCase()}var sg=function(e){return"string"==typeof e&&""!==e.trim()};function ug(e){var t=String(e.requestUrl||""),n=String(e.finalUrl||""),r=t&&sc(t)||t,i=n&&sc(n)||n||r,n=!0===e.redirected||!!n&&!!t&&n!==t;return{url:i,originalUrl:r&&i&&r!==i?r:undefined,httpMethod:String(e.httpMethod||"GET").toUpperCase(),redirectCount:n?1:0}}function lg(n){var r,i,o,a,t,s=n.now||Date.now,u=s(),l={gap_lt_500_count:0,gap_500_999_count:0,gap_1000_2999_count:0,gap_3000_9999_count:0,gap_10000_59999_count:0,gap_ge_60000_count:0},c="",d=!1,f=0,h=!1,p=[],m=function(){t!==undefined&&(clearTimeout(t),t=undefined)},g=function(){m();var e=n.stallThresholdMs;0<e&&(t=setTimeout(function(){y("stalled")},e))},v=function(){var e,t,n=s();r===undefined?r=n:i!==undefined&&(e=n-i,(o===undefined||o<e)&&(o=e),t=l,(e=e)<500?t.gap_lt_500_count+=1:e<1e3?t.gap_500_999_count+=1:e<3e3?t.gap_1000_2999_count+=1:e<1e4?t.gap_3000_9999_count+=1:e<6e4?t.gap_10000_59999_count+=1:t.gap_ge_60000_count+=1),i=n,f+=1,g()},y=function(e){if(!h){h=!0,m(),p.splice(0).forEach(function(e){try{e()}catch(X){}});var t=Math.max(0,s()-u),t=A({duration:t,redirect_count:Math.max(0,n.redirectCount||0),message_count:f,stall_threshold_ms:n.stallThresholdMs},l),e=(r!==undefined&&(t.time_to_first_message=Math.max(0,r-u)),i!==undefined&&(t.last_message_offset=Math.max(0,i-u)),o!==undefined&&(t.max_message_gap=o),{http_method:n.httpMethod||"GET",outcome:e}),t=(a!==undefined&&0<a&&(e.http_status=String(a)),n.originalUrl&&n.originalUrl!==n.url&&(e.original_url=n.originalUrl),{event_id:xc(),event_type:P.SSE_CALL,event_category:Rc.NETWORK,timestamp:s(),page_url:n.pageUrl||"",data:{url:n.url,resource_type:"sse",measurements:t,replay_id:n.replayId||undefined,event_properties:e}});try{n.report(t)}catch(X){}}};return g(),{ingestText:function(e){if(!h){e=e.replace(/\r\n/g,"\n");if(d){var t=e.indexOf("\n\n");if(-1===t)return;d=!1,e=e.slice(t+2)}for(var n=(c=(c+=e).replace(/\r\n/g,"\n")).indexOf("\n\n");-1!==n;){var r=c.slice(0,n);c=c.slice(n+2),r.replace(/\r\n/g,"\n").split("\n").some(function(e){return e.startsWith("data:")||"data"===e})&&v(),n=c.indexOf("\n\n")}1048576<c.length&&(d=!(c=""))}},ingestCompleteMessage:function(){h||v()},noteHttpStatus:function(e){0<e&&(a=e)},succeed:function(){return y("success")},failTransport:function(){return y("transport_error")},httpError:function(){return y("http_error")},cancel:function(){return y("cancelled")},pauseStall:function(){h||m()},resumeStall:function(){h||g()},onSeal:function(t){if(h){try{t()}catch(X){}return function(){return undefined}}return p.push(t),function(){var e=p.indexOf(t);-1!==e&&p.splice(e,1)}},seal:y,get sealed(){return h},get messageCount(){return f},get httpStatus(){return a}}}function cg(h,p){var m;return bl(this,void 0,void 0,function(){var o,a,s,u,l,c,d,f;return kl(this,function(e){switch(e.label){case 0:if(!h||"function"!=typeof h.getReader)return p.succeed(),[2];o=h.getReader(),s=a=!1,u=function(){if(!a&&!s&&"function"==typeof o.cancel){s=!0;try{var e=o.cancel();e&&"function"==typeof e["catch"]&&e["catch"](function(){return undefined})}catch(X){}}},l=p.onSeal(u),c="undefined"!=typeof TextDecoder?new TextDecoder:{decode:function(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("utf8"):Array.from(e).map(function(e){return String.fromCharCode(e)}).join("")}},e.label=1;case 1:e.trys.push([1,5,6,7]),e.label=2;case 2:return p.sealed?[3,4]:[4,o.read()];case 3:return d=e.sent(),f=d.done,d=d.value,f?(a=!0,p.succeed(),[2]):(d&&p.ingestText(c.decode(d,{stream:!0})),[3,2]);case 4:return[3,7];case 5:return f=e.sent(),p.sealed||p[t=f,n=p.messageCount,r=p.httpStatus,!(i=t)||"object"!==T(i)||"AbortError"!==i.name&&"ABORT_ERR"!==i.code&&"ECONNABORTED"!==i.code&&!0!==i.aborted?(0<n||"number"==typeof r&&200<=r&&r<400)&&(function(e){if(sg(e)&&-1!==e.toLowerCase().indexOf("terminated"))return 1;for(var t=e,n=new Set;t&&"object"===T(t)&&!n.has(t);){n.add(t);var r=String(t.name||""),i=String(t.code||""),o=String(t.message||"").toLowerCase();if("TypeError"===r&&-1!==o.indexOf("terminated"))return 1;if("ERR_INVALID_STATE"===i)return 1;t=t.cause}}(t)||sg(t))?"succeed":"failTransport":"cancel"](),[3,7];case 6:l(),u();try{null!=(m=o.releaseLock)&&m.call(o)}catch(X){}return[7];case 7:return[2]}var t,n,r,i})})}var dg,fg,hg=!1;function pg(e){var t=e.__tdemXhrHooks;t&&(e.removeEventListener("readystatechange",t.onReadyStateChange),e.removeEventListener("progress",t.onProgress),e.removeEventListener("loadend",t.onLoadEnd),e.removeEventListener("abort",t.onAbort),e.removeEventListener("error",t.onError),e.removeEventListener("timeout",t.onTimeout),e.__tdemXhrHooks=undefined)}function mg(e){var t=String(e.responseType||"").toLowerCase();if(t&&"text"!==t)return undefined;try{return"string"==typeof e.responseText?e.responseText:""}catch(X){return undefined}}new c({name:"api"});var gg,vg,yg,Nr=new c({name:"api",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new Yc(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e),!1!==n&&this.overrideEventSource(e.config,e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},currentViewId:function(e){var t=null!=(e=null!=(t=e.viewId)?t:null==(t=e.bean)?void 0:t.viewId)?e:"";return String(t||"")},rememberViewId:function(e,t){e&&(e.__tdemViewId=this.currentViewId(t))},reportWithStartedView:function(e,t,n){var n=String((null==n?void 0:n.__tdemViewId)||(null==t?void 0:t.view_id)||""),t=!n||null!=t&&t.view_id?t:A(A({},t),{view_id:n});null!=(n=e.reportTDEMEvent)&&n.call(e,t)},overrideFetch:function(k,_){var S=this,s=k.api,e={name:this.name,traceRequestHeader:null!=s&&s.injectTraceHeader?this.traceRequestHeader:null,shouldInjectTrace:function(){return ap(_)},getCurrentFrom:function(){return S.getFromParam(_)},beforeFetch:function(e,t){S.rememberViewId(t,_)},cloneError:function(e,t,n,r,i,o){var a;Ec(n,k.hostUrl)||(a=e.headers?e.headers.get("content-type"):"",!1!==s&&ag(a)&&((n=lg({url:(a=ug({requestUrl:n,finalUrl:e&&e.url,httpMethod:null==r?void 0:r.method,redirected:!!e.redirected})).url,originalUrl:a.originalUrl,httpMethod:a.httpMethod,redirectCount:a.redirectCount,stallThresholdMs:og(s),report:function(e){return S.reportWithStartedView(_,e,r)},pageUrl:o||S.getFromParam(_),replayId:Ip(_)})).noteHttpStatus(e.status),400<=e.status?n.httpError():n.succeed()))},then:function(h,p,m,g,v,y,w){if(!Ec(m,k.hostUrl)){var e,t,n=h.headers?h.headers.get("content-type"):"";if(!1!==s&&ag(n))return e=ug({requestUrl:m,finalUrl:h&&h.url,httpMethod:null==g?void 0:g.method,redirected:!!h.redirected}),(t=lg({url:e.url,originalUrl:e.originalUrl,httpMethod:e.httpMethod,redirectCount:e.redirectCount,stallThresholdMs:og(s),report:function(e){return S.reportWithStartedView(_,e,g)},pageUrl:y||S.getFromParam(_),replayId:Ip(_)})).noteHttpStatus(h.status),h.__tdemSseObserver=t,400<=h.status?(t.httpError(),void cg(h.body,t)["catch"](function(){return undefined})):void cg(h.body,t)["catch"](function(){t.sealed||t.failTransport()});var b=tg(k,n||"",m);"fetch"===b?h.clone().text().then(function(i){var e,o=h.status<=0||400<=h.status,t=(null==(t=k.api)?void 0:t.reqHeaders)||[],a=Ym(null==g?void 0:g.headers,t,"req"),t=(null==(t=k.api)?void 0:t.resHeaders)||[],s=Ym(h.headers,t,"res"),u=Qc(null==g?void 0:g.headers),t=hc(i,k.api,{url:m,ctx:h,payload:null==g?void 0:g.body}),l=t.code,c=t.isErr,t=null==(t=k.api)?void 0:t.apiDetail,d=t?pc(null==g?void 0:g.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:m}):"",f=t?pc(i,null==(e=k.api)?void 0:e.resBodyHandler,{url:m,ctx:h}):"";setTimeout(function(){var e=ig(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"}),t=[o?"FETCH_ERROR: "+i:"","fetch req url: "+m,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+v,a,s,"req method: "+(e.method||"GET"),"res retcode: "+l,eg(d,"req param"),eg(f,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==g?void 0:g.body,e.ret=l,e.isErr=+c,e.from=y||S.getFromParam(_),{msg:t,code:l,trace:u,errorMsg:"",from:y||S.getFromParam(_),originFrom:w,viewId:null==(t=g)?void 0:t.__tdemViewId,level:Qm.API_RESPONSE}),n=rg(null==e?void 0:e.duration,k,e),r=ng(o,c);t.level=r===Qm.API_RESPONSE&&n?Qm.SLOW_NET_REQUEST:r,t.isErr=c,(n||t.level!==Qm.API_RESPONSE||_.isWhiteList||null!=(n=null==(r=_.config)?void 0:r.api)&&n.reportRequest||null!=(n=null==(r=_.config)?void 0:r.api)&&n.injectTraceHeader)&&S.publishNormalLog(t,_),S.publishSpeed(e,_)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=ig(k,{url:m,duration:p,type:b,status:h.status||0,method:(null==g?void 0:g.method)||"get"});e.type="static",e.urlQuery=sc(m,!0),e.from=y||S.getFromParam(_),S.publishSpeed(e,_)},0)}},"catch":function(t,n,r,i,o,a,s){var u,e,l,c,d;if(Ec(r,k.hostUrl))throw t;if("AbortError"!==(t&&t.name))throw u=tg(k,"",r),e=(null==(e=k.api)?void 0:e.reqHeaders)||[],l=Ym(null==i?void 0:i.headers,e,"req"),c=Qc(null==i?void 0:i.headers),d=null!=(e=k.api)&&e.apiDetail?pc(null==i?void 0:i.body,null==(e=k.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=ig(k,{url:r,duration:n,type:u,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=a||S.getFromParam(_),S.publishSpeed(e,_),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+d+"\n \nres startTime: "+o+"\n \n"+l);S.publishNormalLog({msg:e,level:Qm.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:a||S.getFromParam(_),originFrom:s,viewId:null==(e=i)?void 0:e.__tdemViewId},_)},0),t}};this.hackFetchOptions=e,Zm(this.hackFetchOptions,null==(e=k.api)?void 0:e.ignoreHackReg)},overrideXhr:function(R,O){var e,i,x=this,o={name:this.name,ignoreHackReg:null==(e=R.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=R.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return x.getFromParam(O)},open:function(e){var t;(t=(e=e).__tdemSseObserver)&&!t.sealed&&t.cancel(),pg(e),e.__tdemSseClaimed=!1,e.__tdemSseObserver=undefined,e.failType=undefined},send:function(k,_,S,E){x.rememberViewId(k,O);var C=Date.now(),n=(((null==R?void 0:R.api)||{}).injectTraceHeader&&ap(O)&&(t=(e=Wm()).host,e=(t=x.traceRequestHeader.generate(k.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&k.setRequestHeader(e,t),0),e=function(){k.failType="abort"},t=function(){k.failType="error"},r=function(){k.failType="timeout"},i=function(){var e;!1===R.api||k.__tdemSseClaimed||(e=k.tdemUrl||"",Ec(e,R.hostUrl))||ag(("function"==typeof k.getResponseHeader?k.getResponseHeader("content-type"):"")||"")&&(k.__tdemSseClaimed=!0,(e=lg({url:(e=ug({requestUrl:k.tdemUrl||"",finalUrl:("string"==typeof k.responseURL?k.responseURL:"")||undefined,httpMethod:k.tdemMethod})).url,originalUrl:e.originalUrl,httpMethod:e.httpMethod,redirectCount:e.redirectCount,stallThresholdMs:og(R.api),report:function(e){return x.reportWithStartedView(O,e,k)},pageUrl:S||x.getFromParam(O),replayId:Ip(O)})).noteHttpStatus(k.status),k.__tdemSseObserver=e)},o=function(){i()},a=function(){i();var e,t=k.__tdemSseObserver;t&&(e=mg(k))!==undefined&&e.length>n&&(t.ingestText(e.slice(n)),n=e.length)},s=function(){var e,v,y,t,w,b=k.tdemUrl||"";k.__tdemSseClaimed?((e=k.__tdemSseObserver)&&!e.sealed&&((t=mg(k))!==undefined&&t.length>n&&e.ingestText(t.slice(n)),e.noteHttpStatus(k.status),"abort"===k.failType?e.cancel():400<=k.status?e.httpError():k.failType?e.failTransport():e.succeed()),pg(k)):(pg(k),Ec(b,R.hostUrl)||"abort"===k.failType||(v="",(k.failType||!k.status||400<=k.status)&&(v=k.failType||"failed"),y=Date.now()-C,t=k.getResponseHeader("content-type")||"",w=tg(R,t,b),setTimeout(function(){var e,a=ig(R,{url:b,duration:y,type:w,status:k.status,method:k.tdemMethod||"get"});if(a.from=S||x.getFromParam(O),"fetch"===w){var t=(null==(e=R.api)?void 0:e.reqHeaders)||[],s=Ym(k.tdemXhrReqHeader,t,"req"),t=(null==(t=R.api)?void 0:t.resHeaders)||[],n=k.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),u=Ym(n,t,"res"),l=Qc(k.tdemXhrReqHeader),t=null==(n=R.api)?void 0:n.apiDetail,c=t?pc(_,null==(n=R.api)?void 0:n.reqParamHandler,{url:b}):"",d=t?pc(k.response,null==(n=R.api)?void 0:n.resBodyHandler,{url:b}):"";try{var r,i,o,f=k.response,h=R.api,p={url:b,ctx:k,payload:_},m=function(e){var t,n=e.code,e=e.isErr,r=[v?"AJAX_ERROR: request "+v:"","fetch req url: "+b,"res status: "+(a.status||0),"res duration: "+a.duration+"ms","res startTime: "+C,s,u,"req method: "+(a.method||"GET"),"res retcode: "+n,eg(c,"req param"),eg(d,"res data")].filter(function(e){return e}).join("\n\n"),i=(a.ret=n,a.isErr=+e,a.payload=_,ng(!!v,e)),o=rg(null==a?void 0:a.duration,R,a);(i!==Qm.API_RESPONSE||o||O.isWhiteList||null!=(t=null==(t=O.config)?void 0:t.api)&&t.reportRequest||null!=(t=null==(t=O.config)?void 0:t.api)&&t.injectTraceHeader)&&x.publishNormalLog({msg:r,level:i===Qm.API_RESPONSE&&o?Qm.SLOW_NET_REQUEST:i,code:n,isErr:e,trace:l,errorMsg:"",from:S||x.getFromParam(O),originFrom:E,viewId:k.__tdemViewId},O),x.publishSpeed(a,O)};try{if("function"==typeof(null==h?void 0:h.retCodeHandlerAsync))return void h.retCodeHandlerAsync(f,null==p?void 0:p.url,null==p?void 0:p.ctx,function(e){var t=e.code;null!=m&&m({code:void 0===t?Tl:t,isErr:e.isErr})});if("function"==typeof(null==h?void 0:h.retCodeHandler))return void(o=(i=h.retCodeHandler(f,null==p?void 0:p.url,null==p?void 0:p.ctx,null==p?void 0:p.payload)||{}).code,null!=m&&m({code:void 0===o?Tl:o,isErr:i.isErr}));if(!(f="string"==typeof f?JSON.parse(f):f))return void(null!=m&&m({code:Tl,isErr:!1}));"function"==typeof(null==(r=null==h?void 0:h.ret)?void 0:r.join)&&(fc=[].concat(h.ret.map(function(e){return e.toLowerCase()})));var g=Object.getOwnPropertyNames(f).filter(function(e){return-1!==fc.indexOf(e.toLowerCase())});if(g.length)return void("未知"!==(o=f[g[0]])&&""!==o||(o=Tl),null!=m&&m({code:""+o,isErr:0!==o&&"0"!==o&&o!==Tl}));null!=m&&m({code:Tl,isErr:!1})}catch(e){null!=m&&m({code:Tl,isErr:!1})}}catch(K){a.ret=Tl,x.publishSpeed(a,O)}}else a.type="static",a.urlQuery=sc(b,!0),x.publishSpeed(a,O)},0)))};k.__tdemXhrHooks={onReadyStateChange:o,onProgress:a,onLoadEnd:s,onAbort:e,onError:t,onTimeout:r},k.addEventListener("readystatechange",o),k.addEventListener("progress",a),k.addEventListener("loadend",s),k.addEventListener("abort",e),k.addEventListener("error",t),k.addEventListener("timeout",r)}};this.hackXHROptions=o,i=this.hackXHROptions,qm.find(function(e){return e.name===i.name})||(qm.push(i),!Hm&&window.XMLHttpRequest&&(Um=window.XMLHttpRequest.prototype.send,jm=window.XMLHttpRequest.prototype.open,Bm=window.XMLHttpRequest.prototype.setRequestHeader,Hm=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Vm.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)d.isIE()||(this.timeout=5e3);else for(var n=0;n<qm.length;n++){var r=qm[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return jm.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?Bm.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],Bm.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<qm.length;n++){var r=qm[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(x){}}return Um.apply(this,arguments)}))},overrideEventSource:function(o,a){var n,s=this;function e(e,t){t=new n(e,t);try{null!=fg&&fg(t,String(e))}catch(X){}return t}fg={onCreate:function(t,e){var n={__tdemViewId:s.currentViewId(a)};if(!Ec(e,o.hostUrl)){var r=lg({url:sc(e)||e,httpMethod:"GET",stallThresholdMs:og(o.api),report:function(e){return s.reportWithStartedView(a,e,n)},pageUrl:s.getFromParam(a),replayId:Ip(a)});r.pauseStall(),t.addEventListener("open",function(){return r.resumeStall()}),t.addEventListener("message",function(){return r.ingestCompleteMessage()}),t.addEventListener("error",function(){if(!r.sealed){var e=t.readyState;0!==e?2===e&&r.failTransport():r.pauseStall()}});var i=t.close.bind(t);t.close=function(){try{r.sealed||r.cancel()}finally{i()}}}}}.onCreate,"undefined"!=typeof window&&window.EventSource&&!hg&&(hg=!0,n=dg=window.EventSource,e.prototype=n.prototype,e.CONNECTING=n.CONNECTING,e.OPEN=n.OPEN,e.CLOSED=n.CLOSED,window.EventSource=e)},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,a,s,u,l;[Qm.API_RESPONSE,Qm.AJAX_ERROR,Qm.RET_ERROR,Qm.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",s=(s=null==(s=e.msg)?void 0:s.match(/res status:\s*(\d+)/))?parseInt(s[1],10):0,i=(i=null==(i=e.msg)?void 0:i.match(/res duration:\s*([\d.]+)ms/))?parseFloat(i[1]):0,o=(o=null==(o=e.msg)?void 0:o.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?o[1].trim().slice(0,1e3):undefined,a={},e.trace&&(a.trace_id=e.trace),(l=(u={httpStatus:s,isTransportFailure:s<=0,isBusinessError:e.level===Qm.RET_ERROR||!!e.isErr,businessCode:e.code}).aborted?{report:!1,eventType:null}:(l=Number(u.httpStatus),u.isTransportFailure||!Number.isFinite(l)||l<=0?{report:!0,eventType:"api_error",outcome:"transport_error"}:400<=l?{report:!0,eventType:"api_error",outcome:"http_error"}:u.isBusinessError?{report:!0,eventType:"api_error",outcome:"business_error",businessCode:ic(u.businessCode)||Tl}:{report:!0,eventType:"api_call",businessCode:ic(u.businessCode)})).report)&&l.eventType&&(u={http_method:r,http_status:String(s)},l.outcome&&(u.outcome=l.outcome),l.businessCode&&(u.business_code=l.businessCode),"api_error"===l.eventType?(s=A(A({event_id:xc(),event_type:P.API_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:e.from||(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href},e.viewId?{view_id:String(e.viewId)}:{}),{data:{url:n,measurements:{duration:i},response_body:o,replay_id:Ip(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}}),null!=(r=t.reportTDEMEvent)&&r.call(t,s)):(s=A(A({event_id:xc(),event_type:P.API_CALL,event_category:Rc.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(o=t.getOriginFrom)?void 0:o.call(t))||window.location.href},e.viewId?{view_id:String(e.viewId)}:{}),{data:{url:n,measurements:{duration:i},replay_id:Ip(t),tags:0<Object.keys(a).length?a:undefined,event_properties:u}}),null!=(r=t.reportTDEMEvent)&&r.call(t,s)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=qm.findIndex(function(e){return e.name===n.name})))&&qm.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=$m.findIndex(function(e){return e.name===t.name})))&&$m.splice(e,1),dg&&(window.EventSource=dg),hg=!1,dg=undefined,fg=undefined,this.option.override=!1}}),wg={},r=new c({name:"bridge",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,d=l.config,e="object"===T(d.bridge)?d.bridge:undefined,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var u=t[e];wg[e]=u,t[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],a=Date.now(),s=c.getFromParam(l);u(r,i,n,function(e){var t=hc(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t,from:s};c.publishSpeed(n,l),o(e)})}})},unHackBridge:function(e){var e="object"===T(e.config.bridge)?e.config.bridge:undefined,t=null==e?void 0:e.target;wg=(t&&Object.keys(wg).forEach(function(e){wg[e]&&(t[e]=wg[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),Hr=((i=gg=gg||{})[i.unknown=100]="unknown",i[i.wifi=1]="wifi",i[i.net2g=2]="net2g",i[i.net3g=3]="net3g",i[i.net4g=4]="net4g",i[i.net5g=5]="net5g",i[i.net6g=6]="net6g",(Wp=vg=vg||{})[Wp.android=1]="android",Wp[Wp.ios=2]="ios",Wp[Wp.windows=3]="windows",Wp[Wp.macos=4]="macos",Wp[Wp.linux=5]="linux",Wp[Wp.other=100]="other",(s=yg=yg||{})[s.unknown=100]="unknown",s[s.normal=0]="normal",s[s.weak=1]="weak",s[s.disconnected=2]="disconnected",new c({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",gg.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?vg[e]:vg.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:bg)(function(e){gg[e]||(e=gg.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){yg[e]===undefined&&(e=yg.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),bg=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||Tl,0<=(n=String(n).toLowerCase()).indexOf("4g")?gg.net4g:0<=n.indexOf("wifi")?gg.wifi:0<=n.indexOf("5g")?gg.net5g:0<=n.indexOf("6g")?gg.net6g:0<=n.indexOf("3g")?gg.net3g:0<=n.indexOf("2g")?gg.net2g:gg.unknown))},kg=window.WebSocket,_g=[],Sg={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=_g&&_g.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:_g.forEach(function(e){e=e.sendErr;null!=e&&e(A({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:_g.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:_g.forEach(function(e){(0,e.sendErr)(A({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Eg=new c({name:"onError"}),Hp=Eg=new c({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},startListen:function(s){var e,t,n,u=this,l=window.onerror,r=(window.onerror=function(e,t,n,r,i){var o,a=gc(e);xp(a)||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?Tc(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],a={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:a,exception_frames:o,replay_id:Ip(s),tags:{environment:s.config.env||"production",version:String(s.config.version||"")}}},null!=(o=s.reportTDEMEvent)&&o.call(s,a)),null!=l&&l.call(window,e,t,n,r,i)},function(e){var t,n=e&&gc(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?Tc(e.reason):[],e={event_id:xc(),event_type:P.PROMISE_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:t,exception_frames:n,replay_id:Ip(s),tags:{environment:s.config.env||"production"}}},null!=(t=s.reportTDEMEvent))&&t.call(s,e)}),i=(window.addEventListener("unhandledrejection",r),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if((!r||null!=e&&e.error)&&!(Ec(i=t,s.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:xc(),event_type:P.RESOURCE_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{url:t,resource_type:i,replay_id:Ip(s),tags:A({environment:s.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=s.reportTDEMEvent)&&i.call(s,t)}}}),o=(window.document.addEventListener("error",i,!0),s.lifeCycle.on("destroy",function(){0===Eg.countInstance()&&(window.removeEventListener("unhandledrejection",r),window.document.removeEventListener("error",i,!0))}),s.config.websocket);(("object"===T(o)?!1!==o.enabled:o)||s.config.websocketHack)&&(o={key:s.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(e=window.WebSocket,window&&!e.isHack&&(t=new Proxy(WebSocket,Sg),e.isHack=!0,window.WebSocket=t),n=o,_g.find(function(e){return e.key===n.key})||n&&_g.push(n))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:Ip(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=kg,-1!==(e=_g.findIndex(function(e){return e.key===t.key})))&&_g.splice(e,1)}}),Cg=a.entries,Rg=(R({target:"Object",stat:!0},{entries:function(e){return Cg(e)}}),new c({name:"click"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return Rg(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),Og=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},xg=function(e,t){return"string"==typeof e?e.split(t):[]},Tg=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=Tg(n);return t},qr=new c({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(a){for(var e=function(o){var e,t,n,r,i;s.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){e="object"===T((e=e).click)?e.click:undefined,n=Og((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:Og((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),a=t,s=(xg(t.getAttribute("id")||""," "),xg(t.getAttribute("class")||"",""),0),u=!1;a&&o&&a.getAttribute;){if(u)return!0;if(10<=s)break;for(var l=xg(a.getAttribute("id")||""," "),c=xg(a.getAttribute("class")||"",""),d=0,f=l;d<f.length;d++){var h=f[d];if(i.has(h)){u=!0;break}}for(var p=0,m=c;p<m.length;p++){var g=m[p];if(r.has(g)){u=!0;break}}s+=1,a=a.parentNode||a.parentElement}return!1}(a.config,t)&&(i=Rg(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=Tg(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:xc(),event_type:P.CLICK,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:Ip(a),tags:{environment:a.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=a.reportTDEMEvent))&&n.call(a,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},s=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),Ig=(new c({name:"console"}),["log","error","warn","info","debug","trace"]),Mg={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace};var Ag,Pg,Lg,Dg,Ng,Fg,Ug,jg,Bg,zg,Wg,i=new c({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var f,h;h="object"===T((f=e).config.console)?f.config.console:undefined,Ig.forEach(function(c){var d=Mg[c];console[c]=function(){for(var e,t,n,r,i,o,a,s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];try{d.apply(console,u),o=c,a=f.isWhiteList,("all"===(s=(null==(s=h)?void 0:s.level)||"error")||a||("error"===s?"error"===o:"warn"===s?"error"===o||"warn"===o:"info"===s?["error","warn","info"].includes(o):"log"===s?["error","warn","info","log"].includes(o):"error"===o))&&(r=u.map(function(e){if("object"===T(e)&&null!==e)try{return JSON.stringify(e)}catch(h){}return String(e)}).join(" "),i={event_id:xc(),event_type:P.LOG,event_category:Rc.LOG,timestamp:Date.now(),page_url:(null==(e=f.getOriginFrom)?void 0:e.call(f))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:Ip(f),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=f.reportTDEMEvent)&&n.call(f,i))}catch(U){Mg.error("Console hook error:",U)}}})},destroy:function(){Object.keys(Mg).forEach(function(e){console[e]=Mg[e]})}});Ng={passive:!0,capture:!0},Fg=new Date,Wp=function(){Dg=[],Pg=-1,Ag=null,zg(addEventListener)},Ug=function(e,t){Ag||(Ag=t,Pg=e,Lg=new Date,zg(removeEventListener),jg())},jg=function(){var t;0<=Pg&&Pg<Lg-Fg&&(t={entryType:"first-input",name:Ag.type,target:Ag.target,cancelable:Ag.cancelable,startTime:Ag.timeStamp,processingStart:Ag.timeStamp+Pg},Dg.forEach(function(e){e(t)}),Dg=[])},Bg=function(e){var t,n,r,i,o,a;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){Ug(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Ng),removeEventListener("pointercancel",o,Ng)},addEventListener("pointerup",i,Ng),addEventListener("pointercancel",o,Ng)):Ug(t,e))},zg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Bg,Ng)})},Wg="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function j(e){"hidden"===document.visibilityState&&(Wg=e.timeStamp,removeEventListener("visibilitychange",j,!0))},!0),Wp(),self.webVitals={firstInputPolyfill:function(e){Dg.push(e),jg()},resetFirstInputPolyfill:Wp,get firstHiddenTime(){return Wg}},new c({name:"webVitals"});var Hg,qg={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},Vg=(new c({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),Gg=new Map,s=new c({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e,n,r,i;Tp()&&(Gg.set(t,{isPagePerformanceReported:!1}),Hg?this.publish(Hg,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),(i=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)})("visibilitychange",e,null==(n={once:!0})?void 0:n.once,null==(r=null==n?void 0:n.delay)?void 0:r.visibilitychange),i("pagehide",e,null==n?void 0:n.once,null==(r=null==n?void 0:n.delay)?void 0:r.pagehide),i("beforeunload",e,null==n?void 0:n.once,null==(r=null==n?void 0:n.delay)?void 0:r.beforeunload),t.lifeCycle.on("destroy",function(){var e=Gg.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=Gg.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(D){}(Hg=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(Hg,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:Vg(i.domainLookupEnd-i.domainLookupStart),tcp:Vg(i.connectEnd-i.connectStart),ssl:Vg(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:Vg(i.responseStart-i.requestStart),contentDownload:Vg(i.responseEnd-i.responseStart),domParse:Vg(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:Vg(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:Vg(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=A(A({},n),{engineInit:Vg(t,0,1e4),bundleLoad:Vg(e,0,1e4)})),n):undefined},publish:function(r,i){this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:xc(),event_type:P.PAGE_LOAD,event_category:Rc.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:qg.lcp,fcp:qg.fcp,fid:qg.fid,cls:qg.cls,ttfb:qg.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:Ip(e),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=Gg.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){Hg=n.buildPerformanceLog(t,e,r,i);e=Gg.get(t);!Hg||null!=e&&e.isPagePerformanceReported||n.publish(Hg,t)})}catch(b){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==T(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),Jg=Math.min,$g=[].lastIndexOf,Zg=!!$g&&1/[1].lastIndexOf(1,-0)<0,a=je("lastIndexOf"),Kg=Zg||!a?function(e){if(Zg)return Te($g,this,arguments)||0;var t=We(this),n=he(t);if(0!==n){var r=n-1;for((r=1<arguments.length?Jg(r,ce(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:$g,Yg=(R({target:"Array",proto:!0,forced:Kg!==[].lastIndexOf},{lastIndexOf:Kg}),Object.isFrozen),Wp=Ia||g(function(){Yg(1)}),Xg=(R({target:"Object",stat:!0,forced:Wp},{isFrozen:function(e){return!O(e)||!(!Ia||"ArrayBuffer"!==ne(e))||!!Yg&&Yg(e)}}),Object.isSealed),je=Ia||g(function(){Xg(1)}),Qg=(R({target:"Object",stat:!0,forced:je},{isSealed:function(e){return!O(e)||!(!Ia||"ArrayBuffer"!==ne(e))||!!Xg&&Xg(e)}}),Fa.onFreeze),ev=Object.seal,a=g(function(){ev(1)});R({target:"Object",stat:!0,forced:a,sham:!0},{seal:function(e){return ev&&O(e)?ev(Qg(e)):e}});var tv,nv,rv,iv,ov=Ut.enforce,Wp=Object,av=(Array.isArray,Wp.isExtensible),je=!x.ActiveXObject&&"ActiveXObject"in x,a=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},Wp=e("WeakMap",a,l),e=Wp.prototype,sv=v(e.set),uv=(Fe&&je&&(tv=l.getConstructor(a,"WeakMap",!0),Fa.enable(),nv=v(e["delete"]),rv=v(e.has),iv=v(e.get),Xo(e,{"delete":function(e){var t;return O(e)&&!av(e)?((t=ov(this)).frozen||(t.frozen=new tv),nv(this,e)||t.frozen["delete"](e)):nv(this,e)},has:function(e){var t;return O(e)&&!av(e)?((t=ov(this)).frozen||(t.frozen=new tv),rv(this,e)||t.frozen.has(e)):rv(this,e)},get:function(e){var t;return!O(e)||av(e)||((t=ov(this)).frozen||(t.frozen=new tv),rv(this,e))?iv(this,e):t.frozen.get(e)},set:function(e,t){var n;return!O(e)||av(e)||((n=ov(this)).frozen||(n.frozen=new tv),rv(this,e))?sv(this,e,t):n.frozen.set(e,t),this}})),new c({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),Wp=new c({name:"spa",visitStates:new WeakMap,navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),uv.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(a,e){var s=this,u=(void 0===e&&(e="reload"),a._customPageUrl),l=(a._customPageUrl=null,location.pathname+location.hash+a.config.id),c=a.getOriginFrom(),d=this.visitStates.get(a),f=this.resolveNavigationType(e,location.href);l&&(l!==(null==d?void 0:d.firedUrl)||u)&&this.$walk(function(n){var r,i,e,t,o;n===a&&("function"==typeof n.beginPageVisit?n.beginPageVisit(c,!!u):d&&(t=n,o=Vc(),t.viewId=o,"function"==typeof t.extendBean)&&t.extendBean("viewId",o),r="string"==typeof(e=n.viewId||(null==(e=n.bean)?void 0:e.viewId)||"")?e:"",i=Date.now(),s.visitStates.set(a,{firedUrl:l,pageUrl:c}),setTimeout(function(){var e,t=A(A({event_id:xc(),event_type:P.PAGE_VIEW,event_category:Rc.BEHAVIOR,timestamp:i,page_url:c},r?{view_id:r}:{}),{data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:Ip(n),tags:{environment:n.config.env||"production",version:String(n.config.version||""),is_spa:"true"},event_properties:{navigation_type:f,from_page:(u||(null==d?void 0:d.pageUrl)||"").slice(0,512),to_page:(c||"").slice(0,512)}}});null!=(e=n.reportTDEMEvent)&&e.call(n,t)},0))})},destroy:function(){this.option.sendPv=function(){}}}),lv="__MONITOR_SESSION_V1__";function cv(e,t){"undefined"!=typeof document&&(e=[e+"="+encodeURIComponent(t),"path=/","SameSite=Lax"],"undefined"!=typeof location&&"https:"===location.protocol&&e.push("Secure"),document.cookie=e.join("; "))}function dv(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function fv(e,t){var n,r,i;return"undefined"==typeof window?dv(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[lv],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),n):(i=dv(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),window[lv]=i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),cv("_tdem_s",n.sessionId),n):(i=dv(t(),e),cv("_tdem_s",(window[lv]=i).sessionId),i))}pv.prototype.request=function(o,a){var s=this;return void 0===a&&(a={}),o.sendBeacon||o.handoff?Promise.resolve(this.handoff(o,a)):new Promise(function(n){var e,r,t,i=new XMLHttpRequest;i.sendByTdem=!0,i.addEventListener("readystatechange",function(){var e,t;4===i.readyState&&((e={ok:0<i.status&&i.status<400,status:i.status,statusText:i.statusText,body:i.response,request:o}).ok?(null!=(t=a.success)&&t.call(a,i.response),null!=(t=a["final"])&&t.call(a,e),n(e)):(t=A(A({},e),{error:i.response}),null!=(e=a.fail)&&e.call(a,i.response),null!=(e=a["final"])&&e.call(a,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"===T(r)&&r?(t=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),e+(-1===e.indexOf("?")?"?":"&")+t):e)),s.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),s.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),t=o.body!==undefined?o.body:o.data,s.shouldSanitizeEvalKeyword(o,t)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},pv.prototype.shouldSanitizeEvalKeyword=function(e,t){return"string"==typeof t&&!("replay"===e.kind||(e=null!=(t=null==(t=e.headers)?void 0:t["Content-Encoding"])?t:null==(t=e.headers)?void 0:t["content-encoding"])&&/gzip/i.test(e))},pv.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:undefined;return r&&"function"==typeof r.sendBeacon?(n=e.body!==undefined?e.body:e.data,r={ok:n=r.sendBeacon(e.url,n),request:e,handoffAccepted:n,error:n?undefined:new Error("navigator.sendBeacon rejected the payload")},n?null!=(n=t.success)&&n.call(t,{accepted:!0}):null!=(n=t.fail)&&n.call(t,r.error),null!=(n=t["final"])&&n.call(t,r),r):(n={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(r=t.fail)&&r.call(t,n.error),null!=(e=t["final"])&&e.call(t,n),n)},pv.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var hv=pv;function pv(){}function mv(e){try{var t="undefined"!=typeof window?window.location.href:"https://tdem.invalid/",n=new URL(e,t);return n.origin+n.pathname+n.hash}catch(u){return e.split("?")[0]}}var gv,vv=new Map,yv=(wl(bv,gv=gp),bv.prototype.beginPageVisit=function(e,t){void 0===t&&(t=!1);e=mv(e);return!t&&e===this.viewPageIdentity||(this.viewId=Vc(),this.extendBean("viewId",this.viewId)),this.viewPageIdentity=e,this.viewId},bv.prototype.reportPageView=function(e,t){void 0===t&&(t={}),this.beginPageVisit(e||t.pageUrl||this.getOriginFrom(),!!t.navigationType),gv.prototype.reportPageView.call(this,e,t)},bv.prototype.leavePage=function(){this._customPageUrl&&(this.beginPageVisit("undefined"!=typeof window?window.location.href:"",!0),gv.prototype.leavePage.call(this))},bv.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=El(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},bv.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},bv.prototype._prefetchConfigAndInit=function(o){return bl(this,void 0,void 0,function(){var t,n,r,i;return kl(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=null,!t||!n)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transportRequest({kind:"config",url:n,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(i=e.sent()).ok&&0===(i="string"==typeof i.body?JSON.parse(i.body):i.body).code&&i.data&&(r=i.data),[3,4];case 3:return e.sent(),(i=this._loadPrefetchDataFromCache(t))&&(r=i),[3,4];case 4:r&&(this._prefetchedConfigData=r);try{this._initAfterPreparedConfig(o)}catch(Me){console.warn(Me),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),this.sendSDKError(Me)}return[2]}})})},bv.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/sample-config":""},bv.prototype._loadPrefetchDataFromCache=function(e){var t;try{var n,r=localStorage.getItem("TDEM_SAMPLE_CONFIG");return r?!((n=JSON.parse(r)).projectKey!==e||6048e5<=Date.now()-n.timestamp)&&null!=(t=n.document)&&t.event?n.document:null:null}catch(b){return null}},bv.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<gp.installedPlugins.length;t++)try{gp.installedPlugins[t].patch(this)}catch(_){this.sendSDKError(_)}this.lifeCycle.emit("onInited"),this._afterInit(e)},bv.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",bv.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=jl(Fl("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],Ul("tdem-web-retry-report-requests",JSON.stringify(t)),n.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=vv.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{o()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=vv.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},bv.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},bv.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},bv.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(Pe){return""}},bv.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},bv.prototype.request=function(u,n,l){var c,d,f=this;this.config.reportImmediately||this.isReportReady?this.$request(u,c=function(e){var t=jl(Fl("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&u.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===u.extraRetryOptions.requestId}),1),Ul("tdem-web-retry-report-requests",JSON.stringify(t)),vv["delete"](u.extraRetryOptions.success),vv["delete"](u.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!f.config.reportRetry)return null==l?void 0:l(e);var t,n="boolean"==typeof f.config.reportRetry?Xm:A(A({},Xm),f.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Xm.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Xm.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Xm.whenRetryEndStillFail:n,a=(u.extraRetryOptions||(u.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),u.extraRetryOptions),s=(a.requestId=a.requestId||u.url+"-"+Date.now()+"-"+Math.random(),a.requestId),n=(a.retriedCount=a.retriedCount||0,a.success=a.success||s+"_successCallback",a.fail=a.fail||s+"_failCallback",jl(Fl("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===s})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===s}),n[t]=u):n.push(u),Ul("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;a.retriedCount<i?(u.extraRetryOptions.retriedCount+=1,f.$request(u,c,d)):("discard"===o&&((e=jl(Fl("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==s})).length?Ul("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(F0){}}("tdem-web-retry-report-requests")),vv["delete"](a.success),vv["delete"](a.fail))},"function"==typeof r?r(u.extraRetryOptions.retriedCount):r),null!=l&&l(e),vv.has(a.success)||vv.set(a.success,c),vv.has(a.fail)||vv.set(a.fail,d)}):this.reportRequestQueue.push({options:u,success:n,fail:l})},bv.prototype.$request=function(s,e,t){var n,r;if(s&&"string"==typeof s.url&&""!==s.url&&this.bean.id)return n=s.url,!1!==s.addBean&&(n=function(e,t){var n,r,i,o=e,a=s.beanFilter||[];for(n in t)-1===a.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(n,A(A({},this.bean),{from:this.getCurrentPageUrl()}))),s.url=n,n=s.method||"get",r=this.config.onBeforeRequest,(s=r?r(s,this):s)?s.url?(r={success:e,fail:t},void((e={kind:s.type===oc.WHITE_LIST?"config":"events",url:s.url,method:n.toUpperCase(),contentType:s.contentType,data:s.data,body:s.data,sendBeacon:!!(null!=s&&s.sendBeacon||this.sendNow),source:s}).sendBeacon?this.transportHandoff(e,r):this.transportRequest(e,r))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},bv.prototype.publishPluginsLogs=function(){var e=bv.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},bv.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},bv.prototype.reportWebVitals=function(e){try{var t=bv.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(Pe){}},bv.sessionID=fv("tdem",Vc).sessionId,bv),Fe=(new c({name:"ie"}),new c({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var a=this,s=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=gc(t[0]);xp(i)||(r={event_id:xc(),event_type:P.JS_ERROR,event_category:Rc.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},a.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=s&&s.call.apply(s,_l([window],t))}},overrideTdemSend:function(){yv.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),je=(new c({name:"onClose"}),new c({name:"onClose",onNewTdem:function(e){var t=this,n=function(){return t.publishNotReportedLog(e)},r=function(){"undefined"!=typeof document&&"hidden"!==document.visibilityState||n()};document.addEventListener("visibilitychange",r,!0),window.addEventListener("pagehide",n,!0),e.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",r,!0),window.removeEventListener("pagehide",n,!0)})},publishNotReportedLog:function(n){var r=this;this.$walk(function(e){if(e===n){var t=e.sendNow;e.sendNow=!0;try{e.publishPluginsLogs(),r.publishThrottlePipeLogs(e)}finally{e.sendNow=t}}})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),wv=void 0;function bv(e,t){var n,r,i,a,o,s,u,l,c,d,f=gv.call(this,e,t=void 0===t?{}:t)||this;f.sendNow=!1,f.isReportReady=!1,f.reportRequestQueue=[],f._sdkInitialized=!1,f.viewId="",f.viewPageIdentity="",f.speedLogPipeline=cp([(l=[],c=(o=f).config,o.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),s&&l.length>=s||o.sendNow&&0<l.length?(l=Lc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,l=Lc(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},c.delay))}),(a=f.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=Nc[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],Nc[n]=r):Dc[n]||Fc(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Nc[n]=r,t(e)):Dc[n]||Fc(n))}),(i=f,function(t,n){bg(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=f.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=f.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return f.sendPipeline([function(e,t){t({type:oc.SPEED,url:""+f.config.speedUrl,method:"post",data:_c(e,A(A({},f.bean),{from:f.getCurrentPageUrl()})),log:e})}],oc.SPEED)(e)}]),f.viewId=Vc(),f.extendBean("viewId",f.viewId),f.viewPageIdentity=mv(f.getOriginFrom()),f.getInternalTransport()||f.setInternalTransport(new hv),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(d=String(e.userId||e.uin||(null!=(n=document.cookie.match(/\buin=\D+(\d*)/))?n:[])[1]||(null!=(r=document.cookie.match(/\bilive_uin=\D*(\d+)/))?r:[])[1]||""),e.userId=d,e.uin=e.uin||d),f._bootstrapInit(e)}catch(Me){console.warn(Me),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),f.sendSDKError(Me)}return f}R({target:"Math",stat:!0},{log1p:wv});Math.log;var a=Math.acosh,kv=Math.log,_v=Math.sqrt,Sv=Math.LN2,l=!a||710!==Math.floor(a(Number.MAX_VALUE))||a(Infinity)!==Infinity,e=(R({target:"Math",stat:!0,forced:l},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?kv(e)+Sv:wv(e-1+_v(e-1)*_v(1+e))}}),Math.asinh),a=Math.abs,Ev=Math.log,Cv=Math.sqrt,Rv=Math.LN2,l=!(e&&0<1/e(0)&&a(e(1e-8)-1e-8)<1e-16),e=(R({target:"Math",stat:!0,forced:l},{asinh:function VO(e){e=+e;return isFinite(e)&&0!=e?e<0?-VO(-e):94906265.62425156<e?Ev(e)+Rv:e<1e-8?e:wv(e+e*e/(1+Cv(e*e+1))):e}}),Math.atanh),a=!(e&&1/e(-0)<0),Ov=(R({target:"Math",stat:!0,forced:a},{atanh:function(e){e=+e;return 0==e?e:wv(2*e/(1-e))/2}}),void 0),l=(R({target:"Math",stat:!0,forced:Ov!==Math.expm1},{expm1:Ov}),Math.expm1),e=(!l||22025.465794806718<l(10)||l(10)<22025.465794806718||l(-2e-17),Math.cosh),xv=Math.abs,Tv=Math.E,a=!e||e(710)===Infinity,Iv=(R({target:"Math",stat:!0,forced:a},{cosh:function(e){e=Ov(xv(e)-1)+1;return(e+1/(e*Tv*Tv))*(Tv/2)}}),Math.abs),Mv=Math.exp,Av=Math.E,l=g(function(){return-2e-17!==Math.sinh(-2e-17)}),Pv=(R({target:"Math",stat:!0,forced:l},{sinh:function(e){e=+e;return Iv(e)<1?(Ov(e)-Ov(-e))/2:(Mv(e-1)-Mv(-e-1))*(Av/2)}}),Math.exp);R({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=Ov(e),n=Ov(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/(Pv(e)+Pv(-e))}});var Lv,Dv,Nv,Fv=Ut.enforce,Uv=Ut.get,e=x.Int8Array,jv=e&&e.prototype,a=x.Uint8ClampedArray,l=a&&a.prototype,Bv=e&&cr(e),zv=jv&&cr(jv),a=Object.prototype,Wv=x.TypeError,e=Ye("toStringTag"),Hv=Lt("TYPED_ARRAY_TAG"),qv=n,n=!1,Vv={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Gv={BigInt64Array:8,BigUint64Array:8},Jv=function(e){var t,e=cr(e);if(O(e))return(t=Uv(e))&&M(t,"TypedArrayConstructor")?t.TypedArrayConstructor:Jv(e)},$v=function(e){return!!O(e)&&(e=tt(e),M(Vv,e)||M(Gv,e))};for(Lv in Vv)(Nv=(Dv=x[Lv])&&Dv.prototype)?Fv(Nv).TypedArrayConstructor=Dv:qv=!1;for(Lv in Gv)(Nv=(Dv=x[Lv])&&Dv.prototype)&&(Fv(Nv).TypedArrayConstructor=Dv);if((!qv||!S(Bv)||Bv===Function.prototype)&&(Bv=function(){throw new Wv("Incorrect invocation")},qv))for(Lv in Vv)x[Lv]&&Cr(x[Lv],Bv);if((!qv||!zv||zv===a)&&(zv=Bv.prototype,qv))for(Lv in Vv)x[Lv]&&Cr(x[Lv].prototype,zv);if(qv&&cr(l)!==zv&&Cr(l,zv),f&&!M(zv,e))for(Lv in Bt(zv,e,{configurable:n=!0,get:function(){return O(this)?this[Hv]:undefined}}),Vv)x[Lv]&&at(x[Lv].prototype,Hv,Lv);var L={NATIVE_ARRAY_BUFFER_VIEWS:qv,TYPED_ARRAY_TAG:n&&Hv,aTypedArray:function(e){if($v(e))return e;throw new Wv("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!S(e)||Cr&&!Ee(Bv,e))throw new Wv(Re(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(f){if(n)for(var i in Vv){i=x[i];if(i&&M(i.prototype,e))try{delete i.prototype[e]}catch(X){try{i.prototype[e]=t}catch(D){}}}zv[e]&&!n||Vt(zv,e,!n&&qv&&jv[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(f){if(Cr){if(n)for(r in Vv)if((i=x[r])&&M(i,e))try{delete i[e]}catch(X){}if(Bv[e]&&!n)return;try{return Vt(Bv,e,!n&&qv&&Bv[e]||t)}catch(X){}}for(r in Vv)!(i=x[r])||i[e]&&!n||Vt(i,e,t)}},getTypedArrayConstructor:Jv,isView:function(e){return!!O(e)&&("DataView"===(e=tt(e))||M(Vv,e)||M(Gv,e))},isTypedArray:$v,TypedArray:Bv,TypedArrayPrototype:zv},Zv=x.ArrayBuffer,Kv=x.Int8Array,Yv=!L.NATIVE_ARRAY_BUFFER_VIEWS||!g(function(){Kv(1)})||!g(function(){new Kv(-1)})||!Iu(function(e){new Kv,new Kv(null),new Kv(1.5),new Kv(e)},!0)||g(function(){return 1!==new Kv(new Zv(2),1,undefined).length}),Xv=(R({target:"Number",stat:!0},{isInteger:void 0}),Math.floor,Number.isInteger,RangeError),Qv=RangeError,ey=function(t,e){var n=function(){var e=ce(t);if(e<0)throw new Xv("The argument can't be less than 0");return e}();if(n%e)throw new Qv("Wrong offset");return n},ty=Math.floor,ny=TypeError,ry=function(e){e=_o(e,"number");if("number"==typeof e)throw new ny("Can't convert number to bigint");return BigInt(e)},iy=L.aTypedArrayConstructor,oy=function(e){var t=du(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&xe(r);var o,a,s,u,l,c,d,f,h=ue(e),e=Xr(h);if(e&&!Zr(e))for(f=(d=ei(h,e)).next,h=[];!(c=I(f,d)).done;)h.push(c.value);for(i&&2<n&&(r=Gr(r,arguments[2])),a=he(h),u=function(e){e=tt(e);return"BigInt64Array"===e||"BigUint64Array"===e}(s=new(iy(t))(a)),o=0;o<a;o++)l=i?r(h[o],o):h[o],s[o]=u?ry(l):+l;return s},ay=function(e,t,n){for(var r=0,i=2<arguments.length?n:he(t),o=new e(i);r<i;)o[r]=t[r++];return o},a=qe(function(e){var r=Yn.f,u=pi.forEach,h=Ut.get,p=Ut.set,m=Ut.enforce,g=ot.f,n=or.f,v=x.RangeError,y=Go.ArrayBuffer,t=y.prototype,w=Go.DataView,b=L.NATIVE_ARRAY_BUFFER_VIEWS,k=L.TYPED_ARRAY_TAG,_=L.TypedArray,S=L.TypedArrayPrototype,E=L.isTypedArray,i=function(e,t){Bt(e,t,{configurable:!0,get:function(){return h(this)[t]}})},C=function(e){return Ee(t,e)||"ArrayBuffer"===(e=tt(e))||"SharedArrayBuffer"===e},o=function(e,t){return E(e)&&!$i(t)&&t in e&&(void 0)(+t)&&0<=t},a=function(e,t){return t=_i(t),o(e,t)?it(2,e[t]):n(e,t)},s=function(e,t,n){return t=_i(t),!(o(e,t)&&O(n)&&M(n,"value"))||M(n,"get")||M(n,"set")||n.configurable||M(n,"writable")&&!n.writable||M(n,"enumerable")&&!n.enumerable?g(e,t,n):(e[t]=n.value,e)};f?(b||(or.f=a,ot.f=s,i(S,"buffer"),i(S,"byteOffset"),i(S,"byteLength"),i(S,"length")),R({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:a,defineProperty:s}),e.exports=function(e,t,i){var l=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=x[n],c=s,d=c&&c.prototype,e={},f=function(e,r){g(e,r,{get:function(){var e=this,t=r;return(e=h(e)).view[o](t*l+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=h(n=this)).view[a](t*l+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=ty(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?Yv&&(c=t(function(e,t,n,r){return lr(e,d),ua(O(t)?C(t)?r!==undefined?new s(t,ey(n,l),r):n!==undefined?new s(t,ey(n,l)):new s(t):E(t)?ay(c,t):I(oy,c,t):new s(ea(t)),e,c)}),Cr&&Cr(c,_),u(r(s),function(e){e in c||at(c,e,s[e])}),c.prototype=d):(c=t(function(e,t,n,r){lr(e,d);var i,o,a=0,s=0;if(O(t)){if(!C(t))return E(t)?ay(c,t):I(oy,c,t);var u=t,s=ey(n,l),n=t.byteLength;if(r===undefined){if(n%l)throw new v("Wrong length");if((i=n-s)<0)throw new v("Wrong length")}else if((i=ea(r)*l)+s>n)throw new v("Wrong length");o=i/l}else o=ea(t),u=new y(i=o*l);for(p(e,{buffer:u,byteOffset:s,byteLength:i,length:o,view:new w(u)});a<o;)f(e,a++)}),Cr&&Cr(c,_),d=c.prototype=Ct(S)),d.constructor!==c&&at(d,"constructor",c),m(d).TypedArrayConstructor=c,k&&at(d,k,n),c!==s);e[n]=c,R({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||at(c,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in d||at(d,"BYTES_PER_ELEMENT",l),Ta(n)}):e.exports=function(){}}),sy=(a("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),a("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),R({target:"Array",proto:!0},{copyWithin:void 0}),tr("copyWithin"),Math.min,v(void 0)),uy=L.aTypedArray,ly=((0,L.exportTypedArrayMethod)("copyWithin",function(e,t){return sy(uy(this),e,t,2<arguments.length?arguments[2]:undefined)}),pi.every),cy=L.aTypedArray,dy=((0,L.exportTypedArrayMethod)("every",function(e){return ly(cy(this),e,1<arguments.length?arguments[1]:undefined)}),a("Int8",function(r){return function(e,t,n){return r(this,e,t,n)}}),L.getTypedArrayConstructor),fy=function(e,t){return ay(dy(e),t)},hy=pi.filter,py=L.aTypedArray,my=((0,L.exportTypedArrayMethod)("filter",function(e){e=hy(py(this),e,1<arguments.length?arguments[1]:undefined);return fy(this,e)}),pi.find),gy=L.aTypedArray,vy=((0,L.exportTypedArrayMethod)("find",function(e){return my(gy(this),e,1<arguments.length?arguments[1]:undefined)}),pi.findIndex),yy=L.aTypedArray,wy=((0,L.exportTypedArrayMethod)("findIndex",function(e){return vy(yy(this),e,1<arguments.length?arguments[1]:undefined)}),pi.forEach),by=L.aTypedArray,ky=((0,L.exportTypedArrayMethod)("forEach",function(e){wy(by(this),e,1<arguments.length?arguments[1]:undefined)}),t.includes),_y=L.aTypedArray,Sy=((0,L.exportTypedArrayMethod)("includes",function(e){return ky(_y(this),e,1<arguments.length?arguments[1]:undefined)}),t.indexOf),Ey=L.aTypedArray,Cy=((0,L.exportTypedArrayMethod)("indexOf",function(e){return Sy(Ey(this),e,1<arguments.length?arguments[1]:undefined)}),Ye("iterator")),l=x.Uint8Array,Ry=v(yr.values),Oy=v(yr.keys),xy=v(yr.entries),Ty=L.aTypedArray,e=L.exportTypedArrayMethod,Iy=l&&l.prototype,n=!g(function(){Iy[Cy].call([1])}),tr=!!Iy&&Iy.values&&Iy[Cy]===Iy.values&&"values"===Iy.values.name,t=function(){return Ry(Ty(this))},My=(e("entries",function(){return xy(Ty(this))},n),e("keys",function(){return Oy(Ty(this))},n),e("values",t,n||!tr,{name:"values"}),e(Cy,t,n||!tr,{name:"values"}),L.aTypedArray),l=L.exportTypedArrayMethod,Ay=v([].join),Py=(l("join",function(e){return Ay(My(this),e)}),L.aTypedArray),Ly=((0,L.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return Te(Kg,Py(this),1<t?[e,arguments[1]]:[e])}),pi.map),Dy=L.aTypedArray,Ny=((0,L.exportTypedArrayMethod)("map",function(e){e=Ly(Dy(this),e,1<arguments.length?arguments[1]:undefined);return fy(this,e)}),Ie.left),Fy=L.aTypedArray,Uy=((0,L.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return Ny(Fy(this),e,t,1<t?arguments[1]:undefined)}),Ie.right),jy=L.aTypedArray,By=((0,L.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return Uy(jy(this),e,t,1<t?arguments[1]:undefined)}),L.aTypedArray),t=L.exportTypedArrayMethod,zy=Math.floor,Wy=(t("reverse",function(){for(var e,t=By(this).length,n=zy(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),a("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}},!0),pi.some),Hy=L.aTypedArray,qy=((0,L.exportTypedArrayMethod)("some",function(e){return Wy(Hy(this),e,1<arguments.length?arguments[1]:undefined)}),L.aTypedArray),n=L.exportTypedArrayMethod,Vy=x.Uint16Array,Gy=Vy&&ut(Vy.prototype.sort),tr=!(!Gy||g(function(){Gy(new Vy(2),null)})&&g(function(){Gy(new Vy(2),{})})),Jy=!!Gy&&!g(function(){if(qn)return qn<74;if(md)return md<67;if(gd)return!0;if(vd)return vd<602;for(var e,t=new Vy(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(Gy(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),$y=(n("sort",function(e){return e!==undefined&&xe(e),Jy?Gy(this,e):pd(qy(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!Jy||tr),L.aTypedArray),Zy=L.getTypedArrayConstructor,Ky=((0,L.exportTypedArrayMethod)("subarray",function(e,t){var n=$y(this),r=n.length,e=ft(e,r);return new(Zy(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,fe((t===undefined?r:ft(t,r))-e))}),x.Int8Array),Yy=L.aTypedArray,e=L.exportTypedArrayMethod,Xy=[].toLocaleString,Qy=!!Ky&&g(function(){Xy.call(new Ky(1))}),l=(e("toLocaleString",function(){return Te(Xy,Qy?Jn(Yy(this)):Yy(this),Jn(arguments))},g(function(){return[1,2].toLocaleString()!==new Ky([1,2]).toLocaleString()})||!g(function(){Ky.prototype.toLocaleString.call([1,2])})),L.exportTypedArrayMethod),Ie=x.Uint8Array,t=Ie&&Ie.prototype||{},e0=[].toString,t0=v([].join),ut=(g(function(){e0.call({})})&&(e0=function(){return t0(this)}),t.toString!==e0),n0=(l("toString",e0,ut),L.aTypedArray),r0=L.getTypedArrayConstructor,i0=((0,L.exportTypedArrayMethod)("slice",function(e,t){for(var n=Jn(n0(this),e,t),e=r0(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},g(function(){new Int8Array(1).slice()})),x.RangeError),o0=x.Int8Array,tr=o0&&o0.prototype,a0=tr&&tr.set,s0=L.aTypedArray,n=L.exportTypedArrayMethod,u0=!g(function(){var e=new Uint8ClampedArray(2);return I(a0,e,{length:1,0:3},1),3!==e[1]}),e=u0&&L.NATIVE_ARRAY_BUFFER_VIEWS&&g(function(){var e=new o0(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),l0=(n("set",function(e){s0(this);var t=ey(1<arguments.length?arguments[1]:undefined,1),n=ue(e);if(u0)return I(a0,this,n,t);var e=this.length,r=he(n),i=0;if(e<r+t)throw new i0("Wrong length");for(;i<r;)this[t+i]=n[i++]},!u0||e),L.aTypedArray),Ie=L.exportTypedArrayMethod,c0=v("".slice);function d0(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}Ie("fill",function(e){var t=arguments.length,e=(l0(this),"Big"===c0(tt(this),0,3)?ry(e):+e);return I(sa,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},g(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),new c({name:"aid"});m0.generate=function(){return"rep_"+this.uuid32()},m0.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var f0=m0,h0="[SessionReplay]",p0=!1;function m0(){}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];p0&&console.log.apply(console,_l([h0+"["+e+"]"],t))}function g0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];p0&&console.debug.apply(console,_l([h0+"["+e+"]"],t))}function v0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];p0&&console.log.apply(console,_l([h0+"["+e+"] WARN:"],t))}function y0(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];p0&&console.log.apply(console,_l([h0+"["+e+"] ERROR:"],t))}S0.prototype.setTdemInstance=function(e){this.tdemInstance=e},S0.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=fv("tdem",d0),n=A({id:n.sessionId,replayId:f0.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),h("SessionManager","Document replay session created:",n.id,n.replayId),n},S0.prototype.restoreSession=function(){return this.session},S0.prototype.saveSession=function(){},S0.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},S0.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},S0.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},S0.prototype.shouldRefreshSession=function(){return!1},S0.prototype.getSession=function(){return this.session},S0.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},S0.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},S0.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(w){}},S0.prototype.syncSharedSession=function(e){var t,n,r;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,"undefined"!=typeof window&&(t=Date.now(),(n=window[lv])?(r=n.sessionId!==e,n.sessionId=e,n.version=r?n.version+1:n.version,n.source="tdem",r&&(n.createdAt=t),n.lastActivity=t):window[lv]=dv(e,"tdem"),cv("_tdem_s",e),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:"tdem"}})))};var w0=S0,b0=((t={})[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t),k0=(_0.prototype.ensureReady=function(){return bl(this,void 0,void 0,function(){return kl(this,function(e){return[2,this.ready]})})},_0.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},_0.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},_0);function _0(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function S0(e){this.session=null,this.tdemInstance=null}function E0(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=1:r<2048?t+=2:55296<=r&&r<=56319&&n+1<e.length&&56320<=e.charCodeAt(n+1)&&e.charCodeAt(n+1)<=57343?(t+=4,n+=1):t+=3}return t}R0.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),h("CompressionWorker","Worker created successfully"),new k0(n))}catch(u){return v0("CompressionWorker","Failed to create worker, will fallback to sync buffer:",u),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,h("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){v0("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):h("EventBuffer","Worker not available, using sync buffer")},R0.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady)for(var e=0,t=this.events;e<t.length;e++){var n=t[e];this.addEventToWorker(n)}},R0.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(_){v0("EventBuffer","Failed to send event to worker:",_)}},R0.prototype.addEvent=function(e){var t=this.estimateEventSize(e);this.currentSize+t>this.config.maxSize&&(v0("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t,this.useWorker&&this.workerReady&&this.workerHandler&&(0<this.workerEventCount&&this.workerSize+t>this.config.maxSize&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e))},R0.prototype.getEvents=function(){return _l(this.events)},R0.prototype.getEventCount=function(){return this.events.length},R0.prototype.getSize=function(){return this.currentSize},R0.prototype.isEmpty=function(){return 0===this.events.length},R0.prototype.detachEvents=function(){var e=this.events;return this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),e},R0.prototype.hasBaselinePair=function(){for(var e=!1,t=!1,n=0;n<this.events.length;n++){var r=this.events[n].type;if(r===b0.Meta?e=!0:r===b0.FullSnapshot&&(t=!0),e&&t)return!0}return!1},R0.prototype.finishAsync=function(){return bl(this,void 0,void 0,function(){var t;return kl(this,function(e){return[2,{events:t=this.getEvents(),eventCount:t.length,uncompressedSize:this.currentSize}]})})},R0.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},R0.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},R0.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},R0.prototype.estimateEventSize=function(e){try{return E0(JSON.stringify(e))+1}catch(F0){return 1024}},R0.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===b0.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===b0.Meta){r=n;break}for(var i,o=0,a=Math.max(e,.2*this.config.maxSize),s=0;s<r&&o<a;)s++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<a;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},R0.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===b0.Meta||e.type===b0.FullSnapshot})},R0.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===b0.FullSnapshot)return t.timestamp}return null},R0.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var C0=R0;function R0(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}ki("toStringTag"),vr(Se("Symbol"),"Symbol"),vr(x.JSON,"JSON",!0),vr(Math,"Math",!0),R({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var O0=o.trim,x0=v("".charAt),T0=x.parseFloat,ut=x.Symbol,I0=ut&&ut.iterator,l=1/T0(Ro+"-0")!=-Infinity||I0&&!g(function(){T0(Object(I0))})?function(e){var e=O0(C(e)),t=T0(e);return 0===t&&"-"===x0(e,0)?-0:t}:T0,M0=(R({target:"Number",stat:!0,forced:Number.parseFloat!==l},{parseFloat:l}),Se("Reflect","construct")),A0=Object.prototype,P0=[].push,L0=g(function(){function e(){}return!(M0(function(){},[],e)instanceof e)}),D0=!g(function(){M0(function(){})}),tr=L0||D0,N0=(R({target:"Reflect",stat:!0,forced:tr,sham:tr},{construct:function(e,t){du(e);var n=arguments.length<3?e:du(arguments[2]);if(E(t),D0&&!L0)return M0(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Te(P0,r,t),new(Te(Rs,e,r))}r=n.prototype,n=Ct(O(r)?r:A0),r=Te(e,n,t);return O(r)?r:n}}),function(e,t,n){var r,i;return E(e)===n?e[t]:(r=or.f(e,t))?(i=r)!==undefined&&(M(i,"value")||M(i,"writable"))?r.value:r.get===undefined?undefined:I(r.get,n):(i=cr(e),O(i)?N0(i,t,n):void 0)});R({target:"Reflect",stat:!0},{get:function(e,t){return N0(E(e),_i(t),arguments.length<3?e:arguments[2])}}),v("".replace);R({target:"String",proto:!0,forced:g(function(){var e="".bold('"');return e!==e.toLowerCase()||3<e.split('"').length})},{bold:function(){return 0,"<b"+">"+C(ae(this))+"</b>"}}),a("Float64",function(r){return function(e,t,n){return r(this,e,t,n)}}),a("Int16",function(r){return function(e,t,n){return r(this,e,t,n)}}),a("Int32",function(r){return function(e,t,n){return r(this,e,t,n)}}),a("Uint16",function(r){return function(e,t,n){return r(this,e,t,n)}}),a("Uint32",function(r){return function(e,t,n){return r(this,e,t,n)}});var F0,U0=["inputs"],j0=["inputId"],B0=["inputs"],z0=["inputId"],W0=["type"],H0=Object.defineProperty,p=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?H0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},q0=Object.defineProperty,V0=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},G0=((e=G0||{})[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),J0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},$0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Z0={},K0={};function Y0(e){if(Z0[e])return Z0[e];var t=globalThis[e],n=t.prototype,r=e in J0?J0[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in $0?$0[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return Z0[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),K0[e]=function(){return s.remove()}):s.remove(),Z0[e]=o):(s.remove(),n):t.prototype}catch(U){return n}}var X0={};function Q0(e,t,n){var r="".concat(e,".").concat(String(n));return X0[r]?X0[r].call(t):(e=Y0(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(X0[r]=e).call(t):t[n])}var ew={};function tw(e,t,n){var r="".concat(e,".").concat(String(n));return ew[r]?ew[r].bind(t):"function"!=typeof(e=Y0(e)[n])?t[n]:(ew[r]=e).bind(t)}var n=Date.now,nw={ownerDocument:function(e){return Q0("Node",e,"ownerDocument")},childNodes:function(e){return Q0("Node",e,"childNodes")},parentNode:function(e){return Q0("Node",e,"parentNode")},parentElement:function(e){return Q0("Node",e,"parentElement")},textContent:function(e){return Q0("Node",e,"textContent")},contains:function(e,t){return tw("Node",e,"contains")(t)},getRootNode:function(e){return tw("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Q0("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Q0("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Q0("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Q0("Element",e,"querySelectorAll")(t)},nowTimestamp:n=/[1-9][0-9]{12}/.test(Date.now().toString())?n:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[Y0("MutationObserver").constructor,null!=(e=K0.MutationObserver)?e:function(){}]},patch:function(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}};function rw(e){return e.nodeType===e.ELEMENT_NODE}function iw(e){var t=e&&"host"in e&&"mode"in e&&nw.host(e)||null;return Boolean(t&&"shadowRoot"in t&&nw.shadowRoot(t)===e)}function ow(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function aw(e){try{var t,n=e.rules||e.cssRules;return n?(!(t=e.href)&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,function(e){return sw(e,t)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r):null}catch(X){return null}var r}function sw(e,t){if("styleSheet"in e){var n;try{n=aw(e.styleSheet)||((r=(i=e).cssText).split('"').length<3?r:(r=["@import","url(".concat(JSON.stringify(i.href),")")],""===i.layerName?r.push("layer"):i.layerName&&r.push("layer(".concat(i.layerName,")")),i.supportsText&&r.push("supports(".concat(i.supportsText,")")),i.media.length&&r.push(i.media.mediaText),r.join(" ")+";"))}catch(X){n=e.cssText}return e.styleSheet.href?vw(n,e.styleSheet.href):n}var r,i=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?vw(i,t):i}var uw=k(function m(){b(this,m),V0(this,"idNodeMap",new Map),V0(this,"nodeMetaMap",new WeakMap)},[{key:"getId",value:function(e){return e&&null!=(e=null==(e=this.getMeta(e))?void 0:e.id)?e:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);n&&(n=this.nodeMetaMap.get(n))&&this.nodeMetaMap.set(t,n),this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]);function lw(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&cw(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function cw(e){return e.toLowerCase()}function dw(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?cw(t):null}function fw(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(Pe){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(t=null==e?void 0:e[1])?t:null}var hw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pw=/^(?:[a-z+]+:)?\/\//i,mw=/^www\..*/i,gw=/^(data:)([^,]*),(.*)/i;function vw(e,c){return(e||"").replace(hw,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(pw.test(n)||mw.test(n))return"url(".concat(i).concat(n).concat(i,")");if(gw.test(n))return"url(".concat(i).concat(n).concat(i,")");if("/"===n[0])return"url(".concat(i).concat((-1<(o=c).indexOf("//")?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+n).concat(i,")");var t=n.split("#")[0],r=n.substring(t.length),a=c.split("#")[0].split("/"),e=t.split("/");a.pop();var s,u=Me(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;"."!==l&&(".."===l?a.pop():a.push(l))}}catch(Pe){u.e(Pe)}finally{u.f()}return"url(".concat(i).concat(a.join("/")).concat(r).concat(i,")")})}function yw(e,t){return 1<arguments.length&&t!==undefined&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var ww,bw,kw=1,_w=new RegExp("[^a-z0-9-_:]");function Sw(){return kw++}var Ew=/^[^ \t\n\r\u000c]+/,Cw=/^[, \t\n\r\u000c]+/,Rw=new WeakMap;function Ow(e,t){return t&&""!==t.trim()?xw(e,t):t}function xw(e,t){var n=Rw.get(e);if(n||(n=e.createElement("a"),Rw.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Tw(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?Ow(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var e=e.exec(t.substring(n));return e?(e=e[0],n+=e.length,e):""}for(var i=[];r(Cw),!(n>=t.length);)if(","===(a=r(Ew)).slice(-1))a=Ow(e,a.substring(0,a.length-1)),i.push(a);else for(var o="",a=Ow(e,a),s=!1;;){var u=t.charAt(n);if(""===u){i.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,n+=1}return i.join(", ")}(e,r):"style"===n?vw(r,xw(e)):"object"===t&&"data"===n?Ow(e,r):r)}function Iw(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function Mw(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE)for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Mw(nw.parentNode(e),t,n)}function Aw(e,t,n,r){var i;if(rw(e)){if(!nw.childNodes(i=e).length)return!1}else{if(null===nw.parentElement(e))return!1;i=nw.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(Mw(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(Le){}return!1}function Pw(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,c=t.maskInputFn,s=t.dataURLOptions,d=void 0===s?{}:s,f=t.inlineImages,N=t.recordCanvas,F=t.keepIframeSrcFn,s=t.newlyAddedElement,U=void 0!==s&&s,s=t.cssCaptured,j=void 0!==s&&s,h=(s=n,!(t=t.mirror).hasNode(s)||1===(s=t.getId(s))?void 0:s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:G0.Document,childNodes:[],compatMode:e.compatMode}:{type:G0.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:G0.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:for(var p,m,g,v,y,w,b=e,k=(M={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:u,maskInputFn:c,dataURLOptions:d,inlineImages:f,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:U,rootId:h}).doc,_=M.blockSelector,S=M.inlineStylesheet,E=void 0===(E=M.maskInputOptions)?{}:E,C=M.maskInputFn,R=void 0===(O=M.dataURLOptions)?{}:O,O=M.inlineImages,x=M.recordCanvas,T=M.keepIframeSrcFn,I=void 0!==(I=M.newlyAddedElement)&&I,B=M.rootId,M=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(_){}return!1}(b,M.blockClass,_),A=(m=b)instanceof HTMLFormElement?"form":(m=cw(m.tagName),_w.test(m)?"div":m),P={},z=b.attributes.length,L=0;L<z;L++){var D=b.attributes[L];Iw(A,D.name)||(P[D.name]=Tw(k,A,cw(D.name),D.value))}"link"===A&&S&&(m=null,m=(S=Array.from(k.styleSheets).find(function(e){return e.href===b.href}))?aw(S):m)&&(delete P.rel,delete P.href,P._cssText=m),"style"===A&&b.sheet&&(S=aw(b.sheet))&&(1<b.childNodes.length&&(S=function(e,t,n){var r=2<arguments.length&&n!==undefined&&n,i=Array.from(t.childNodes),o=[],a=0;if(1<i.length&&e&&"string"==typeof e)for(var s=yw(e,r),u=s.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var c=yw(i[l].textContent,r),d=3;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,d),1));d++);for(;d<c.length;d++){var f,h=c.substring(0,d),p=s.split(h),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[l-1].textContent)m=s.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),(p=s.split(h)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(m=s.indexOf(h));if(-1!==(m=2<=p.length&&100<d&&((f=i[l-1].textContent)&&"string"==typeof f&&(f=yw(f).length,m=s.indexOf(h,f)),-1===m)?p[0].length:m)){for(var g=Math.floor(m/u);0<g&&g<e.length;){if((a+=1)>50*i.length)return o.push(e),o;var v=yw(e.substring(0,g),r);if(v.length===m){o.push(e.substring(0,g)),e=e.substring(g),s=s.substring(m);break}v.length<m?g+=Math.max(1,Math.floor((m-v.length)/u)):g-=Math.max(1,Math.floor((v.length-m)*u))}break}}}return o.push(e),o}(S,b).join("/* rr_split */")),P._cssText=S),["input","textarea","select"].includes(A)&&(m=b.value,S=b.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&m?P.value=lw({element:b,type:dw(b),tagName:A,value:m,maskInputOptions:E,maskInputFn:C}):S&&(P.checked=S)),"option"===A&&(b.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&b.open&&(P.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&x&&("2d"===b.__context?function(e){var t=e.getContext("2d");if(t)for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return}return 1}(b)||(P.rr_dataURL=b.toDataURL(R.type,R.quality)):"__context"in b||(m=b.toDataURL(R.type,R.quality),(C=k.createElement("canvas")).width=b.width,C.height=b.height,m!==C.toDataURL(R.type,R.quality)&&(P.rr_dataURL=m))),"img"===A&&O&&(ww||(ww=k.createElement("canvas"),bw=ww.getContext("2d")),v=(g=b).currentSrc||g.getAttribute("src")||"<unknown-src>",y=g.crossOrigin,w=function(){g.removeEventListener("load",w);try{ww.width=g.naturalWidth,ww.height=g.naturalHeight,bw.drawImage(g,0,0),P.rr_dataURL=ww.toDataURL(R.type,R.quality)}catch(Pe){if("anonymous"!==g.crossOrigin)return g.crossOrigin="anonymous",void(g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w));console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(Pe))}"anonymous"===g.crossOrigin&&(y?P.crossOrigin=y:g.removeAttribute("crossorigin"))},g.complete&&0!==g.naturalWidth?w():g.addEventListener("load",w)),["audio","video"].includes(A)&&((S=P).rr_mediaState=b.paused?"paused":"played",S.rr_mediaCurrentTime=b.currentTime,S.rr_mediaPlaybackRate=b.playbackRate,S.rr_mediaMuted=b.muted,S.rr_mediaLoop=b.loop,S.rr_mediaVolume=b.volume),I||(b.scrollLeft&&(P.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(P.rr_scrollTop=b.scrollTop)),M&&(x=(E=b.getBoundingClientRect()).width,C=E.height,P={"class":P["class"],rr_width:"".concat(x,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||T(P.src)||(b.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(p=!0)}catch(oe){}return{type:G0.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0,needBlock:M,rootId:B,isCustom:p};case e.TEXT_NODE:return m=e,S=(O={doc:n,needsMask:o,maskTextFn:l,rootId:h,cssCaptured:j}).needsMask,I=O.maskTextFn,E=O.rootId,x=O.cssCaptured,C=(C=nw.parentNode(m))&&C.tagName,T="",M="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?T="SCRIPT_PLACEHOLDER":x||(T=nw.textContent(m),M&&(T=T&&vw(T,xw(O.doc)))),!M&&!C&&T&&S&&(T=I?I(T,nw.parentElement(m)):T.replace(/[\S]/g,"*")),{type:G0.Text,textContent:T||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:G0.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:G0.Comment,textContent:nw.textContent(e)||"",rootId:h};default:return!1}}function Lw(e){return null==e?"":e.toLowerCase()}function Dw(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function Nw(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,u=e.skipChild,u=void 0!==u&&u,l=e.inlineStylesheet,c=void 0===l||l,l=e.maskInputOptions,d=void 0===l?{}:l,f=e.maskTextFn,h=e.maskInputFn,p=e.slimDOMOptions,l=e.dataURLOptions,m=void 0===l?{}:l,l=e.inlineImages,g=void 0!==l&&l,l=e.recordCanvas,v=void 0!==l&&l,y=e.onSerialize,w=e.onIframeLoad,l=e.iframeLoadTimeout,b=void 0===l?5e3:l,k=e.onStylesheetLoad,l=e.stylesheetLoadTimeout,_=void 0===l?5e3:l,l=e.keepIframeSrcFn,S=void 0===l?function(){return!1}:l,l=e.newlyAddedElement,l=void 0!==l&&l,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,R=void 0===e||e,C=C||Aw(t,a,s,void 0===C),e=Pw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:l,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var l=r.hasNode(t)?r.getId(t):function(e,t){if(t.comment&&e.type===G0.Comment)return 1;if(e.type===G0.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===fw(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Lw(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Lw(e.attributes.name)||"icon"===Lw(e.attributes.rel)||"apple-touch-icon"===Lw(e.attributes.rel)||"shortcut icon"===Lw(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Lw(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(Lw(e.attributes.property).match(/^(og|twitter|fb):/)||Lw(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Lw(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===Lw(e.attributes.name)||"googlebot"===Lw(e.attributes.name)||"bingbot"===Lw(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===Lw(e.attributes.name)||"generator"===Lw(e.attributes.name)||"framework"===Lw(e.attributes.name)||"publisher"===Lw(e.attributes.name)||"progid"===Lw(e.attributes.name)||Lw(e.attributes.property).match(/^article:/)||Lw(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===Lw(e.attributes.name)||"yandex-verification"===Lw(e.attributes.name)||"csrf-token"===Lw(e.attributes.name)||"p:domain_verify"===Lw(e.attributes.name)||"verify-v1"===Lw(e.attributes.name)||"verification"===Lw(e.attributes.name)||"shopify-checkout-api-token"===Lw(e.attributes.name)))return 1}}}(e,p)||!R&&e.type===G0.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:kw++,O=Object.assign(e,{id:l});if(r.add(t,O),-2===l)return null;y&&y(t);E=!u;if(O.type===G0.Element&&(E=E&&!O.needBlock,delete O.needBlock,e=nw.shadowRoot(t))&&ow(e)&&(O.isShadowHost=!0),(O.type===G0.Document||O.type===G0.Element)&&E){p.headWhitespace&&O.type===G0.Element&&"head"===O.tagName&&(R=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S,cssCaptured:!1};if(O.type!==G0.Element||"textarea"!==O.tagName||void 0===O.attributes.value){O.type===G0.Element&&void 0!==O.attributes._cssText&&"string"==typeof O.attributes._cssText&&(x.cssCaptured=!0);for(var T=0,I=Array.from(nw.childNodes(t));T<I.length;T++){var M=Nw(I[T],x);M&&O.childNodes.push(M)}}var A=null;if(rw(t)&&(A=nw.shadowRoot(t)))for(var P=0,L=Array.from(nw.childNodes(A));P<L.length;P++){var D=Nw(L[P],x);D&&(ow(A)&&(D.isShadow=!0),O.childNodes.push(D))}}l=nw.parentNode(t);return l&&iw(l)&&ow(l)&&(O.isShadow=!0),O.type===G0.Element&&"iframe"===O.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(X){return}if("complete"===i){if("about:blank"!==r.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(t,function(){var e=t.contentDocument;e&&w&&(e=Nw(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S}))&&w(t,e)},b),O.type===G0.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===fw(O.attributes.href))&&function(e,t,n){var r,i,o=!1;try{r=e.sheet}catch(X){return}r||(i=setTimeout(function(){o||(t(),o=!0)},n),e.addEventListener("load",function(){clearTimeout(i),o=!0,t()}))}(t,function(){var e;k&&(e=Nw(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:f,maskInputFn:h,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S}))&&k(t,e)},_),O}var Fw,Uw={exports:{}};var jw,Bw,zw,Ww,Hw,qw=(zw=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?zw:("function"==typeof(Ww=zw["default"])?(Hw=function zw(){return this instanceof zw?Reflect.construct(Ww,arguments,this.constructor):Ww.apply(this,arguments)}).prototype=Ww.prototype:Hw={},Object.defineProperty(Hw,"__esModule",{value:!0}),Object.keys(zw).forEach(function(e){var t=Object.getOwnPropertyDescriptor(zw,e);Object.defineProperty(Hw,e,t.get?t:{enumerable:!0,get:function(){return zw[e]}})}),Hw);function Vw(){var d,f,e,t,n;return Bw||(Bw=1,Fw||(Fw=1,t=String,Uw.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),Uw.exports.createColors=n),d=Uw.exports,f=qw,n=Y(Error),j(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(jw=e)["default"]=e),jw;function s(e,t,n,r,i,o){var a;return b(this,s),(a=u(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var Gw,Jw,$w,Zw,Kw,Yw,Xw,Qw,eb,tb,nb,rb,ib,ob,ab,sb,ub,lb,cb,db,fb,hb,pb,mb,gb,vb,yb,wb,bb,kb,_b,Sb,Eb,Cb,Rb,Ob,xb,Tb,Ib,Mb,Ab,Pb,Lb,Db,Nb,Fb,Ub,jb,Bb,zb,Wb,Hb={};function qb(){return Gw||(Gw=1,Hb.isClean=Symbol("isClean"),Hb.my=Symbol("my")),Hb}function Vb(){var a,t;return $w||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!($w=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(Jw=t)["default"]=t),Jw}function Gb(){var n;return Kw||(Kw=1,n=Vb(),(Zw=e)["default"]=e),Zw;function e(e,t){new n(t).stringify(e)}}function Jb(){var o,a,s,i,n,r,e;return Xw||(Xw=1,a=(o=qb()).isClean,s=o.my,i=Vw(),n=Vb(),r=Gb(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Yw=e)["default"]=e),Yw}function $b(){var e;return eb||(eb=1,e=Jb(),j(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(Qw=e)["default"]=e),Qw;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=u(this,t,[e])).type="decl",e}}function Zb(){var r,i,t,n,o,a,s;return ib||(ib=1,r=qw.SourceMapConsumer,i=qw.SourceMapGenerator,t=qw.existsSync,n=qw.readFileSync,o=qw.dirname,a=qw.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(rb=s)["default"]=s),rb}function Kb(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return ab||(ab=1,n=qw.SourceMapConsumer,t=qw.SourceMapGenerator,a=qw.fileURLToPath,u=qw.pathToFileURL,s=qw.isAbsolute,r=qw.resolve,i=(nb?tb:(nb=1,tb={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=qw,l=Vw(),o=Zb(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(ob=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),ob}function Yb(){if(ub)return sb;ub=1;var a=qw.SourceMapConsumer,t=qw.SourceMapGenerator,s=qw.dirname,n=qw.relative,r=qw.resolve,i=qw.sep,o=qw.pathToFileURL,u=Kb(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return sb=k(function B(e,t,n,r){b(this,B),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Xb(){var e;return cb||(cb=1,e=Jb(),j(t,e),e=k(t),(lb=e)["default"]=e),lb;function t(e){return b(this,t),(e=u(this,t,[e])).type="comment",e}}function Qb(){var l,c,d,t,f,h,p,m,n,e;return fb||(fb=1,e=qb(),f=e.isClean,h=e.my,p=$b(),m=Xb(),e=Jb(),j(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function q(e){return e.map(function(e){return e.nodes&&(e.nodes=q(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((db=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),db;function g(){return b(this,g),u(this,g,arguments)}}function e1(){var t,n,e;return pb||(pb=1,e=Qb(),j(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(hb=e)["default"]=e),hb;function r(e){return b(this,r),(e=u(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function t1(){if(gb)return mb;gb=1;var t={};return mb=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function n1(){var r;return yb||(yb=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(vb=r)["default"]=r),vb}function r1(){var n,r;return bb||(bb=1,n=n1(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(wb=r)["default"]=r),wb}function i1(){var e,t;return Eb||(Eb=1,e=Qb(),j(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"prepend",this,3)(t)}}]),(Sb=t)["default"]=t,e.registerAtRule(t)),Sb;function r(e){return b(this,r),(e=u(this,r,[e])).type="atrule",e}}function o1(){var t,n,e,r;return Rb||(Rb=1,e=Qb(),j(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=$(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),$(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},Cb=r,e.registerRoot(r["default"]=r)),Cb;function o(e){return b(this,o),(e=u(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function a1(){var t;return xb||(xb=1,(Ob=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Me(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),Ob}function s1(){var e,t,n;return Ib||(Ib=1,e=Qb(),t=a1(),j(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(Tb=n)["default"]=n,e.registerRule(n)),Tb;function r(e){return b(this,r),(e=u(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function u1(){if(Ab)return Mb;Ab=1;var p=$b(),e=function(){if(_b)return kb;_b=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),_="/".charCodeAt(0),S="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),I="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,B=/.[\r\n"'(/\\]/,z=/[\da-f]/i;return kb=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case S:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===S||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);d=[n,n,m];break;case I:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==S&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||B.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==_&&r!==E&&r!==S&&r!==R&&r!==O&&r!==C&&(i+=1,z.test(f.charAt(i)))){for(;z.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===_&&f.charCodeAt(m+1)===D?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=Xb(),l=i1(),t=o1(),r=s1(),f={empty:!0,space:!0};return Mb=k(function F(e){b(this,F),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function l1(){var e,n,r;return Lb||(Lb=1,e=Qb(),n=u1(),r=Kb(),Pb=t,e.registerParse(t["default"]=t)),Pb;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(D){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===D.name&&t&&t.from&&(/\.scss$/i.test(t.from)?D.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?D.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(D.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),D}return e.root}}function c1(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return Nb||(Nb=1,t=qb(),d=t.isClean,a=t.my,n=Yb(),r=Gb(),u=Qb(),s=e1(),i=t1(),c=r1(),l=l1(),e=o1(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=_(H().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=H().m(function f(){var t,n,r;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(V(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},Db=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),Db;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function d1(){var n,r,t,e,i,o,a,s,u,l,c;return Bb||(Bb=1,Ub||(Ub=1,o=Yb(),a=Gb(),s=t1(),u=l1(),l=r1(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(Fb=c)["default"]=c),n=Fb,r=c1(),t=e1(),e=o1(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(jb=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),jb}HE||(HE=1,Ie=Vw(),f1=$b(),t=c1(),o=Qb(),h1=d1(),ut=Gb(),oR||(oR=1,w1=$b(),b1=Zb(),k1=Xb(),_1=i1(),S1=Kb(),E1=o1(),C1=s1(),(zb=R1)["default"]=R1),l=zb,p1=e1(),tr=n1(),m1=Xb(),g1=i1(),a=r1(),e=Kb(),n=l1(),HE=a1(),v1=s1(),y1=o1(),oR=Jb(),O1.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new h1).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return O1([i(n)]).process(e,t)},i},O1.stringify=ut,O1.parse=n,O1.fromJSON=l,O1.list=HE,O1.comment=function(e){return new m1(e)},O1.atRule=function(e){return new g1(e)},O1.decl=function(e){return new f1(e)},O1.rule=function(e){return new v1(e)},O1.root=function(e){return new y1(e)},O1.document=function(e){return new p1(e)},O1.CssSyntaxError=Ie,O1.Declaration=f1,O1.Container=o,O1.Processor=h1,O1.Document=p1,O1.Comment=m1,O1.Warning=tr,O1.AtRule=g1,O1.Result=a,O1.Input=e,O1.Rule=v1,O1.Root=y1,O1.Node=oR,t.registerPostcss(O1),(Wb=O1)["default"]=O1);var f1,h1,p1,m1,g1,v1,y1,w1,b1,k1,_1,S1,E1,C1,n=(ut=Wb)&&ut.__esModule&&Object.prototype.hasOwnProperty.call(ut,"default")?ut["default"]:ut;function R1(e,t){if(Array.isArray(e))return e.map(function(e){return R1(e)});var n,r=e.inputs,i=W(e,U0);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:S1.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:b1.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return R1(e,t)})),i.source&&(n=(r=i.source).inputId,r=W(r,j0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new E1(i);if("decl"===i.type)return new w1(i);if("rule"===i.type)return new C1(i);if("comment"===i.type)return new k1(i);if("atrule"===i.type)return new _1(i);throw new Error("Unknown node type: "+e.type)}function O1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new h1(t)}n.stringify;var x1=Object.defineProperty,T1=function(e,t,n){return e=e,t="symbol"!==T(t)?t+"":t,n=n,t in e?x1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};Date.now().toString();var I1,M1={exports:{}};var A1,P1,L1,D1,N1,F1=(L1=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?L1:("function"==typeof(D1=L1["default"])?(N1=function L1(){return this instanceof L1?Reflect.construct(D1,arguments,this.constructor):D1.apply(this,arguments)}).prototype=D1.prototype:N1={},Object.defineProperty(N1,"__esModule",{value:!0}),Object.keys(L1).forEach(function(e){var t=Object.getOwnPropertyDescriptor(L1,e);Object.defineProperty(N1,e,t.get?t:{enumerable:!0,get:function(){return L1[e]}})}),N1);function U1(){var d,f,e,t,n;return P1||(P1=1,I1||(I1=1,t=String,M1.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),M1.exports.createColors=n),d=M1.exports,f=F1,n=Y(Error),j(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=d.isColorSupported);var n,i,o,a,s,t=(t=f&&e?f(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(A1=e)["default"]=e),A1;function s(e,t,n,r,i,o){var a;return b(this,s),(a=u(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var j1,B1,z1,W1,H1,q1,V1,G1,J1,$1,Z1,K1,Y1,X1,Q1,ek,tk,nk,rk,ik,ok,ak,sk,uk,lk,ck,dk,fk,hk,pk,mk,gk,vk,yk,wk,bk,kk,_k,Sk,Ek,Ck,Rk,Ok,xk,Tk,Ik,Mk,Ak,Pk,Lk,Dk,Nk={};function Fk(){return j1||(j1=1,Nk.isClean=Symbol("isClean"),Nk.my=Symbol("my")),Nk}function Uk(){var a,t;return z1||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(z1=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),(B1=t)["default"]=t),B1}function jk(){var n;return H1||(H1=1,n=Uk(),(W1=e)["default"]=e),W1;function e(e,t){new n(t).stringify(e)}}function Bk(){var o,a,s,i,n,r,e;return V1||(V1=1,a=(o=Fk()).isClean,s=o.my,i=U1(),n=Uk(),r=jk(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Pe){r.e(Pe)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=T(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===T(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===T(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ne(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(q1=e)["default"]=e),q1}function zk(){var e;return J1||(J1=1,e=Bk(),j(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(G1=e)["default"]=e),G1;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=u(this,t,[e])).type="decl",e}}function Wk(){var r,i,t,n,o,a,s;return Y1||(Y1=1,r=F1.SourceMapConsumer,i=F1.SourceMapGenerator,t=F1.existsSync,n=F1.readFileSync,o=F1.dirname,a=F1.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===T(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(K1=s)["default"]=s),K1}function Hk(){var n,a,u,s,r,i,e,l,o,c,d,f,t;return Q1||(Q1=1,n=F1.SourceMapConsumer,t=F1.SourceMapGenerator,a=F1.fileURLToPath,u=F1.pathToFileURL,s=F1.isAbsolute,r=F1.resolve,i=(Z1?$1:(Z1=1,$1={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=F1,l=U1(),o=Wk(),c=Symbol("fromOffsetCache"),d=Boolean(n&&t),f=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===T(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),f&&d&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===T(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(X1=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),X1}function qk(){if(tk)return ek;tk=1;var a=F1.SourceMapConsumer,t=F1.SourceMapGenerator,s=F1.dirname,n=F1.relative,r=F1.resolve,i=F1.sep,o=F1.pathToFileURL,u=Hk(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return ek=k(function B(e,t,n,r){b(this,B),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Pe){t.e(Pe)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function Vk(){var e;return rk||(rk=1,e=Bk(),j(t,e),e=k(t),(nk=e)["default"]=e),nk;function t(e){return b(this,t),(e=u(this,t,[e])).type="comment",e}}function Gk(){var l,c,d,t,f,h,p,m,n,e;return ok||(ok=1,e=Fk(),f=e.isClean,h=e.my,p=zk(),m=Vk(),e=Bk(),j(g,e),(n=k(g,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Pe){s.e(Pe)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($(g,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Pe){n.e(Pe)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ne(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Pe){s.e(Pe)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function q(e){return e.map(function(e){return e.nodes&&(e.nodes=q(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Pe){i.e(Pe)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Pe){s.e(Pe)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new d(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new m(e)]}return e.map(function(e){return e[h]||g.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[f]&&function c(e){if(e[f]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Pe){n.e(Pe)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Pe){i.e(Pe)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Pe){t.e(Pe)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((ik=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,m.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),ik;function g(){return b(this,g),u(this,g,arguments)}}function Jk(){var t,n,e;return sk||(sk=1,e=Gk(),j(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(ak=e)["default"]=e),ak;function r(e){return b(this,r),(e=u(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function $k(){if(lk)return uk;lk=1;var t={};return uk=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Zk(){var r;return dk||(dk=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),(ck=r)["default"]=r),ck}function Kk(){var n,r;return hk||(hk=1,n=Zk(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(fk=r)["default"]=r),fk}function Yk(){var e,t;return vk||(vk=1,e=Gk(),j(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return $(r,"prepend",this,3)(t)}}]),(gk=t)["default"]=t,e.registerAtRule(t)),gk;function r(e){return b(this,r),(e=u(this,r,[e])).type="atrule",e}}function Xk(){var t,n,e,r;return wk||(wk=1,e=Gk(),j(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=$(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Pe){i.e(Pe)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),$(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},yk=r,e.registerRoot(r["default"]=r)),yk;function o(e){return b(this,o),(e=u(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Qk(){var t;return kk||(kk=1,(bk=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,d=Me(e);try{for(d.s();!(r=d.n()).done;){var f=r.value;c?c=!1:"\\"===f?c=!0:u?f===l&&(u=!1):'"'===f||"'"===f?(u=!0,l=f):"("===f?s+=1:")"===f?0<s&&--s:0===s&&t.includes(f)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=f}}catch(Pe){d.e(Pe)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),bk}function e_(){var e,t,n;return Sk||(Sk=1,e=Gk(),t=Qk(),j(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(_k=n)["default"]=n,e.registerRule(n)),_k;function r(e){return b(this,r),(e=u(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function t_(){if(Ck)return Ek;Ck=1;var p=zk(),e=function(){if(mk)return pk;mk=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),_="/".charCodeAt(0),S="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),R="\t".charCodeAt(0),O="\r".charCodeAt(0),x="[".charCodeAt(0),T="]".charCodeAt(0),I="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),F="@".charCodeAt(0),U=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,B=/.[\r\n"'(/\\]/,z=/[\da-f]/i;return pk=function(t){var r,i,o,a,s,u,l,c,d,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},f=t.css.valueOf(),h=e.ignoreErrors,p=f.length,m=0,g=[],v=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=m},nextToken:function(e){if(v.length)return v.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case S:case E:case R:case O:case C:for(i=m;i+=1,(r=f.charCodeAt(i))===E||r===S||r===R||r===O||r===C;);d=["space",f.slice(m,i)],m=i-1;break;case x:case T:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);d=[n,n,m];break;case I:if(l=g.length?g.pop()[1]:"",c=f.charCodeAt(m+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==S&&c!==R&&c!==C&&c!==O){i=m;do{if(s=!1,-1===(i=f.indexOf(")",i+1))){if(h||t){i=m;break}y("bracket")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),l=f.slice(m,i+1),-1===i||B.test(l)?d=["(","(",m]:(d=["brackets",l,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(s=!1,-1===(i=f.indexOf(o,i+1))){if(h||t){i=m+1;break}y("string")}for(u=i;f.charCodeAt(u-1)===k;)--u,s=!s}while(s);d=["string",f.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(f),i=0===U.lastIndex?f.length-1:U.lastIndex-2,d=["at-word",f.slice(m,i+1),m,i],m=i;break;case k:for(i=m,a=!0;f.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==_&&r!==E&&r!==S&&r!==R&&r!==O&&r!==C&&(i+=1,z.test(f.charAt(i)))){for(;z.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===E&&(i+=1)}d=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===_&&f.charCodeAt(m+1)===D?(0===(i=f.indexOf("*/",m+2)+1)&&(h||t?i=f.length:y("comment")),d=["comment",f.slice(m,i+1),m,i]):(j.lastIndex=m+1,j.test(f),i=0===j.lastIndex?f.length-1:j.lastIndex-2,d=["word",f.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}}(),n=Vk(),l=Yk(),t=Xk(),r=e_(),f={empty:!0,space:!0};return Ek=k(function F(e){b(this,F),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=De(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Pe){a.e(Pe)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",f=u;0<f;f--){var h=c[f][0];if(0===d.trim().indexOf("!")&&"space"!==h)break;d=c.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,d=0;d<u;d+=1)"space"===(a=(i=n[d])[0])&&d===u-1&&!r||"comment"===a&&(a=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",f[a]||f[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function n_(){var e,n,r;return Ok||(Ok=1,e=Gk(),n=t_(),r=Hk(),Rk=t,e.registerParse(t["default"]=t)),Rk;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(D){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===D.name&&t&&t.from&&(/\.scss$/i.test(t.from)?D.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?D.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(D.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),D}return e.root}}function r_(){var d,a,n,r,u,s,i,c,l,e,o,f,h,p,t,m;return Tk||(Tk=1,t=Fk(),d=t.isClean,a=t.my,n=qk(),r=jk(),u=Gk(),s=Jk(),i=$k(),c=Kk(),l=n_(),e=Xk(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==T(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===T(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Pe){console&&console.error&&console.error(Pe)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===T(i))for(var o in i){if(!f[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===T(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Pe){n.e(Pe)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=_(H().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],g(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[d]){e.n=14;break}i[d]=!0,n=[y(i)];case 8:if(0<n.length){if(g(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=H().m(function f(){var t,n,r;return H().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=De(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},f,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(V(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return m.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===T(t)&&t.Once?"document"===this.result.root.type?g((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(g(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Pe){t.e(Pe)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[d];)r[d]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Pe){o.e(Pe)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=De(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(s))throw this.getAsyncError()}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=De(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[d])return a[d]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[d]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Pe){r.e(Pe)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},xk=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),xk;function g(e){return"object"===T(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function i_(){var n,r,t,e,i,o,a,s,u,l,c;return Pk||(Pk=1,Mk||(Mk=1,o=qk(),a=jk(),s=$k(),u=n_(),l=Kk(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=De(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(Ik=c)["default"]=c),n=Ik,r=r_(),t=Jk(),e=Xk(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===T(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===T(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==T(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Pe){r.e(Pe)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(Ak=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),Ak}mO||(mO=1,l=U1(),o_=zk(),HE=r_(),Ie=Gk(),a_=i_(),o=jk(),qE||(qE=1,f_=zk(),h_=Wk(),p_=Vk(),m_=Yk(),g_=Hk(),v_=Xk(),y_=e_(),(Lk=w_)["default"]=w_),a=Lk,s_=Jk(),e=Zk(),u_=Vk(),l_=Yk(),oR=Kk(),t=Hk(),ut=n_(),n=Qk(),c_=e_(),d_=Xk(),mO=Bk(),b_.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new a_).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return b_([i(n)]).process(e,t)},i},b_.stringify=o,b_.parse=ut,b_.fromJSON=a,b_.list=n,b_.comment=function(e){return new u_(e)},b_.atRule=function(e){return new l_(e)},b_.decl=function(e){return new o_(e)},b_.rule=function(e){return new c_(e)},b_.root=function(e){return new d_(e)},b_.document=function(e){return new s_(e)},b_.CssSyntaxError=l,b_.Declaration=o_,b_.Container=Ie,b_.Processor=a_,b_.Document=s_,b_.Comment=u_,b_.Warning=e,b_.AtRule=l_,b_.Result=oR,b_.Input=t,b_.Rule=c_,b_.Root=d_,b_.Node=mO,HE.registerPostcss(b_),(Dk=b_)["default"]=b_);var o_,a_,s_,u_,l_,c_,d_,f_,h_,p_,m_,g_,v_,y_,o=(qE=Dk)&&qE.__esModule&&Object.prototype.hasOwnProperty.call(qE,"default")?qE["default"]:qE;function w_(e,t){if(Array.isArray(e))return e.map(function(e){return w_(e)});var n,r=e.inputs,i=W(e,B0);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:g_.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:h_.prototype})),t.push(s)}}catch(Pe){a.e(Pe)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return w_(e,t)})),i.source&&(n=(r=i.source).inputId,r=W(r,z0),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new v_(i);if("decl"===i.type)return new f_(i);if("rule"===i.type)return new y_(i);if("comment"===i.type)return new p_(i);if("atrule"===i.type)return new m_(i);throw new Error("Unknown node type: "+e.type)}function b_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new a_(t)}o.stringify;var k_=k(R_,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(e){if(e instanceof R_&&e.ownerDocument===this.ownerDocument){if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),__={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},S_={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},E_={},C_={};function R_(){b(this,R_),T1(this,"parentElement",null),T1(this,"parentNode",null),T1(this,"ownerDocument"),T1(this,"firstChild",null),T1(this,"lastChild",null),T1(this,"previousSibling",null),T1(this,"nextSibling",null),T1(this,"ELEMENT_NODE",1),T1(this,"TEXT_NODE",3),T1(this,"nodeType"),T1(this,"nodeName"),T1(this,"RRNodeType")}function O_(e){if(E_[e])return E_[e];var t=globalThis[e],n=t.prototype,r=e in __?__[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in S_?S_[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return E_[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),C_[e]=function(){return s.remove()}):s.remove(),E_[e]=o):(s.remove(),n):t.prototype}catch(U){return n}}var x_={};function T_(e,t,n){var r="".concat(e,".").concat(String(n));return x_[r]?x_[r].call(t):(e=O_(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(x_[r]=e).call(t):t[n])}var I_={};function M_(e,t,n){var r="".concat(e,".").concat(String(n));return I_[r]?I_[r].bind(t):"function"!=typeof(e=O_(e)[n])?t[n]:(I_[r]=e).bind(t)}function A_(){var e;return[O_("MutationObserver").constructor,null!=(e=C_.MutationObserver)?e:function(){}]}var P_=Date.now;function L_(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(Le){return function(){}}}var D_={ownerDocument:function(e){return T_("Node",e,"ownerDocument")},childNodes:function(e){return T_("Node",e,"childNodes")},parentNode:function(e){return T_("Node",e,"parentNode")},parentElement:function(e){return T_("Node",e,"parentElement")},textContent:function(e){return T_("Node",e,"textContent")},contains:function(e,t){return M_("Node",e,"contains")(t)},getRootNode:function(e){return M_("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?T_("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?T_("Element",e,"shadowRoot"):null},querySelector:function(e,t){return T_("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return T_("Element",e,"querySelectorAll")(t)},nowTimestamp:P_=/[1-9][0-9]{12}/.test(Date.now().toString())?P_:function(){return(new Date).getTime()},mutationObserverCtor:A_,patch:L_};function N_(e,t,n){var r=2<arguments.length&&n!==undefined?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var F_="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ut={map:{},getId:function(){return console.error(F_),-1},getNode:function(){return console.error(F_),null},removeNodeFromMap:function(){console.error(F_)},has:function(){return console.error(F_),!1},reset:function(){console.error(F_)}};function U_(a,s,e){var u=2<arguments.length&&e!==undefined?e:{},l=null,c=0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Date.now(),i=(c||!1!==u.leading||(c=r),s-(r-c)),o=this;i<=0||s<i?(l&&(clearTimeout(l),l=null),c=r,a.apply(o,t)):l||!1===u.trailing||(l=setTimeout(function(){c=!1===u.leading?0:Date.now(),l=null,a.apply(o,t)},i))}}function j_(e,t,n,r,i){var i=4<arguments.length&&i!==undefined?i:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return j_(e,t,o||{},!0)}}function B_(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=D_.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=D_.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function z_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function W_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function H_(e){return e?e.nodeType===e.ELEMENT_NODE?e:D_.parentElement(e):null}function q_(e,t,n,r){if(e){e=H_(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(Mw(e,t,r))return 1}catch(Le){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function V_(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function G_(e){return Boolean(e.changedTouches)}function J_(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function $_(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Z_(e){return e&&(e instanceof k_&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(D_.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(ut,{get:function(e,t,n){return"map"===t&&console.error(F_),Reflect.get(e,t,n)}});var K_=k(function m(){b(this,m),p(this,"id",1),p(this,"styleIDMap",new WeakMap),p(this,"idStyleMap",new Map)},[{key:"getId",value:function(e){return null!=(e=this.styleIDMap.get(e))?e:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]);function Y_(e){var t,n=null;return n="getRootNode"in e&&(null==(t=D_.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D_.host(D_.getRootNode(e))?D_.host(D_.getRootNode(e)):n}function X_(e){var n,t=D_.ownerDocument(e);return t&&(D_.contains(t,e)||(n=e,!!(t=D_.ownerDocument(n))&&(e=function(){for(var e,t=n;e=Y_(t);)t=e;return t}(),D_.contains(t,e))))}(a={})[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",a[a.Asset=7]="Asset";var Q_=a,eS=((n=eS||{})[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n),tS=((l=tS||{})[l.MouseUp=0]="MouseUp",l[l.MouseDown=1]="MouseDown",l[l.Click=2]="Click",l[l.ContextMenu=3]="ContextMenu",l[l.DblClick=4]="DblClick",l[l.Focus=5]="Focus",l[l.Blur=6]="Blur",l[l.TouchStart=7]="TouchStart",l[l.TouchMove_Departed=8]="TouchMove_Departed",l[l.TouchEnd=9]="TouchEnd",l[l.TouchCancel=10]="TouchCancel",l),nS=((Ie=nS||{})[Ie.Mouse=0]="Mouse",Ie[Ie.Pen=1]="Pen",Ie[Ie.Touch=2]="Touch",Ie),rS=((e={})[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e),iS=((oR=iS||{})[oR.Play=0]="Play",oR[oR.Pause=1]="Pause",oR[oR.Seeked=2]="Seeked",oR[oR.VolumeChange=3]="VolumeChange",oR[oR.RateChange=4]="RateChange",oR),oS=((t={})[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t);function aS(e){return"__ln"in e}var sS,uS=k(function m(){b(this,m),p(this,"length",0),p(this,"head",null),p(this,"tail",null)},[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&aS(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&aS(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),lS=function(e,t){return"".concat(e,"@").concat(t)},cS=k(function m(){var w=this;b(this,m),p(this,"frozen",!1),p(this,"locked",!1),p(this,"texts",[]),p(this,"attributes",[]),p(this,"attributeMap",new WeakMap),p(this,"removes",[]),p(this,"mapRemoves",[]),p(this,"movedMap",{}),p(this,"addedSet",new Set),p(this,"movedSet",new Set),p(this,"droppedSet",new Set),p(this,"removesSubTreeCache",new Set),p(this,"mutationCb"),p(this,"blockClass"),p(this,"blockSelector"),p(this,"maskTextClass"),p(this,"maskTextSelector"),p(this,"inlineStylesheet"),p(this,"maskInputOptions"),p(this,"maskTextFn"),p(this,"maskInputFn"),p(this,"keepIframeSrcFn"),p(this,"recordCanvas"),p(this,"inlineImages"),p(this,"slimDOMOptions"),p(this,"dataURLOptions"),p(this,"doc"),p(this,"mirror"),p(this,"iframeManager"),p(this,"stylesheetManager"),p(this,"shadowDomManager"),p(this,"canvasManager"),p(this,"processedNodeManager"),p(this,"unattachedDoc"),p(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),p(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,a=new uS,s=function(e){for(var t=e,n=-2;-2===n;)n=(t=t&&t.nextSibling)&&w.mirror.getId(t);return n},e=function(t){var e=D_.parentNode(t);if(e&&X_(t)){var n=!1;if(t.nodeType===Node.TEXT_NODE){var r=e.tagName;if("TEXTAREA"===r)return;"STYLE"===r&&w.addedSet.has(e)&&(n=!0)}r=iw(e)?w.mirror.getId(Y_(t)):w.mirror.getId(e),e=s(t);if(-1===r||-1===e)return a.addNode(t);n=Nw(t,{doc:w.doc,mirror:w.mirror,blockClass:w.blockClass,blockSelector:w.blockSelector,maskTextClass:w.maskTextClass,maskTextSelector:w.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:w.inlineStylesheet,maskInputOptions:w.maskInputOptions,maskTextFn:w.maskTextFn,maskInputFn:w.maskInputFn,slimDOMOptions:w.slimDOMOptions,dataURLOptions:w.dataURLOptions,recordCanvas:w.recordCanvas,inlineImages:w.inlineImages,onSerialize:function(e){J_(e,w.mirror)&&w.iframeManager.addIframe(e),$_(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),Z_(t)&&w.shadowDomManager.addShadowRoot(D_.shadowRoot(t),w.doc)},onIframeLoad:function(e,t){w.iframeManager.attachIframe(e,t),w.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,t){w.stylesheetManager.attachLinkElement(e,t)},cssCaptured:n});n&&(i.push({parentId:r,nextId:e,node:n}),o.add(n.id))}};w.mapRemoves.length;)w.mirror.removeNodeFromMap(w.mapRemoves.shift());var t,n=Me(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;fS(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(D_.parentNode(r))||e(r)}}catch(Pe){n.e(Pe)}finally{n.f()}var u,l=Me(w.addedSet);try{for(l.s();!(u=l.n()).done;){var c=u.value;!hS(w.droppedSet,c)&&!fS(w.removesSubTreeCache,c,w.mirror)||hS(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(Pe){l.e(Pe)}finally{l.f()}for(var d=null;a.length;){var f,h,p=null;if(!(p=d&&(f=w.mirror.getId(D_.parentNode(d.value)),h=s(d.value),-1!==f)&&-1!==h?d:p))for(var m=a.tail;m;){var g=m,m=m.previous;if(g){var v=w.mirror.getId(D_.parentNode(g.value));if(-1!==s(g.value)){if(-1!==v){p=g;break}v=g.value,v=D_.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=D_.host(v);if(-1!==w.mirror.getId(v)){p=g;break}}}}}if(!p){for(;a.head;)a.removeNode(a.head.value);break}d=p.previous,a.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=D_.parentNode(t);return n&&"TEXTAREA"===n.tagName&&w.genTextAreaValueMutation(n),{id:w.mirror.getId(t),value:e.value}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),attributes:w.attributes.map(function(e){var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:w.mirror.getId(e.node),attributes:r}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),removes:w.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(w.texts=[],w.attributes=[],w.attributeMap=new WeakMap,w.removes=[],w.addedSet=new Set,w.movedSet=new Set,w.droppedSet=new Set,w.removesSubTreeCache=new Set,w.movedMap={},w.mutationCb(y))}}),p(this,"genTextAreaValueMutation",function(e){var t=w.attributeMap.get(e),n=(t||(w.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),w.attributeMap.set(e,t)),Array.from(D_.childNodes(e),function(e){return D_.textContent(e)||""}).join(""));t.attributes.value=lw({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:dw(e),value:n,maskInputFn:w.maskInputFn})}),p(this,"processMutation",function(a){if(!V_(a.target,w.mirror,w.slimDOMOptions))switch(a.type){case"characterData":var e=D_.textContent(a.target);q_(a.target,w.blockClass,w.blockSelector,!1)||e===a.oldValue||w.texts.push({value:Aw(a.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,H_(a.target)):e.replace(/[\S]/g,"*"):e,node:a.target});break;case"attributes":var t,n=a.target,e=a.attributeName,s=a.target.getAttribute(e);if("value"===e&&(t=dw(n),s=lw({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:s,maskInputFn:w.maskInputFn})),!q_(a.target,w.blockClass,w.blockSelector,!1)&&s!==a.oldValue){var r=w.attributeMap.get(a.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(s)){if(n.contentDocument)return;e="rr_src"}if(r||(r={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(r),w.attributeMap.set(a.target,r)),"type"===e&&"INPUT"===n.tagName&&"password"===(a.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Iw(n.tagName,e))if(r.attributes[e]=Tw(w.doc,cw(n.tagName),cw(e),s),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(H){w.unattachedDoc=w.doc}var i=w.unattachedDoc.createElement("span");a.oldValue&&i.setAttribute("style",a.oldValue);for(var o=0,u=Array.from(n.style);o<u.length;o++){var l=u[o],c=n.style.getPropertyValue(l),d=n.style.getPropertyPriority(l);c!==i.style.getPropertyValue(l)||d!==i.style.getPropertyPriority(l)?r.styleDiff[l]=""===d?c:[c,d]:r._unchangedStyles[l]=[c,d]}for(var f=0,h=Array.from(i.style);f<h.length;f++){var p=h[f];""===n.style.getPropertyValue(p)&&(r.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break;case"childList":return q_(a.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===a.target.tagName?void w.genTextAreaValueMutation(a.target):(a.addedNodes.forEach(function(e){return w.genAdds(e,a.target)}),void a.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=iw(a.target)?w.mirror.getId(D_.host(a.target)):w.mirror.getId(a.target);if(!q_(a.target,w.blockClass,w.blockSelector,!1)&&!V_(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))dS(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(a.target)&&-1===t||function s(e,t){var n;return!iw(e)&&(n=t.getId(e),!t.has(n)||(!(n=D_.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||s(n,t)))}(a.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[lS(t,n)])dS(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!iw(a.target)||!ow(a.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),D_.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),p(this,"genAdds",function(t,e){if(!w.processedNodeManager.inOtherBuffer(t,w)&&!w.addedSet.has(t)&&!w.movedSet.has(t)){if(w.mirror.hasNode(t)){if(V_(t,w.mirror,w.slimDOMOptions))return;w.movedSet.add(t);var n=null;(n=e&&w.mirror.hasNode(e)?w.mirror.getId(e):n)&&-1!==n&&(w.movedMap[lS(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet["delete"](t);q_(t,w.blockClass,w.blockSelector,!1)||(D_.childNodes(t).forEach(function(e){return w.genAdds(e)}),Z_(t)&&D_.childNodes(D_.shadowRoot(t)).forEach(function(e){w.processedNodeManager.add(e,w),w.genAdds(e,t)}))}})},[{key:"init",value:function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(e){n[e]=t[e]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]);function dS(t,e){t["delete"](e),D_.childNodes(e).forEach(function(e){return dS(t,e)})}function fS(e,t){return 0!==e.size&&(e=e,t=D_.parentNode(t))&&e.has(t)}function hS(e,t){return 0!==e.size&&function _(e,t){t=D_.parentNode(t);return!!t&&(!!e.has(t)||_(e,t))}(e,t)}var pS=function(e){return sS?function(){try{return e.apply(void 0,arguments)}catch(X){if(!sS||!0!==sS(X))throw X}}:e},mS=[];function gS(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(_){}return e&&e.target}function vS(e,t){var n=new cS,e=(mS.push(n),n.init(e),De(A_(),2)),r=e[0],e=e[1],n=new r(pS(n.processMutations.bind(n)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[n,e]}function yS(e){var t,r,a,s=e.mouseInteractionCb,i=e.doc,u=e.mirror,l=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],a=null,Object.keys(tS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){var o,t=cw(e),n=(o=e,function(e){var t=gS(e);if(!q_(t,l,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=nS.Mouse;break;case"touch":n=nS.Touch;break;case"pen":n=nS.Pen}n===nS.Touch?tS[o]===tS.MouseDown?r="TouchStart":tS[o]===tS.MouseUp&&(r="TouchEnd"):nS.Pen}else G_(e)&&(n=nS.Touch);null!==n?(a=n,(r.startsWith("Touch")&&n===nS.Touch||r.startsWith("Mouse")&&n===nS.Mouse)&&(n=null)):tS[o]===tS.Click&&(n=a,a=null);var i,e=G_(e)?e.changedTouches[0]:e;e&&(t=u.getId(t),i=e.clientX,e=e.clientY,pS(s)(Ae({type:tS[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}});if(window.PointerEvent)switch(tS[e]){case tS.MouseDown:case tS.MouseUp:t=t.replace("mouse","pointer");break;case tS.TouchStart:case tS.TouchEnd:return}r.push(N_(t,n,i))}),pS(function(){r.forEach(function(e){return e()})}))}function wS(e){var r=e.scrollCb,i=e.doc,o=e.mirror,a=e.blockClass,s=e.blockSelector,e=e.sampling;return N_("scroll",pS(U_(pS(function(e){var t,n,e=gS(e);e&&!q_(e,a,s,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=B_(i.defaultView),r({id:t,x:n.left,y:n.top})):r({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),i)}var bS=["INPUT","TEXTAREA","SELECT"],kS=new WeakMap;function _S(e){return function w(e,t){var n;return RS("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||RS("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||RS("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||RS("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n),w(e.parentRule,t)):(e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t)}(e,[])}function SS(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function ES(e,t){var n,r=e.mirror,i=e.stylesheetManager,o="#document"===t.nodeName?r.getId(t):r.getId(D_.host(t)),e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(r=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:r.ShadowRoot,a=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&e&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:function(){var e;return null==(e=a.get)?void 0:e.call(this)},set:function(e){var t=null==(t=a.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{i.adoptStyleSheets(e,o)}catch(n){}return t}}),pS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):function(){}}function CS(e){var t,n,D,N,F,U,j,B,z,W,H,q,V,G,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};t=r,n=(r=e).mutationCb,D=r.mousemoveCb,N=r.mouseInteractionCb,F=r.scrollCb,U=r.viewportResizeCb,j=r.inputCb,B=r.mediaInteractionCb,z=r.styleSheetRuleCb,W=r.styleDeclarationCb,H=r.canvasMutationCb,q=r.fontCb,V=r.selectionCb,G=r.customElementCb,r.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},r.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),D.apply(void 0,arguments)},r.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),N.apply(void 0,arguments)},r.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),F.apply(void 0,arguments)},r.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),U.apply(void 0,arguments)},r.inputCb=function(){t.input&&t.input.apply(t,arguments),j.apply(void 0,arguments)},r.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),B.apply(void 0,arguments)},r.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),z.apply(void 0,arguments)},r.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),W.apply(void 0,arguments)},r.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),H.apply(void 0,arguments)},r.fontCb=function(){t.font&&t.font.apply(t,arguments),q.apply(void 0,arguments)},r.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),V.apply(void 0,arguments)},r.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),G.apply(void 0,arguments)};var o,J,$,Z,K,Y,X,Q,a,ee,te,ne,re,s,u,ie,l,c,d,oe,f,h,p,m,ae,se,ue,le,g,v,y,ce,w,b,k,_,S,E,C,R,de=function(){},fe=(e.recordDOM&&(r=De(vS(e,e.doc),2),o=r[0],de=r[1]),ue=(r=e).mousemoveCb,x=r.doc,le=r.mirror,!1===(O=r.sampling).mousemove?function(){}:(r="number"==typeof O.mousemove?O.mousemove:50,O="number"==typeof O.mousemoveCallback?O.mousemoveCallback:500,m=[],ae=U_(pS(function(e){var t=Date.now()-p;ue(m.map(function(e){return e.timeOffset-=t,e}),e),m=[],p=null}),O),O=pS(U_(pS(function(e){var t=gS(e),n=G_(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;p=p||P_(),m.push({x:r,y:n,id:le.getId(t),timeOffset:P_()-p}),ae("undefined"!=typeof DragEvent&&e instanceof DragEvent?eS.Drag:e instanceof MouseEvent?eS.MouseMove:eS.TouchMove)}),r,{trailing:!1})),se=[N_("mousemove",O,x),N_("touchmove",O,x),N_("drag",O,x)],pS(function(){se.forEach(function(e){return e()})}))),he=yS(e),pe=wS(e),me=(r={win:i},oe=(O=e).viewportResizeCb,O=r.win,h=f=-1,N_("resize",pS(U_(pS(function(){var e=z_(),t=W_();f===e&&h===t||(oe({width:Number(t),height:Number(e)}),f=e,h=t)}),200)),O)),ge=(Q=(x=e).inputCb,a=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,s=x.ignoreSelector,u=x.maskInputOptions,ie=x.maskInputFn,l=x.userTriggeredOnInput,c=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return N_(e,pS(_e),a)}),(d=a.defaultView)?(x=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),r=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]],x&&x.set&&c.push.apply(c,Ne(r.map(function(e){return j_(e[0],e[1],{set:function(){pS(_e)({target:this,isTrusted:!1})}},!1,d)}))),pS(function(){c.forEach(function(e){return e()})})):function(){c.forEach(function(e){return e()})}),ve=(J=(O=e).mediaInteractionCb,$=O.blockClass,Z=O.blockSelector,K=O.mirror,Y=O.sampling,O=O.doc,x=pS(function(a){return U_(pS(function(e){var t,n,r,i,o,e=gS(e);e&&!q_(e,$,Z,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,J({type:a,id:K.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),Y.media||500)}),X=[N_("play",x(iS.Play),O),N_("pause",x(iS.Pause),O),N_("seeked",x(iS.Seeked),O),N_("volumechange",x(iS.VolumeChange),O),N_("ratechange",x(iS.RateChange),O)],pS(function(){X.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function _e(e){var t,n,r,i=gS(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?D_.parentElement(i):i)||!o||bS.indexOf(o)<0||q_(i,te,ne,!0)||i.classList.contains(re)||s&&i.matches(s)||(t=i.value,n=!1,"radio"===(r=dw(i)||"")||"checkbox"===r?n=i.checked:(u[o.toLowerCase()]||u[r])&&(t=lw({element:i,maskInputOptions:u,tagName:o,type:r,value:t,maskInputFn:ie})),Se(i,l?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&a.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,Se(e,l?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function Se(e,t){var n=kS.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(kS.set(e,t),n=ee.getId(e),pS(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=function(e,t){var s=e.styleSheetRuleCb,u=e.mirror,l=e.stylesheetManager,r=t.win;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return function(){};var n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:pS(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=SS(t,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,a=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:pS(function(e,t,n){var r=De(n,1)[0],i=SS(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:pS(function(e,t,n){var r=De(n,1)[0],i=SS(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:pS(function(e,t,n){var r=De(n,1)[0],i=SS(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),d=(OS("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(OS("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),OS("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),OS("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];d[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(d[t].insertRule,{apply:pS(function(e,t,n){var r=De(n,2),i=r[0],r=r[1],o=SS(t.parentStyleSheet,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:[].concat(Ne(_S(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:pS(function(e,t,n){var r=De(n,1)[0],i=SS(t.parentStyleSheet,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:[].concat(Ne(_S(t)),[r])}]}),e.apply(t,n)})})}),pS(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=De(e,2),t=e[0],e=e[1];e.prototype.insertRule=d[t].insertRule,e.prototype.deleteRule=d[t].deleteRule})})}(e,{win:i}),we=ES(e,e.doc),r={win:i},b=(x=e).styleDeclarationCb,k=x.mirror,_=x.ignoreCSSAttributes,S=x.stylesheetManager,E=r.win,C=E.CSSStyleDeclaration.prototype.setProperty,E.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:pS(function(e,t,n){var r,i,o=De(n,3),a=o[0],s=o[1],o=o[2];return _.has(a)?C.apply(t,[a,s,o]):(r=(i=SS(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,S.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,set:{property:a,value:s,priority:o},index:_S(t.parentRule)}),e.apply(t,n))})}),R=E.CSSStyleDeclaration.prototype.removeProperty,E.CSSStyleDeclaration.prototype.removeProperty=new Proxy(R,{apply:pS(function(e,t,n){var r,i,o=De(n,1)[0];return _.has(o)?R.apply(t,[o]):(r=(i=SS(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,S.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,remove:{property:o},index:_S(t.parentRule)}),e.apply(t,n))})}),be=pS(function(){E.CSSStyleDeclaration.prototype.setProperty=C,E.CSSStyleDeclaration.prototype.removeProperty=R}),e.collectFonts)&&(ce=(O=e).fontCb,w=(O=O.doc).defaultView,ke=w?(g=[],v=new WeakMap,y=w.FontFace,w.FontFace=function(e,t,n){var r=new y(e,t,n);return v.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},O=L_(O.fonts,"add",function(e){return function(t){return setTimeout(pS(function(){var e=v.get(t);e&&(ce(e),v["delete"](t))}),0),e.apply(this,[t])}}),g.push(function(){w.FontFace=y}),g.push(O),pS(function(){g.forEach(function(e){return e()})})):function(){});Re=(x=e).doc,T=x.mirror,I=x.blockClass,M=x.blockSelector,Oe=x.selectionCb,A=!0,(x=pS(function(){var e=Re.getSelection();if(!(!e||A&&null!=e&&e.isCollapsed)){A=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,a=i.startOffset,s=i.endContainer,i=i.endOffset;q_(o,I,M,!0)||q_(s,I,M,!0)||t.push({start:T.getId(o),startOffset:a,end:T.getId(s),endOffset:i})}Oe({ranges:t})}}))();var Ee,O,Ce,x,Re,T,I,M,Oe,A,xe=N_("selectionchange",x),Te=(O=(r=e).doc,Ce=r.customElementCb,(r=O.defaultView)&&r.customElements?L_(r.customElements,"define",function(r){return function(e,t,n){try{Ce({define:{name:e}})}catch(Le){console.warn("Custom element callback failed for ".concat(e))}return r.apply(this,[e,t,n])}}):function(){}),Ie=[],P=Me(e.plugins);try{for(P.s();!(Ee=P.n()).done;){var L=Ee.value;Ie.push(L.observer(L.callback,i,L.options))}}catch(Pe){P.e(Pe)}finally{P.f()}return pS(function(){mS.forEach(function(e){return e.reset()}),null!=o&&o.disconnect(),de(),fe(),he(),pe(),me(),ge(),ve(),ye(),we(),be(),ke(),xe(),Te(),Ie.forEach(function(e){return e()})})}function RS(e){return"undefined"!=typeof window[e]}function OS(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var xS=k(function m(e){b(this,m),p(this,"iframeIdToRemoteIdMap",new WeakMap),p(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e},[{key:"getId",value:function(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e),e=n.get(t);return e||(e=this.generateIdFn(),n.set(t,e),r.set(e,t)),e}},{key:"getIds",value:function(t,e){var n=this,r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getId(t,e,r,i)})}},{key:"getRemoteId",value:function(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}},{key:"getRemoteIds",value:function(t,e){var n=this,r=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getRemoteId(t,e,r)})}},{key:"reset",value:function(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),TS=k(function m(e){b(this,m),p(this,"iframes",new WeakMap),p(this,"crossOriginIframeMap",new WeakMap),p(this,"crossOriginIframeMirror",new xS(Sw)),p(this,"crossOriginIframeStyleMirror"),p(this,"crossOriginIframeRootIdMap",new WeakMap),p(this,"mirror"),p(this,"mutationCb"),p(this,"wrappedEmit"),p(this,"loadListener"),p(this,"stylesheetManager"),p(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xS(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))},[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=this.crossOriginIframeMap.get(e.source))&&(e=this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}},{key:"transformCrossOriginEvent",value:function(n,e){var t,r=this;switch(e.type){case Q_.FullSnapshot:this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:Q_.IncrementalSnapshot,data:{source:eS.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Q_.Meta:case Q_.Load:case Q_.DomContentLoaded:return!1;case Q_.Plugin:return e;case Q_.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case Q_.IncrementalSnapshot:switch(e.data.source){case eS.Mutation:return e.data.adds.forEach(function(e){r.replaceIds(e,n,["parentId","nextId","previousId"]),r.replaceIdOnNode(e.node,n);var t=r.crossOriginIframeRootIdMap.get(n);t&&r.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(function(e){r.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(function(e){r.replaceIds(e,n,["id"])}),e.data.texts.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case eS.Drag:case eS.TouchMove:case eS.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case eS.ViewportResize:return!1;case eS.MediaInteraction:case eS.MouseInteraction:case eS.Scroll:case eS.CanvasMutation:case eS.Input:return this.replaceIds(e.data,n,["id"]),e;case eS.StyleSheetRule:case eS.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case eS.Font:return e;case eS.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case eS.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(function(e){r.replaceStyleIds(e,n,["styleId"])}),e}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=Me(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(Pe){o.e(Pe)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===oS.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),IS=k(function m(e){b(this,m),p(this,"shadowDoms",new WeakSet),p(this,"mutationCb"),p(this,"scrollCb"),p(this,"bypassOptions"),p(this,"mirror"),p(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;ow(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=De(vS(Ae(Ae({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),1)[0],this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(wS(Ae(Ae({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(D_.host(e))),r.restoreHandlers.push(ES({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0))}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,r){var i=this;this.restoreHandlers.push(L_(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=D_.shadowRoot(this);return t&&X_(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(w){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),MS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",AS="undefined"==typeof Uint8Array?[]:new Uint8Array(256),PS=0;PS<MS.length;PS++)AS[MS.charCodeAt(PS)]=PS;var LS=new Map,DS=function(e,t,n){var r;if(e&&(FS(e,t)||"object"===T(e)))return t=n,n=e.constructor.name,(r=LS.get(t))||(r=new Map,LS.set(t,r)),r.has(n)||r.set(n,[]),-1===(n=(t=r.get(n)).indexOf(e))&&(n=t.length,t.push(e)),n};var NS=function(e,t,n){return e.map(function(e){return function r(i,t,n){return i instanceof Array?i.map(function(e){return r(e,t,n)}):null===i?i:i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray?{rr_type:i.constructor.name,args:[Object.values(i)]}:i instanceof ArrayBuffer?{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=MS[e[r]>>2])+MS[(3&e[r])<<4|e[r+1]>>4])+MS[(15&e[r+1])<<2|e[r+2]>>6])+MS[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()}:i instanceof DataView?{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]}:i instanceof HTMLImageElement?{rr_type:i.constructor.name,src:i.src}:i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:FS(i,t)||"object"===T(i)?{rr_type:i.constructor.name,index:DS(i,t,n)}:i}(e,t,n)})},FS=function(t,n){var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof n[e]});return Boolean(e.find(function(e){return t instanceof n[e]}))};function US(e,a,s,u){var t=[];try{var n=L_(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return q_(this,a,s,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),u&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===T(r[0])?(t=r[0]).preserveDrawingBuffer||(t.preserveDrawingBuffer=!0):r.splice(0,1,{preserveDrawingBuffer:!0}))),o.apply(this,[e].concat(r))}});t.push(n)}catch(D){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function jS(t,s,u,l,c,d){var n,r=[],e=Me(Object.getOwnPropertyNames(t));try{for(e.s();!(n=e.n()).done;)!function(){var a=n.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return;try{if("function"!=typeof t[a])return;var e=L_(t,a,function(o){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=o.apply(this,t);return DS(i,d,this),"tagName"in this.canvas&&!q_(this.canvas,l,c,!0)&&(r=NS(t,d,this),u(this.canvas,{type:s,property:a,args:r})),i}});r.push(e)}catch(U){e=j_(t,a,{set:function(e){u(this.canvas,{type:s,property:a,args:[e],setter:!0})}});r.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return r}var BS='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',zS="undefined"!=typeof self&&self.Blob&&new Blob([BS],{type:"text/javascript;charset=utf-8"});function WS(e){var t,n;try{if(t=zS&&(self.URL||self.webkitURL).createObjectURL(zS))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(u){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(BS),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var HS,qS,VS,GS=k(function m(e){var n=this,t=(b(this,m),p(this,"pendingCanvasMutations",new Map),p(this,"rafStamps",{latestId:0,invokeId:null}),p(this,"mirror"),p(this,"mutationCb"),p(this,"resetObservers"),p(this,"frozen",!1),p(this,"locked",!1),p(this,"processMutation",function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)}),e.sampling),t=void 0===t?"all":t,r=e.win,i=e.blockClass,o=e.blockSelector,a=e.recordCanvas,s=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,i,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:s})},[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,o,r,i,a){var s=this,t=US(o,r,i,!0),u=new Map,l=new WS;l.onmessage=function(e){var t,n=e.data.id;u.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,s.mutationCb({id:n,type:rS["2D"],commands:[{property:"clearRect",args:[0,0,e.width,e.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e.type}]},0,0]}]}))};var c=1e3/e,d=0,f=function(e){var t,n;h=(d&&e-d<c||(d=e,t=[],o.document.querySelectorAll("canvas").forEach(function(e){q_(e,r,i,!0)||t.push(e)}),t.forEach((n=_(H().m(function o(t){var n,r,i;return H().w(function(e){for(;;)switch(e.n){case 0:if(n=s.mirror.getId(t),u.get(n))return e.a(2);e.n=1;break;case 1:if(0===t.width||0===t.height)return e.a(2);e.n=2;break;case 2:return u.set(n,!0),["webgl","webgl2"].includes(t.__context)&&(r=t.getContext(t.__context),!1===(null==(i=null==r?void 0:r.getContextAttributes())?void 0:i.preserveDrawingBuffer))&&r.clear(r.COLOR_BUFFER_BIT),e.n=3,createImageBitmap(t);case 3:i=e.v,l.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:a.dataURLOptions},[i]);case 4:return e.a(2)}},o)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(f))},h=requestAnimationFrame(f);this.resetObservers=function(){t(),cancelAnimationFrame(h)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=US(e,t,n,!1),a=function(a,s,u,l){var t,n=[],e=Me(Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype));try{for(e.s();!(t=e.n()).done;)!function(){var o=t.value;try{if("function"!=typeof s.CanvasRenderingContext2D.prototype[o])return;var e=L_(s.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return q_(this.canvas,u,l,!0)||setTimeout(function(){var e=NS(n,s,t);a(t.canvas,{type:rS["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(e)}catch(N){e=j_(s.CanvasRenderingContext2D.prototype,o,{set:function(e){a(this.canvas,{type:rS["2D"],property:o,args:[e],setter:!0})}});n.push(e)}}()}catch(Pe){e.e(Pe)}finally{e.f()}return function(){n.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),s=(r=this.processMutation.bind(this),t=t,n=n,i=[],"undefined"!=typeof(e=e).WebGLRenderingContext&&i.push.apply(i,Ne(jS(e.WebGLRenderingContext.prototype,rS.WebGL,r,t,n,e))),"undefined"!=typeof e.WebGL2RenderingContext&&i.push.apply(i,Ne(jS(e.WebGL2RenderingContext.prototype,rS.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),a(),s()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var t=this,n=function(e){t.rafStamps.latestId=e,requestAnimationFrame(n)};requestAnimationFrame(n)}},{key:"flushPendingCanvasMutations",value:function(){var r=this;this.pendingCanvasMutations.forEach(function(e,t){var n=r.mirror.getId(t);r.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(function(){return r.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(function(e){return e.type,W(e,W0)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}]),JS=k(function m(e){b(this,m),p(this,"trackedLinkElements",new WeakSet),p(this,"mutationCb"),p(this,"adoptedStyleSheetCb"),p(this,"styleMirror",new K_),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb},[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){var r=this;if(0!==e.length){var i,o={id:t,styleIds:[]},a=[],n=Me(e);try{for(n.s();!(i=n.n()).done;)!function(){var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),a.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:sw(e,n.href),index:t}})})),o.styleIds.push(e)}()}catch(Pe){n.e(Pe)}finally{n.f()}0<a.length&&(o.styles=a),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),$S=k(function m(){b(this,m),p(this,"nodeMap",new WeakMap),p(this,"active",!1)},[{key:"inOtherBuffer",value:function(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),ZS=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(eO=document.createElement("iframe"),document.body.appendChild(eO),Array.from=(null==(F0=eO.contentWindow)?void 0:F0.Array.from)||Array.from,document.body.removeChild(eO))}catch(Pe){console.debug("Unable to override Array.from",Pe)}var KS,YS=new uw;function XS(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,u=void 0===t?"rr-block":t,t=e.blockSelector,l=void 0===t?null:t,t=e.ignoreClass,D=void 0===t?"rr-ignore":t,t=e.ignoreSelector,N=void 0===t?null:t,t=e.maskTextClass,c=void 0===t?"rr-mask":t,t=e.maskTextSelector,d=void 0===t?null:t,t=e.inlineStylesheet,f=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,h=e.maskInputFn,p=e.maskTextFn,U=e.hooks,j=e.packFn,a=e.sampling,s=void 0===a?{}:a,a=e.dataURLOptions,m=void 0===a?{}:a,a=e.mousemoveWait,g=e.recordDOM,B=void 0===g||g,g=e.recordCanvas,v=void 0!==g&&g,g=e.recordCrossOriginIframes,g=void 0!==g&&g,y=e.recordAfter,z=void 0===y?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":y,y=e.userTriggeredOnInput,W=void 0!==y&&y,y=e.collectFonts,H=void 0!==y&&y,y=e.inlineImages,w=void 0!==y&&y,b=e.plugins,y=e.keepIframeSrcFn,k=void 0===y?function(){return!1}:y,y=e.ignoreCSSAttributes,q=void 0===y?new Set([]):y,_=(sS=e.errorHandler,!g||window.parent===window),S=!1;if(!_)try{window.parent.document&&(S=!1)}catch(Oe){S=!0}if(_&&!r)throw new Error("emit function is required");if(!_&&!S)return function(){};void 0!==a&&void 0===s.mousemove&&(s.mousemove=a),YS.reset();var V,E=!0===t?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==n?n:{password:!0},C=Dw(F),R=(!function(e){"NodeList"in(e=0<arguments.length&&e!==undefined?e:window)&&!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)}(),0),G=function(e){var t,n=Me(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(Pe){n.e(Pe)}finally{n.f()}return e=j&&!S?j(e):e};HS=function(e,t){var n;e.timestamp=P_(),null==(n=mS[0])||!n.isFrozen()||e.type===Q_.FullSnapshot||e.type===Q_.IncrementalSnapshot&&e.data.source===eS.Mutation||mS.forEach(function(e){return e.unfreeze()}),_?null!=r&&r(G(e),t):S&&(n={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(n,"*")),e.type===Q_.FullSnapshot?(V=e,R=0):e.type!==Q_.IncrementalSnapshot||e.data.source===eS.Mutation&&e.data.isAttachIframe||(R++,t=o&&o<=R,n=i&&e.timestamp-V.timestamp>i,(t||n)&&qS(!0))};var J,O=function(e){HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.Mutation},e)})},$=function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.Scroll},e)})},Z=function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.CanvasMutation},e)})},x=new JS({mutationCb:O,adoptedStyleSheetCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.AdoptedStyleSheet},e)})}}),T=new TS({mirror:YS,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:g,wrappedEmit:HS}),I=Me(b||[]);try{for(I.s();!(J=I.n()).done;){var K=J.value;K.getMirror&&K.getMirror({nodeMirror:YS,crossOriginIframeMirror:T.crossOriginIframeMirror,crossOriginIframeStyleMirror:T.crossOriginIframeStyleMirror})}}catch(Pe){I.e(Pe)}finally{I.f()}var M=new $S,A=(VS=new GS({recordCanvas:v,mutationCb:Z,win:window,blockClass:u,blockSelector:l,mirror:YS,sampling:s.canvas,dataURLOptions:m}),new IS({mutationCb:O,scrollCb:$,bypassOptions:{blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskInputOptions:E,dataURLOptions:m,maskTextFn:p,maskInputFn:h,recordCanvas:v,inlineImages:w,sampling:s,slimDOMOptions:C,iframeManager:T,stylesheetManager:x,canvasManager:VS,keepIframeSrcFn:k,processedNodeManager:M},mirror:YS}));qS=function(){var e,t,n,r,i,o,a=0<arguments.length&&arguments[0]!==undefined&&arguments[0];if(B){HS({type:Q_.Meta,data:{href:window.location.href,width:W_(),height:z_()}},a),x.reset(),A.init(),mS.forEach(function(e){return e.lock()});s=document,r=void 0===(r=(e={mirror:YS,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:f,maskAllInputs:E,maskTextFn:p,maskInputFn:h,slimDOM:C,dataURLOptions:m,recordCanvas:v,inlineImages:w,onSerialize:function(e){J_(e,YS)&&T.addIframe(e),$_(e,YS)&&x.trackLinkElement(e),Z_(e)&&A.addShadowRoot(D_.shadowRoot(e),document)},onIframeLoad:function(e,t){T.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:function(e,t){x.attachLinkElement(e,t)},keepIframeSrcFn:k}).mirror)?new uw:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var s=Nw(s,{doc:s,mirror:r,blockClass:void 0===(s=e.blockClass)?"rr-block":s,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(s=e.maskTextClass)?"rr-mask":s,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(s=e.inlineStylesheet)||s,maskInputOptions:!0===(r=void 0!==(r=e.maskAllInputs)&&r)?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:Dw(void 0!==i&&i),dataURLOptions:e.dataURLOptions,inlineImages:void 0!==t&&t,recordCanvas:void 0!==n&&n,preserveWhiteSpace:e.preserveWhiteSpace,onSerialize:e.onSerialize,onIframeLoad:e.onIframeLoad,iframeLoadTimeout:e.iframeLoadTimeout,onStylesheetLoad:e.onStylesheetLoad,stylesheetLoadTimeout:e.stylesheetLoadTimeout,keepIframeSrcFn:void 0===o?function(){return!1}:o,newlyAddedElement:!1});if(!s)return console.warn("Failed to snapshot the document");HS({type:Q_.FullSnapshot,data:{node:s,initialOffset:B_(window)}},a),mS.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,YS.getId(document))}};try{var P=[],Y=function(e){return pS(CS)({mutationCb:O,mousemoveCb:function(e,t){return HS({type:Q_.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.MouseInteraction},e)})},scrollCb:$,viewportResizeCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.ViewportResize},e)})},inputCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.Input},e)})},mediaInteractionCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.StyleDeclaration},e)})},canvasMutationCb:Z,fontCb:function(e){return HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.Font},e)})},selectionCb:function(e){HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.Selection},e)})},customElementCb:function(e){HS({type:Q_.IncrementalSnapshot,data:Ae({source:eS.CustomElement},e)})},blockClass:u,ignoreClass:D,ignoreSelector:N,maskTextClass:c,maskTextSelector:d,maskInputOptions:E,inlineStylesheet:f,sampling:s,recordDOM:B,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:C,dataURLOptions:m,mirror:YS,iframeManager:T,stylesheetManager:x,shadowDomManager:A,processedNodeManager:M,canvasManager:VS,ignoreCSSAttributes:q,plugins:(null==(e=null==b?void 0:b.filter(function(e){return e.observer}))?void 0:e.map(function(t){return{observer:t.observer,options:t.options,callback:function(e){return HS({type:Q_.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},L=(T.addLoadListener(function(e){try{P.push(Y(e.contentDocument))}catch(X){console.warn(X)}}),function(){qS(),P.push(Y(document)),ZS=!0});return["interactive","complete"].includes(document.readyState)?L():(P.push(N_("DOMContentLoaded",function(){HS({type:Q_.DomContentLoaded,data:{}}),"DOMContentLoaded"===z&&L()})),P.push(N_("load",function(){HS({type:Q_.Load,data:{}}),"load"===z&&L()},window))),function(){P.forEach(function(e){try{e()}catch(X){String(X).toLowerCase().includes("cross-origin")||console.warn(X)}}),M.destroy(),ZS=!1,sS=void 0}}catch(X){console.warn(X)}}XS.addCustomEvent=function(e,t){if(!ZS)throw new Error("please add custom event after start recording");HS({type:Q_.Custom,data:{tag:e,payload:t}})},XS.freezePage=function(){mS.forEach(function(e){return e.freeze()})},XS.takeFullSnapshot=function(e){if(!ZS)throw new Error("please take full snapshot after start recording");qS(e)},XS.mirror=YS,(mO=KS=KS||{})[mO.NotStarted=0]="NotStarted",mO[mO.Running=1]="Running",mO[mO.Stopped=2]="Stopped";var QS='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',eE={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},tE=(nE.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},nE.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},nE.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},nE.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},nE.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},nE.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},nE.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},nE.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,nE.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,nE.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,nE.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,nE.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,nE);function nE(){}function rE(e,t){return void 0===e&&(e={}),A(A(A({},t=void 0===t?eE:t),e),{mask:iE(t.mask,e.mask),block:iE(t.block,e.block),ignore:iE(t.ignore,e.ignore),maskInputOptions:A(A({},t.maskInputOptions),e.maskInputOptions)})}function iE(e,t){e=new Set(_l(e||[],t||[]));return Array.from(e)}cE.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},cE.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},cE.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},cE.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},cE.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},cE.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},cE.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var a=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var s=this,u=0,l=null!=(t=e.removes)?t:[];u<l.length;u++)!function(t){var e=(null!=(n=a.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(a.adds.splice(e,1),s.cancelledByOffset++):(a.removes=null!=(n=a.removes)?n:[],a.removes.push(t))}(l[u]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var f=d[c];a.adds=null!=(r=a.adds)?r:[],a.adds.push(f)}for(var h=0,p=null!=(t=e.attributes)?t:[];h<p.length;h++)!function(t){a.attributes=null!=(i=a.attributes)?i:[];var e=a.attributes.findIndex(function(e){return e.id===t.id});0<=e?a.attributes[e]=t:a.attributes.push(t)}(p[h]);for(var m=0,g=null!=(t=e.texts)?t:[];m<g.length;m++)!function(t){a.texts=null!=(o=a.texts)?o:[];var e=a.texts.findIndex(function(e){return e.id===t.id});0<=e?a.texts[e]=t:a.texts.push(t)}(g[m])}},cE.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:_l(null!=(e=t.adds)?e:[]),removes:_l(null!=(e=t.removes)?e:[]),attributes:_l(null!=(e=t.attributes)?e:[]),texts:_l(null!=(e=t.texts)?e:[])}}},cE.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},cE.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var oE=cE,aE=(lE.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,a=rE(e.privacy||{},eE),s=A(A(A(A({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!d.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=a).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(s=o.mask)&&s.length&&(t.maskTextSelector=o.mask.join(",")),null!=(s=o.block)&&s.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+QS:QS,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(s=o.ignore)&&s.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=tE.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=XS(s),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),h("RecorderManager","Recording started with config:",{maskAllText:a.maskAllText,maskAllInputs:a.maskAllInputs,autoDetectSensitiveData:a.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(X){y0("RecorderManager","Failed to start recording:",X),this.state="stopped"}}else v0("RecorderManager","Already recording")},lE.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",h("RecorderManager","Recording stopped")},lE.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",h("RecorderManager","Recording paused"))},lE.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),h("RecorderManager","Recording resumed"))},lE.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},g0("RecorderManager","MutationObserver hooked"))}catch(Pe){v0("RecorderManager","Failed to hook MutationObserver:",Pe)}},lE.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,g0("RecorderManager","MutationObserver restored"))},lE.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,y0("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},lE.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(y0("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},lE.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=XS.addCustomEvent)&&n.call(XS,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(b){}},lE.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=XS.takeFullSnapshot;"function"==typeof o&&(o(!0),g0("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(Pe){v0("RecorderManager","Inline checkpoint failed:",Pe)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},lE.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,v0("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=XS.addCustomEvent)&&e.call(XS,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(u){}}return!1}return!0},lE.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=XS.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),g0("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(Pe){v0("RecorderManager","Checkpoint FullSnapshot failed:",Pe)}},12e4)},lE.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},lE.prototype.getState=function(){return this.state},lE.prototype.isRecording=function(){return"recording"===this.state},lE.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},lE.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},lE.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},lE),sE=(uE.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,h("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,h("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,h("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},uE.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},uE.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},uE.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,h("SamplerManager","Mode switched: "+t+" -> "+e)},uE.prototype.getCurrentMode=function(){return this.currentMode},uE.prototype.isSampled=function(){return!0===this.samplingDecision},uE.prototype.isSessionMode=function(){return"session"===this.currentMode},uE.prototype.isBufferMode=function(){return"buffer"===this.currentMode},uE.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",h("SamplerManager","Upgraded to session mode due to error"),!0)},uE.prototype.updateRates=function(e,t){"number"==typeof e&&(this.config.sessionSampleRate=e),"number"==typeof t&&(this.config.errorSampleRate=t)},uE.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},uE.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},uE.prototype.getConfig=function(){return A({},this.config)},uE);function uE(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function lE(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new oE({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function cE(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function dE(e){for(var t=e.length;0<=--t;)e[t]=0}var fE=new Uint8Array([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]),hE=new Uint8Array([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]),pE=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),mE=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),gE=new Array(576),vE=(dE(gE),new Array(60)),yE=(dE(vE),new Array(512)),wE=(dE(yE),new Array(256)),bE=(dE(wE),new Array(29));dE(bE);var kE,_E,SE,EE=new Array(30);function CE(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function RE(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}dE(EE);var OE=function(e){return e<256?yE[e]:yE[256+(e>>>7)]},xE=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},TE=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,xE(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},IE=function(e,t,n){TE(e,n[2*t],n[2*t+1])},ME=function(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},AE=function(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=ME(i[s]++,s))}},PE=function(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},LE=function(e){8<e.bi_valid?xE(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},DE=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},NE=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&DE(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!DE(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},FE=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0==r?IE(e,i,t):(o=wE[i],IE(e,o+256+1,t),0!==(a=fE[o])&&(i-=bE[o],TE(e,i,a)),o=OE(--r),IE(e,o,n),0!==(a=hE[o])&&(r-=EE[o],TE(e,r,a))),s<e.sym_next;);IE(e,256,t)},UE=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)NE(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],NE(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,NE(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,d,f,h,p,m=e,g=t.dyn_tree,v=t.max_code,y=t.stat_desc.static_tree,w=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,k=t.stat_desc.extra_base,_=t.stat_desc.max_length,S=0,E=0;E<=15;E++)m.bl_count[E]=0;for(g[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(E=g[2*g[2*(d=m.heap[c])+1]+1]+1)>_&&(E=_,S++),g[2*d+1]=E,v<d||(m.bl_count[E]++,h=0,k<=d&&(h=b[d-k]),p=g[2*d],m.opt_len+=p*(E+h),w&&(m.static_len+=p*(y[2*d+1]+h)));if(0!==S){do{for(E=_-1;0===m.bl_count[E];)E--}while(m.bl_count[E]--,m.bl_count[E+1]+=2,m.bl_count[_]--,0<(S-=2));for(E=_;0!==E;E--)for(d=m.bl_count[E];0!==d;)(f=m.heap[--c])>v||(g[2*f+1]!==E&&(m.opt_len+=(E-g[2*f+1])*g[2*f],g[2*f+1]=E),d--)}AE(o,l,e.bl_count)},jE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))},BE=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)for(;IE(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(IE(e,i,e.bl_tree),s--),IE(e,16,e.bl_tree),TE(e,s-3,2)):s<=10?(IE(e,17,e.bl_tree),TE(e,s-3,3)):(IE(e,18,e.bl_tree),TE(e,s-11,7));o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}},zE=!1,WE=function(e,t,n,r){TE(e,0+(r?1:0),3),LE(e),xE(e,n),xE(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},HE=function(e){if(!zE){for(var t,n,r,i=new Array(16),o=0,a=0;a<28;a++)for(bE[a]=o,t=0;t<1<<fE[a];t++)wE[o++]=a;for(wE[o-1]=a,a=r=0;a<16;a++)for(EE[a]=r,t=0;t<1<<hE[a];t++)yE[r++]=a;for(r>>=7;a<30;a++)for(EE[a]=r<<7,t=0;t<1<<hE[a]-7;t++)yE[256+r++]=a;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)gE[2*t+1]=8,t++,i[8]++;for(;t<=255;)gE[2*t+1]=9,t++,i[9]++;for(;t<=279;)gE[2*t+1]=7,t++,i[7]++;for(;t<=287;)gE[2*t+1]=8,t++,i[8]++;for(AE(gE,287,i),t=0;t<30;t++)vE[2*t+1]=5,vE[2*t]=ME(t,5);kE=new CE(gE,fE,257,286,15),_E=new CE(vE,hE,0,30,15),SE=new CE(new Array(0),pE,0,19,7),zE=!0}e.l_desc=new RE(e.dyn_ltree,kE),e.d_desc=new RE(e.dyn_dtree,_E),e.bl_desc=new RE(e.bl_tree,SE),e.bi_buf=0,e.bi_valid=0,PE(e)},qE=WE,o=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),UE(e,e.l_desc),UE(e,e.d_desc),s=function(e){var t;for(jE(e,e.dyn_ltree,e.l_desc.max_code),jE(e,e.dyn_dtree,e.d_desc.max_code),UE(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*mE[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(o=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)WE(e,t,n,r);else if(4===e.strategy||o===i)TE(e,2+(r?1:0),3),FE(e,gE,vE);else{TE(e,4+(r?1:0),3);var u=e,l=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(TE(u,t-257,5),TE(u,n-1,5),TE(u,l-4,4),a=0;a<l;a++)TE(u,u.bl_tree[2*mE[a]+1],3);BE(u,u.dyn_ltree,t-1),BE(u,u.dyn_dtree,n-1),FE(e,e.dyn_ltree,e.dyn_dtree)}PE(e),r&&LE(e)},ut=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(wE[n]+256+1)]++,e.dyn_dtree[2*OE(t)]++),e.sym_next===e.sym_end},a=function(e){TE(e,2,3),IE(e,256,gE),16===(e=e).bi_valid?(xE(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},VE=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0},GE=new Uint32Array(function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}()),JE=function(e,t,n,r){var i=GE,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},$E={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},n={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},ZE=HE,KE=qE,YE=o,XE=ut,QE=a,eC=n.Z_NO_FLUSH,tC=n.Z_PARTIAL_FLUSH,nC=n.Z_FULL_FLUSH,rC=n.Z_FINISH,iC=n.Z_BLOCK,oC=n.Z_OK,aC=n.Z_STREAM_END,sC=n.Z_STREAM_ERROR,uC=n.Z_DATA_ERROR,lC=n.Z_BUF_ERROR,cC=n.Z_DEFAULT_COMPRESSION,dC=n.Z_FILTERED,fC=n.Z_HUFFMAN_ONLY,hC=n.Z_RLE,pC=n.Z_FIXED,mC=n.Z_UNKNOWN,gC=n.Z_DEFLATED,Pe=function(e,t){return e.msg=$E[t],t},vC=function(e){return 2*e-(4<e?9:0)},yC=function(e){for(var t=e.length;0<=--t;)e[t]=0},wC=function(e){for(var t,n,r=e.w_size,i=t=e.hash_size;n=e.head[--i],e.head[i]=r<=n?n-r:0,--t;);for(i=t=r;n=e.prev[--i],e.prev[i]=r<=n?n-r:0,--t;);},bC=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},kC=function(e,t){n=e.legacy_hash?e.ins_h=bC(e,e.ins_h,e.window[t+3-1]):(n=(n=e.window)[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,e.ins_h=Math.imul(n,66521)+66521>>>16&e.hash_mask);var n,r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},_C=function(e){var t=e.state,n=t.pending;0!==(n=e.avail_out<n?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},SC=function(e,t){YE(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_C(e.strm)},EC=function(e,t){e.pending_buf[e.pending++]=t},CC=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},RC=function(e,t,n,r){var i=e.avail_in;return 0===(i=r<i?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=VE(e.adler,t,i,n):2===e.state.wrap&&(e.adler=JE(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},OC=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,d=e.prev,f=e.strstart+258,h=l[o+a-1],p=l[o+a];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){for(o+=2,n++;l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<f;);if(r=258-(f-o),o=f-258,a<r){if(e.match_start=t,s<=(a=r))break;h=l[o+a-1],p=l[o+a]}}}while((t=d[t&c])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},xC=function(e){var t,n,r=e.w_size;do{if(t=e.window_size-e.lookahead-e.strstart,r+(r-262)<=e.strstart&&(e.window.set(e.window.subarray(r,r+r-t),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.strstart<e.insert&&(e.insert=e.strstart),wC(e),t+=r),0===e.strm.avail_in)break;if(t=RC(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,e.legacy_hash){if(3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=bC(e,e.ins_h,e.window[n+1]);e.insert&&(kC(e,n),n++,e.insert--,!(e.lookahead+e.insert<3)););}else if(3<e.lookahead+e.insert)for(n=e.strstart-e.insert;e.insert&&(kC(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},TC=function(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(n=(i=e.strm.avail_out-i)<(n=n>(r=e.strstart-e.block_start)+e.strm.avail_in?r+e.strm.avail_in:n)?i:n)<o&&(0===n&&t!==rC||t===eC||n!==r+e.strm.avail_in)||(a=t===rC&&n===r+e.strm.avail_in?1:0,KE(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,_C(e.strm),r&&(n<r&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(RC(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==a)););return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=e.w_size-e.insert<s?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==eC&&t!==rC&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(RC(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=e.w_size-e.insert<i?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),o=(i=65535<e.pending_buf_size-(i=e.bi_valid+42>>3)?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===rC)&&t!==eC&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,a=t===rC&&0===e.strm.avail_in&&n===r?1:0,KE(e,e.block_start,n,a),e.block_start+=n,_C(e.strm)),a?3:1)},l=function(e,t){for(var n,r;;){if(e.lookahead<262){if(xC(e),e.lookahead<262&&t===eC)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?kC(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=OC(e,n)),3<=e.match_length)if(r=XE(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,n=kC(e,e.strstart),0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=bC(e,e.ins_h,e.window[e.strstart+1]));else r=XE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(SC(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===rC?(SC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(SC(e,!1),0===e.strm.avail_out)?1:2},Ie=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(xC(e),e.lookahead<262&&t===eC)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=kC(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=OC(e,n),e.match_length<=5)&&(e.strategy===dC||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=XE(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(n=kC(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(SC(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=XE(e,0,e.window[e.strstart-1]))&&SC(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=XE(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===rC?(SC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(SC(e,!1),0===e.strm.avail_out)?1:2};function IC(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var MC=[new IC(0,0,0,0,TC),new IC(4,4,8,4,l),new IC(4,5,16,8,l),new IC(4,6,32,32,l),new IC(4,4,16,16,Ie),new IC(8,16,32,32,Ie),new IC(8,16,128,128,Ie),new IC(8,32,128,256,Ie),new IC(32,128,258,1024,Ie),new IC(32,258,258,4096,Ie)];function AC(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=gC,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),yC(this.dyn_ltree),yC(this.dyn_dtree),yC(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),yC(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),yC(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var PC=function(e){var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},LC=function(e){if(PC(e))return Pe(e,sC);e.total_in=e.total_out=0,e.data_type=mC;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,ZE(t),oC},DC=function(e){var t=LC(e);return t===oC&&((e=e.state).window_size=2*e.w_size,yC(e.head),e.max_lazy_match=MC[e.level].max_lazy,e.good_match=MC[e.level].good_length,e.nice_match=MC[e.level].nice_length,e.max_chain_length=MC[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t},e=function(e,t,n,r,i,o,a){if(!e)return sC;var s=1;if(t===cC&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==gC||r<8||15<r||t<0||9<t||o<0||pC<o||8===r&&1!==s)return Pe(e,sC);8===r&&(r=9);var u=new AC;return(e.state=u).strm=e,u.status=42,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=a?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=3*(u.lit_bufsize-1),u.level=t,u.strategy=o,u.method=n,DC(e)},NC=e,FC=function(e,t){return PC(e)||2!==e.state.wrap?sC:(e.state.gzhead=t,oC)},UC=function(e,t){if(PC(e)||iC<t||t<0)return e?Pe(e,sC):sC;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==rC)return Pe(e,0===e.avail_out?lC:sC);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(_C(e),0===e.avail_out)return n.last_flush=-1,oC}else if(0===e.avail_in&&vC(t)<=vC(r)&&t!==rC)return Pe(e,lC);if(666===n.status&&0!==e.avail_in)return Pe(e,lC);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=gC+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=fC||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),CC(n,r+=31-r%31),0!==n.strstart&&(CC(n,e.adler>>>16),CC(n,65535&e.adler)),e.adler=1,n.status=113,_C(e),0!==n.pending)return n.last_flush=-1,oC}if(57===n.status)if(e.adler=0,EC(n,31),EC(n,139),EC(n,8),n.gzhead)EC(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),EC(n,255&n.gzhead.time),EC(n,n.gzhead.time>>8&255),EC(n,n.gzhead.time>>16&255),EC(n,n.gzhead.time>>24&255),EC(n,9===n.level?2:n.strategy>=fC||n.level<2?4:0),EC(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(EC(n,255&n.gzhead.extra.length),EC(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=JE(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(EC(n,0),EC(n,0),EC(n,0),EC(n,0),EC(n,0),EC(n,9===n.level?2:n.strategy>=fC||n.level<2?4:0),EC(n,3),n.status=113,_C(e),0!==n.pending)return n.last_flush=-1,oC;if(69===n.status){if(n.gzhead.extra){for(var i=n.pending,o=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+o>n.pending_buf_size;){var a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=JE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,_C(e),0!==n.pending)return n.last_flush=-1,oC;i=0,o-=a}r=new Uint8Array(n.gzhead.extra);n.pending_buf.set(r.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=JE(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var s,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=JE(e.adler,n.pending_buf,n.pending-u,u)),_C(e),0!==n.pending)return n.last_flush=-1,oC;u=0}}while(s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,EC(n,s),0!=s);n.gzhead.hcrc&&n.pending>u&&(e.adler=JE(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var l,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=JE(e.adler,n.pending_buf,n.pending-c,c)),_C(e),0!==n.pending)return n.last_flush=-1,oC;c=0}}while(l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,EC(n,l),0!=l);n.gzhead.hcrc&&n.pending>c&&(e.adler=JE(e.adler,n.pending_buf,n.pending-c,c))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(_C(e),0!==n.pending))return n.last_flush=-1,oC;EC(n,255&e.adler),EC(n,e.adler>>8&255),e.adler=0}if(n.status=113,_C(e),0!==n.pending)return n.last_flush=-1,oC}if(0!==e.avail_in||0!==n.lookahead||t!==eC&&666!==n.status){r=0===n.level?TC(n,t):n.strategy===fC?function(e,t){for(var n;;){if(0===e.lookahead&&(xC(e),0===e.lookahead)){if(t===eC)return 1;break}if(e.match_length=0,n=XE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(SC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===rC?(SC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(SC(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===hC?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(xC(e),e.lookahead<=258&&t===eC)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){for(o=e.strstart+258;r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=XE(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=XE(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(SC(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===rC?(SC(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(SC(e,!1),0===e.strm.avail_out)?1:2}(n,t):MC[n.level].func(n,t);if(3!==r&&4!==r||(n.status=666),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),oC;if(2===r&&(t===tC?QE(n):t!==iC&&(KE(n,0,0,!1),t===nC)&&(yC(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),_C(e),0===e.avail_out))return n.last_flush=-1,oC}return t!==rC||!(n.wrap<=0)&&(2===n.wrap?(EC(n,255&e.adler),EC(n,e.adler>>8&255),EC(n,e.adler>>16&255),EC(n,e.adler>>24&255),EC(n,255&e.total_in),EC(n,e.total_in>>8&255),EC(n,e.total_in>>16&255),EC(n,e.total_in>>24&255)):(CC(n,e.adler>>>16),CC(n,65535&e.adler)),_C(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?oC:aC},jC=function(e){var t;return PC(e)?sC:(t=e.state.status,e.state=null,113===t?Pe(e,uC):oC)},BC=function(e,t){var n=t.length;if(PC(e))return sC;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return sC;1===i&&(e.adler=VE(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(yC(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,xC(r);3<=r.lookahead;){for(var u=r.strstart,l=r.lookahead-2;kC(r,u),u++,--l;);r.strstart=u,r.lookahead=2,xC(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,oC},zC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},WC=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==T(n))throw new TypeError(n+"must be non-object");for(var r in n)zC(n,r)&&(e[r]=n[r])}}return e},HC=function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var u=e[o];i.set(u,a),a+=u.length}return i},qC=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(GO){qC=!1}for(var VC=new Uint8Array(256),GC=0;GC<256;GC++)VC[GC]=252<=GC?6:248<=GC?5:240<=GC?4:224<=GC?3:192<=GC?2:1;VC[254]=VC[255]=1;var JC=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,a=0,s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=i=0;i<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},$C=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ZC=Object.prototype.toString,KC=n.Z_NO_FLUSH,YC=n.Z_SYNC_FLUSH,XC=n.Z_FULL_FLUSH,QC=n.Z_FINISH,eR=n.Z_OK,tR=n.Z_STREAM_END,nR={level:n.Z_DEFAULT_COMPRESSION,method:n.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:n.Z_DEFAULT_STRATEGY,legacyHash:!0};function rR(e){this.options=WC({},nR,e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $C,this.strm.avail_out=0,NC(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==eR)throw new Error($E[t]);if(e.header&&FC(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?JC(e.dictionary):"[object ArrayBuffer]"===ZC.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=BC(this.strm,e))!==eR)throw new Error($E[t]);this._dict_set=!0}}function iR(e,t){t=new rR(t);if(t.push(e,!0),t.err)throw t.msg||$E[t.err];return t.result}rR.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?QC:KC,"string"==typeof e?i.input=JC(e):"[object ArrayBuffer]"===ZC.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===YC||r===XC)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(UC(i,r)===tR)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=jC(this.strm),this.onEnd(n),this.ended=!0,n===eR;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},rR.prototype.onData=function(e){this.chunks.push(e)},rR.prototype.onEnd=function(e){e===eR&&(this.result=HC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var oR={Deflate:rR,deflate:iR,deflateRaw:function(e,t){return(t=t||{}).raw=!0,iR(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,iR(e,t)},constants:n},aR=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),sR=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),uR=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),lR=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),cR=function(e,t,n,r,i,o,a,s){for(var u,l,c,d,f,h,p,m,g,v=s.bits,y=0,w=0,b=0,k=0,_=0,S=0,E=0,C=0,R=0,O=0,x=null,T=new Uint16Array(16),I=new Uint16Array(16),M=null,y=0;y<=15;y++)T[y]=0;for(w=0;w<r;w++)T[t[n+w]]++;for(_=v,k=15;1<=k&&0===T[k];k--);if(k<_&&(_=k),0===k)i[o++]=20971520,i[o++]=20971520,s.bits=1;else{for(b=1;b<k&&0===T[b];b++);for(_<b&&(_=b),y=C=1;y<=15;y++)if((C=(C<<1)-T[y])<0)return-1;if(0<C&&(0===e||1!==k))return-1;for(I[1]=0,y=1;y<15;y++)I[y+1]=I[y]+T[y];for(w=0;w<r;w++)0!==t[n+w]&&(a[I[t[n+w]]++]=w);if(h=0===e?(x=M=a,20):1===e?(x=aR,M=sR,257):(x=uR,M=lR,0),y=b,f=o,E=w=O=0,c=-1,d=(R=1<<(S=_))-1,1===e&&852<R||2===e&&592<R)return 1;for(;;){for(g=a[w]+1<h?(m=0,a[w]):a[w]>=h?(m=M[a[w]-h],x[a[w]-h]):(m=96,0),u=1<<(p=y-E),b=l=1<<S;i[f+(O>>E)+(l-=u)]=p<<24|m<<16|g|0,0!==l;);for(u=1<<y-1;O&u;)u>>=1;if(0!==u?O=(O&u-1)+u:O=0,w++,0==--T[y]){if(y===k)break;y=t[n+a[w]]}if(_<y&&(O&d)!==c){for(f+=b,C=1<<(S=y-(E=0===E?_:E));S+E<k&&!((C-=T[S+E])<=0);)S++,C<<=1;if(R+=1<<S,1===e&&852<R||2===e&&592<R)return 1;i[c=O&d]=_<<24|S<<16|f-o|0}}0!==O&&(i[f+O]=y-E<<24|64<<16|0),s.bits=_}return 0},dR=n.Z_FINISH,fR=n.Z_BLOCK,hR=n.Z_TREES,pR=n.Z_OK,mR=n.Z_STREAM_END,gR=n.Z_NEED_DICT,vR=n.Z_STREAM_ERROR,yR=n.Z_DATA_ERROR,wR=n.Z_MEM_ERROR,bR=n.Z_BUF_ERROR,kR=n.Z_DEFLATED,_R=16209,SR=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function ER(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var CR,RR,OR=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},xR=function(e){var t;return OR(e)?vR:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,pR)},TR=function(e){var t;return OR(e)?vR:((t=e.state).wsize=0,t.whave=0,t.wnext=0,xR(e))},IR=function(e,t){var n,r;return OR(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?vR:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,TR(e))},t=function(e,t){var n;return e?(n=new ER,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=IR(e,t))!==pR&&(e.state=null),n):vR},MR=!0,AR=function(e,t,n,r){var i,e=e.state;return null===e.window&&(e.window=new Uint8Array(1<<e.wbits)),0===e.wsize&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0},PR=TR,LR=t,DR=function(e,t){var n,r,i,o,a,s,u,l,c,d,f,h,p,m,g,v,y,w,b,k,_,S,E,C,R=0,O=new Uint8Array(4),x=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(OR(e)||!e.output||!e.input&&0!==e.avail_in)return vR;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,o=e.next_in,r=e.input,l=n.hold,c=n.bits,d=s=e.avail_in,f=u=e.avail_out,S=pR;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}2&n.wrap&&35615===l?(0===n.wbits&&(n.wbits=15),O[n.check=0]=255&l,O[1]=l>>>8&255,n.check=JE(n.check,O,2,0),c=l=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31?(e.msg="incorrect header check",n.mode=_R):(15&l)!==kR?(e.msg="unknown compression method",n.mode=_R):(c-=4,_=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=_),15<_||_>n.wbits?(e.msg="invalid window size",n.mode=_R):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:16191,c=l=0)))}break;case 16181:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(255&n.flags)!==kR){e.msg="unknown compression method",n.mode=_R;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=_R;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=JE(n.check,O,2,0)),c=l=0,n.mode=16182;case 16182:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,O[2]=l>>>16&255,O[3]=l>>>24&255,n.check=JE(n.check,O,4,0)),c=l=0,n.mode=16183;case 16183:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=JE(n.check,O,2,0)),c=l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(O[0]=255&l,O[1]=l>>>8&255,n.check=JE(n.check,O,2,0)),c=l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=(h=n.length)>s?s:h)&&(n.head&&(_=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),_)),512&n.flags&&4&n.wrap&&(n.check=JE(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;for(h=0;_=r[o+h++],n.head&&_&&n.length<65536&&(n.head.name+=String.fromCharCode(_)),_&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=JE(n.check,r,h,o)),s-=h,o+=h,_)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;for(h=0;_=r[o+h++],n.head&&_&&n.length<65536&&(n.head.comment+=String.fromCharCode(_)),_&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=JE(n.check,r,h,o)),s-=h,o+=h,_)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=_R;break}c=l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=SR(l),c=l=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,gR;e.adler=n.check=1,n.mode=16191;case 16191:if(t===fR||t===hR)break e;case 16192:if(n.last)l>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=1&l,--c,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(function(e){if(MR){CR=new Int32Array(512),RR=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(cR(1,e.lens,0,288,CR,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;cR(2,e.lens,0,32,RR,0,e.work,{bits:5}),MR=!1}e.lencode=CR,e.lenbits=9,e.distcode=RR,e.distbits=5}(n),n.mode=16199,t!==hR)break;l>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=_R}l>>>=2,c-=2}break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=_R;break}if(n.length=65535&l,c=l=0,n.mode=16194,t===hR)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(0===(h=u<(h=s<h?s:h)?u:h))break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h}else n.mode=16191;break;case 16196:for(;c<14;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=_R;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.lens[x[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[x[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},S=cR(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,S){e.msg="invalid code lengths set",n.mode=_R;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(y<16)l>>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(C=g+2;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=_R;break}_=n.lens[n.have-1],h=3+(3&l),l>>>=2,c-=2}else if(17===y){for(C=g+3;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}_=0,h=3+(7&(l>>>=g)),l>>>=3,c=c-g-3}else{for(C=g+7;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}_=0,h=11+(127&(l>>>=g)),l>>>=7,c=c-g-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=_R;break}for(;h--;)n.lens[n.have++]=_}}if(n.mode===_R)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=_R;break}if(n.lenbits=9,E={bits:n.lenbits},S=cR(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,S){e.msg="invalid literal/lengths set",n.mode=_R;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},S=cR(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,S){e.msg="invalid distances set",n.mode=_R;break}if(n.mode=16199,t===hR)break e;case 16199:n.mode=16200;case 16200:if(6<=s&&258<=u){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,function(e,t){var n,r,i,o,a,s,u=e.state,l=e.next_in,c=e.input,d=l+(e.avail_in-5),f=e.next_out,h=e.output,p=f-(t-e.avail_out),m=f+(e.avail_out-257),g=u.dmax,v=u.wsize,y=u.whave,w=u.wnext,b=u.window,k=u.hold,_=u.bits,S=u.lencode,E=u.distcode,C=(1<<u.lenbits)-1,R=(1<<u.distbits)-1;t:do{for(_<15&&(k+=c[l++]<<_,_+=8,k+=c[l++]<<_,_+=8),n=S[k&C];;){if(k>>>=r=n>>>24,_-=r,0==(r=n>>>16&255))h[f++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=S[(65535&n)+(k&(1<<r)-1)];continue}if(32&r){u.mode=16191;break t}e.msg="invalid literal/length code",u.mode=16209;break t}for(i=65535&n,(r&=15)&&(_<r&&(k+=c[l++]<<_,_+=8),i+=k&(1<<r)-1,k>>>=r,_-=r),_<15&&(k+=c[l++]<<_,_+=8,k+=c[l++]<<_,_+=8),n=E[k&R];;){if(k>>>=r=n>>>24,_-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=E[(65535&n)+(k&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=16209;break t}if(o=65535&n,_<(r&=15)&&(k+=c[l++]<<_,(_+=8)<r)&&(k+=c[l++]<<_,_+=8),(o+=k&(1<<r)-1)>g){e.msg="invalid distance too far back",u.mode=16209;break t}if(k>>>=r,_-=r,o>(r=f-p)){if((r=o-r)>y&&u.sane){e.msg="invalid distance too far back",u.mode=16209;break t}if(s=b,(a=0)===w){if(a+=v-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}}else if(w<r){if(a+=v+w-r,(r-=w)<i){for(i-=r;h[f++]=b[a++],--r;);if(a=0,w<i){for(i-=r=w;h[f++]=b[a++],--r;);a=f-o,s=h}}}else if(a+=w-r,r<i){for(i-=r;h[f++]=b[a++],--r;);a=f-o,s=h}for(;2<i;)h[f++]=s[a++],h[f++]=s[a++],h[f++]=s[a++],i-=3;i&&(h[f++]=s[a++],1<i)&&(h[f++]=s[a++])}else{for(a=f-o;h[f++]=h[a++],h[f++]=h[a++],h[f++]=h[a++],2<(i-=3););i&&(h[f++]=h[a++],1<i)&&(h[f++]=h[a++])}break}}break}}while(l<d&&f<m);l-=i=_>>3,k&=(1<<(_-=i<<3))-1,e.next_in=l,e.next_out=f,e.avail_in=l<d?d-l+5:5-(l-d),e.avail_out=f<m?m-f+257:257-(f-m),u.hold=k,u.bits=_}(e,f),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;v=(R=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(v&&0==(240&v)){for(w=g,b=v,k=y;v=(R=n.lencode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=16191;break}if(64&v){e.msg="invalid literal/length code",n.mode=_R;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;v=(R=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&R,!((g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(0==(240&v)){for(w=g,b=v,k=y;v=(R=n.distcode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&R,!(w+(g=R>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=_R;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=_R;break}n.mode=16204;case 16204:if(0===u)break e;if(n.offset>(h=f-u)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=_R;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),m=n.window}else m=i,p=a-n.offset,h=n.length;for(u-=h=u<h?u:h,n.length-=h;i[a++]=m[p++],--h;);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break e;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===s)break e;s--,l|=r[o++]<<c,c+=8}if(f-=u,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?JE:VE)(n.check,i,f,a-f)),f=u,4&n.wrap&&(n.flags?l:SR(l))!==n.check){e.msg="incorrect data check",n.mode=_R;break}c=l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=_R;break}c=l=0}n.mode=16208;case 16208:S=mR;break e;case _R:S=yR;break e;case 16210:return wR;default:return vR}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||f!==e.avail_out&&n.mode<_R&&(n.mode<16206||t!==dR))&&AR(e,e.output,e.next_out,f-e.avail_out),f-=e.avail_out,e.total_in+=d-=e.avail_in,e.total_out+=f,n.total+=f,4&n.wrap&&f&&(e.adler=n.check=(n.flags?JE:VE)(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),S=(0==d&&0===f||t===dR)&&S===pR?bR:S},NR=function(e){var t;return OR(e)?vR:((t=e.state).window&&(t.window=null),e.state=null,pR)},FR=function(e,t){return OR(e)||0==(2&(e=e.state).wrap)?vR:((e.head=t).done=!1,pR)},UR=function(e,t){var n,r=t.length;return OR(e)||0!==(n=e.state).wrap&&16190!==n.mode?vR:16190===n.mode&&VE(1,t,r,0)!==n.check?yR:AR(e,t,r,r)?(n.mode=16210,wR):(n.havedict=1,pR)},jR=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},BR=Object.prototype.toString,zR=n.Z_NO_FLUSH,WR=n.Z_FINISH,HR=n.Z_OK,qR=n.Z_STREAM_END,VR=n.Z_NEED_DICT,GR=n.Z_STREAM_ERROR,JR=n.Z_DATA_ERROR,$R=n.Z_MEM_ERROR,ZR=n.Z_BUF_ERROR,KR={chunkSize:65536,windowBits:15,to:""};function YR(e){this.options=WC({},KR,e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $C,this.strm.avail_out=0,LR(this.strm,t.windowBits));if(e!==HR)throw new Error($E[e]);if(this.header=new jR,FR(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=JC(t.dictionary):"[object ArrayBuffer]"===BR.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=UR(this.strm,t.dictionary))!==HR)throw new Error($E[e])}function XR(e,t){t=new YR(t);if(t.push(e,!0),t.err)throw t.msg||$E[t.err];return t.result}YR.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?WR:zR,"[object ArrayBuffer]"===BR.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(n=DR(i,r))===VR&&a&&((n=UR(i,a))===HR?n=DR(i,r):n===JR&&(n=VR));0<i.avail_in&&n===qR&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)PR(i),n=DR(i,r);switch(n){case GR:case JR:case VR:case $R:return this.onEnd(n),!(this.ended=!0)}var s,u,l,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===qR||0<r)&&("string"===this.options.to?(s=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+VC[e[n]]>t?n:t}(i.output,i.next_out),u=i.next_out-s,l=function(e,t){var n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(var r=new Array(2*n),i=0,o=0;o<n;){var a=e[o++];if(a<128)r[i++]=a;else{var s=VC[a];if(4<s)r[i++]=65533,o+=s-1;else{for(a&=2===s?31:3===s?15:7;1<s&&o<n;)a=a<<6|63&e[o++],s--;1<s?r[i++]=65533:a<65536?r[i++]=a:(a-=65536,r[i++]=55296|a>>10&1023,r[i++]=56320|1023&a)}}}var u=r,l=i;if(l<65534&&u.subarray&&qC)return String.fromCharCode.apply(null,u.length===l?u:u.subarray(0,l));for(var c="",d=0;d<l;d++)c+=String.fromCharCode(u[d]);return c}(i.output,s),i.next_out=u,i.avail_out=o-u,u&&i.output.set(i.output.subarray(s,s+u),0),this.onData(l)):(this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0)),n!==HR&&n!==ZR||0!==c){if(n===qR)return n=NR(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===WR)return n=NR(this.strm),this.onEnd(n===HR?ZR:n),!(this.ended=!0);break}}}return!0},YR.prototype.onData=function(e){this.chunks.push(e)},YR.prototype.onEnd=function(e){e===HR&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=HC(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var QR,eO={Inflate:YR,inflate:XR,inflateRaw:function(e,t){return(t=t||{}).raw=!0,XR(e,t)},ungzip:XR,constants:n},tO={Deflate:oR.Deflate,deflate:oR.deflate,deflateRaw:oR.deflateRaw,gzip:oR.gzip,Inflate:eO.Inflate,inflate:eO.inflate,inflateRaw:eO.inflateRaw,ungzip:eO.ungzip,constants:n},nO=(wl(uO,QR=Error),uO),rO=(sO.prototype.uploadReplay=function(t){return bl(this,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:return[4,this.uploadReplayResult(t)];case 1:return[2,"success"===e.sent().status]}})})},sO.prototype.uploadReplayResult=function(i){return bl(this,void 0,void 0,function(){var t,n,r;return kl(this,function(e){switch(e.label){case 0:if(this.isUploading)return[2,{status:"busy",attempts:0}];this.isUploading=!0,t=0,e.label=1;case 1:if(e.trys.push([1,9,10,11]),!(n=this.config.beforeSend(i)))return[2,{status:"cancelled",attempts:t}];if((!n.replay_format||"rrweb"===n.replay_format)&&"gzip_base64"!==n.events_encoding&&5242880<E0(n.events))throw new nO("Segment exceeds decoded events limit");e.label=2;case 2:e.label=3;case 3:return e.trys.push([3,5,,7]),t++,[4,this.doUpload(n)];case 4:return e.sent(),[2,{status:"success",attempts:t}];case 5:if((r=e.sent()).permanent||t>this.config.maxRetries)throw r;return r=1e3*Math.pow(2,t-1),h("Uploader","Retrying segment "+i.segment_id+" in "+r+"ms"),[4,this.sleep(r)];case 6:return e.sent(),[3,7];case 7:return[3,2];case 8:return[3,11];case 9:y0("Uploader","Upload failed:",r=e.sent());try{this.config.onError(r)}catch(k){v0("Uploader","onError callback failed:",k)}return[2,{status:r.permanent?"rejected":"exhausted",attempts:t}];case 10:return this.isUploading=!1,[7];case 11:return[2]}})})},sO.prototype.prepareUploadPayload=function(e){var t=e.replay_format||"rrweb",n=e.events_encoding||"plain_json";if("rrweb"!==t)return e;if(!this.config.eventsCompression||"gzip_base64"===n)return A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=tO.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,a=r.length,s=i.length;return h("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(a/1024)+"KB -> base64 "+Math.round(s/1024)+"KB"),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(X){return v0("Uploader","Events compression failed, fallback to plain_json:",X),A(A({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},sO.prototype.uint8ArrayToBase64=function(e){for(var t="",n=0;n<e.length;n+=32768){for(var r=e.subarray(n,n+32768),i="",o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);t+=i}if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("base64 encode is not supported")},sO.prototype.doUpload=function(a){return bl(this,void 0,void 0,function(){var t,n,r,i,o;return kl(this,function(e){switch(e.label){case 0:if(t=this.prepareUploadPayload(a),o=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},h("Uploader","Sending replay payload: "+Math.round(o.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),o.length<65536||h("Uploader","Data size "+Math.round(o.length/1024)+"KB exceeds keepalive limit, using normal fetch"),this.config.transport)return[4,this.config.transport.request({kind:"replay",url:this.config.uploadUrl,method:"POST",headers:n,body:o,retry:!1})];throw new Error("Replay Transport is not configured");case 1:t=e.sent(),n=t||{ok:!1,status:0,statusText:"Transport failed"};try{i="string"==typeof n.body?JSON.parse(n.body):n.body,r=null==i?void 0:i.code}catch(F){}if(413===n.status||1007===r||1001===r||1006===r)throw new nO("Replay rejected: HTTP "+(n.status||0)+", code "+(r||0));if(!n.ok)throw new Error("HTTP "+(n.status||0)+": "+(n.statusText||"Transport failed"));if(0!==(o="string"==typeof n.body?JSON.parse(n.body):n.body).code)throw new Error("Server error (code "+o.code+"): "+o.message);return[2]}})})},sO.prototype.measurePayload=function(e){return E0(this.serializePayload(e))},sO.prototype.sendBeacon=function(e){var t,n;try{var r,i=this.serializePayload(e);return null!=(t=this.config.transport)&&t.handoff?(r=this.config.transport.handoff({kind:"replay",url:this.config.uploadUrl,method:"POST",contentType:"application/json",body:i,sendBeacon:!0}))&&"function"==typeof r.then?(v0("Uploader","sendBeacon handoff is async, acceptance is unknown"),!1):!0===(null==(n=r)?void 0:n.handoffAccepted):!1}catch(X){return y0("Uploader","sendBeacon failed:",X),!1}},sO.prototype.serializePayload=function(e){return JSON.stringify(this.prepareUploadPayload(e))},sO.prototype.isUploadInProgress=function(){return this.isUploading},sO.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},sO),iO=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),oO=(aO.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,h("ClickDetector","Started"))},aO.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,h("ClickDetector","Stopped"))},aO.prototype.handlePointerDown=function(e){var t,n,r=this,i=e.target;i&&i instanceof Element&&(i=this.getClickableElement(i))&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=i,t=this.getNodeInfo(i),n=this.getExternalNavigationReason(e,i),this.options.onClickStart({node:t,timestamp:this.clickStartTime,target:i,event:e,effectiveActionReason:n||undefined}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},aO.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},aO.prototype.startMutationObserver=function(){var t=this;this.clickNode&&document.body&&"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&(t.emitEffectiveAction("dom_mutation"),t.handleSlowClick("mutation"))}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"],characterData:!0}))},aO.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("characterData"===r.type)return!0;if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).concat(Array.from(r.removedNodes)).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if(["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"].includes(r||""))return!0}}return!1},aO.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},aO.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},aO.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},aO.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},aO.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},aO.prototype.getClickableElement=function(e){return e.matches(iO)?e:e.closest(iO)},aO.prototype.getExternalNavigationReason=function(e,t){var n=t.closest("a");if(n){if(n.download)return"download";var r=(n.getAttribute("target")||"").toLowerCase();if(r&&"_self"!==r)return"external_navigation";if(n.href&&(1===e.button||e.metaKey||e.ctrlKey||e.shiftKey))return"external_navigation"}r=t.closest("form"),n=((null==r?void 0:r.getAttribute("target"))||"").toLowerCase();return n&&"_self"!==n?"external_navigation":t.hasAttribute("data-tdem-ignore-dead-click")||t.closest("[data-tdem-ignore-dead-click]")||t.hasAttribute("data-tdem-effective-action")||t.closest("[data-tdem-effective-action]")?"custom":null},aO.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},aO.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},aO.prototype.isActive=function(){return this.isRunning},aO);function aO(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onClickStart:e.onClickStart||function(){},onEffectiveAction:e.onEffectiveAction||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function sO(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){},eventsCompression:null==(t=e.eventsCompression)||t,transport:e.transport}}function uO(){var e=null!==QR&&QR.apply(this,arguments)||this;return e.permanent=!0,e}function lO(e){return Number.isNaN(e)?0:Math.max(0,Math.min(1,e))}function cO(e){return lO((e=e,(Number.isNaN(e)?0:Math.max(0,Math.min(100,e)))/100))}function dO(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fO(e,t){var e=!1===(e=e)||e===undefined?{enabled:!1,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:!0===e?{enabled:!0,sessionSampleRate:.1,errorSampleRate:1,errorTraceback:!0}:{enabled:!1!==e.enabled,sessionSampleRate:"number"==typeof e.sessionSampleRate?lO(e.sessionSampleRate):.1,errorSampleRate:"number"==typeof e.errorSampleRate?lO(e.errorSampleRate):1,errorTraceback:e.errorTraceback===undefined||!!e.errorTraceback},t=t&&"object"===T(t)?t:null,n=e.enabled,r=(t&&dO(t,"enabled")&&(n=e.enabled&&!!t.enabled),e.sessionSampleRate),i=e.errorSampleRate,e=e.errorTraceback;return n&&t&&(dO(t,"experience_sample_rate")&&t.experience_sample_rate!==undefined&&null!==t.experience_sample_rate?r=cO(Number(t.experience_sample_rate)):dO(t,"replay_sample_rate")&&t.replay_sample_rate!==undefined&&null!==t.replay_sample_rate&&(r=cO(Number(t.replay_sample_rate))),dO(t,"error_traceback")&&t.error_traceback!==undefined&&null!==t.error_traceback&&(e=!!t.error_traceback),dO(t,"error_sample_rate"))&&t.error_sample_rate!==undefined&&null!==t.error_sample_rate&&(i=cO(Number(t.error_sample_rate))),{enabled:n,sessionSampleRate:r,errorSampleRate:e?i:0,errorTraceback:e}}function hO(e,t){return A(A({},e),{enabled:t.enabled,sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,errorTraceback:t.errorTraceback})}function pO(e){if(!1!==(null==(t=e.config)?void 0:t.sessionReplay)){var t=e._effectiveReplayPolicy;if(!t||t.enabled)if(!1!==e._replaySampled)return!(e=null==(t=e)?void 0:t._tdemSampleGate)||e.isDecided}}new c({name:"sessionReplay"});var mO=new c({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,errorTraceback:!0,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,_pendingSegments:[],_baselineDelivered:!1,_baselineFlushScheduled:!1,_flushTail:Promise.resolve(),_drainPromise:null,_drainRequested:!1,_awaitingBaseline:!1,_recoveryMeta:null,init:function(e){},applyEffectivePolicy:function(e){var t,n;if(this.errorTraceback=e.errorTraceback,this.replayConfig&&(this.replayConfig=hO(this.replayConfig,e)),this.samplerManager&&this.samplerManager.updateRates(e.sessionSampleRate,e.errorSampleRate),this.isInitialized){if(e.enabled)return(n=this.samplerManager)?0<e.sessionSampleRate||e.errorTraceback&&0<e.errorSampleRate?!e.errorTraceback&&n.isBufferMode()?(h("Plugin","Error traceback off while in buffer, stopping replay"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),this._pendingSegments=[],this._recoveryMeta=null,this._awaitingBaseline=!1,void n.forceMode(!1)):void(e.errorTraceback&&e.sessionSampleRate<=0&&0<e.errorSampleRate&&n.isSessionMode()&&(h("Plugin","Remote SSR=0 with traceback on: demote session→buffer"),n.forceMode("buffer"),this.flushTimer)&&(clearInterval(this.flushTimer),this.flushTimer=null)):(h("Plugin","Effective policy no longer allows recording, stopping"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),this._pendingSegments=[],this._recoveryMeta=null,this._awaitingBaseline=!1,void n.forceMode(!1)):void 0;h("Plugin","Effective policy disabled, stopping replay"),this.stopReplay(),null!=(e=this.eventBuffer)&&e.clear(),this._pendingSegments=[],this._recoveryMeta=null,this._awaitingBaseline=!1}},shouldSkipBufferFlush:function(){var e;return!0===(null==(e=this.samplerManager)?void 0:e.isBufferMode())},onNewTdem:function(e,t){var n,r,t=this.parseConfig(t),i=null!=(i=t.debug)&&i,i=(p0=i,e._effectiveReplayPolicy);i||(i=fO(t,(n=e._prefetchedConfigData)&&"object"===T(n)&&("replay_sample_rate"in n||"error_traceback"in n||"error_sample_rate"in n||"tdem_sample_rate"in n||"enabled"in n)?(r={},Object.prototype.hasOwnProperty.call(n,"enabled")&&(r.enabled=!!n.enabled),Object.prototype.hasOwnProperty.call(n,"replay_sample_rate")&&(r.replay_sample_rate=Number(n.replay_sample_rate)),Object.prototype.hasOwnProperty.call(n,"error_traceback")&&(r.error_traceback=!!n.error_traceback),Object.prototype.hasOwnProperty.call(n,"error_sample_rate")&&(r.error_sample_rate=Number(n.error_sample_rate)),r):null),e._effectiveReplayPolicy=i,e._replaySampled=i.enabled),i.enabled?(n=hO(A(A({},t),{enabled:!0}),i),this.replayConfig=n,this.errorTraceback=i.errorTraceback,this._tdemRef=e,this.initializeModules(e,n),(r=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,n,r.mode),this.registerReplaySamplingCheck(e,n),this.listenForErrors(e,n),this.listenForPerformance(e),this.listenForLifecycle(e,n),this.listenForUnload(e),this.isInitialized=!0):h("Plugin","Not sampled by sampler, skipping")):h("Plugin","disabled by effective policy")},registerReplaySamplingCheck:function(t,e){var n=this,r=function(e){clearInterval(i),e?(h("Plugin","Session/policy rejected, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):h("Plugin","Session sampled, replay continues")},i=setInterval(function(){var e=t._effectiveReplayPolicy;(!e||e.enabled)&&!1!==(null==(e=t.config)?void 0:e.sessionReplay)?pO(t)&&(null!=(e=n.maybeScheduleBaselineFlush)&&e.call(n),r(!1)):r(!0)},50);t.lifeCycle.on("destroy",function(){clearInterval(i)})},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===T(e)?A(A({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new w0({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new C0({},null!=(r=e.useCompression)&&r),this.samplerManager=new sE({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new aE({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?h("SessionReplay","Checkout in buffer mode (error traceback), skip flush"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(h("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0)))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),(t.config.url||t.config.hostUrl||"").replace(/\/+$/,""));this.uploader=new rO({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError,eventsCompression:null==(r=e.eventsCompression)||r,transport:null==(r=t.getInternalTransport)?void 0:r.call(t)}),this.clickDetector=new oO({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),h("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(r=(r=this.sessionManager.restoreSession())||this.sessionManager.createSession(n),this._baselineDelivered=!1,this._baselineFlushScheduled=!1,this._awaitingBaseline=!1,this._recoveryMeta=null,h("Plugin","Session started:",r.id,"mode:",n),this.recorderManager.options.mode=n,r=rE(A({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):h("Plugin","Buffer mode - flush on error only")):y0("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){if(this.eventBuffer&&this.sessionManager){this.sanitizeDataURLs(e);var n=E0(JSON.stringify(e))+1;if(5242880<n+1)this._awaitingBaseline=!0,this._recoveryMeta=null,this._baselineDelivered=!1,y0("Replay","Event exceeds decoded events limit ("+n+" bytes), waiting for next baseline");else{if(this._awaitingBaseline){if(4===e.type)return this._recoveryMeta=e,void this.enforceReplayBudget();if(2!==e.type||!this._recoveryMeta)return;n=[this._recoveryMeta,e];if(5242880<E0(JSON.stringify(n)))return;this._recoveryMeta=null,this._awaitingBaseline=!1,this._baselineDelivered=!1,this.appendReplayEvents(n)}else this.appendReplayEvents([e]);this.sessionManager.updateActivity(),this.maybeScheduleBaselineFlush()}}},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var a=0,s=n.attributes;a<s.length;a++){var u=s[a];if(null!=u&&u.attributes)for(var l=0,c=Object.entries(u.attributes);l<c.length;l++){var d=c[l],f=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(u.attributes[f]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&a.length>t&&a.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var s=0,u=e.childNodes;s<u.length;s++){var l=u[s];this.sanitizeNodeTree(l,t)}}},handleSlowClick:function(e,t){h("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){h("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:A({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},maybeScheduleBaselineFlush:function(){var e,t,n,r=this;this._baselineDelivered||this._baselineFlushScheduled||this._awaitingBaseline||this.shouldSkipBufferFlush()||null==(e=this.eventBuffer)||!e.hasBaselinePair()||(t=this._tdemRef,n=this.replayConfig,t&&n&&pO(t)&&(this._baselineFlushScheduled=!0,Promise.resolve().then(function(){r._baselineFlushScheduled=!1,r._baselineDelivered||r.shouldSkipBufferFlush()||pO(t)&&(r._baselineDelivered=!0,r.flushReplayData(t,n,!0))})))},canReportReplay:function(e){return!(!(this.sessionManager&&this.eventBuffer&&this.uploader)||!pO(e)||this.shouldSkipBufferFlush()||!this.sessionManager.getSession())},getRetainedReplayBytes:function(){var e;return((null==(e=this.eventBuffer)?void 0:e.getSize())||0)+2+this._pendingSegments.reduce(function(e,t){return e+t.byteLength},0)+(this._recoveryMeta?E0(JSON.stringify(this._recoveryMeta))+1:0)},appendReplayEvents:function(e){var t,n=this;this.eventBuffer&&(t=e.reduce(function(e,t){return e+E0(JSON.stringify(t))+1},0),5242880<this.eventBuffer.getSize()+t+2||10485760<this.getRetainedReplayBytes()+t?this.compactReplayQueue(e):e.forEach(function(e){return n.eventBuffer.addEvent(e)}))},enforceReplayBudget:function(){(10485760<this.getRetainedReplayBytes()||64<this._pendingSegments.length)&&this.compactReplayQueue()},compactReplayQueue:function(e,t){var n=this;if(void 0===e&&(e=[]),this.eventBuffer){var r=this._awaitingBaseline,i=this._recoveryMeta,o=[],a=[],s=null;this._pendingSegments.forEach(function(e){e===t||"sending"===e.status?(e.events.forEach(function(e){4===e.type&&(s=e)}),e!==t&&a.push(e)):e.events.forEach(function(e){return o.push(e)})}),this.eventBuffer.detachEvents().forEach(function(e){return o.push(e)}),e.forEach(function(e){return o.push(e)});for(var u=-1,l=null,c=0;c<o.length;c++){var d=o[c];4===d.type&&(s=d),2===d.type&&s&&E0(JSON.stringify([s,d]))<=5242880&&(u=c,l=s)}var e=0<=u&&l?_l([l],o.slice(u)):[],f=(this._pendingSegments=a,this._recoveryMeta=null,E0(JSON.stringify(e))),f=(e.length&&f<=5242880&&this.getRetainedReplayBytes()+f<=10485760?(e.forEach(function(e){return n.eventBuffer.addEvent(e)}),this._awaitingBaseline=r):this._awaitingBaseline=!0,i||s);this._awaitingBaseline&&f&&this.getRetainedReplayBytes()+E0(JSON.stringify(f))+1<=10485760&&(this._recoveryMeta=f),this._baselineDelivered=!1,v0("Replay","Discarded replay dependency chain; retained latest complete checkpoint if it fits")}},freezeActiveBuffer:function(e){var t,n,r,i,o=this;this.sessionManager&&this.eventBuffer&&(t=this.sessionManager.getSession())&&!this.eventBuffer.isEmpty()&&(!e&&this.eventBuffer.getEventCount()<10?h("Flush","Skipping flush, only "+this.eventBuffer.getEventCount()+" events (min: 10)"):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(v0("Flush","First segment missing FullSnapshot, triggering manual checkout"),null==(e=this.recorderManager))||e.takeFullSnapshot(),0!==(e=this.eventBuffer.detachEvents()).length&&(r=!(n=[]),i=null,e.forEach(function(e){if(5242880<E0(JSON.stringify([e])))r=!0,i=null,y0("Replay","Oversized event discarded before freezing");else{if(r){if(4===e.type&&(i=e),2!==e.type||!i||5242880<E0(JSON.stringify([i,e])))return;n.push(i),r=!1}n.push(e)}}),r&&(this._awaitingBaseline=!0,this._recoveryMeta=i,this._baselineDelivered=!1),(e=this.splitEventsIntoChunks(n,3145728,5242880)).forEach(function(e){0!==e.length&&o._pendingSegments.push({segmentId:o.sessionManager.incrementSegmentId(),sessionId:t.id,replayId:t.replayId,replayStarted:t.started,events:e,byteLength:E0(JSON.stringify(e)),status:"pending"})}),!this._awaitingBaseline&&n.some(function(e){e=e.type;return 2===e||4===e})&&(this._baselineDelivered=!0),this.enforceReplayBudget(),h("Flush","Frozen "+n.length+" events into "+e.length+" segment(s)"))))},buildSegmentPayload:function(e,t){return{project_key:String(e.config.id||""),session_id:t.sessionId,replay_id:t.replayId,segment_id:t.segmentId,timestamp:Date.now(),replay_start_timestamp:t.replayStarted,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:JSON.stringify(t.events)}},measureSegment:function(e){return this.uploader&&"function"==typeof this.uploader.measurePayload?this.uploader.measurePayload(e):E0(JSON.stringify(e))},enqueueDrain:function(t){var e,n=this;return this._drainRequested=!0,this._drainPromise||(e=Promise.resolve().then(function(){return bl(n,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:return this._drainRequested=!1,[4,this.drainPendingUploads(t)];case 1:e.sent(),e.label=2;case 2:if(this._drainRequested&&this.canReportReplay(t))return[3,0];e.label=3;case 3:return[2]}})})})["finally"](function(){n._drainPromise===e&&(n._drainPromise=null)}),this._drainPromise=e,this._flushTail=e)},drainPendingUploads:function(i){return bl(this,void 0,void 0,function(){var t,r,n;return kl(this,function(e){switch(e.label){case 0:t=function(){var t,n;return kl(this,function(e){switch(e.label){case 0:return(t=r._pendingSegments.find(function(e){return"pending"===e.status}))?(t.status="sending",[4,r.uploader.uploadReplayResult(r.buildSegmentPayload(i,t))]):[2,{value:void 0}];case 1:if(n=e.sent(),!r._pendingSegments.includes(t))return[2,"continue"];if("success"===n.status)r._pendingSegments=r._pendingSegments.filter(function(e){return e!==t}),null!=(e=r.sessionManager)&&e.saveSession();else{if("busy"===n.status)return t.status="pending",[2,{value:void 0}];v0("Flush","Segment "+t.segmentId+" terminated ("+n.status+", attempts="+n.attempts+")"),r.compactReplayQueue([],t),r.freezeActiveBuffer(!0)}return[2]}})},r=this,e.label=1;case 1:return this.canReportReplay(i)?[5,t()]:[3,3];case 2:return"object"===T(n=e.sent())?[2,n.value]:[3,1];case 3:return[2]}})})},flushReplayData:function(e,t,n){var r,i;return void 0===n&&(n=!1),this.canReportReplay(e)?this.sessionManager.shouldRefreshSession()?(h("Plugin","Session expired, refreshing"),this.stopReplay(),r=this.sessionManager.refreshSession(),e.lifeCycle.emit("sessionRefreshed"),i=e._replaySampled,r.sampled&&!1!==i&&this.startReplay(e,t,r.sampled),Promise.resolve()):(this.freezeActiveBuffer(n),this.enqueueDrain(e)):Promise.resolve()},handoffReplay:function(r,e){var i,o,a,s,u=this;this.canReportReplay(r)&&(this.freezeActiveBuffer(!0),a=o=i=0,s=[],this._pendingSegments.forEach(function(e){var t=u.buildSegmentPayload(r,e),n=u.measureSegment(t);!(n<=0||61440<n)&&i+n<=65536?!0===u.uploader.sendBeacon(t)?(i+=n,o+=1):(a+=1,v0("Unload","sendBeacon rejected chunk (segment_id="+e.segmentId+"), kept for retry"),s.push(e)):s.push(e)}),this._pendingSegments=s,h("SessionReplay","sendBeacon on hide: "+o+" queued, "+a+" rejected, "+s.length+" pending"),e)&&0<s.length&&this.enqueueDrain(r)},splitEventsIntoChunks:function(e,t,n){if(void 0===t&&(t=3145728),void 0===n&&(n=5242880),0===e.length)return[];var r=E0(JSON.stringify(e));if(r<=Math.min(t,n))return[e];v0("Split","Events size "+Math.round(r/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],a=2,s=0,u=e;s<u.length;s++){var l,c,d=u[s],f=E0(JSON.stringify(d))+1;0<o.length&&t<a+f&&(i.push(o),o=[],a=2),n<f+1?((c=2===(l=d.type)||4===l)?y0:v0)("Split","Single event too large ("+Math.round(f/1024)+"KB), type="+l+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(d),a+=f)}return 0<o.length&&i.push(o),i},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),h("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(h("Plugin","Converting to session mode due to error"),this.flushReplayData(t,n,!0),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(Le){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForLifecycle:function(o,t){var n,e,a=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=a.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(i=null==(r=o)?void 0:r.getOriginFrom)?void 0:i.call(r))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:xc(),event_type:e,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:r,data:{page_title:i,replay_id:n,is_effective_action:!1,tags:{environment:o.config.env||"production",version:String(o.config.version||"")},event_properties:{visibility_state:"undefined"!=typeof document?document.visibilityState:"",lifecycle_type:e}}})},document.addEventListener("visibilitychange",e=function(){var e;if("undefined"!=typeof document){if("hidden"===document.visibilityState)return n(P.TAB_HIDDEN),a.shouldSkipBufferFlush()?void h("Lifecycle","Buffer mode (error traceback), skip flush on hidden"):void a.handoffReplay(o,!0);"visible"===document.visibilityState&&(n(P.TAB_VISIBLE),(e=Date.now())-a._lastLifecycleSnapshotAt<5e3||(a._lastLifecycleSnapshotAt=e,null!=(e=a.recorderManager)&&e.takeFullSnapshot(),a.shouldSkipBufferFlush()?h("Lifecycle","Buffer mode (error traceback), skip flush on visible"):a.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(t){var n=this,e=function(e){n.flushOnUnload(t,e)},r=function(e){n.resumeAfterRestore(e)};window.addEventListener("pagehide",e),window.addEventListener("pageshow",r),t.lifeCycle.on("destroy",function(){window.removeEventListener("pagehide",e),window.removeEventListener("pageshow",r)})},resumeAfterRestore:function(e){null!=e&&e.persisted&&!this.shouldSkipBufferFlush()&&(this.recorderManager&&!this.recorderManager.isRecording()&&this.recorderManager.startRecording(),null!=(e=this.clickDetector))&&e.start()},flushOnUnload:function(e,t){this.canReportReplay(e)?(null!=t&&t.persisted||(null!=(t=this.recorderManager)&&t.stopRecording(),null==(t=this.clickDetector))||t.stop(),this.handoffReplay(e,!1)):this.shouldSkipBufferFlush()&&h("Unload","Buffer mode (error traceback), skip flush on unload")},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this._lastLifecycleSnapshotAt=0,this._pendingSegments=[],this._baselineDelivered=!1,this._baselineFlushScheduled=!1,this._flushTail=Promise.resolve(),this._drainPromise=null,this._drainRequested=!1,this._awaitingBaseline=!1,this._recoveryMeta=null,this.isInitialized=!1,h("Plugin","destroyed")}}),gO={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{enabled:!0,deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3,resolveOnDomMutation:!0,resolveOnSpaNavigation:!0,resolveOnExternalNavigation:!0,resolveOnWindowOpen:!0,resolveOnPageUnload:!0,resolveOnFormAction:!0,resolveOnApiSuccess:!0,ignoreDeadClickSelectors:[],effectiveActionSelectors:[]},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},vO=new Set([P.JS_ERROR,P.PROMISE_ERROR,P.RESOURCE_ERROR,P.API_ERROR]),yO=new Set([P.FORM_CHANGE,P.FORM_SUBMIT,P.FORM_SUBMIT_RESULT]),HE=(new c({name:"struggleMonitor"}),new c({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?A({},gO):e&&"object"===T(e)?A(A(A({},gO),e),{click:A(A({},gO.click),e.click||{}),performance:A(A({},gO.performance),e.performance||{}),form:A(A({},gO.form),e.form||{}),navigation:A(A({},gO.navigation),e.navigation||{}),custom:A(A({},gO.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:gO).payloadAllowlist,enabled:!1!==e.enabled}):A(A({},gO),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],pendingDeadClicks:new Map,focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new oO({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onClickStart:function(e){r.onClickStart(t,n,e)},onEffectiveAction:function(e){r.onEffectiveAction(n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start(),this.initClickEffectiveActionListeners(n),this.initWindowOpenHook())},initClickEffectiveActionListeners:function(n){var e,t=this;"undefined"!=typeof window&&((e=function(e,t){window.addEventListener(e,t),n.removeDomListeners.push(function(){window.removeEventListener(e,t)})})("pagehide",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}),e("beforeunload",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}))},initWindowOpenHook:function(){var r,i;"undefined"==typeof window||this.windowOpenHooked||(r=window.open,this.originalWindowOpen=r,this.windowOpenHooked=!0,i=this,window.open=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(window,e);return i.resolveWindowOpenActions(),n})},resolveWindowOpenActions:function(){var n=this,r=Date.now();this.instanceStates.forEach(function(e){var t;!1!==(null==(t=e.config.click)?void 0:t.resolveOnWindowOpen)&&(null!=(t=e.clickDetector)&&t.markEffectiveAction("window_open"),n.resolvePendingDeadClicks(e,"window_open",r,n.getCurrentPageUrl()))})},restoreWindowOpenHook:function(){"undefined"!=typeof window&&this.windowOpenHooked&&this.originalWindowOpen&&(window.open=this.originalWindowOpen,this.originalWindowOpen=null,this.windowOpenHooked=!1)},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,P.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,P.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:xc(),event_type:P.FORM_SUBMIT_RESULT,event_category:Rc.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:A(A({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:A(A({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:Ip(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:xc(),timestamp:Date.now(),page_url:i};n!==P.FORM_FOCUS?n!==P.FORM_BLUR?n!==P.FORM_CHANGE?(i=A(A({},r),{event_type:P.FORM_SUBMIT,event_category:Rc.BEHAVIOR,data:A(A({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_CHANGE,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_BLUR,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=A(A({},r),{event_type:P.FORM_FOCUS,event_category:Rc.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onClickStart:function(e,t,n){var r,i=t.config.click||gO.click;!1!==i.enabled&&(r=n.node.selector||n.node.tagName||"unknown",this.shouldIgnoreDeadClick(n.target,i)?this.resolvePendingDeadClicks(t,"custom",n.timestamp,this.getCurrentPageUrl()):this.scheduleDeadClick(e,t,{pendingId:"pending_"+n.timestamp+"_"+Math.random().toString(16).slice(2),timestamp:n.timestamp,pageUrl:this.getCurrentPageUrl(),ownerKey:r,node:n.node}))},onEffectiveAction:function(e,t){this.shouldResolveByReason(e,t.reason)&&this.resolvePendingDeadClicks(e,t.reason,t.timestamp,this.getCurrentPageUrl())},scheduleDeadClick:function(t,n,r){var i=this,o=null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,e=setTimeout(function(){var e=n.pendingDeadClicks.get(r.pendingId);e&&(n.pendingDeadClicks["delete"](r.pendingId),i.emitDeadClick(t,n,e,o))},o);n.pendingDeadClicks.set(r.pendingId,A(A({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:undefined;null!=(i=e.reportStruggle)&&i.call(e,{type:"dead_click",ownerType:"element",ownerKey:n.ownerKey,pageUrl:n.pageUrl,triggerEventId:n.clickEventId,relatedEventIds:o,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeout_ms:r,selector:n.node.selector||""}})},resolvePendingDeadClicks:function(r,i,o,a){void 0===o&&(o=Date.now());var e,s=null!=(e=null==(e=r.config.click)?void 0:e.deadClickWindowMs)?e:3e3;r.pendingDeadClicks.forEach(function(e,t){var n=o-e.timestamp;n<0||s<n||"spa_navigation"!==i&&"page_unload"!==i&&a&&e.pageUrl&&a!==e.pageUrl||(clearTimeout(e.timeout),r.pendingDeadClicks["delete"](t))})},linkPendingDeadClickToClickEvent:function(e,n,r){var i=n.timestamp||Date.now(),o=this.getEventPageUrl(n);e.pendingDeadClicks.forEach(function(e){var t;e.clickEventId||(t=i-e.timestamp)<0||1e3<t||o&&e.pageUrl&&o!==e.pageUrl||(e.clickEventId=n.event_id,r&&"unknown"!==r&&(e.ownerKey=r))})},shouldResolveByReason:function(e,t){e=e.config.click||gO.click;return!1!==e.enabled&&("dom_mutation"===t?!1!==e.resolveOnDomMutation:"spa_navigation"===t?!1!==e.resolveOnSpaNavigation:"external_navigation"===t||"download"===t?!1!==e.resolveOnExternalNavigation:"window_open"===t?!1!==e.resolveOnWindowOpen:"page_unload"===t?!1!==e.resolveOnPageUnload:"form_change"===t||"form_submit"===t?!1!==e.resolveOnFormAction:"api_success"!==t||!1!==e.resolveOnApiSuccess)},shouldIgnoreDeadClick:function(t,e){return _l(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(Pe){return!1}})},getCurrentPageUrl:function(){return"undefined"==typeof window?"":window.location.href},getEventPageUrl:function(e){return(null==e?void 0:e.page_url)||(null==(e=null==e?void 0:e.data)?void 0:e.page_url)||""},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){},handleEventCreated:function(i,o,e){var t,a=this,s=Date.now(),n=o.config.click||gO.click,r=Math.max(null!=(t=n.errorClickWindowMs)?t:3e3,null!=(t=n.rageClickWindowMs)?t:1e3,null!=(t=n.deadClickWindowMs)?t:3e3);o.recentClicks=o.recentClicks.filter(function(e){return s-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==P.STRUGGLE&&(t=e.timestamp||s,n=a.getEventPageUrl(e),e.event_type===P.CLICK?(r=(null==(r=e.data)?void 0:r.target_element)||(null==(r=e.data)?void 0:r.target_id)||(null==(r=e.data)?void 0:r.target_class)||"unknown",o.recentClicks.push({eventId:e.event_id,timestamp:t,pageUrl:n,ownerKey:r}),a.linkPendingDeadClickToClickEvent(o,e,r)):(a.isEffectiveActionEvent(o,e)&&(a.resolvePendingDeadClicks(o,a.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(a.getEffectiveActionReason(e))),vO.has(e.event_type)?a.tryReportErrorClick(i,o,e):e.event_type===P.PAGE_LOAD||e.event_type===P["true"]?a.tryReportSlowPage(i,o,e):e.event_type===P.FORM_FOCUS?(a.trackFormFocus(o,e),a.trackFormChangeAndZigzag(i,o,e)):e.event_type===P.FORM_CHANGE?a.trackFormChangeAndZigzag(i,o,e):e.event_type===P.FORM_BLUR?a.tryReportLongFocusTime(i,o,e):e.event_type===P.FORM_SUBMIT?a.trackFormSubmitResult(o,e):e.event_type===P.FORM_SUBMIT_RESULT?(a.trackFormSubmitResult(o,e),a.tryReportFormValidationError(i,o,e)):e.event_type===P.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&a.tryReportBackForward(i,o,e)),a.tryReportCustomStruggle(i,o,e))})},isEffectiveActionEvent:function(e,t){var n;return!1!==(null==(n=e.config.click)?void 0:n.enabled)&&(t.event_type===P.API_CALL?!1!==(null==(n=e.config.click)?void 0:n.resolveOnApiSuccess):t.event_type===P.PAGE_VIEW&&null!=(n=null==(n=t.data)?void 0:n.event_properties)&&n.navigation_type?!1!==(null==(n=e.config.click)?void 0:n.resolveOnSpaNavigation):yO.has(t.event_type)?!1!==(null==(n=e.config.click)?void 0:n.resolveOnFormAction):!0===(null==(e=t.data)?void 0:e.is_effective_action))},getEffectiveActionReason:function(e){return e.event_type===P.API_CALL?"api_success":e.event_type===P.PAGE_VIEW?"spa_navigation":e.event_type===P.FORM_CHANGE?"form_change":e.event_type===P.FORM_SUBMIT||e.event_type===P.FORM_SUBMIT_RESULT?"form_submit":"custom"},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===P.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,a,s;n.event_type!==P.FORM_CHANGE?n.event_type!==P.FORM_FOCUS||(s=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(s=s.slice(-4))[0],a=s[1],!o)||!a||o===a||o!==s[2]||a!==s[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,s=null!=(a=null==(o=t.config.form)?void 0:o.zigzagMinCount)?a:2,i.zigzagHits<s)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(a=null==r?void 0:r.data)?void 0:a.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==P.FORM_SUBMIT&&t.event_type!==P.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==P.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,a,s;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(a=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(a=n.changedFieldIds.size/a)<(s=null!=(s=null==(s=t.config.form)?void 0:s.incompleteMinFieldRatio)?s:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(a.toFixed(4)),threshold_ratio:s}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,a,s=String((null==(s=null==n?void 0:n.data)?void 0:s.field_id)||"");s&&(i=t.focusStartMap.get(s))&&(t.focusStartMap["delete"](s),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(a=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:s,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:s,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:a,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||gO.click).errorClickWindowMs)?o:3e3,o=_l(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,a=t.config.performance||gO.performance;a.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=a.slowPageLcpThreshold)?o:4e3,a=null!=(a=a.slowPageInpThreshold)?a:500,o<=r||a<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,a,s=(null==(s=null==n?void 0:n.data)?void 0:s.event_properties)||{},u=(null==n?void 0:n.data)||{};"fail"===String((null==s?void 0:s.status)||(null===(i=u)?void 0:i.status)||"")&&(i=String((null==s?void 0:s.field_id)||(null===(i=u)?void 0:i.field_id)||""),o=String((null==s?void 0:s.form_id)||(null===(o=u)?void 0:o.form_id)||""),a=i||o||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i?"field":"form",ownerKey:a,pageUrl:null==n?void 0:n.page_url,formId:o,fieldId:i,triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:(null==s?void 0:s.validation_code)||(null===(e=u)?void 0:e.validation_code),validation_message:null==(a=null==n?void 0:n.data)?void 0:a.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||gO.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||gO.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=A(A({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),t.pendingDeadClicks.forEach(function(e){clearTimeout(e.timeout)}),t.pendingDeadClicks.clear(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e),0===this.instanceStates.size)&&this.restoreWindowOpenHook()},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear(),this.restoreWindowOpenHook()}})),wO=function(e,t){return void 0===t&&(t=2),"number"==typeof e&&Number.isFinite(e)?(t=Math.pow(10,Math.max(0,Math.min(12,Math.floor(t)))),Math.round(e*t)/t):0},bO=function(e,t){return void 0===t&&(t=2048),"string"==typeof e&&e.trim()?e.trim().slice(0,Math.max(1,Math.floor(t))):"unknown"},kO={enabled:!0,threshold:2e3,noResponseThreshold:5e3,sampleRate:1},_O=new Map,SO=function(e){var t,n=_O.get(e);if(n){n.destroyed=!0;try{null!=(t=n.observer)&&t.disconnect()}catch(u){}n.observer=null,n.lagRecords.length=0,e.lifeCycle.remove("destroy",n.onDestroy),_O["delete"](e)}},qE=new c({name:"lagMonitor",onNewTdem:function(o,e){e=e,void 0===(r=null!=(n=o.config)&&n.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(r=function(){return undefined});var r,t,n,a=!1===e?A(A({},kO),{enabled:!1}):!0===e||e===undefined?A({},kO):!e||"object"!==T(e)||Array.isArray(e)?(r("lagMonitor","invalid_type"),A({},kO)):(n=A({},kO),e.enabled!==undefined&&("boolean"==typeof e.enabled?n.enabled=e.enabled:r("lagMonitor.enabled","invalid_type")),n.threshold=(t=function(e,t,n){return e===undefined?n:"number"!=typeof e?(r(t,"invalid_type"),n):Number.isFinite(e)?e<=0?(r(t,"out_of_range"),n):e:(r(t,"invalid_number"),n)})(e.threshold,"lagMonitor.threshold",kO.threshold),n.noResponseThreshold=t(e.noResponseThreshold,"lagMonitor.noResponseThreshold",kO.noResponseThreshold),e.sampleRate!==undefined&&("number"!=typeof e.sampleRate?r("lagMonitor.sampleRate","invalid_type"):Number.isFinite(e.sampleRate)?e.sampleRate<0||1<e.sampleRate?r("lagMonitor.sampleRate","out_of_range"):n.sampleRate=e.sampleRate:r("lagMonitor.sampleRate","invalid_number")),n.noResponseThreshold<=n.threshold&&(n.noResponseThreshold=Math.max(5e3,n.threshold+1),r("lagMonitor.noResponseThreshold","relation_conflict")),n);if(a.enabled&&"undefined"!=typeof PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")&&(i=a.sampleRate,Math.random()<i)){var i,s=[],u={observer:null,lagRecords:s,sampled:!0,destroyed:!1,onDestroy:function(){return SO(o)}};_O.set(o,u),o.lifeCycle.on("destroy",u.onDestroy);try{u.observer=new PerformanceObserver(function(e){if(!u.destroyed)try{e.getEntries().forEach(function(e){var t,n,r,i;u.destroyed||e.duration<=a.threshold||(t=null==(t=e.scripts)?void 0:t[0],e={name:e.name,timestamp:Date.now(),entryType:e.entryType,startTime:e.startTime,duration:e.duration,invoker:null==t?void 0:t.invoker,sourceURL:null==t?void 0:t.sourceURL},s.push(e),100<s.length&&s.shift(),t=o,r=(e=e).duration>=(n=a).noResponseThreshold,i=Ip(t),e={event_id:xc(),event_type:r?P.NO_RESPONSE:P.LAG_DETECTED,event_category:r?Rc.ERROR:Rc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=t.getOriginFrom)?void 0:r.call(t))||window.location.href,data:A(A({measurements:{duration:wO(e.duration),start_time_ms:wO(e.startTime),lag_threshold_ms:n.threshold,no_response_threshold_ms:n.noResponseThreshold},event_properties:{entry_type:e.entryType||"long-animation-frame",source_url:bO(e.sourceURL,2048),invoker:bO(e.invoker,256)}},i?{replay_id:i}:{}),{tags:{environment:(null==(r=t.config)?void 0:r.env)||"production",version:String((null==(n=t.config)?void 0:n.version)||"")}})},t.reportTDEMEvent(e))})}catch(i){}}),u.observer.observe({type:"long-animation-frame",buffered:!1})}catch(D){SO(o)}}},getLagRecords:function(e){return _l((null==(e=_O.get(e))?void 0:e.lagRecords)||[])},destroy:function(){Array.from(_O.keys()).forEach(SO)}}),EO={enabled:!0,containers:["body","html","#app","#root"],ignoreContainers:[],containerMatchers:{tagName:["body","html"],id:["app","root"],className:[]},ignoreMatchers:{tagName:[],id:[],className:[]},detectStartPosition:{x:0,y:0},emptyElementsPercent:70,sameElementsPercent:70,debounceDuration:2e3,everySideSampleNumber:9,disableSameElementsCheck:!0,ignoreElesWhenDomChange:[],reDetectInterval:2e3,samePointDepth:5,customBlankScreenDector:null},CO=["canvas","img","svg","iframe"],RO=(0,function(e){var t=e.nodeName.toLowerCase(),n=e.id||"",e="string"==typeof(e=e).className?e.className:e.getAttribute("class")||"",r=e.split(" ").filter(Boolean).map(function(e){return"."+e}).join("");return{tagName:t,id:n,className:e,selector:t+(n?"#"+n:"")+r}}),OO=function(t,e){var n;if(null!=(n=null==e?void 0:e.tagName)&&n.some(function(e){return t.tagName===e.toLowerCase().trim()}))return!0;if(t.id&&null!=(n=null==e?void 0:e.id)&&n.some(function(e){return t.id===e.trim()}))return!0;if(t.className&&null!=(n=null==e?void 0:e.className)&&n.length){var r=t.className.split(" ").map(function(e){return e.trim()}).filter(Boolean);if(e.className.some(function(e){return r.includes(e.trim())}))return!0}return!1},xO=function(t,e){return e.some(function(e){return t.selector.includes(e)})},TO=function(e){return{tagName:_l(e.tagName||[]),id:_l(e.id||[]),className:_l(e.className||[])}},IO=function(){return A(A({},EO),{containers:_l(EO.containers),ignoreContainers:_l(EO.ignoreContainers),containerMatchers:TO(EO.containerMatchers),ignoreMatchers:TO(EO.ignoreMatchers),detectStartPosition:A({},EO.detectStartPosition),ignoreElesWhenDomChange:_l(EO.ignoreElesWhenDomChange)})},MO=function(e,t){void 0===t&&(t=2);t=Math.pow(10,t);return Math.round(e*t)/t},AO=new Map,PO=function(e){var t,n=AO.get(e);n&&(n.destroyed=!0,n.detectTimer&&clearTimeout(n.detectTimer),n.bodyWaitTimer&&clearTimeout(n.bodyWaitTimer),null!==n.idleCallbackId&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(n.idleCallbackId),n.idleCallbackId=null),null!==n.bodyWaitFrame&&(window.cancelAnimationFrame||clearTimeout)(n.bodyWaitFrame),null!=(t=n.observer)&&t.disconnect(),e.lifeCycle.remove("errorOccurred",n.onErrorOccurred),e.lifeCycle.remove("destroy",n.onDestroy),window.removeEventListener("pagehide",n.handlePageHide),window.removeEventListener("beforeunload",n.handleBeforeUnload),document.removeEventListener("visibilitychange",n.handleVisibilityChange),AO["delete"](e))},o=new c({name:"blankScreen",onNewTdem:function(_,e){var S,E,C,R,O,t,x,n,r,i,o,a,s,u,l,c,d,f,h,p,m,g=this;"undefined"!=typeof document&&document.elementsFromPoint&&(e=e,void 0===(s=null!=(m=_.config)&&m.debug?function(e,t){"undefined"!=typeof console&&console.warn&&console.warn("[TDEM] "+e+": "+t+", fallback applied")}:function(){return undefined})&&(s=function(){return undefined}),m=IO(),(S=!1===e?A(A({},m),{enabled:!1}):!0===e||e===undefined?m:!e||"object"!==T(e)||Array.isArray(e)?(s("blankScreen","invalid_type"),m):(u="containerMatchers"in(e=e)||"ignoreMatchers"in e,p="containers"in e||"ignoreContainers"in e,l=function(e,t,n,r){return e===undefined?_l(t):Array.isArray(e)&&e.length<=100&&e.every(function(e){return"string"==typeof e&&0<e.trim().length&&e.trim().length<=r})?e.map(function(e){return e.trim()}):(s(n,"invalid_array"),_l(t))},h=function(e,t,n){return e===undefined?TO(t):!e||"object"!==T(e)||Array.isArray(e)?(s(n,"invalid_type"),TO(t)):{tagName:l((e=e).tagName,t.tagName||[],n+".tagName",128),id:l(e.id,t.id||[],n+".id",128),className:l(e.className,t.className||[],n+".className",128)}},c=function(e,t,n,r){return e===undefined?t:"number"!=typeof e?(s(n,"invalid_type"),t):Number.isFinite(e)?r(e)?e:(s(n,"out_of_range"),t):(s(n,"invalid_number"),t)},d=function(e,t,n,r,i){return c(e,t,n,function(e){return Number.isInteger(e)&&r<=e&&e<=i})},f=IO(),e.enabled!==undefined&&("boolean"==typeof e.enabled?f.enabled=e.enabled:s("blankScreen.enabled","invalid_type")),f.containers=l(e.containers,m.containers,"blankScreen.containers",256),f.ignoreContainers=l(e.ignoreContainers,m.ignoreContainers,"blankScreen.ignoreContainers",256),f.containerMatchers=h(e.containerMatchers,m.containerMatchers,"blankScreen.containerMatchers"),f.ignoreMatchers=h(e.ignoreMatchers,m.ignoreMatchers,"blankScreen.ignoreMatchers"),p&&!u&&(f.containerMatchers={tagName:[],id:[],className:[]},f.ignoreMatchers={tagName:[],id:[],className:[]}),(h=e.detectStartPosition)===undefined||h&&"object"===T(h)&&!Array.isArray(h)?f.detectStartPosition={x:c((p=h||{}).x,m.detectStartPosition.x,"blankScreen.detectStartPosition.x",function(e){return 0<=e}),y:c(p.y,m.detectStartPosition.y,"blankScreen.detectStartPosition.y",function(e){return 0<=e})}:s("blankScreen.detectStartPosition","invalid_type"),f.emptyElementsPercent=c(e.emptyElementsPercent,m.emptyElementsPercent,"blankScreen.emptyElementsPercent",function(e){return 0<e&&e<=100}),f.sameElementsPercent=c(e.sameElementsPercent,m.sameElementsPercent,"blankScreen.sameElementsPercent",function(e){return 0<e&&e<=100}),f.debounceDuration=c(e.debounceDuration,m.debounceDuration,"blankScreen.debounceDuration",function(e){return 0<=e}),f.reDetectInterval=c(e.reDetectInterval,m.reDetectInterval,"blankScreen.reDetectInterval",function(e){return 0<e}),f.everySideSampleNumber=d(e.everySideSampleNumber,m.everySideSampleNumber,"blankScreen.everySideSampleNumber",2,50),f.samePointDepth=d(e.samePointDepth,m.samePointDepth,"blankScreen.samePointDepth",1,20),e.disableSameElementsCheck!==undefined&&("boolean"==typeof e.disableSameElementsCheck?f.disableSameElementsCheck=e.disableSameElementsCheck:s("blankScreen.disableSameElementsCheck","invalid_type")),f.ignoreElesWhenDomChange=l(e.ignoreElesWhenDomChange,m.ignoreElesWhenDomChange,"blankScreen.ignoreElesWhenDomChange",256),e.customBlankScreenDector!==undefined&&(null===e.customBlankScreenDector||"function"==typeof e.customBlankScreenDector?f.customBlankScreenDector=e.customBlankScreenDector:s("blankScreen.customBlankScreenDector","invalid_type")),f)).enabled)&&(u=function(e,t,n){e=4*e-3;return{totalSamplePoints:e,whitePointThreshold:Math.floor(e*t/100),samePointThreshold:Math.floor(e*n/100)}}(S.everySideSampleNumber,S.emptyElementsPercent,S.sameElementsPercent),E=u.totalSamplePoints,C=u.whitePointThreshold,R=u.samePointThreshold,O={observer:null,detectTimer:null,bodyWaitTimer:null,bodyWaitFrame:null,idleCallbackId:null,destroyed:!1,initialDetectionPending:!0,incidentStatus:"healthy",preDetectResult:null,triggerType:"dom_change",onErrorOccurred:function(){return undefined},onDestroy:function(){return PO(_)},handlePageHide:function(){return undefined},handleBeforeUnload:function(){return undefined},handleVisibilityChange:function(){return undefined}},AO.set(_,O),t=function(){return bl(g,void 0,void 0,function(){var l,c,d,f,h,p,m,g,v,y,w,b,k;return kl(this,function(e){var t,n,r,i,o,a,s,u;if(!O.destroyed)try{if("initial_load"===O.triggerType&&(O.initialDetectionPending=!1),l=window.innerHeight,c=window.innerWidth,d=S.detectStartPosition,f=d.x,h=d.y,c<=f||l<=h)return[2];if(p=[],g=m=0,function(e,t,n,r){for(var i=r.x,o=r.y,a=i+(e-i)/2,s=o+(t-o)/2,u=n+1,l=[],c=1;c<u;c+=1){var d=i+(e-i)*c/u,f=o+(t-o)*c/u;l.push({x:d,y:s}),c!==u/2&&l.push({x:a,y:f},{x:d,y:f},{x:d,y:t-f})}return l}(c,l,S.everySideSampleNumber,S.detectStartPosition).forEach(function(e){a=e.x,s=e.y,e=document.elementsFromPoint(a,s),e=(u=function(e){var t=e[0];if(t&&null!==t.shadowRoot){t=(null==(t=t.shadowRoot)?void 0:t.elementsFromPoint(a,s))||[];if(t.length>e.length)return u(t)}return e})(e),t=S.containers,n=S.ignoreContainers,r=S.containerMatchers,l=S.ignoreMatchers,e=e.map(RO),o=e.map(function(e){return e.selector});var t,n,r,i,o,a,s,u,l=(e=e[0])?(r=(i=!(!r||!(null!=(i=r.tagName)&&i.length||null!=(i=r.id)&&i.length||null!=(i=r.className)&&i.length)))?OO(e,r):xO(e,t),t=i?OO(e,l):xO(e,n),{isWhitePoint:r&&!t,selectorPointers:o}):{isWhitePoint:!1,selectorPointers:o};l.isWhitePoint&&(m+=1),p.push(l.selectorPointers)}),v=C<=m,y=!1,S.disableSameElementsCheck||(w=p.map(function(e){return e.slice(0,S.samePointDepth)}),o={},w.map(function(e){return e.join(" < ")}).forEach(function(e){o[e]=o[e]?o[e]+1:1}),a=Object.keys(o).map(function(e){return[e,o[e]]}).sort(function(e,t){return t[1]-e[1]})[0]||["",0],s=a[0],b={samePointerMap:o,maximumSamePointerClass:s,maximumSamePointerCounter:a[1]},y=R<=(g=b.maximumSamePointerCounter)&&(u=b.maximumSamePointerClass,!CO.some(function(e){return u.startsWith(e)}))),k=!1,S.customBlankScreenDector)try{k=!0===S.customBlankScreenDector()}catch(J){k=!1}if(!(v||y||k))return O.incidentStatus="healthy",O.preDetectResult=null,[2];if("reported"===O.incidentStatus)return[2];if("suspect"===O.incidentStatus&&O.preDetectResult)return t=O.preDetectResult,r=t.customTriggered?"custom":t.whitePointTriggered&&t.sameElementTriggered?"both":t.whitePointTriggered?"white_point":"same_element",i=Ip(_),t={event_id:xc(),event_type:P.BLANK_SCREEN,event_category:Rc.ERROR,timestamp:Date.now(),page_url:(null==(n=_.getOriginFrom)?void 0:n.call(_))||window.location.href,data:A(A({measurements:{white_point_count:t.whitePointCount,same_point_count:t.samePointCount,total_sample_points:E,white_point_threshold:C,same_point_threshold:R,white_point_ratio:MO(t.whitePointCount/E,6),same_point_ratio:MO(t.samePointCount/E,6),viewport_width_px:Math.max(0,Math.round(window.innerWidth)),viewport_height_px:Math.max(0,Math.round(window.innerHeight))},event_properties:{trigger_reason:r,trigger_type:t.triggerType,detection_method:t.customTriggered?"custom_detector":"viewport_sampling",same_elements_check_enabled:String(!S.disableSameElementsCheck)}},i?{replay_id:i}:{}),{tags:{environment:(null==(n=_.config)?void 0:n.env)||"production",version:String((null==(r=_.config)?void 0:r.version)||"")}})},_.reportTDEMEvent(t),O.incidentStatus="reported",O.preDetectResult=null,[2];O.preDetectResult={whitePointCount:m,samePointCount:g,whitePointTriggered:v,sameElementTriggered:y,customTriggered:k,triggerType:O.triggerType},O.incidentStatus="suspect",O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},S.reDetectInterval)}catch(J){}return[2]})})},x=function(){return bl(g,void 0,void 0,function(){return kl(this,function(e){switch(e.label){case 0:if(O.destroyed)return[2];if("function"!=typeof window.requestIdleCallback)return[3,5];e.label=1;case 1:return e.trys.push([1,2,,4]),O.idleCallbackId=window.requestIdleCallback(function(e){O.idleCallbackId=null,O.destroyed||(0<e.timeRemaining()?t():O.detectTimer=setTimeout(function(){O.detectTimer=null,t()},0))}),[3,4];case 2:return e.sent(),[4,t()];case 3:return e.sent(),[3,4];case 4:return[3,7];case 5:return[4,t()];case 6:e.sent(),e.label=7;case 7:return[2]}})})},n=function(e){void 0===e&&(e="dom_change"),O.destroyed||"suspect"===O.incidentStatus||"initial_load"!==e&&O.initialDetectionPending||(O.triggerType=e,O.detectTimer&&clearTimeout(O.detectTimer),O.detectTimer=setTimeout(function(){O.detectTimer=null,x()},S.debounceDuration))},O.onErrorOccurred=function(){return n("error")},_.lifeCycle.on("errorOccurred",O.onErrorOccurred),_.lifeCycle.on("destroy",O.onDestroy),r=function(){!O.destroyed&&document.body&&(O.observer=new MutationObserver(function(e){var t=null==(t=e[0])?void 0:t.target;if(1===e.length&&t instanceof Element){e=RO(t).selector;if(S.ignoreElesWhenDomChange.includes(e))return}n("dom_change")}),O.observer.observe(document.body,{childList:!0,subtree:!0}))},document.body?r():(i=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},o=function(){document.body?(O.bodyWaitTimer&&clearTimeout(O.bodyWaitTimer),r()):O.bodyWaitFrame=i(o)},O.bodyWaitFrame=i(o),O.bodyWaitTimer=setTimeout(function(){null!==O.bodyWaitFrame&&((window.cancelAnimationFrame||clearTimeout)(O.bodyWaitFrame),O.bodyWaitFrame=null)},1e4)),O.handlePageHide=a=function(){O.destroyed||(O.detectTimer&&clearTimeout(O.detectTimer),O.triggerType="page_state",O.preDetectResult&&(O.preDetectResult.triggerType="page_state"),t())},O.handleBeforeUnload=a,O.handleVisibilityChange=function(){"hidden"===document.visibilityState&&a()},window.addEventListener("pagehide",O.handlePageHide),window.addEventListener("beforeunload",O.handleBeforeUnload),document.addEventListener("visibilitychange",O.handleVisibilityChange),n("initial_load"))},destroy:function(){Array.from(AO.keys()).forEach(PO)}}),LO={enabled:!0,enableMemoryReport:!0,enableOOMReport:!0,oomThreshold:100,memoryReportInterval:6e4,oomCheckInterval:1e4,monitorPages:[],sampleRate:1},DO=new Map,NO=function(e,t,n){null!=(e=null==e?void 0:e.config)&&e.debug&&"undefined"!=typeof console&&console.warn("[TDEM] "+t+": "+n+", fallback applied")},FO=function(e){return"number"==typeof e&&Number.isFinite(e)},UO=function(){var e;try{var t=null==(e=window.performance)?void 0:e.memory;return!t||!FO(t.usedJSHeapSize)||!FO(t.totalJSHeapSize)||!FO(t.jsHeapSizeLimit)||t.usedJSHeapSize<0||t.totalJSHeapSize<0||t.jsHeapSizeLimit<0?null:{used:t.usedJSHeapSize,total:t.totalJSHeapSize,limit:t.jsHeapSizeLimit,ratio:0<t.jsHeapSizeLimit?Math.min(1,t.usedJSHeapSize/t.jsHeapSizeLimit):0}}catch(_){return null}},jO=function(e){var t=DO.get(e);t&&(t.destroyed=!0,t.reportTimer&&clearInterval(t.reportTimer),t.oomCheckTimer&&clearInterval(t.oomCheckTimer),t.records.length=0,e.lifeCycle.remove("destroy",t.onDestroy),"undefined"!=typeof window&&(window.removeEventListener("pagehide",t.onPageExit),window.removeEventListener("beforeunload",t.onPageExit)),DO["delete"](e))},BO=function(e,t,n){var r,i,o;t.destroyed||(i=UO())&&(t.records.push(i),50<t.records.length&&t.records.shift(),o=Ip(e),n={event_id:xc(),event_type:n,event_category:Rc.PERFORMANCE,timestamp:Date.now(),page_url:(null==(r=e.getOriginFrom)?void 0:r.call(e))||window.location.href,data:A(A({measurements:A({used_js_heap_size_bytes:i.used,total_js_heap_size_bytes:i.total,js_heap_size_limit_bytes:i.limit,usage_ratio:i.ratio},n===P.MEMORY_OOM?{oom_threshold_mb:t.config.oomThreshold}:{}),event_properties:{detection_source:"performance_memory"}},o?{replay_id:o}:{}),{tags:{environment:(null==(r=e.config)?void 0:r.env)||"production",version:String((null==(i=e.config)?void 0:i.version)||"")}})},e.reportTDEMEvent(n))},ut=new c({name:"memoryMonitor",onNewTdem:function(n,t){r=n;var r,i,o,a,e,s,u=!1===(e=t)?A(A({},LO),{enabled:!1}):(i=e&&"object"===T(e)?e:{},e===undefined||!0===e||e&&"object"===T(e)&&!Array.isArray(e)||NO(r,"memoryMonitor","invalid_type"),o=A(A({},LO),{oomThreshold:0<(e=(null==(e=UO())?void 0:e.limit)||0)?Math.round(e/1024/1024*.9):100}),["enabled","enableMemoryReport","enableOOMReport"].forEach(function(e){i[e]!==undefined&&("boolean"==typeof i[e]?o[e]=i[e]:NO(r,"memoryMonitor."+e,"invalid_type"))}),["oomThreshold","memoryReportInterval","oomCheckInterval"].forEach(function(e){var t=i[e];t!==undefined&&(FO(t)&&0<t?o[e]=t:NO(r,"memoryMonitor."+e,FO(t)?"out_of_range":"invalid_number"))}),i.sampleRate!==undefined&&(FO(i.sampleRate)&&0<=i.sampleRate&&i.sampleRate<=1?o.sampleRate=i.sampleRate:NO(r,"memoryMonitor.sampleRate","out_of_range")),i.monitorPages!==undefined&&(Array.isArray(i.monitorPages)&&i.monitorPages.length<=100&&i.monitorPages.every(function(e){return"string"==typeof e&&!!e||e instanceof RegExp})?o.monitorPages=_l(i.monitorPages):NO(r,"memoryMonitor.monitorPages","invalid_value")),o);!u.enabled||!function(){var e;try{return"undefined"!=typeof window&&null!=(e=window.performance)&&e.memory}catch(t){}}()||Math.random()>=u.sampleRate||(e=u.monitorPages).length&&(s="undefined"==typeof window?"":window.location.href,!e.some(function(e){return"string"==typeof e?s.includes(e):(e.lastIndex=0,e.test(s))}))||(a={config:u,reportTimer:null,oomCheckTimer:null,lastOOMTime:0,records:[],destroyed:!1,onDestroy:function(){return jO(n)},onPageExit:function(){return jO(n)}},DO.set(n,a),n.lifeCycle.on("destroy",a.onDestroy),"undefined"!=typeof window&&(window.addEventListener("pagehide",a.onPageExit),window.addEventListener("beforeunload",a.onPageExit)),u.enableMemoryReport&&(a.reportTimer=setInterval(function(){return BO(n,a,P.MEMORY_USAGE)},u.memoryReportInterval)),u.enableOOMReport&&(a.oomCheckTimer=setInterval(function(){var e=UO(),t=Date.now();e&&e.used/1024/1024>u.oomThreshold&&3e5<t-a.lastOOMTime&&(a.lastOOMTime=t,BO(n,a,P.MEMORY_OOM))},u.oomCheckInterval)))},destroy:function(){Array.from(DO.keys()).forEach(jO)}});function zO(e,t){try{var n={projectKey:e,document:t,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(n))}catch(F0){}}function WO(e){var t;try{var n,r=localStorage.getItem("TDEM_SAMPLE_CONFIG");return r?!((n=JSON.parse(r)).projectKey!==e||6048e5<=Date.now()-n.timestamp)&&null!=(t=n.document)&&t.event?n.document:null:null}catch(b){return null}}function HO(e,t){try{var n=e.config.sessionReplay,r=t,i=(!1===n&&(r=A(A({},t),{replay:A(A({},t.replay),{enabled:!1})})),e._tdemSampleConfig=r,e._tdemSampleGate||null);null!=i&&i.decide(!0),o=e,u=(null==r?void 0:r.replay)||{},l={},"boolean"==typeof u.enabled&&(l.enabled=u.enabled),u.experience_sample_rate!==undefined&&(l.experience_sample_rate=Number(u.experience_sample_rate)),"boolean"==typeof u.error_traceback&&(l.error_traceback=u.error_traceback),u.error_sample_rate!==undefined&&(l.error_sample_rate=Number(u.error_sample_rate)),a=l,a=fO(o.config.sessionReplay,a),o._effectiveReplayPolicy=a,o._replaySampled=a.enabled,"function"==typeof(s=null==(s=null==(o=null==(s=null==(o=o.constructor.installedPlugins)?void 0:o.find)?void 0:s.call(o,function(e){return e&&"sessionReplay"===e.name}))?void 0:o.option)?void 0:s.applyEffectivePolicy)&&s.call(o.option,a)}catch(Pe){console.warn("[TDEM] sample config apply failed",Pe),e._tdemSampleConfig=np}var o,a,s,u,l}function qO(e,t){var n=e.config.sampleConfigPreference||"remote-first",e=e.config.sampleConfig;n=n||"remote-first";try{return"local-first"===n?e||t||np:t||e||np}catch(F0){return e||np}}a=new c({name:"tdemConfig",onNewTdem:function(e){try{var t=e._prefetchedConfigData;null!=t&&t.event?HO(e,qO(e,t)):HO(e,qO(e,null)),function(a){var s;bl(this,void 0,void 0,function(){var n,r,i,o;return kl(this,function(e){switch(e.label){case 0:if(n=a.config.id,null!=(r=a._prefetchedConfigData)&&r.event)return delete a._prefetchedConfigData,i=qO(a,r),n&&zO(n,i),HO(a,i),[2];if(!n)return HO(a,qO(a,null)),[2];if(t=(a.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/sample-config":""))return HO(a,qO(a,WO(n))),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,a.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(o=e.sent()).ok)throw new Error("HTTP "+o.status);if(0===(o="string"==typeof o.body?JSON.parse(o.body):o.body).code&&null!=(s=o.data)&&s.event)return i=qO(a,o.data),zO(n,i),HO(a,i),[2];throw new Error("API error: code="+o.code);case 3:return o=e.sent(),console.warn("[TDEM] Failed to fetch sample-config:",o),HO(a,qO(a,WO(n))),[3,4];case 4:return[2]}var t})})}(e)}catch(Pe){console.warn("[TDEM] tdemConfig init failed",Pe),HO(e,np)}}});return yv.use(Hp),yv.use(Nr),yv.use(Nt),yv.use(s),yv.use(zt),yv.use(Hr),yv.use(Wp),yv.use(Fe),yv.use(je),yv.use(qr),yv.use(i),yv.use(r),yv.use(a),yv.use(mO),yv.use(HE),yv.use(qE),yv.use(o),yv.use(ut),yv});
|