tdem-web-sdk 1.0.6 → 1.0.8
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 +23 -1
- package/lib/packages/core/src/core.d.ts +11 -2
- package/lib/packages/core/src/index.d.ts +1 -1
- package/lib/packages/core/src/interface/event.d.ts +5 -0
- package/lib/packages/core/src/interface/index.d.ts +1 -0
- package/lib/packages/core/src/interface/transport.d.ts +48 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/constants.d.ts +13 -1
- package/lib/packages/web-sdk/src/plugins/session-replay/index.d.ts +7 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/replay-policy.d.ts +39 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/sampler-manager.d.ts +4 -0
- package/lib/packages/web-sdk/src/plugins/session-replay/session-manager.d.ts +4 -1
- package/lib/packages/web-sdk/src/plugins/session-replay/types.d.ts +28 -4
- package/lib/packages/web-sdk/src/plugins/tdem-config.d.ts +2 -2
- package/lib/packages/web-sdk/src/tdem.d.ts +7 -3
- package/lib/packages/web-sdk/src/transport/browser-transport.d.ts +11 -0
- package/lib/packages/web-sdk/src/util/shared-session.d.ts +1 -1
- package/lib/tdem.f.min.js +5 -5
- package/lib/tdem.global.min.js +5 -5
- package/lib/tdem.ie.min.js +5 -5
- package/lib/tdem.min.js +5 -5
- package/package.json +3 -3
package/lib/tdem.global.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* tdem-web-sdk@1.0.
|
|
2
|
+
* ===========================================================================
|
|
3
|
+
* tdem-web-sdk@1.0.8 (c) 2026 TencentCloud Real User Monitoring.
|
|
4
4
|
* Author pumpkincai.
|
|
5
|
-
* Last Release Time Thu
|
|
5
|
+
* Last Release Time Thu Aug 06 2026 20:37:44 GMT+0800 (China Standard Time).
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
* Thanks for supporting TDEM!
|
|
8
|
-
*
|
|
8
|
+
* ===========================================================================
|
|
9
9
|
**/
|
|
10
|
-
var TDEM=(()=>{var x,O;function A(e){this.name="__st"+(1e9*Math.random()>>>0)+x+"__",null!=e&&e.forEach(this.add,this),x+=1}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}}}),window.WeakSet||(x=Date.now()%1e9,A.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},A.prototype.delete=function(e){return!!e[this.name]&&!(e[this.name]=void 0)},A.prototype.has=function(e){return!!e[this.name]},O=A,Object.defineProperty(window,"WeakSet",{value:function(e){return new O(e)}})),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if(null!=(r=arguments[n]))for(var r=Object(r),i=Object.keys(Object(r)),o=0,s=i.length;o<s;o++){var a=i[o],l=Object.getOwnPropertyDescriptor(r,a);null!=l&&l.enumerable&&(t[a]=r[a])}return t}});var T=function(e,t){return(T=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)},f=function(){return(f=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 M(e,s,a,l){return new(a=a||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((l=l.apply(e,s||[])).next())})}function P(r,i){var o,s,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[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(;l;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!((a=0<(a=l.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){l=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))l.label=t[1];else if(6===t[0]&&l.label<a[1])l.label=a[1],a=t;else{if(!(a&&l.label<a[2])){a[2]&&l.ops.pop(),l.trys.pop();continue}l.label=a[2],l.ops.push(t)}}t=i.call(r,l)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function N(){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],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function D(e,t){return void 0===t&&(t="https://dem.rumt-zh.com"),t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com"),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}function F(e){try{return localStorage.getItem(e)}catch(e){return null}}function U(e,t){try{localStorage.setItem(e,t)}catch(e){}}function z(e,t){try{return e?JSON.parse(e):t}catch(e){return t}}var B,j=/_?t(\d)?(imestamp)?=\d+&?/g,W=["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"],H=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],Z=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],V=["static","fetch"],G="unknown",Y=(J.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},J.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},J.prototype.one=function(e,t){this.on(e,t,1)},J.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(e){}}return null}},J.prototype.clear=function(){this.eventsList={}},J);function J(){var s=this;this.emit=function(e,t){if(s){var n;if(null!=(r=s.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(s,[t]);if(1===n.type&&s.remove(e,n.callback),!1===o)break}catch(e){throw e}}return s}},this.eventsList={}}function K(e,t){return"number"==typeof e||"string"==typeof e?e:t?B.string:B.number}function X(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e}function q(e,t){return void 0===t&&(t=2048),String(e).replace(j,"").slice(0,t)}function $(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)}function ee(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)?G:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:G,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(ce=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==ce.indexOf(e.toLowerCase())});return s.length?{code:""+(o="未知"!==(o=e[s[0]])&&""!==o?o:G),isErr:0!==o&&"0"!==o&&o!==G}:{code:G,isErr:!1}}catch(e){return{code:G,isErr:!1}}}function te(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 fe(r).slice(0,10240)}catch(e){return""}}function ne(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,de(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,de(),2)||"undefined"}catch(e){return"error happen when tdem stringify: \n "+e.message+" \n "+e.stack}}function re(e,t){var n,r={fetch:[],static:[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=ge(e);r[e.type].push(t)}):(n=ge(e),r[e.type].push(n)),i.append("payload",he(f({duration:r},t))),i}function oe(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||ve.test(t)||W.some(function(e){return-1<t.indexOf(e)})}(e=B=B||{})[e.number=-1]="number",e.string="";var se,ae,p,m,le=["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"],ue=/\.(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,ce=["ret","retcode","code","errcode"],de=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"==typeof t&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},he=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,de())||"undefined"}catch(e){return"error happen when tdem stringify: \n "+e.message+" \n "+e.stack}},fe=function(n,r){void 0===r&&(r=3);var i,o,s,a="";return Array.isArray(n)?(a+="[",i=n.length,n.forEach(function(e,t){a=(a+="object"==typeof e&&1<r?fe(e,r-1):me(e))+(t===i-1?"":",")}),a+="]"):n instanceof Object||"object"==typeof n?(a="{",o=Object.keys(n),s=o.length,o.forEach(function(e,t){"object"==typeof n[e]&&1<r?a+='"'+e+'":'+fe(n[e],r-1):a+=pe(e,n[e]),a+=t===s-1||t<s-1&&void 0===n[o[t+1]]?"":","}),a+="}"):a+=n,a},pe=function(e,t){var n=typeof t,r="";return"string"==n||"object"==n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"==typeof t?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!=n||(r+='"'+e+'": '+t),r},me=function(e){var t=typeof e;return""+("undefined"==t||"symbol"==t||"function"==t?"null":"string"==t||"object"==t?'"'+e+'"':e)},ge=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},ve=/data:(image|text|application|font)\/.*;base64/;function g(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function ye(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,s,a,l,u,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],s=d[2],a=d[3],l=d[4],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,function:o||"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(s=d[1],a=d[2],l=d[3],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,function:"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++}))}return t}function we(u,c){return function(i,o){var a,s,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(a=function(e,t){var n,r,t=f(f({},u.bean),{from:t}),i=f({},u.bean);return(()=>{try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(e){}})()?re(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(f({duration:r},e)),i)},s=function(e,t,n,r){switch(t){case se.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)}))),s={};return o.forEach(function(t){s[t]=i.map(function(e){return e[t]||""})}),s.count=i.length,he(s);case se.SPEED:return a(e,n);case se.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(f(f({},i),{url:t,log:1===n.length?n[0]:n,data:s(n,c,e,i.data)}))):(t=i.url+r+"from="+e,o(f(f({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:N(i.beanFilter||[],["from"]),data:s(n,c,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(n=i.url)&&n.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(f(f({},i),{url:n,log:e,beanFilter:N(i.beanFilter||[],["from"]),data:s(e,c,t,i.data)}))):(n=""+i.url,o(f(f({},i),{url:n,log:e,data:s(e,c,t,i.data)}))))):o(i)}}function be(l,u){return function(e,t){var n,r,i,o=Array.isArray(e),s=o?e:[e],a=(l.lifeCycle.emit("beforeRequest",e),l.config.beforeRequest);(s="function"==typeof a?s.map(function(t){try{var e=a({logs:t,logType:u});return(null==e?void 0:e.logType)===u&&null!=e&&e.logs?e.logs:!1!==e&&t}catch(e){return t}}).filter(function(e){return!1!==e}):s).length&&(n=s,e=Z,!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]=""}),f(f({},t),e)}))),s=n,t(o?s:s[0]))}}function ke(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"==typeof r&&"url"in r&&(e=r)}catch(e){console.error(e)}t(e)}}function Se(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)}}(e=se=se||{}).LOG="log",e.SPEED="speed",e.PERFORMANCE="performance",e.OFFLINE="offline",e.WHITE_LIST="whiteList",e.VITALS="vitals",e.PV="pv",e.CUSTOM_PV="customPV",e.EVENT="event",e.CUSTOM="custom",e.SDK_ERROR="sdkError",e.SET_DATA="setData",e.LOAD_PACKAGE="loadPackage",e.MEMORY="memory",(e=ae=ae||{}).production="production",e.development="development",e.gray="gray",e.pre="pre",e.daily="daily",e.local="local",e.test="test",e.others="others",(e=p=p||{}).JS_ERROR="js_error",e.PROMISE_ERROR="promise_error",e.RESOURCE_ERROR="resource_error",e.API_ERROR="api_error",e.PAGE_LOAD="page_load",e.RESOURCE_LOAD="resource_load",e.API_CALL="api_call",e.true="web_vitals",e.CLICK="click",e.PAGE_VIEW="page_view",e.TAB_HIDDEN="tab_hidden",e.TAB_VISIBLE="tab_visible",e.WINDOW_BLUR="window_blur",e.WINDOW_FOCUS="window_focus",e.FORM_FOCUS="form_focus",e.FORM_BLUR="form_blur",e.FORM_CHANGE="form_change",e.FORM_SUBMIT="form_submit",e.FORM_SUBMIT_RESULT="form_submit_result",e.STRUGGLE="struggle",e.CUSTOM="custom",e.LOG="log",(e=m=m||{}).ERROR="error",e.PERFORMANCE="performance",e.BEHAVIOR="behavior",e.NETWORK="network",e.LOG="log",e.CUSTOM="custom";var _e=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})})},Ce={},Ie={},Ee=function(e){return Ce[e]||(Ce[e]=setTimeout(function(){Ie[e]={},Ce[e]=null},6e4)),Ce[e]},Re={generateTraceId:Oe(16),generateSpanId:Oe(8)},xe=Array(32);function Oe(t){return function(){for(var e=0;e<2*t;e++)xe[e]=Math.floor(16*Math.random())+48,58<=xe[e]&&(xe[e]+=39);return String.fromCharCode.apply(null,xe.slice(0,2*t))}}function De(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}function Le(){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)})}function Fe(e){for(var t,n,r,i="",o=0,s=(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+=Be.charAt((t=t<<16|n<<8|r)>>18&63)+Be.charAt(t>>12&63)+Be.charAt(t>>6&63)+Be.charAt(63&t)}return s?i.slice(0,s-3)+"===".substring(s):i}function Ue(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!je.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=Be.indexOf(e.charAt(o++))<<18|Be.indexOf(e.charAt(o++))<<12|(n=Be.indexOf(e.charAt(o++)))<<6|(r=Be.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}function ze(e){var t,n="";return n="object"==typeof e&&(t=(e=((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(He)))[0])?He[t](e[1]):n}var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",je=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,We=(Ze.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}}},Ze.prototype.createTraceparent=function(){var e=Re.generateSpanId();return"00-"+Re.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},Ze.prototype.createB3=function(){var e=Re.generateSpanId();return Re.generateTraceId()+"-"+e+"-"+this.traceFlag},Ze.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Fe,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Le(),i=Le();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.6"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},Ze.prototype.createSentryTrace=function(){var e=De().substring(16);return De()+"-"+e+"-"+this.traceFlag},Ze.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},Ze.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},Ze.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},Ze),He={sw8:function(e){var t="function"==typeof atob?atob:Ue,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]}};function Ze(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=null==r?1:Number(!!r)}function Ve(o){return function(e){e&&0!==e.length&&o.sendPipeline([function(t,e){var n,r={protocol_version:2,project_key:String(o.config.id||""),sdk:{name:"tdem-web-sdk",version:$e.version},app:{version:String(o.config.version||"1.0.0")},context:(n=o,r=String((null==(i=null==(i=null==(r=n.sessionManager)?void 0:r.getSession)?void 0:i.call(r))?void 0:i.id)||n.bean.sessionId||""),i=String(n.config.userId||n.config.uin||""),n={session_id:r,platform:(r=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","android","ios","unknown"].includes(r)?r:["wx","my","qq","tt"].includes(r)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},i&&(n.user_id=i),"undefined"!=typeof navigator&&(n.user_agent=navigator.userAgent,n.language=navigator.language),"undefined"!=typeof screen&&(n.screen_resolution=screen.width+"x"+screen.height),n),events:t},i=String(o.config.url||"").replace(/\/+$/,"");i&&e({url:i+"/api/v1/collect/events",data:JSON.stringify(r),method:"POST",contentType:"application/json",addBean:!1,type:se.EVENT,log:t,success:function(){o.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){o.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],se.EVENT)(e)}}function Ge(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||Xe)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=Xe),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")}function Ye(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(){})})}function Je(){return void 0!==window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now}function Ke(e){var t;return-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf(e))}var Xe=function(){},qe={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},Qe={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},$e=(u.use=function(e){-1===u.installedPlugins.indexOf(e)&&e.tdemPlugin&&u.installedPlugins.push(e)},u.unuse=function(e){e=u.installedPlugins.indexOf(e);-1!==e&&u.installedPlugins.splice(e,1)},u.prototype.init=function(e){this.setConfig(e),this.config=D(this.config,e.hostUrl);for(var t=0;t<u.installedPlugins.length;t++)try{u.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited")},u.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=u.instances.indexOf(this);-1!==r&&u.instances.splice(r,1);for(var i=u.installedPlugins.length-1;0<=i;i--)try{u.installedPlugins[i].unpatch(this)}catch(e){this.sendSDKError(e)}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&&Ye(o,this),o=Object.getPrototypeOf(o););0===u.instances.length&&(r=Object.getPrototypeOf(this).constructor,Ye(r),Ye(u))}},u.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,s=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(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.6",this.bean.aid=i||"",this.bean.env=(()=>{switch(s){case ae.production:case ae.development:case ae.gray:case ae.pre:case ae.daily:case ae.local:case ae.test:case ae.others:return 1;default:return}})()?s:ae.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},u.prototype.extendBean=function(e,t){this.bean[e]=t},u.prototype.send=function(e,i,o){var t=this;return Ge([ke(this),we(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)})},Se(this)])(e)},u.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(ne(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.6)",addBean:!1,method:"get",type:se.SDK_ERROR,log:e})}],se.SDK_ERROR)(e)},u.prototype.sendPipeline=function(e,t){var n,o=this;return Ge(N([function(e,t){if(e&&e.type===se.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}},be(n=this,t)],e,[we(this,t),ke(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,N([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,N([r],t))})},Se(this)]))},u.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:g(),event_type:p.CUSTOM,event_category:m.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{event_name:e,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),payload:this.sanitizeEventPayload(t.payload),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},u.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return f(f({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:f(f({},e.data),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))},u.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")},u.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")},u.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?void 0!==(n=this.getTimeEventDuration(e))?(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")},u.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:g(),event_type:p.LOG,event_category:m.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(f({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},u.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:g(),event_type:p.JS_ERROR,event_category:m.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:ye(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(f(f({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},u.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:f(f({},this.config.defaultTags||{}),e||{})})},u.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=f({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},u.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},u.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},u.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},u.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:qe[r],n="number"==typeof e.weight?e.weight:Qe[r],r={event_id:g(),event_type:p.STRUGGLE,event_category:m.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:{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")},u.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:g(),event_type:p.FORM_SUBMIT_RESULT,event_category:m.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):void 0,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")},u.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:g(),event_type:p.PAGE_VIEW,event_category:m.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(f(f(f(f(f(f(f({},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)},u.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:f({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")},u.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},u.prototype.getCurrentEventPageUrl=function(e){var t;if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(e){return this.config.pageUrl||"undefined"!=typeof window&&(null==(t=window.location)?void 0:t.href)||""}},u.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(t=null==(e=this.sessionManager)?void 0:e.getSession)?void 0:t.call(e))?void 0:t.replayId)||"")},u.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},u.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||void 0},u.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(f(f({},this.config.defaultTags||{}),e||{}))},u.prototype.sanitizeStringMap=function(n,r){var i;if(void 0===r&&(r=1024),n&&"object"==typeof n)return i={},Object.keys(n).forEach(function(e){var t=n[e];e&&null!=t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length?i:void 0},u.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},u.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},u.prototype.sanitizeEventPayload=function(n,e){var r;if(n&&"object"==typeof n)return e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&null!=(t=n[e])&&("string"==typeof t?r[e]=t.slice(0,256):"number"==typeof t||"boolean"==typeof t?r[e]=t:Array.isArray(t)?r[e]=t.slice(0,10).map(function(e){return"string"==typeof e?e.slice(0,256):"number"==typeof e||"boolean"==typeof e?e:String(e).slice(0,256)}):r[e]=String(t).slice(0,256))}),Object.keys(r).length?r:void 0},u.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(N(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},u.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:void 0},u.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},u.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},u.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},u.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(u.prototype,"__version__",{get:function(){return"1.0.6"},enumerable:!1,configurable:!0}),u.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:g(),event_type:p.CUSTOM,event_category:m.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)},u.prototype.getTimeEventDuration=function(e){if(void 0!==e&&this.timeMap[e])return Date.now()-this.timeMap[e]},u.version="1.0.6",u.instances=[],u.environment=ae,u.installedPlugins=[],u),e=(tt.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},tt.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},tt.prototype.countInstance=function(){return this.instances.length},tt.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},tt.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},tt.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!=typeof e)||!!e},tt.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},tt.prototype.exist=function(e){return-1===this.instances.indexOf(e)},tt.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))},tt.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},tt),et=new e({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Le(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(e){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}});function tt(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 u(e){var r,i,o,n,s,a,l;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,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 Y,this.bean={},this._customPageUrl=null,this.tdemEventPipeline=Ge([(s=n=!1,a=[],this._tdemSampleGate={decide:function(e){n=!0,(s=e)&&a.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),a=[]},reDecide:function(e){return s=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return s}},function(e,t){n?s&&t(e):a.length<1e3&&a.push({event:e,resolve:t})}),(i=Math.max(Number(100)||1,1),o=[],function(e,t){function n(){for(;0<o.length;)t(o.splice(0,i))}e=Array.isArray(e)?e:[e];o.push.apply(o,e);clearTimeout(r),i<=o.length?n():r=setTimeout(function(){0<o.length&&n()},5e3)}),function(t,n){try{var e,r=JSON.parse(JSON.stringify(t)),i=(l.lifeCycle.emit("beforeReport",r),l.config.beforeReport);"function"==typeof i?0<(e=t.filter(function(e){return!1!==i(e)})).length&&n(e):n(t)}catch(e){n(t)}},Ve(l=this)]),this.timeMap={},this.failRequestCount=0,u.instances.push(this)}function nt(e){return e=e.sessionManager,[(null==(t=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:t.replayId)||"",null==t||t.id,!t||t.sampled,null==t||t.sampled][0];var t}function rt(e){return-1!==st.indexOf(e)}var it=new e({name:"assets"}),ot=it=new e({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;Je()&&(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:g(),event_type:p.RESOURCE_LOAD,event_category:m.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:void 0},replay_id:nt(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 s=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(s.initiatorType)||oe(s.name,n.hostUrl)||this.publish(this.generateLog(s,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===it.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===it.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){function e(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=s.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),oe(t,s.hostUrl))||(n=o.getFromParam(i),r={url:q(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:$(t),urlQuery:X(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))}var o=this,s=i.config;window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===it.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:q(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:$(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:X(e.name,!0),domainLookup:K(e.domainLookupEnd-e.domainLookupStart),connectTime:K(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Je()&&(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(){}}}),st=window.navigator.userAgent.toLowerCase(),l={};function at(){return{host:new URL(location.href).host,pathname:location.pathname}}function lt(r,e,i){return null!=e&&e.length&&"object"==typeof 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},""):""}function ut(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""}function ct(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===V.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=ue.test(i)||le.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e}function dt(e,t){return e?zt.AJAX_ERROR:t?zt.RET_ERROR:zt.API_RESPONSE}function ht(e,t,n){if(!e)return!1;if(null!=(t=null==t?void 0:t.api)&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(e){return console.warn("[TDEM] isSlowApi function happen error:",e,", this data will not be reported."),!1}return(n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold)&&"number"==typeof n?n<e:1e3<e}function ft(e,t){if(null!=(e=e.api)&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:$(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:K(e.domainLookupEnd-e.domainLookupStart),connectTime:K(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:$(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:B.number,connectTime:B.number}}function pt(e){return(e=(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+=Qt(e)}else if(3===n||4===n)return e.nodeValue;return t})(e))?e.replace(/^\s+|\s+$/g,""):""}l.macos=function(){return rt("mac")},l.ios=function(){return l.iphone()||l.ipod()||l.ipad()},l.iphone=function(){return!l.windows()&&rt("iphone")},l.ipod=function(){return rt("ipod")},l.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return rt("ipad")||e},l.android=function(){return!l.windows()&&rt("android")},l.androidPhone=function(){return l.android()&&rt("mobile")},l.androidTablet=function(){return l.android()&&!rt("mobile")},l.blackberry=function(){return rt("blackberry")||rt("bb10")},l.blackberryPhone=function(){return l.blackberry()&&!rt("tablet")},l.blackberryTablet=function(){return l.blackberry()&&rt("tablet")},l.windows=function(){return rt("windows")},l.windowsPhone=function(){return l.windows()&&rt("phone")},l.windowsTablet=function(){return l.windows()&&rt("touch")&&!l.windowsPhone()},l.fxos=function(){return(rt("(mobile")||rt("(tablet"))&&rt(" rv:")},l.fxosPhone=function(){return l.fxos()&&rt("mobile")},l.fxosTablet=function(){return l.fxos()&&rt("tablet")},l.meego=function(){return rt("meego")},l.cordova=function(){return window.cordova&&"file:"===location.protocol},l.nodeWebkit=function(){return"object"==typeof window.process},l.mobile=function(){return l.androidPhone()||l.iphone()||l.ipod()||l.windowsPhone()||l.blackberryPhone()||l.fxosPhone()||l.meego()},l.tablet=function(){return l.ipad()||l.androidTablet()||l.blackberryTablet()||l.windowsTablet()||l.fxosTablet()},l.desktop=function(){return!l.tablet()&&!l.mobile()};var mt,gt,vt,yt,wt,bt,kt,St,_t,Ct,It,Et,Rt,xt,Ot,At,Tt,Mt,Pt=!(l.isIE=function(){return"ActiveXObject"in window}),Nt=[],Dt=/^\/[^/]/,Lt=!1,Ft=[],Ut={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},zt={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},Bt=(new e({name:"api"}),new e({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 We(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))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(b,k){var S=this,e=b.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},then:function(h,f,p,m,g,v,y){var e,w;oe(p,b.hostUrl)||(e=h.headers?h.headers.get("content-type"):"","fetch"===(w=ct(b,e||"",p))?h.clone().text().then(function(r){var e,i=h.status<=0||400<=h.status,t=(null==(t=b.api)?void 0:t.reqHeaders)||[],o=lt(null==m?void 0:m.headers,t,"req"),t=(null==(t=b.api)?void 0:t.resHeaders)||[],s=lt(h.headers,t,"res"),a=ze(null==m?void 0:m.headers),t=ee(r,b.api,{url:p,ctx:h,payload:null==m?void 0:m.body}),l=t.code,u=t.isErr,t=null==(t=b.api)?void 0:t.apiDetail,c=t?te(null==m?void 0:m.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:p}):"",d=t?te(r,null==(e=b.api)?void 0:e.resBodyHandler,{url:p,ctx:h}):"";setTimeout(function(){var e=ft(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==m?void 0:m.method)||"get"}),t=[i?"FETCH_ERROR: "+r:"","fetch req url: "+p,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+g,o,s,"req method: "+(e.method||"GET"),"res retcode: "+l,ut(c,"req param"),ut(d,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==m?void 0:m.body,e.ret=l,e.isErr=+u,e.from=v||S.getFromParam(k),{msg:t,code:l,trace:a,errorMsg:"",from:v||S.getFromParam(k),originFrom:y,level:zt.API_RESPONSE}),n=ht(null==e?void 0:e.duration,b,e);t.level=n?zt.SLOW_NET_REQUEST:dt(i,u),(n||t.level!==zt.API_RESPONSE||k.isWhiteList||null!=(n=null==(n=k.config)?void 0:n.api)&&n.reportRequest)&&S.publishNormalLog(t,k),S.publishSpeed(e,k)},0)}).catch(function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=ft(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==m?void 0:m.method)||"get"});e.type="static",e.urlQuery=X(p,!0),e.from=v||S.getFromParam(k),S.publishSpeed(e,k)},0))},catch:function(t,n,r,i,o,s,a){var l,e,u,c,d;throw oe(r,b.hostUrl)||(l=ct(b,"",r),e=(null==(e=b.api)?void 0:e.reqHeaders)||[],u=lt(null==i?void 0:i.headers,e,"req"),c=ze(null==i?void 0:i.headers),d=null!=(e=b.api)&&e.apiDetail?te(null==i?void 0:i.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=ft(b,{url:r,duration:n,type:l,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=s||S.getFromParam(k),S.publishSpeed(e,k),"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"+u);S.publishNormalLog({msg:e,level:zt.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:s||S.getFromParam(k),originFrom:a},k)},0)),t}},h=(this.hackFetchOptions=e,this.hackFetchOptions),f=null==(e=b.api)?void 0:e.ignoreHackReg;if(void 0===f&&(f=/\.flv(\?|$)/i),Ft.find(function(e){return e.name===h.name}))throw new Error("name '"+h.name+"' is already in hackFetch option list");Ft.push(h),!Lt&&window.fetch&&(Lt=!0,yt=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(s=null==f?void 0:f.test)&&s.call(f,o))return yt(o,i);Dt.test(o)&&(o=""+location.origin+o);var t,n,r,s=(h||{}).traceRequestHeader;s&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=at()).host,n=(s=s.generate(o,t,{host:n,pathname:r.pathname})||{}).name,r=s.value)&&n&&(i.headers=Object.assign(t,((s={})[n]=r,s)));for(var a=new Map,l=window.location.href,u=0;u<Ft.length;u++){var c=Ft[u];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&a.set(c.name,c.getCurrentFrom())}catch(e){}}var d=Date.now();return yt(e,i).then(function(e){for(var t=e.clone(),n=0;n<Ft.length;n++){var r=Ft[n];try{"function"==typeof r.then&&r.then(t,Date.now()-d,o,i,d,a.get(r.name),l)}catch(e){}}return e}).catch(function(e){for(var t=0;t<Ft.length;t++){var n=Ft[t];try{"function"==typeof n.catch&&n.catch(e,Date.now()-d,o,i,d,a.get(n.name),l)}catch(e){}}throw e})})},overrideXhr:function(b,k){var i,S=this,e={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},send:function(h,f,p,m){var e,t,g=Date.now(),v=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=at()).host,e=(t=S.traceRequestHeader.generate(h.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&h.setRequestHeader(e,t),h.addEventListener("loadend",function(){var u,n,e,c,d=h.tdemUrl||"";oe(d,b.hostUrl)||"abort"===h.failType||(u="",(h.failType||!h.status||400<=h.status)&&(u=h.failType||"failed"),n=Date.now()-g,e=h.getResponseHeader("content-type")||"",c=ct(b,e,d),setTimeout(function(){var r=ft(b,{url:d,duration:n,type:c,status:h.status,method:h.tdemMethod||"get"});if(r.from=p||S.getFromParam(k),"fetch"===c){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],i=lt(h.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=h.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),o=lt(t,e,"res"),s=ze(h.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,a=e?te(f,null==(t=b.api)?void 0:t.reqParamHandler,{url:d}):"",l=e?te(h.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:d}):"";try{((e,t,n,r)=>{var i,o,s;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?G:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return s=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===s?G:s,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:G,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(ce=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==ce.indexOf(e.toLowerCase())});if(a.length)return"未知"!==(s=e[a[0]])&&""!==s||(s=G),null!=r&&r({code:""+s,isErr:0!==s&&"0"!==s&&s!==G});null!=r&&r({code:G,isErr:!1})}catch(e){null!=r&&r({code:G,isErr:!1})}})(h.response,b.api,{url:d,ctx:h,payload:f},function(e){var t=e.code,e=e.isErr,n=[u?"AJAX_ERROR: request "+u:"","fetch req url: "+d,"res status: "+(r.status||0),"res duration: "+r.duration+"ms","res startTime: "+g,i,o,"req method: "+(r.method||"GET"),"res retcode: "+t,ut(a,"req param"),ut(l,"res data")].filter(function(e){return e}).join("\n\n");r.ret=t,r.isErr=+e,r.payload=f,ht(null==r?void 0:r.duration,b,r)?S.publishNormalLog({msg:n,level:zt.SLOW_NET_REQUEST,code:t,trace:s,errorMsg:"",from:p||S.getFromParam(k),originFrom:m},k):S.publishNormalLog({msg:n,level:dt(!!u,e),code:t,trace:s,errorMsg:"",from:p||S.getFromParam(k),originFrom:m},k),S.publishSpeed(r,k)})}catch(e){r.ret=G,S.publishSpeed(r,k)}}else r.type="static",r.urlQuery=X(d,!0),S.publishSpeed(r,k);h.removeEventListener("abort",v),h.removeEventListener("error",y),h.removeEventListener("timeout",w)},0))}),function(){h.failType="abort"}),y=function(){h.failType="error"},w=function(){h.failType="timeout"};h.addEventListener("abort",v),h.addEventListener("error",y),h.addEventListener("timeout",w)}};this.hackXHROptions=e,i=this.hackXHROptions,Nt.find(function(e){return e.name===i.name})||(Nt.push(i),!Pt&&window.XMLHttpRequest&&(mt=window.XMLHttpRequest.prototype.send,gt=window.XMLHttpRequest.prototype.open,vt=window.XMLHttpRequest.prototype.setRequestHeader,Pt=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Dt.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(t=null==(e=i.ignoreHackReg)?void 0:e.test)||!t.call(e,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)l.isIE()||(this.timeout=5e3);else for(var n=0;n<Nt.length;n++){var r=Nt[n];try{"function"==typeof r.open&&r.open(this)}catch(e){}}return gt.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(t=null==(n=i.ignoreHackReg)?void 0:n.test)&&t.call(n,this.tdemUrl)?vt.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],vt.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<Nt.length;n++){var r=Nt[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():void 0,window.location.href)}catch(e){}}return mt.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,s,a,l;[zt.API_RESPONSE,zt.AJAX_ERROR,zt.RET_ERROR,zt.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",i=(i=null==(i=e.msg)?void 0:i.match(/res status:\s*(\d+)/))?parseInt(i[1],10):0,o=(o=null==(o=e.msg)?void 0:o.match(/res duration:\s*([\d.]+)ms/))?parseFloat(o[1]):0,s=(s=null==(s=e.msg)?void 0:s.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?s[1].trim().slice(0,1e3):void 0,a={},e.trace&&(a.trace_id=e.trace),[zt.AJAX_ERROR,zt.RET_ERROR].includes(e.level)||400<=i||0===i?(l={event_id:g(),event_type:p.API_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:e.from||(null==(l=t.getOriginFrom)?void 0:l.call(t))||window.location.href,data:{url:n,measurements:{duration:o},response_body:s,replay_id:nt(t),tags:0<Object.keys(a).length?a:void 0,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,l)):(l={event_id:g(),event_type:p.API_CALL,event_category:m.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},business_code:String(e.code||""),replay_id:nt(t),tags:0<Object.keys(a).length?a:void 0,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,l)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=Nt.findIndex(function(e){return e.name===n.name})))&&Nt.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Ft.findIndex(function(e){return e.name===t.name})))&&Ft.splice(e,1),this.option.override=!1}})),jt={},Wt=new e({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(u){var c=this,d=u.config,e="object"==typeof d.bridge?d.bridge:void 0,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var l=t[e];jt[e]=l,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],s=Date.now(),a=c.getFromParam(u);l(r,i,n,function(e){var t=ee(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-s,type:"bridge",ret:n,isErr:+t,from:a};c.publishSpeed(n,u),o(e)})}})},unHackBridge:function(e){var e="object"==typeof e.config.bridge?e.config.bridge:void 0,t=null==e?void 0:e.target;jt=(t&&Object.keys(jt).forEach(function(e){jt[e]&&(t[e]=jt[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),t=((t=wt=wt||{})[t.unknown=100]="unknown",t[t.wifi=1]="wifi",t[t.net2g=2]="net2g",t[t.net3g=3]="net3g",t[t.net4g=4]="net4g",t[t.net5g=5]="net5g",t[t.net6g=6]="net6g",(t=bt=bt||{})[t.android=1]="android",t[t.ios=2]="ios",t[t.windows=3]="windows",t[t.macos=4]="macos",t[t.linux=5]="linux",t[t.other=100]="other",(t=kt=kt||{})[t.unknown=100]="unknown",t[t.normal=0]="normal",t[t.weak=1]="weak",t[t.disconnected=2]="disconnected",new e({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",wt.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?bt[e]:bt.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:Ht)(function(e){wt[e]||(e=wt.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){void 0===kt[e]&&(e=kt.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),Ht=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||G,0<=(n=String(n).toLowerCase()).indexOf("4g")?wt.net4g:0<=n.indexOf("wifi")?wt.wifi:0<=n.indexOf("5g")?wt.net5g:0<=n.indexOf("6g")?wt.net6g:0<=n.indexOf("3g")?wt.net3g:0<=n.indexOf("2g")?wt.net2g:wt.unknown))},Zt=window.WebSocket,Vt=[],Gt={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!=Vt&&Vt.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=r.readyState;if(t!==WebSocket.OPEN){var n={readyState:t,connectUrl:r.url};switch(t){case WebSocket.CLOSED:Vt.forEach(function(e){e=e.sendErr;null!=e&&e(f({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:Vt.forEach(function(e){(0,e.sendErr)(f({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:Vt.forEach(function(e){(0,e.sendErr)(f({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Yt=new e({name:"onError"}),Jt=Yt=new e({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(l){function e(e){var t,n=e&&ne(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?ye(e.reason):[],e={event_id:g(),event_type:p.PROMISE_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{exception_stacks:t,exception_frames:n,replay_id:nt(l),tags:{environment:l.config.env||"production"}}},null!=(t=l.reportTDEMEvent))&&t.call(l,e)}function t(e){if(e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement)){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){if(!(oe(i=t,l.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:g(),event_type:p.RESOURCE_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{url:t,resource_type:i,replay_id:nt(l),tags:f({environment:l.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=l.reportTDEMEvent)&&i.call(l,t)}}else console.log("may be media load success because error is undefine")}}var n,r,i,o,u=this,c=window.onerror;window.onerror=function(e,t,n,r,i){var o,s,a=ne(e);"string"!=typeof(o=a)||!o||H.some(function(e){return-1<o.indexOf(e)})||W.some(function(e){return-1<o.indexOf(e)})||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],s=i?ye(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:g(),event_type:p.JS_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{exception_stacks:a,exception_frames:s,replay_id:nt(l),tags:{environment:l.config.env||"production",version:String(l.config.version||"")}}},null!=(s=l.reportTDEMEvent)&&s.call(l,a)),null!=c&&c.call(window,e,t,n,r,i)},window.addEventListener("unhandledrejection",e);window.document.addEventListener("error",t,!0),l.lifeCycle.on("destroy",function(){0===Yt.countInstance()&&(window.removeEventListener("unhandledrejection",e),window.document.removeEventListener("error",t,!0))}),l.config.websocketHack&&(n={key:l.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,l)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,l)}},this.hackWebsocketConfig=n,n=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(r=window.WebSocket,window&&!r.isHack&&(i=new Proxy(WebSocket,Gt),r.isHack=!0,window.WebSocket=i),o=n,Vt.find(function(e){return e.key===o.key})||o&&Vt.push(o))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:g(),event_type:p.JS_ERROR,event_category:m.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:nt(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=Zt,-1!==(e=Vt.findIndex(function(e){return e.key===t.key})))&&Vt.splice(e,1)}}),Kt=(new e({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 Kt(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),Xt=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},qt=function(e,t){return"string"==typeof e?e.split(t):[]},Qt=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+=Qt(n);return t},$t=new e({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(s){for(var e=function(o){t.listeners.push(((e,t,n,r)=>{function i(e){var t=document.documentElement;t&&n.call(t,e,e.target)}return void 0===r&&(r=!0),e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}})(document,o,function(e,t){var n,r,i;t&&!((e,t)=>{e="object"==typeof e.click?e.click:void 0,n=Xt((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,r=(e={ignoreIds:Xt((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n}).ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),s=t,a=(qt(t.getAttribute("id")||""," "),qt(t.getAttribute("class")||"",""),0),l=!1;s&&o&&s.getAttribute;){if(l)return!0;if(10<=a)break;for(var u=qt(s.getAttribute("id")||""," "),c=qt(s.getAttribute("class")||"",""),d=0,h=u;d<h.length;d++){var f=h[d];if(i.has(f)){l=!0;break}}for(var p=0,m=c;p<m.length;p++){var g=m[p];if(r.has(g)){l=!0;break}}a+=1,s=s.parentNode||s.parentElement}return!1})(s.config,t)&&(i=Kt(t),n=pt(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:g(),event_type:p.CLICK,event_category:m.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}:void 0,replay_id:nt(s),tags:{environment:s.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=s.reportTDEMEvent))&&n.call(s,i)},!0))},t=this,n=0,r=Object.entries({click:1,longpress:2});n<r.length;n++)e(r[n][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),en=(new e({name:"console"}),["log","error","warn","info","debug","trace"]),tn={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace},nn=new e({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var h,f;f="object"==typeof(h=e).config.console?h.config.console:void 0,en.forEach(function(c){var d=tn[c];console[c]=function(){for(var e,t,n,r,i,o,s,a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];try{d.apply(console,l),o=c,s=h.isWhiteList,("all"===(a=(null==(a=f)?void 0:a.level)||"error")||s||("error"===a?"error"===o:"warn"===a?"error"===o||"warn"===o:"info"===a?["error","warn","info"].includes(o):"log"===a?["error","warn","info","log"].includes(o):"error"===o))&&(r=l.map(function(e){if("object"==typeof e&&null!==e)try{return JSON.stringify(e)}catch(e){}return String(e)}).join(" "),i={event_id:g(),event_type:p.LOG,event_category:m.LOG,timestamp:Date.now(),page_url:(null==(e=h.getOriginFrom)?void 0:e.call(h))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:nt(h),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=h.reportTDEMEvent)&&n.call(h,i))}catch(e){tn.error("Console hook error:",e)}}})},destroy:function(){Object.keys(tn).forEach(function(e){console[e]=tn[e]})}});function rn(){It=[],_t=-1,St=null,Tt(addEventListener)}function on(e,t){var n=On(),r="navigate";return 0<=Rn?r="back-forward-cache":n&&(document.prerendering||0<An()?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}}function sn(e,t,n){try{var r;if(PerformanceObserver.supportedEntryTypes.includes(e))return(r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})})).observe(Object.assign({type:e,buffered:!0},n||{})),r}catch(e){}}function an(t,n,r,i){var o,s;return function(e){0<=n.value&&(e||i)&&((s=n.value-(o||0))||void 0===o)&&(o=n.value,n.delta=s,n.rating=(e=n.value)>r[1]?"poor":e>r[0]?"needs-improvement":"good",t(n))}}function ln(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})}function un(t){function e(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)}addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)}function cn(t){var n=!1;return function(e){n||(t(e),n=!0)}}function dn(){return Tn<0&&(Tn=Mn(),Nn(),xn(function(){setTimeout(function(){Tn=Mn(),Nn()},0)})),{get firstHiddenTime(){return Tn}}}function hn(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()}function fn(o,s){s=s||{},hn(function(){var t,n=dn(),r=on("FCP"),i=sn("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<n.firstHiddenTime)&&(r.value=Math.max(e.startTime-An(),0),r.entries.push(e),t(!0))})});i&&(t=an(o,r,Ln,s.reportAllChanges),xn(function(e){r=on("FCP"),t=an(o,r,Ln,s.reportAllChanges),ln(function(){r.value=performance.now()-e.timeStamp,t(!0)})}))})}function pn(e){var t,n,r,i,o,s;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){Bn(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Un),removeEventListener("pointercancel",o,Un)},addEventListener("pointerup",i,Un),addEventListener("pointercancel",o,Un)):Bn(t,e))}function mn(e){e.forEach(function(e){e.interactionId&&(Vn=Math.min(Vn,e.interactionId),Gn=Math.max(Gn,e.interactionId),Zn=Gn?(Gn-Vn)/7+1:0)})}function gn(){return Yn()-Kn}function vn(e){var t=Xn[Xn.length-1],n=qn[e.interactionId];(n||Xn.length<10||e.duration>t.latency)&&(n?(n.entries.push(e),n.latency=Math.max(n.latency,e.duration)):(t={id:e.interactionId,latency:e.duration,entries:[e]},qn[t.id]=t,Xn.push(t)),Xn.sort(function(e,t){return t.latency-e.latency}),Xn.splice(10).forEach(function(e){delete qn[e.id]}))}function yn(e,t){function n(t,n,r,i){function o(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))}addEventListener(t,o,!0)}var r;n("visibilitychange",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.visibilitychange),n("pagehide",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.pagehide),n("beforeunload",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.beforeunload)}function wn(e){var t=e.name;0<(e=e.value)&&(tr[t]=e)}function bn(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}Et={passive:!0,capture:!0},Rt=new Date,xt=function(e,t){St||(St=t,_t=e,Ct=new Date,Tt(removeEventListener),Ot())},Ot=function(){var t;0<=_t&&_t<Ct-Rt&&(t={entryType:"first-input",name:St.type,target:St.target,cancelable:St.cancelable,startTime:St.timeStamp,processingStart:St.timeStamp+_t},It.forEach(function(e){e(t)}),It=[])},At=function(e){var t,n,r,i,o,s;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){xt(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Et),removeEventListener("pointercancel",o,Et)},addEventListener("pointerup",i,Et),addEventListener("pointercancel",o,Et)):xt(t,e))},Tt=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,At,Et)})},Mt="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(Mt=t.timeStamp,removeEventListener("visibilitychange",e,!0))},!0),rn(),self.webVitals={firstInputPolyfill:function(e){It.push(e),Ot()},resetFirstInputPolyfill:rn,get firstHiddenTime(){return Mt}};var kn,Sn,_n,Cn,In,En,Rn=-1,xn=function(t){addEventListener("pageshow",function(e){e.persisted&&(Rn=e.timeStamp,t(e))},!0)},On=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},An=function(){var e=On();return e&&e.activationStart||0},Tn=-1,Mn=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Pn=function(e){"hidden"===document.visibilityState&&-1<Tn&&(Tn="visibilitychange"===e.type?e.timeStamp:0,Dn())},Nn=function(){addEventListener("visibilitychange",Pn,!0),addEventListener("prerenderingchange",Pn,!0)},Dn=function(){removeEventListener("visibilitychange",Pn,!0),removeEventListener("prerenderingchange",Pn,!0)},Ln=[1800,3e3],Fn=[.1,.25],Un={passive:!0,capture:!0},zn=new Date,Bn=function(e,t){kn||(kn=t,Sn=e,_n=new Date,Wn(removeEventListener),jn())},jn=function(){var t;0<=Sn&&Sn<_n-zn&&(t={entryType:"first-input",name:kn.type,target:kn.target,cancelable:kn.cancelable,startTime:kn.timeStamp,processingStart:kn.timeStamp+Sn},Cn.forEach(function(e){e(t)}),Cn=[])},Wn=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,pn,Un)})},Hn=[100,300],Zn=0,Vn=1/0,Gn=0,Yn=function(){return In?Zn:performance.interactionCount||0},Jn=[200,500],Kn=0,Xn=[],qn={},Qn=[2500,4e3],$n={},er=(cr.prototype.start=function(){var t=this,n=new PerformanceObserver(function(e){e=e.getEntriesByName("first-contentful-paint");0<e.length&&(t.fcp=e[0].startTime,t.slientWindowStartTime=t.fcp,n.disconnect(),setTimeout(function(){t.checkTTI()},Math.max(t.slienceTimeInterval-(performance.now()-t.fcp)+20,1)))});n.observe({entryTypes:["paint"]}),this.longtaskObserver=new PerformanceObserver(function(e){e=e.getEntries();t.longTaskEntries=t.longTaskEntries.concat(e)}),this.longtaskObserver.observe({entryTypes:["longtask"]}),this.resourceObserver=new PerformanceObserver(function(e){e=e.getEntries();t.resourceEntries=t.resourceEntries.concat(e)}),this.resourceObserver.observe({entryTypes:["resource"]})},cr.prototype.checkTTI=function(){var e=this;this.hasSlientWindow()?(this.calculateTTI(),this.longtaskObserver.disconnect(),this.resourceObserver.disconnect()):setTimeout(function(){e.checkTTI()},this.checkInterval)},cr.prototype.hasSlientWindow=function(){var e,t=performance.now();return!(t-this.slientWindowStartTime<5e3||((e=this.getLastLongTaskEndTime())>this.slientWindowStartTime?(this.slientWindowStartTime=e,this.resourceEntries=[]):this.getRequestCount(this.slientWindowStartTime,t)<=2?(this.lastLongtaskEndTime=e,0):(t=this.resourceEntries.sort(function(e,t){return e.startTime-t.startTime}),this.slientWindowStartTime=t[this.resourceEntries.length-2].startTime,1)))},cr.prototype.getLastLongTaskEndTime=function(){var t;return 0===this.longTaskEntries.length?-1:(t=0,this.longTaskEntries.forEach(function(e){e.startTime+e.duration>t&&(t=e.startTime+e.duration)}),t)},cr.prototype.getRequestCount=function(t,n){var r=0;return this.resourceEntries.forEach(function(e){e.startTime>=t&&e.startTime+e.duration<=n&&(r+=1)}),r},cr.prototype.calculateTTI=function(){var e=-1===this.lastLongtaskEndTime?this.slientWindowStartTime:this.lastLongtaskEndTime,t=performance.timing.domContentLoadedEventEnd-performance.timing.navigationStart,e=Math.max(t,e);this.onTTICallback(e)},cr),tr=(new e({name:"webVitals"}),{FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:void 0}),nr=new Map,rr=new e({name:"webVitals",onNewTdem:function(e){var t,n,r,o,s,a,l,u,c,d,h,i=this;if(Je()&&"function"==typeof window.PerformanceObserver&&"function"==typeof performance.getEntriesByName)try{nr.set(e,{isWebVitalsReported:!1,hasFirstEntry:!1,custom:null}),fn(wn),d=wn,h={},hn(function(){function e(e){(e=e[e.length-1])&&e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-An(),0),i.entries=[e],t())}var t,n,r=dn(),i=on("LCP"),o=sn("largest-contentful-paint",e);o&&(t=an(d,i,Qn,h.reportAllChanges),n=cn(function(){$n[i.id]||(e(o.takeRecords()),o.disconnect(),$n[i.id]=!0,t(!0))}),["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(n,0)},!0)}),un(n),xn(function(e){i=on("LCP"),t=an(d,i,Qn,h.reportAllChanges),ln(function(){i.value=performance.now()-e.timeStamp,$n[i.id]=!0,t(!0)})}))}),u=wn,c={},hn(function(){function t(e){e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),o(!0))}function e(e){e.forEach(t)}var n=dn(),r=on("FID"),i=sn("first-input",e),o=an(u,r,Hn,c.reportAllChanges);i&&un(cn(function(){e(i.takeRecords()),i.disconnect()})),i&&xn(function(){r=on("FID"),o=an(u,r,Hn,c.reportAllChanges),Cn=[],Sn=-1,kn=null,Wn(addEventListener),Cn.push(t),jn()})}),a=wn,l={},fn(cn(function(){function e(e){e.forEach(function(e){var t,n;e.hadRecentInput||(t=i[0],n=i[i.length-1],r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e]))}),r>n.value&&(n.value=r,n.entries=i,t())}var t,n=on("CLS",0),r=0,i=[],o=sn("layout-shift",e);o&&(t=an(a,n,Fn,l.reportAllChanges),un(function(){e(o.takeRecords()),t(!0)}),xn(function(){n=on("CLS",r=0),t=an(a,n,Fn,l.reportAllChanges),ln(function(){return t()})}),setTimeout(t,0))})),o=wn,s={},hn(function(){var e;"interactionCount"in performance||(In=In||sn("event",mn,{type:"event",buffered:!0,durationThreshold:0}));function t(e){e.forEach(function(t){t.interactionId&&vn(t),"first-input"!==t.entryType||Xn.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})||vn(t)}),e=Math.min(Xn.length-1,Math.floor(gn()/50)),(e=Xn[e])&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())}var n=on("INP"),r=sn("event",t,{durationThreshold:null!=(e=s.durationThreshold)?e:40}),i=an(o,n,Jn,s.reportAllChanges);r&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&r.observe({type:"first-input",buffered:!0}),un(function(){t(r.takeRecords()),n.value<0&&0<gn()&&(n.value=0,n.entries=[]),i(!0)}),xn(function(){Xn=[],Kn=Yn(),n=on("INP"),i=an(o,n,Jn,s.reportAllChanges)}))}),r=function(e){wn({name:"TTI",value:e})},Je()&&new er(r).start(),yn(function(){i.tryReport(e,null,"onHidden")},{once:!0,delay:{visibilitychange:10}}),tr.from=(null==(n=null==(t=e)?void 0:t.getOriginFrom)?void 0:n.call(t))||window.location.href}catch(e){}},tryReport:function(t,n,r){var i=this;void 0===r&&(r="manual"),this.$walk(function(e){e===t&&("object"==typeof(e=i.$getConfig(t))&&!0===e.manualReport||"onHidden"!==r?(e=nr.get(t))&&!e.hasFirstEntry?(e.hasFirstEntry=!0,"manual"===r&&n&&(e.custom=n)):i.doReport(t,(null==e?void 0:e.custom)||n):i.doReport(t,null))})},doReport:function(o,s){var e=nr.get(o);if(e){if(null!=e&&e.isWebVitalsReported)return;e.isWebVitalsReported=!0}this.$walk(function(e){var t,n,r,i;e===o&&(t=f({},tr),s&&Object.keys(s).forEach(function(e){null!=s[e]&&(t[e]=s[e])}),n={environment:e.config.env||"production",version:String(e.config.version||"")},r={},0<t.LCP&&(r.lcp=t.LCP),0<t.FCP&&(r.fcp=t.FCP),0<t.FID&&(r.fid=t.FID),0<=t.CLS&&(r.cls=t.CLS),0<t.TTFB&&(r.ttfb=t.TTFB),0<t.TTI&&(r.tti=t.TTI),0<t.INP&&(r.inp=t.INP),i={event_id:g(),event_type:p.true,event_category:m.PERFORMANCE,timestamp:Date.now(),page_url:t.from||(null==(i=e.getOriginFrom)?void 0:i.call(e))||window.location.href,data:{measurements:r,replay_id:nt(e),tags:n}},null!=(r=e.reportTDEMEvent))&&r.call(e,i)})},publish:function(e,t){this.tryReport(e,t,"manual")},destroy:function(){this.option.publish=function(){}}}),ir=(new e({name:"pagePerformance"}),3),or=new Map,sr=new e({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Je()&&(or.set(t,{isPagePerformanceReported:!1}),En?this.publish(En,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),yn(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=or.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=or.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(Ke("paint"))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(e){}(En=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(En,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;if(i)return n={from:n,originFrom:r,dnsLookup:bn(i.domainLookupEnd-i.domainLookupStart),tcp:bn(i.connectEnd-i.connectStart),ssl:bn(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:bn(i.responseStart-i.requestStart),contentDownload:bn(i.responseEnd-i.responseStart),domParse:bn(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:bn(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:bn(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=f(f({},n),{engineInit:bn(t,0,1e4),bundleLoad:bn(e,0,1e4)})),n},publish:function(r,i){var o=this;this.$walk(function(e){var t,n;e===i&&(n=(t=performance.timing).navigationStart,t={event_id:g(),event_type:p.PAGE_LOAD,event_category:m.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:tr.lcp,fcp:tr.fcp,fid:tr.fid,cls:tr.cls,ttfb:tr.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:t.domContentLoadedEventEnd-n,load_complete:t.loadEventEnd-n,first_screen_time:r.firstScreenTiming},replay_id:nt(e),device_type:o.getDeviceType(),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(n=e.reportTDEMEvent)&&n.call(e,t),n=or.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()},getDeviceType:function(){var e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet|ipad/i.test(e)?"Tablet":"Desktop"},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){En=n.buildPerformanceLog(t,e,r,i);e=or.get(t);!En||null!=e&&e.isPagePerformanceReported||n.publish(En,t)})}catch(t){}},getFirstScreenTiming:function(a,l){var u=this;a.lifeCycle.on("destroy",function(){g&&clearTimeout(g)});var c,d=this,n=["script","style","link","br"],h=[],f={},p=(Ke("paint")&&(c=new PerformanceObserver(function(e){e.getEntries().forEach(function(e){var t;"paint"===e.entryType&&"first-contentful-paint"===e.name&&0<(t=document.querySelectorAll("[TDEM-FIRST-SCREEN-TIMING],[AEGIS-FIRST-SCREEN-TIMING]")).length&&a.config.id&&!u.performanceMap[a.config.id]&&(u.setFirstScreenInfo(a,e.startTime,t[0],t),null!=l&&l(e.startTime),p.disconnect(),c.disconnect(),g)&&clearTimeout(g)})})).observe({entryTypes:["paint"]}),new MutationObserver(function(e){var t={roots:[],ignores:[],rootsDomNum:[],time:performance.now()};e.forEach(function(e){e&&e.addedNodes&&Array.prototype.slice.call(e.addedNodes).forEach(function(e){d.isEleInArray(e,t.ignores)?t.ignores.push(e):1===e.nodeType&&(e.hasAttribute("TDEM-FIRST-SCREEN-TIMING")||e.hasAttribute("AEGIS-FIRST-SCREEN-TIMING"))?(Object.prototype.hasOwnProperty.apply(f,[t.time])||(f[t.time]=[]),f[t.time].push(e)):1===e.nodeType&&(d.hasAncestorOrSelfWithAttribute(e,"TDEM-IGNORE-FIRST-SCREEN-TIMING")?t.ignores.push(e):-1!==n.indexOf(e.nodeName.toLocaleLowerCase())||d.isEleInArray(e,t.roots)||(t.roots.push(e),t.rootsDomNum.push(d.walkAndCount(e)||0)))})}),t.roots.length&&h.push(t)})),m=(p.observe(document,{childList:!0,subtree:!0}),function(n){(n=void 0===n?0:n)||(r=0,(e=Object.keys(f)).length?(n=Math.max.apply(null,e),u.setFirstScreenInfo(a,n,null==(e=f[n])?void 0:e[0],f)):h.forEach(function(e){for(var t=0;t<e.roots.length;t++)e.rootsDomNum[t]>r&&d.isInFirstScreen(e.roots[t])&&(r=e.rootsDomNum[t],n=e.time,u.setFirstScreenInfo(a,n,e.roots[t]))}),h.length=0,Object.keys(f).forEach(function(e){f[e]=f[e].map(function(e){var t={tagName:e.tagName},n=e.attributes;if(!n)return e;for(var r=0;r<n.length;r++){var i=n[r];i.name&&(t[i.name]=e.getAttribute(i.name))}return t})}));var r,e=performance.timing,t=e.domInteractive-e.domLoading,i=n;g=null;for(var o=0,s=[t,e.loadEventStart-e.domInteractive,i];o<s.length;o++)if(s[o]<=0&&0<ir){g=setTimeout(function(){return m(i)},3e3);break}g?--ir:(p.disconnect(),null!=c&&c.disconnect(),null!=l&&l(n))}),g=setTimeout(function(){return m()},3e3)},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"!=typeof(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}}),ar=(new e({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),lr=new e({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"),ar.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 l=this;void 0===e&&(e="reload"),setTimeout(function(){a._customPageUrl=null;var r=location.pathname+location.hash+a.config.id,i=a.getOriginFrom(),o=l.lastPageUrl||void 0,s=l.resolveNavigationType(e,location.href);l.$walk(function(e){var t,n;e===a&&r&&r!==l.originFireUrl&&(n={event_id:g(),event_type:p.PAGE_VIEW,event_category:m.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||void 0,is_effective_action:!0,replay_id:nt(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:s,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),l.originFireUrl=r,l.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),ur="__MONITOR_SESSION_V1__";function cr(e){this.slienceTimeInterval=5e3,this.checkInterval=100,this.fcp=0,this.longTaskEntries=[],this.resourceEntries=[],this.slientWindowStartTime=performance.now(),this.onTTICallback=e}function dr(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 hr(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function fr(e){try{sessionStorage.setItem("__MONITOR_SESSION_V1__",JSON.stringify(e))}catch(e){}}function pr(e,t){var n,r,i;return"undefined"==typeof window?hr(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[ur],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),fr(n),n):(i=hr(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),fr(window[ur]=i),i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),dr("_tdem_s",n.sessionId),fr(n),n):(i=hr(t(),e),dr("_tdem_s",(window[ur]=i).sessionId),fr(i),i))}var mr,gr,vr=new Map,yr=(T(gr=wr,yr=mr=$e),gr.prototype=null===yr?Object.create(yr):(br.prototype=yr.prototype,new br),wr.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=D(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},wr.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},wr.prototype._prefetchConfigAndInit=function(s){return M(this,void 0,void 0,function(){var t,n,r,i,o;return P(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=!1,i=null,!t||!n)return[3,6];e.label=1;case 1:return e.trys.push([1,5,,6]),[4,fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(o=e.sent()).ok?[4,o.json()]:[3,4];case 3:0===(o=e.sent()).code&&o.data&&(r=!!o.data.enabled,i=o.data),e.label=4;case 4:return[3,6];case 5:return e.sent(),r=this._loadEnabledFromCache(t),[3,6];case 6:if(r){i&&(this._prefetchedConfigData=i);try{this._initAfterPreparedConfig(s)}catch(e){console.warn(e),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(e)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},wr.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},wr.prototype._loadEnabledFromCache=function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5&&0<t.sampleRate:!1}catch(e){return!1}},wr.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<$e.installedPlugins.length;t++)try{$e.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited"),this._afterInit(e)},wr.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",wr.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=z(F("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],U("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=vr.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=vr.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},wr.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("&")},wr.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))},wr.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(e){return""}},wr.prototype.ready=function(){function o(){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()}}))}var t=this;o(),this.isReportReady=!0},wr.prototype.request=function(l,n,u){var c,d,h=this;this.config.reportImmediately||this.isReportReady?this.$request(l,c=function(e){var t=z(F("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&l.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===l.extraRetryOptions.requestId}),1),U("tdem-web-retry-report-requests",JSON.stringify(t)),vr.delete(l.extraRetryOptions.success),vr.delete(l.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!h.config.reportRetry)return null==u?void 0:u(e);var t,n="boolean"==typeof h.config.reportRetry?Ut:f(f({},Ut),h.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Ut.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Ut.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Ut.whenRetryEndStillFail:n,s=(l.extraRetryOptions||(l.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),l.extraRetryOptions),a=(s.requestId=s.requestId||l.url+"-"+Date.now()+"-"+Math.random(),s.requestId),n=(s.retriedCount=s.retriedCount||0,s.success=s.success||a+"_successCallback",s.fail=s.fail||a+"_failCallback",z(F("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===a})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===a}),n[t]=l):n.push(l),U("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){if(s.retriedCount<i)l.extraRetryOptions.retriedCount+=1,h.$request(l,c,d);else{if("discard"===o){var e=z(F("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==a});if(e.length)U("tdem-web-retry-report-requests",JSON.stringify(e));else try{localStorage.removeItem("tdem-web-retry-report-requests")}catch(e){}}vr.delete(s.success),vr.delete(s.fail)}},"function"==typeof r?r(l.extraRetryOptions.retriedCount):r),null!=u&&u(e),vr.has(s.success)||vr.set(s.success,c),vr.has(s.fail)||vr.set(s.fail,d)}):this.reportRequestQueue.push({options:l,success:n,fail:u})},wr.prototype.$request=function(a,e,t){var n,r,i,o;if(a&&"string"==typeof a.url&&""!==a.url&&this.bean.id)return o=a.url,!1!==a.addBean&&(o=((e,t)=>{var n,r,i,o=e,s=a.beanFilter||[];for(n in t)-1===s.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})(o,f(f({},this.bean),{from:this.getCurrentPageUrl()}))),a.url=o,o=a.method||"get",r=this.config.onBeforeRequest,(a=r?r(a,this):a)?a.url?void((null!=a&&a.sendBeacon||this.sendNow)&&"function"==typeof(null==navigator?void 0:navigator.sendBeacon)?navigator.sendBeacon(a.url,a.data):((n=new XMLHttpRequest).sendByTdem=!0,n.addEventListener("readystatechange",function(){4===n.readyState&&(400<=n.status||0===n.status?null!=t&&t(n.response):null!=e&&e(n.response))}),"get"===o.toLocaleLowerCase()?(n.open("get",(r=a.url,i=a.data,"string"!=typeof r?"":"object"==typeof i&&i?(o=Object.getOwnPropertyNames(i).map(function(e){var t=i[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),r+(-1===r.indexOf("?")?"?":"&")+o):r)),n.send()):(n.open("post",a.url),a.contentType&&n.setRequestHeader("Content-Type",a.contentType),"string"==typeof a.data&&(a.data=a.data.replace(/eval/gi,"evaI")),n.send(a.data)))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},wr.prototype.publishPluginsLogs=function(){var e=wr.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},wr.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},wr.prototype.reportWebVitals=function(e){try{var t=wr.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(e){}},wr.sessionID=pr("tdem",De).sessionId,wr);function wr(e){var t,n,r,s,i,o,a,l,u,c,d=mr.call(this,e)||this;d.sendNow=!1,d.isReportReady=!1,d.reportRequestQueue=[],d._sdkInitialized=!1,d.speedLogPipeline=Ge([(l=[],u=(i=d).config,i.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),o&&l.length>=o||i.sendNow&&0<l.length?(l=_e(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),a&&clearTimeout(a)):(a&&clearTimeout(a),a=setTimeout(function(){a=null,l=_e(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},u.delay))}),(s=d.config,function(e,t){var n,r,i,o="number"==typeof s.repeat?s.repeat:60;!s.speedSample||o<=0?t(e):(n=(null==s?void 0:s.id)||"0",r=Ie[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],Ie[n]=r):Ce[n]||Ee(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Ie[n]=r,t(e)):Ce[n]||Ee(n))}),(r=d,function(t,n){Ht(function(e){r.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=d.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=d.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 void 0!==e.payload&&delete e.payload,e}))},function(e){return d.sendPipeline([function(e,t){t({type:se.SPEED,url:""+d.config.speedUrl,method:"post",data:re(e,f(f({},d.bean),{from:d.getCurrentPageUrl()})),log:e})}],se.SPEED)(e)}]),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(c=String(e.userId||e.uin||(null!=(t=document.cookie.match(/\buin=\D+(\d*)/))?t:[])[1]||(null!=(n=document.cookie.match(/\bilive_uin=\D*(\d+)/))?n:[])[1]||""),e.userId=c,e.uin=e.uin||c),d._bootstrapInit(e)}catch(e){console.warn(e),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"),d.sendSDKError(e)}return d}function br(){this.constructor=gr}new e({name:"ie"}),new e({name:"onClose"});var kr=new e({name:"onClose",onNewTdem:function(n){var r,i=this;l.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,N([window],e))}):yn(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([])}});function Sr(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}new e({name:"aid"}),Er.generate=function(){return"rep_"+this.uuid32()},Er.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var _r=Er,Cr="[SessionReplay]",Ir=!1;function Er(){}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir&&console.log.apply(console,N([Cr+"["+e+"]"],t))}function Rr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir&&console.debug.apply(console,N([Cr+"["+e+"]"],t))}function xr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir&&console.log.apply(console,N([Cr+"["+e+"] WARN:"],t))}function Or(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Ir&&console.log.apply(console,N([Cr+"["+e+"] ERROR:"],t))}Nr.prototype.setTdemInstance=function(e){this.tdemInstance=e},Nr.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=pr("tdem",Sr),n=f({id:n.sessionId,replayId:_r.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),v("SessionManager","Document replay session created:",n.id,n.replayId),n},Nr.prototype.restoreSession=function(){return this.session},Nr.prototype.saveSession=function(){},Nr.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},Nr.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},Nr.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},Nr.prototype.shouldRefreshSession=function(){return!1},Nr.prototype.getSession=function(){return this.session},Nr.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},Nr.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},Nr.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(e){}},Nr.prototype.syncSharedSession=function(e){var t,n,r,i;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,t="tdem","undefined"!=typeof window&&(n=Date.now(),(r=window[ur])?(i=r.sessionId!==e,r.sessionId=e,r.version=i?r.version+1:r.version,r.source=t,i&&(r.createdAt=n),r.lastActivity=n):window[ur]=hr(e,t),dr("_tdem_s",e),fr(window[ur]),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:t}})))};var Ar=Nr,Tr=((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),Mr=(Pr.prototype.ensureReady=function(){return M(this,void 0,void 0,function(){return P(this,function(e){return[2,this.ready]})})},Pr.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})})},Pr.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},Pr);function Pr(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 Nr(e){this.session=null,this.tdemInstance=null}Lr.prototype.initWorker=function(){var t=this,e=(()=>{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),v("CompressionWorker","Worker created successfully"),new Mr(n))}catch(e){return xr("CompressionWorker","Failed to create worker, will fallback to sync buffer:",e),null}})();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,v("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()}).catch(function(e){xr("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):v("EventBuffer","Worker not available, using sync buffer")},Lr.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}},Lr.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(e){xr("EventBuffer","Failed to send event to worker:",e)}},Lr.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(xr("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&&(xr("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},Lr.prototype.getEvents=function(){return N(this.events)},Lr.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},Lr.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},Lr.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},Lr.prototype.finishAsync=function(){return M(this,void 0,void 0,function(){var t,n,r;return P(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 xr("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}]}})})},Lr.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},Lr.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},Lr.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},Lr.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(e){return 1024}},Lr.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===Tr.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===Tr.Meta){r=n;break}for(var i,o=0,s=Math.max(e,.2*this.config.maxSize),a=0;a<r&&o<s;)a++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<s;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},Lr.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===Tr.Meta||e.type===Tr.FullSnapshot})},Lr.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===Tr.FullSnapshot)return t.timestamp}return null},Lr.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var Dr=Lr;function Lr(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()}function Fr(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 Ur(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zr(a){return function(){var e=this,s=arguments;return new Promise(function(t,n){var r=a.apply(e,s);function i(e){Ur(r,t,n,i,o,"next",e)}function o(e){Ur(r,t,n,i,o,"throw",e)}i(void 0)})}}function Br(e,t,n){t=Hr(t);var r=e,t=Vr()?Reflect.construct(t,n||[],Hr(e).constructor):t.apply(e,n);if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jr(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,ti(r.key),r)}}function n(e,t,n){return t&&jr(e.prototype,t),n&&jr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(e,t){var n,r,i,o,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(r=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==s.return||s.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(s=ni(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),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 Wr(){return(Wr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=((e,t)=>{for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hr(e)););return e})(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 Hr(e){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zr(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&&qr(e,t)}function Vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vr=function(){return!!e})()}function Gr(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 Te(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gr(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=ti(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Gr(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function Yr(e,t){if(null==e)return{};var n,r=((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 Jr(){var p,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,s,a,l,u,c,d,h,t=t&&t.prototype instanceof g?t:g,t=Object.create(t.prototype);return Kr(t,"_invoke",(i=e,o=n,c=r||[],d=!1,h={p:u=0,n:0,v:p,a:f,f:f.bind(p,4),d:function(e,t){return s=e,a=0,l=p,h.n=t,m}},function(e,t,n){if(1<u)throw TypeError("Generator is already running");for(d&&1===t&&f(t,n),a=t,l=n;(v=a<2?p:l)||!d;){s||(a?a<3?(1<a&&(h.n=-1),f(a,l)):h.n=l:h.v=l);try{if(u=2,s){if(v=s[e=a?e:"next"]){if(!(v=v.call(s,l)))throw TypeError("iterator result is not an object");if(!v.done)return v;l=v.value,a<2&&(a=0)}else 1===a&&(v=s.return)&&v.call(s),a<2&&(l=TypeError("The iterator does not provide a '"+e+"' method"),a=1);s=p}else if((v=(d=h.n<0)?l:i.call(o,h))!==m)break}catch(e){s=p,a=1,l=e}finally{u=1}}return{value:v,done:d}}),!0),t;function f(e,t){for(a=e,l=t,v=0;!d&&u&&!n&&v<c.length;v++){var n,r=c[v],i=h.p,o=r[2];3<e?(n=o===t)&&(l=r[(a=r[4])?5:a=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(a=0,h.v=t,h.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,h.n=o,a=0))}if(n||1<e)return m;throw d=!0,t}}var m={};function g(){}function i(){}function o(){}var v=Object.getPrototypeOf,e=[][t]?v(v([][t]())):(Kr(v={},t,function(){return this}),v),s=o.prototype=g.prototype=Object.create(e);function a(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,Kr(e,n,"GeneratorFunction")),e.prototype=Object.create(s),e}return Kr(s,"constructor",i.prototype=o),Kr(o,"constructor",i),Kr(o,n,i.displayName="GeneratorFunction"),Kr(s),Kr(s,n,"Generator"),Kr(s,t,function(){return this}),Kr(s,"toString",function(){return"[object Generator]"}),(Jr=function(){return{w:r,m:a}})()}function Kr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(Kr=function(e,t,n,r){function i(t,n){Kr(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 Xr(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 qr(e,t){return(qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qr(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}})(e,t)||ni(e,t)||(()=>{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 $r(e,t,n,r){var i=Wr(Hr(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function ei(e){return(e=>{if(Array.isArray(e))return Fr(e)})(e)||(()=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})()||ni(e)||(()=>{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 ti(e){e=(e=>{if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")})(e);return"symbol"==typeof e?e:e+""}function d(e){return(d="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 ni(e,t){var n;if(e)return"string"==typeof e?Fr(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)?Fr(e,t):void 0}function ri(e){var n="function"==typeof Map?new Map:void 0;return(ri=function(e){if(null===e||!(t=>{try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}})(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 function(e,t,n){var r;return Vr()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&qr(t,n.prototype),t)}(e,arguments,Hr(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),qr(t,e)})(e)}function h(e,t,n){e=e,t="symbol"!==d(t)?t+"":t,n=n,t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}function ii(e,t,n){e=e,t="symbol"!==d(t)?t+"":t,n=n,t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}var oi,si=["inputs"],ai=["inputId"],li=["inputs"],ui=["inputId"],ci=["type"],di=Object.defineProperty,hi=Object.defineProperty,fi=((r=fi||{})[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r),pi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gi={};function vi(e){if(gi[e])return gi[e];var t=globalThis[e],n=t.prototype,r=e in pi?pi[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 mi?mi[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 gi[e]=t.prototype,t.prototype;try{var o,s=document.createElement("iframe"),a=(document.body.appendChild(s),s.contentWindow);return a?(o=a[e].prototype,document.body.removeChild(s),o?gi[e]=o:n):t.prototype}catch(e){return n}}var yi={};function wi(e,t,n){var r="".concat(e,".").concat(String(n));return yi[r]?yi[r].call(t):(e=vi(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(yi[r]=e).call(t):t[n])}var bi={};function ki(e,t,n){var r="".concat(e,".").concat(String(n));return bi[r]?bi[r].bind(t):"function"!=typeof(e=vi(e)[n])?t[n]:(bi[r]=e).bind(t)}var Si={ownerDocument:function(e){return wi("Node",e,"ownerDocument")},childNodes:function(e){return wi("Node",e,"childNodes")},parentNode:function(e){return wi("Node",e,"parentNode")},parentElement:function(e){return wi("Node",e,"parentElement")},textContent:function(e){return wi("Node",e,"textContent")},contains:function(e,t){return ki("Node",e,"contains")(t)},getRootNode:function(e){return ki("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?wi("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?wi("Element",e,"shadowRoot"):null},querySelector:function(e,t){return wi("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return wi("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return vi("MutationObserver").constructor},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(e){return function(){}}}};function _i(e){return e.nodeType===e.ELEMENT_NODE}function Ci(e){var t=e&&"host"in e&&"mode"in e&&Si.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Si.shadowRoot(t)===e)}function Ii(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Ei(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 Ri(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(e){return null}var r}function Ri(e,t){if("styleSheet"in e){var n;try{n=Ei(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(t){n=e.cssText}return e.styleSheet.href?Fi(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?Fi(i,t):i}var xi=n(function e(){c(this,e),ii(this,"idNodeMap",new Map),ii(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 Oi(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&Ai(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function Ai(e){return e.toLowerCase()}function Ti(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ai(t):null}function Mi(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}t=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=null==t?void 0:t[1])?n:null}var Pi=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ni=/^(?:[a-z+]+:)?\/\//i,Di=/^www\..*/i,Li=/^(data:)([^,]*),(.*)/i;function Fi(e,c){return(e||"").replace(Pi,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(Ni.test(n)||Di.test(n))return"url(".concat(i).concat(n).concat(i,")");if(Li.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 s=c.split("/"),t=n.split("/");s.pop();var a,l=Ae(t);try{for(l.s();!(a=l.n()).done;){var u=a.value;"."!==u&&(".."===u?s.pop():s.push(u))}}catch(e){l.e(e)}finally{l.f()}return"url(".concat(i).concat(s.join("/")).concat(i,")")})}function Ui(e,t){return 1<arguments.length&&void 0!==t&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var zi,Bi,ji=1,Wi=new RegExp("[^a-z0-9-_:]");function Hi(){return ji++}var Zi=/^[^ \t\n\r\u000c]+/,Vi=/^[, \t\n\r\u000c]+/,Gi=new WeakMap;function Yi(e,t){return t&&""!==t.trim()?Ji(e,t):t}function Ji(e,t){var n=Gi.get(e);if(n||(n=e.createElement("a"),Gi.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Ki(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)?Yi(e,r):"srcset"===n?((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(Vi),!(n>=t.length);)if(","===(s=r(Zi)).slice(-1))s=Yi(e,s.substring(0,s.length-1)),i.push(s);else for(var o="",s=Yi(e,s),a=!1;;){var l=t.charAt(n);if(""===l){i.push((s+o).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){n+=1,i.push((s+o).trim());break}"("===l&&(a=!0)}o+=l,n+=1}return i.join(", ")})(e,r):"style"===n?Fi(r,Ji(e)):"object"===t&&"data"===n?Yi(e,r):r)}function Xi(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function qi(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&&qi(Si.parentNode(e),t,n)}function Qi(e,t,n,r){var i;if(_i(e)){if(!Si.childNodes(i=e).length)return!1}else{if(null===Si.parentElement(e))return!1;i=Si.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(qi(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function $i(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,s=t.inlineStylesheet,a=t.maskInputOptions,l=void 0===a?{}:a,u=t.maskTextFn,c=t.maskInputFn,a=t.dataURLOptions,d=void 0===a?{}:a,h=t.inlineImages,f=t.recordCanvas,L=t.keepIframeSrcFn,a=t.newlyAddedElement,F=void 0!==a&&a,a=t.cssCaptured,U=void 0!==a&&a,p=(a=n,!(t=t.mirror).hasNode(a)||1===(t=t.getId(a))?void 0:t);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:fi.Document,childNodes:[],compatMode:e.compatMode}:{type:fi.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:fi.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:p};case e.ELEMENT_NODE:for(var m,g,v,y,w,b,k=e,S=(T={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:c,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:L,newlyAddedElement:F,rootId:p}).doc,_=T.inlineStylesheet,C=void 0===(C=T.maskInputOptions)?{}:C,I=T.maskInputFn,E=void 0===(R=T.dataURLOptions)?{}:R,R=T.inlineImages,x=T.recordCanvas,O=T.keepIframeSrcFn,A=void 0!==(A=T.newlyAddedElement)&&A,z=T.rootId,T=((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(e){}return!1})(k,T.blockClass,T.blockSelector),M=(g=k)instanceof HTMLFormElement?"form":(g=Ai(g.tagName),Wi.test(g)?"div":g),P={},B=k.attributes.length,N=0;N<B;N++){var D=k.attributes[N];Xi(M,D.name)||(P[D.name]=Ki(S,M,Ai(D.name),D.value))}"link"===M&&_&&(g=null,g=(_=Array.from(S.styleSheets).find(function(e){return e.href===k.href}))?Ei(_):g)&&(delete P.rel,delete P.href,P._cssText=g),"style"===M&&k.sheet&&(_=Ei(k.sheet))&&(1<k.childNodes.length&&(_=function(e,t,n){var r=2<arguments.length&&void 0!==n&&n,i=Array.from(t.childNodes),o=[],s=0;if(1<i.length&&e&&"string"==typeof e)for(var a=Ui(e,r),l=a.length/e.length,u=1;u<i.length;u++)if(i[u].textContent&&"string"==typeof i[u].textContent){for(var c=Ui(i[u].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 h,f=c.substring(0,d),p=a.split(f),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[u-1].textContent)m=a.indexOf(f,1);else if(1===p.length){if(f=f.substring(0,f.length-1),(p=a.split(f)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(m=a.indexOf(f));if(-1!==(m=2<=p.length&&100<d&&((h=i[u-1].textContent)&&"string"==typeof h&&(h=Ui(h).length,m=a.indexOf(f,h)),-1===m)?p[0].length:m)){for(var g=Math.floor(m/l);0<g&&g<e.length;){if((s+=1)>50*i.length)return o.push(e),o;var v=Ui(e.substring(0,g),r);if(v.length===m){o.push(e.substring(0,g)),e=e.substring(g),a=a.substring(m);break}v.length<m?g+=Math.max(1,Math.floor((m-v.length)/l)):g-=Math.max(1,Math.floor((v.length-m)*l))}break}}}return o.push(e),o}(_,k).join("/* rr_split */")),P._cssText=_),["input","textarea","select"].includes(M)&&(g=k.value,_=k.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&g?P.value=Oi({element:k,type:Ti(k),tagName:M,value:g,maskInputOptions:C,maskInputFn:I}):_&&(P.checked=_)),"option"===M&&(k.selected&&!C.select?P.selected=!0:delete P.selected),"dialog"===M&&k.open&&(P.rr_open_mode=k.matches("dialog:modal")?"modal":"non-modal"),"canvas"===M&&x&&("2d"===k.__context?(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})(k)||(P.rr_dataURL=k.toDataURL(E.type,E.quality)):"__context"in k||(g=k.toDataURL(E.type,E.quality),(I=S.createElement("canvas")).width=k.width,I.height=k.height,g!==I.toDataURL(E.type,E.quality)&&(P.rr_dataURL=g))),"img"===M&&R&&(zi||(zi=S.createElement("canvas"),Bi=zi.getContext("2d")),y=(v=k).currentSrc||v.getAttribute("src")||"<unknown-src>",w=v.crossOrigin,b=function(){v.removeEventListener("load",b);try{zi.width=v.naturalWidth,zi.height=v.naturalHeight,Bi.drawImage(v,0,0),P.rr_dataURL=zi.toDataURL(E.type,E.quality)}catch(e){if("anonymous"!==v.crossOrigin)return v.crossOrigin="anonymous",void(v.complete&&0!==v.naturalWidth?b():v.addEventListener("load",b));console.warn("Cannot inline img src=".concat(y,"! Error: ").concat(e))}"anonymous"===v.crossOrigin&&(w?P.crossOrigin=w:v.removeAttribute("crossorigin"))},v.complete&&0!==v.naturalWidth?b():v.addEventListener("load",b)),["audio","video"].includes(M)&&((_=P).rr_mediaState=k.paused?"paused":"played",_.rr_mediaCurrentTime=k.currentTime,_.rr_mediaPlaybackRate=k.playbackRate,_.rr_mediaMuted=k.muted,_.rr_mediaLoop=k.loop,_.rr_mediaVolume=k.volume),A||(k.scrollLeft&&(P.rr_scrollLeft=k.scrollLeft),k.scrollTop&&(P.rr_scrollTop=k.scrollTop)),T&&(x=(C=k.getBoundingClientRect()).width,I=C.height,P={class:P.class,rr_width:"".concat(x,"px"),rr_height:"".concat(I,"px")}),"iframe"!==M||O(P.src)||(k.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(M)&&(m=!0)}catch(k){}return{type:fi.Element,tagName:M,attributes:P,childNodes:[],isSVG:Boolean("svg"===k.tagName||k.ownerSVGElement)||void 0,needBlock:T,rootId:z,isCustom:m};case e.TEXT_NODE:return g=e,_=(R={doc:n,needsMask:o,maskTextFn:u,rootId:p,cssCaptured:U}).needsMask,A=R.maskTextFn,C=R.rootId,x=R.cssCaptured,I=(I=Si.parentNode(g))&&I.tagName,O="",T="STYLE"===I||void 0,(I="SCRIPT"===I||void 0)?O="SCRIPT_PLACEHOLDER":x||(O=Si.textContent(g),T&&(O=O&&Fi(O,Ji(R.doc)))),!T&&!I&&O&&_&&(O=A?A(O,Si.parentElement(g)):O.replace(/[\S]/g,"*")),{type:fi.Text,textContent:O||"",rootId:C};case e.CDATA_SECTION_NODE:return{type:fi.CDATA,textContent:"",rootId:p};case e.COMMENT_NODE:return{type:fi.Comment,textContent:Si.textContent(e)||"",rootId:p};default:return!1}}function L(e){return null==e?"":e.toLowerCase()}function eo(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 to(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.maskTextClass,a=e.maskTextSelector,l=e.skipChild,l=void 0!==l&&l,u=e.inlineStylesheet,c=void 0===u||u,u=e.maskInputOptions,d=void 0===u?{}:u,h=e.maskTextFn,f=e.maskInputFn,p=e.slimDOMOptions,u=e.dataURLOptions,m=void 0===u?{}:u,u=e.inlineImages,g=void 0!==u&&u,u=e.recordCanvas,v=void 0!==u&&u,y=e.onSerialize,w=e.onIframeLoad,u=e.iframeLoadTimeout,b=void 0===u?5e3:u,k=e.onStylesheetLoad,u=e.stylesheetLoadTimeout,S=void 0===u?5e3:u,u=e.keepIframeSrcFn,_=void 0===u?function(){return!1}:u,u=e.newlyAddedElement,u=void 0!==u&&u,C=e.cssCaptured,C=void 0!==C&&C,I=e.needsMask,e=e.preserveWhiteSpace,E=void 0===e||e,I=I||Qi(t,s,a,void 0===I),e=$i(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:I,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:u,cssCaptured:C});if(!e)return console.warn(t,"not serialized"),null;var u=r.hasNode(t)?r.getId(t):((e,t)=>{if(t.comment&&e.type===fi.Comment)return 1;if(e.type===fi.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"===Mi(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(L(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(e.attributes.name)||"icon"===L(e.attributes.rel)||"apple-touch-icon"===L(e.attributes.rel)||"shortcut icon"===L(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&L(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(L(e.attributes.property).match(/^(og|twitter|fb):/)||L(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===L(e.attributes.name)||"googlebot"===L(e.attributes.name)||"bingbot"===L(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===L(e.attributes.name)||"generator"===L(e.attributes.name)||"framework"===L(e.attributes.name)||"publisher"===L(e.attributes.name)||"progid"===L(e.attributes.name)||L(e.attributes.property).match(/^article:/)||L(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===L(e.attributes.name)||"yandex-verification"===L(e.attributes.name)||"csrf-token"===L(e.attributes.name)||"p:domain_verify"===L(e.attributes.name)||"verify-v1"===L(e.attributes.name)||"verification"===L(e.attributes.name)||"shopify-checkout-api-token"===L(e.attributes.name)))return 1}}})(e,p)||!E&&e.type===fi.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ji++,R=Object.assign(e,{id:u});if(r.add(t,R),-2===u)return null;y&&y(t);C=!l;if(R.type===fi.Element&&(C=C&&!R.needBlock,delete R.needBlock,e=Si.shadowRoot(t))&&Ii(e)&&(R.isShadowHost=!0),(R.type===fi.Document||R.type===fi.Element)&&C){p.headWhitespace&&R.type===fi.Element&&"head"===R.tagName&&(E=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:I,maskTextClass:s,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(R.type!==fi.Element||"textarea"!==R.tagName||void 0===R.attributes.value){R.type===fi.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(x.cssCaptured=!0);for(var O=0,A=Array.from(Si.childNodes(t));O<A.length;O++){var T=to(A[O],x);T&&R.childNodes.push(T)}}var M=null;if(_i(t)&&(M=Si.shadowRoot(t)))for(var P=0,N=Array.from(Si.childNodes(M));P<N.length;P++){var D=to(N[P],x);D&&(Ii(M)&&(D.isShadow=!0),R.childNodes.push(D))}}u=Si.parentNode(t);return u&&Ci(u)&&Ii(u)&&(R.isShadow=!0),R.type===fi.Element&&"iframe"===R.tagName&&((e,t,n)=>{var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){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 s=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(s),o=!0,t()})}}})(t,function(){var e=t.contentDocument;e&&w&&(e=to(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:I,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&w(t,e)},b),R.type===fi.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===Mi(R.attributes.href))&&((e,t,n)=>{var r,i,o=!1;try{r=e.sheet}catch(e){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=to(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:I,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&k(t,e)},S),R}function no(){return{isColorSupported:!1,reset:i,bold:i,dim:i,italic:i,underline:i,inverse:i,hidden:i,strikethrough:i,black:i,red:i,green:i,yellow:i,blue:i,magenta:i,cyan:i,white:i,gray:i,bgBlack:i,bgRed:i,bgGreen:i,bgYellow:i,bgBlue:i,bgMagenta:i,bgCyan:i,bgWhite:i}}var ro,io,oo,r={exports:{}},i=String,r=(r.exports=no(),r.exports.createColors=no,r.exports),o=(ro=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))).__esModule?ro:("function"==typeof(io=ro.default)?(oo=function e(){return this instanceof e?Reflect.construct(io,arguments,this.constructor):io.apply(this,arguments)}).prototype=io.prototype:oo={},Object.defineProperty(oo,"__esModule",{value:!0}),Object.keys(ro).forEach(function(e){var t=Object.getOwnPropertyDescriptor(ro,e);Object.defineProperty(oo,e,t.get?t:{enumerable:!0,get:function(){return ro[e]}})}),oo),so=r,ao=o;Zr(uo,ri(Error));var lo=r=n(uo,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==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=so.isColorSupported);var n,i,o,s,a,t=(t=ao&&e?ao(t):t).split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,t.length),c=String(u).length;return e?(e=so.createColors(!0),n=e.bold,i=e.gray,o=e.red,s=function(e){return n(o(e))},a=function(e){return i(e)}):s=a=function(e){return e},t.slice(l,u).map(function(e,t){var t=l+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=a(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),s(">")+a(n)+e+"\n "+t+s("^")):" "+a(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]);function uo(e,t,n,r,i,o){var s;return c(this,uo),(s=Br(this,uo,[e])).name="CssSyntaxError",s.reason=e,i&&(s.file=i),r&&(s.source=r),o&&(s.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(s.line=t,s.column=n):(s.line=t.line,s.column=t.column,s.endLine=n.line,s.endColumn=n.column)),s.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(s,uo),s}r.default=r;(r={}).isClean=Symbol("isClean"),r.my=Symbol("my");var co={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},s=po=n(function e(t){c(this,e),this.builder=t},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";void 0!==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 s=0;s<i;s++)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={}),void 0!==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=co[n]),o.rawCache[n]=r)):co[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&void 0!==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(void 0!==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(void 0!==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)&&void 0!==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(void 0!==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&&void 0!==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],e=e.raws[t];return e&&e.value===n?e.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)}}]),ho=(po.default=po,s);function fo(e,t){new ho(t).stringify(e)}var po=fo,mo=(fo.default=fo,r.isClean),go=r.my,vo=lo,yo=s,wo=po,a=s=n(function e(){var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};for(t in c(this,e),this.raws={},this[mo]=!1,this[go]=!0,n)if("nodes"===t){this.nodes=[];var r,i=Ae(n[t]);try{for(i.s();!(r=i.n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}catch(e){i.e(e)}finally{i.f()}}else this[t]=n[t]},[{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&&void 0!==arguments[0]?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&&void 0!==arguments[0]?arguments[0]:{},n=function t(e,n){var r,i,o,s=new e.constructor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r&&(o=d(i=e[r]),"parent"===r&&"object"===o?n&&(s[r]=n):"source"===r?s[r]=i:Array.isArray(i)?s[r]=i.map(function(e){return t(e,s)}):("object"===o&&null!==i&&(i=t(i)),s[r]=i));return s}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]?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 vo(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[mo]){this[mo]=!1;for(var e=this;e=e.parent;)e[mo]=!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 yo).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,s=r;o<s.length;o++){var a=s[o];a===this?t=!0:t?(this.parent.insertAfter(e,a),e=a):this.parent.insertBefore(e,a)}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={},s=null==t,a=(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"===d(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===d(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=a,t.set(r.input,a),a++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return s&&(o.inputs=ei(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&&void 0!==arguments[0]?arguments[0]:wo,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}}]);s.default=s,Zr(bo,a);var y=s=n(bo,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]);function bo(e){return c(this,bo),(e=Br(this,bo,[e=e&&void 0!==e.value&&"string"!=typeof e.value?Te(Te({},e),{},{value:String(e.value)}):e])).type="decl",e}s.default=s;var ko=o.SourceMapConsumer,So=o.SourceMapGenerator,_o=o.existsSync,Co=o.readFileSync,Io=o.dirname,Eo=o.join,Ro=s=n(function e(t,n){c(this,e),!1!==n.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=n.map?n.map.prev:void 0,t=this.loadMap(n.from,t),!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Io(this.mapFile)),t)&&(this.text=t)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new ko(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"===d(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=Io(e),_o(e))return this.mapFile=e,Co(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=Eo(Io(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ko)return So.fromSourceMap(t).toString();if(t instanceof So)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){t=this.loadFile(n);if(t)return t;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)}}]),s=(s.default=s,o.SourceMapConsumer),xo=o.SourceMapGenerator,Oo=o.fileURLToPath,Ao=o.pathToFileURL,To=o.isAbsolute,Mo=o.resolve,Po=function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},w=o,No=lo,Do=Ro,Lo=Symbol("fromOffsetCache"),Fo=Boolean(s&&xo),Uo=Boolean(Mo&&To),xo=s=n(function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(c(this,e),null==t||"object"===d(t)&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Uo||/^\w+:\/\//.test(n.from)||To(n.from)?this.file=n.from:this.file=Mo(n.from)),Uo&&Fo&&(t=new Do(this.css,n)).text&&(n=(this.map=t).consumer().file,!this.file)&&n&&(this.file=this.mapResolve(n)),this.file||(this.id="<input css "+Po(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=(t&&"object"===d(t)?(a=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof a.offset?(r=(o=this.fromOffset(a.offset)).line,o.col):(r=a.line,a.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=a?new No(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new No(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,s.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(Ao&&(o.input.url=Ao(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[Lo])n=this[Lo];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[Lo]=n}var s=0;if(e>=n[n.length-1])s=n.length-1;else for(var a,l=n.length-2;s<l;)if(e<n[a=s+(l-s>>1)])l=a-1;else{if(!(e>=n[a+1])){s=a;break}s=a+1}return{col:e-n[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:Mo(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=To(t.source)?Ao(t.source):new URL(t.source,this.map.consumer().sourceRoot||Ao(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(!Oo)throw new Error("file: protocol is not available in this PostCSS build");r.file=Oo(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=Te({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),zo=(s.default=s,w&&w.registerInput&&w.registerInput(s),o.SourceMapConsumer),Bo=o.SourceMapGenerator,jo=o.dirname,Wo=o.relative,Ho=o.resolve,Zo=o.sep,Vo=o.pathToFileURL,Go=xo,Yo=Boolean(zo&&Bo),Jo=Boolean(jo&&Ho&&Wo&&Zo),w=n(function e(t,n,r,i){c(this,e),this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,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=Ae(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||jo(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new zo(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(e){t.e(e)}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(),Jo&&Yo&&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=Bo.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new Bo({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 Bo({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,s=1,a={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&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=r.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),r.map.addMapping(a)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=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?(a.source=r.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),r.map.addMapping(a))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return void 0!==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 void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return void 0!==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?jo(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=jo(Ho(t,this.mapOpts.annotation))),t=Wo(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 Go(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(Vo)return t=Vo(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;"\\"===Zo&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}]);Zr(Ko,a);var o=s=n(Ko);function Ko(e){return c(this,Ko),(e=Br(this,Ko,[e])).type="comment",e}s.default=s;var Xo,qo,Qo,$o,es,ts,ns=r.isClean,rs=r.my,is=y,os=o,ss=(Zr(as,a),n(as,[{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,s=i[r],a=Ae(this.normalize(s,this.last));try{for(a.s();!(o=a.n()).done;){var l=o.value;this.proxyOf.nodes.push(l)}}catch(e){a.e(e)}finally{a.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($r(as,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ae(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(e){n.e(e)}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,ei(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),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),a=Ae(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o+1,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),a=Ae(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(Xo(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ae(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(e){i.e(e)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var s,a=Ae(e=e.nodes.slice(0));try{for(a.s();!(s=a.n()).done;){var l=s.value;l.parent&&l.parent.removeChild(l,"ignore")}}catch(e){a.e(e)}finally{a.f()}}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new is(e)]}else if(e.selector)e=[new qo(e)];else if(e.name)e=[new Qo(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new os(e)]}return e.map(function(e){return e[rs]||as.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[ns]&&function e(t){if(t[ns]=!1,t.proxyOf.nodes){var n,r=Ae(t.proxyOf.nodes);try{for(r.s();!(n=r.n()).done;)e(n.value)}catch(e){r.e(e)}finally{r.f()}}}(e),void 0===e.raws.before&&t&&void 0!==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=Ae(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,s,a=r.value,l=this.normalize(a,this.first,"prepend").reverse(),u=Ae(l);try{for(u.s();!(o=u.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(e){u.e(e)}finally{u.f()}for(s in this.indexes)this.indexes[s]=this.indexes[s]+l.length}}catch(e){i.e(e)}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=Ae(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(e){t.e(e)}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(t,e){var n;try{n=r(t,e)}catch(e){throw t.addToError(e)}return n=!1!==n&&t.walk?t.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]}}]));function as(){return c(this,as),Br(this,as,arguments)}function ls(e){return c(this,ls),(e=Br(this,ls,[Te({type:"document"},e)])).nodes||(e.nodes=[]),e}function us(e){ds[e]||(ds[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}ss.registerParse=function(e){Xo=e},ss.registerRule=function(e){qo=e},ss.registerAtRule=function(e){Qo=e},ss.registerRoot=function(e){$o=e},((s=ss).default=ss).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Qo.prototype):"rule"===e.type?Object.setPrototypeOf(e,qo.prototype):"decl"===e.type?Object.setPrototypeOf(e,is.prototype):"comment"===e.type?Object.setPrototypeOf(e,os.prototype):"root"===e.type&&Object.setPrototypeOf(e,$o.prototype),e[rs]=!0,e.nodes&&e.nodes.forEach(function(e){ss.rebuild(e)})},Zr(ls,s),(S=n(ls,[{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new es(new ts,this,e).stringify()}}])).registerLazyResult=function(e){es=e},S.registerProcessor=function(e){ts=e};var cs=S,ds=(S.default=S,{}),hs=S=n(function e(t){var n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};for(n in c(this,e),this.type="warning",this.text=t,r.node&&r.node.source&&(t=r.node.rangeBy(r),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),r)this[n]=r[n]},[{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}}]),fs=(S.default=S,hs),b=S=n(function e(t,n,r){c(this,e),this.processor=t,this.messages=[],this.root=n,this.opts=r,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&&void 0!==arguments[1]?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new fs(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}}]),ps=(S.default=S,"'".charCodeAt(0)),ms='"'.charCodeAt(0),gs="\\".charCodeAt(0),vs="/".charCodeAt(0),ys="\n".charCodeAt(0),ws=" ".charCodeAt(0),bs="\f".charCodeAt(0),ks="\t".charCodeAt(0),Ss="\r".charCodeAt(0),_s="[".charCodeAt(0),Cs="]".charCodeAt(0),Is="(".charCodeAt(0),Es=")".charCodeAt(0),Rs="{".charCodeAt(0),xs="}".charCodeAt(0),Os=";".charCodeAt(0),As="*".charCodeAt(0),Ts=":".charCodeAt(0),Ms="@".charCodeAt(0),Ps=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ns=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ds=/.[\r\n"'(/\\]/,Ls=/[\da-f]/i;Zr(Bs,S=s);var Fs,Us,zs=$s=n(Bs,[{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(Bs,"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(Bs,"prepend",this,3)(t)}}]);function Bs(e){return c(this,Bs),(e=Br(this,Bs,[e])).type="atrule",e}function js(e){return c(this,js),(e=Br(this,js,[e])).type="root",e.nodes||(e.nodes=[]),e}$s.default=$s,S.registerAtRule($s),Zr(js,S=s),($s=n(js,[{key:"normalize",value:function(e,t,n){var r=$r(js,"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 i,o=Ae(r);try{for(o.s();!(i=o.n()).done;)i.value.raws.before=t.raws.before}catch(e){o.e(e)}finally{o.f()}}return r}},{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),$r(js,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new Fs(new Us,this,e).stringify()}}])).registerLazyResult=function(e){Fs=e},$s.registerProcessor=function(e){Us=e};var k=$s,Ws=(S.registerRoot($s.default=$s),{comma:function(e){return Ws.split(e,[","],!0)},space:function(e){return Ws.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",s=!1,a=0,l=!1,u="",c=!1,d=Ae(e);try{for(d.s();!(r=d.n()).done;){var h=r.value;c?c=!1:"\\"===h?c=!0:l?h===u&&(l=!1):'"'===h||"'"===h?(l=!0,u=h):"("===h?a+=1:")"===h?0<a&&--a:0===a&&t.includes(h)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=h}}catch(e){d.e(e)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}}),S=Ws;Ws.default=Ws;var Hs=S;Zr(Vs,$s=s);var Zs=_=n(Vs,[{key:"selectors",get:function(){return Hs.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)}}]);function Vs(e){return c(this,Vs),(e=Br(this,Vs,[e])).type="rule",e.nodes||(e.nodes=[]),e}function Gs(t){var r,i,o,s,a,l,u,c,d,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),f=e.ignoreErrors,p=h.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=h.charCodeAt(m)){case ys:case ws:case ks:case Ss:case bs:for(i=m;i+=1,(r=h.charCodeAt(i))===ws||r===ys||r===ks||r===Ss||r===bs;);d=["space",h.slice(m,i)],m=i-1;break;case _s:case Cs:case Rs:case xs:case Ts:case Os:case Es:var n=String.fromCharCode(r);d=[n,n,m];break;case Is:if(u=g.length?g.pop()[1]:"",c=h.charCodeAt(m+1),"url"===u&&c!==ps&&c!==ms&&c!==ws&&c!==ys&&c!==ks&&c!==bs&&c!==Ss){i=m;do{if(a=!1,-1===(i=h.indexOf(")",i+1))){if(f||t){i=m;break}y("bracket")}for(l=i;h.charCodeAt(l-1)===gs;)--l,a=!a}while(a);d=["brackets",h.slice(m,i+1),m,i],m=i}else i=h.indexOf(")",m+1),u=h.slice(m,i+1),-1===i||Ds.test(u)?d=["(","(",m]:(d=["brackets",u,m,i],m=i);break;case ps:case ms:o=r===ps?"'":'"',i=m;do{if(a=!1,-1===(i=h.indexOf(o,i+1))){if(f||t){i=m+1;break}y("string")}for(l=i;h.charCodeAt(l-1)===gs;)--l,a=!a}while(a);d=["string",h.slice(m,i+1),m,i],m=i;break;case Ms:Ps.lastIndex=m+1,Ps.test(h),i=0===Ps.lastIndex?h.length-1:Ps.lastIndex-2,d=["at-word",h.slice(m,i+1),m,i],m=i;break;case gs:for(i=m,s=!0;h.charCodeAt(i+1)===gs;)i+=1,s=!s;if(r=h.charCodeAt(i+1),s&&r!==vs&&r!==ws&&r!==ys&&r!==ks&&r!==Ss&&r!==bs&&(i+=1,Ls.test(h.charAt(i)))){for(;Ls.test(h.charAt(i+1));)i+=1;h.charCodeAt(i+1)===ws&&(i+=1)}d=["word",h.slice(m,i+1),m,i],m=i;break;default:m=(r===vs&&h.charCodeAt(m+1)===As?(0===(i=h.indexOf("*/",m+2)+1)&&(f||t?i=h.length:y("comment")),d=["comment",h.slice(m,i+1),m,i]):(Ns.lastIndex=m+1,Ns.test(h),i=0===Ns.lastIndex?h.length-1:Ns.lastIndex-2,d=["word",h.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}_.default=_,$s.registerRule(_);var Ys=y,Js=o,Ks=zs,Xs=k,qs=Zs,Qs={empty:!0,space:!0},$s=s,ea=n(function e(t){c(this,e),this.input=t,this.root=new Xs,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new Ks;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.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=""),s&&(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,s=Ae(e.entries());try{for(s.s();!(i=s.n()).done;){var a=Qr(i.value,2),l=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}}catch(e){s.e(e)}finally{s.f()}return!1}},{key:"comment",value:function(e){var t=new Js,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=Gs(this.input)}},{key:"decl",value:function(e,t){var n=new Ys;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]||(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 s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;0<=l;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(n.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",h=l;0<h;h--){var f=c[h][0];if(0===d.trim().indexOf("!")&&"space"!==f)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+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.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 qs;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=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(t=l[0],a.push(l),"("===t||"["===t)i=i||l,o.push("("===t?")":"]");else if(s&&r&&"{"===t)i=i||l,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(a,s);break}if("{"===t)return void this.rule(a);if("}"===t){this.tokenizer.back(a.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{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,s,a,l=n.length,u="",c=!0,d=0;d<l;d+=1)"space"===(s=(i=n[d])[0])&&d===l-1&&!r||"comment"===s&&(s=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",Qs[s]||Qs[o]||","===u.slice(-1))?c=!1:u+=i[1];c||(a=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:a,value:u}),e[t]=u}},{key:"rule",value:function(e){e.pop();var t=new qs;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})}}]),ta=xo;function na(e,t){var n=new ta(e,t),n=new ea(n);try{n.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return n.root}var _=na,ra=($s.registerParse(na.default=na),r.isClean),ia=r.my,oa=w,sa=po,aa=s,$s=cs,la=us,ua=b,ca=_,r=k,da={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ha={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},fa={Once:!0,postcssPlugin:!0,prepare:!0};function pa(e){return"object"===d(e)&&"function"==typeof e.then}function ma(e){var t=!1,n=da[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 ga(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ma(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function va(e){return e[ra]=!1,e.nodes&&e.nodes.forEach(va),e}var ya,wa={},ba=((xa=n(function e(t,n,r){var i,o=this;if(c(this,e),this.stringified=!1,this.processed=!1,"object"!==d(n)||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof ua)i=va(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var s=ca;r.syntax&&(s=r.syntax.parse),(s=r.parser?r.parser:s).parse&&(s=s.parse);try{i=s(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[ia]&&aa.rebuild(i)}else i=va(n);this.result=new ua(t,i,r),this.helpers=Te(Te({},wa),{},{postcss:wa,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===d(e)&&e.prepare?Te(Te({},e),e.prepare(o.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,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[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=a.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};function e(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])}var t,n=Ae(this.plugins);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("object"===d(i))for(var o in i){if(!ha[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(!fa[o])if("object"===d(i[o]))for(var s in i[o])e(i,"*"===s?o:o+"-"+s.toLowerCase(),i[o][s]);else"function"==typeof i[o]&&e(i,o,i[o])}}}catch(r){n.e(r)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(ya=zr(Jr().m(function e(){var t,i,n,r,o,s,a,l,u,c=this;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(a=this.plugins[t],pa(a=this.runOnRoot(a)))return e.p=2,e.n=3,a;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,a=e.v,this.handleError(a);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[ra]){e.n=14;break}i[ra]=!0,n=[ga(i)];case 8:if(0<n.length){if(pa(l=this.visitTick(n)))return e.p=9,e.n=10,l;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,l=e.v,u=n[n.length-1].node,this.handleError(l,u);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ae(this.listeners.OnceExit),e.p=15,s=Jr().m(function e(){var t,n,r;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Qr(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)}},e,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(Xr(s()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,u=e.v,r.e(u);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 ya.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===d(t)&&t.Once?"document"===this.result.root.type?pa((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(t){throw this.handleError(t)}}},{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=sa,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new oa(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=Ae(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(pa(this.runOnRoot(n)))throw this.getAsyncError()}}catch(e){t.e(e)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[ra];)r[ra]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ae(r.nodes);try{for(o.s();!(i=o.n()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}}catch(e){o.e(e)}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||la("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=Ae(e);try{for(r.s();!(n=r.n()).done;){var i=Qr(n.value,2),o=i[0],s=i[1],a=(this.result.lastPlugin=o,void 0);try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pa(a))throw this.getAsyncError()}}catch(e){r.e(e)}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=Qr(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(e){throw this.handleError(e,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[ra])return s[ra]=!0,void e.push(ga(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[ra]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[ra]=!0;var n,r=Ae(ma(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[ra]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(e){r.e(e)}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){wa=e},xa),ka=(r.registerLazyResult(xa.default=xa),$s.registerLazyResult(xa),w),Sa=po,_a=us,Ca=_,Ia=b,$s=r=n(function e(t,n,r){c(this,e),n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;var t=Sa,i=(this.result=new Ia(this._processor,void 0,this._opts),this.result.css=n,this),r=(Object.defineProperty(this.result,"root",{get:function(){return i.root}}),new ka(t,void 0,this._opts,n));r.isMap()?(n=(t=Qr(r.generate(),2))[0],t=t[1],n&&(this.result.css=n),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.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||_a("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=Ca;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),Ea=(r.default=r,$s),Ra=ba,xa=cs,w=k,$s=r=n(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];c(this,e),this.version="8.4.38",this.plugins=this.normalize(t)},[{key:"normalize",value:function(e){var t,n=[],r=Ae(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"===d(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===d(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==d(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(e){r.e(e)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?Ra:Ea)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),Oa=(r.default=r,w.registerProcessor(r),xa.registerProcessor(r),y),Aa=Ro,Ta=o,Ma=zs,Pa=xo,Na=k,Da=Zs;function La(e,t){if(Array.isArray(e))return e.map(function(e){return La(e)});var n,r=e.inputs,i=Yr(e,si);if(r){t=[];var o,s=Ae(r);try{for(s.s();!(o=s.n()).done;){var a=Te(Te({},o.value),{},{__proto__:Pa.prototype});a.map&&(a.map=Te(Te({},a.map),{},{__proto__:Aa.prototype})),t.push(a)}}catch(e){s.e(e)}finally{s.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return La(e,t)})),i.source&&(n=(r=i.source).inputId,r=Yr(r,ai),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new Na(i);if("decl"===i.type)return new Oa(i);if("rule"===i.type)return new Da(i);if("comment"===i.type)return new Ta(i);if("atrule"===i.type)return new Ma(i);throw new Error("Unknown node type: "+e.type)}var w=La,xa=(La.default=La,lo),Fa=y,r=ba,Ro=s,Ua=$s,lo=po,y=w,za=cs,ba=hs,Ba=o,ja=zs,s=b,$s=xo,po=_,w=S,Wa=Zs,Ha=k,cs=a;function C(){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 Ua(t)}function Za(e,t,n){e=e,t="symbol"!==d(t)?t+"":t,n=n,t in e?Va(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}C.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 Ua).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return C([i(n)]).process(e,t)},i},C.stringify=lo,C.parse=po,C.fromJSON=y,C.list=w,C.comment=function(e){return new Ba(e)},C.atRule=function(e){return new ja(e)},C.decl=function(e){return new Fa(e)},C.rule=function(e){return new Wa(e)},C.root=function(e){return new Ha(e)},C.document=function(e){return new za(e)},C.CssSyntaxError=xa,C.Declaration=Fa,C.Container=Ro,C.Processor=Ua,C.Document=za,C.Comment=Ba,C.Warning=ba,C.AtRule=ja,C.Result=s,C.Input=$s,C.Rule=Wa,C.Root=Ha,C.Node=cs,r.registerPostcss(C);hs=C;C.default=C;(zs=(o=hs)&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o).stringify;var Va=Object.defineProperty;function Ga(){return{isColorSupported:!1,reset:I,bold:I,dim:I,italic:I,underline:I,inverse:I,hidden:I,strikethrough:I,black:I,red:I,green:I,yellow:I,blue:I,magenta:I,cyan:I,white:I,gray:I,bgBlack:I,bgRed:I,bgGreen:I,bgYellow:I,bgBlue:I,bgMagenta:I,bgCyan:I,bgWhite:I}}var Ya,Ja,Ka,b={exports:{}},I=String,xo=(b.exports=Ga(),b.exports.createColors=Ga,b.exports),_=(Ya=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))).__esModule?Ya:("function"==typeof(Ja=Ya.default)?(Ka=function e(){return this instanceof e?Reflect.construct(Ja,arguments,this.constructor):Ja.apply(this,arguments)}).prototype=Ja.prototype:Ka={},Object.defineProperty(Ka,"__esModule",{value:!0}),Object.keys(Ya).forEach(function(e){var t=Object.getOwnPropertyDescriptor(Ya,e);Object.defineProperty(Ka,e,t.get?t:{enumerable:!0,get:function(){return Ya[e]}})}),Ka),Xa=xo,qa=_;Zr(Qa,ri(Error));var Zs=S=n(Qa,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==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=Xa.isColorSupported);var n,i,o,s,a,t=(t=qa&&e?qa(t):t).split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,t.length),c=String(u).length;return e?(e=Xa.createColors(!0),n=e.bold,i=e.gray,o=e.red,s=function(e){return n(o(e))},a=function(e){return i(e)}):s=a=function(e){return e},t.slice(l,u).map(function(e,t){var t=l+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=a(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),s(">")+a(n)+e+"\n "+t+s("^")):" "+a(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]);function Qa(e,t,n,r,i,o){var s;return c(this,Qa),(s=Br(this,Qa,[e])).name="CssSyntaxError",s.reason=e,i&&(s.file=i),r&&(s.source=r),o&&(s.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(s.line=t,s.column=n):(s.line=t.line,s.column=t.column,s.endLine=n.line,s.endColumn=n.column)),s.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(s,Qa),s}S.default=S;(k={}).isClean=Symbol("isClean"),k.my=Symbol("my");var $a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},lo=a=n(function e(t){c(this,e),this.builder=t},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";void 0!==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 s=0;s<i;s++)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={}),void 0!==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&&void 0!==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(void 0!==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(void 0!==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)&&void 0!==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(void 0!==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&&void 0!==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],e=e.raws[t];return e&&e.value===n?e.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)}}]),el=(a.default=a,lo);function tl(e,t){new el(t).stringify(e)}var po=tl,nl=(tl.default=tl,k.isClean),rl=k.my,il=Zs,ol=lo,sl=po;function al(e){return c(this,al),(e=Br(this,al,[e=e&&void 0!==e.value&&"string"!=typeof e.value?Te(Te({},e),{},{value:String(e.value)}):e])).type="decl",e}y=n(function e(){var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};for(t in c(this,e),this.raws={},this[nl]=!1,this[rl]=!0,n)if("nodes"===t){this.nodes=[];var r,i=Ae(n[t]);try{for(i.s();!(r=i.n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}catch(e){i.e(e)}finally{i.f()}}else this[t]=n[t]},[{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&&void 0!==arguments[0]?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&&void 0!==arguments[0]?arguments[0]:{},n=function t(e,n){var r,i,o,s=new e.constructor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r&&(o=d(i=e[r]),"parent"===r&&"object"===o?n&&(s[r]=n):"source"===r?s[r]=i:Array.isArray(i)?s[r]=i.map(function(e){return t(e,s)}):("object"===o&&null!==i&&(i=t(i)),s[r]=i));return s}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]?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 il(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[nl]){this[nl]=!1;for(var e=this;e=e.parent;)e[nl]=!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 ol).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,s=r;o<s.length;o++){var a=s[o];a===this?t=!0:t?(this.parent.insertAfter(e,a),e=a):this.parent.insertBefore(e,a)}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={},s=null==t,a=(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"===d(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===d(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=a,t.set(r.input,a),a++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return s&&(o.inputs=ei(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&&void 0!==arguments[0]?arguments[0]:sl,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}}]),(w=y).default=y,Zr(al,w),xa=n(al,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(Ro=xa).default=xa;var ll=_.SourceMapConsumer,ul=_.SourceMapGenerator,cl=_.existsSync,dl=_.readFileSync,hl=_.dirname,fl=_.join,s=ba=n(function e(t,n){c(this,e),!1!==n.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=n.map?n.map.prev:void 0,t=this.loadMap(n.from,t),!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=hl(this.mapFile)),t)&&(this.text=t)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new ll(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"===d(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=hl(e),cl(e))return this.mapFile=e,dl(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=fl(hl(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ll)return ul.fromSourceMap(t).toString();if(t instanceof ul)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){t=this.loadFile(n);if(t)return t;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)}}]),$s=(ba.default=ba,_.SourceMapConsumer),cs=_.SourceMapGenerator,pl=_.fileURLToPath,ml=_.pathToFileURL,gl=_.isAbsolute,vl=_.resolve,yl=function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},r=_,wl=Zs,bl=s,kl=Symbol("fromOffsetCache"),Sl=Boolean($s&&cs),_l=Boolean(vl&&gl),o=hs=n(function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(c(this,e),null==t||"object"===d(t)&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!_l||/^\w+:\/\//.test(n.from)||gl(n.from)?this.file=n.from:this.file=vl(n.from)),_l&&Sl&&(t=new bl(this.css,n)).text&&(n=(this.map=t).consumer().file,!this.file)&&n&&(this.file=this.mapResolve(n)),this.file||(this.id="<input css "+yl(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=(t&&"object"===d(t)?(a=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof a.offset?(r=(o=this.fromOffset(a.offset)).line,o.col):(r=a.line,a.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=a?new wl(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new wl(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,s.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(ml&&(o.input.url=ml(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[kl])n=this[kl];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[kl]=n}var s=0;if(e>=n[n.length-1])s=n.length-1;else for(var a,l=n.length-2;s<l;)if(e<n[a=s+(l-s>>1)])l=a-1;else{if(!(e>=n[a+1])){s=a;break}s=a+1}return{col:e-n[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:vl(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=gl(t.source)?ml(t.source):new URL(t.source,this.map.consumer().sourceRoot||ml(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(!pl)throw new Error("file: protocol is not available in this PostCSS build");r.file=pl(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=Te({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),Cl=(hs.default=hs,r&&r.registerInput&&r.registerInput(hs),_.SourceMapConsumer),Il=_.SourceMapGenerator,El=_.dirname,Rl=_.relative,xl=_.resolve,Ol=_.sep,Al=_.pathToFileURL,Tl=o,Ml=Boolean(Cl&&Il),Pl=Boolean(El&&xl&&Rl&&Ol),zs=n(function e(t,n,r,i){c(this,e),this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,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=Ae(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||El(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new Cl(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(e){t.e(e)}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(),Pl&&Ml&&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=Il.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new Il({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 Il({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,s=1,a={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&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=r.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),r.map.addMapping(a)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=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?(a.source=r.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),r.map.addMapping(a))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return void 0!==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 void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return void 0!==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?El(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=El(xl(t,this.mapOpts.annotation))),t=Rl(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 Tl(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(Al)return t=Al(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;"\\"===Ol&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}]);Zr(Nl,w);xo=b=n(Nl);function Nl(e){return c(this,Nl),(e=Br(this,Nl,[e])).type="comment",e}b.default=b;var Dl,Ll,Fl,Ul,zl,Bl,jl=k.isClean,Wl=k.my,Hl=Ro,Zl=xo,Vl=(Zr(Gl,w),n(Gl,[{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,s=i[r],a=Ae(this.normalize(s,this.last));try{for(a.s();!(o=a.n()).done;){var l=o.value;this.proxyOf.nodes.push(l)}}catch(e){a.e(e)}finally{a.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if($r(Gl,"cleanRaws",this,3)([e]),this.nodes){var t,n=Ae(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(e){n.e(e)}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,ei(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),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),a=Ae(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o+1,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),a=Ae(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(Dl(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Ae(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(e){i.e(e)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var s,a=Ae(e=e.nodes.slice(0));try{for(a.s();!(s=a.n()).done;){var l=s.value;l.parent&&l.parent.removeChild(l,"ignore")}}catch(e){a.e(e)}finally{a.f()}}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Hl(e)]}else if(e.selector)e=[new Ll(e)];else if(e.name)e=[new Fl(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Zl(e)]}return e.map(function(e){return e[Wl]||Gl.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[jl]&&function e(t){if(t[jl]=!1,t.proxyOf.nodes){var n,r=Ae(t.proxyOf.nodes);try{for(r.s();!(n=r.n()).done;)e(n.value)}catch(e){r.e(e)}finally{r.f()}}}(e),void 0===e.raws.before&&t&&void 0!==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=Ae(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,s,a=r.value,l=this.normalize(a,this.first,"prepend").reverse(),u=Ae(l);try{for(u.s();!(o=u.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(e){u.e(e)}finally{u.f()}for(s in this.indexes)this.indexes[s]=this.indexes[s]+l.length}}catch(e){i.e(e)}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=Ae(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(e){t.e(e)}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(t,e){var n;try{n=r(t,e)}catch(e){throw t.addToError(e)}return n=!1!==n&&t.walk?t.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]}}]));function Gl(){return c(this,Gl),Br(this,Gl,arguments)}function Yl(e){return c(this,Yl),(e=Br(this,Yl,[Te({type:"document"},e)])).nodes||(e.nodes=[]),e}function Jl(e){Kl[e]||(Kl[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}Vl.registerParse=function(e){Dl=e},Vl.registerRule=function(e){Ll=e},Vl.registerAtRule=function(e){Fl=e},Vl.registerRoot=function(e){Ul=e},((S=Vl).default=Vl).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Fl.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ll.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hl.prototype):"comment"===e.type?Object.setPrototypeOf(e,Zl.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ul.prototype),e[Wl]=!0,e.nodes&&e.nodes.forEach(function(e){Vl.rebuild(e)})},Zr(Yl,S),(a=n(Yl,[{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new zl(new Bl,this,e).stringify()}}])).registerLazyResult=function(e){zl=e},a.registerProcessor=function(e){Bl=e};var lo=a,Kl=(a.default=a,{}),xa=y=n(function e(t){var n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};for(n in c(this,e),this.type="warning",this.text=t,r.node&&r.node.source&&(t=r.node.rangeBy(r),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),r)this[n]=r[n]},[{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}}]),Xl=(y.default=y,xa),$s=ba=n(function e(t,n,r){c(this,e),this.processor=t,this.messages=[],this.root=n,this.opts=r,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&&void 0!==arguments[1]?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new Xl(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}}]),ql=(ba.default=ba,"'".charCodeAt(0)),Ql='"'.charCodeAt(0),$l="\\".charCodeAt(0),eu="/".charCodeAt(0),tu="\n".charCodeAt(0),nu=" ".charCodeAt(0),ru="\f".charCodeAt(0),iu="\t".charCodeAt(0),ou="\r".charCodeAt(0),su="[".charCodeAt(0),au="]".charCodeAt(0),lu="(".charCodeAt(0),uu=")".charCodeAt(0),cu="{".charCodeAt(0),du="}".charCodeAt(0),hu=";".charCodeAt(0),fu="*".charCodeAt(0),pu=":".charCodeAt(0),mu="@".charCodeAt(0),gu=/[\t\n\f\r "#'()/;[\\\]{}]/g,vu=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yu=/.[\r\n"'(/\\]/,wu=/[\da-f]/i;Zr(Su,cs=S);var bu,ku,hs=r=n(Su,[{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(Su,"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(Su,"prepend",this,3)(t)}}]);function Su(e){return c(this,Su),(e=Br(this,Su,[e])).type="atrule",e}function _u(e){return c(this,_u),(e=Br(this,_u,[e])).type="root",e.nodes||(e.nodes=[]),e}r.default=r,cs.registerAtRule(r),Zr(_u,_=S),(b=n(_u,[{key:"normalize",value:function(e,t,n){var r=$r(_u,"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 i,o=Ae(r);try{for(o.s();!(i=o.n()).done;)i.value.raws.before=t.raws.before}catch(e){o.e(e)}finally{o.f()}}return r}},{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),$r(_u,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new bu(new ku,this,e).stringify()}}])).registerLazyResult=function(e){bu=e},b.registerProcessor=function(e){ku=e};var a=b,Cu=(_.registerRoot(b.default=b),{comma:function(e){return Cu.split(e,[","],!0)},space:function(e){return Cu.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",s=!1,a=0,l=!1,u="",c=!1,d=Ae(e);try{for(d.s();!(r=d.n()).done;){var h=r.value;c?c=!1:"\\"===h?c=!0:l?h===u&&(l=!1):'"'===h||"'"===h?(l=!0,u=h):"("===h?a+=1:")"===h?0<a&&--a:0===a&&t.includes(h)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=h}}catch(e){d.e(e)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}}),y=Cu;Cu.default=Cu;var Iu=y;Zr(Eu,ba=S);r=cs=n(Eu,[{key:"selectors",get:function(){return Iu.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)}}]);function Eu(e){return c(this,Eu),(e=Br(this,Eu,[e])).type="rule",e.nodes||(e.nodes=[]),e}function Ru(t){var r,i,o,s,a,l,u,c,d,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),f=e.ignoreErrors,p=h.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=h.charCodeAt(m)){case tu:case nu:case iu:case ou:case ru:for(i=m;i+=1,(r=h.charCodeAt(i))===nu||r===tu||r===iu||r===ou||r===ru;);d=["space",h.slice(m,i)],m=i-1;break;case su:case au:case cu:case du:case pu:case hu:case uu:var n=String.fromCharCode(r);d=[n,n,m];break;case lu:if(u=g.length?g.pop()[1]:"",c=h.charCodeAt(m+1),"url"===u&&c!==ql&&c!==Ql&&c!==nu&&c!==tu&&c!==iu&&c!==ru&&c!==ou){i=m;do{if(a=!1,-1===(i=h.indexOf(")",i+1))){if(f||t){i=m;break}y("bracket")}for(l=i;h.charCodeAt(l-1)===$l;)--l,a=!a}while(a);d=["brackets",h.slice(m,i+1),m,i],m=i}else i=h.indexOf(")",m+1),u=h.slice(m,i+1),-1===i||yu.test(u)?d=["(","(",m]:(d=["brackets",u,m,i],m=i);break;case ql:case Ql:o=r===ql?"'":'"',i=m;do{if(a=!1,-1===(i=h.indexOf(o,i+1))){if(f||t){i=m+1;break}y("string")}for(l=i;h.charCodeAt(l-1)===$l;)--l,a=!a}while(a);d=["string",h.slice(m,i+1),m,i],m=i;break;case mu:gu.lastIndex=m+1,gu.test(h),i=0===gu.lastIndex?h.length-1:gu.lastIndex-2,d=["at-word",h.slice(m,i+1),m,i],m=i;break;case $l:for(i=m,s=!0;h.charCodeAt(i+1)===$l;)i+=1,s=!s;if(r=h.charCodeAt(i+1),s&&r!==eu&&r!==nu&&r!==tu&&r!==iu&&r!==ou&&r!==ru&&(i+=1,wu.test(h.charAt(i)))){for(;wu.test(h.charAt(i+1));)i+=1;h.charCodeAt(i+1)===nu&&(i+=1)}d=["word",h.slice(m,i+1),m,i],m=i;break;default:m=(r===eu&&h.charCodeAt(m+1)===fu?(0===(i=h.indexOf("*/",m+2)+1)&&(f||t?i=h.length:y("comment")),d=["comment",h.slice(m,i+1),m,i]):(vu.lastIndex=m+1,vu.test(h),i=0===vu.lastIndex?h.length-1:vu.lastIndex-2,d=["word",h.slice(m,i+1),m,i],g.push(d)),i)}return m++,d}},position:function(){return m}}}cs.default=cs,ba.registerRule(cs);var xu=Ro,Ou=xo,Au=hs,Tu=a,Mu=r,Pu={empty:!0,space:!0},_=S,Nu=n(function e(t){c(this,e),this.input=t,this.root=new Tu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new Au;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.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=""),s&&(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,s=Ae(e.entries());try{for(s.s();!(i=s.n()).done;){var a=Qr(i.value,2),l=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}}catch(e){s.e(e)}finally{s.f()}return!1}},{key:"comment",value:function(e){var t=new Ou,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=Ru(this.input)}},{key:"decl",value:function(e,t){var n=new xu;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]||(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 s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;0<=l;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(n.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",h=l;0<h;h--){var f=c[h][0];if(0===d.trim().indexOf("!")&&"space"!==f)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+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.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 Mu;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=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(t=l[0],a.push(l),"("===t||"["===t)i=i||l,o.push("("===t?")":"]");else if(s&&r&&"{"===t)i=i||l,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(a,s);break}if("{"===t)return void this.rule(a);if("}"===t){this.tokenizer.back(a.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{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,s,a,l=n.length,u="",c=!0,d=0;d<l;d+=1)"space"===(s=(i=n[d])[0])&&d===l-1&&!r||"comment"===s&&(s=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",Pu[s]||Pu[o]||","===u.slice(-1))?c=!1:u+=i[1];c||(a=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:a,value:u}),e[t]=u}},{key:"rule",value:function(e){e.pop();var t=new Mu;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})}}]),Du=o;function Lu(e,t){var n=new Du(e,t),n=new Nu(n);try{n.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return n.root}var b=Lu,Fu=(_.registerParse(Lu.default=Lu),k.isClean),Uu=k.my,zu=zs,Bu=po,ju=S,ba=lo,Wu=Jl,Hu=$s,Zu=b,cs=a,Vu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gu={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},Yu={Once:!0,postcssPlugin:!0,prepare:!0};function Ju(e){return"object"===d(e)&&"function"==typeof e.then}function Ku(e){var t=!1,n=Vu[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 Xu(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ku(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function qu(e){return e[Fu]=!1,e.nodes&&e.nodes.forEach(qu),e}var Qu,$u={},k=((_=n(function e(t,n,r){var i,o=this;if(c(this,e),this.stringified=!1,this.processed=!1,"object"!==d(n)||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof Hu)i=qu(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var s=Zu;r.syntax&&(s=r.syntax.parse),(s=r.parser?r.parser:s).parse&&(s=s.parse);try{i=s(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[Uu]&&ju.rebuild(i)}else i=qu(n);this.result=new Hu(t,i,r),this.helpers=Te(Te({},$u),{},{postcss:$u,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===d(e)&&e.prepare?Te(Te({},e),e.prepare(o.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,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[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=a.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};function e(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])}var t,n=Ae(this.plugins);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("object"===d(i))for(var o in i){if(!Gu[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(!Yu[o])if("object"===d(i[o]))for(var s in i[o])e(i,"*"===s?o:o+"-"+s.toLowerCase(),i[o][s]);else"function"==typeof i[o]&&e(i,o,i[o])}}}catch(r){n.e(r)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(Qu=zr(Jr().m(function e(){var t,i,n,r,o,s,a,l,u,c=this;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(a=this.plugins[t],Ju(a=this.runOnRoot(a)))return e.p=2,e.n=3,a;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,a=e.v,this.handleError(a);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[Fu]){e.n=14;break}i[Fu]=!0,n=[Xu(i)];case 8:if(0<n.length){if(Ju(l=this.visitTick(n)))return e.p=9,e.n=10,l;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,l=e.v,u=n[n.length-1].node,this.handleError(l,u);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Ae(this.listeners.OnceExit),e.p=15,s=Jr().m(function e(){var t,n,r;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Qr(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)}},e,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(Xr(s()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,u=e.v,r.e(u);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 Qu.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===d(t)&&t.Once?"document"===this.result.root.type?Ju((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(t){throw this.handleError(t)}}},{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=Bu,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new zu(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=Ae(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(Ju(this.runOnRoot(n)))throw this.getAsyncError()}}catch(e){t.e(e)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[Fu];)r[Fu]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Ae(r.nodes);try{for(o.s();!(i=o.n()).done;){var s=i.value;this.visitSync(this.listeners.OnceExit,s)}}catch(e){o.e(e)}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||Wu("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=Ae(e);try{for(r.s();!(n=r.n()).done;){var i=Qr(n.value,2),o=i[0],s=i[1],a=(this.result.lastPlugin=o,void 0);try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Ju(a))throw this.getAsyncError()}}catch(e){r.e(e)}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=Qr(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(e){throw this.handleError(e,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[Fu])return s[Fu]=!0,void e.push(Xu(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[Fu]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[Fu]=!0;var n,r=Ae(Ku(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[Fu]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(e){r.e(e)}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){$u=e},_),ec=(cs.registerLazyResult(_.default=_),ba.registerLazyResult(_),zs),tc=po,nc=Jl,rc=b,ic=$s,ba=cs=n(function e(t,n,r){c(this,e),n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;var t=tc,i=(this.result=new ic(this._processor,void 0,this._opts),this.result.css=n,this),r=(Object.defineProperty(this.result,"root",{get:function(){return i.root}}),new ec(t,void 0,this._opts,n));r.isMap()?(n=(t=Qr(r.generate(),2))[0],t=t[1],n&&(this.result.css=n),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.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||nc("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=rc;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),oc=(cs.default=cs,ba),sc=k,_=lo,zs=a,ba=cs=n(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];c(this,e),this.version="8.4.38",this.plugins=this.normalize(t)},[{key:"normalize",value:function(e){var t,n=[],r=Ae(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"===d(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===d(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==d(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(e){r.e(e)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?sc:oc)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),ac=(cs.default=cs,zs.registerProcessor(cs),_.registerProcessor(cs),Ro),lc=s,uc=xo,cc=hs,dc=o,hc=a,fc=r;function pc(e,t){if(Array.isArray(e))return e.map(function(e){return pc(e)});var n,r=e.inputs,i=Yr(e,li);if(r){t=[];var o,s=Ae(r);try{for(s.s();!(o=s.n()).done;){var a=Te(Te({},o.value),{},{__proto__:dc.prototype});a.map&&(a.map=Te(Te({},a.map),{},{__proto__:lc.prototype})),t.push(a)}}catch(e){s.e(e)}finally{s.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return pc(e,t)})),i.source&&(n=(r=i.source).inputId,r=Yr(r,ui),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new hc(i);if("decl"===i.type)return new ac(i);if("rule"===i.type)return new fc(i);if("comment"===i.type)return new uc(i);if("atrule"===i.type)return new cc(i);throw new Error("Unknown node type: "+e.type)}var zs=pc,_=(pc.default=pc,Zs),mc=Ro,cs=k,s=S,gc=ba,Zs=po,Ro=zs,vc=lo,k=xa,yc=xo,wc=hs,S=$s,ba=o,po=b,zs=y,bc=r,kc=a,lo=w;function E(){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 gc(t)}E.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 gc).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return E([i(n)]).process(e,t)},i},E.stringify=Zs,E.parse=po,E.fromJSON=Ro,E.list=zs,E.comment=function(e){return new yc(e)},E.atRule=function(e){return new wc(e)},E.decl=function(e){return new mc(e)},E.rule=function(e){return new bc(e)},E.root=function(e){return new kc(e)},E.document=function(e){return new vc(e)},E.CssSyntaxError=_,E.Declaration=mc,E.Container=s,E.Processor=gc,E.Document=vc,E.Comment=yc,E.Warning=k,E.AtRule=wc,E.Result=S,E.Input=ba,E.Rule=bc,E.Root=kc,E.Node=lo,cs.registerPostcss(E);xa=E;E.default=E;(hs=(xo=xa)&&xo.__esModule&&Object.prototype.hasOwnProperty.call(xo,"default")?xo.default:xo).stringify;var Sc=n(Ec,[{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 Ec&&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"}}]),_c={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Cc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ic={};function Ec(){c(this,Ec),Za(this,"parentElement",null),Za(this,"parentNode",null),Za(this,"ownerDocument"),Za(this,"firstChild",null),Za(this,"lastChild",null),Za(this,"previousSibling",null),Za(this,"nextSibling",null),Za(this,"ELEMENT_NODE",1),Za(this,"TEXT_NODE",3),Za(this,"nodeType"),Za(this,"nodeName"),Za(this,"RRNodeType")}function Rc(e){if(Ic[e])return Ic[e];var t=globalThis[e],n=t.prototype,r=e in _c?_c[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 Cc?Cc[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 Ic[e]=t.prototype,t.prototype;try{var o,s=document.createElement("iframe"),a=(document.body.appendChild(s),s.contentWindow);return a?(o=a[e].prototype,document.body.removeChild(s),o?Ic[e]=o:n):t.prototype}catch(e){return n}}var xc={};function Oc(e,t,n){var r="".concat(e,".").concat(String(n));return xc[r]?xc[r].call(t):(e=Rc(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(xc[r]=e).call(t):t[n])}var Ac={};function Tc(e,t,n){var r="".concat(e,".").concat(String(n));return Ac[r]?Ac[r].bind(t):"function"!=typeof(e=Rc(e)[n])?t[n]:(Ac[r]=e).bind(t)}function Mc(){return Rc("MutationObserver").constructor}function Pc(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(e){return function(){}}}var Me={ownerDocument:function(e){return Oc("Node",e,"ownerDocument")},childNodes:function(e){return Oc("Node",e,"childNodes")},parentNode:function(e){return Oc("Node",e,"parentNode")},parentElement:function(e){return Oc("Node",e,"parentElement")},textContent:function(e){return Oc("Node",e,"textContent")},contains:function(e,t){return Tc("Node",e,"contains")(t)},getRootNode:function(e){return Tc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Oc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Oc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Oc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Oc("Element",e,"querySelectorAll")(t)},mutationObserver:Mc,patch:Pc};function Nc(e,t,n){var r=2<arguments.length&&void 0!==n?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var Dc="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.",$s={map:{},getId:function(){return console.error(Dc),-1},getNode:function(){return console.error(Dc),null},removeNodeFromMap:function(){console.error(Dc)},has:function(){return console.error(Dc),!1},reset:function(){console.error(Dc)}};function Lc(s,a,e){var l=2<arguments.length&&void 0!==e?e:{},u=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!==l.leading||(c=r),a-(r-c)),o=this;i<=0||a<i?(u&&(clearTimeout(u),u=null),c=r,s.apply(o,t)):u||!1===l.trailing||(u=setTimeout(function(){c=!1===l.leading?0:Date.now(),u=null,s.apply(o,t)},i))}}function Fc(e,t,n,r,i){var i=4<arguments.length&&void 0!==i?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 Fc(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy($s,{get:function(e,t,n){return"map"===t&&console.error(Dc),Reflect.get(e,t,n)}});var Uc=Date.now;function zc(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=Me.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=Me.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function Bc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function jc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wc(e){return e?e.nodeType===e.ELEMENT_NODE?e:Me.parentElement(e):null}function Hc(e,t,n,r){if(e){var i=Wc(e);if(i){try{if("string"==typeof t){if(i.classList.contains(t))return 1;if(r&&null!==i.closest("."+t))return 1}else if(qi(i,t,r))return 1}catch(e){}if(n){if(i.matches(n))return 1;if(r&&null!==i.closest(n))return 1}}}}function Zc(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function Vc(e){return Boolean(e.changedTouches)}function Gc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Yc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Jc(e){return e&&(e instanceof Sc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Me.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Uc=function(){return(new Date).getTime()});var Kc=n(function e(){c(this,e),h(this,"id",1),h(this,"styleIDMap",new WeakMap),h(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 Xc(e){var t,n=null;return n="getRootNode"in e&&(null==(t=Me.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Me.host(Me.getRootNode(e))?Me.host(Me.getRootNode(e)):n}function qc(n){var e,t=Me.ownerDocument(n);return!!t&&(e=(()=>{for(var e,t=n;e=Xc(t);)t=e;return t})(),Me.contains(t,e))}function Qc(e){var t=Me.ownerDocument(e);return t&&(Me.contains(t,e)||qc(e))}var Q=o={DomContentLoaded:0,0:"DomContentLoaded",Load:1,1:"Load",FullSnapshot:2,2:"FullSnapshot",IncrementalSnapshot:3,3:"IncrementalSnapshot",Meta:4,4:"Meta",Custom:5,5:"Custom",Plugin:6,6:"Plugin"},Pe=((b=Pe||{})[b.Mutation=0]="Mutation",b[b.MouseMove=1]="MouseMove",b[b.MouseInteraction=2]="MouseInteraction",b[b.Scroll=3]="Scroll",b[b.ViewportResize=4]="ViewportResize",b[b.Input=5]="Input",b[b.TouchMove=6]="TouchMove",b[b.MediaInteraction=7]="MediaInteraction",b[b.StyleSheetRule=8]="StyleSheetRule",b[b.CanvasMutation=9]="CanvasMutation",b[b.Font=10]="Font",b[b.Log=11]="Log",b[b.Drag=12]="Drag",b[b.StyleDeclaration=13]="StyleDeclaration",b[b.Selection=14]="Selection",b[b.AdoptedStyleSheet=15]="AdoptedStyleSheet",b[b.CustomElement=16]="CustomElement",b),$c=((y=$c||{})[y.MouseUp=0]="MouseUp",y[y.MouseDown=1]="MouseDown",y[y.Click=2]="Click",y[y.ContextMenu=3]="ContextMenu",y[y.DblClick=4]="DblClick",y[y.Focus=5]="Focus",y[y.Blur=6]="Blur",y[y.TouchStart=7]="TouchStart",y[y.TouchMove_Departed=8]="TouchMove_Departed",y[y.TouchEnd=9]="TouchEnd",y[y.TouchCancel=10]="TouchCancel",y),ed=((r=ed||{})[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r),td=((a={})[a["2D"]=0]="2D",a[a.WebGL=1]="WebGL",a[a.WebGL2=2]="WebGL2",a),nd=((w=nd||{})[w.Play=0]="Play",w[w.Pause=1]="Pause",w[w.Seeked=2]="Seeked",w[w.VolumeChange=3]="VolumeChange",w[w.RateChange=4]="RateChange",w),rd=((Zs={})[Zs.Document=0]="Document",Zs[Zs.DocumentType=1]="DocumentType",Zs[Zs.Element=2]="Element",Zs[Zs.Text=3]="Text",Zs[Zs.CDATA=4]="CDATA",Zs[Zs.Comment=5]="Comment",Zs);function id(e){return"__ln"in e}function od(e,t){return"".concat(e,"@").concat(t)}var sd,ad=n(function e(){c(this,e),h(this,"length",0),h(this,"head",null),h(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&&id(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&&id(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--)}}]),ld=n(function e(){var w=this;c(this,e),h(this,"frozen",!1),h(this,"locked",!1),h(this,"texts",[]),h(this,"attributes",[]),h(this,"attributeMap",new WeakMap),h(this,"removes",[]),h(this,"mapRemoves",[]),h(this,"movedMap",{}),h(this,"addedSet",new Set),h(this,"movedSet",new Set),h(this,"droppedSet",new Set),h(this,"removesSubTreeCache",new Set),h(this,"mutationCb"),h(this,"blockClass"),h(this,"blockSelector"),h(this,"maskTextClass"),h(this,"maskTextSelector"),h(this,"inlineStylesheet"),h(this,"maskInputOptions"),h(this,"maskTextFn"),h(this,"maskInputFn"),h(this,"keepIframeSrcFn"),h(this,"recordCanvas"),h(this,"inlineImages"),h(this,"slimDOMOptions"),h(this,"dataURLOptions"),h(this,"doc"),h(this,"mirror"),h(this,"iframeManager"),h(this,"stylesheetManager"),h(this,"shadowDomManager"),h(this,"canvasManager"),h(this,"processedNodeManager"),h(this,"unattachedDoc"),h(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),h(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,s=new ad,a=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=Me.parentNode(t);if(e&&Qc(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=Ci(e)?w.mirror.getId(Xc(t)):w.mirror.getId(e),e=a(t);if(-1===r||-1===e)return s.addNode(t);n=to(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){Gc(e,w.mirror)&&w.iframeManager.addIframe(e),Yc(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),Jc(t)&&w.shadowDomManager.addShadowRoot(Me.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=Ae(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;cd(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(Me.parentNode(r))||e(r)}}catch(i){n.e(i)}finally{n.f()}var l,u=Ae(w.addedSet);try{for(u.s();!(l=u.n()).done;){var c=l.value;!dd(w.droppedSet,c)&&!cd(w.removesSubTreeCache,c,w.mirror)||dd(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(i){u.e(i)}finally{u.f()}for(var d=null;s.length;){var h,f,p=null;if(!(p=d&&(h=w.mirror.getId(Me.parentNode(d.value)),f=a(d.value),-1!==h)&&-1!==f?d:p))for(var m=s.tail;m;){var g=m,m=m.previous;if(g){var v=w.mirror.getId(Me.parentNode(g.value));if(-1!==a(g.value)){if(-1!==v){p=g;break}v=g.value,v=Me.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=Me.host(v);if(-1!==w.mirror.getId(v)){p=g;break}}}}}if(!p){for(;s.head;)s.removeNode(s.head.value);break}d=p.previous,s.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=Me.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))}}),h(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(Me.childNodes(e),function(e){return Me.textContent(e)||""}).join(""));t.attributes.value=Oi({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:Ti(e),value:n,maskInputFn:w.maskInputFn})}),h(this,"processMutation",function(s){if(!Zc(s.target,w.mirror,w.slimDOMOptions))switch(s.type){case"characterData":var e=Me.textContent(s.target);Hc(s.target,w.blockClass,w.blockSelector,!1)||e===s.oldValue||w.texts.push({value:Qi(s.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,Wc(s.target)):e.replace(/[\S]/g,"*"):e,node:s.target});break;case"attributes":var t,n=s.target,e=s.attributeName,r=s.target.getAttribute(e);if("value"===e&&(t=Ti(n),r=Oi({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:r,maskInputFn:w.maskInputFn})),!Hc(s.target,w.blockClass,w.blockSelector,!1)&&r!==s.oldValue){var i=w.attributeMap.get(s.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(r)){if(n.contentDocument)return;e="rr_src"}if(i||(i={node:s.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(i),w.attributeMap.set(s.target,i)),"type"===e&&"INPUT"===n.tagName&&"password"===(s.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Xi(n.tagName,e))if(i.attributes[e]=Ki(w.doc,Ai(n.tagName),Ai(e),r),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(s){w.unattachedDoc=w.doc}var o=w.unattachedDoc.createElement("span");s.oldValue&&o.setAttribute("style",s.oldValue);for(var a=0,l=Array.from(n.style);a<l.length;a++){var u=l[a],c=n.style.getPropertyValue(u),d=n.style.getPropertyPriority(u);c!==o.style.getPropertyValue(u)||d!==o.style.getPropertyPriority(u)?i.styleDiff[u]=""===d?c:[c,d]:i._unchangedStyles[u]=[c,d]}for(var h=0,f=Array.from(o.style);h<f.length;h++){var p=f[h];""===n.style.getPropertyValue(p)&&(i.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal")}break;case"childList":return Hc(s.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===s.target.tagName?void w.genTextAreaValueMutation(s.target):(s.addedNodes.forEach(function(e){return w.genAdds(e,s.target)}),void s.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=Ci(s.target)?w.mirror.getId(Me.host(s.target)):w.mirror.getId(s.target);if(!Hc(s.target,w.blockClass,w.blockSelector,!1)&&!Zc(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))ud(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(s.target)&&-1===t||function e(t,n){var r;return!Ci(t)&&(r=n.getId(t),!n.has(r)||(!(r=Me.parentNode(t))||r.nodeType!==t.DOCUMENT_NODE)&&(!r||e(r,n)))}(s.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[od(t,n)])ud(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!Ci(s.target)||!Ii(s.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),Me.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),h(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(Zc(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[od(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet.delete(t);Hc(t,w.blockClass,w.blockSelector,!1)||(Me.childNodes(t).forEach(function(e){return w.genAdds(e)}),Jc(t)&&Me.childNodes(Me.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 ud(t,e){t.delete(e),Me.childNodes(e).forEach(function(e){return ud(t,e)})}function cd(e,t){return 0!==e.size&&(e=e,t=Me.parentNode(t))&&e.has(t)}function dd(e,t){return 0!==e.size&&function e(t,n){n=Me.parentNode(n);return!!n&&(!!t.has(n)||e(t,n))}(e,t)}var Ne=function(e){return sd?function(){try{return e.apply(void 0,arguments)}catch(e){if(!sd||!0!==sd(e))throw e}}:e},hd=[];function fd(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(e){}return e&&e.target}function pd(e,t){var n=new ld,e=(hd.push(n),n.init(e),new(Mc())(Ne(n.processMutations.bind(n))));return e.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),e}function md(e){var t,r,s,a=e.mouseInteractionCb,i=e.doc,l=e.mirror,u=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],s=null,Object.keys($c).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){function t(e){var t=fd(e);if(!Hc(t,u,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=ed.Mouse;break;case"touch":n=ed.Touch;break;case"pen":n=ed.Pen}n===ed.Touch?$c[o]===$c.MouseDown?r="TouchStart":$c[o]===$c.MouseUp&&(r="TouchEnd"):ed.Pen}else Vc(e)&&(n=ed.Touch);null!==n?(s=n,(r.startsWith("Touch")&&n===ed.Touch||r.startsWith("Mouse")&&n===ed.Mouse)&&(n=null)):$c[o]===$c.Click&&(n=s,s=null);var i,e=Vc(e)?e.changedTouches[0]:e;e&&(t=l.getId(t),i=e.clientX,e=e.clientY,Ne(a)(Te({type:$c[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}}var o,n=Ai(e);o=e;if(window.PointerEvent)switch($c[e]){case $c.MouseDown:case $c.MouseUp:n=n.replace("mouse","pointer");break;case $c.TouchStart:case $c.TouchEnd:return}r.push(Nc(n,t,i))}),Ne(function(){r.forEach(function(e){return e()})}))}function gd(e){var r=e.scrollCb,i=e.doc,o=e.mirror,s=e.blockClass,a=e.blockSelector,e=e.sampling;return Nc("scroll",Ne(Lc(Ne(function(e){var t,n,e=fd(e);e&&!Hc(e,s,a,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=zc(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 vd=["INPUT","TEXTAREA","SELECT"],yd=new WeakMap;function wd(e){return e=e,t=[],_d("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_d("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_d("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_d("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n)):e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t;var t,n}function bd(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function kd(e,t){var n=e.mirror,r=e.stylesheetManager,i="#document"===t.nodeName?n.getId(t):n.getId(Me.host(t)),n="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(e=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:e.ShadowRoot,o=null!=n&&n.prototype?Object.getOwnPropertyDescriptor(null==n?void 0:n.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&n&&o?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:function(){var e;return null==(e=o.get)?void 0:e.call(this)},set:function(e){var t=null==(t=o.set)?void 0:t.call(this,e);if(null!==i&&-1!==i)try{r.adoptStyleSheets(e,i)}catch(e){}return t}}),Ne(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):function(){}}function Sd(e){var t,n,r,D,L,F,U,z,B,j,W,H,Z,V,G,i=e.doc.defaultView;if(!i)return function(){};n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=(E=e).mutationCb,D=E.mousemoveCb,L=E.mouseInteractionCb,F=E.scrollCb,U=E.viewportResizeCb,z=E.inputCb,B=E.mediaInteractionCb,j=E.styleSheetRuleCb,W=E.styleDeclarationCb,H=E.canvasMutationCb,Z=E.fontCb,V=E.selectionCb,G=E.customElementCb,E.mutationCb=function(){n.mutation&&n.mutation.apply(n,arguments),r.apply(void 0,arguments)},E.mousemoveCb=function(){n.mousemove&&n.mousemove.apply(n,arguments),D.apply(void 0,arguments)},E.mouseInteractionCb=function(){n.mouseInteraction&&n.mouseInteraction.apply(n,arguments),L.apply(void 0,arguments)},E.scrollCb=function(){n.scroll&&n.scroll.apply(n,arguments),F.apply(void 0,arguments)},E.viewportResizeCb=function(){n.viewportResize&&n.viewportResize.apply(n,arguments),U.apply(void 0,arguments)},E.inputCb=function(){n.input&&n.input.apply(n,arguments),z.apply(void 0,arguments)},E.mediaInteractionCb=function(){n.mediaInteaction&&n.mediaInteaction.apply(n,arguments),B.apply(void 0,arguments)},E.styleSheetRuleCb=function(){n.styleSheetRule&&n.styleSheetRule.apply(n,arguments),j.apply(void 0,arguments)},E.styleDeclarationCb=function(){n.styleDeclaration&&n.styleDeclaration.apply(n,arguments),W.apply(void 0,arguments)},E.canvasMutationCb=function(){n.canvasMutation&&n.canvasMutation.apply(n,arguments),H.apply(void 0,arguments)},E.fontCb=function(){n.font&&n.font.apply(n,arguments),Z.apply(void 0,arguments)},E.selectionCb=function(){n.selection&&n.selection.apply(n,arguments),V.apply(void 0,arguments)},E.customElementCb=function(){n.customElement&&n.customElement.apply(n,arguments),G.apply(void 0,arguments)},e.recordDOM&&(t=pd(e,e.doc));le=(E=e).mousemoveCb,x=E.doc,ue=E.mirror;var Y,J,K,X,q,Q,$,s,ee,te,ne,re,a,l,ie,u,o,c,oe,d,h,f,p,se,ae,le,ue,m,g,v,ce,y,w,b,k,S,_,C,I,de=!1===(R=E.sampling).mousemove?function(){}:(E="number"==typeof R.mousemove?R.mousemove:50,R="number"==typeof R.mousemoveCallback?R.mousemoveCallback:500,p=[],se=Lc(Ne(function(e){var t=Date.now()-f;le(p.map(function(e){return e.timeOffset-=t,e}),e),p=[],f=null}),R),R=Ne(Lc(Ne(function(e){var t=fd(e),n=Vc(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;f=f||Uc(),p.push({x:r,y:n,id:ue.getId(t),timeOffset:Uc()-f}),se("undefined"!=typeof DragEvent&&e instanceof DragEvent?Pe.Drag:e instanceof MouseEvent?Pe.MouseMove:Pe.TouchMove)}),E,{trailing:!1})),ae=[Nc("mousemove",R,x),Nc("touchmove",R,x),Nc("drag",R,x)],Ne(function(){ae.forEach(function(e){return e()})})),he=md(e),fe=gd(e),pe=(E={win:i},oe=(R=e).viewportResizeCb,R=E.win,h=d=-1,Nc("resize",Ne(Lc(Ne(function(){var e=Bc(),t=jc();d===e&&h===t||(oe({width:Number(t),height:Number(e)}),d=e,h=t)}),200)),R)),me=($=(x=e).inputCb,s=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,a=x.ignoreSelector,l=x.maskInputOptions,ie=x.maskInputFn,u=x.userTriggeredOnInput,o=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return Nc(e,Ne(ke),s)}),(c=s.defaultView)?(x=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),E=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]],x&&x.set&&o.push.apply(o,ei(E.map(function(e){return Fc(e[0],e[1],{set:function(){Ne(ke)({target:this,isTrusted:!1})}},!1,c)}))),Ne(function(){o.forEach(function(e){return e()})})):function(){o.forEach(function(e){return e()})}),ge=(Y=(R=e).mediaInteractionCb,J=R.blockClass,K=R.blockSelector,X=R.mirror,q=R.sampling,R=R.doc,x=Ne(function(s){return Lc(Ne(function(e){var t,n,r,i,o,e=fd(e);e&&!Hc(e,J,K,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,Y({type:s,id:X.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),q.media||500)}),Q=[Nc("play",x(nd.Play),R),Nc("pause",x(nd.Pause),R),Nc("seeked",x(nd.Seeked),R),Nc("volumechange",x(nd.VolumeChange),R),Nc("ratechange",x(nd.RateChange),R)],Ne(function(){Q.forEach(function(e){return e()})})),ve=function(){},ye=function(){},we=function(){},be=function(){};function ke(e){var t,n,r,i=fd(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?Me.parentElement(i):i)||!o||vd.indexOf(o)<0||Hc(i,te,ne,!0)||i.classList.contains(re)||a&&i.matches(a)||(t=i.value,n=!1,"radio"===(r=Ti(i)||"")||"checkbox"===r?n=i.checked:(l[o.toLowerCase()]||l[r])&&(t=Oi({element:i,maskInputOptions:l,tagName:o,type:r,value:t,maskInputFn:ie})),Se(i,u?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&s.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,Se(e,u?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function Se(e,t){var n=yd.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(yd.set(e,t),n=ee.getId(e),Ne($)(Te(Te({},t),{},{id:n})))}e.recordDOM&&(ve=((e,t)=>{var a=e.styleSheetRuleCb,l=e.mirror,u=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:Ne(function(e,t,n){var r=Qr(n,2),i=r[0],r=r[1],o=bd(t,l,u.styleMirror),s=o.id,o=o.styleId;return(s&&-1!==s||o&&-1!==o)&&a({id:s,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,s=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ne(function(e,t,n){var r=Qr(n,1)[0],i=bd(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({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:Ne(function(e,t,n){var r=Qr(n,1)[0],i=bd(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({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:Ne(function(e,t,n){var r=Qr(n,1)[0],i=bd(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),d=(Cd("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Cd("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Cd("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Cd("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=Qr(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:Ne(function(e,t,n){var r=Qr(n,2),i=r[0],r=r[1],o=bd(t.parentStyleSheet,l,u.styleMirror),s=o.id,o=o.styleId;return(s&&-1!==s||o&&-1!==o)&&a({id:s,styleId:o,adds:[{rule:i,index:[].concat(ei(wd(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ne(function(e,t,n){var r=Qr(n,1)[0],i=bd(t.parentStyleSheet,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({id:o,styleId:i,removes:[{index:[].concat(ei(wd(t)),[r])}]}),e.apply(t,n)})})}),Ne(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=Qr(e,2),t=e[0],e=e[1];e.prototype.insertRule=d[t].insertRule,e.prototype.deleteRule=d[t].deleteRule})})})(e,{win:i}),ye=kd(e,e.doc),E={win:i},w=(x=e).styleDeclarationCb,b=x.mirror,k=x.ignoreCSSAttributes,S=x.stylesheetManager,_=E.win,C=_.CSSStyleDeclaration.prototype.setProperty,_.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:Ne(function(e,t,n){var r,i,o=Qr(n,3),s=o[0],a=o[1],o=o[2];return k.has(s)?C.apply(t,[s,a,o]):(r=(i=bd(null==(i=t.parentRule)?void 0:i.parentStyleSheet,b,S.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&w({id:r,styleId:i,set:{property:s,value:a,priority:o},index:wd(t.parentRule)}),e.apply(t,n))})}),I=_.CSSStyleDeclaration.prototype.removeProperty,_.CSSStyleDeclaration.prototype.removeProperty=new Proxy(I,{apply:Ne(function(e,t,n){var r,i,o=Qr(n,1)[0];return k.has(o)?I.apply(t,[o]):(r=(i=bd(null==(i=t.parentRule)?void 0:i.parentStyleSheet,b,S.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&w({id:r,styleId:i,remove:{property:o},index:wd(t.parentRule)}),e.apply(t,n))})}),we=Ne(function(){_.CSSStyleDeclaration.prototype.setProperty=C,_.CSSStyleDeclaration.prototype.removeProperty=I}),e.collectFonts)&&(ce=(R=e).fontCb,y=(R=R.doc).defaultView,be=y?(m=[],g=new WeakMap,v=y.FontFace,y.FontFace=function(e,t,n){var r=new v(e,t,n);return g.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},R=Pc(R.fonts,"add",function(e){return function(t){return setTimeout(Ne(function(){var e=g.get(t);e&&(ce(e),g.delete(t))}),0),e.apply(this,[t])}}),m.push(function(){y.FontFace=v}),m.push(R),Ne(function(){m.forEach(function(e){return e()})})):function(){});Ie=(x=e).doc,O=x.mirror,A=x.blockClass,T=x.blockSelector,Ee=x.selectionCb,M=!0,(x=Ne(function(){var e=Ie.getSelection();if(!(!e||M&&null!=e&&e.isCollapsed)){M=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,s=i.startOffset,a=i.endContainer,i=i.endOffset;Hc(o,A,T,!0)||Hc(a,A,T,!0)||t.push({start:O.getId(o),startOffset:s,end:O.getId(a),endOffset:i})}Ee({ranges:t})}}))();var _e,E,R,Ce,x,Ie,O,A,T,Ee,M,Re=Nc("selectionchange",x),xe=(R=(E=e).doc,Ce=E.customElementCb,(E=R.defaultView)&&E.customElements?Pc(E.customElements,"define",function(r){return function(t,e,n){try{Ce({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return r.apply(this,[t,e,n])}}):function(){}),Oe=[],P=Ae(e.plugins);try{for(P.s();!(_e=P.n()).done;){var N=_e.value;Oe.push(N.observer(N.callback,i,N.options))}}catch(e){P.e(e)}finally{P.f()}return Ne(function(){hd.forEach(function(e){return e.reset()}),null!=t&&t.disconnect(),de(),he(),fe(),pe(),me(),ge(),ve(),ye(),we(),be(),Re(),xe(),Oe.forEach(function(e){return e()})})}function _d(e){return void 0!==window[e]}function Cd(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var Id=n(function e(t){c(this,e),h(this,"iframeIdToRemoteIdMap",new WeakMap),h(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t},[{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}}]),Ed=n(function e(t){c(this,e),h(this,"iframes",new WeakMap),h(this,"crossOriginIframeMap",new WeakMap),h(this,"crossOriginIframeMirror",new Id(Hi)),h(this,"crossOriginIframeStyleMirror"),h(this,"crossOriginIframeRootIdMap",new WeakMap),h(this,"mirror"),h(this,"mutationCb"),h(this,"wrappedEmit"),h(this,"loadListener"),h(this,"stylesheetManager"),h(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Id(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.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:Pe.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 Pe.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 Pe.Drag:case Pe.TouchMove:case Pe.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case Pe.ViewportResize:return!1;case Pe.MediaInteraction:case Pe.MouseInteraction:case Pe.Scroll:case Pe.CanvasMutation:case Pe.Input:return this.replaceIds(e.data,n,["id"]),e;case Pe.StyleSheetRule:case Pe.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case Pe.Font:return e;case Pe.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case Pe.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=Ae(r);try{for(o.s();!(i=o.n()).done;){var s=i.value;!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(e){o.e(e)}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===rd.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),Rd=n(function e(t){c(this,e),h(this,"shadowDoms",new WeakSet),h(this,"mutationCb"),h(this,"scrollCb"),h(this,"bypassOptions"),h(this,"mirror"),h(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;Ii(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=pd(Te(Te({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(gd(Te(Te({},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(Me.host(e))),r.restoreHandlers.push(kd({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(Pc(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=Me.shadowRoot(this);return t&&Qc(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Od="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ad=0;Ad<xd.length;Ad++)Od[xd.charCodeAt(Ad)]=Ad;var Td=new Map,Md=function(e,t,n){var r;if(e&&(Dd(e,t)||"object"===d(e)))return t=n,n=e.constructor.name,(r=Td.get(t))||(r=new Map,Td.set(t,r)),r.has(n)||r.set(n,[]),-1===(r=(t=r.get(n)).indexOf(e))&&(r=t.length,t.push(e)),r};function Pd(i,t,n){return i instanceof Array?i.map(function(e){return Pd(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:(()=>{for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=xd[e[r]>>2])+xd[(3&e[r])<<4|e[r+1]>>4])+xd[(15&e[r+1])<<2|e[r+2]>>6])+xd[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:[Pd(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:[Pd(i.data,t,n),i.width,i.height]}:Dd(i,t)||"object"===d(i)?{rr_type:i.constructor.name,index:Md(i,t,n)}:i}function Nd(e,t,n){return e.map(function(e){return Pd(e,t,n)})}var Dd=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 Ld(e,s,a,l){var t=[];try{var n=Pc(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 Hc(this,s,a,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),l&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===d(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(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function Fd(n,a,l,u,c,d){var e,r=[],t=Ae(Object.getOwnPropertyNames(n));try{for(t.s();!(e=t.n()).done;)(()=>{var s=e.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return;try{if("function"!=typeof n[s])return;var t=Pc(n,s,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 Md(i,d,this),"tagName"in this.canvas&&!Hc(this.canvas,u,c,!0)&&(r=Nd(t,d,this),l(this.canvas,{type:a,property:s,args:r})),i}});r.push(t)}catch(e){t=Fc(n,s,{set:function(e){l(this.canvas,{type:a,property:s,args:[e],setter:!0})}});r.push(t)}})()}catch(n){t.e(n)}finally{t.f()}return r}var Ud="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",zd="undefined"!=typeof window&&window.Blob&&new Blob([Uint8Array.from(atob("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo="),function(e){return e.charCodeAt(0)})],{type:"text/javascript;charset=utf-8"});function Bd(e){var t,n;try{if(t=zd&&(window.URL||window.webkitURL).createObjectURL(zd))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),n;throw""}catch(t){return new Worker("data:text/javascript;base64,"+Ud,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var jd,Wd,Hd,Zd,Vd=n(function e(t){var n=this,r=(c(this,e),h(this,"pendingCanvasMutations",new Map),h(this,"rafStamps",{latestId:0,invokeId:null}),h(this,"mirror"),h(this,"mutationCb"),h(this,"resetObservers"),h(this,"frozen",!1),h(this,"locked",!1),h(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)}),t.sampling),r=void 0===r?"all":r,i=t.win,o=t.blockClass,s=t.blockSelector,a=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&"all"===r&&this.initCanvasMutationObserver(i,o,s),a&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,o,s,{dataURLOptions:l})},[{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,r,i,o,s){var a=this,t=Ld(r,i,o,!0),l=new Map,u=new Bd;u.onmessage=function(e){var t,n=e.data.id;l.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,a.mutationCb({id:n,type:td["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,h=function(e){var t,n;f=(d&&e-d<c||(d=e,t=[],r.document.querySelectorAll("canvas").forEach(function(e){Hc(e,i,o,!0)||t.push(e)}),t.forEach((n=zr(Jr().m(function e(t){var n,r,i;return Jr().w(function(e){for(;;)switch(e.n){case 0:if(n=a.mirror.getId(t),l.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 l.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,u.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:s.dataURLOptions},[i]);case 4:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(h))},f=requestAnimationFrame(h);this.resetObservers=function(){t(),cancelAnimationFrame(f)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=Ld(e,t,n,!1),s=((s,a,l,u)=>{var e,n=[],t=Ae(Object.getOwnPropertyNames(a.CanvasRenderingContext2D.prototype));try{for(t.s();!(e=t.n()).done;)(()=>{var o=e.value;try{if("function"!=typeof a.CanvasRenderingContext2D.prototype[o])return;var t=Pc(a.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 Hc(this.canvas,l,u,!0)||setTimeout(function(){var e=Nd(n,a,t);s(t.canvas,{type:td["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(t)}catch(e){t=Fc(a.CanvasRenderingContext2D.prototype,o,{set:function(e){s(this.canvas,{type:td["2D"],property:o,args:[e],setter:!0})}});n.push(t)}})()}catch(s){t.e(s)}finally{t.f()}return function(){n.forEach(function(e){return e()})}})(this.processMutation.bind(this),e,t,n),a=(r=this.processMutation.bind(this),e=e,t=t,n=n,(i=[]).push.apply(i,ei(Fd(e.WebGLRenderingContext.prototype,td.WebGL,r,t,n,e))),void 0!==e.WebGL2RenderingContext&&i.push.apply(i,ei(Fd(e.WebGL2RenderingContext.prototype,td.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),s(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){function t(e){n.rafStamps.latestId=e,requestAnimationFrame(t)}var n=this;requestAnimationFrame(t)}},{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,Yr(e,ci)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations.delete(e))}}]),Gd=n(function e(t){c(this,e),h(this,"trackedLinkElements",new WeakSet),h(this,"mutationCb"),h(this,"adoptedStyleSheetCb"),h(this,"styleMirror",new Kc),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.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:[]},s=[],n=Ae(e);try{for(n.s();!(i=n.n()).done;)(()=>{var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),s.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:Ri(e,n.href),index:t}})})),o.styleIds.push(e)})()}catch(e){n.e(e)}finally{n.f()}0<s.length&&(o.styles=s),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),Yd=n(function e(){c(this,e),h(this,"nodeMap",new WeakMap),h(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(){}}]),Jd=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(Zd=document.createElement("iframe"),document.body.appendChild(Zd),Array.from=(null==(oi=Zd.contentWindow)?void 0:oi.Array.from)||Array.from,document.body.removeChild(Zd))}catch(Fh){console.debug("Unable to override Array.from",Fh)}var Kd=new xi;function Xd(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,l=void 0===t?"rr-block":t,t=e.blockSelector,u=void 0===t?null:t,t=e.ignoreClass,D=void 0===t?"rr-ignore":t,t=e.ignoreSelector,L=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,h=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,f=e.maskInputFn,p=e.maskTextFn,U=e.hooks,z=e.packFn,s=e.sampling,a=void 0===s?{}:s,s=e.dataURLOptions,m=void 0===s?{}:s,s=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,j=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,Z=void 0===y?new Set([]):y,S=(sd=e.errorHandler,!g||window.parent===window),_=!1;if(!S)try{window.parent.document&&(_=!1)}catch(e){_=!0}if(S&&!r)throw new Error("emit function is required");if(!S&&!_)return function(){};void 0!==s&&void 0===a.mousemove&&(a.mousemove=s),Kd.reset();var V,C=!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},I=eo(F),E=(!function(e){"NodeList"in(e=0<arguments.length&&void 0!==e?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=Ae(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(e){n.e(e)}finally{n.f()}return e=z&&!_?z(e):e};jd=function(e,t){var n;e.timestamp=Uc(),null==(n=hd[0])||!n.isFrozen()||e.type===Q.FullSnapshot||e.type===Q.IncrementalSnapshot&&e.data.source===Pe.Mutation||hd.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===Q.FullSnapshot?(V=e,E=0):e.type!==Q.IncrementalSnapshot||e.data.source===Pe.Mutation&&e.data.isAttachIframe||(E++,t=o&&o<=E,n=i&&e.timestamp-V.timestamp>i,(t||n)&&Wd(!0))};function R(e){jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.Mutation},e)})}function Y(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.Scroll},e)})}function J(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.CanvasMutation},e)})}var K,x=new Gd({mutationCb:R,adoptedStyleSheetCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.AdoptedStyleSheet},e)})}}),O=new Ed({mirror:Kd,mutationCb:R,stylesheetManager:x,recordCrossOriginIframes:g,wrappedEmit:jd}),A=Ae(b||[]);try{for(A.s();!(K=A.n()).done;){var X=K.value;X.getMirror&&X.getMirror({nodeMirror:Kd,crossOriginIframeMirror:O.crossOriginIframeMirror,crossOriginIframeStyleMirror:O.crossOriginIframeStyleMirror})}}catch(e){A.e(e)}finally{A.f()}var T=new Yd,M=(Hd=new Vd({recordCanvas:v,mutationCb:J,win:window,blockClass:l,blockSelector:u,mirror:Kd,sampling:a.canvas,dataURLOptions:m}),new Rd({mutationCb:R,scrollCb:Y,bypassOptions:{blockClass:l,blockSelector:u,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:C,dataURLOptions:m,maskTextFn:p,maskInputFn:f,recordCanvas:v,inlineImages:w,sampling:a,slimDOMOptions:I,iframeManager:O,stylesheetManager:x,canvasManager:Hd,keepIframeSrcFn:k,processedNodeManager:T},mirror:Kd}));Wd=function(){var e,t,n,r,i,o,s=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(B){jd({type:Q.Meta,data:{href:window.location.href,width:jc(),height:Bc()}},s),x.reset(),M.init(),hd.forEach(function(e){return e.lock()});a=document,r=void 0===(r=(e=(e={mirror:Kd,blockClass:l,blockSelector:u,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskAllInputs:C,maskTextFn:p,maskInputFn:f,slimDOM:I,dataURLOptions:m,recordCanvas:v,inlineImages:w,onSerialize:function(e){Gc(e,Kd)&&O.addIframe(e),Yc(e,Kd)&&x.trackLinkElement(e),Jc(e)&&M.addShadowRoot(Me.shadowRoot(e),document)},onIframeLoad:function(e,t){O.attachIframe(e,t),M.observeAttachShadow(e)},onStylesheetLoad:function(e,t){x.attachLinkElement(e,t)},keepIframeSrcFn:k})||{}).mirror)?new xi:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var a=to(a,{doc:a,mirror:r,blockClass:void 0===(a=e.blockClass)?"rr-block":a,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(a=e.maskTextClass)?"rr-mask":a,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(a=e.inlineStylesheet)||a,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:eo(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(!a)return console.warn("Failed to snapshot the document");jd({type:Q.FullSnapshot,data:{node:a,initialOffset:zc(window)}},s),hd.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,Kd.getId(document))}};try{var P=[],q=function(e){return Ne(Sd)({mutationCb:R,mousemoveCb:function(e,t){return jd({type:Q.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.MouseInteraction},e)})},scrollCb:Y,viewportResizeCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.ViewportResize},e)})},inputCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.Input},e)})},mediaInteractionCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.MediaInteraction},e)})},styleSheetRuleCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.StyleSheetRule},e)})},styleDeclarationCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.StyleDeclaration},e)})},canvasMutationCb:J,fontCb:function(e){return jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.Font},e)})},selectionCb:function(e){jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.Selection},e)})},customElementCb:function(e){jd({type:Q.IncrementalSnapshot,data:Te({source:Pe.CustomElement},e)})},blockClass:l,ignoreClass:D,ignoreSelector:L,maskTextClass:c,maskTextSelector:d,maskInputOptions:C,inlineStylesheet:h,sampling:a,recordDOM:B,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:f,maskTextFn:p,keepIframeSrcFn:k,blockSelector:u,slimDOMOptions:I,dataURLOptions:m,mirror:Kd,iframeManager:O,stylesheetManager:x,shadowDomManager:M,processedNodeManager:T,canvasManager:Hd,ignoreCSSAttributes:Z,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 jd({type:Q.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},N=(O.addLoadListener(function(e){try{P.push(q(e.contentDocument))}catch(e){console.warn(e)}}),function(){Wd(),P.push(q(document)),Jd=!0});return["interactive","complete"].includes(document.readyState)?N():(P.push(Nc("DOMContentLoaded",function(){jd({type:Q.DomContentLoaded,data:{}}),"DOMContentLoaded"===j&&N()})),P.push(Nc("load",function(){jd({type:Q.Load,data:{}}),"load"===j&&N()},window))),function(){P.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),T.destroy(),Jd=!1,sd=void 0}}catch(e){console.warn(e)}}Xd.addCustomEvent=function(e,t){if(!Jd)throw new Error("please add custom event after start recording");jd({type:Q.Custom,data:{tag:e,payload:t}})},Xd.freezePage=function(){hd.forEach(function(e){return e.freeze()})},Xd.takeFullSnapshot=function(e){if(!Jd)throw new Error("please take full snapshot after start recording");Wd(e)},Xd.mirror=Kd;var qd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Qd={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}},$d=(eh.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)})},eh.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})},eh.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),e=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+e)})},eh.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)})},eh.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},eh.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},eh.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},eh.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,eh.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,eh.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,eh.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,eh.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,eh);function eh(){}function th(e,t){return void 0===e&&(e={}),f(f(f({},t=void 0===t?Qd:t),e),{mask:nh(t.mask,e.mask),block:nh(t.block,e.block),ignore:nh(t.ignore,e.ignore),maskInputOptions:f(f({},t.maskInputOptions),e.maskInputOptions)})}function nh(e,t){e=new Set(N(e||[],t||[]));return Array.from(e)}lh.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)},lh.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},lh.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},lh.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},lh.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},lh.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)},lh.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var s=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var a=this,l=0,u=null!=(t=e.removes)?t:[];l<u.length;l++)(t=>{var e=(null!=(n=s.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(s.adds.splice(e,1),a.cancelledByOffset++):(s.removes=null!=(n=s.removes)?n:[],s.removes.push(t))})(u[l]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var h=d[c];s.adds=null!=(r=s.adds)?r:[],s.adds.push(h)}for(var f=0,p=null!=(t=e.attributes)?t:[];f<p.length;f++)(t=>{s.attributes=null!=(i=s.attributes)?i:[];var e=s.attributes.findIndex(function(e){return e.id===t.id});0<=e?s.attributes[e]=t:s.attributes.push(t)})(p[f]);for(var m=0,g=null!=(t=e.texts)?t:[];m<g.length;m++)(t=>{s.texts=null!=(o=s.texts)?o:[];var e=s.texts.findIndex(function(e){return e.id===t.id});0<=e?s.texts[e]=t:s.texts.push(t)})(g[m])}},lh.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:N(null!=(e=t.adds)?e:[]),removes:N(null!=(e=t.removes)?e:[]),attributes:N(null!=(e=t.attributes)?e:[]),texts:N(null!=(e=t.texts)?e:[])}}},lh.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},lh.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var rh=lh,ih=(ah.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:void 0,s=th(e.privacy||{},Qd),a=f(f(f(f({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!l.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={},void 0!==(o=s).maskAllInputs&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(a=o.mask)&&a.length&&(t.maskTextSelector=o.mask.join(",")),null!=(a=o.block)&&a.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+qd:qd,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(a=o.ignore)&&a.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=$d.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=Xd(a),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),v("RecorderManager","Recording started with config:",{maskAllText:s.maskAllText,maskAllInputs:s.maskAllInputs,autoDetectSensitiveData:s.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(e){Or("RecorderManager","Failed to start recording:",e),this.state="stopped"}}else xr("RecorderManager","Already recording")},ah.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=void 0),this.state="stopped",v("RecorderManager","Recording stopped")},ah.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",v("RecorderManager","Recording paused"))},ah.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),v("RecorderManager","Recording resumed"))},ah.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},Rr("RecorderManager","MutationObserver hooked"))}catch(t){xr("RecorderManager","Failed to hook MutationObserver:",t)}},ah.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,Rr("RecorderManager","MutationObserver restored"))},ah.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,Or("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))},ah.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||(Or("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)},ah.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=Xd.addCustomEvent)&&n.call(Xd,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(e){}},ah.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(i=(r=this.options).onCheckout)&&i.call(r),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=Xd.takeFullSnapshot;"function"==typeof o&&(o(!0),Rr("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(e){xr("RecorderManager","Inline checkpoint failed:",e)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},ah.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,xr("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=Xd.addCustomEvent)&&e.call(Xd,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(e){}}return!1}return!0},ah.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=Xd.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),Rr("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(e){xr("RecorderManager","Checkpoint FullSnapshot failed:",e)}},12e4)},ah.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},ah.prototype.getState=function(){return this.state},ah.prototype.isRecording=function(){return"recording"===this.state},ah.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},ah.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())},ah.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},ah),oh=(sh.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,v("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,v("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,v("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},sh.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},sh.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},sh.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,v("SamplerManager","Mode switched: "+t+" -> "+e)},sh.prototype.getCurrentMode=function(){return this.currentMode},sh.prototype.isSampled=function(){return!0===this.samplingDecision},sh.prototype.isSessionMode=function(){return"session"===this.currentMode},sh.prototype.isBufferMode=function(){return"buffer"===this.currentMode},sh.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",v("SamplerManager","Upgraded to session mode due to error"),!0)},sh.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},sh.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},sh.prototype.getConfig=function(){return f({},this.config)},sh);function sh(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 ah(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 rh({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function lh(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 uh(e){for(var t=e.length;0<=--t;)e[t]=0}var ch=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]),dh=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]),hh=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),fh=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ph=new Array(576),mh=(uh(ph),new Array(60)),gh=(uh(mh),new Array(512)),vh=(uh(gh),new Array(256)),yh=(uh(vh),new Array(29));uh(yh);var wh,bh,kh,Sh=new Array(30);function _h(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 Ch(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function Ih(e){return e<256?gh[e]:gh[256+(e>>>7)]}function Eh(e,t,n){Yh(e,n[2*t],n[2*t+1])}function Rh(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function xh(e,t,n){for(var r,i=new Array(16),o=0,s=1;s<=15;s++)o=o+n[s-1]<<1,i[s]=o;for(r=0;r<=t;r++){var a=e[2*r+1];0!==a&&(e[2*r]=Rh(i[a]++,a))}}function Oh(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}function Ah(e){8<e.bi_valid?Gh(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Th(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Jh(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Jh(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function Mh(e,t,n){var r,i,o,s,a=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,i=e.pending_buf[e.sym_buf+a++],0==r?Eh(e,i,t):(o=vh[i],Eh(e,o+256+1,t),0!==(s=ch[o])&&(i-=yh[o],Yh(e,i,s)),o=Ih(--r),Eh(e,o,n),0!==(s=dh[o])&&(r-=Sh[o],Yh(e,r,s))),a<e.sym_next;);Eh(e,256,t)}function Ph(e,t){var n,r,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;1<=n;n--)Th(e,o,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Th(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++,Th(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,d,h,f,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,C=0;C<=15;C++)m.bl_count[C]=0;for(g[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(C=g[2*g[2*(d=m.heap[c])+1]+1]+1)>S&&(C=S,_++),g[2*d+1]=C,v<d||(m.bl_count[C]++,f=0,k<=d&&(f=b[d-k]),p=g[2*d],m.opt_len+=p*(C+f),w&&(m.static_len+=p*(y[2*d+1]+f)));if(0!==_){do{for(C=S-1;0===m.bl_count[C];)C--}while(m.bl_count[C]--,m.bl_count[C+1]+=2,m.bl_count[S]--,0<(_-=2));for(C=S;0!==C;C--)for(d=m.bl_count[C];0!==d;)(h=m.heap[--c])>v||(g[2*h+1]!==C&&(m.opt_len+=(C-g[2*h+1])*g[2*h],g[2*h+1]=C),d--)}xh(o,u,e.bl_count)}function Nh(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++a<l&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,u=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4))}function Dh(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++a<l&&i===s)){if(a<u)for(;Eh(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(Eh(e,i,e.bl_tree),a--),Eh(e,16,e.bl_tree),Yh(e,a-3,2)):a<=10?(Eh(e,17,e.bl_tree),Yh(e,a-3,3)):(Eh(e,18,e.bl_tree),Yh(e,a-11,7));o=i,u=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4)}}function Lh(e,t,n,r){Yh(e,0+(r?1:0),3),Ah(e),Gh(e,n),Gh(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n}function Fh(e,t){return e.msg=$h[t],t}function Uh(e){return 2*e-(4<e?9:0)}function zh(e,t){nf(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ef(e.strm)}function R(e,t){e.pending_buf[e.pending++]=t}function Bh(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function jh(e,t){var n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,l=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+258,f=u[o+s-1],p=u[o+s];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<a&&(a=e.lookahead);do{if(u[(n=t)+s]===p&&u[n+s-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){for(o+=2,n++;u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<h;);if(r=258-(h-o),o=h-258,s<r){if(e.match_start=t,a<=(s=r))break;f=u[o+s-1],p=u[o+s]}}}while((t=d[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function Wh(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),Cf(e),t+=r),0===e.strm.avail_in)break;if(t=Rf(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=If(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=If(e,e.ins_h,e.window[n+3-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function Hh(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,a=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!==uf||t===sf||n!==r+e.strm.avail_in)||(s=t===uf&&n===r+e.strm.avail_in?1:0,tf(e,0,0,s),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,Ef(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&&(Rf(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!==s)););return(a-=e.strm.avail_in)&&(a>=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<=a&&(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-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=e.w_size-e.insert<a?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==sf&&t!==uf&&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)&&(Rf(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===uf)&&t!==sf&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,s=t===uf&&0===e.strm.avail_in&&n===r?1:0,tf(e,e.block_start,n,s),e.block_start+=n,Ef(e.strm)),s?3:1)}function Zh(e,t){for(var n,r;;){if(e.lookahead<262){if(Wh(e),e.lookahead<262&&t===sf)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=If(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=jh(e,n)),3<=e.match_length)if(r=rf(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++,e.ins_h=If(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=If(e,e.ins_h,e.window[e.strstart+1]);else r=rf(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(zh(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===uf?(zh(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zh(e,!1),0===e.strm.avail_out)?1:2}function Vh(e,t){for(var n,r,i;;){if(e.lookahead<262){if(Wh(e),e.lookahead<262&&t===sf)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=If(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=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=jh(e,n),e.match_length<=5)&&(e.strategy===vf||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=rf(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=If(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(zh(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=rf(e,0,e.window[e.strstart-1]))&&zh(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=rf(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===uf?(zh(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zh(e,!1),0===e.strm.avail_out)?1:2}uh(Sh);var Gh=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Yh=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,Gh(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)},Jh=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]},Kh=!1,po=function(e){if(!Kh){for(var t,n,r,i=new Array(16),o=0,s=0;s<28;s++)for(yh[s]=o,t=0;t<1<<ch[s];t++)vh[o++]=s;for(vh[o-1]=s,s=r=0;s<16;s++)for(Sh[s]=r,t=0;t<1<<dh[s];t++)gh[r++]=s;for(r>>=7;s<30;s++)for(Sh[s]=r<<7,t=0;t<1<<dh[s]-7;t++)gh[256+r++]=s;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)ph[2*t+1]=8,t++,i[8]++;for(;t<=255;)ph[2*t+1]=9,t++,i[9]++;for(;t<=279;)ph[2*t+1]=7,t++,i[7]++;for(;t<=287;)ph[2*t+1]=8,t++,i[8]++;for(xh(ph,287,i),t=0;t<30;t++)mh[2*t+1]=5,mh[2*t]=Rh(t,5);wh=new _h(ph,ch,257,286,15),bh=new _h(mh,dh,0,30,15),kh=new _h(new Array(0),hh,0,19,7),Kh=!0}e.l_desc=new Ch(e.dyn_ltree,wh),e.d_desc=new Ch(e.dyn_dtree,bh),e.bl_desc=new Ch(e.bl_tree,kh),e.bi_buf=0,e.bi_valid=0,Oh(e)},Ro=Lh,zs=function(e,t,n,r){var i,o,s,a=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=(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)),Ph(e,e.l_desc),Ph(e,e.d_desc),a=(e=>{var t;for(Nh(e,e.dyn_ltree,e.l_desc.max_code),Nh(e,e.dyn_dtree,e.d_desc.max_code),Ph(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*fh[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)Lh(e,t,n,r);else if(4===e.strategy||o===i)Yh(e,2+(r?1:0),3),Mh(e,ph,mh);else{Yh(e,4+(r?1:0),3);var l=e,u=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,a+1);for(Yh(l,t-257,5),Yh(l,n-1,5),Yh(l,u-4,4),s=0;s<u;s++)Yh(l,l.bl_tree[2*fh[s]+1],3);Dh(l,l.dyn_ltree,t-1),Dh(l,l.dyn_dtree,n-1),Mh(e,e.dyn_ltree,e.dyn_dtree)}Oh(e),r&&Ah(e)},_=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*(vh[n]+256+1)]++,e.dyn_dtree[2*Ih(t)]++),e.sym_next===e.sym_end},s=function(e){Yh(e,2,3),Eh(e,256,ph),16===(e=e).bi_valid?(Gh(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)},Xh=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0},qh=new Uint32Array((()=>{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})()),Qh=function(e,t,n,r){var i=qh,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^i[255&(e^t[s])];return-1^e},$h={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"},ef=po,tf=Ro,nf=zs,rf=_,of=s,sf=(k={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}).Z_NO_FLUSH,af=k.Z_PARTIAL_FLUSH,lf=k.Z_FULL_FLUSH,uf=k.Z_FINISH,cf=k.Z_BLOCK,df=k.Z_OK,hf=k.Z_STREAM_END,ff=k.Z_STREAM_ERROR,pf=k.Z_DATA_ERROR,mf=k.Z_BUF_ERROR,gf=k.Z_DEFAULT_COMPRESSION,vf=k.Z_FILTERED,yf=k.Z_HUFFMAN_ONLY,wf=k.Z_RLE,bf=k.Z_FIXED,kf=k.Z_UNKNOWN,Sf=k.Z_DEFLATED,_f=function(e){for(var t=e.length;0<=--t;)e[t]=0},Cf=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;);},If=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},Ef=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)},Rf=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=Xh(e.adler,t,i,n):2===e.state.wrap&&(e.adler=Qh(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)};function xf(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 Of=[new xf(0,0,0,0,Hh),new xf(4,4,8,4,Zh),new xf(4,5,16,8,Zh),new xf(4,6,32,32,Zh),new xf(4,4,16,16,Vh),new xf(8,16,32,32,Vh),new xf(8,16,128,128,Vh),new xf(8,32,128,256,Vh),new xf(32,128,258,1024,Vh),new xf(32,258,258,4096,Vh)];function Af(){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=Sf,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.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),_f(this.dyn_ltree),_f(this.dyn_dtree),_f(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),_f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_f(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}function Tf(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}function Mf(e){var t=Lf(e);return t===df&&((e=e.state).window_size=2*e.w_size,_f(e.head),e.max_lazy_match=Of[e.level].max_lazy,e.good_match=Of[e.level].good_length,e.nice_match=Of[e.level].nice_length,e.max_chain_length=Of[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}function Pf(e,t,n,r,i,o){if(!e)return ff;var s=1;if(t===gf&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==Sf||r<8||15<r||t<0||9<t||o<0||bf<o||8===r&&1!==s)return Fh(e,ff);8===r&&(r=9);var a=new Af;return(e.state=a).strm=e,a.status=42,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=o,a.method=n,Mf(e)}function Nf(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==d(n))throw new TypeError(n+"must be non-object");for(var r in n)Wf(n,r)&&(e[r]=n[r])}}return e}function Df(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,s=0,a=e.length;o<a;o++){var l=e[o];i.set(l,s),s+=l.length}return i}var Lf=function(e){if(Tf(e))return Fh(e,ff);e.total_in=e.total_out=0,e.data_type=kf;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,ef(t),df},Ff=Pf,Uf=function(e,t){return Tf(e)||2!==e.state.wrap?ff:(e.state.gzhead=t,df)},zf=function(e,t){if(Tf(e)||cf<t||t<0)return e?Fh(e,ff):ff;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==uf)return Fh(e,0===e.avail_out?mf:ff);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Ef(e),0===e.avail_out)return n.last_flush=-1,df}else if(0===e.avail_in&&Uh(t)<=Uh(r)&&t!==uf)return Fh(e,mf);if(666===n.status&&0!==e.avail_in)return Fh(e,mf);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=Sf+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=yf||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),Bh(n,r+=31-r%31),0!==n.strstart&&(Bh(n,e.adler>>>16),Bh(n,65535&e.adler)),e.adler=1,n.status=113,Ef(e),0!==n.pending)return n.last_flush=-1,df}if(57===n.status)if(e.adler=0,R(n,31),R(n,139),R(n,8),n.gzhead)R(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)),R(n,255&n.gzhead.time),R(n,n.gzhead.time>>8&255),R(n,n.gzhead.time>>16&255),R(n,n.gzhead.time>>24&255),R(n,9===n.level?2:n.strategy>=yf||n.level<2?4:0),R(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(R(n,255&n.gzhead.extra.length),R(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Qh(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(R(n,0),R(n,0),R(n,0),R(n,0),R(n,0),R(n,9===n.level?2:n.strategy>=yf||n.level<2?4:0),R(n,3),n.status=113,Ef(e),0!==n.pending)return n.last_flush=-1,df;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 s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=Qh(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Ef(e),0!==n.pending)return n.last_flush=-1,df;i=0,o-=s}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=Qh(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var a,l=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>l&&(e.adler=Qh(e.adler,n.pending_buf,n.pending-l,l)),Ef(e),0!==n.pending)return n.last_flush=-1,df;l=0}}while(a=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,R(n,a),0!=a);n.gzhead.hcrc&&n.pending>l&&(e.adler=Qh(e.adler,n.pending_buf,n.pending-l,l)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var u,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=Qh(e.adler,n.pending_buf,n.pending-c,c)),Ef(e),0!==n.pending)return n.last_flush=-1,df;c=0}}while(u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,R(n,u),0!=u);n.gzhead.hcrc&&n.pending>c&&(e.adler=Qh(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&&(Ef(e),0!==n.pending))return n.last_flush=-1,df;R(n,255&e.adler),R(n,e.adler>>8&255),e.adler=0}if(n.status=113,Ef(e),0!==n.pending)return n.last_flush=-1,df}if(0!==e.avail_in||0!==n.lookahead||t!==sf&&666!==n.status){r=0===n.level?Hh(n,t):n.strategy===yf?((e,t)=>{for(var n;;){if(0===e.lookahead&&(Wh(e),0===e.lookahead)){if(t===sf)return 1;break}if(e.match_length=0,n=rf(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(zh(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===uf?(zh(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zh(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===wf?((e,t)=>{for(var n,r,i,o,s=e.window;;){if(e.lookahead<=258){if(Wh(e),e.lookahead<=258&&t===sf)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){for(o=e.strstart+258;r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++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=rf(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=rf(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(zh(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===uf?(zh(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(zh(e,!1),0===e.strm.avail_out)?1:2})(n,t):Of[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),df;if(2===r&&(t===af?of(n):t!==cf&&(tf(n,0,0,!1),t===lf)&&(_f(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),Ef(e),0===e.avail_out))return n.last_flush=-1,df}return t!==uf||!(n.wrap<=0)&&(2===n.wrap?(R(n,255&e.adler),R(n,e.adler>>8&255),R(n,e.adler>>16&255),R(n,e.adler>>24&255),R(n,255&e.total_in),R(n,e.total_in>>8&255),R(n,e.total_in>>16&255),R(n,e.total_in>>24&255)):(Bh(n,e.adler>>>16),Bh(n,65535&e.adler)),Ef(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?df:hf},Bf=function(e){var t;return Tf(e)?ff:(t=e.state.status,e.state=null,113===t?Fh(e,pf):df)},jf=function(e,t){var n=t.length;if(Tf(e))return ff;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return ff;1===i&&(e.adler=Xh(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(_f(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,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Wh(r);3<=r.lookahead;){for(var l=r.strstart,u=r.lookahead-2;r.ins_h=If(r,r.ins_h,r.window[l+3-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++,--u;);r.strstart=l,r.lookahead=2,Wh(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=s,e.input=a,e.avail_in=o,r.wrap=i,df},Wf=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Hf=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(x){Hf=!1}for(var Zf=new Uint8Array(256),Vf=0;Vf<256;Vf++)Zf[Vf]=252<=Vf?6:248<=Vf?5:240<=Vf?4:224<=Vf?3:192<=Vf?2:1;function Gf(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,s=0,a=0;a<o;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=i=0;i<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),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}function Yf(){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}Zf[254]=Zf[254]=1;var Jf=Object.prototype.toString,Kf=k.Z_NO_FLUSH,Xf=k.Z_SYNC_FLUSH,qf=k.Z_FULL_FLUSH,Qf=k.Z_FINISH,$f=k.Z_OK,ep=k.Z_STREAM_END,tp=k.Z_DEFAULT_COMPRESSION,np=k.Z_DEFAULT_STRATEGY,rp=k.Z_DEFLATED;function ip(e){this.options=Nf({level:tp,method:rp,chunkSize:16384,windowBits:15,memLevel:8,strategy:np},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 Yf,this.strm.avail_out=0,Ff(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy));if(t!==$f)throw new Error($h[t]);if(e.header&&Uf(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?Gf(e.dictionary):"[object ArrayBuffer]"===Jf.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=jf(this.strm,e))!==$f)throw new Error($h[t]);this._dict_set=!0}}function op(e,t){t=new ip(t);if(t.push(e,!0),t.err)throw t.msg||$h[t.err];return t.result}function sp(e,t,n,r,i,o,s,a){for(var l,u,c,d,h,f,p,m,g,v=a.bits,y=0,w=0,b=0,k=0,S=0,_=0,C=0,I=0,E=0,R=0,x=null,O=new Uint16Array(16),A=new Uint16Array(16),T=null,y=0;y<=15;y++)O[y]=0;for(w=0;w<r;w++)O[t[n+w]]++;for(S=v,k=15;1<=k&&0===O[k];k--);if(k<S&&(S=k),0===k)i[o++]=20971520,i[o++]=20971520,a.bits=1;else{for(b=1;b<k&&0===O[b];b++);for(S<b&&(S=b),y=I=1;y<=15;y++)if((I=(I<<1)-O[y])<0)return-1;if(0<I&&(0===e||1!==k))return-1;for(A[1]=0,y=1;y<15;y++)A[y+1]=A[y]+O[y];for(w=0;w<r;w++)0!==t[n+w]&&(s[A[t[n+w]]++]=w);if(f=0===e?(x=T=s,20):1===e?(x=lp,T=up,257):(x=cp,T=dp,0),y=b,h=o,C=w=R=0,c=-1,d=(E=1<<(_=S))-1,1===e&&852<E||2===e&&592<E)return 1;for(;;){for(g=s[w]+1<f?(m=0,s[w]):s[w]>=f?(m=T[s[w]-f],x[s[w]-f]):(m=96,0),l=1<<(p=y-C),b=u=1<<_;i[h+(R>>C)+(u-=l)]=p<<24|m<<16|g|0,0!==u;);for(l=1<<y-1;R&l;)l>>=1;if(0!==l?R=(R&l-1)+l:R=0,w++,0==--O[y]){if(y===k)break;y=t[n+s[w]]}if(S<y&&(R&d)!==c){for(h+=b,I=1<<(_=y-(C=0===C?S:C));_+C<k&&!((I-=O[_+C])<=0);)_++,I<<=1;if(E+=1<<_,1===e&&852<E||2===e&&592<E)return 1;i[c=R&d]=S<<24|_<<16|h-o|0}}0!==R&&(i[h+R]=y-C<<24|64<<16|0),a.bits=S}return 0}function ap(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}ip.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?Qf:Kf,"string"==typeof e?i.input=Gf(e):"[object ArrayBuffer]"===Jf.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===Xf||r===qf)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(zf(i,r)===ep)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=Bf(this.strm),this.onEnd(n),this.ended=!0,n===$f;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},ip.prototype.onData=function(e){this.chunks.push(e)},ip.prototype.onEnd=function(e){e===$f&&(this.result=Df(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var S={Deflate:ip,deflate:op,deflateRaw:function(e,t){return(t=t||{}).raw=!0,op(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,op(e,t)},constants:k},lp=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]),up=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,72,78]),cp=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]),dp=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]),hp=k.Z_FINISH,fp=k.Z_BLOCK,pp=k.Z_TREES,mp=k.Z_OK,gp=k.Z_STREAM_END,vp=k.Z_NEED_DICT,yp=k.Z_STREAM_ERROR,wp=k.Z_DATA_ERROR,bp=k.Z_MEM_ERROR,kp=k.Z_BUF_ERROR,Sp=k.Z_DEFLATED,ie=16209;function _p(){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}function Cp(e){var t;return Mp(e)?yp:(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,mp)}function Ip(e){var t;return Mp(e)?yp:((t=e.state).wsize=0,t.whave=0,t.wnext=0,Cp(e))}function Ep(e,t){var n,r;return Mp(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?yp:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Ip(e))}function Rp(e,t){var n;return e?(n=new _p,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=Ep(e,t))!==mp&&(e.state=null),n):yp}function xp(e,t,n,r){var i;return null===(e=e.state).window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new Uint8Array(e.wsize)),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}function Op(){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}var Ap,Tp,Mp=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},Pp=!0,Np=Ip,Dp=Rp,Lp=function(e,L){var t,n,F,r,i,o,s,a,l,U,u,c,z,B,d,h,f,p,j,W,m,g,v,y,w=0,b=new Uint8Array(4),H=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Mp(e)||!e.output||!e.input&&0!==e.avail_in)return yp;16191===(t=e.state).mode&&(t.mode=16192),i=e.next_out,F=e.output,r=e.next_in,n=e.input,a=t.hold,l=t.bits,U=o=e.avail_in,u=s=e.avail_out,g=mp;e:for(;;)switch(t.mode){case 16180:if(0===t.wrap)t.mode=16192;else{for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}2&t.wrap&&35615===a?(0===t.wbits&&(t.wbits=15),b[t.check=0]=255&a,b[1]=a>>>8&255,t.check=Qh(t.check,b,2,0),l=a=0,t.mode=16181):(t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&a)<<8)+(a>>8))%31?(e.msg="incorrect header check",t.mode=ie):(15&a)!==Sp?(e.msg="unknown compression method",t.mode=ie):(l-=4,m=8+(15&(a>>>=4)),0===t.wbits&&(t.wbits=m),15<m||m>t.wbits?(e.msg="invalid window size",t.mode=ie):(t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=512&a?16189:16191,l=a=0)))}break;case 16181:for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(t.flags=a,(255&t.flags)!==Sp){e.msg="unknown compression method",t.mode=ie;break}if(57344&t.flags){e.msg="unknown header flags set",t.mode=ie;break}t.head&&(t.head.text=a>>8&1),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Qh(t.check,b,2,0)),l=a=0,t.mode=16182;case 16182:for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.head&&(t.head.time=a),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,b[2]=a>>>16&255,b[3]=a>>>24&255,t.check=Qh(t.check,b,4,0)),l=a=0,t.mode=16183;case 16183:for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.head&&(t.head.xflags=255&a,t.head.os=a>>8),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Qh(t.check,b,2,0)),l=a=0,t.mode=16184;case 16184:if(1024&t.flags){for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.length=a,t.head&&(t.head.extra_len=a),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Qh(t.check,b,2,0)),l=a=0}else t.head&&(t.head.extra=null);t.mode=16185;case 16185:if(1024&t.flags&&((c=(c=t.length)>o?o:c)&&(t.head&&(m=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(n.subarray(r,r+c),m)),512&t.flags&&4&t.wrap&&(t.check=Qh(t.check,n,c,r)),o-=c,r+=c,t.length-=c),t.length))break e;t.length=0,t.mode=16186;case 16186:if(2048&t.flags){if(0===o)break e;for(c=0;m=n[r+c++],t.head&&m&&t.length<65536&&(t.head.name+=String.fromCharCode(m)),m&&c<o;);if(512&t.flags&&4&t.wrap&&(t.check=Qh(t.check,n,c,r)),o-=c,r+=c,m)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=16187;case 16187:if(4096&t.flags){if(0===o)break e;for(c=0;m=n[r+c++],t.head&&m&&t.length<65536&&(t.head.comment+=String.fromCharCode(m)),m&&c<o;);if(512&t.flags&&4&t.wrap&&(t.check=Qh(t.check,n,c,r)),o-=c,r+=c,m)break e}else t.head&&(t.head.comment=null);t.mode=16188;case 16188:if(512&t.flags){for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(4&t.wrap&&a!==(65535&t.check)){e.msg="header crc mismatch",t.mode=ie;break}l=a=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=16191;break;case 16189:for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}e.adler=t.check=ap(a),l=a=0,t.mode=16190;case 16190:if(0===t.havedict)return e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,vp;e.adler=t.check=1,t.mode=16191;case 16191:if(L===fp||L===pp)break e;case 16192:if(t.last)a>>>=7&l,l-=7&l,t.mode=16206;else{for(;l<3;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}switch(t.last=1&a,--l,3&(a>>>=1)){case 0:t.mode=16193;break;case 1:S=k=void 0;var k=t;if(Pp){Ap=new Int32Array(512),Tp=new Int32Array(32);for(var S=0;S<144;)k.lens[S++]=8;for(;S<256;)k.lens[S++]=9;for(;S<280;)k.lens[S++]=7;for(;S<288;)k.lens[S++]=8;for(sp(1,k.lens,0,288,Ap,0,k.work,{bits:9}),S=0;S<32;)k.lens[S++]=5;sp(2,k.lens,0,32,Tp,0,k.work,{bits:5}),Pp=!1}if(k.lencode=Ap,k.lenbits=9,k.distcode=Tp,k.distbits=5,t.mode=16199,L!==pp)break;a>>>=2,l-=2;break e;case 2:t.mode=16196;break;case 3:e.msg="invalid block type",t.mode=ie}a>>>=2,l-=2}break;case 16193:for(a>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if((65535&a)!=(a>>>16^65535)){e.msg="invalid stored block lengths",t.mode=ie;break}if(t.length=65535&a,l=a=0,t.mode=16194,L===pp)break e;case 16194:t.mode=16195;case 16195:if(c=t.length){if(0===(c=s<(c=o<c?o:c)?s:c))break e;F.set(n.subarray(r,r+c),i),o-=c,r+=c,s-=c,i+=c,t.length-=c}else t.mode=16191;break;case 16196:for(;l<14;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(t.nlen=257+(31&a),a>>>=5,l-=5,t.ndist=1+(31&a),a>>>=5,l-=5,t.ncode=4+(15&a),a>>>=4,l-=4,286<t.nlen||30<t.ndist){e.msg="too many length or distance symbols",t.mode=ie;break}t.have=0,t.mode=16197;case 16197:for(;t.have<t.ncode;){for(;l<3;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.lens[H[t.have++]]=7&a,a>>>=3,l-=3}for(;t.have<19;)t.lens[H[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,v={bits:t.lenbits},g=sp(0,t.lens,0,19,t.lencode,0,t.work,v),t.lenbits=v.bits,g){e.msg="invalid code lengths set",t.mode=ie;break}t.have=0,t.mode=16198;case 16198:for(;t.have<t.nlen+t.ndist;){for(;h=(w=t.lencode[a&(1<<t.lenbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(f<16)a>>>=d,l-=d,t.lens[t.have++]=f;else{if(16===f){for(y=d+2;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(a>>>=d,l-=d,0===t.have){e.msg="invalid bit length repeat",t.mode=ie;break}m=t.lens[t.have-1],c=3+(3&a),a>>>=2,l-=2}else if(17===f){for(y=d+3;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}m=0,c=3+(7&(a>>>=d)),a>>>=3,l=l-d-3}else{for(y=d+7;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}m=0,c=11+(127&(a>>>=d)),a>>>=7,l=l-d-7}if(t.have+c>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=ie;break}for(;c--;)t.lens[t.have++]=m}}if(t.mode===ie)break;if(0===t.lens[256]){e.msg="invalid code -- missing end-of-block",t.mode=ie;break}if(t.lenbits=9,v={bits:t.lenbits},g=sp(1,t.lens,0,t.nlen,t.lencode,0,t.work,v),t.lenbits=v.bits,g){e.msg="invalid literal/lengths set",t.mode=ie;break}if(t.distbits=6,t.distcode=t.distdyn,v={bits:t.distbits},g=sp(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,v),t.distbits=v.bits,g){e.msg="invalid distances set",t.mode=ie;break}if(t.mode=16199,L===pp)break e;case 16199:t.mode=16200;case 16200:if(6<=o&&258<=s){e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,A=P=V=x=R=E=I=C=_=re=ne=te=ee=D=N=$=Q=q=X=K=J=Y=M=G=T=Z=O=void 0;var _,C,I,E,R,x,O=e,Z=u,A=O.state,T=O.next_in,V=O.input,G=T+(O.avail_in-5),M=O.next_out,P=O.output,Y=M-(Z-O.avail_out),J=M+(O.avail_out-257),K=A.dmax,X=A.wsize,q=A.whave,Q=A.wnext,$=A.window,N=A.hold,D=A.bits,ee=A.lencode,te=A.distcode,ne=(1<<A.lenbits)-1,re=(1<<A.distbits)-1;t:do{for(D<15&&(N+=V[T++]<<D,D+=8,N+=V[T++]<<D,D+=8),_=ee[N&ne];;){if(N>>>=C=_>>>24,D-=C,0==(C=_>>>16&255))P[M++]=65535&_;else{if(!(16&C)){if(0==(64&C)){_=ee[(65535&_)+(N&(1<<C)-1)];continue}if(32&C){A.mode=16191;break t}O.msg="invalid literal/length code",A.mode=16209;break t}for(I=65535&_,(C&=15)&&(D<C&&(N+=V[T++]<<D,D+=8),I+=N&(1<<C)-1,N>>>=C,D-=C),D<15&&(N+=V[T++]<<D,D+=8,N+=V[T++]<<D,D+=8),_=te[N&re];;){if(N>>>=C=_>>>24,D-=C,!(16&(C=_>>>16&255))){if(0==(64&C)){_=te[(65535&_)+(N&(1<<C)-1)];continue}O.msg="invalid distance code",A.mode=16209;break t}if(E=65535&_,D<(C&=15)&&(N+=V[T++]<<D,(D+=8)<C)&&(N+=V[T++]<<D,D+=8),(E+=N&(1<<C)-1)>K){O.msg="invalid distance too far back",A.mode=16209;break t}if(N>>>=C,D-=C,E>(C=M-Y)){if((C=E-C)>q&&A.sane){O.msg="invalid distance too far back",A.mode=16209;break t}if(x=$,(R=0)===Q){if(R+=X-C,C<I){for(I-=C;P[M++]=$[R++],--C;);R=M-E,x=P}}else if(Q<C){if(R+=X+Q-C,(C-=Q)<I){for(I-=C;P[M++]=$[R++],--C;);if(R=0,Q<I){for(I-=C=Q;P[M++]=$[R++],--C;);R=M-E,x=P}}}else if(R+=Q-C,C<I){for(I-=C;P[M++]=$[R++],--C;);R=M-E,x=P}for(;2<I;)P[M++]=x[R++],P[M++]=x[R++],P[M++]=x[R++],I-=3;I&&(P[M++]=x[R++],1<I)&&(P[M++]=x[R++])}else{for(R=M-E;P[M++]=P[R++],P[M++]=P[R++],P[M++]=P[R++],2<(I-=3););I&&(P[M++]=P[R++],1<I)&&(P[M++]=P[R++])}break}}break}}while(T<G&&M<J);T-=I=D>>3,N&=(1<<(D-=I<<3))-1,O.next_in=T,O.next_out=M,O.avail_in=T<G?G-T+5:5-(T-G),O.avail_out=M<J?J-M+257:257-(M-J),A.hold=N,A.bits=D,i=e.next_out,F=e.output,s=e.avail_out,r=e.next_in,n=e.input,o=e.avail_in,a=t.hold,l=t.bits,16191===t.mode&&(t.back=-1);break}for(t.back=0;h=(w=t.lencode[a&(1<<t.lenbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(h&&0==(240&h)){for(p=d,j=h,W=f;h=(w=t.lencode[W+((a&(1<<p+j)-1)>>p)])>>>16&255,f=65535&w,!(p+(d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}a>>>=p,l-=p,t.back+=p}if(a>>>=d,l-=d,t.back+=d,t.length=f,0===h){t.mode=16205;break}if(32&h){t.back=-1,t.mode=16191;break}if(64&h){e.msg="invalid literal/length code",t.mode=ie;break}t.extra=15&h,t.mode=16201;case 16201:if(t.extra){for(y=t.extra;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.length+=a&(1<<t.extra)-1,a>>>=t.extra,l-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=16202;case 16202:for(;h=(w=t.distcode[a&(1<<t.distbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(0==(240&h)){for(p=d,j=h,W=f;h=(w=t.distcode[W+((a&(1<<p+j)-1)>>p)])>>>16&255,f=65535&w,!(p+(d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}a>>>=p,l-=p,t.back+=p}if(a>>>=d,l-=d,t.back+=d,64&h){e.msg="invalid distance code",t.mode=ie;break}t.offset=f,t.extra=15&h,t.mode=16203;case 16203:if(t.extra){for(y=t.extra;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.offset+=a&(1<<t.extra)-1,a>>>=t.extra,l-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=ie;break}t.mode=16204;case 16204:if(0===s)break e;if(t.offset>(c=u-s)){if((c=t.offset-c)>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=ie;break}z=c>t.wnext?(c-=t.wnext,t.wsize-c):t.wnext-c,c>t.length&&(c=t.length),B=t.window}else B=F,z=i-t.offset,c=t.length;for(s-=c=s<c?s:c,t.length-=c;F[i++]=B[z++],--c;);0===t.length&&(t.mode=16200);break;case 16205:if(0===s)break e;F[i++]=t.length,s--,t.mode=16200;break;case 16206:if(t.wrap){for(;l<32;){if(0===o)break e;o--,a|=n[r++]<<l,l+=8}if(u-=s,e.total_out+=u,t.total+=u,4&t.wrap&&u&&(e.adler=t.check=(t.flags?Qh:Xh)(t.check,F,u,i-u)),u=s,4&t.wrap&&(t.flags?a:ap(a))!==t.check){e.msg="incorrect data check",t.mode=ie;break}l=a=0}t.mode=16207;case 16207:if(t.wrap&&t.flags){for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(4&t.wrap&&a!==(4294967295&t.total)){e.msg="incorrect length check",t.mode=ie;break}l=a=0}t.mode=16208;case 16208:g=gp;break e;case ie:g=wp;break e;case 16210:return bp;default:return yp}return e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,(t.wsize||u!==e.avail_out&&t.mode<ie&&(t.mode<16206||L!==hp))&&xp(e,e.output,e.next_out,u-e.avail_out),u-=e.avail_out,e.total_in+=U-=e.avail_in,e.total_out+=u,t.total+=u,4&t.wrap&&u&&(e.adler=t.check=(t.flags?Qh:Xh)(t.check,F,u,e.next_out-u)),e.data_type=t.bits+(t.last?64:0)+(16191===t.mode?128:0)+(16199===t.mode||16194===t.mode?256:0),g=(0==U&&0===u||L===hp)&&g===mp?kp:g},Fp=function(e){var t;return Mp(e)?yp:((t=e.state).window&&(t.window=null),e.state=null,mp)},Up=function(e,t){return Mp(e)||0==(2&(e=e.state).wrap)?yp:((e.head=t).done=!1,mp)},zp=function(e,t){var n,r=t.length;return Mp(e)||0!==(n=e.state).wrap&&16190!==n.mode?yp:16190===n.mode&&Xh(1,t,r,0)!==n.check?wp:xp(e,t,r,r)?(n.mode=16210,bp):(n.havedict=1,mp)},Bp=Object.prototype.toString,jp=k.Z_NO_FLUSH,Wp=k.Z_FINISH,Hp=k.Z_OK,Zp=k.Z_STREAM_END,Vp=k.Z_NEED_DICT,Gp=k.Z_STREAM_ERROR,Yp=k.Z_DATA_ERROR,Jp=k.Z_MEM_ERROR;function Kp(e){this.options=Nf({chunkSize:65536,windowBits:15,to:""},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 Yf,this.strm.avail_out=0,Dp(this.strm,t.windowBits));if(e!==Hp)throw new Error($h[e]);if(this.header=new Op,Up(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Gf(t.dictionary):"[object ArrayBuffer]"===Bp.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=zp(this.strm,t.dictionary))!==Hp)throw new Error($h[e])}function Xp(e,t){t=new Kp(t);if(t.push(e),t.err)throw t.msg||$h[t.err];return t.result}Kp.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?Wp:jp,"[object ArrayBuffer]"===Bp.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=Lp(i,r))===Vp&&s&&((n=zp(i,s))===Hp?n=Lp(i,r):n===Yp&&(n=Vp));0<i.avail_in&&n===Zp&&0<i.state.wrap&&0!==e[i.next_in];)Np(i),n=Lp(i,r);switch(n){case Gp:case Yp:case Vp:case Jp:return this.onEnd(n),!(this.ended=!0)}var a,l,u,c=i.avail_out;if(!i.next_out||0!==i.avail_out&&n!==Zp||("string"===this.options.to?(a=((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+Zf[e[n]]>t?n:t})(i.output,i.next_out),l=i.next_out-a,u=((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 s=e[o++];if(s<128)r[i++]=s;else{var a=Zf[s];if(4<a)r[i++]=65533,o+=a-1;else{for(s&=2===a?31:3===a?15:7;1<a&&o<n;)s=s<<6|63&e[o++],a--;1<a?r[i++]=65533:s<65536?r[i++]=s:(s-=65536,r[i++]=55296|s>>10&1023,r[i++]=56320|1023&s)}}}var l=r,u=i;if(u<65534&&l.subarray&&Hf)return String.fromCharCode.apply(null,l.length===u?l:l.subarray(0,u));for(var c="",d=0;d<u;d++)c+=String.fromCharCode(l[d]);return c})(i.output,a),i.next_out=l,i.avail_out=o-l,l&&i.output.set(i.output.subarray(a,a+l),0),this.onData(u)):this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out))),n!==Hp||0!==c){if(n===Zp)return n=Fp(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in)break}}return!0},Kp.prototype.onData=function(e){this.chunks.push(e)},Kp.prototype.onEnd=function(e){e===Hp&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Df(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ba={Inflate:Kp,inflate:Xp,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Xp(e,t)},ungzip:Xp,constants:k},qp={Deflate:S.Deflate,deflate:S.deflate,deflateRaw:S.deflateRaw,gzip:S.gzip,Inflate:ba.Inflate,inflate:ba.inflate,inflateRaw:ba.inflateRaw,ungzip:ba.ungzip,constants:k},Qp=(nm.prototype.uploadReplay=function(n){return M(this,void 0,void 0,function(){var t;return P(this,function(e){switch(e.label){case 0:if(this.isUploading)return xr("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)]:(v("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),v("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return Or("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},nm.prototype.doUploadWithRetry=function(r,i){return M(this,void 0,void 0,function(){var t,n;return P(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?(v("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]}})})},nm.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 f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=qp.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,s=r.length,a=i.length;return v("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(s/1024)+"KB -> base64 "+Math.round(a/1024)+"KB"),f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(n){return xr("Uploader","Events compression failed, fallback to plain_json:",n),f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},nm.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")},nm.prototype.doUpload=function(i){return M(this,void 0,void 0,function(){var t,n,r;return P(this,function(e){switch(e.label){case 0:return t=this.prepareUploadPayload(i),r=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},v("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),(t=r.length<65536)||v("Uploader","Data size "+Math.round(r.length/1024)+"KB exceeds keepalive limit, using normal fetch"),[4,fetch(this.config.uploadUrl,{method:"POST",headers:n,body:r,keepalive:t})];case 1:if((n=e.sent()).ok)return[4,n.json()];throw new Error("HTTP "+n.status+": "+n.statusText);case 2:if(0!==(r=e.sent()).code)throw new Error("Server error (code "+r.code+"): "+r.message);return[2]}})})},nm.prototype.sendBeacon=function(e){try{var t=this.prepareUploadPayload(e),n=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(this.config.uploadUrl,n)}catch(e){return Or("Uploader","sendBeacon failed:",e),!1}},nm.prototype.isUploadInProgress=function(){return this.isUploading},nm.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},nm),$p=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),em=(tm.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,v("ClickDetector","Started"))},tm.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,v("ClickDetector","Stopped"))},tm.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||void 0}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},tm.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))},tm.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}))},tm.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},tm.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())},tm.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},tm.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},tm.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},tm.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},tm.prototype.getClickableElement=function(e){return e.matches($p)?e:e.closest($p)},tm.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},tm.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)}},tm.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(" > ")},tm.prototype.isActive=function(){return this.isRunning},tm);function tm(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 nm(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}}function rm(e){var t=null==(t=e)?void 0:t._tdemSampleGate;return!t||!t.isDecided||t.isSampled&&!1!==e._replaySampled}new e({name:"sessionReplay"});var lo=new e({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,init:function(e){},onNewTdem:function(e,t){var t=this.parseConfig(t),n=null!=(n=t.debug)&&n;Ir=n,t.enabled?(this.replayConfig=t,this._tdemRef=e,this.initializeModules(e,t),(n=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,t,n.mode),this.registerReplaySamplingCheck(e,t),this.listenForErrors(e,t),this.listenForPerformance(e),this.listenForLifecycle(e,t),this.listenForUnload(e),this.isInitialized=!0):v("Plugin","Not sampled by local sampler, skipping")):v("Plugin","disabled")},registerReplaySamplingCheck:function(t,e){var n=this,r=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled?void 0!==(e=t._replaySampled)&&(clearInterval(r),!1===e?(v("Plugin","Replay not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):v("Plugin","Both session and replay sampled, replay continues")):(clearInterval(r),v("Plugin","Session not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()))},50);setTimeout(function(){clearInterval(r)},5e3)},parseConfig:function(e){return!0===e?{enabled:!0}:"object"==typeof e?f(f({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new Ar({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new Dr({},null!=(r=e.useCompression)&&r),this.samplerManager=new oh({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new ih({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e=n._tdemRef,t=n.replayConfig;e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(v("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 Qp({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}),this.clickDetector=new em({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)}}),v("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(v("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=th(f({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):v("Plugin","Buffer mode - flush on error only")):Or("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 s=0,a=n.attributes;s<a.length;s++){var l=a[s];if(null!=l&&l.attributes)for(var u=0,c=Object.entries(l.attributes);u<c.length;u++){var d=c[u],h=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(l.attributes[h]='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],s=n[o];"string"==typeof s&&s.length>t&&s.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 a=0,l=e.childNodes;a<l.length;a++){var u=l[a];this.sanitizeNodeTree(u,t)}}},handleSlowClick:function(e,t){v("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){v("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:f({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,h){return void 0===h&&(h=!1),M(this,void 0,void 0,function(){var t,n,r,i,o,s,a,l,u;return P(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&rm(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(v("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(),!h&&n<10?(v("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(xr("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(e){return Or("Flush","Failed to parse eventsJson from worker:",e),[2]}a=this.splitEventsIntoChunks(i),v("Flush","Flushing "+r.eventCount+" events in "+a.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,s=0,a=a,e.label=2;case 2:return s<a.length?(l=a[s],l=JSON.stringify(l),l={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:l},[4,this.uploader.uploadReplay(l)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return s++,[3,2];case 5:return l=this.eventBuffer.isUsingWorker(),u=l?"(worker)":"(sync)",v("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+u),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e){if(0===e.length)return[];var t=JSON.stringify(e);if(t.length<=3145728)return[e];xr("Split","Events size "+Math.round(t.length/1024)+"KB exceeds limit "+Math.round(3072)+"KB, splitting");for(var n=[],r=[],i=2,o=0,s=e;o<s.length;o++){var a=s[o],l=JSON.stringify(a).length+1;0<r.length&&3145728<i+l&&(n.push(r),r=[],i=2),5242880<l?xr("Split","Single event too large ("+Math.round(l/1024)+"KB), type="+a.type+", skipping"):(r.push(a),i+=l)}return 0<r.length&&n.push(r),n},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),v("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)&&(v("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(n){}},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];void 0!==t&&-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,s=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=s.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(r=null==(i=o)?void 0:i.getOriginFrom)?void 0:r.call(i))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:g(),event_type:e,event_category:m.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;"undefined"!=typeof document&&("hidden"===document.visibilityState?(n(p.TAB_HIDDEN),s.flushReplayData(o,t,!0)):"visible"===document.visibilityState&&(n(p.TAB_VISIBLE),(e=Date.now())-s._lastLifecycleSnapshotAt<5e3||(s._lastLifecycleSnapshotAt=e,null!=(e=s.recorderManager)&&e.takeFullSnapshot(),s.flushReplayData(o,t,!0))))}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){function t(){n.flushOnUnload(e)}var n=this;window.addEventListener("beforeunload",t),window.addEventListener("pagehide",t),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",t),window.removeEventListener("pagehide",t)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&rm(e)){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),r=0,i=n;r<i.length;r++){var o=i[r],o={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(o)};this.uploader.sendBeacon(o)}v("SessionReplay"," Data sent via sendBeacon on unload ("+n.length+" chunk(s))")}}}},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,v("Plugin","destroyed")}}),im={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:void 0}},om=new Set([p.JS_ERROR,p.PROMISE_ERROR,p.RESOURCE_ERROR,p.API_ERROR]),sm=new Set([p.FORM_CHANGE,p.FORM_SUBMIT,p.FORM_SUBMIT_RESULT]),cs=(new e({name:"struggleMonitor"}),new e({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?f({},im):e&&"object"==typeof e?f(f(f({},im),e),{click:f(f({},im.click),e.click||{}),performance:f(f({},im.performance),e.performance||{}),form:f(f({},im.form),e.form||{}),navigation:f(f({},im.navigation),e.navigation||{}),custom:f(f({},im.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:im).payloadAllowlist,enabled:!1!==e.enabled}):f(f({},im),{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 em({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||void 0)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_BLUR,e,e.form||void 0)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_CHANGE,e,e.form||void 0)}),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||void 0,n=o.buildFormBaseData(r,i,e,n),n={event_id:g(),event_type:p.FORM_SUBMIT_RESULT,event_category:m.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:f(f({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||void 0,event_properties:f(f({},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)||void 0,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"):void 0,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||void 0,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:nt(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:g(),timestamp:Date.now(),page_url:i};n!==p.FORM_FOCUS?n!==p.FORM_BLUR?n!==p.FORM_CHANGE?(i=f(f({},r),{event_type:p.FORM_SUBMIT,event_category:m.BEHAVIOR,data:f(f({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(n=f(f({},r),{event_type:p.FORM_CHANGE,event_category:m.BEHAVIOR,data:t}),null!=(i=e.reportTDEMEvent)&&i.call(e,n)):(i=f(f({},r),{event_type:p.FORM_BLUR,event_category:m.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(n=f(f({},r),{event_type:p.FORM_FOCUS,event_category:m.BEHAVIOR,data:t}),null!=(i=e.reportTDEMEvent)&&i.call(e,n))},onClickStart:function(e,t,n){var r,i=t.config.click||im.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,f(f({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:void 0;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,s){void 0===o&&(o=Date.now());var e,a=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||a<n||"spa_navigation"!==i&&"page_unload"!==i&&s&&e.pageUrl&&s!==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||im.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 N(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(e){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:void 0,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,s=this,a=Date.now(),n=o.config.click||im.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 a-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==p.STRUGGLE&&(t=e.timestamp||a,n=s.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}),s.linkPendingDeadClickToClickEvent(o,e,r)):(s.isEffectiveActionEvent(o,e)&&(s.resolvePendingDeadClicks(o,s.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(s.getEffectiveActionReason(e))),om.has(e.event_type)?s.tryReportErrorClick(i,o,e):e.event_type===p.PAGE_LOAD||e.event_type===p.true?s.tryReportSlowPage(i,o,e):e.event_type===p.FORM_FOCUS?(s.trackFormFocus(o,e),s.trackFormChangeAndZigzag(i,o,e)):e.event_type===p.FORM_CHANGE?s.trackFormChangeAndZigzag(i,o,e):e.event_type===p.FORM_BLUR?s.tryReportLongFocusTime(i,o,e):e.event_type===p.FORM_SUBMIT?s.trackFormSubmitResult(o,e):e.event_type===p.FORM_SUBMIT_RESULT?(s.trackFormSubmitResult(o,e),s.tryReportFormValidationError(i,o,e)):e.event_type===p.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&s.tryReportBackForward(i,o,e)),s.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):sm.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,s,a;n.event_type!==p.FORM_CHANGE?n.event_type!==p.FORM_FOCUS||(a=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(a=a.slice(-4))[0],s=a[1],!o)||!s||o===s||o!==a[2]||s!==a[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,a=null!=(s=null==(o=t.config.form)?void 0:o.zigzagMinCount)?s:2,i.zigzagHits<a)||(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==(s=null==r?void 0:r.data)?void 0:s.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,s,a;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(s=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(s=n.changedFieldIds.size/s)<(a=null!=(a=null==(a=t.config.form)?void 0:a.incompleteMinFieldRatio)?a:.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]:void 0,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(s.toFixed(4)),threshold_ratio:a}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,s,a=String((null==(a=null==n?void 0:n.data)?void 0:a.field_id)||"");a&&(i=t.focusStartMap.get(a))&&(t.focusStartMap.delete(a),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(s=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:a,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(r=null==n?void 0:n.data)?void 0:r.form_id)||i.formId,fieldId:a,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:s,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||im.click).errorClickWindowMs)?o:3e3,o=N(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,s=t.config.performance||im.performance;s.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=s.slowPageLcpThreshold)?o:4e3,s=null!=(s=s.slowPageInpThreshold)?s:500,o<=r||s<=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,s,a=(null==(a=null==n?void 0:n.data)?void 0:a.event_properties)||{},l=(null==n?void 0:n.data)||{};"fail"===String((null==a?void 0:a.status)||(null===(i=l)?void 0:i.status)||"")&&(i=String((null==a?void 0:a.field_id)||(null===(i=l)?void 0:i.field_id)||""),o=String((null==a?void 0:a.form_id)||(null===(o=l)?void 0:o.form_id)||""),s=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:s,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==a?void 0:a.validation_code)||(null===(r=l)?void 0:r.validation_code),validation_message:null==(e=null==n?void 0:n.data)?void 0:e.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||im.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||im.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=f(f({},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()}}));function am(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:n,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(r))}catch(e){}}function lm(e){return e._tdemSampleGate||null}function um(e,t,n){e=lm(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random()<t,e.decide(n)):console.warn("[TDEM] Sample gate not found")}function cm(e,t){var n=lm(e);!(n&&n.isDecided&&n.isSampled)||t<=0?e._replaySampled=!1:100<=t?e._replaySampled=!0:(n=100*Math.random(),e._replaySampled=n<t)}function dm(e,t,n){var r=lm(e);r&&((t=t?(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(e){return null}})(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate,"replaySampleRate:",t.replaySampleRate),n._cachedSampleRate=t.sampleRate,n._cachedReplaySampleRate=t.replaySampleRate,um(e,t.sampleRate,0<t.sampleRate),cm(e,t.replaySampleRate)):(console.warn("[TDEM] No cached config, default to not report"),r.decide(!1),e._replaySampled=!1))}return xa=new e({name:"tdemConfig",_cachedSampleRate:null,_cachedReplaySampleRate:null,onNewTdem:function(e){var t=this;!function(u,c){var d;M(this,void 0,void 0,function(){var n,r,i,o,s,a,l;return P(this,function(e){switch(e.label){case 0:if(!(n=u.config.id))return dm(u,n,c),[2];if(r=u._prefetchedConfigData)return delete u._prefetchedConfigData,o=r.tdem_sample_rate,s=null!=(d=r.replay_sample_rate)?d:1,a=r.enabled,am(n,o,s),c._cachedSampleRate=o,c._cachedReplaySampleRate=s,um(u,o,a),cm(u,s),[2];if(t=(u.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return dm(u,n,c),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if((i=e.sent()).ok)return[4,i.json()];throw new Error("HTTP "+i.status);case 3:if(0===(i=e.sent()).code&&i.data)return o=i.data.tdem_sample_rate,s=null!=(d=i.data.replay_sample_rate)?d:1,a=i.data.enabled,am(n,o,s),c._cachedSampleRate=o,c._cachedReplaySampleRate=s,um(u,o,a),cm(u,s),[3,5];throw new Error("API error: code="+i.code);case 4:return l=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",l),dm(u,n,c),[3,5];case 5:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=lm(e);n&&n.isDecided&&null!=(t=this._cachedSampleRate)&&((n=n.reDecide(t))?cm(e,null!=(t=this._cachedReplaySampleRate)?t:1):e._replaySampled=!1,console.info("[TDEM] Session refreshed, session="+n+", replay="+e._replaySampled))}}),yr.use(Jt),yr.use(Bt),yr.use(ot),yr.use(sr),yr.use(rr),yr.use(et),yr.use(t),yr.use(lr),yr.use(kr),yr.use($t),yr.use(nn),yr.use(lo),yr.use(cs),yr.use(Wt),yr.use(xa),yr})();
|
|
10
|
+
var TDEM=(()=>{var R,O;function x(e){this.name="__st"+(1e9*Math.random()>>>0)+R+"__",null!=e&&e.forEach(this.add,this),R+=1}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}}}),window.WeakSet||(R=Date.now()%1e9,x.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},x.prototype.delete=function(e){return!!e[this.name]&&!(e[this.name]=void 0)},x.prototype.has=function(e){return!!e[this.name]},O=x,Object.defineProperty(window,"WeakSet",{value:function(e){return new O(e)}})),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if(null!=(r=arguments[n]))for(var r=Object(r),i=Object.keys(Object(r)),o=0,s=i.length;o<s;o++){var a=i[o],l=Object.getOwnPropertyDescriptor(r,a);null!=l&&l.enumerable&&(t[a]=r[a])}return t}});var T=function(e,t){return(T=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)},f=function(){return(f=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 I(e,s,a,l){return new(a=a||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(e){t(e)}}function i(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((l=l.apply(e,s||[])).next())})}function M(r,i){var o,s,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[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(;l;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!((a=0<(a=l.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){l=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))l.label=t[1];else if(6===t[0]&&l.label<a[1])l.label=a[1],a=t;else{if(!(a&&l.label<a[2])){a[2]&&l.ops.pop(),l.trys.pop();continue}l.label=a[2],l.ops.push(t)}}t=i.call(r,l)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function A(){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],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function P(e,t){return void 0===t&&(t="https://dem.rumt-zh.com"),t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com"),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}function L(e){try{return localStorage.getItem(e)}catch(e){return null}}function D(e,t){try{localStorage.setItem(e,t)}catch(e){}}function F(e,t){try{return e?JSON.parse(e):t}catch(e){return t}}var U,z=/_?t(\d)?(imestamp)?=\d+&?/g,B=["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"],j=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],W=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],H=["static","fetch"],q="unknown",V=(G.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},G.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},G.prototype.one=function(e,t){this.on(e,t,1)},G.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(e){}}return null}},G.prototype.clear=function(){this.eventsList={}},G);function G(){var s=this;this.emit=function(e,t){if(s){var n;if(null!=(r=s.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(s,[t]);if(1===n.type&&s.remove(e,n.callback),!1===o)break}catch(e){throw e}}return s}},this.eventsList={}}function Z(e,t){return"number"==typeof e||"string"==typeof e?e:t?U.string:U.number}function J(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e}function K(e,t){return void 0===t&&(t=2048),String(e).replace(z,"").slice(0,t)}function $(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)}function X(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)?q:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:q,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(le=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==le.indexOf(e.toLowerCase())});return s.length?{code:""+(o="未知"!==(o=e[s[0]])&&""!==o?o:q),isErr:0!==o&&"0"!==o&&o!==q}:{code:q,isErr:!1}}catch(e){return{code:q,isErr:!1}}}function ee(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 de(r).slice(0,10240)}catch(e){return""}}function te(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,ue(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,ue(),2)||"undefined"}catch(e){return"error happen when tdem stringify: \n "+e.message+" \n "+e.stack}}function ne(e,t){var n,r={fetch:[],static:[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=pe(e);r[e.type].push(t)}):(n=pe(e),r[e.type].push(n)),i.append("payload",ce(f({duration:r},t))),i}function re(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||me.test(t)||B.some(function(e){return-1<t.indexOf(e)})}(e=U=U||{})[e.number=-1]="number",e.string="";var oe,se=["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"],ae=/\.(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,le=["ret","retcode","code","errcode"],ue=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"==typeof t&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},ce=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,ue())||"undefined"}catch(e){return"error happen when tdem stringify: \n "+e.message+" \n "+e.stack}},de=function(n,r){void 0===r&&(r=3);var i,o,s,a="";return Array.isArray(n)?(a+="[",i=n.length,n.forEach(function(e,t){a=(a+="object"==typeof e&&1<r?de(e,r-1):fe(e))+(t===i-1?"":",")}),a+="]"):n instanceof Object||"object"==typeof n?(a="{",o=Object.keys(n),s=o.length,o.forEach(function(e,t){"object"==typeof n[e]&&1<r?a+='"'+e+'":'+de(n[e],r-1):a+=he(e,n[e]),a+=t===s-1||t<s-1&&void 0===n[o[t+1]]?"":","}),a+="}"):a+=n,a},he=function(e,t){var n=typeof t,r="";return"string"==n||"object"==n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"==typeof t?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!=n||(r+='"'+e+'": '+t),r},fe=function(e){var t=typeof e;return""+("undefined"==t||"symbol"==t||"function"==t?"null":"string"==t||"object"==t?'"'+e+'"':e)},pe=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},me=/data:(image|text|application|font)\/.*;base64/;(e=oe=oe||{}).LOG="log",e.SPEED="speed",e.PERFORMANCE="performance",e.OFFLINE="offline",e.WHITE_LIST="whiteList",e.VITALS="vitals",e.PV="pv",e.CUSTOM_PV="customPV",e.EVENT="event",e.CUSTOM="custom",e.SDK_ERROR="sdkError",e.SET_DATA="setData",e.LOAD_PACKAGE="loadPackage",e.MEMORY="memory";var ve,p,m,ge={maxAttempts:3,delays:[0,1e3,3e3]};function v(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function ye(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,s,a,l,u,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],s=d[2],a=d[3],l=d[4],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,function:o||"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(s=d[1],a=d[2],l=d[3],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,function:"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++}))}return t}function we(u,c){return function(i,o){var a,s,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(a=function(e,t){var n,r,t=f(f({},u.bean),{from:t}),i=f({},u.bean);return(()=>{try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(e){}})()?ne(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(f({duration:r},e)),i)},s=function(e,t,n,r){switch(t){case oe.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)}))),s={};return o.forEach(function(t){s[t]=i.map(function(e){return e[t]||""})}),s.count=i.length,ce(s);case oe.SPEED:return a(e,n);case oe.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(f(f({},i),{url:t,log:1===n.length?n[0]:n,data:s(n,c,e,i.data)}))):(t=i.url+r+"from="+e,o(f(f({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:A(i.beanFilter||[],["from"]),data:s(n,c,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(n=i.url)&&n.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(f(f({},i),{url:n,log:e,beanFilter:A(i.beanFilter||[],["from"]),data:s(e,c,t,i.data)}))):(n=""+i.url,o(f(f({},i),{url:n,log:e,data:s(e,c,t,i.data)}))))):o(i)}}function be(l,u){return function(e,t){var n,r,i,o=Array.isArray(e),s=o?e:[e],a=(l.lifeCycle.emit("beforeRequest",e),l.config.beforeRequest);(s="function"==typeof a?s.map(function(t){try{var e=a({logs:t,logType:u});return(null==e?void 0:e.logType)===u&&null!=e&&e.logs?e.logs:!1!==e&&t}catch(e){return t}}).filter(function(e){return!1!==e}):s).length&&(n=s,e=W,!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]=""}),f(f({},t),e)}))),s=n,t(o?s:s[0]))}}function ke(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"==typeof r&&"url"in r&&(e=r)}catch(e){console.error(e)}t(e)}}function _e(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)}}(e=ve=ve||{}).production="production",e.development="development",e.gray="gray",e.pre="pre",e.daily="daily",e.local="local",e.test="test",e.others="others",(e=p=p||{}).JS_ERROR="js_error",e.PROMISE_ERROR="promise_error",e.RESOURCE_ERROR="resource_error",e.API_ERROR="api_error",e.PAGE_LOAD="page_load",e.RESOURCE_LOAD="resource_load",e.API_CALL="api_call",e.true="web_vitals",e.CLICK="click",e.PAGE_VIEW="page_view",e.TAB_HIDDEN="tab_hidden",e.TAB_VISIBLE="tab_visible",e.WINDOW_BLUR="window_blur",e.WINDOW_FOCUS="window_focus",e.FORM_FOCUS="form_focus",e.FORM_BLUR="form_blur",e.FORM_CHANGE="form_change",e.FORM_SUBMIT="form_submit",e.FORM_SUBMIT_RESULT="form_submit_result",e.STRUGGLE="struggle",e.CUSTOM="custom",e.LOG="log",(e=m=m||{}).ERROR="error",e.PERFORMANCE="performance",e.BEHAVIOR="behavior",e.NETWORK="network",e.LOG="log",e.CUSTOM="custom";var Se=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})})},Ee={},Ce={},Re=function(e){return Ee[e]||(Ee[e]=setTimeout(function(){Ce[e]={},Ee[e]=null},6e4)),Ee[e]},Oe={generateTraceId:Te(16),generateSpanId:Te(8)},xe=Array(32);function Te(t){return function(){for(var e=0;e<2*t;e++)xe[e]=Math.floor(16*Math.random())+48,58<=xe[e]&&(xe[e]+=39);return String.fromCharCode.apply(null,xe.slice(0,2*t))}}function Ie(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}function Fe(){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)})}function Ue(e){for(var t,n,r,i="",o=0,s=(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+=je.charAt((t=t<<16|n<<8|r)>>18&63)+je.charAt(t>>12&63)+je.charAt(t>>6&63)+je.charAt(63&t)}return s?i.slice(0,s-3)+"===".substring(s):i}function ze(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!We.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=je.indexOf(e.charAt(o++))<<18|je.indexOf(e.charAt(o++))<<12|(n=je.indexOf(e.charAt(o++)))<<6|(r=je.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}function Be(e){var t,n="";return n="object"==typeof e&&(t=(e=((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(qe)))[0])?qe[t](e[1]):n}var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",We=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,He=(Ve.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}}},Ve.prototype.createTraceparent=function(){var e=Oe.generateSpanId();return"00-"+Oe.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},Ve.prototype.createB3=function(){var e=Oe.generateSpanId();return Oe.generateTraceId()+"-"+e+"-"+this.traceFlag},Ve.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Ue,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Fe(),i=Fe();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.8"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},Ve.prototype.createSentryTrace=function(){var e=Ie().substring(16);return Ie()+"-"+e+"-"+this.traceFlag},Ve.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},Ve.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},Ve.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},Ve),qe={sw8:function(e){var t="function"==typeof atob?atob:ze,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]}};function Ve(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=null==r?1:Number(!!r)}function Ge(l){return function(e){e&&0!==e.length&&l.sendPipeline([function(t,e){var n,r,i,o,s={protocol_version:2,project_key:String(l.config.id||""),sdk:{name:l.sdkName,version:l.sdkVersion},app:{version:String(l.config.version||"1.0.0")},context:(n=l,r=String((null==(s=null==(s=null==(r=n.sessionManager)?void 0:r.getSession)?void 0:s.call(r))?void 0:s.id)||n.bean.sessionId||""),s=String(n.config.userId||n.config.uin||""),r={session_id:r,platform:(r=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","android","ios","electron","unknown"].includes(r)?r:["wx","my","qq","tt"].includes(r)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},s&&(r.user_id=s),s=n.bean.runtime?String(n.bean.runtime):"",a=n.bean.processType?String(n.bean.processType):"",i=void 0!==n.bean.windowId?String(n.bean.windowId):"",o=void 0!==n.bean.webContentsId?String(n.bean.webContentsId):"",n=n.bean.appVersion?String(n.bean.appVersion):"",s&&(r.runtime=s),a&&(r.process_type=a),i&&(r.window_id=i),o&&(r.web_contents_id=o),n&&(r.app_version=n),"undefined"!=typeof navigator&&(r.user_agent=navigator.userAgent,r.language=navigator.language),"undefined"!=typeof screen&&(r.screen_resolution=screen.width+"x"+screen.height),r),events:t},a=String(l.config.url||"").replace(/\/+$/,"");a&&e({url:a+"/api/v1/collect/events",data:JSON.stringify(s),method:"POST",contentType:"application/json",addBean:!1,type:oe.EVENT,log:t,success:function(){l.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){l.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],oe.EVENT)(e)}}function Ze(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||Xe)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=Xe),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")}function Je(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(){})})}function Ke(){return void 0!==window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now}function $e(e){var t;return-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf(e))}var Xe=function(){},Ye={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},Qe={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},et=(u.use=function(e){-1===u.installedPlugins.indexOf(e)&&e.tdemPlugin&&u.installedPlugins.push(e)},u.unuse=function(e){e=u.installedPlugins.indexOf(e);-1!==e&&u.installedPlugins.splice(e,1)},u.prototype.getInternalTransport=function(){return this.internalTransport},u.prototype.setInternalTransport=function(e){this.internalTransport=e},u.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},u.prototype.transportRequest=function(t,n){return I(this,void 0,void 0,function(){return M(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}]}})})},u.prototype.transportHandoff=function(t,n){return I(this,void 0,void 0,function(){return M(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,f(f({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},u.prototype.init=function(e){this.setConfig(e),this.config=P(this.config,e.hostUrl);for(var t=0;t<u.installedPlugins.length;t++)try{u.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited")},u.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=u.instances.indexOf(this);-1!==r&&u.instances.splice(r,1);for(var i=u.installedPlugins.length-1;0<=i;i--)try{u.installedPlugins[i].unpatch(this)}catch(e){this.sendSDKError(e)}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&&Je(o,this),o=Object.getPrototypeOf(o););0===u.instances.length&&(r=Object.getPrototypeOf(this).constructor,Je(r),Je(u))}},u.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,s=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(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.8",this.bean.aid=i||"",this.bean.env=(()=>{switch(s){case ve.production:case ve.development:case ve.gray:case ve.pre:case ve.daily:case ve.local:case ve.test:case ve.others:return 1;default:return}})()?s:ve.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},u.prototype.extendBean=function(e,t){this.bean[e]=t},u.prototype.send=function(e,i,o){var t=this;return Ze([ke(this),we(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)})},_e(this)])(e)},u.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(te(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.8)",addBean:!1,method:"get",type:oe.SDK_ERROR,log:e})}],oe.SDK_ERROR)(e)},u.prototype.sendPipeline=function(e,t){var n,o=this;return Ze(A([function(e,t){if(e&&e.type===oe.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}},be(n=this,t)],e,[we(this,t),ke(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,A([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,A([r],t))})},_e(this)]))},u.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:v(),event_type:p.CUSTOM,event_category:m.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{event_name:e,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),payload:this.sanitizeEventPayload(t.payload),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},u.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return f(f({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:f(f({},e.data),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))},u.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")},u.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")},u.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?void 0!==(n=this.getTimeEventDuration(e))?(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")},u.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:v(),event_type:p.LOG,event_category:m.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(f({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},u.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:v(),event_type:p.JS_ERROR,event_category:m.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:ye(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(f(f({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},u.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:f(f({},this.config.defaultTags||{}),e||{})})},u.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=f({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},u.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},u.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},u.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},u.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:Ye[r],n="number"==typeof e.weight?e.weight:Qe[r],r={event_id:v(),event_type:p.STRUGGLE,event_category:m.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:{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")},u.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:v(),event_type:p.FORM_SUBMIT_RESULT,event_category:m.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):void 0,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")},u.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:v(),event_type:p.PAGE_VIEW,event_category:m.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(f(f(f(f(f(f(f({},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)},u.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:f({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")},u.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},u.prototype.getCurrentEventPageUrl=function(e){var t;if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(e){return this.config.pageUrl||"undefined"!=typeof window&&(null==(t=window.location)?void 0:t.href)||""}},u.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(t=null==(e=this.sessionManager)?void 0:e.getSession)?void 0:t.call(e))?void 0:t.replayId)||"")},u.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},u.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||void 0},u.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(f(f({},this.config.defaultTags||{}),e||{}))},u.prototype.sanitizeStringMap=function(n,r){var i;if(void 0===r&&(r=1024),n&&"object"==typeof n)return i={},Object.keys(n).forEach(function(e){var t=n[e];e&&null!=t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length?i:void 0},u.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},u.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},u.prototype.sanitizeEventPayload=function(n,e){var r;if(n&&"object"==typeof n)return e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&null!=(t=n[e])&&("string"==typeof t?r[e]=t.slice(0,256):"number"==typeof t||"boolean"==typeof t?r[e]=t:Array.isArray(t)?r[e]=t.slice(0,10).map(function(e){return"string"==typeof e?e.slice(0,256):"number"==typeof e||"boolean"==typeof e?e:String(e).slice(0,256)}):r[e]=String(t).slice(0,256))}),Object.keys(r).length?r:void 0},u.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(A(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},u.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:void 0},u.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},u.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},u.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},u.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(u.prototype,"__version__",{get:function(){return"1.0.8"},enumerable:!1,configurable:!0}),u.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:v(),event_type:p.CUSTOM,event_category:m.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)},u.prototype.getTimeEventDuration=function(e){if(void 0!==e&&this.timeMap[e])return Date.now()-this.timeMap[e]},u.version="1.0.8",u.instances=[],u.environment=ve,u.installedPlugins=[],u),e=(nt.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},nt.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},nt.prototype.countInstance=function(){return this.instances.length},nt.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},nt.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},nt.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!=typeof e)||!!e},nt.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},nt.prototype.exist=function(e){return-1===this.instances.indexOf(e)},nt.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))},nt.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},nt),tt=new e({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Fe(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(e){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}});function nt(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 u(e,t){var r,i,o,n,s,a,l;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=u.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,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 V,this.bean={},this.internalRetrySchedule=ge,this._customPageUrl=null,this.tdemEventPipeline=Ze([(s=n=!1,a=[],this._tdemSampleGate={decide:function(e){n=!0,(s=e)&&a.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),a=[]},reDecide:function(e){return s=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return s}},function(e,t){n?s&&t(e):a.length<1e3&&a.push({event:e,resolve:t})}),(i=Math.max(Number(100)||1,1),o=[],function(e,t){function n(){for(;0<o.length;)t(o.splice(0,i))}e=Array.isArray(e)?e:[e];o.push.apply(o,e);clearTimeout(r),i<=o.length?n():r=setTimeout(function(){0<o.length&&n()},5e3)}),function(t,n){try{var e,r=JSON.parse(JSON.stringify(t)),i=(l.lifeCycle.emit("beforeReport",r),l.config.beforeReport);"function"==typeof i?0<(e=t.filter(function(e){return!1!==i(e)})).length&&n(e):n(t)}catch(e){n(t)}},Ge(l=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||ge,u.instances.push(this)}function rt(e){return e=e.sessionManager,[(null==(t=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:t.replayId)||"",null==t||t.id,!t||t.sampled,null==t||t.sampled][0];var t}function t(e){return-1!==st.indexOf(e)}var it=new e({name:"assets"}),ot=it=new e({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;Ke()&&(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:v(),event_type:p.RESOURCE_LOAD,event_category:m.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:void 0},replay_id:rt(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 s=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(s.initiatorType)||re(s.name,n.hostUrl)||this.publish(this.generateLog(s,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===it.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===it.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){function e(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=s.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),re(t,s.hostUrl))||(n=o.getFromParam(i),r={url:K(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:$(t),urlQuery:J(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))}var o=this,s=i.config;window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===it.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:K(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:$(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:J(e.name,!0),domainLookup:Z(e.domainLookupEnd-e.domainLookupStart),connectTime:Z(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Ke()&&(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(){}}}),st=window.navigator.userAgent.toLowerCase(),l={};function at(){return{host:new URL(location.href).host,pathname:location.pathname}}function lt(r,e,i){return null!=e&&e.length&&"object"==typeof 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},""):""}function ut(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""}function ct(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===H.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=ae.test(i)||se.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e}function dt(e,t){return e?zt.AJAX_ERROR:t?zt.RET_ERROR:zt.API_RESPONSE}function ht(e,t,n){if(!e)return!1;if(null!=(t=null==t?void 0:t.api)&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(e){return console.warn("[TDEM] isSlowApi function happen error:",e,", this data will not be reported."),!1}return(n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold)&&"number"==typeof n?n<e:1e3<e}function ft(e,t){if(null!=(e=e.api)&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:$(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:Z(e.domainLookupEnd-e.domainLookupStart),connectTime:Z(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:$(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:U.number,connectTime:U.number}}function pt(e){return(e=(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+=Yt(e)}else if(3===n||4===n)return e.nodeValue;return t})(e))?e.replace(/^\s+|\s+$/g,""):""}l.macos=function(){return t("mac")},l.ios=function(){return l.iphone()||l.ipod()||l.ipad()},l.iphone=function(){return!l.windows()&&t("iphone")},l.ipod=function(){return t("ipod")},l.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return t("ipad")||e},l.android=function(){return!l.windows()&&t("android")},l.androidPhone=function(){return l.android()&&t("mobile")},l.androidTablet=function(){return l.android()&&!t("mobile")},l.blackberry=function(){return t("blackberry")||t("bb10")},l.blackberryPhone=function(){return l.blackberry()&&!t("tablet")},l.blackberryTablet=function(){return l.blackberry()&&t("tablet")},l.windows=function(){return t("windows")},l.windowsPhone=function(){return l.windows()&&t("phone")},l.windowsTablet=function(){return l.windows()&&t("touch")&&!l.windowsPhone()},l.fxos=function(){return(t("(mobile")||t("(tablet"))&&t(" rv:")},l.fxosPhone=function(){return l.fxos()&&t("mobile")},l.fxosTablet=function(){return l.fxos()&&t("tablet")},l.meego=function(){return t("meego")},l.cordova=function(){return window.cordova&&"file:"===location.protocol},l.nodeWebkit=function(){return"object"==typeof window.process},l.mobile=function(){return l.androidPhone()||l.iphone()||l.ipod()||l.windowsPhone()||l.blackberryPhone()||l.fxosPhone()||l.meego()},l.tablet=function(){return l.ipad()||l.androidTablet()||l.blackberryTablet()||l.windowsTablet()||l.fxosTablet()},l.desktop=function(){return!l.tablet()&&!l.mobile()};var mt,vt,gt,yt,wt,bt,kt,_t,St,Et,Ct,Rt,Ot,xt,Tt,It,Mt,At,Pt=!(l.isIE=function(){return"ActiveXObject"in window}),Lt=[],Dt=/^\/[^/]/,Nt=!1,Ft=[],Ut={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},zt={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},Bt=(new e({name:"api"}),new e({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 He(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))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(b,k){var _=this,e=b.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return _.getFromParam(k)},then:function(h,f,p,m,v,g,y){var e,w;re(p,b.hostUrl)||(e=h.headers?h.headers.get("content-type"):"","fetch"===(w=ct(b,e||"",p))?h.clone().text().then(function(r){var e,i=h.status<=0||400<=h.status,t=(null==(t=b.api)?void 0:t.reqHeaders)||[],o=lt(null==m?void 0:m.headers,t,"req"),t=(null==(t=b.api)?void 0:t.resHeaders)||[],s=lt(h.headers,t,"res"),a=Be(null==m?void 0:m.headers),t=X(r,b.api,{url:p,ctx:h,payload:null==m?void 0:m.body}),l=t.code,u=t.isErr,t=null==(t=b.api)?void 0:t.apiDetail,c=t?ee(null==m?void 0:m.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:p}):"",d=t?ee(r,null==(e=b.api)?void 0:e.resBodyHandler,{url:p,ctx:h}):"";setTimeout(function(){var e=ft(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==m?void 0:m.method)||"get"}),t=[i?"FETCH_ERROR: "+r:"","fetch req url: "+p,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+v,o,s,"req method: "+(e.method||"GET"),"res retcode: "+l,ut(c,"req param"),ut(d,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==m?void 0:m.body,e.ret=l,e.isErr=+u,e.from=g||_.getFromParam(k),{msg:t,code:l,trace:a,errorMsg:"",from:g||_.getFromParam(k),originFrom:y,level:zt.API_RESPONSE}),n=ht(null==e?void 0:e.duration,b,e);t.level=n?zt.SLOW_NET_REQUEST:dt(i,u),(n||t.level!==zt.API_RESPONSE||k.isWhiteList||null!=(n=null==(n=k.config)?void 0:n.api)&&n.reportRequest)&&_.publishNormalLog(t,k),_.publishSpeed(e,k)},0)}).catch(function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=ft(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==m?void 0:m.method)||"get"});e.type="static",e.urlQuery=J(p,!0),e.from=g||_.getFromParam(k),_.publishSpeed(e,k)},0))},catch:function(t,n,r,i,o,s,a){var l,e,u,c,d;throw re(r,b.hostUrl)||(l=ct(b,"",r),e=(null==(e=b.api)?void 0:e.reqHeaders)||[],u=lt(null==i?void 0:i.headers,e,"req"),c=Be(null==i?void 0:i.headers),d=null!=(e=b.api)&&e.apiDetail?ee(null==i?void 0:i.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=ft(b,{url:r,duration:n,type:l,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=s||_.getFromParam(k),_.publishSpeed(e,k),"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"+u);_.publishNormalLog({msg:e,level:zt.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:s||_.getFromParam(k),originFrom:a},k)},0)),t}},h=(this.hackFetchOptions=e,this.hackFetchOptions),f=null==(e=b.api)?void 0:e.ignoreHackReg;if(void 0===f&&(f=/\.flv(\?|$)/i),Ft.find(function(e){return e.name===h.name}))throw new Error("name '"+h.name+"' is already in hackFetch option list");Ft.push(h),!Nt&&window.fetch&&(Nt=!0,yt=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(s=null==f?void 0:f.test)&&s.call(f,o))return yt(o,i);Dt.test(o)&&(o=""+location.origin+o);var t,n,r,s=(h||{}).traceRequestHeader;s&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=at()).host,n=(s=s.generate(o,t,{host:n,pathname:r.pathname})||{}).name,r=s.value)&&n&&(i.headers=Object.assign(t,((s={})[n]=r,s)));for(var a=new Map,l=window.location.href,u=0;u<Ft.length;u++){var c=Ft[u];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&a.set(c.name,c.getCurrentFrom())}catch(e){}}var d=Date.now();return yt(e,i).then(function(e){for(var t=e.clone(),n=0;n<Ft.length;n++){var r=Ft[n];try{"function"==typeof r.then&&r.then(t,Date.now()-d,o,i,d,a.get(r.name),l)}catch(e){}}return e}).catch(function(e){for(var t=0;t<Ft.length;t++){var n=Ft[t];try{"function"==typeof n.catch&&n.catch(e,Date.now()-d,o,i,d,a.get(n.name),l)}catch(e){}}throw e})})},overrideXhr:function(b,k){var i,_=this,e={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return _.getFromParam(k)},send:function(h,f,p,m){var e,t,v=Date.now(),g=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=at()).host,e=(t=_.traceRequestHeader.generate(h.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&h.setRequestHeader(e,t),h.addEventListener("loadend",function(){var u,n,e,c,d=h.tdemUrl||"";re(d,b.hostUrl)||"abort"===h.failType||(u="",(h.failType||!h.status||400<=h.status)&&(u=h.failType||"failed"),n=Date.now()-v,e=h.getResponseHeader("content-type")||"",c=ct(b,e,d),setTimeout(function(){var r=ft(b,{url:d,duration:n,type:c,status:h.status,method:h.tdemMethod||"get"});if(r.from=p||_.getFromParam(k),"fetch"===c){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],i=lt(h.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=h.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),o=lt(t,e,"res"),s=Be(h.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,a=e?ee(f,null==(t=b.api)?void 0:t.reqParamHandler,{url:d}):"",l=e?ee(h.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:d}):"";try{((e,t,n,r)=>{var i,o,s;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?q:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return s=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===s?q:s,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:q,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(le=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==le.indexOf(e.toLowerCase())});if(a.length)return"未知"!==(s=e[a[0]])&&""!==s||(s=q),null!=r&&r({code:""+s,isErr:0!==s&&"0"!==s&&s!==q});null!=r&&r({code:q,isErr:!1})}catch(e){null!=r&&r({code:q,isErr:!1})}})(h.response,b.api,{url:d,ctx:h,payload:f},function(e){var t=e.code,e=e.isErr,n=[u?"AJAX_ERROR: request "+u:"","fetch req url: "+d,"res status: "+(r.status||0),"res duration: "+r.duration+"ms","res startTime: "+v,i,o,"req method: "+(r.method||"GET"),"res retcode: "+t,ut(a,"req param"),ut(l,"res data")].filter(function(e){return e}).join("\n\n");r.ret=t,r.isErr=+e,r.payload=f,ht(null==r?void 0:r.duration,b,r)?_.publishNormalLog({msg:n,level:zt.SLOW_NET_REQUEST,code:t,trace:s,errorMsg:"",from:p||_.getFromParam(k),originFrom:m},k):_.publishNormalLog({msg:n,level:dt(!!u,e),code:t,trace:s,errorMsg:"",from:p||_.getFromParam(k),originFrom:m},k),_.publishSpeed(r,k)})}catch(e){r.ret=q,_.publishSpeed(r,k)}}else r.type="static",r.urlQuery=J(d,!0),_.publishSpeed(r,k);h.removeEventListener("abort",g),h.removeEventListener("error",y),h.removeEventListener("timeout",w)},0))}),function(){h.failType="abort"}),y=function(){h.failType="error"},w=function(){h.failType="timeout"};h.addEventListener("abort",g),h.addEventListener("error",y),h.addEventListener("timeout",w)}};this.hackXHROptions=e,i=this.hackXHROptions,Lt.find(function(e){return e.name===i.name})||(Lt.push(i),!Pt&&window.XMLHttpRequest&&(mt=window.XMLHttpRequest.prototype.send,vt=window.XMLHttpRequest.prototype.open,gt=window.XMLHttpRequest.prototype.setRequestHeader,Pt=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Dt.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(t=null==(e=i.ignoreHackReg)?void 0:e.test)||!t.call(e,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)l.isIE()||(this.timeout=5e3);else for(var n=0;n<Lt.length;n++){var r=Lt[n];try{"function"==typeof r.open&&r.open(this)}catch(e){}}return vt.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(t=null==(n=i.ignoreHackReg)?void 0:n.test)&&t.call(n,this.tdemUrl)?gt.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],gt.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<Lt.length;n++){var r=Lt[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():void 0,window.location.href)}catch(e){}}return mt.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,s,a,l;[zt.API_RESPONSE,zt.AJAX_ERROR,zt.RET_ERROR,zt.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",i=(i=null==(i=e.msg)?void 0:i.match(/res status:\s*(\d+)/))?parseInt(i[1],10):0,o=(o=null==(o=e.msg)?void 0:o.match(/res duration:\s*([\d.]+)ms/))?parseFloat(o[1]):0,s=(s=null==(s=e.msg)?void 0:s.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?s[1].trim().slice(0,1e3):void 0,a={},e.trace&&(a.trace_id=e.trace),[zt.AJAX_ERROR,zt.RET_ERROR].includes(e.level)||400<=i||0===i?(l={event_id:v(),event_type:p.API_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:e.from||(null==(l=t.getOriginFrom)?void 0:l.call(t))||window.location.href,data:{url:n,measurements:{duration:o},response_body:s,replay_id:rt(t),tags:0<Object.keys(a).length?a:void 0,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,l)):(l={event_id:v(),event_type:p.API_CALL,event_category:m.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},business_code:String(e.code||""),replay_id:rt(t),tags:0<Object.keys(a).length?a:void 0,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,l)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=Lt.findIndex(function(e){return e.name===n.name})))&&Lt.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Ft.findIndex(function(e){return e.name===t.name})))&&Ft.splice(e,1),this.option.override=!1}})),jt={},Wt=new e({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(u){var c=this,d=u.config,e="object"==typeof d.bridge?d.bridge:void 0,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var l=t[e];jt[e]=l,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],s=Date.now(),a=c.getFromParam(u);l(r,i,n,function(e){var t=X(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-s,type:"bridge",ret:n,isErr:+t,from:a};c.publishSpeed(n,u),o(e)})}})},unHackBridge:function(e){var e="object"==typeof e.config.bridge?e.config.bridge:void 0,t=null==e?void 0:e.target;jt=(t&&Object.keys(jt).forEach(function(e){jt[e]&&(t[e]=jt[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),n=((n=wt=wt||{})[n.unknown=100]="unknown",n[n.wifi=1]="wifi",n[n.net2g=2]="net2g",n[n.net3g=3]="net3g",n[n.net4g=4]="net4g",n[n.net5g=5]="net5g",n[n.net6g=6]="net6g",(n=bt=bt||{})[n.android=1]="android",n[n.ios=2]="ios",n[n.windows=3]="windows",n[n.macos=4]="macos",n[n.linux=5]="linux",n[n.other=100]="other",(n=kt=kt||{})[n.unknown=100]="unknown",n[n.normal=0]="normal",n[n.weak=1]="weak",n[n.disconnected=2]="disconnected",new e({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",wt.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?bt[e]:bt.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:Ht)(function(e){wt[e]||(e=wt.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){void 0===kt[e]&&(e=kt.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),Ht=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||q,0<=(n=String(n).toLowerCase()).indexOf("4g")?wt.net4g:0<=n.indexOf("wifi")?wt.wifi:0<=n.indexOf("5g")?wt.net5g:0<=n.indexOf("6g")?wt.net6g:0<=n.indexOf("3g")?wt.net3g:0<=n.indexOf("2g")?wt.net2g:wt.unknown))},qt=window.WebSocket,Vt=[],Gt={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!=Vt&&Vt.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=r.readyState;if(t!==WebSocket.OPEN){var n={readyState:t,connectUrl:r.url};switch(t){case WebSocket.CLOSED:Vt.forEach(function(e){e=e.sendErr;null!=e&&e(f({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:Vt.forEach(function(e){(0,e.sendErr)(f({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:Vt.forEach(function(e){(0,e.sendErr)(f({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Zt=new e({name:"onError"}),Jt=Zt=new e({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(l){function e(e){var t,n=e&&te(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?ye(e.reason):[],e={event_id:v(),event_type:p.PROMISE_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{exception_stacks:t,exception_frames:n,replay_id:rt(l),tags:{environment:l.config.env||"production"}}},null!=(t=l.reportTDEMEvent))&&t.call(l,e)}function t(e){if(e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement)){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){if(!(re(i=t,l.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:v(),event_type:p.RESOURCE_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{url:t,resource_type:i,replay_id:rt(l),tags:f({environment:l.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=l.reportTDEMEvent)&&i.call(l,t)}}else console.log("may be media load success because error is undefine")}}var n,r,i,u=this,c=window.onerror,o=(window.onerror=function(e,t,n,r,i){var o,s,a=te(e);"string"!=typeof(o=a)||!o||j.some(function(e){return-1<o.indexOf(e)})||B.some(function(e){return-1<o.indexOf(e)})||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],s=i?ye(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:v(),event_type:p.JS_ERROR,event_category:m.ERROR,timestamp:Date.now(),page_url:u.getFromParam(l),data:{exception_stacks:a,exception_frames:s,replay_id:rt(l),tags:{environment:l.config.env||"production",version:String(l.config.version||"")}}},null!=(s=l.reportTDEMEvent)&&s.call(l,a)),null!=c&&c.call(window,e,t,n,r,i)},window.addEventListener("unhandledrejection",e),window.document.addEventListener("error",t,!0),l.lifeCycle.on("destroy",function(){0===Zt.countInstance()&&(window.removeEventListener("unhandledrejection",e),window.document.removeEventListener("error",t,!0))}),l.config.websocket);(("object"==typeof o?!1!==o.enabled:o)||l.config.websocketHack)&&(o={key:l.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,l)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,l)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(n=window.WebSocket,window&&!n.isHack&&(r=new Proxy(WebSocket,Gt),n.isHack=!0,window.WebSocket=r),i=o,Vt.find(function(e){return e.key===i.key})||i&&Vt.push(i))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:v(),event_type:p.JS_ERROR,event_category:m.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:rt(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=qt,-1!==(e=Vt.findIndex(function(e){return e.key===t.key})))&&Vt.splice(e,1)}}),Kt=(new e({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 Kt(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),$t=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},Xt=function(e,t){return"string"==typeof e?e.split(t):[]},Yt=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+=Yt(n);return t},Qt=new e({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(s){for(var e=function(o){t.listeners.push(((e,t,n,r)=>{function i(e){var t=document.documentElement;t&&n.call(t,e,e.target)}return void 0===r&&(r=!0),e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}})(document,o,function(e,t){var n,r,i;t&&!((e,t)=>{e="object"==typeof e.click?e.click:void 0,n=$t((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,r=(e={ignoreIds:$t((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n}).ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),s=t,a=(Xt(t.getAttribute("id")||""," "),Xt(t.getAttribute("class")||"",""),0),l=!1;s&&o&&s.getAttribute;){if(l)return!0;if(10<=a)break;for(var u=Xt(s.getAttribute("id")||""," "),c=Xt(s.getAttribute("class")||"",""),d=0,h=u;d<h.length;d++){var f=h[d];if(i.has(f)){l=!0;break}}for(var p=0,m=c;p<m.length;p++){var v=m[p];if(r.has(v)){l=!0;break}}a+=1,s=s.parentNode||s.parentElement}return!1})(s.config,t)&&(i=Kt(t),n=pt(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:v(),event_type:p.CLICK,event_category:m.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}:void 0,replay_id:rt(s),tags:{environment:s.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=s.reportTDEMEvent))&&n.call(s,i)},!0))},t=this,n=0,r=Object.entries({click:1,longpress:2});n<r.length;n++)e(r[n][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),en=(new e({name:"console"}),["log","error","warn","info","debug","trace"]),tn={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace},nn=new e({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var h,f;f="object"==typeof(h=e).config.console?h.config.console:void 0,en.forEach(function(c){var d=tn[c];console[c]=function(){for(var e,t,n,r,i,o,s,a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];try{d.apply(console,l),o=c,s=h.isWhiteList,("all"===(a=(null==(a=f)?void 0:a.level)||"error")||s||("error"===a?"error"===o:"warn"===a?"error"===o||"warn"===o:"info"===a?["error","warn","info"].includes(o):"log"===a?["error","warn","info","log"].includes(o):"error"===o))&&(r=l.map(function(e){if("object"==typeof e&&null!==e)try{return JSON.stringify(e)}catch(e){}return String(e)}).join(" "),i={event_id:v(),event_type:p.LOG,event_category:m.LOG,timestamp:Date.now(),page_url:(null==(e=h.getOriginFrom)?void 0:e.call(h))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:rt(h),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=h.reportTDEMEvent)&&n.call(h,i))}catch(e){tn.error("Console hook error:",e)}}})},destroy:function(){Object.keys(tn).forEach(function(e){console[e]=tn[e]})}});function rn(){Ct=[],St=-1,_t=null,Mt(addEventListener)}function on(e,t){var n=Tn(),r="navigate";return 0<=On?r="back-forward-cache":n&&(document.prerendering||0<In()?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}}function sn(e,t,n){try{var r;if(PerformanceObserver.supportedEntryTypes.includes(e))return(r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})})).observe(Object.assign({type:e,buffered:!0},n||{})),r}catch(e){}}function an(t,n,r,i){var o,s;return function(e){0<=n.value&&(e||i)&&((s=n.value-(o||0))||void 0===o)&&(o=n.value,n.delta=s,n.rating=(e=n.value)>r[1]?"poor":e>r[0]?"needs-improvement":"good",t(n))}}function ln(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})}function un(t){function e(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)}addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)}function cn(t){var n=!1;return function(e){n||(t(e),n=!0)}}function dn(){return Mn<0&&(Mn=An(),Ln(),xn(function(){setTimeout(function(){Mn=An(),Ln()},0)})),{get firstHiddenTime(){return Mn}}}function hn(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()}function fn(o,s){s=s||{},hn(function(){var t,n=dn(),r=on("FCP"),i=sn("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<n.firstHiddenTime)&&(r.value=Math.max(e.startTime-In(),0),r.entries.push(e),t(!0))})});i&&(t=an(o,r,Nn,s.reportAllChanges),xn(function(e){r=on("FCP"),t=an(o,r,Nn,s.reportAllChanges),ln(function(){r.value=performance.now()-e.timeStamp,t(!0)})}))})}function pn(e){var t,n,r,i,o,s;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){Bn(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Un),removeEventListener("pointercancel",o,Un)},addEventListener("pointerup",i,Un),addEventListener("pointercancel",o,Un)):Bn(t,e))}function mn(e){e.forEach(function(e){e.interactionId&&(Vn=Math.min(Vn,e.interactionId),Gn=Math.max(Gn,e.interactionId),qn=Gn?(Gn-Vn)/7+1:0)})}function vn(){return Zn()-Kn}function gn(e){var t=$n[$n.length-1],n=Xn[e.interactionId];(n||$n.length<10||e.duration>t.latency)&&(n?(n.entries.push(e),n.latency=Math.max(n.latency,e.duration)):(t={id:e.interactionId,latency:e.duration,entries:[e]},Xn[t.id]=t,$n.push(t)),$n.sort(function(e,t){return t.latency-e.latency}),$n.splice(10).forEach(function(e){delete Xn[e.id]}))}function yn(e,t){function n(t,n,r,i){function o(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))}addEventListener(t,o,!0)}var r;n("visibilitychange",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.visibilitychange),n("pagehide",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.pagehide),n("beforeunload",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.beforeunload)}function wn(e){var t=e.name;0<(e=e.value)&&(tr[t]=e)}function bn(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}Rt={passive:!0,capture:!0},Ot=new Date,xt=function(e,t){_t||(_t=t,St=e,Et=new Date,Mt(removeEventListener),Tt())},Tt=function(){var t;0<=St&&St<Et-Ot&&(t={entryType:"first-input",name:_t.type,target:_t.target,cancelable:_t.cancelable,startTime:_t.timeStamp,processingStart:_t.timeStamp+St},Ct.forEach(function(e){e(t)}),Ct=[])},It=function(e){var t,n,r,i,o,s;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){xt(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,Rt),removeEventListener("pointercancel",o,Rt)},addEventListener("pointerup",i,Rt),addEventListener("pointercancel",o,Rt)):xt(t,e))},Mt=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,It,Rt)})},At="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(At=t.timeStamp,removeEventListener("visibilitychange",e,!0))},!0),rn(),self.webVitals={firstInputPolyfill:function(e){Ct.push(e),Tt()},resetFirstInputPolyfill:rn,get firstHiddenTime(){return At}};var kn,_n,Sn,En,Cn,Rn,On=-1,xn=function(t){addEventListener("pageshow",function(e){e.persisted&&(On=e.timeStamp,t(e))},!0)},Tn=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},In=function(){var e=Tn();return e&&e.activationStart||0},Mn=-1,An=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Pn=function(e){"hidden"===document.visibilityState&&-1<Mn&&(Mn="visibilitychange"===e.type?e.timeStamp:0,Dn())},Ln=function(){addEventListener("visibilitychange",Pn,!0),addEventListener("prerenderingchange",Pn,!0)},Dn=function(){removeEventListener("visibilitychange",Pn,!0),removeEventListener("prerenderingchange",Pn,!0)},Nn=[1800,3e3],Fn=[.1,.25],Un={passive:!0,capture:!0},zn=new Date,Bn=function(e,t){kn||(kn=t,_n=e,Sn=new Date,Wn(removeEventListener),jn())},jn=function(){var t;0<=_n&&_n<Sn-zn&&(t={entryType:"first-input",name:kn.type,target:kn.target,cancelable:kn.cancelable,startTime:kn.timeStamp,processingStart:kn.timeStamp+_n},En.forEach(function(e){e(t)}),En=[])},Wn=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,pn,Un)})},Hn=[100,300],qn=0,Vn=1/0,Gn=0,Zn=function(){return Cn?qn:performance.interactionCount||0},Jn=[200,500],Kn=0,$n=[],Xn={},Yn=[2500,4e3],Qn={},er=(cr.prototype.start=function(){var t=this,n=new PerformanceObserver(function(e){e=e.getEntriesByName("first-contentful-paint");0<e.length&&(t.fcp=e[0].startTime,t.slientWindowStartTime=t.fcp,n.disconnect(),setTimeout(function(){t.checkTTI()},Math.max(t.slienceTimeInterval-(performance.now()-t.fcp)+20,1)))});n.observe({entryTypes:["paint"]}),this.longtaskObserver=new PerformanceObserver(function(e){e=e.getEntries();t.longTaskEntries=t.longTaskEntries.concat(e)}),this.longtaskObserver.observe({entryTypes:["longtask"]}),this.resourceObserver=new PerformanceObserver(function(e){e=e.getEntries();t.resourceEntries=t.resourceEntries.concat(e)}),this.resourceObserver.observe({entryTypes:["resource"]})},cr.prototype.checkTTI=function(){var e=this;this.hasSlientWindow()?(this.calculateTTI(),this.longtaskObserver.disconnect(),this.resourceObserver.disconnect()):setTimeout(function(){e.checkTTI()},this.checkInterval)},cr.prototype.hasSlientWindow=function(){var e,t=performance.now();return!(t-this.slientWindowStartTime<5e3||((e=this.getLastLongTaskEndTime())>this.slientWindowStartTime?(this.slientWindowStartTime=e,this.resourceEntries=[]):this.getRequestCount(this.slientWindowStartTime,t)<=2?(this.lastLongtaskEndTime=e,0):(t=this.resourceEntries.sort(function(e,t){return e.startTime-t.startTime}),this.slientWindowStartTime=t[this.resourceEntries.length-2].startTime,1)))},cr.prototype.getLastLongTaskEndTime=function(){var t;return 0===this.longTaskEntries.length?-1:(t=0,this.longTaskEntries.forEach(function(e){e.startTime+e.duration>t&&(t=e.startTime+e.duration)}),t)},cr.prototype.getRequestCount=function(t,n){var r=0;return this.resourceEntries.forEach(function(e){e.startTime>=t&&e.startTime+e.duration<=n&&(r+=1)}),r},cr.prototype.calculateTTI=function(){var e=-1===this.lastLongtaskEndTime?this.slientWindowStartTime:this.lastLongtaskEndTime,t=performance.timing.domContentLoadedEventEnd-performance.timing.navigationStart,e=Math.max(t,e);this.onTTICallback(e)},cr),tr=(new e({name:"webVitals"}),{FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:void 0}),nr=new Map,rr=new e({name:"webVitals",onNewTdem:function(e){var t,n,r,o,s,a,l,u,c,d,h,i=this;if(Ke()&&"function"==typeof window.PerformanceObserver&&"function"==typeof performance.getEntriesByName)try{nr.set(e,{isWebVitalsReported:!1,hasFirstEntry:!1,custom:null}),fn(wn),d=wn,h={},hn(function(){function e(e){(e=e[e.length-1])&&e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-In(),0),i.entries=[e],t())}var t,n,r=dn(),i=on("LCP"),o=sn("largest-contentful-paint",e);o&&(t=an(d,i,Yn,h.reportAllChanges),n=cn(function(){Qn[i.id]||(e(o.takeRecords()),o.disconnect(),Qn[i.id]=!0,t(!0))}),["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(n,0)},!0)}),un(n),xn(function(e){i=on("LCP"),t=an(d,i,Yn,h.reportAllChanges),ln(function(){i.value=performance.now()-e.timeStamp,Qn[i.id]=!0,t(!0)})}))}),u=wn,c={},hn(function(){function t(e){e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),o(!0))}function e(e){e.forEach(t)}var n=dn(),r=on("FID"),i=sn("first-input",e),o=an(u,r,Hn,c.reportAllChanges);i&&un(cn(function(){e(i.takeRecords()),i.disconnect()})),i&&xn(function(){r=on("FID"),o=an(u,r,Hn,c.reportAllChanges),En=[],_n=-1,kn=null,Wn(addEventListener),En.push(t),jn()})}),a=wn,l={},fn(cn(function(){function e(e){e.forEach(function(e){var t,n;e.hadRecentInput||(t=i[0],n=i[i.length-1],r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e]))}),r>n.value&&(n.value=r,n.entries=i,t())}var t,n=on("CLS",0),r=0,i=[],o=sn("layout-shift",e);o&&(t=an(a,n,Fn,l.reportAllChanges),un(function(){e(o.takeRecords()),t(!0)}),xn(function(){n=on("CLS",r=0),t=an(a,n,Fn,l.reportAllChanges),ln(function(){return t()})}),setTimeout(t,0))})),o=wn,s={},hn(function(){var e;"interactionCount"in performance||(Cn=Cn||sn("event",mn,{type:"event",buffered:!0,durationThreshold:0}));function t(e){e.forEach(function(t){t.interactionId&&gn(t),"first-input"!==t.entryType||$n.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})||gn(t)}),e=Math.min($n.length-1,Math.floor(vn()/50)),(e=$n[e])&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())}var n=on("INP"),r=sn("event",t,{durationThreshold:null!=(e=s.durationThreshold)?e:40}),i=an(o,n,Jn,s.reportAllChanges);r&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&r.observe({type:"first-input",buffered:!0}),un(function(){t(r.takeRecords()),n.value<0&&0<vn()&&(n.value=0,n.entries=[]),i(!0)}),xn(function(){$n=[],Kn=Zn(),n=on("INP"),i=an(o,n,Jn,s.reportAllChanges)}))}),r=function(e){wn({name:"TTI",value:e})},Ke()&&new er(r).start(),yn(function(){i.tryReport(e,null,"onHidden")},{once:!0,delay:{visibilitychange:10}}),tr.from=(null==(n=null==(t=e)?void 0:t.getOriginFrom)?void 0:n.call(t))||window.location.href}catch(e){}},tryReport:function(t,n,r){var i=this;void 0===r&&(r="manual"),this.$walk(function(e){e===t&&("object"==typeof(e=i.$getConfig(t))&&!0===e.manualReport||"onHidden"!==r?(e=nr.get(t))&&!e.hasFirstEntry?(e.hasFirstEntry=!0,"manual"===r&&n&&(e.custom=n)):i.doReport(t,(null==e?void 0:e.custom)||n):i.doReport(t,null))})},doReport:function(o,s){var e=nr.get(o);if(e){if(null!=e&&e.isWebVitalsReported)return;e.isWebVitalsReported=!0}this.$walk(function(e){var t,n,r,i;e===o&&(t=f({},tr),s&&Object.keys(s).forEach(function(e){null!=s[e]&&(t[e]=s[e])}),n={environment:e.config.env||"production",version:String(e.config.version||"")},r={},0<t.LCP&&(r.lcp=t.LCP),0<t.FCP&&(r.fcp=t.FCP),0<t.FID&&(r.fid=t.FID),0<=t.CLS&&(r.cls=t.CLS),0<t.TTFB&&(r.ttfb=t.TTFB),0<t.TTI&&(r.tti=t.TTI),0<t.INP&&(r.inp=t.INP),i={event_id:v(),event_type:p.true,event_category:m.PERFORMANCE,timestamp:Date.now(),page_url:t.from||(null==(i=e.getOriginFrom)?void 0:i.call(e))||window.location.href,data:{measurements:r,replay_id:rt(e),tags:n}},null!=(r=e.reportTDEMEvent))&&r.call(e,i)})},publish:function(e,t){this.tryReport(e,t,"manual")},destroy:function(){this.option.publish=function(){}}}),ir=(new e({name:"pagePerformance"}),3),or=new Map,sr=new e({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Ke()&&(or.set(t,{isPagePerformanceReported:!1}),Rn?this.publish(Rn,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),yn(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=or.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=or.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if($e("paint"))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(e){}(Rn=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(Rn,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;if(i)return n={from:n,originFrom:r,dnsLookup:bn(i.domainLookupEnd-i.domainLookupStart),tcp:bn(i.connectEnd-i.connectStart),ssl:bn(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:bn(i.responseStart-i.requestStart),contentDownload:bn(i.responseEnd-i.responseStart),domParse:bn(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:bn(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:bn(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=f(f({},n),{engineInit:bn(t,0,1e4),bundleLoad:bn(e,0,1e4)})),n},publish:function(r,i){var o=this;this.$walk(function(e){var t,n;e===i&&(n=(t=performance.timing).navigationStart,t={event_id:v(),event_type:p.PAGE_LOAD,event_category:m.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:tr.lcp,fcp:tr.fcp,fid:tr.fid,cls:tr.cls,ttfb:tr.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:t.domContentLoadedEventEnd-n,load_complete:t.loadEventEnd-n,first_screen_time:r.firstScreenTiming},replay_id:rt(e),device_type:o.getDeviceType(),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(n=e.reportTDEMEvent)&&n.call(e,t),n=or.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()},getDeviceType:function(){var e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet|ipad/i.test(e)?"Tablet":"Desktop"},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){Rn=n.buildPerformanceLog(t,e,r,i);e=or.get(t);!Rn||null!=e&&e.isPagePerformanceReported||n.publish(Rn,t)})}catch(t){}},getFirstScreenTiming:function(a,l){var u=this;a.lifeCycle.on("destroy",function(){v&&clearTimeout(v)});var c,d=this,n=["script","style","link","br"],h=[],f={},p=($e("paint")&&(c=new PerformanceObserver(function(e){e.getEntries().forEach(function(e){var t;"paint"===e.entryType&&"first-contentful-paint"===e.name&&0<(t=document.querySelectorAll("[TDEM-FIRST-SCREEN-TIMING],[AEGIS-FIRST-SCREEN-TIMING]")).length&&a.config.id&&!u.performanceMap[a.config.id]&&(u.setFirstScreenInfo(a,e.startTime,t[0],t),null!=l&&l(e.startTime),p.disconnect(),c.disconnect(),v)&&clearTimeout(v)})})).observe({entryTypes:["paint"]}),new MutationObserver(function(e){var t={roots:[],ignores:[],rootsDomNum:[],time:performance.now()};e.forEach(function(e){e&&e.addedNodes&&Array.prototype.slice.call(e.addedNodes).forEach(function(e){d.isEleInArray(e,t.ignores)?t.ignores.push(e):1===e.nodeType&&(e.hasAttribute("TDEM-FIRST-SCREEN-TIMING")||e.hasAttribute("AEGIS-FIRST-SCREEN-TIMING"))?(Object.prototype.hasOwnProperty.apply(f,[t.time])||(f[t.time]=[]),f[t.time].push(e)):1===e.nodeType&&(d.hasAncestorOrSelfWithAttribute(e,"TDEM-IGNORE-FIRST-SCREEN-TIMING")?t.ignores.push(e):-1!==n.indexOf(e.nodeName.toLocaleLowerCase())||d.isEleInArray(e,t.roots)||(t.roots.push(e),t.rootsDomNum.push(d.walkAndCount(e)||0)))})}),t.roots.length&&h.push(t)})),m=(p.observe(document,{childList:!0,subtree:!0}),function(n){(n=void 0===n?0:n)||(r=0,(e=Object.keys(f)).length?(n=Math.max.apply(null,e),u.setFirstScreenInfo(a,n,null==(e=f[n])?void 0:e[0],f)):h.forEach(function(e){for(var t=0;t<e.roots.length;t++)e.rootsDomNum[t]>r&&d.isInFirstScreen(e.roots[t])&&(r=e.rootsDomNum[t],n=e.time,u.setFirstScreenInfo(a,n,e.roots[t]))}),h.length=0,Object.keys(f).forEach(function(e){f[e]=f[e].map(function(e){var t={tagName:e.tagName},n=e.attributes;if(!n)return e;for(var r=0;r<n.length;r++){var i=n[r];i.name&&(t[i.name]=e.getAttribute(i.name))}return t})}));var r,e=performance.timing,t=e.domInteractive-e.domLoading,i=n;v=null;for(var o=0,s=[t,e.loadEventStart-e.domInteractive,i];o<s.length;o++)if(s[o]<=0&&0<ir){v=setTimeout(function(){return m(i)},3e3);break}v?--ir:(p.disconnect(),null!=c&&c.disconnect(),null!=l&&l(n))}),v=setTimeout(function(){return m()},3e3)},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"!=typeof(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}}),ar=(new e({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),lr=new e({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"),ar.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 l=this;void 0===e&&(e="reload"),setTimeout(function(){a._customPageUrl=null;var r=location.pathname+location.hash+a.config.id,i=a.getOriginFrom(),o=l.lastPageUrl||void 0,s=l.resolveNavigationType(e,location.href);l.$walk(function(e){var t,n;e===a&&r&&r!==l.originFireUrl&&(n={event_id:v(),event_type:p.PAGE_VIEW,event_category:m.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||void 0,is_effective_action:!0,replay_id:rt(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:s,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),l.originFireUrl=r,l.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),ur="__MONITOR_SESSION_V1__";function cr(e){this.slienceTimeInterval=5e3,this.checkInterval=100,this.fcp=0,this.longTaskEntries=[],this.resourceEntries=[],this.slientWindowStartTime=performance.now(),this.onTTICallback=e}function dr(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 hr(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function fr(e,t){var n,r,i;return"undefined"==typeof window?hr(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[ur],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),n):(i=hr(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),window[ur]=i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),dr("_tdem_s",n.sessionId),n):(i=hr(t(),e),dr("_tdem_s",(window[ur]=i).sessionId),i))}br.prototype.request=function(o,s){var a=this;return void 0===s&&(s={}),o.sendBeacon||o.handoff?this.handoff(o,s):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=s.success)&&t.call(s,i.response),null!=(t=s.final)&&t.call(s,e),n(e)):(t=f(f({},e),{error:i.response}),null!=(e=s.fail)&&e.call(s,i.response),null!=(e=s.final)&&e.call(s,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"==typeof 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)),a.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),a.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),t=void 0!==o.body?o.body:o.data,a.shouldSanitizeEvalKeyword(o,t)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},br.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))},br.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:void 0;return r&&"function"==typeof r.sendBeacon?(n=void 0!==e.body?e.body:e.data,n={ok:r=r.sendBeacon(e.url,n),request:e,handoffAccepted:r,error:r?void 0:new Error("navigator.sendBeacon rejected the payload")},r?null!=(r=t.success)&&r.call(t,{accepted:!0}):null!=(r=t.fail)&&r.call(t,n.error),null!=(r=t.final)&&r.call(t,n),Promise.resolve(n)):(r={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(n=t.fail)&&n.call(t,r.error),null!=(e=t.final)&&e.call(t,r),Promise.resolve(r))},br.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var pr,mr,vr=br,gr=new Map,yr=(T(mr=r,yr=pr=et),mr.prototype=null===yr?Object.create(yr):(wr.prototype=yr.prototype,new wr),r.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=P(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},r.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},r.prototype._prefetchConfigAndInit=function(s){return I(this,void 0,void 0,function(){var t,n,r,i,o;return M(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(s)}catch(e){console.warn(e),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(e)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},r.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},r.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:void 0!==t.remoteEnabled?!!t.remoteEnabled:0<t.sampleRate,tdem_sample_rate:t.sampleRate},void 0!==t.replaySampleRate&&(n.replay_sample_rate=t.replaySampleRate),void 0!==t.errorTraceback&&(n.error_traceback=t.errorTraceback),void 0!==t.errorSampleRate&&(n.error_sample_rate=t.errorSampleRate),n):null:null}catch(e){return null}},r.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<et.installedPlugins.length;t++)try{et.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited"),this._afterInit(e)},r.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",r.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=F(L("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],D("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=gr.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=gr.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},r.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("&")},r.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))},r.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(e){return""}},r.prototype.ready=function(){function o(){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()}}))}var t=this;o(),this.isReportReady=!0},r.prototype.request=function(l,n,u){var c,d,h=this;this.config.reportImmediately||this.isReportReady?this.$request(l,c=function(e){var t=F(L("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&l.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===l.extraRetryOptions.requestId}),1),D("tdem-web-retry-report-requests",JSON.stringify(t)),gr.delete(l.extraRetryOptions.success),gr.delete(l.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!h.config.reportRetry)return null==u?void 0:u(e);var t,n="boolean"==typeof h.config.reportRetry?Ut:f(f({},Ut),h.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Ut.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Ut.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Ut.whenRetryEndStillFail:n,s=(l.extraRetryOptions||(l.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),l.extraRetryOptions),a=(s.requestId=s.requestId||l.url+"-"+Date.now()+"-"+Math.random(),s.requestId),n=(s.retriedCount=s.retriedCount||0,s.success=s.success||a+"_successCallback",s.fail=s.fail||a+"_failCallback",F(L("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===a})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===a}),n[t]=l):n.push(l),D("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){if(s.retriedCount<i)l.extraRetryOptions.retriedCount+=1,h.$request(l,c,d);else{if("discard"===o){var e=F(L("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==a});if(e.length)D("tdem-web-retry-report-requests",JSON.stringify(e));else try{localStorage.removeItem("tdem-web-retry-report-requests")}catch(e){}}gr.delete(s.success),gr.delete(s.fail)}},"function"==typeof r?r(l.extraRetryOptions.retriedCount):r),null!=u&&u(e),gr.has(s.success)||gr.set(s.success,c),gr.has(s.fail)||gr.set(s.fail,d)}):this.reportRequestQueue.push({options:l,success:n,fail:u})},r.prototype.$request=function(a,e,t){var n,r;if(a&&"string"==typeof a.url&&""!==a.url&&this.bean.id)return n=a.url,!1!==a.addBean&&(n=((e,t)=>{var n,r,i,o=e,s=a.beanFilter||[];for(n in t)-1===s.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,f(f({},this.bean),{from:this.getCurrentPageUrl()}))),a.url=n,n=a.method||"get",r=this.config.onBeforeRequest,(a=r?r(a,this):a)?a.url?(r={success:e,fail:t},void((e={kind:a.type===oe.WHITE_LIST?"config":"events",url:a.url,method:n.toUpperCase(),contentType:a.contentType,data:a.data,body:a.data,sendBeacon:!!(null!=a&&a.sendBeacon||this.sendNow),source:a}).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")},r.prototype.publishPluginsLogs=function(){var e=r.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},r.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},r.prototype.reportWebVitals=function(e){try{var t=r.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(e){}},r.sessionID=fr("tdem",Ie).sessionId,r);function r(e,t){var n,r,i,s,o,a,l,u,c,d,h=pr.call(this,e,t=void 0===t?{}:t)||this;h.sendNow=!1,h.isReportReady=!1,h.reportRequestQueue=[],h._sdkInitialized=!1,h.speedLogPipeline=Ze([(u=[],c=(o=h).config,o.lifeCycle.on("destroy",function(){u.length=0}),function(e,t){Array.isArray(e)?u=u.concat(e):u.push(e),a&&u.length>=a||o.sendNow&&0<u.length?(u=Se(u),0<(u=Array.isArray(u)?u:[]).length&&t(u.splice(0,u.length)),l&&clearTimeout(l)):(l&&clearTimeout(l),l=setTimeout(function(){l=null,u=Se(u),0<(u=Array.isArray(u)?u:[]).length&&t(u.splice(0,u.length))},c.delay))}),(s=h.config,function(e,t){var n,r,i,o="number"==typeof s.repeat?s.repeat:60;!s.speedSample||o<=0?t(e):(n=(null==s?void 0:s.id)||"0",r=Ce[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],Ce[n]=r):Ee[n]||Re(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Ce[n]=r,t(e)):Ee[n]||Re(n))}),(i=h,function(t,n){Ht(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=h.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=h.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 void 0!==e.payload&&delete e.payload,e}))},function(e){return h.sendPipeline([function(e,t){t({type:oe.SPEED,url:""+h.config.speedUrl,method:"post",data:ne(e,f(f({},h.bean),{from:h.getCurrentPageUrl()})),log:e})}],oe.SPEED)(e)}]),h.getInternalTransport()||h.setInternalTransport(new vr),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),h._bootstrapInit(e)}catch(e){console.warn(e),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"),h.sendSDKError(e)}return h}function wr(){this.constructor=mr}function br(){}new e({name:"ie"}),new e({name:"onClose"});var kr=new e({name:"onClose",onNewTdem:function(n){var r,i=this;l.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,A([window],e))}):yn(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([])}});function _r(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}new e({name:"aid"}),Rr.generate=function(){return"rep_"+this.uuid32()},Rr.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var Sr=Rr,Er="[SessionReplay]",Cr=!1;function Rr(){}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Cr&&console.log.apply(console,A([Er+"["+e+"]"],t))}function Or(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Cr&&console.debug.apply(console,A([Er+"["+e+"]"],t))}function xr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Cr&&console.log.apply(console,A([Er+"["+e+"] WARN:"],t))}function Tr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Cr&&console.log.apply(console,A([Er+"["+e+"] ERROR:"],t))}Lr.prototype.setTdemInstance=function(e){this.tdemInstance=e},Lr.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=fr("tdem",_r),n=f({id:n.sessionId,replayId:Sr.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),g("SessionManager","Document replay session created:",n.id,n.replayId),n},Lr.prototype.restoreSession=function(){return this.session},Lr.prototype.saveSession=function(){},Lr.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},Lr.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},Lr.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},Lr.prototype.shouldRefreshSession=function(){return!1},Lr.prototype.getSession=function(){return this.session},Lr.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},Lr.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},Lr.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(e){}},Lr.prototype.syncSharedSession=function(e){var t,n,r,i;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,t="tdem","undefined"!=typeof window&&(n=Date.now(),(r=window[ur])?(i=r.sessionId!==e,r.sessionId=e,r.version=i?r.version+1:r.version,r.source=t,i&&(r.createdAt=n),r.lastActivity=n):window[ur]=hr(e,t),dr("_tdem_s",e),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:t}})))};var Ir=Lr,Mr=((i={})[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i[i.Asset=7]="Asset",i),Ar=(Pr.prototype.ensureReady=function(){return I(this,void 0,void 0,function(){return M(this,function(e){return[2,this.ready]})})},Pr.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})})},Pr.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},Pr);function Pr(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 Lr(e){this.session=null,this.tdemInstance=null}Nr.prototype.initWorker=function(){var t=this,e=(()=>{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),g("CompressionWorker","Worker created successfully"),new Ar(n))}catch(e){return xr("CompressionWorker","Failed to create worker, will fallback to sync buffer:",e),null}})();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,g("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()}).catch(function(e){xr("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):g("EventBuffer","Worker not available, using sync buffer")},Nr.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}},Nr.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(e){xr("EventBuffer","Failed to send event to worker:",e)}},Nr.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(xr("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&&(xr("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},Nr.prototype.getEvents=function(){return A(this.events)},Nr.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},Nr.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},Nr.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},Nr.prototype.finishAsync=function(){return I(this,void 0,void 0,function(){var t,n,r;return M(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 xr("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}]}})})},Nr.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},Nr.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},Nr.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},Nr.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(e){return 1024}},Nr.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===Mr.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===Mr.Meta){r=n;break}for(var i,o=0,s=Math.max(e,.2*this.config.maxSize),a=0;a<r&&o<s;)a++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<s;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},Nr.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===Mr.Meta||e.type===Mr.FullSnapshot})},Nr.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===Mr.FullSnapshot)return t.timestamp}return null},Nr.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var Dr=Nr;function Nr(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()}function Fr(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 Ur(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function zr(a){return function(){var e=this,s=arguments;return new Promise(function(t,n){var r=a.apply(e,s);function i(e){Ur(r,t,n,i,o,"next",e)}function o(e){Ur(r,t,n,i,o,"throw",e)}i(void 0)})}}function Br(e,t,n){t=Hr(t);var r=e,t=Vr()?Reflect.construct(t,n||[],Hr(e).constructor):t.apply(e,n);if(!t||"object"!=typeof t&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jr(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,ei(r.key),r)}}function k(e,t,n){return t&&jr(e.prototype,t),n&&jr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){var n,r,i,o,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(r=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==s.return||s.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(s=ti(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),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 Wr(){return(Wr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=((e,t)=>{for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hr(e)););return e})(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 Hr(e){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qr(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&&Xr(e,t)}function Vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vr=function(){return!!e})()}function Gr(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(r){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gr(Object(i),!0).forEach(function(e){var t,n;t=r,n=i[e=e],(e=ei(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Gr(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function Zr(e,t){if(null==e)return{};var n,r=((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 Jr(){var p,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,s,a,l,u,c,d,h,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return Kr(t,"_invoke",(i=e,o=n,c=r||[],d=!1,h={p:u=0,n:0,v:p,a:f,f:f.bind(p,4),d:function(e,t){return s=e,a=0,l=p,h.n=t,m}},function(e,t,n){if(1<u)throw TypeError("Generator is already running");for(d&&1===t&&f(t,n),a=t,l=n;(g=a<2?p:l)||!d;){s||(a?a<3?(1<a&&(h.n=-1),f(a,l)):h.n=l:h.v=l);try{if(u=2,s){if(g=s[e=a?e:"next"]){if(!(g=g.call(s,l)))throw TypeError("iterator result is not an object");if(!g.done)return g;l=g.value,a<2&&(a=0)}else 1===a&&(g=s.return)&&g.call(s),a<2&&(l=TypeError("The iterator does not provide a '"+e+"' method"),a=1);s=p}else if((g=(d=h.n<0)?l:i.call(o,h))!==m)break}catch(e){s=p,a=1,l=e}finally{u=1}}return{value:g,done:d}}),!0),t;function f(e,t){for(a=e,l=t,g=0;!d&&u&&!n&&g<c.length;g++){var n,r=c[g],i=h.p,o=r[2];3<e?(n=o===t)&&(l=r[(a=r[4])?5:a=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(a=0,h.v=t,h.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,h.n=o,a=0))}if(n||1<e)return m;throw d=!0,t}}var m={};function v(){}function i(){}function o(){}var g=Object.getPrototypeOf,e=[][t]?g(g([][t]())):(Kr(g={},t,function(){return this}),g),s=o.prototype=v.prototype=Object.create(e);function a(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,Kr(e,n,"GeneratorFunction")),e.prototype=Object.create(s),e}return Kr(s,"constructor",i.prototype=o),Kr(o,"constructor",i),Kr(o,n,i.displayName="GeneratorFunction"),Kr(s),Kr(s,n,"Generator"),Kr(s,t,function(){return this}),Kr(s,"toString",function(){return"[object Generator]"}),(Jr=function(){return{w:r,m:a}})()}function Kr(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(Kr=function(e,t,n,r){function i(t,n){Kr(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 $r(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 Xr(e,t){return(Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pe(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}})(e,t)||ti(e,t)||(()=>{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 Yr(e,t,n,r){var i=Wr(Hr(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Qr(e){return(e=>{if(Array.isArray(e))return Fr(e)})(e)||(()=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})()||ti(e)||(()=>{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 ei(e){e=(e=>{if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")})(e);return"symbol"==typeof e?e:e+""}function _(e){return(_="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 ti(e,t){var n;if(e)return"string"==typeof e?Fr(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)?Fr(e,t):void 0}function ni(e){var n="function"==typeof Map?new Map:void 0;return(ni=function(e){if(null===e||!(t=>{try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}})(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 function(e,t,n){var r;return Vr()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&Xr(t,n.prototype),t)}(e,arguments,Hr(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Xr(t,e)})(e)}function c(e,t,n){e=e,t="symbol"!==_(t)?t+"":t,n=n,t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}function ri(e,t,n){e=e,t="symbol"!==_(t)?t+"":t,n=n,t in e?ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}var ii=["inputs"],oi=["inputId"],si=["inputs"],ai=["inputId"],li=["type"],ui=Object.defineProperty,ci=Object.defineProperty,di=((i=di||{})[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i),hi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pi={},mi={};function vi(e){if(pi[e])return pi[e];var t=globalThis[e],n=t.prototype,r=e in hi?hi[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 fi?fi[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 pi[e]=t.prototype,t.prototype;try{var o,s,a=document.createElement("iframe"),l=(a.style.display="none",document.body.appendChild(a),a.contentWindow);return l?(o=l[e].prototype)?((s=navigator.userAgent).includes("Safari")&&!s.includes("Chrome")?(a.classList.add("rr-block"),a.setAttribute("__rrwebUntaintedMutationObserver",""),mi[e]=function(){return a.remove()}):a.remove(),pi[e]=o):(a.remove(),n):t.prototype}catch(e){return n}}var gi={};function yi(e,t,n){var r="".concat(e,".").concat(String(n));return gi[r]?gi[r].call(t):(e=vi(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(gi[r]=e).call(t):t[n])}var wi={};function bi(e,t,n){var r="".concat(e,".").concat(String(n));return wi[r]?wi[r].bind(t):"function"!=typeof(e=vi(e)[n])?t[n]:(wi[r]=e).bind(t)}var i=Date.now,ki={ownerDocument:function(e){return yi("Node",e,"ownerDocument")},childNodes:function(e){return yi("Node",e,"childNodes")},parentNode:function(e){return yi("Node",e,"parentNode")},parentElement:function(e){return yi("Node",e,"parentElement")},textContent:function(e){return yi("Node",e,"textContent")},contains:function(e,t){return bi("Node",e,"contains")(t)},getRootNode:function(e){return bi("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?yi("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?yi("Element",e,"shadowRoot"):null},querySelector:function(e,t){return yi("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return yi("Element",e,"querySelectorAll")(t)},nowTimestamp:i=/[1-9][0-9]{12}/.test(Date.now().toString())?i:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[vi("MutationObserver").constructor,null!=(e=mi.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(e){return function(){}}}};function _i(e){return e.nodeType===e.ELEMENT_NODE}function Si(e){var t=e&&"host"in e&&"mode"in e&&ki.host(e)||null;return Boolean(t&&"shadowRoot"in t&&ki.shadowRoot(t)===e)}function Ei(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Ci(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 Ri(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(e){return null}var r}function Ri(e,t){if("styleSheet"in e){var n;try{n=Ci(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(t){n=e.cssText}return e.styleSheet.href?Ni(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?Ni(i,t):i}var Oi=k(function e(){b(this,e),ri(this,"idNodeMap",new Map),ri(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 xi(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&Ti(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function Ti(e){return e.toLowerCase()}function Ii(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ti(t):null}function Mi(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}t=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(n=null==t?void 0:t[1])?n:null}var Ai=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pi=/^(?:[a-z+]+:)?\/\//i,Li=/^www\..*/i,Di=/^(data:)([^,]*),(.*)/i;function Ni(e,c){return(e||"").replace(Ai,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(Pi.test(n)||Li.test(n))return"url(".concat(i).concat(n).concat(i,")");if(Di.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),s=c.split("#")[0].split("/"),o=t.split("/");s.pop();var a,l=Me(o);try{for(l.s();!(a=l.n()).done;){var u=a.value;"."!==u&&(".."===u?s.pop():s.push(u))}}catch(e){l.e(e)}finally{l.f()}return"url(".concat(i).concat(s.join("/")).concat(r).concat(i,")")})}function Fi(e,t){return 1<arguments.length&&void 0!==t&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var Ui,zi,Bi=1,ji=new RegExp("[^a-z0-9-_:]");function Wi(){return Bi++}var Hi=/^[^ \t\n\r\u000c]+/,qi=/^[, \t\n\r\u000c]+/,Vi=new WeakMap;function Gi(e,t){return t&&""!==t.trim()?Zi(e,t):t}function Zi(e,t){var n=Vi.get(e);if(n||(n=e.createElement("a"),Vi.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Ji(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)?Gi(e,r):"srcset"===n?((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(qi),!(n>=t.length);)if(","===(s=r(Hi)).slice(-1))s=Gi(e,s.substring(0,s.length-1)),i.push(s);else for(var o="",s=Gi(e,s),a=!1;;){var l=t.charAt(n);if(""===l){i.push((s+o).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){n+=1,i.push((s+o).trim());break}"("===l&&(a=!0)}o+=l,n+=1}return i.join(", ")})(e,r):"style"===n?Ni(r,Zi(e)):"object"===t&&"data"===n?Gi(e,r):r)}function Ki(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function $i(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&&$i(ki.parentNode(e),t,n)}function Xi(e,t,n,r){var i;if(_i(e)){if(!ki.childNodes(i=e).length)return!1}else{if(null===ki.parentElement(e))return!1;i=ki.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($i(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1}function Yi(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,s=t.inlineStylesheet,a=t.maskInputOptions,l=void 0===a?{}:a,u=t.maskTextFn,c=t.maskInputFn,a=t.dataURLOptions,d=void 0===a?{}:a,h=t.inlineImages,f=t.recordCanvas,N=t.keepIframeSrcFn,a=t.newlyAddedElement,F=void 0!==a&&a,a=t.cssCaptured,U=void 0!==a&&a,p=(a=n,!(t=t.mirror).hasNode(a)||1===(t=t.getId(a))?void 0:t);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:di.Document,childNodes:[],compatMode:e.compatMode}:{type:di.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:di.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:p};case e.ELEMENT_NODE:for(var m,v,g,y,w,b,k=e,_=(M={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:c,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:N,newlyAddedElement:F,rootId:p}).doc,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,z=M.rootId,M=((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(e){}return!1})(k,M.blockClass,M.blockSelector),A=(v=k)instanceof HTMLFormElement?"form":(v=Ti(v.tagName),ji.test(v)?"div":v),P={},B=k.attributes.length,L=0;L<B;L++){var D=k.attributes[L];Ki(A,D.name)||(P[D.name]=Ji(_,A,Ti(D.name),D.value))}"link"===A&&S&&(v=null,v=(S=Array.from(_.styleSheets).find(function(e){return e.href===k.href}))?Ci(S):v)&&(delete P.rel,delete P.href,P._cssText=v),"style"===A&&k.sheet&&(S=Ci(k.sheet))&&(1<k.childNodes.length&&(S=function(e,t,n){var r=2<arguments.length&&void 0!==n&&n,i=Array.from(t.childNodes),o=[],s=0;if(1<i.length&&e&&"string"==typeof e)for(var a=Fi(e,r),l=a.length/e.length,u=1;u<i.length;u++)if(i[u].textContent&&"string"==typeof i[u].textContent){for(var c=Fi(i[u].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 h,f=c.substring(0,d),p=a.split(f),m=-1;if(2===p.length)m=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[u-1].textContent)m=a.indexOf(f,1);else if(1===p.length){if(f=f.substring(0,f.length-1),(p=a.split(f)).length<=1)return o.push(e),o;d=101}else d===c.length-1&&(m=a.indexOf(f));if(-1!==(m=2<=p.length&&100<d&&((h=i[u-1].textContent)&&"string"==typeof h&&(h=Fi(h).length,m=a.indexOf(f,h)),-1===m)?p[0].length:m)){for(var v=Math.floor(m/l);0<v&&v<e.length;){if((s+=1)>50*i.length)return o.push(e),o;var g=Fi(e.substring(0,v),r);if(g.length===m){o.push(e.substring(0,v)),e=e.substring(v),a=a.substring(m);break}g.length<m?v+=Math.max(1,Math.floor((m-g.length)/l)):v-=Math.max(1,Math.floor((g.length-m)*l))}break}}}return o.push(e),o}(S,k).join("/* rr_split */")),P._cssText=S),["input","textarea","select"].includes(A)&&(v=k.value,S=k.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&v?P.value=xi({element:k,type:Ii(k),tagName:A,value:v,maskInputOptions:E,maskInputFn:C}):S&&(P.checked=S)),"option"===A&&(k.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&k.open&&(P.rr_open_mode=k.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&x&&("2d"===k.__context?(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})(k)||(P.rr_dataURL=k.toDataURL(R.type,R.quality)):"__context"in k||(v=k.toDataURL(R.type,R.quality),(C=_.createElement("canvas")).width=k.width,C.height=k.height,v!==C.toDataURL(R.type,R.quality)&&(P.rr_dataURL=v))),"img"===A&&O&&(Ui||(Ui=_.createElement("canvas"),zi=Ui.getContext("2d")),y=(g=k).currentSrc||g.getAttribute("src")||"<unknown-src>",w=g.crossOrigin,b=function(){g.removeEventListener("load",b);try{Ui.width=g.naturalWidth,Ui.height=g.naturalHeight,zi.drawImage(g,0,0),P.rr_dataURL=Ui.toDataURL(R.type,R.quality)}catch(e){if("anonymous"!==g.crossOrigin)return g.crossOrigin="anonymous",void(g.complete&&0!==g.naturalWidth?b():g.addEventListener("load",b));console.warn("Cannot inline img src=".concat(y,"! Error: ").concat(e))}"anonymous"===g.crossOrigin&&(w?P.crossOrigin=w:g.removeAttribute("crossorigin"))},g.complete&&0!==g.naturalWidth?b():g.addEventListener("load",b)),["audio","video"].includes(A)&&((S=P).rr_mediaState=k.paused?"paused":"played",S.rr_mediaCurrentTime=k.currentTime,S.rr_mediaPlaybackRate=k.playbackRate,S.rr_mediaMuted=k.muted,S.rr_mediaLoop=k.loop,S.rr_mediaVolume=k.volume),I||(k.scrollLeft&&(P.rr_scrollLeft=k.scrollLeft),k.scrollTop&&(P.rr_scrollTop=k.scrollTop)),M&&(x=(E=k.getBoundingClientRect()).width,C=E.height,P={class:P.class,rr_width:"".concat(x,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||T(P.src)||(k.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(m=!0)}catch(k){}return{type:di.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===k.tagName||k.ownerSVGElement)||void 0,needBlock:M,rootId:z,isCustom:m};case e.TEXT_NODE:return v=e,S=(O={doc:n,needsMask:o,maskTextFn:u,rootId:p,cssCaptured:U}).needsMask,I=O.maskTextFn,E=O.rootId,x=O.cssCaptured,C=(C=ki.parentNode(v))&&C.tagName,T="",M="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?T="SCRIPT_PLACEHOLDER":x||(T=ki.textContent(v),M&&(T=T&&Ni(T,Zi(O.doc)))),!M&&!C&&T&&S&&(T=I?I(T,ki.parentElement(v)):T.replace(/[\S]/g,"*")),{type:di.Text,textContent:T||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:di.CDATA,textContent:"",rootId:p};case e.COMMENT_NODE:return{type:di.Comment,textContent:ki.textContent(e)||"",rootId:p};default:return!1}}function N(e){return null==e?"":e.toLowerCase()}function Qi(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 eo(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.maskTextClass,a=e.maskTextSelector,l=e.skipChild,l=void 0!==l&&l,u=e.inlineStylesheet,c=void 0===u||u,u=e.maskInputOptions,d=void 0===u?{}:u,h=e.maskTextFn,f=e.maskInputFn,p=e.slimDOMOptions,u=e.dataURLOptions,m=void 0===u?{}:u,u=e.inlineImages,v=void 0!==u&&u,u=e.recordCanvas,g=void 0!==u&&u,y=e.onSerialize,w=e.onIframeLoad,u=e.iframeLoadTimeout,b=void 0===u?5e3:u,k=e.onStylesheetLoad,u=e.stylesheetLoadTimeout,_=void 0===u?5e3:u,u=e.keepIframeSrcFn,S=void 0===u?function(){return!1}:u,u=e.newlyAddedElement,u=void 0!==u&&u,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,R=void 0===e||e,C=C||Xi(t,s,a,void 0===C),e=Yi(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,dataURLOptions:m,inlineImages:v,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:u,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var u=r.hasNode(t)?r.getId(t):((e,t)=>{if(t.comment&&e.type===di.Comment)return 1;if(e.type===di.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"===Mi(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(N(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===N(e.attributes.name)||"icon"===N(e.attributes.rel)||"apple-touch-icon"===N(e.attributes.rel)||"shortcut icon"===N(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&N(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(N(e.attributes.property).match(/^(og|twitter|fb):/)||N(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===N(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===N(e.attributes.name)||"googlebot"===N(e.attributes.name)||"bingbot"===N(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===N(e.attributes.name)||"generator"===N(e.attributes.name)||"framework"===N(e.attributes.name)||"publisher"===N(e.attributes.name)||"progid"===N(e.attributes.name)||N(e.attributes.property).match(/^article:/)||N(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===N(e.attributes.name)||"yandex-verification"===N(e.attributes.name)||"csrf-token"===N(e.attributes.name)||"p:domain_verify"===N(e.attributes.name)||"verify-v1"===N(e.attributes.name)||"verification"===N(e.attributes.name)||"shopify-checkout-api-token"===N(e.attributes.name)))return 1}}})(e,p)||!R&&e.type===di.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Bi++,O=Object.assign(e,{id:u});if(r.add(t,O),-2===u)return null;y&&y(t);E=!l;if(O.type===di.Element&&(E=E&&!O.needBlock,delete O.needBlock,e=ki.shadowRoot(t))&&Ei(e)&&(O.isShadowHost=!0),(O.type===di.Document||O.type===di.Element)&&E){p.headWhitespace&&O.type===di.Element&&"head"===O.tagName&&(R=!1);var x={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:s,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S,cssCaptured:!1};if(O.type!==di.Element||"textarea"!==O.tagName||void 0===O.attributes.value){O.type===di.Element&&void 0!==O.attributes._cssText&&"string"==typeof O.attributes._cssText&&(x.cssCaptured=!0);for(var T=0,I=Array.from(ki.childNodes(t));T<I.length;T++){var M=eo(I[T],x);M&&O.childNodes.push(M)}}var A=null;if(_i(t)&&(A=ki.shadowRoot(t)))for(var P=0,L=Array.from(ki.childNodes(A));P<L.length;P++){var D=eo(L[P],x);D&&(Ei(A)&&(D.isShadow=!0),O.childNodes.push(D))}}u=ki.parentNode(t);return u&&Si(u)&&Ei(u)&&(O.isShadow=!0),O.type===di.Element&&"iframe"===O.tagName&&((e,t,n)=>{var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){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 s=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(s),o=!0,t()})}}})(t,function(){var e=t.contentDocument;e&&w&&(e=eo(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S}))&&w(t,e)},b),O.type===di.Element&&"link"===O.tagName&&"string"==typeof O.attributes.rel&&("stylesheet"===O.attributes.rel||"preload"===O.attributes.rel&&"string"==typeof O.attributes.href&&"css"===Mi(O.attributes.href))&&((e,t,n)=>{var r,i,o=!1;try{r=e.sheet}catch(e){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=eo(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:m,inlineImages:v,recordCanvas:g,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:_,keepIframeSrcFn:S}))&&k(t,e)},_),O}var to,no,ro,io,oo,so,ao={exports:{}},y=(io=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))).__esModule?io:("function"==typeof(oo=io.default)?(so=function e(){return this instanceof e?Reflect.construct(oo,arguments,this.constructor):oo.apply(this,arguments)}).prototype=oo.prototype:so={},Object.defineProperty(so,"__esModule",{value:!0}),Object.keys(io).forEach(function(e){var t=Object.getOwnPropertyDescriptor(io,e);Object.defineProperty(so,e,t.get?t:{enumerable:!0,get:function(){return io[e]}})}),so);function lo(){var d,h,e,t;return ro||(ro=1,to||(to=1,e=String,ao.exports=(t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}})(),ao.exports.createColors=t),d=ao.exports,h=y,qr(a,ni(Error)),t=k(a,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==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,s,a,t=(t=h&&e?h(t):t).split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,t.length),c=String(u).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,s=function(e){return n(o(e))},a=function(e){return i(e)}):s=a=function(e){return e},t.slice(l,u).map(function(e,t){var t=l+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=a(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),s(">")+a(n)+e+"\n "+t+s("^")):" "+a(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(no=t).default=t),no;function a(e,t,n,r,i,o){var s;return b(this,a),(s=Br(this,a,[e])).name="CssSyntaxError",s.reason=e,i&&(s.file=i),r&&(s.source=r),o&&(s.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(s.line=t,s.column=n):(s.line=t.line,s.column=t.column,s.endLine=n.line,s.endColumn=n.column)),s.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(s,a),s}}var uo,co,ho,fo,po,mo,vo,go,yo,wo,bo,ko,_o,So,Eo,Co,Ro,Oo,xo,To,Io,Mo,Ao,Po,Lo,Do,No,Fo,Uo,zo,Bo,jo,Wo,Ho,qo,Vo,Go,Zo,Jo,Ko,$o,Xo,Yo,Qo,es,ts,ns,rs,is,os,ss,as,ls,us,cs,ds,hs,fs,ps,ms,vs,gs,ys,ws,bs,ks,_s,Ss,Es,Cs,Rs,Os,xs,Ts,Is={};function Ms(){return uo||(uo=1,Is.isClean=Symbol("isClean"),Is.my=Symbol("my")),Is}function As(){var s,e;return ho||(s={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(ho=1)},e=k(function e(t){b(this,e),this.builder=t},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";void 0!==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 s=0;s<i;s++)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={}),void 0!==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=s[n]),o.rawCache[n]=r)):s[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&void 0!==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(void 0!==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(void 0!==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)&&void 0!==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(void 0!==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&&void 0!==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],e=e.raws[t];return e&&e.value===n?e.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)}}]),(co=e).default=e),co}function Ps(){var n;return po||(po=1,n=As(),(fo=e).default=e),fo;function e(e,t){new n(t).stringify(e)}}function Ls(){var s,a,i,n,r,e;return vo||(vo=1,e=Ms(),s=e.isClean,a=e.my,i=lo(),n=As(),r=Ps(),e=k(function e(){var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};for(t in b(this,e),this.raws={},this[s]=!1,this[a]=!0,n)if("nodes"===t){this.nodes=[];var r,i=Me(n[t]);try{for(i.s();!(r=i.n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}catch(e){i.e(e)}finally{i.f()}}else this[t]=n[t]},[{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&&void 0!==arguments[0]?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&&void 0!==arguments[0]?arguments[0]:{},n=function t(e,n){var r,i,o,s=new e.constructor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r&&(o=_(i=e[r]),"parent"===r&&"object"===o?n&&(s[r]=n):"source"===r?s[r]=i:Array.isArray(i)?s[r]=i.map(function(e){return t(e,s)}):("object"===o&&null!==i&&(i=t(i)),s[r]=i));return s}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]?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[s]){this[s]=!1;for(var e=this;e=e.parent;)e[s]=!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,s=r;o<s.length;o++){var a=s[o];a===this?t=!0:t?(this.parent.insertAfter(e,a),e=a):this.parent.insertBefore(e,a)}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={},s=null==t,a=(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"===_(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===_(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=a,t.set(r.input,a),a++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return s&&(o.inputs=Qr(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&&void 0!==arguments[0]?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}}]),(mo=e).default=e),mo}function Ds(){var e;return yo||(yo=1,qr(t,Ls()),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(go=e).default=e),go;function t(e){return b(this,t),(e=Br(this,t,[e=e&&void 0!==e.value&&"string"!=typeof e.value?Ae(Ae({},e),{},{value:String(e.value)}):e])).type="decl",e}}function Ns(){var r,i,t,n,o,s,e;return _o||(_o=1,r=y.SourceMapConsumer,i=y.SourceMapGenerator,t=y.existsSync,n=y.readFileSync,o=y.dirname,s=y.join,e=k(function e(t,n){b(this,e),!1!==n.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=n.map?n.map.prev:void 0,t=this.loadMap(n.from,t),!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=o(this.mapFile)),t)&&(this.text=t)},[{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"===_(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=s(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){t=this.loadFile(n);if(t)return t;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)}}]),(ko=e).default=e),ko}function Fs(){var e,s,l,a,r,i,t,u,o,c,d,h,n;return Eo||(Eo=1,n=y.SourceMapConsumer,e=y.SourceMapGenerator,s=y.fileURLToPath,l=y.pathToFileURL,a=y.isAbsolute,r=y.resolve,i=(bo?wo:(bo=1,wo={nanoid:function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,t=y,u=lo(),o=Ns(),c=Symbol("fromOffsetCache"),d=Boolean(n&&e),h=Boolean(r&&a),n=k(function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),null==t||"object"===_(t)&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!h||/^\w+:\/\//.test(n.from)||a(n.from)?this.file=n.from:this.file=r(n.from)),h&&d&&(t=new o(this.css,n)).text&&(n=(this.map=t).consumer().file,!this.file)&&n&&(this.file=this.mapResolve(n)),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,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=(t&&"object"===_(t)?(a=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof a.offset?(r=(o=this.fromOffset(a.offset)).line,o.col):(r=a.line,a.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=a?new u(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new u(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,s.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(l&&(o.input.url=l(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 s=0;if(e>=n[n.length-1])s=n.length-1;else for(var a,l=n.length-2;s<l;)if(e<n[a=s+(l-s>>1)])l=a-1;else{if(!(e>=n[a+1])){s=a;break}s=a+1}return{col:e-n[s]+1,line:s+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=a(t.source)?l(t.source):new URL(t.source,this.map.consumer().sourceRoot||l(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(!s)throw new Error("file: protocol is not available in this PostCSS build");r.file=s(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}}]),(So=n).default=n,t&&t.registerInput&&t.registerInput(n)),So}function Us(){if(Ro)return Co;Ro=1;var s=y.SourceMapConsumer,t=y.SourceMapGenerator,a=y.dirname,n=y.relative,r=y.resolve,i=y.sep,o=y.pathToFileURL,l=Fs(),e=Boolean(s&&t),u=Boolean(a&&r&&n&&i);return Co=k(function e(t,n,r,i){b(this,e),this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,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||a(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new s(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(e){t.e(e)}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(),u&&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,s=1,a={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&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=r.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),r.map.addMapping(a)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=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?(a.source=r.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),r.map.addMapping(a))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return void 0!==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 void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return void 0!==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?a(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=a(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 l(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 zs(){var e;return xo||(xo=1,qr(t,Ls()),e=k(t),(Oo=e).default=e),Oo;function t(e){return b(this,t),(e=Br(this,t,[e])).type="comment",e}}function Bs(){var u,c,d,t,e,h,f,p,m,n;return Io||(Io=1,e=Ms(),h=e.isClean,f=e.my,p=Ds(),m=zs(),qr(v,Ls()),(n=k(v,[{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,s=i[r],a=Me(this.normalize(s,this.last));try{for(a.s();!(o=a.n()).done;){var l=o.value;this.proxyOf.nodes.push(l)}}catch(e){a.e(e)}finally{a.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(Yr(v,"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(e){n.e(e)}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,Qr(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),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),a=Me(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o+1,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),a=Me(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(u(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(e){i.e(e)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var s,a=Me(e=e.nodes.slice(0));try{for(a.s();!(s=a.n()).done;){var l=s.value;l.parent&&l.parent.removeChild(l,"ignore")}}catch(e){a.e(e)}finally{a.f()}}else if(e.type)e=[e];else if(e.prop){if(void 0===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[f]||v.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function e(t){if(t[h]=!1,t.proxyOf.nodes){var n,r=Me(t.proxyOf.nodes);try{for(r.s();!(n=r.n()).done;)e(n.value)}catch(e){r.e(e)}finally{r.f()}}}(e),void 0===e.raws.before&&t&&void 0!==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,s,a=r.value,l=this.normalize(a,this.first,"prepend").reverse(),u=Me(l);try{for(u.s();!(o=u.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(e){u.e(e)}finally{u.f()}for(s in this.indexes)this.indexes[s]=this.indexes[s]+l.length}}catch(e){i.e(e)}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(e){t.e(e)}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(t,e){var n;try{n=r(t,e)}catch(e){throw t.addToError(e)}return n=!1!==n&&t.walk?t.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){u=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((To=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[f]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),To;function v(){return b(this,v),Br(this,v,arguments)}}function js(){var t,n,e;return Ao||(Ao=1,qr(r,Bs()),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(Mo=e).default=e),Mo;function r(e){return b(this,r),(e=Br(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Ws(){if(Lo)return Po;Lo=1;var t={};return Po=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Hs(){var e;return No||(No=1,e=k(function e(t){var n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};for(n in b(this,e),this.type="warning",this.text=t,r.node&&r.node.source&&(t=r.node.rangeBy(r),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),r)this[n]=r[n]},[{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}}]),(Do=e).default=e),Do}function qs(){var n,e;return Uo||(Uo=1,n=Hs(),e=k(function e(t,n,r){b(this,e),this.processor=t,this.messages=[],this.root=n,this.opts=r,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&&void 0!==arguments[1]?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}}]),(Fo=e).default=e),Fo}function Vs(){var e,t;return Wo||(Wo=1,qr(r,e=Bs()),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 Yr(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 Yr(r,"prepend",this,3)(t)}}]),(jo=t).default=t,e.registerAtRule(t)),jo;function r(e){return b(this,r),(e=Br(this,r,[e])).type="atrule",e}}function Gs(){var t,n,e,r;return qo||(qo=1,qr(s,e=Bs()),(r=k(s,[{key:"normalize",value:function(e,t,n){var r=Yr(s,"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 i,o=Me(r);try{for(o.s();!(i=o.n()).done;)i.value.raws.before=t.raws.before}catch(e){o.e(e)}finally{o.f()}}return r}},{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),Yr(s,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},Ho=r,e.registerRoot(r.default=r)),Ho;function s(e){return b(this,s),(e=Br(this,s,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Zs(){var t;return Go||(Go=1,(Vo=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="",s=!1,a=0,l=!1,u="",c=!1,d=Me(e);try{for(d.s();!(r=d.n()).done;){var h=r.value;c?c=!1:"\\"===h?c=!0:l?h===u&&(l=!1):'"'===h||"'"===h?(l=!0,u=h):"("===h?a+=1:")"===h?0<a&&--a:0===a&&t.includes(h)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=h}}catch(e){d.e(e)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}}).default=t),Vo}function Js(){var e,t,n;return Jo||(Jo=1,e=Bs(),t=Zs(),qr(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)}}]),(Zo=n).default=n,e.registerRule(n)),Zo;function r(e){return b(this,r),(e=Br(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function Ks(){if($o)return Ko;$o=1;var p=Ds(),e=(()=>{if(Bo)return zo;Bo=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,z=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,B=/.[\r\n"'(/\\]/,j=/[\da-f]/i;return zo=function(t){var r,i,o,s,a,l,u,c,d,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),f=e.ignoreErrors,p=h.length,m=0,v=[],g=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){g.push(e)},endOfFile:function(){return 0===g.length&&p<=m},nextToken:function(e){if(g.length)return g.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(m)){case S:case E:case R:case O:case C:for(i=m;i+=1,(r=h.charCodeAt(i))===E||r===S||r===R||r===O||r===C;);d=["space",h.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(u=v.length?v.pop()[1]:"",c=h.charCodeAt(m+1),"url"===u&&c!==w&&c!==b&&c!==E&&c!==S&&c!==R&&c!==C&&c!==O){i=m;do{if(a=!1,-1===(i=h.indexOf(")",i+1))){if(f||t){i=m;break}y("bracket")}for(l=i;h.charCodeAt(l-1)===k;)--l,a=!a}while(a);d=["brackets",h.slice(m,i+1),m,i],m=i}else i=h.indexOf(")",m+1),u=h.slice(m,i+1),-1===i||B.test(u)?d=["(","(",m]:(d=["brackets",u,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(a=!1,-1===(i=h.indexOf(o,i+1))){if(f||t){i=m+1;break}y("string")}for(l=i;h.charCodeAt(l-1)===k;)--l,a=!a}while(a);d=["string",h.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(h),i=0===U.lastIndex?h.length-1:U.lastIndex-2,d=["at-word",h.slice(m,i+1),m,i],m=i;break;case k:for(i=m,s=!0;h.charCodeAt(i+1)===k;)i+=1,s=!s;if(r=h.charCodeAt(i+1),s&&r!==_&&r!==E&&r!==S&&r!==R&&r!==O&&r!==C&&(i+=1,j.test(h.charAt(i)))){for(;j.test(h.charAt(i+1));)i+=1;h.charCodeAt(i+1)===E&&(i+=1)}d=["word",h.slice(m,i+1),m,i],m=i;break;default:m=(r===_&&h.charCodeAt(m+1)===D?(0===(i=h.indexOf("*/",m+2)+1)&&(f||t?i=h.length:y("comment")),d=["comment",h.slice(m,i+1),m,i]):(z.lastIndex=m+1,z.test(h),i=0===z.lastIndex?h.length-1:z.lastIndex-2,d=["word",h.slice(m,i+1),m,i],v.push(d)),i)}return m++,d}},position:function(){return m}}}})(),n=zs(),u=Vs(),r=Gs(),i=Js(),h={empty:!0,space:!0};return Ko=k(function e(t){b(this,e),this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new u;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.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=""),s&&(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,s=Me(e.entries());try{for(s.s();!(i=s.n()).done;){var a=Pe(i.value,2),l=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}}catch(e){s.e(e)}finally{s.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]||(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 s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;0<=l;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(n.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",h=l;0<h;h--){var f=c[h][0];if(0===d.trim().indexOf("!")&&"space"!==f)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+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.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 i;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=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(t=l[0],a.push(l),"("===t||"["===t)i=i||l,o.push("("===t?")":"]");else if(s&&r&&"{"===t)i=i||l,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(a,s);break}if("{"===t)return void this.rule(a);if("}"===t){this.tokenizer.back(a.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{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,s,a,l=n.length,u="",c=!0,d=0;d<l;d+=1)"space"===(s=(i=n[d])[0])&&d===l-1&&!r||"comment"===s&&(s=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",h[s]||h[o]||","===u.slice(-1))?c=!1:u+=i[1];c||(a=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:a,value:u}),e[t]=u}},{key:"rule",value:function(e){e.pop();var t=new i;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 $s(){var e,r,i;return Yo||(Yo=1,e=Bs(),r=Ks(),i=Fs(),Xo=t,e.registerParse(t.default=t)),Xo;function t(e,t){var n=new i(e,t),n=new r(n);try{n.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return n.root}}function Xs(){var d,a,n,r,l,e,i,u,c,t,o,h,f,p,s,m;return es||(es=1,e=Ms(),d=e.isClean,a=e.my,n=Us(),r=Ps(),l=Bs(),e=js(),i=Ws(),u=qs(),c=$s(),t=Gs(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},p={},(s=k(function e(t,n,r){var i,o=this;if(b(this,e),this.stringified=!1,this.processed=!1,"object"!==_(n)||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof u)i=w(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var s=c;r.syntax&&(s=r.syntax.parse),(s=r.parser?r.parser:s).parse&&(s=s.parse);try{i=s(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[a]&&l.rebuild(i)}else i=w(n);this.result=new u(t,i,r),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===_(e)&&e.prepare?Ae(Ae({},e),e.prepare(o.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,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[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=a.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};function e(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])}var t,n=Me(this.plugins);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("object"===_(i))for(var o in i){if(!h[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(!f[o])if("object"===_(i[o]))for(var s in i[o])e(i,"*"===s?o:o+"-"+s.toLowerCase(),i[o][s]);else"function"==typeof i[o]&&e(i,o,i[o])}}}catch(r){n.e(r)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=zr(Jr().m(function e(){var t,i,n,r,o,s,a,l,u,c=this;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(a=this.plugins[t],v(a=this.runOnRoot(a)))return e.p=2,e.n=3,a;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,a=e.v,this.handleError(a);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(v(l=this.visitTick(n)))return e.p=9,e.n=10,l;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,l=e.v,u=n[n.length-1].node,this.handleError(l,u);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,s=Jr().m(function e(){var t,n,r;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Pe(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)}},e,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d($r(s()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,u=e.v,r.e(u);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.Once?"document"===this.result.root.type?v((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(t){throw this.handleError(t)}}},{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(v(this.runOnRoot(n)))throw this.getAsyncError()}}catch(e){t.e(e)}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 s=i.value;this.visitSync(this.listeners.OnceExit,s)}}catch(e){o.e(e)}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=Pe(n.value,2),o=i[0],s=i[1],a=(this.result.lastPlugin=o,void 0);try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(v(a))throw this.getAsyncError()}}catch(e){r.e(e)}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=Pe(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(e){throw this.handleError(e,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[d])return s[d]=!0,void e.push(y(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Me(g(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(e){r.e(e)}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},Qo=s,t.registerLazyResult(s.default=s),e.registerLazyResult(s)),Qo;function v(e){return"object"===_(e)&&"function"==typeof e.then}function g(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"]:g(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function Ys(e,t){if(Array.isArray(e))return e.map(function(e){return Ys(e)});var n,r=e.inputs,i=Zr(e,ii);if(r){t=[];var o,s=Me(r);try{for(s.s();!(o=s.n()).done;){var a=Ae(Ae({},o.value),{},{__proto__:gs.prototype});a.map&&(a.map=Ae(Ae({},a.map),{},{__proto__:ps.prototype})),t.push(a)}}catch(e){s.e(e)}finally{s.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return Ys(e,t)})),i.source&&(n=(r=i.source).inputId,r=Zr(r,oi),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new ys(i);if("decl"===i.type)return new fs(i);if("rule"===i.type)return new ws(i);if("comment"===i.type)return new ms(i);if("atrule"===i.type)return new vs(i);throw new Error("Unknown node type: "+e.type)}function o(){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)}function Qs(e,t,n){e=e,t="symbol"!==_(t)?t+"":t,n=n,t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}S||(S=1,i=lo(),is=Ds(),S=Xs(),il=Bs(),E||(E=1,a||(a=1,Es=Us(),Cs=Ps(),Rs=Ws(),Os=$s(),xs=qs(),Ts=k(function e(t,n,r){b(this,e),n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;var t=Cs,i=(this.result=new xs(this._processor,void 0,this._opts),this.result.css=n,this),r=(Object.defineProperty(this.result,"root",{get:function(){return i.root}}),new Es(t,void 0,this._opts,n));r.isMap()?(n=(t=Pe(r.generate(),2))[0],t=t[1],n&&(this.result.css=n),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.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||Rs("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=Os;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(ts=Ts).default=Ts),bs=ts,ks=Xs(),Ts=js(),_s=Gs(),Ss=k(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];b(this,e),this.version="8.4.38",this.plugins=this.normalize(t)},[{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"===_(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===_(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==_(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(e){r.e(e)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?ks:bs)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(ns=Ss).default=Ss,_s.registerProcessor(Ss),Ts.registerProcessor(Ss)),os=ns,_s=Ps(),h||(h=1,fs=Ds(),ps=Ns(),ms=zs(),vs=Vs(),gs=Fs(),ys=Gs(),ws=Js(),(rs=Ys).default=Ys),Ss=rs,ss=js(),E=Hs(),as=zs(),ls=Vs(),a=qs(),h=Fs(),us=$s(),cs=Zs(),ds=Js(),hs=Gs(),cl=Ls(),o.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 o([i(n)]).process(e,t)},i},o.stringify=_s,o.parse=us,o.fromJSON=Ss,o.list=cs,o.comment=function(e){return new as(e)},o.atRule=function(e){return new ls(e)},o.decl=function(e){return new is(e)},o.rule=function(e){return new ds(e)},o.root=function(e){return new hs(e)},o.document=function(e){return new ss(e)},o.CssSyntaxError=i,o.Declaration=is,o.Container=il,o.Processor=os,o.Document=ss,o.Comment=as,o.Warning=E,o.AtRule=ls,o.Result=a,o.Input=h,o.Rule=ds,o.Root=hs,o.Node=cl,S.registerPostcss(o),(us=o).default=o),(i=(cs=us)&&cs.__esModule&&Object.prototype.hasOwnProperty.call(cs,"default")?cs.default:cs).stringify;var ea=Object.defineProperty;Date.now().toString();var ta,na,ra,ia,oa,sa,aa={exports:{}},w=(ia=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))).__esModule?ia:("function"==typeof(oa=ia.default)?(sa=function e(){return this instanceof e?Reflect.construct(oa,arguments,this.constructor):oa.apply(this,arguments)}).prototype=oa.prototype:sa={},Object.defineProperty(sa,"__esModule",{value:!0}),Object.keys(ia).forEach(function(e){var t=Object.getOwnPropertyDescriptor(ia,e);Object.defineProperty(sa,e,t.get?t:{enumerable:!0,get:function(){return ia[e]}})}),sa);function la(){var d,h,e,t;return ra||(ra=1,ta||(ta=1,e=String,aa.exports=(t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}})(),aa.exports.createColors=t),d=aa.exports,h=w,qr(a,ni(Error)),t=k(a,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>",void 0!==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,s,a,t=(t=h&&e?h(t):t).split(/\r?\n/),l=Math.max(this.line-3,0),u=Math.min(this.line+2,t.length),c=String(u).length;return e?(e=d.createColors(!0),n=e.bold,i=e.gray,o=e.red,s=function(e){return n(o(e))},a=function(e){return i(e)}):s=a=function(e){return e},t.slice(l,u).map(function(e,t){var t=l+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=a(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),s(">")+a(n)+e+"\n "+t+s("^")):" "+a(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(na=t).default=t),na;function a(e,t,n,r,i,o){var s;return b(this,a),(s=Br(this,a,[e])).name="CssSyntaxError",s.reason=e,i&&(s.file=i),r&&(s.source=r),o&&(s.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(s.line=t,s.column=n):(s.line=t.line,s.column=t.column,s.endLine=n.line,s.endColumn=n.column)),s.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(s,a),s}}var ua,ca,da,ha,fa,pa,ma,va,ga,ya,wa,ba,ka,_a,Sa,Ea,Ca,Ra,Oa,xa,Ta,Ia,Ma,Aa,Pa,La,Da,Na,Fa,Ua,za,Ba,ja,Wa,Ha,qa,Va,Ga,Za,Ja,Ka,$a,Xa,Ya,Qa,el,tl,nl,rl,il,ol,sl,al,ll,ul,cl,dl,hl,fl,pl,ml,vl,gl,yl,wl,bl,kl,_l,Sl,El,Cl,Rl,Ol,xl,Tl,Il={};function Ml(){return ua||(ua=1,Il.isClean=Symbol("isClean"),Il.my=Symbol("my")),Il}function Al(){var s,e;return da||(s={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(da=1)},e=k(function e(t){b(this,e),this.builder=t},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";void 0!==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 s=0;s<i;s++)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={}),void 0!==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=s[n]),o.rawCache[n]=r)):s[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&void 0!==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(void 0!==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(void 0!==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)&&void 0!==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(void 0!==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&&void 0!==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],e=e.raws[t];return e&&e.value===n?e.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)}}]),(ca=e).default=e),ca}function Pl(){var n;return fa||(fa=1,n=Al(),(ha=e).default=e),ha;function e(e,t){new n(t).stringify(e)}}function Ll(){var s,a,i,n,r,e;return ma||(ma=1,e=Ml(),s=e.isClean,a=e.my,i=la(),n=Al(),r=Pl(),e=k(function e(){var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};for(t in b(this,e),this.raws={},this[s]=!1,this[a]=!0,n)if("nodes"===t){this.nodes=[];var r,i=Me(n[t]);try{for(i.s();!(r=i.n()).done;){var o=r.value;"function"==typeof o.clone?this.append(o.clone()):this.append(o)}}catch(e){i.e(e)}finally{i.f()}}else this[t]=n[t]},[{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&&void 0!==arguments[0]?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&&void 0!==arguments[0]?arguments[0]:{},n=function t(e,n){var r,i,o,s=new e.constructor;for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r&&(o=_(i=e[r]),"parent"===r&&"object"===o?n&&(s[r]=n):"source"===r?s[r]=i:Array.isArray(i)?s[r]=i.map(function(e){return t(e,s)}):("object"===o&&null!==i&&(i=t(i)),s[r]=i));return s}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=this.clone(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&void 0!==arguments[1]?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[s]){this[s]=!1;for(var e=this;e=e.parent;)e[s]=!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,s=r;o<s.length;o++){var a=s[o];a===this?t=!0:t?(this.parent.insertAfter(e,a),e=a):this.parent.insertBefore(e,a)}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={},s=null==t,a=(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"===_(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===_(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=a,t.set(r.input,a),a++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return s&&(o.inputs=Qr(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&&void 0!==arguments[0]?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}}]),(pa=e).default=e),pa}function Dl(){var e;return ga||(ga=1,qr(t,Ll()),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(va=e).default=e),va;function t(e){return b(this,t),(e=Br(this,t,[e=e&&void 0!==e.value&&"string"!=typeof e.value?Ae(Ae({},e),{},{value:String(e.value)}):e])).type="decl",e}}function Nl(){var r,i,t,n,o,s,e;return ka||(ka=1,r=w.SourceMapConsumer,i=w.SourceMapGenerator,t=w.existsSync,n=w.readFileSync,o=w.dirname,s=w.join,e=k(function e(t,n){b(this,e),!1!==n.map&&(this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:"),t=n.map?n.map.prev:void 0,t=this.loadMap(n.from,t),!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=o(this.mapFile)),t)&&(this.text=t)},[{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"===_(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=s(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){t=this.loadFile(n);if(t)return t;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)}}]),(ba=e).default=e),ba}function Fl(){var e,s,l,a,r,i,t,u,o,c,d,h,n;return Sa||(Sa=1,n=w.SourceMapConsumer,e=w.SourceMapGenerator,s=w.fileURLToPath,l=w.pathToFileURL,a=w.isAbsolute,r=w.resolve,i=(wa?ya:(wa=1,ya={nanoid:function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,t=w,u=la(),o=Nl(),c=Symbol("fromOffsetCache"),d=Boolean(n&&e),h=Boolean(r&&a),n=k(function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),null==t||"object"===_(t)&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!h||/^\w+:\/\//.test(n.from)||a(n.from)?this.file=n.from:this.file=r(n.from)),h&&d&&(t=new o(this.css,n)).text&&(n=(this.map=t).consumer().file,!this.file)&&n&&(this.file=this.mapResolve(n)),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,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},a=(t&&"object"===_(t)?(a=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof a.offset?(r=(o=this.fromOffset(a.offset)).line,o.col):(r=a.line,a.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=a?new u(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new u(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,s.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(l&&(o.input.url=l(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 s=0;if(e>=n[n.length-1])s=n.length-1;else for(var a,l=n.length-2;s<l;)if(e<n[a=s+(l-s>>1)])l=a-1;else{if(!(e>=n[a+1])){s=a;break}s=a+1}return{col:e-n[s]+1,line:s+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=a(t.source)?l(t.source):new URL(t.source,this.map.consumer().sourceRoot||l(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(!s)throw new Error("file: protocol is not available in this PostCSS build");r.file=s(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}}]),(_a=n).default=n,t&&t.registerInput&&t.registerInput(n)),_a}function Ul(){if(Ca)return Ea;Ca=1;var s=w.SourceMapConsumer,t=w.SourceMapGenerator,a=w.dirname,n=w.relative,r=w.resolve,i=w.sep,o=w.pathToFileURL,l=Fl(),e=Boolean(s&&t),u=Boolean(a&&r&&n&&i);return Ea=k(function e(t,n,r,i){b(this,e),this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=i,this.originalCSS=i,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||a(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new s(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(e){t.e(e)}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(),u&&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,s=1,a={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&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=r.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),r.map.addMapping(a)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=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?(a.source=r.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),r.map.addMapping(a))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return void 0!==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 void 0!==this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return void 0!==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?a(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=a(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 l(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 zl(){var e;return Oa||(Oa=1,qr(t,Ll()),e=k(t),(Ra=e).default=e),Ra;function t(e){return b(this,t),(e=Br(this,t,[e])).type="comment",e}}function Bl(){var u,c,d,t,e,h,f,p,m,n;return Ta||(Ta=1,e=Ml(),h=e.isClean,f=e.my,p=Dl(),m=zl(),qr(v,Ll()),(n=k(v,[{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,s=i[r],a=Me(this.normalize(s,this.last));try{for(a.s();!(o=a.n()).done;){var l=o.value;this.proxyOf.nodes.push(l)}}catch(e){a.e(e)}finally{a.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(Yr(v,"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(e){n.e(e)}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,Qr(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),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),a=Me(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o+1,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),a=Me(s);try{for(a.s();!(n=a.n()).done;){var l=n.value;this.proxyOf.nodes.splice(o,0,l)}}catch(e){a.e(e)}finally{a.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+s.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function t(e){return e.map(function(e){return e.nodes&&(e.nodes=t(e.nodes)),delete e.source,e})}(u(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(e){i.e(e)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var s,a=Me(e=e.nodes.slice(0));try{for(a.s();!(s=a.n()).done;){var l=s.value;l.parent&&l.parent.removeChild(l,"ignore")}}catch(e){a.e(e)}finally{a.f()}}else if(e.type)e=[e];else if(e.prop){if(void 0===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[f]||v.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[h]&&function e(t){if(t[h]=!1,t.proxyOf.nodes){var n,r=Me(t.proxyOf.nodes);try{for(r.s();!(n=r.n()).done;)e(n.value)}catch(e){r.e(e)}finally{r.f()}}}(e),void 0===e.raws.before&&t&&void 0!==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,s,a=r.value,l=this.normalize(a,this.first,"prepend").reverse(),u=Me(l);try{for(u.s();!(o=u.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(e){u.e(e)}finally{u.f()}for(s in this.indexes)this.indexes[s]=this.indexes[s]+l.length}}catch(e){i.e(e)}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(e){t.e(e)}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(t,e){var n;try{n=r(t,e)}catch(e){throw t.addToError(e)}return n=!1!==n&&t.walk?t.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){u=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){d=e},n.registerRoot=function(e){t=e},((xa=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[f]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),xa;function v(){return b(this,v),Br(this,v,arguments)}}function jl(){var t,n,e;return Ma||(Ma=1,qr(r,Bl()),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(Ia=e).default=e),Ia;function r(e){return b(this,r),(e=Br(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function Wl(){if(Pa)return Aa;Pa=1;var t={};return Aa=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Hl(){var e;return Da||(Da=1,e=k(function e(t){var n,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};for(n in b(this,e),this.type="warning",this.text=t,r.node&&r.node.source&&(t=r.node.rangeBy(r),this.line=t.start.line,this.column=t.start.column,this.endLine=t.end.line,this.endColumn=t.end.column),r)this[n]=r[n]},[{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}}]),(La=e).default=e),La}function ql(){var n,e;return Fa||(Fa=1,n=Hl(),e=k(function e(t,n,r){b(this,e),this.processor=t,this.messages=[],this.root=n,this.opts=r,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&&void 0!==arguments[1]?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}}]),(Na=e).default=e),Na}function Vl(){var e,t;return ja||(ja=1,qr(r,e=Bl()),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 Yr(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 Yr(r,"prepend",this,3)(t)}}]),(Ba=t).default=t,e.registerAtRule(t)),Ba;function r(e){return b(this,r),(e=Br(this,r,[e])).type="atrule",e}}function Gl(){var t,n,e,r;return Ha||(Ha=1,qr(s,e=Bl()),(r=k(s,[{key:"normalize",value:function(e,t,n){var r=Yr(s,"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 i,o=Me(r);try{for(o.s();!(i=o.n()).done;)i.value.raws.before=t.raws.before}catch(e){o.e(e)}finally{o.f()}}return r}},{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),Yr(s,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},Wa=r,e.registerRoot(r.default=r)),Wa;function s(e){return b(this,s),(e=Br(this,s,[e])).type="root",e.nodes||(e.nodes=[]),e}}function Zl(){var t;return Va||(Va=1,(qa=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="",s=!1,a=0,l=!1,u="",c=!1,d=Me(e);try{for(d.s();!(r=d.n()).done;){var h=r.value;c?c=!1:"\\"===h?c=!0:l?h===u&&(l=!1):'"'===h||"'"===h?(l=!0,u=h):"("===h?a+=1:")"===h?0<a&&--a:0===a&&t.includes(h)&&(s=!0),s?(""!==o&&i.push(o.trim()),o="",s=!1):o+=h}}catch(e){d.e(e)}finally{d.f()}return!n&&""===o||i.push(o.trim()),i}}).default=t),qa}function Jl(){var e,t,n;return Za||(Za=1,e=Bl(),t=Zl(),qr(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)}}]),(Ga=n).default=n,e.registerRule(n)),Ga;function r(e){return b(this,r),(e=Br(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function Kl(){if(Ka)return Ja;Ka=1;var p=Dl(),e=(()=>{if(za)return Ua;za=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,z=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,B=/.[\r\n"'(/\\]/,j=/[\da-f]/i;return Ua=function(t){var r,i,o,s,a,l,u,c,d,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=t.css.valueOf(),f=e.ignoreErrors,p=h.length,m=0,v=[],g=[];function y(e){throw t.error("Unclosed "+e,m)}return{back:function(e){g.push(e)},endOfFile:function(){return 0===g.length&&p<=m},nextToken:function(e){if(g.length)return g.pop();if(!(p<=m)){var t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(m)){case S:case E:case R:case O:case C:for(i=m;i+=1,(r=h.charCodeAt(i))===E||r===S||r===R||r===O||r===C;);d=["space",h.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(u=v.length?v.pop()[1]:"",c=h.charCodeAt(m+1),"url"===u&&c!==w&&c!==b&&c!==E&&c!==S&&c!==R&&c!==C&&c!==O){i=m;do{if(a=!1,-1===(i=h.indexOf(")",i+1))){if(f||t){i=m;break}y("bracket")}for(l=i;h.charCodeAt(l-1)===k;)--l,a=!a}while(a);d=["brackets",h.slice(m,i+1),m,i],m=i}else i=h.indexOf(")",m+1),u=h.slice(m,i+1),-1===i||B.test(u)?d=["(","(",m]:(d=["brackets",u,m,i],m=i);break;case w:case b:o=r===w?"'":'"',i=m;do{if(a=!1,-1===(i=h.indexOf(o,i+1))){if(f||t){i=m+1;break}y("string")}for(l=i;h.charCodeAt(l-1)===k;)--l,a=!a}while(a);d=["string",h.slice(m,i+1),m,i],m=i;break;case F:U.lastIndex=m+1,U.test(h),i=0===U.lastIndex?h.length-1:U.lastIndex-2,d=["at-word",h.slice(m,i+1),m,i],m=i;break;case k:for(i=m,s=!0;h.charCodeAt(i+1)===k;)i+=1,s=!s;if(r=h.charCodeAt(i+1),s&&r!==_&&r!==E&&r!==S&&r!==R&&r!==O&&r!==C&&(i+=1,j.test(h.charAt(i)))){for(;j.test(h.charAt(i+1));)i+=1;h.charCodeAt(i+1)===E&&(i+=1)}d=["word",h.slice(m,i+1),m,i],m=i;break;default:m=(r===_&&h.charCodeAt(m+1)===D?(0===(i=h.indexOf("*/",m+2)+1)&&(f||t?i=h.length:y("comment")),d=["comment",h.slice(m,i+1),m,i]):(z.lastIndex=m+1,z.test(h),i=0===z.lastIndex?h.length-1:z.lastIndex-2,d=["word",h.slice(m,i+1),m,i],v.push(d)),i)}return m++,d}},position:function(){return m}}}})(),n=zl(),u=Vl(),r=Gl(),i=Jl(),h={empty:!0,space:!0};return Ja=k(function e(t){b(this,e),this.input=t,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new u;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,s=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(n=a[r=a.length-1];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.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=""),s&&(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,s=Me(e.entries());try{for(s.s();!(i=s.n()).done;){var a=Pe(i.value,2),l=a[0];if("("===(n=(t=a[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}}catch(e){s.e(e)}finally{s.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]||(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 s,a=[];e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;0<=l;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(n.raws.important=u);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),d="",h=l;0<h;h--){var f=c[h][0];if(0===d.trim().indexOf("!")&&"space"!==f)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+=a.map(function(e){return e[1]}).join(""),a=[]),this.raw(n,"value",a.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 i;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=[],s=e[1].startsWith("--"),a=[],l=e;l;){if(t=l[0],a.push(l),"("===t||"["===t)i=i||l,o.push("("===t?")":"]");else if(s&&r&&"{"===t)i=i||l,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(a,s);break}if("{"===t)return void this.rule(a);if("}"===t){this.tokenizer.back(a.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{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,s,a,l=n.length,u="",c=!0,d=0;d<l;d+=1)"space"===(s=(i=n[d])[0])&&d===l-1&&!r||"comment"===s&&(s=n[d-1]?n[d-1][0]:"empty",o=n[d+1]?n[d+1][0]:"empty",h[s]||h[o]||","===u.slice(-1))?c=!1:u+=i[1];c||(a=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:a,value:u}),e[t]=u}},{key:"rule",value:function(e){e.pop();var t=new i;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 $l(){var e,r,i;return Xa||(Xa=1,e=Bl(),r=Kl(),i=Fl(),$a=t,e.registerParse(t.default=t)),$a;function t(e,t){var n=new i(e,t),n=new r(n);try{n.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return n.root}}function Xl(){var d,a,n,r,l,e,i,u,c,t,o,h,f,p,s,m;return Qa||(Qa=1,e=Ml(),d=e.isClean,a=e.my,n=Ul(),r=Pl(),l=Bl(),e=jl(),i=Wl(),u=ql(),c=$l(),t=Gl(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},p={},(s=k(function e(t,n,r){var i,o=this;if(b(this,e),this.stringified=!1,this.processed=!1,"object"!==_(n)||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof u)i=w(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var s=c;r.syntax&&(s=r.syntax.parse),(s=r.parser?r.parser:s).parse&&(s=s.parse);try{i=s(n,r)}catch(e){this.processed=!0,this.error=e}i&&!i[a]&&l.rebuild(i)}else i=w(n);this.result=new u(t,i,r),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===_(e)&&e.prepare?Ae(Ae({},e),e.prepare(o.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,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[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=a.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};function e(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])}var t,n=Me(this.plugins);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("object"===_(i))for(var o in i){if(!h[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(!f[o])if("object"===_(i[o]))for(var s in i[o])e(i,"*"===s?o:o+"-"+s.toLowerCase(),i[o][s]);else"function"==typeof i[o]&&e(i,o,i[o])}}}catch(r){n.e(r)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(m=zr(Jr().m(function e(){var t,i,n,r,o,s,a,l,u,c=this;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(a=this.plugins[t],v(a=this.runOnRoot(a)))return e.p=2,e.n=3,a;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,a=e.v,this.handleError(a);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(v(l=this.visitTick(n)))return e.p=9,e.n=10,l;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,l=e.v,u=n[n.length-1].node,this.handleError(l,u);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,s=Jr().m(function e(){var t,n,r;return Jr().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Pe(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)}},e,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d($r(s()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,u=e.v,r.e(u);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.Once?"document"===this.result.root.type?v((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(t){throw this.handleError(t)}}},{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(v(this.runOnRoot(n)))throw this.getAsyncError()}}catch(e){t.e(e)}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 s=i.value;this.visitSync(this.listeners.OnceExit,s)}}catch(e){o.e(e)}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=Pe(n.value,2),o=i[0],s=i[1],a=(this.result.lastPlugin=o,void 0);try{a=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(v(a))throw this.getAsyncError()}}catch(e){r.e(e)}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=Pe(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(e){throw this.handleError(e,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[d])return s[d]=!0,void e.push(y(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[d]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[d]=!0;var n,r=Me(g(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(e){r.e(e)}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},Ya=s,t.registerLazyResult(s.default=s),e.registerLazyResult(s)),Ya;function v(e){return"object"===_(e)&&"function"==typeof e.then}function g(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"]:g(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[d]=!1,e.nodes&&e.nodes.forEach(w),e}}function Yl(e,t){if(Array.isArray(e))return e.map(function(e){return Yl(e)});var n,r=e.inputs,i=Zr(e,si);if(r){t=[];var o,s=Me(r);try{for(s.s();!(o=s.n()).done;){var a=Ae(Ae({},o.value),{},{__proto__:gl.prototype});a.map&&(a.map=Ae(Ae({},a.map),{},{__proto__:pl.prototype})),t.push(a)}}catch(e){s.e(e)}finally{s.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return Yl(e,t)})),i.source&&(n=(r=i.source).inputId,r=Zr(r,ai),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new yl(i);if("decl"===i.type)return new fl(i);if("rule"===i.type)return new wl(i);if("comment"===i.type)return new ml(i);if("atrule"===i.type)return new vl(i);throw new Error("Unknown node type: "+e.type)}function s(){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 sl(t)}Od||(Od=1,il=la(),ol=Dl(),E=Xl(),a=Bl(),Uh||(Uh=1,C||(C=1,El=Ul(),Cl=Pl(),Rl=Wl(),Ol=$l(),xl=ql(),Tl=k(function e(t,n,r){b(this,e),n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;var t=Cl,i=(this.result=new xl(this._processor,void 0,this._opts),this.result.css=n,this),r=(Object.defineProperty(this.result,"root",{get:function(){return i.root}}),new El(t,void 0,this._opts,n));r.isMap()?(n=(t=Pe(r.generate(),2))[0],t=t[1],n&&(this.result.css=n),t&&(this.result.map=t)):(r.clearAnnotation(),this.result.css=r.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||Rl("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=Ol;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(el=Tl).default=Tl),bl=el,kl=Xl(),Tl=jl(),_l=Gl(),Sl=k(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];b(this,e),this.version="8.4.38",this.plugins=this.normalize(t)},[{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"===_(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===_(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==_(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(e){r.e(e)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?kl:bl)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(tl=Sl).default=Sl,_l.registerProcessor(Sl),Tl.registerProcessor(Sl)),sl=tl,_l=Pl(),Rd||(Rd=1,fl=Dl(),pl=Nl(),ml=zl(),vl=Vl(),gl=Fl(),yl=Gl(),wl=Jl(),(nl=Yl).default=Yl),Sl=nl,al=jl(),h=Hl(),ll=zl(),ul=Vl(),cl=ql(),S=Fl(),i=$l(),Od=Zl(),dl=Jl(),hl=Gl(),Uh=Ll(),s.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 sl).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return s([i(n)]).process(e,t)},i},s.stringify=_l,s.parse=i,s.fromJSON=Sl,s.list=Od,s.comment=function(e){return new ll(e)},s.atRule=function(e){return new ul(e)},s.decl=function(e){return new ol(e)},s.rule=function(e){return new dl(e)},s.root=function(e){return new hl(e)},s.document=function(e){return new al(e)},s.CssSyntaxError=il,s.Declaration=ol,s.Container=a,s.Processor=sl,s.Document=al,s.Comment=ll,s.Warning=h,s.AtRule=ul,s.Result=cl,s.Input=S,s.Rule=dl,s.Root=hl,s.Node=Uh,E.registerPostcss(s),(rl=s).default=s),(Rd=(C=rl)&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C).stringify;var Ql=k(iu,[{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 iu&&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"}}]),eu={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},nu={},ru={};function iu(){b(this,iu),Qs(this,"parentElement",null),Qs(this,"parentNode",null),Qs(this,"ownerDocument"),Qs(this,"firstChild",null),Qs(this,"lastChild",null),Qs(this,"previousSibling",null),Qs(this,"nextSibling",null),Qs(this,"ELEMENT_NODE",1),Qs(this,"TEXT_NODE",3),Qs(this,"nodeType"),Qs(this,"nodeName"),Qs(this,"RRNodeType")}function ou(e){if(nu[e])return nu[e];var t=globalThis[e],n=t.prototype,r=e in eu?eu[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 tu?tu[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 nu[e]=t.prototype,t.prototype;try{var o,s,a=document.createElement("iframe"),l=(a.style.display="none",document.body.appendChild(a),a.contentWindow);return l?(o=l[e].prototype)?((s=navigator.userAgent).includes("Safari")&&!s.includes("Chrome")?(a.classList.add("rr-block"),a.setAttribute("__rrwebUntaintedMutationObserver",""),ru[e]=function(){return a.remove()}):a.remove(),nu[e]=o):(a.remove(),n):t.prototype}catch(e){return n}}var su={};function au(e,t,n){var r="".concat(e,".").concat(String(n));return su[r]?su[r].call(t):(e=ou(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(su[r]=e).call(t):t[n])}var lu={};function uu(e,t,n){var r="".concat(e,".").concat(String(n));return lu[r]?lu[r].bind(t):"function"!=typeof(e=ou(e)[n])?t[n]:(lu[r]=e).bind(t)}function cu(){var e;return[ou("MutationObserver").constructor,null!=(e=ru.MutationObserver)?e:function(){}]}var du=Date.now;function hu(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(e){return function(){}}}var Le={ownerDocument:function(e){return au("Node",e,"ownerDocument")},childNodes:function(e){return au("Node",e,"childNodes")},parentNode:function(e){return au("Node",e,"parentNode")},parentElement:function(e){return au("Node",e,"parentElement")},textContent:function(e){return au("Node",e,"textContent")},contains:function(e,t){return uu("Node",e,"contains")(t)},getRootNode:function(e){return uu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?au("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?au("Element",e,"shadowRoot"):null},querySelector:function(e,t){return au("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return au("Element",e,"querySelectorAll")(t)},nowTimestamp:du=/[1-9][0-9]{12}/.test(Date.now().toString())?du:function(){return(new Date).getTime()},mutationObserverCtor:cu,patch:hu};function fu(e,t,n){var r=2<arguments.length&&void 0!==n?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var pu="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.",i={map:{},getId:function(){return console.error(pu),-1},getNode:function(){return console.error(pu),null},removeNodeFromMap:function(){console.error(pu)},has:function(){return console.error(pu),!1},reset:function(){console.error(pu)}};function mu(s,a,e){var l=2<arguments.length&&void 0!==e?e:{},u=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!==l.leading||(c=r),a-(r-c)),o=this;i<=0||a<i?(u&&(clearTimeout(u),u=null),c=r,s.apply(o,t)):u||!1===l.trailing||(u=setTimeout(function(){c=!1===l.leading?0:Date.now(),u=null,s.apply(o,t)},i))}}function vu(e,t,n,r,i){var i=4<arguments.length&&void 0!==i?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 vu(e,t,o||{},!0)}}function gu(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=Le.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=Le.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function yu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function wu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bu(e){return e?e.nodeType===e.ELEMENT_NODE?e:Le.parentElement(e):null}function ku(e,t,n,r){if(e){var i=bu(e);if(i){try{if("string"==typeof t){if(i.classList.contains(t))return 1;if(r&&null!==i.closest("."+t))return 1}else if($i(i,t,r))return 1}catch(e){}if(n){if(i.matches(n))return 1;if(r&&null!==i.closest(n))return 1}}}}function _u(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function Su(e){return Boolean(e.changedTouches)}function Eu(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Cu(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ru(e){return e&&(e instanceof Ql&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Le.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(i,{get:function(e,t,n){return"map"===t&&console.error(pu),Reflect.get(e,t,n)}});var Ou=k(function e(){b(this,e),c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 xu(e){var t,n=null;return n="getRootNode"in e&&(null==(t=Le.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Le.host(Le.getRootNode(e))?Le.host(Le.getRootNode(e)):n}function Tu(n){var e,t=Le.ownerDocument(n);return!!t&&(e=(()=>{for(var e,t=n;e=xu(t);)t=e;return t})(),Le.contains(t,e))}function Iu(e){var t=Le.ownerDocument(e);return t&&(Le.contains(t,e)||Tu(e))}var Y=Od={DomContentLoaded:0,0:"DomContentLoaded",Load:1,1:"Load",FullSnapshot:2,2:"FullSnapshot",IncrementalSnapshot:3,3:"IncrementalSnapshot",Meta:4,4:"Meta",Custom:5,5:"Custom",Plugin:6,6:"Plugin",Asset:7,7:"Asset"},De=((a=De||{})[a.Mutation=0]="Mutation",a[a.MouseMove=1]="MouseMove",a[a.MouseInteraction=2]="MouseInteraction",a[a.Scroll=3]="Scroll",a[a.ViewportResize=4]="ViewportResize",a[a.Input=5]="Input",a[a.TouchMove=6]="TouchMove",a[a.MediaInteraction=7]="MediaInteraction",a[a.StyleSheetRule=8]="StyleSheetRule",a[a.CanvasMutation=9]="CanvasMutation",a[a.Font=10]="Font",a[a.Log=11]="Log",a[a.Drag=12]="Drag",a[a.StyleDeclaration=13]="StyleDeclaration",a[a.Selection=14]="Selection",a[a.AdoptedStyleSheet=15]="AdoptedStyleSheet",a[a.CustomElement=16]="CustomElement",a),Mu=((h=Mu||{})[h.MouseUp=0]="MouseUp",h[h.MouseDown=1]="MouseDown",h[h.Click=2]="Click",h[h.ContextMenu=3]="ContextMenu",h[h.DblClick=4]="DblClick",h[h.Focus=5]="Focus",h[h.Blur=6]="Blur",h[h.TouchStart=7]="TouchStart",h[h.TouchMove_Departed=8]="TouchMove_Departed",h[h.TouchEnd=9]="TouchEnd",h[h.TouchCancel=10]="TouchCancel",h),Au=((S=Au||{})[S.Mouse=0]="Mouse",S[S.Pen=1]="Pen",S[S.Touch=2]="Touch",S),Pu=((Uh={})[Uh["2D"]=0]="2D",Uh[Uh.WebGL=1]="WebGL",Uh[Uh.WebGL2=2]="WebGL2",Uh),Lu=((E=Lu||{})[E.Play=0]="Play",E[E.Pause=1]="Pause",E[E.Seeked=2]="Seeked",E[E.VolumeChange=3]="VolumeChange",E[E.RateChange=4]="RateChange",E),Du=((C={})[C.Document=0]="Document",C[C.DocumentType=1]="DocumentType",C[C.Element=2]="Element",C[C.Text=3]="Text",C[C.CDATA=4]="CDATA",C[C.Comment=5]="Comment",C);function Nu(e){return"__ln"in e}function Fu(e,t){return"".concat(e,"@").concat(t)}var Uu,zu=k(function e(){b(this,e),c(this,"length",0),c(this,"head",null),c(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&&Nu(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&&Nu(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--)}}]),Bu=k(function e(){var w=this;b(this,e),c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),c(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,s=new zu,a=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=Le.parentNode(t);if(e&&Iu(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=Si(e)?w.mirror.getId(xu(t)):w.mirror.getId(e),e=a(t);if(-1===r||-1===e)return s.addNode(t);n=eo(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){Eu(e,w.mirror)&&w.iframeManager.addIframe(e),Cu(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),Ru(t)&&w.shadowDomManager.addShadowRoot(Le.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;Wu(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(Le.parentNode(r))||e(r)}}catch(i){n.e(i)}finally{n.f()}var l,u=Me(w.addedSet);try{for(u.s();!(l=u.n()).done;){var c=l.value;!Hu(w.droppedSet,c)&&!Wu(w.removesSubTreeCache,c,w.mirror)||Hu(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(i){u.e(i)}finally{u.f()}for(var d=null;s.length;){var h,f,p=null;if(!(p=d&&(h=w.mirror.getId(Le.parentNode(d.value)),f=a(d.value),-1!==h)&&-1!==f?d:p))for(var m=s.tail;m;){var v=m,m=m.previous;if(v){var g=w.mirror.getId(Le.parentNode(v.value));if(-1!==a(v.value)){if(-1!==g){p=v;break}g=v.value,g=Le.parentNode(g);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){g=Le.host(g);if(-1!==w.mirror.getId(g)){p=v;break}}}}}if(!p){for(;s.head;)s.removeNode(s.head.value);break}d=p.previous,s.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=Le.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))}}),c(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(Le.childNodes(e),function(e){return Le.textContent(e)||""}).join(""));t.attributes.value=xi({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:Ii(e),value:n,maskInputFn:w.maskInputFn})}),c(this,"processMutation",function(s){if(!_u(s.target,w.mirror,w.slimDOMOptions))switch(s.type){case"characterData":var e=Le.textContent(s.target);ku(s.target,w.blockClass,w.blockSelector,!1)||e===s.oldValue||w.texts.push({value:Xi(s.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,bu(s.target)):e.replace(/[\S]/g,"*"):e,node:s.target});break;case"attributes":var t,n=s.target,e=s.attributeName,r=s.target.getAttribute(e);if("value"===e&&(t=Ii(n),r=xi({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:r,maskInputFn:w.maskInputFn})),!ku(s.target,w.blockClass,w.blockSelector,!1)&&r!==s.oldValue){var i=w.attributeMap.get(s.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(r)){if(n.contentDocument)return;e="rr_src"}if(i||(i={node:s.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(i),w.attributeMap.set(s.target,i)),"type"===e&&"INPUT"===n.tagName&&"password"===(s.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Ki(n.tagName,e))if(i.attributes[e]=Ji(w.doc,Ti(n.tagName),Ti(e),r),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(s){w.unattachedDoc=w.doc}var o=w.unattachedDoc.createElement("span");s.oldValue&&o.setAttribute("style",s.oldValue);for(var a=0,l=Array.from(n.style);a<l.length;a++){var u=l[a],c=n.style.getPropertyValue(u),d=n.style.getPropertyPriority(u);c!==o.style.getPropertyValue(u)||d!==o.style.getPropertyPriority(u)?i.styleDiff[u]=""===d?c:[c,d]:i._unchangedStyles[u]=[c,d]}for(var h=0,f=Array.from(o.style);h<f.length;h++){var p=f[h];""===n.style.getPropertyValue(p)&&(i.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal")}break;case"childList":return ku(s.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===s.target.tagName?void w.genTextAreaValueMutation(s.target):(s.addedNodes.forEach(function(e){return w.genAdds(e,s.target)}),void s.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=Si(s.target)?w.mirror.getId(Le.host(s.target)):w.mirror.getId(s.target);if(!ku(s.target,w.blockClass,w.blockSelector,!1)&&!_u(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))ju(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(s.target)&&-1===t||function e(t,n){var r;return!Si(t)&&(r=n.getId(t),!n.has(r)||(!(r=Le.parentNode(t))||r.nodeType!==t.DOCUMENT_NODE)&&(!r||e(r,n)))}(s.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[Fu(t,n)])ju(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!Si(s.target)||!Ei(s.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),Le.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),c(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(_u(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[Fu(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet.delete(t);ku(t,w.blockClass,w.blockSelector,!1)||(Le.childNodes(t).forEach(function(e){return w.genAdds(e)}),Ru(t)&&Le.childNodes(Le.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 ju(t,e){t.delete(e),Le.childNodes(e).forEach(function(e){return ju(t,e)})}function Wu(e,t){return 0!==e.size&&(e=e,t=Le.parentNode(t))&&e.has(t)}function Hu(e,t){return 0!==e.size&&function e(t,n){n=Le.parentNode(n);return!!n&&(!!t.has(n)||e(t,n))}(e,t)}var Ne=function(e){return Uu?function(){try{return e.apply(void 0,arguments)}catch(e){if(!Uu||!0!==Uu(e))throw e}}:e},qu=[];function Vu(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(e){}return e&&e.target}function Gu(e,t){var n=new Bu,e=(qu.push(n),n.init(e),Pe(cu(),2)),r=e[0],e=e[1],r=new r(Ne(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[r,e]}function Zu(e){var t,r,s,a=e.mouseInteractionCb,i=e.doc,l=e.mirror,u=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],s=null,Object.keys(Mu).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){function t(e){var t=Vu(e);if(!ku(t,u,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=Au.Mouse;break;case"touch":n=Au.Touch;break;case"pen":n=Au.Pen}n===Au.Touch?Mu[o]===Mu.MouseDown?r="TouchStart":Mu[o]===Mu.MouseUp&&(r="TouchEnd"):Au.Pen}else Su(e)&&(n=Au.Touch);null!==n?(s=n,(r.startsWith("Touch")&&n===Au.Touch||r.startsWith("Mouse")&&n===Au.Mouse)&&(n=null)):Mu[o]===Mu.Click&&(n=s,s=null);var i,e=Su(e)?e.changedTouches[0]:e;e&&(t=l.getId(t),i=e.clientX,e=e.clientY,Ne(a)(Ae({type:Mu[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}}var o,n=Ti(e);o=e;if(window.PointerEvent)switch(Mu[e]){case Mu.MouseDown:case Mu.MouseUp:n=n.replace("mouse","pointer");break;case Mu.TouchStart:case Mu.TouchEnd:return}r.push(fu(n,t,i))}),Ne(function(){r.forEach(function(e){return e()})}))}function Ju(e){var r=e.scrollCb,i=e.doc,o=e.mirror,s=e.blockClass,a=e.blockSelector,e=e.sampling;return fu("scroll",Ne(mu(Ne(function(e){var t,n,e=Vu(e);e&&!ku(e,s,a,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=gu(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 Ku=["INPUT","TEXTAREA","SELECT"],$u=new WeakMap;function Xu(e){return function e(t,n){var r;return tc("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||tc("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||tc("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||tc("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule?(r=Array.from(t.parentRule.cssRules).indexOf(t),n.unshift(r),e(t.parentRule,n)):(t.parentStyleSheet&&(r=Array.from(t.parentStyleSheet.cssRules).indexOf(t),n.unshift(r)),n)}(e,[])}function Yu(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Qu(e,t){var n=e.mirror,r=e.stylesheetManager,i="#document"===t.nodeName?n.getId(t):n.getId(Le.host(t)),n="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(e=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:e.ShadowRoot,o=null!=n&&n.prototype?Object.getOwnPropertyDescriptor(null==n?void 0:n.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&n&&o?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:function(){var e;return null==(e=o.get)?void 0:e.call(this)},set:function(e){var t=null==(t=o.set)?void 0:t.call(this,e);if(null!==i&&-1!==i)try{r.adoptStyleSheets(e,i)}catch(e){}return t}}),Ne(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):function(){}}function ec(e){var t,n,D,N,F,U,z,B,j,W,H,q,V,G,r=e.doc.defaultView;if(!r)return function(){};t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=(R=e).mutationCb,D=R.mousemoveCb,N=R.mouseInteractionCb,F=R.scrollCb,U=R.viewportResizeCb,z=R.inputCb,B=R.mediaInteractionCb,j=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),z.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),j.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 i,Z,J,K,$,X,Y,Q,s,ee,te,ne,re,a,l,ie,u,o,c,oe,d,h,f,p,se,ae,le,ue,m,v,g,ce,y,w,b,k,_,S,E,C,de=function(){},he=(e.recordDOM&&(R=Pe(Gu(e,e.doc),2),i=R[0],de=R[1]),le=(R=e).mousemoveCb,x=R.doc,ue=R.mirror,!1===(O=R.sampling).mousemove?function(){}:(R="number"==typeof O.mousemove?O.mousemove:50,O="number"==typeof O.mousemoveCallback?O.mousemoveCallback:500,p=[],se=mu(Ne(function(e){var t=Date.now()-f;le(p.map(function(e){return e.timeOffset-=t,e}),e),p=[],f=null}),O),O=Ne(mu(Ne(function(e){var t=Vu(e),n=Su(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;f=f||du(),p.push({x:r,y:n,id:ue.getId(t),timeOffset:du()-f}),se("undefined"!=typeof DragEvent&&e instanceof DragEvent?De.Drag:e instanceof MouseEvent?De.MouseMove:De.TouchMove)}),R,{trailing:!1})),ae=[fu("mousemove",O,x),fu("touchmove",O,x),fu("drag",O,x)],Ne(function(){ae.forEach(function(e){return e()})}))),fe=Zu(e),pe=Ju(e),me=(R={win:r},oe=(O=e).viewportResizeCb,O=R.win,h=d=-1,fu("resize",Ne(mu(Ne(function(){var e=yu(),t=wu();d===e&&h===t||(oe({width:Number(t),height:Number(e)}),d=e,h=t)}),200)),O)),ve=(Q=(x=e).inputCb,s=x.doc,ee=x.mirror,te=x.blockClass,ne=x.blockSelector,re=x.ignoreClass,a=x.ignoreSelector,l=x.maskInputOptions,ie=x.maskInputFn,u=x.userTriggeredOnInput,o=("last"===x.sampling.input?["change"]:["input","change"]).map(function(e){return fu(e,Ne(_e),s)}),(c=s.defaultView)?(x=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),R=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]],x&&x.set&&o.push.apply(o,Qr(R.map(function(e){return vu(e[0],e[1],{set:function(){Ne(_e)({target:this,isTrusted:!1})}},!1,c)}))),Ne(function(){o.forEach(function(e){return e()})})):function(){o.forEach(function(e){return e()})}),ge=(Z=(O=e).mediaInteractionCb,J=O.blockClass,K=O.blockSelector,$=O.mirror,X=O.sampling,O=O.doc,x=Ne(function(s){return mu(Ne(function(e){var t,n,r,i,o,e=Vu(e);e&&!ku(e,J,K,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,Z({type:s,id:$.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),X.media||500)}),Y=[fu("play",x(Lu.Play),O),fu("pause",x(Lu.Pause),O),fu("seeked",x(Lu.Seeked),O),fu("volumechange",x(Lu.VolumeChange),O),fu("ratechange",x(Lu.RateChange),O)],Ne(function(){Y.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function _e(e){var t,n,r,i=Vu(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?Le.parentElement(i):i)||!o||Ku.indexOf(o)<0||ku(i,te,ne,!0)||i.classList.contains(re)||a&&i.matches(a)||(t=i.value,n=!1,"radio"===(r=Ii(i)||"")||"checkbox"===r?n=i.checked:(l[o.toLowerCase()]||l[r])&&(t=xi({element:i,maskInputOptions:l,tagName:o,type:r,value:t,maskInputFn:ie})),Se(i,u?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&s.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,Se(e,u?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function Se(e,t){var n=$u.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||($u.set(e,t),n=ee.getId(e),Ne(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=((e,t)=>{var a=e.styleSheetRuleCb,l=e.mirror,u=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:Ne(function(e,t,n){var r=Pe(n,2),i=r[0],r=r[1],o=Yu(t,l,u.styleMirror),s=o.id,o=o.styleId;return(s&&-1!==s||o&&-1!==o)&&a({id:s,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,s=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ne(function(e,t,n){var r=Pe(n,1)[0],i=Yu(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({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:Ne(function(e,t,n){var r=Pe(n,1)[0],i=Yu(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({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:Ne(function(e,t,n){var r=Pe(n,1)[0],i=Yu(t,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),d=(nc("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(nc("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),nc("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),nc("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=Pe(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:Ne(function(e,t,n){var r=Pe(n,2),i=r[0],r=r[1],o=Yu(t.parentStyleSheet,l,u.styleMirror),s=o.id,o=o.styleId;return(s&&-1!==s||o&&-1!==o)&&a({id:s,styleId:o,adds:[{rule:i,index:[].concat(Qr(Xu(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Ne(function(e,t,n){var r=Pe(n,1)[0],i=Yu(t.parentStyleSheet,l,u.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&a({id:o,styleId:i,removes:[{index:[].concat(Qr(Xu(t)),[r])}]}),e.apply(t,n)})})}),Ne(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=Pe(e,2),t=e[0],e=e[1];e.prototype.insertRule=d[t].insertRule,e.prototype.deleteRule=d[t].deleteRule})})})(e,{win:r}),we=Qu(e,e.doc),R={win:r},w=(x=e).styleDeclarationCb,b=x.mirror,k=x.ignoreCSSAttributes,_=x.stylesheetManager,S=R.win,E=S.CSSStyleDeclaration.prototype.setProperty,S.CSSStyleDeclaration.prototype.setProperty=new Proxy(E,{apply:Ne(function(e,t,n){var r,i,o=Pe(n,3),s=o[0],a=o[1],o=o[2];return k.has(s)?E.apply(t,[s,a,o]):(r=(i=Yu(null==(i=t.parentRule)?void 0:i.parentStyleSheet,b,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&w({id:r,styleId:i,set:{property:s,value:a,priority:o},index:Xu(t.parentRule)}),e.apply(t,n))})}),C=S.CSSStyleDeclaration.prototype.removeProperty,S.CSSStyleDeclaration.prototype.removeProperty=new Proxy(C,{apply:Ne(function(e,t,n){var r,i,o=Pe(n,1)[0];return k.has(o)?C.apply(t,[o]):(r=(i=Yu(null==(i=t.parentRule)?void 0:i.parentStyleSheet,b,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&w({id:r,styleId:i,remove:{property:o},index:Xu(t.parentRule)}),e.apply(t,n))})}),be=Ne(function(){S.CSSStyleDeclaration.prototype.setProperty=E,S.CSSStyleDeclaration.prototype.removeProperty=C}),e.collectFonts)&&(ce=(O=e).fontCb,y=(O=O.doc).defaultView,ke=y?(m=[],v=new WeakMap,g=y.FontFace,y.FontFace=function(e,t,n){var r=new g(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=hu(O.fonts,"add",function(e){return function(t){return setTimeout(Ne(function(){var e=v.get(t);e&&(ce(e),v.delete(t))}),0),e.apply(this,[t])}}),m.push(function(){y.FontFace=g}),m.push(O),Ne(function(){m.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=Ne(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,s=i.startOffset,a=i.endContainer,i=i.endOffset;ku(o,I,M,!0)||ku(a,I,M,!0)||t.push({start:T.getId(o),startOffset:s,end:T.getId(a),endOffset:i})}Oe({ranges:t})}}))();var Ee,R,O,Ce,x,Re,T,I,M,Oe,A,xe=fu("selectionchange",x),Te=(O=(R=e).doc,Ce=R.customElementCb,(R=O.defaultView)&&R.customElements?hu(R.customElements,"define",function(r){return function(t,e,n){try{Ce({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return r.apply(this,[t,e,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,r,L.options))}}catch(e){P.e(e)}finally{P.f()}return Ne(function(){qu.forEach(function(e){return e.reset()}),null!=i&&i.disconnect(),de(),he(),fe(),pe(),me(),ve(),ge(),ye(),we(),be(),ke(),xe(),Te(),Ie.forEach(function(e){return e()})})}function tc(e){return void 0!==window[e]}function nc(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var rc=k(function e(t){b(this,e),c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t},[{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}}]),ic=k(function e(t){b(this,e),c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new rc(Wi)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new rc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.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 Y.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:Y.IncrementalSnapshot,data:{source:De.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return e;case Y.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case Y.IncrementalSnapshot:switch(e.data.source){case De.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 De.Drag:case De.TouchMove:case De.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case De.ViewportResize:return!1;case De.MediaInteraction:case De.MouseInteraction:case De.Scroll:case De.CanvasMutation:case De.Input:return this.replaceIds(e.data,n,["id"]),e;case De.StyleSheetRule:case De.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case De.Font:return e;case De.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case De.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 s=i.value;!Array.isArray(t[s])&&"number"!=typeof t[s]||(Array.isArray(t[s])?t[s]=e.getIds(n,t[s]):t[s]=e.getId(n,t[s]))}}catch(e){o.e(e)}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===Du.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),oc=k(function e(t){b(this,e),c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;Ei(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=Pe(Gu(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(Ju(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(Le.host(e))),r.restoreHandlers.push(Qu({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(hu(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=Le.shadowRoot(this);return t&&Iu(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ac="undefined"==typeof Uint8Array?[]:new Uint8Array(256),lc=0;lc<sc.length;lc++)ac[sc.charCodeAt(lc)]=lc;var uc=new Map,cc=function(e,t,n){var r;if(e&&(fc(e,t)||"object"===_(e)))return t=n,n=e.constructor.name,(r=uc.get(t))||(r=new Map,uc.set(t,r)),r.has(n)||r.set(n,[]),-1===(r=(t=r.get(n)).indexOf(e))&&(r=t.length,t.push(e)),r};function dc(i,t,n){return i instanceof Array?i.map(function(e){return dc(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:(()=>{for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=sc[e[r]>>2])+sc[(3&e[r])<<4|e[r+1]>>4])+sc[(15&e[r+1])<<2|e[r+2]>>6])+sc[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:[dc(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:[dc(i.data,t,n),i.width,i.height]}:fc(i,t)||"object"===_(i)?{rr_type:i.constructor.name,index:cc(i,t,n)}:i}function hc(e,t,n){return e.map(function(e){return dc(e,t,n)})}var fc=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 pc(e,s,a,l){var t=[];try{var n=hu(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 ku(this,s,a,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),l&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===_(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(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function mc(n,a,l,u,c,d){var e,r=[],t=Me(Object.getOwnPropertyNames(n));try{for(t.s();!(e=t.n()).done;)(()=>{var s=e.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return;try{if("function"!=typeof n[s])return;var t=hu(n,s,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 cc(i,d,this),"tagName"in this.canvas&&!ku(this.canvas,u,c,!0)&&(r=hc(t,d,this),l(this.canvas,{type:a,property:s,args:r})),i}});r.push(t)}catch(e){t=vu(n,s,{set:function(e){l(this.canvas,{type:a,property:s,args:[e],setter:!0})}});r.push(t)}})()}catch(n){t.e(n)}finally{t.f()}return r}var vc='(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',gc="undefined"!=typeof self&&self.Blob&&new Blob([vc],{type:"text/javascript;charset=utf-8"});function yc(e){var t,n;try{if(t=gc&&(self.URL||self.webkitURL).createObjectURL(gc))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(vc),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Q,wc,bc,kc=k(function e(t){var n=this,r=(b(this,e),c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(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)}),t.sampling),r=void 0===r?"all":r,i=t.win,o=t.blockClass,s=t.blockSelector,a=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&"all"===r&&this.initCanvasMutationObserver(i,o,s),a&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,o,s,{dataURLOptions:l})},[{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,r,i,o,s){var a=this,t=pc(r,i,o,!0),l=new Map,u=new yc;u.onmessage=function(e){var t,n=e.data.id;l.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,a.mutationCb({id:n,type:Pu["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,h=function(e){var t,n;f=(d&&e-d<c||(d=e,t=[],r.document.querySelectorAll("canvas").forEach(function(e){ku(e,i,o,!0)||t.push(e)}),t.forEach((n=zr(Jr().m(function e(t){var n,r,i;return Jr().w(function(e){for(;;)switch(e.n){case 0:if(n=a.mirror.getId(t),l.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 l.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,u.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:s.dataURLOptions},[i]);case 4:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(h))},f=requestAnimationFrame(h);this.resetObservers=function(){t(),cancelAnimationFrame(f)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=pc(e,t,n,!1),s=((s,a,l,u)=>{var e,n=[],t=Me(Object.getOwnPropertyNames(a.CanvasRenderingContext2D.prototype));try{for(t.s();!(e=t.n()).done;)(()=>{var o=e.value;try{if("function"!=typeof a.CanvasRenderingContext2D.prototype[o])return;var t=hu(a.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 ku(this.canvas,l,u,!0)||setTimeout(function(){var e=hc(n,a,t);s(t.canvas,{type:Pu["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(t)}catch(e){t=vu(a.CanvasRenderingContext2D.prototype,o,{set:function(e){s(this.canvas,{type:Pu["2D"],property:o,args:[e],setter:!0})}});n.push(t)}})()}catch(s){t.e(s)}finally{t.f()}return function(){n.forEach(function(e){return e()})}})(this.processMutation.bind(this),e,t,n),a=(r=this.processMutation.bind(this),t=t,n=n,i=[],void 0!==(e=e).WebGLRenderingContext&&i.push.apply(i,Qr(mc(e.WebGLRenderingContext.prototype,Pu.WebGL,r,t,n,e))),void 0!==e.WebGL2RenderingContext&&i.push.apply(i,Qr(mc(e.WebGL2RenderingContext.prototype,Pu.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),s(),a()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){function t(e){n.rafStamps.latestId=e,requestAnimationFrame(t)}var n=this;requestAnimationFrame(t)}},{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,Zr(e,li)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations.delete(e))}}]),_c=k(function e(t){b(this,e),c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Ou),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.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:[]},s=[],n=Me(e);try{for(n.s();!(i=n.n()).done;)(()=>{var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),s.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:Ri(e,n.href),index:t}})})),o.styleIds.push(e)})()}catch(e){n.e(e)}finally{n.f()}0<s.length&&(o.styles=s),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),Sc=k(function e(){b(this,e),c(this,"nodeMap",new WeakMap),c(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(){}}]),Ec=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(Qf=document.createElement("iframe"),document.body.appendChild(Qf),Array.from=(null==(Gf=Qf.contentWindow)?void 0:Gf.Array.from)||Array.from,document.body.removeChild(Qf))}catch(fd){console.debug("Unable to override Array.from",fd)}var Cc=new Oi;function Rc(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,l=void 0===t?"rr-block":t,t=e.blockSelector,u=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,h=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,F=e.slimDOMOptions,f=e.maskInputFn,p=e.maskTextFn,U=e.hooks,z=e.packFn,s=e.sampling,a=void 0===s?{}:s,s=e.dataURLOptions,m=void 0===s?{}:s,s=e.mousemoveWait,v=e.recordDOM,B=void 0===v||v,v=e.recordCanvas,g=void 0!==v&&v,v=e.recordCrossOriginIframes,v=void 0!==v&&v,y=e.recordAfter,j=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,_=(Uu=e.errorHandler,!v||window.parent===window),S=!1;if(!_)try{window.parent.document&&(S=!1)}catch(e){S=!0}if(_&&!r)throw new Error("emit function is required");if(!_&&!S)return function(){};void 0!==s&&void 0===a.mousemove&&(a.mousemove=s),Cc.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=Qi(F),R=(!function(e){"NodeList"in(e=0<arguments.length&&void 0!==e?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(e){n.e(e)}finally{n.f()}return e=z&&!S?z(e):e};Q=function(e,t){var n;e.timestamp=du(),null==(n=qu[0])||!n.isFrozen()||e.type===Y.FullSnapshot||e.type===Y.IncrementalSnapshot&&e.data.source===De.Mutation||qu.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===Y.FullSnapshot?(V=e,R=0):e.type!==Y.IncrementalSnapshot||e.data.source===De.Mutation&&e.data.isAttachIframe||(R++,t=o&&o<=R,n=i&&e.timestamp-V.timestamp>i,(t||n)&&wc(!0))};function O(e){Q({type:Y.IncrementalSnapshot,data:Ae({source:De.Mutation},e)})}function Z(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.Scroll},e)})}function J(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.CanvasMutation},e)})}var K,x=new _c({mutationCb:O,adoptedStyleSheetCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.AdoptedStyleSheet},e)})}}),T=new ic({mirror:Cc,mutationCb:O,stylesheetManager:x,recordCrossOriginIframes:v,wrappedEmit:Q}),I=Me(b||[]);try{for(I.s();!(K=I.n()).done;){var $=K.value;$.getMirror&&$.getMirror({nodeMirror:Cc,crossOriginIframeMirror:T.crossOriginIframeMirror,crossOriginIframeStyleMirror:T.crossOriginIframeStyleMirror})}}catch(e){I.e(e)}finally{I.f()}var M=new Sc,A=(bc=new kc({recordCanvas:g,mutationCb:J,win:window,blockClass:l,blockSelector:u,mirror:Cc,sampling:a.canvas,dataURLOptions:m}),new oc({mutationCb:O,scrollCb:Z,bypassOptions:{blockClass:l,blockSelector:u,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:E,dataURLOptions:m,maskTextFn:p,maskInputFn:f,recordCanvas:g,inlineImages:w,sampling:a,slimDOMOptions:C,iframeManager:T,stylesheetManager:x,canvasManager:bc,keepIframeSrcFn:k,processedNodeManager:M},mirror:Cc}));wc=function(){var e,t,n,r,i,o,s=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(B){Q({type:Y.Meta,data:{href:window.location.href,width:wu(),height:yu()}},s),x.reset(),A.init(),qu.forEach(function(e){return e.lock()});a=document,r=void 0===(r=(e={mirror:Cc,blockClass:l,blockSelector:u,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskAllInputs:E,maskTextFn:p,maskInputFn:f,slimDOM:C,dataURLOptions:m,recordCanvas:g,inlineImages:w,onSerialize:function(e){Eu(e,Cc)&&T.addIframe(e),Cu(e,Cc)&&x.trackLinkElement(e),Ru(e)&&A.addShadowRoot(Le.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 Oi:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var a=eo(a,{doc:a,mirror:r,blockClass:void 0===(a=e.blockClass)?"rr-block":a,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(a=e.maskTextClass)?"rr-mask":a,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(a=e.inlineStylesheet)||a,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:Qi(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(!a)return console.warn("Failed to snapshot the document");Q({type:Y.FullSnapshot,data:{node:a,initialOffset:gu(window)}},s),qu.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&x.adoptStyleSheets(document.adoptedStyleSheets,Cc.getId(document))}};try{var P=[],X=function(e){return Ne(ec)({mutationCb:O,mousemoveCb:function(e,t){return Q({type:Y.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.MouseInteraction},e)})},scrollCb:Z,viewportResizeCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.ViewportResize},e)})},inputCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.Input},e)})},mediaInteractionCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.MediaInteraction},e)})},styleSheetRuleCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.StyleSheetRule},e)})},styleDeclarationCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.StyleDeclaration},e)})},canvasMutationCb:J,fontCb:function(e){return Q({type:Y.IncrementalSnapshot,data:Ae({source:De.Font},e)})},selectionCb:function(e){Q({type:Y.IncrementalSnapshot,data:Ae({source:De.Selection},e)})},customElementCb:function(e){Q({type:Y.IncrementalSnapshot,data:Ae({source:De.CustomElement},e)})},blockClass:l,ignoreClass:D,ignoreSelector:N,maskTextClass:c,maskTextSelector:d,maskInputOptions:E,inlineStylesheet:h,sampling:a,recordDOM:B,recordCanvas:g,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:f,maskTextFn:p,keepIframeSrcFn:k,blockSelector:u,slimDOMOptions:C,dataURLOptions:m,mirror:Cc,iframeManager:T,stylesheetManager:x,shadowDomManager:A,processedNodeManager:M,canvasManager:bc,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 Q({type:Y.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},U)},L=(T.addLoadListener(function(e){try{P.push(X(e.contentDocument))}catch(e){console.warn(e)}}),function(){wc(),P.push(X(document)),Ec=!0});return["interactive","complete"].includes(document.readyState)?L():(P.push(fu("DOMContentLoaded",function(){Q({type:Y.DomContentLoaded,data:{}}),"DOMContentLoaded"===j&&L()})),P.push(fu("load",function(){Q({type:Y.Load,data:{}}),"load"===j&&L()},window))),function(){P.forEach(function(e){try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),M.destroy(),Ec=!1,Uu=void 0}}catch(e){console.warn(e)}}Rc.addCustomEvent=function(e,t){if(!Ec)throw new Error("please add custom event after start recording");Q({type:Y.Custom,data:{tag:e,payload:t}})},Rc.freezePage=function(){qu.forEach(function(e){return e.freeze()})},Rc.takeFullSnapshot=function(e){if(!Ec)throw new Error("please take full snapshot after start recording");wc(e)},Rc.mirror=Cc;var Oc='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',xc={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}},Tc=(Ic.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)})},Ic.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})},Ic.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),e=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+e)})},Ic.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)})},Ic.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},Ic.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},Ic.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},Ic.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,Ic.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,Ic.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,Ic.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,Ic.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,Ic);function Ic(){}function Mc(e,t){return void 0===e&&(e={}),f(f(f({},t=void 0===t?xc:t),e),{mask:Ac(t.mask,e.mask),block:Ac(t.block,e.block),ignore:Ac(t.ignore,e.ignore),maskInputOptions:f(f({},t.maskInputOptions),e.maskInputOptions)})}function Ac(e,t){e=new Set(A(e||[],t||[]));return Array.from(e)}Uc.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)},Uc.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},Uc.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},Uc.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},Uc.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},Uc.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)},Uc.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var s=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var a=this,l=0,u=null!=(t=e.removes)?t:[];l<u.length;l++)(t=>{var e=(null!=(n=s.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(s.adds.splice(e,1),a.cancelledByOffset++):(s.removes=null!=(n=s.removes)?n:[],s.removes.push(t))})(u[l]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var h=d[c];s.adds=null!=(r=s.adds)?r:[],s.adds.push(h)}for(var f=0,p=null!=(t=e.attributes)?t:[];f<p.length;f++)(t=>{s.attributes=null!=(i=s.attributes)?i:[];var e=s.attributes.findIndex(function(e){return e.id===t.id});0<=e?s.attributes[e]=t:s.attributes.push(t)})(p[f]);for(var m=0,v=null!=(t=e.texts)?t:[];m<v.length;m++)(t=>{s.texts=null!=(o=s.texts)?o:[];var e=s.texts.findIndex(function(e){return e.id===t.id});0<=e?s.texts[e]=t:s.texts.push(t)})(v[m])}},Uc.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:A(null!=(e=t.adds)?e:[]),removes:A(null!=(e=t.removes)?e:[]),attributes:A(null!=(e=t.attributes)?e:[]),texts:A(null!=(e=t.texts)?e:[])}}},Uc.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},Uc.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var Pc=Uc,Lc=(Fc.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:void 0,s=Mc(e.privacy||{},xc),a=f(f(f(f({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!l.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={},void 0!==(o=s).maskAllInputs&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(a=o.mask)&&a.length&&(t.maskTextSelector=o.mask.join(",")),null!=(a=o.block)&&a.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+Oc:Oc,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(a=o.ignore)&&a.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=Tc.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=Rc(a),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),g("RecorderManager","Recording started with config:",{maskAllText:s.maskAllText,maskAllInputs:s.maskAllInputs,autoDetectSensitiveData:s.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(e){Tr("RecorderManager","Failed to start recording:",e),this.state="stopped"}}else xr("RecorderManager","Already recording")},Fc.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=void 0),this.state="stopped",g("RecorderManager","Recording stopped")},Fc.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",g("RecorderManager","Recording paused"))},Fc.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),g("RecorderManager","Recording resumed"))},Fc.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},Or("RecorderManager","MutationObserver hooked"))}catch(t){xr("RecorderManager","Failed to hook MutationObserver:",t)}},Fc.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,Or("RecorderManager","MutationObserver restored"))},Fc.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,Tr("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))},Fc.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||(Tr("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)},Fc.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=Rc.addCustomEvent)&&n.call(Rc,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(e){}},Fc.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(i=(r=this.options).onCheckout)&&i.call(r),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=Rc.takeFullSnapshot;"function"==typeof o&&(o(!0),Or("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(e){xr("RecorderManager","Inline checkpoint failed:",e)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},Fc.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,xr("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=Rc.addCustomEvent)&&e.call(Rc,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(e){}}return!1}return!0},Fc.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=Rc.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),Or("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(e){xr("RecorderManager","Checkpoint FullSnapshot failed:",e)}},12e4)},Fc.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},Fc.prototype.getState=function(){return this.state},Fc.prototype.isRecording=function(){return"recording"===this.state},Fc.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},Fc.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())},Fc.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},Fc),Dc=(Nc.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,g("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,g("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,g("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},Nc.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},Nc.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},Nc.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,g("SamplerManager","Mode switched: "+t+" -> "+e)},Nc.prototype.getCurrentMode=function(){return this.currentMode},Nc.prototype.isSampled=function(){return!0===this.samplingDecision},Nc.prototype.isSessionMode=function(){return"session"===this.currentMode},Nc.prototype.isBufferMode=function(){return"buffer"===this.currentMode},Nc.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",g("SamplerManager","Upgraded to session mode due to error"),!0)},Nc.prototype.updateRates=function(e,t){"number"==typeof e&&(this.config.sessionSampleRate=e),"number"==typeof t&&(this.config.errorSampleRate=t)},Nc.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},Nc.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},Nc.prototype.getConfig=function(){return f({},this.config)},Nc);function Nc(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 Fc(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 Pc({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function Uc(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 zc(e){for(var t=e.length;0<=--t;)e[t]=0}var Bc=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]),jc=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]),Wc=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Hc=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qc=new Array(576),Vc=(zc(qc),new Array(60)),Gc=(zc(Vc),new Array(512)),Zc=(zc(Gc),new Array(256)),Jc=(zc(Zc),new Array(29));zc(Jc);var Kc,$c,Xc,Yc=new Array(30);function Qc(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 ed(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function td(e){return e<256?Gc[e]:Gc[256+(e>>>7)]}function nd(e,t,n){Sd(e,n[2*t],n[2*t+1])}function rd(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function id(e,t,n){for(var r,i=new Array(16),o=0,s=1;s<=15;s++)o=o+n[s-1]<<1,i[s]=o;for(r=0;r<=t;r++){var a=e[2*r+1];0!==a&&(e[2*r]=rd(i[a]++,a))}}function od(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}function sd(e){8<e.bi_valid?_d(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ad(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&Ed(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!Ed(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function ld(e,t,n){var r,i,o,s,a=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,i=e.pending_buf[e.sym_buf+a++],0==r?nd(e,i,t):(o=Zc[i],nd(e,o+256+1,t),0!==(s=Bc[o])&&(i-=Jc[o],Sd(e,i,s)),o=td(--r),nd(e,o,n),0!==(s=jc[o])&&(r-=Yc[o],Sd(e,r,s))),a<e.sym_next;);nd(e,256,t)}function ud(e,t){var n,r,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;1<=n;n--)ad(e,o,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ad(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++,ad(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,d,h,f,p,m=e,v=t.dyn_tree,g=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(v[2*m.heap[m.heap_max]+1]=0,c=m.heap_max+1;c<573;c++)(E=v[2*v[2*(d=m.heap[c])+1]+1]+1)>_&&(E=_,S++),v[2*d+1]=E,g<d||(m.bl_count[E]++,f=0,k<=d&&(f=b[d-k]),p=v[2*d],m.opt_len+=p*(E+f),w&&(m.static_len+=p*(y[2*d+1]+f)));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;)(h=m.heap[--c])>g||(v[2*h+1]!==E&&(m.opt_len+=(E-v[2*h+1])*v[2*h],v[2*h+1]=E),d--)}id(o,u,e.bl_count)}function cd(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++a<l&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,u=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4))}function dd(e,t,n){var r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++a<l&&i===s)){if(a<u)for(;nd(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(nd(e,i,e.bl_tree),a--),nd(e,16,e.bl_tree),Sd(e,a-3,2)):a<=10?(nd(e,17,e.bl_tree),Sd(e,a-3,3)):(nd(e,18,e.bl_tree),Sd(e,a-11,7));o=i,u=(a=0)===s?(l=138,3):i===s?(l=6,3):(l=7,4)}}function hd(e,t,n,r){Sd(e,0+(r?1:0),3),sd(e),_d(e,n),_d(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n}function fd(e,t){return e.msg=Md[t],t}function pd(e){return 2*e-(4<e?9:0)}function md(e,t){Ld(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ih(e.strm)}function d(e,t){e.pending_buf[e.pending++]=t}function vd(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function gd(e,t){var n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,l=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+258,f=u[o+s-1],p=u[o+s];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<a&&(a=e.lookahead);do{if(u[(n=t)+s]===p&&u[n+s-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){for(o+=2,n++;u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<h;);if(r=258-(h-o),o=h-258,s<r){if(e.match_start=t,a<=(s=r))break;f=u[o+s-1],p=u[o+s]}}}while((t=d[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function yd(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),th(e),t+=r),0===e.strm.avail_in)break;if(t=oh(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=nh(e,e.ins_h,e.window[n+1]);e.insert&&(rh(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&&(rh(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function wd(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,a=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!==Bd||t===Fd||n!==r+e.strm.avail_in)||(s=t===Bd&&n===r+e.strm.avail_in?1:0,Pd(e,0,0,s),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,ih(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&&(oh(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!==s)););return(a-=e.strm.avail_in)&&(a>=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<=a&&(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-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=e.w_size-e.insert<a?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==Fd&&t!==Bd&&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)&&(oh(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===Bd)&&t!==Fd&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,s=t===Bd&&0===e.strm.avail_in&&n===r?1:0,Pd(e,e.block_start,n,s),e.block_start+=n,ih(e.strm)),s?3:1)}function bd(e,t){for(var n,r;;){if(e.lookahead<262){if(yd(e),e.lookahead<262&&t===Fd)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?rh(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=gd(e,n)),3<=e.match_length)if(r=Dd(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=rh(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=nh(e,e.ins_h,e.window[e.strstart+1]));else r=Dd(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(md(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Bd?(md(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(md(e,!1),0===e.strm.avail_out)?1:2}function kd(e,t){for(var n,r,i;;){if(e.lookahead<262){if(yd(e),e.lookahead<262&&t===Fd)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=rh(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=gd(e,n),e.match_length<=5)&&(e.strategy===Jd||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=Dd(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=rh(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(md(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Dd(e,0,e.window[e.strstart-1]))&&md(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=Dd(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Bd?(md(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(md(e,!1),0===e.strm.avail_out)?1:2}zc(Yc);var _d=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Sd=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,_d(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)},Ed=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]},Cd=!1,Rd=function(e){if(!Cd){for(var t,n,r,i=new Array(16),o=0,s=0;s<28;s++)for(Jc[s]=o,t=0;t<1<<Bc[s];t++)Zc[o++]=s;for(Zc[o-1]=s,s=r=0;s<16;s++)for(Yc[s]=r,t=0;t<1<<jc[s];t++)Gc[r++]=s;for(r>>=7;s<30;s++)for(Yc[s]=r<<7,t=0;t<1<<jc[s]-7;t++)Gc[256+r++]=s;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)qc[2*t+1]=8,t++,i[8]++;for(;t<=255;)qc[2*t+1]=9,t++,i[9]++;for(;t<=279;)qc[2*t+1]=7,t++,i[7]++;for(;t<=287;)qc[2*t+1]=8,t++,i[8]++;for(id(qc,287,i),t=0;t<30;t++)Vc[2*t+1]=5,Vc[2*t]=rd(t,5);Kc=new Qc(qc,Bc,257,286,15),$c=new Qc(Vc,jc,0,30,15),Xc=new Qc(new Array(0),Wc,0,19,7),Cd=!0}e.l_desc=new ed(e.dyn_ltree,Kc),e.d_desc=new ed(e.dyn_dtree,$c),e.bl_desc=new ed(e.bl_tree,Xc),e.bi_buf=0,e.bi_valid=0,od(e)},i=hd,Od=function(e,t,n,r){var i,o,s,a=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=(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)),ud(e,e.l_desc),ud(e,e.d_desc),a=(e=>{var t;for(cd(e,e.dyn_ltree,e.l_desc.max_code),cd(e,e.dyn_dtree,e.d_desc.max_code),ud(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*Hc[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)hd(e,t,n,r);else if(4===e.strategy||o===i)Sd(e,2+(r?1:0),3),ld(e,qc,Vc);else{Sd(e,4+(r?1:0),3);var l=e,u=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,a+1);for(Sd(l,t-257,5),Sd(l,n-1,5),Sd(l,u-4,4),s=0;s<u;s++)Sd(l,l.bl_tree[2*Hc[s]+1],3);dd(l,l.dyn_ltree,t-1),dd(l,l.dyn_dtree,n-1),ld(e,e.dyn_ltree,e.dyn_dtree)}od(e),r&&sd(e)},a=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*(Zc[n]+256+1)]++,e.dyn_dtree[2*td(t)]++),e.sym_next===e.sym_end},h=function(e){Sd(e,2,3),nd(e,256,qc),16===(e=e).bi_valid?(_d(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)},xd=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0},Td=new Uint32Array((()=>{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})()),Id=function(e,t,n,r){var i=Td,o=r+n;e^=-1;for(var s=r;s<o;s++)e=e>>>8^i[255&(e^t[s])];return-1^e},Md={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"},S={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},Ad=Rd,Pd=i,Ld=Od,Dd=a,Nd=h,Fd=S.Z_NO_FLUSH,Ud=S.Z_PARTIAL_FLUSH,zd=S.Z_FULL_FLUSH,Bd=S.Z_FINISH,jd=S.Z_BLOCK,Wd=S.Z_OK,Hd=S.Z_STREAM_END,qd=S.Z_STREAM_ERROR,Vd=S.Z_DATA_ERROR,Gd=S.Z_BUF_ERROR,Zd=S.Z_DEFAULT_COMPRESSION,Jd=S.Z_FILTERED,Kd=S.Z_HUFFMAN_ONLY,$d=S.Z_RLE,Xd=S.Z_FIXED,Yd=S.Z_UNKNOWN,Qd=S.Z_DEFLATED,eh=function(e){for(var t=e.length;0<=--t;)e[t]=0},th=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;);},nh=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},rh=function(e,t){n=e.legacy_hash?e.ins_h=nh(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},ih=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)},oh=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=xd(e.adler,t,i,n):2===e.state.wrap&&(e.adler=Id(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)};function sh(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 ah=[new sh(0,0,0,0,wd),new sh(4,4,8,4,bd),new sh(4,5,16,8,bd),new sh(4,6,32,32,bd),new sh(4,4,16,16,kd),new sh(8,16,32,32,kd),new sh(8,16,128,128,kd),new sh(8,32,128,256,kd),new sh(32,128,258,1024,kd),new sh(32,258,258,4096,kd)];function lh(){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=Qd,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),eh(this.dyn_ltree),eh(this.dyn_dtree),eh(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),eh(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),eh(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}function uh(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}function ch(e){var t=ph(e);return t===Wd&&((e=e.state).window_size=2*e.w_size,eh(e.head),e.max_lazy_match=ah[e.level].max_lazy,e.good_match=ah[e.level].good_length,e.nice_match=ah[e.level].nice_length,e.max_chain_length=ah[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}function dh(e,t,n,r,i,o,s){if(!e)return qd;var a=1;if(t===Zd&&(t=6),r<0?(a=0,r=-r):15<r&&(a=2,r-=16),i<1||9<i||n!==Qd||r<8||15<r||t<0||9<t||o<0||Xd<o||8===r&&1!==a)return fd(e,qd);8===r&&(r=9);var l=new lh;return(e.state=l).strm=e,l.status=42,l.wrap=a,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.legacy_hash=s?1:0,l.hash_bits=i+7,!l.legacy_hash&&l.hash_bits<15&&(l.hash_bits=15),l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new Uint8Array(2*l.w_size),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=3*(l.lit_bufsize-1),l.level=t,l.strategy=o,l.method=n,ch(e)}function hh(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==_(n))throw new TypeError(n+"must be non-object");for(var r in n)bh(n,r)&&(e[r]=n[r])}}return e}function fh(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,s=0,a=e.length;o<a;o++){var l=e[o];i.set(l,s),s+=l.length}return i}var ph=function(e){if(uh(e))return fd(e,qd);e.total_in=e.total_out=0,e.data_type=Yd;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,Ad(t),Wd},mh=dh,vh=function(e,t){return uh(e)||2!==e.state.wrap?qd:(e.state.gzhead=t,Wd)},gh=function(e,t){if(uh(e)||jd<t||t<0)return e?fd(e,qd):qd;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==Bd)return fd(e,0===e.avail_out?Gd:qd);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(ih(e),0===e.avail_out)return n.last_flush=-1,Wd}else if(0===e.avail_in&&pd(t)<=pd(r)&&t!==Bd)return fd(e,Gd);if(666===n.status&&0!==e.avail_in)return fd(e,Gd);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=Qd+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=Kd||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),vd(n,r+=31-r%31),0!==n.strstart&&(vd(n,e.adler>>>16),vd(n,65535&e.adler)),e.adler=1,n.status=113,ih(e),0!==n.pending)return n.last_flush=-1,Wd}if(57===n.status)if(e.adler=0,d(n,31),d(n,139),d(n,8),n.gzhead)d(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)),d(n,255&n.gzhead.time),d(n,n.gzhead.time>>8&255),d(n,n.gzhead.time>>16&255),d(n,n.gzhead.time>>24&255),d(n,9===n.level?2:n.strategy>=Kd||n.level<2?4:0),d(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(d(n,255&n.gzhead.extra.length),d(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Id(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(d(n,0),d(n,0),d(n,0),d(n,0),d(n,0),d(n,9===n.level?2:n.strategy>=Kd||n.level<2?4:0),d(n,3),n.status=113,ih(e),0!==n.pending)return n.last_flush=-1,Wd;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 s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=Id(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,ih(e),0!==n.pending)return n.last_flush=-1,Wd;i=0,o-=s}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=Id(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var a,l=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>l&&(e.adler=Id(e.adler,n.pending_buf,n.pending-l,l)),ih(e),0!==n.pending)return n.last_flush=-1,Wd;l=0}}while(a=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,d(n,a),0!=a);n.gzhead.hcrc&&n.pending>l&&(e.adler=Id(e.adler,n.pending_buf,n.pending-l,l)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var u,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=Id(e.adler,n.pending_buf,n.pending-c,c)),ih(e),0!==n.pending)return n.last_flush=-1,Wd;c=0}}while(u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,d(n,u),0!=u);n.gzhead.hcrc&&n.pending>c&&(e.adler=Id(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&&(ih(e),0!==n.pending))return n.last_flush=-1,Wd;d(n,255&e.adler),d(n,e.adler>>8&255),e.adler=0}if(n.status=113,ih(e),0!==n.pending)return n.last_flush=-1,Wd}if(0!==e.avail_in||0!==n.lookahead||t!==Fd&&666!==n.status){r=0===n.level?wd(n,t):n.strategy===Kd?((e,t)=>{for(var n;;){if(0===e.lookahead&&(yd(e),0===e.lookahead)){if(t===Fd)return 1;break}if(e.match_length=0,n=Dd(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(md(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Bd?(md(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(md(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===$d?((e,t)=>{for(var n,r,i,o,s=e.window;;){if(e.lookahead<=258){if(yd(e),e.lookahead<=258&&t===Fd)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){for(o=e.strstart+258;r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++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=Dd(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Dd(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(md(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Bd?(md(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(md(e,!1),0===e.strm.avail_out)?1:2})(n,t):ah[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),Wd;if(2===r&&(t===Ud?Nd(n):t!==jd&&(Pd(n,0,0,!1),t===zd)&&(eh(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),ih(e),0===e.avail_out))return n.last_flush=-1,Wd}return t!==Bd||!(n.wrap<=0)&&(2===n.wrap?(d(n,255&e.adler),d(n,e.adler>>8&255),d(n,e.adler>>16&255),d(n,e.adler>>24&255),d(n,255&e.total_in),d(n,e.total_in>>8&255),d(n,e.total_in>>16&255),d(n,e.total_in>>24&255)):(vd(n,e.adler>>>16),vd(n,65535&e.adler)),ih(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?Wd:Hd},yh=function(e){var t;return uh(e)?qd:(t=e.state.status,e.state=null,113===t?fd(e,Vd):Wd)},wh=function(e,t){var n=t.length;if(uh(e))return qd;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return qd;1===i&&(e.adler=xd(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(eh(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,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,yd(r);3<=r.lookahead;){for(var l=r.strstart,u=r.lookahead-2;rh(r,l),l++,--u;);r.strstart=l,r.lookahead=2,yd(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=s,e.input=a,e.avail_in=o,r.wrap=i,Wd},bh=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},kh=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(R){kh=!1}for(var _h=new Uint8Array(256),Sh=0;Sh<256;Sh++)_h[Sh]=252<=Sh?6:248<=Sh?5:240<=Sh?4:224<=Sh?3:192<=Sh?2:1;function Eh(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,s=0,a=0;a<o;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=i=0;i<s;a++)55296==(64512&(n=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(r=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(r-56320),a++),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}function Ch(){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}_h[254]=_h[255]=1;var Rh=Object.prototype.toString,Oh=S.Z_NO_FLUSH,xh=S.Z_SYNC_FLUSH,Th=S.Z_FULL_FLUSH,Ih=S.Z_FINISH,Mh=S.Z_OK,Ah=S.Z_STREAM_END,Ph={level:S.Z_DEFAULT_COMPRESSION,method:S.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:S.Z_DEFAULT_STRATEGY,legacyHash:!0};function Lh(e){this.options=hh({},Ph,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 Ch,this.strm.avail_out=0,mh(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==Mh)throw new Error(Md[t]);if(e.header&&vh(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?Eh(e.dictionary):"[object ArrayBuffer]"===Rh.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=wh(this.strm,e))!==Mh)throw new Error(Md[t]);this._dict_set=!0}}function Dh(e,t){t=new Lh(t);if(t.push(e,!0),t.err)throw t.msg||Md[t.err];return t.result}function Nh(e,t,n,r,i,o,s,a){for(var l,u,c,d,h,f,p,m,v,g=a.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(_=g,k=15;1<=k&&0===T[k];k--);if(k<_&&(_=k),0===k)i[o++]=20971520,i[o++]=20971520,a.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]&&(s[I[t[n+w]]++]=w);if(f=0===e?(x=M=s,20):1===e?(x=zh,M=Bh,257):(x=jh,M=Wh,0),y=b,h=o,E=w=O=0,c=-1,d=(R=1<<(S=_))-1,1===e&&852<R||2===e&&592<R)return 1;for(;;){for(v=s[w]+1<f?(m=0,s[w]):s[w]>=f?(m=M[s[w]-f],x[s[w]-f]):(m=96,0),l=1<<(p=y-E),b=u=1<<S;i[h+(O>>E)+(u-=l)]=p<<24|m<<16|v|0,0!==u;);for(l=1<<y-1;O&l;)l>>=1;if(0!==l?O=(O&l-1)+l:O=0,w++,0==--T[y]){if(y===k)break;y=t[n+s[w]]}if(_<y&&(O&d)!==c){for(h+=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|h-o|0}}0!==O&&(i[h+O]=y-E<<24|64<<16|0),a.bits=_}return 0}function Fh(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}Lh.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?Ih:Oh,"string"==typeof e?i.input=Eh(e):"[object ArrayBuffer]"===Rh.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===xh||r===Th)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(gh(i,r)===Ah)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=yh(this.strm),this.onEnd(n),this.ended=!0,n===Mh;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},Lh.prototype.onData=function(e){this.chunks.push(e)},Lh.prototype.onEnd=function(e){e===Mh&&(this.result=fh(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Uh={Deflate:Lh,deflate:Dh,deflateRaw:function(e,t){return(t=t||{}).raw=!0,Dh(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,Dh(e,t)},constants:S},zh=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]),Bh=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]),jh=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]),Wh=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]),Hh=S.Z_FINISH,qh=S.Z_BLOCK,Vh=S.Z_TREES,Gh=S.Z_OK,Zh=S.Z_STREAM_END,Jh=S.Z_NEED_DICT,Kh=S.Z_STREAM_ERROR,$h=S.Z_DATA_ERROR,Xh=S.Z_MEM_ERROR,Yh=S.Z_BUF_ERROR,Qh=S.Z_DEFLATED,ie=16209;function ef(){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}function tf(e){var t;return cf(e)?Kh:(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,Gh)}function nf(e){var t;return cf(e)?Kh:((t=e.state).wsize=0,t.whave=0,t.wnext=0,tf(e))}function rf(e,t){var n,r;return cf(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?Kh:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,nf(e))}function of(e,t){var n;return e?(n=new ef,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=rf(e,t))!==Gh&&(e.state=null),n):Kh}function sf(e,t,n,r){var i;return null===(e=e.state).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}function af(){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}var lf,uf,cf=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},df=!0,hf=nf,ff=of,pf=function(e,N){var t,n,F,r,i,o,s,a,l,U,u,c,z,B,d,h,f,p,j,W,m,v,g,y,w=0,b=new Uint8Array(4),H=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(cf(e)||!e.output||!e.input&&0!==e.avail_in)return Kh;16191===(t=e.state).mode&&(t.mode=16192),i=e.next_out,F=e.output,r=e.next_in,n=e.input,a=t.hold,l=t.bits,U=o=e.avail_in,u=s=e.avail_out,v=Gh;e:for(;;)switch(t.mode){case 16180:if(0===t.wrap)t.mode=16192;else{for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}2&t.wrap&&35615===a?(0===t.wbits&&(t.wbits=15),b[t.check=0]=255&a,b[1]=a>>>8&255,t.check=Id(t.check,b,2,0),l=a=0,t.mode=16181):(t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&a)<<8)+(a>>8))%31?(e.msg="incorrect header check",t.mode=ie):(15&a)!==Qh?(e.msg="unknown compression method",t.mode=ie):(l-=4,m=8+(15&(a>>>=4)),0===t.wbits&&(t.wbits=m),15<m||m>t.wbits?(e.msg="invalid window size",t.mode=ie):(t.dmax=1<<t.wbits,t.flags=0,e.adler=t.check=1,t.mode=512&a?16189:16191,l=a=0)))}break;case 16181:for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(t.flags=a,(255&t.flags)!==Qh){e.msg="unknown compression method",t.mode=ie;break}if(57344&t.flags){e.msg="unknown header flags set",t.mode=ie;break}t.head&&(t.head.text=a>>8&1),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Id(t.check,b,2,0)),l=a=0,t.mode=16182;case 16182:for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.head&&(t.head.time=a),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,b[2]=a>>>16&255,b[3]=a>>>24&255,t.check=Id(t.check,b,4,0)),l=a=0,t.mode=16183;case 16183:for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.head&&(t.head.xflags=255&a,t.head.os=a>>8),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Id(t.check,b,2,0)),l=a=0,t.mode=16184;case 16184:if(1024&t.flags){for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.length=a,t.head&&(t.head.extra_len=a),512&t.flags&&4&t.wrap&&(b[0]=255&a,b[1]=a>>>8&255,t.check=Id(t.check,b,2,0)),l=a=0}else t.head&&(t.head.extra=null);t.mode=16185;case 16185:if(1024&t.flags&&((c=(c=t.length)>o?o:c)&&(t.head&&(m=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(n.subarray(r,r+c),m)),512&t.flags&&4&t.wrap&&(t.check=Id(t.check,n,c,r)),o-=c,r+=c,t.length-=c),t.length))break e;t.length=0,t.mode=16186;case 16186:if(2048&t.flags){if(0===o)break e;for(c=0;m=n[r+c++],t.head&&m&&t.length<65536&&(t.head.name+=String.fromCharCode(m)),m&&c<o;);if(512&t.flags&&4&t.wrap&&(t.check=Id(t.check,n,c,r)),o-=c,r+=c,m)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=16187;case 16187:if(4096&t.flags){if(0===o)break e;for(c=0;m=n[r+c++],t.head&&m&&t.length<65536&&(t.head.comment+=String.fromCharCode(m)),m&&c<o;);if(512&t.flags&&4&t.wrap&&(t.check=Id(t.check,n,c,r)),o-=c,r+=c,m)break e}else t.head&&(t.head.comment=null);t.mode=16188;case 16188:if(512&t.flags){for(;l<16;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(4&t.wrap&&a!==(65535&t.check)){e.msg="header crc mismatch",t.mode=ie;break}l=a=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=16191;break;case 16189:for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}e.adler=t.check=Fh(a),l=a=0,t.mode=16190;case 16190:if(0===t.havedict)return e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,Jh;e.adler=t.check=1,t.mode=16191;case 16191:if(N===qh||N===Vh)break e;case 16192:if(t.last)a>>>=7&l,l-=7&l,t.mode=16206;else{for(;l<3;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}switch(t.last=1&a,--l,3&(a>>>=1)){case 0:t.mode=16193;break;case 1:_=k=void 0;var k=t;if(df){lf=new Int32Array(512),uf=new Int32Array(32);for(var _=0;_<144;)k.lens[_++]=8;for(;_<256;)k.lens[_++]=9;for(;_<280;)k.lens[_++]=7;for(;_<288;)k.lens[_++]=8;for(Nh(1,k.lens,0,288,lf,0,k.work,{bits:9}),_=0;_<32;)k.lens[_++]=5;Nh(2,k.lens,0,32,uf,0,k.work,{bits:5}),df=!1}if(k.lencode=lf,k.lenbits=9,k.distcode=uf,k.distbits=5,t.mode=16199,N!==Vh)break;a>>>=2,l-=2;break e;case 2:t.mode=16196;break;case 3:e.msg="invalid block type",t.mode=ie}a>>>=2,l-=2}break;case 16193:for(a>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if((65535&a)!=(a>>>16^65535)){e.msg="invalid stored block lengths",t.mode=ie;break}if(t.length=65535&a,l=a=0,t.mode=16194,N===Vh)break e;case 16194:t.mode=16195;case 16195:if(c=t.length){if(0===(c=s<(c=o<c?o:c)?s:c))break e;F.set(n.subarray(r,r+c),i),o-=c,r+=c,s-=c,i+=c,t.length-=c}else t.mode=16191;break;case 16196:for(;l<14;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(t.nlen=257+(31&a),a>>>=5,l-=5,t.ndist=1+(31&a),a>>>=5,l-=5,t.ncode=4+(15&a),a>>>=4,l-=4,286<t.nlen||30<t.ndist){e.msg="too many length or distance symbols",t.mode=ie;break}t.have=0,t.mode=16197;case 16197:for(;t.have<t.ncode;){for(;l<3;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.lens[H[t.have++]]=7&a,a>>>=3,l-=3}for(;t.have<19;)t.lens[H[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,g={bits:t.lenbits},v=Nh(0,t.lens,0,19,t.lencode,0,t.work,g),t.lenbits=g.bits,v){e.msg="invalid code lengths set",t.mode=ie;break}t.have=0,t.mode=16198;case 16198:for(;t.have<t.nlen+t.ndist;){for(;h=(w=t.lencode[a&(1<<t.lenbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(f<16)a>>>=d,l-=d,t.lens[t.have++]=f;else{if(16===f){for(y=d+2;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(a>>>=d,l-=d,0===t.have){e.msg="invalid bit length repeat",t.mode=ie;break}m=t.lens[t.have-1],c=3+(3&a),a>>>=2,l-=2}else if(17===f){for(y=d+3;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}m=0,c=3+(7&(a>>>=d)),a>>>=3,l=l-d-3}else{for(y=d+7;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}m=0,c=11+(127&(a>>>=d)),a>>>=7,l=l-d-7}if(t.have+c>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=ie;break}for(;c--;)t.lens[t.have++]=m}}if(t.mode===ie)break;if(0===t.lens[256]){e.msg="invalid code -- missing end-of-block",t.mode=ie;break}if(t.lenbits=9,g={bits:t.lenbits},v=Nh(1,t.lens,0,t.nlen,t.lencode,0,t.work,g),t.lenbits=g.bits,v){e.msg="invalid literal/lengths set",t.mode=ie;break}if(t.distbits=6,t.distcode=t.distdyn,g={bits:t.distbits},v=Nh(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,g),t.distbits=g.bits,v){e.msg="invalid distances set",t.mode=ie;break}if(t.mode=16199,N===Vh)break e;case 16199:t.mode=16200;case 16200:if(6<=o&&258<=s){e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,I=P=V=x=O=R=C=E=S=re=ne=te=ee=D=L=Q=Y=X=$=K=J=Z=A=G=M=q=T=void 0;var S,E,C,R,O,x,T=e,q=u,I=T.state,M=T.next_in,V=T.input,G=M+(T.avail_in-5),A=T.next_out,P=T.output,Z=A-(q-T.avail_out),J=A+(T.avail_out-257),K=I.dmax,$=I.wsize,X=I.whave,Y=I.wnext,Q=I.window,L=I.hold,D=I.bits,ee=I.lencode,te=I.distcode,ne=(1<<I.lenbits)-1,re=(1<<I.distbits)-1;t:do{for(D<15&&(L+=V[M++]<<D,D+=8,L+=V[M++]<<D,D+=8),S=ee[L&ne];;){if(L>>>=E=S>>>24,D-=E,0==(E=S>>>16&255))P[A++]=65535&S;else{if(!(16&E)){if(0==(64&E)){S=ee[(65535&S)+(L&(1<<E)-1)];continue}if(32&E){I.mode=16191;break t}T.msg="invalid literal/length code",I.mode=16209;break t}for(C=65535&S,(E&=15)&&(D<E&&(L+=V[M++]<<D,D+=8),C+=L&(1<<E)-1,L>>>=E,D-=E),D<15&&(L+=V[M++]<<D,D+=8,L+=V[M++]<<D,D+=8),S=te[L&re];;){if(L>>>=E=S>>>24,D-=E,!(16&(E=S>>>16&255))){if(0==(64&E)){S=te[(65535&S)+(L&(1<<E)-1)];continue}T.msg="invalid distance code",I.mode=16209;break t}if(R=65535&S,D<(E&=15)&&(L+=V[M++]<<D,(D+=8)<E)&&(L+=V[M++]<<D,D+=8),(R+=L&(1<<E)-1)>K){T.msg="invalid distance too far back",I.mode=16209;break t}if(L>>>=E,D-=E,R>(E=A-Z)){if((E=R-E)>X&&I.sane){T.msg="invalid distance too far back",I.mode=16209;break t}if(x=Q,(O=0)===Y){if(O+=$-E,E<C){for(C-=E;P[A++]=Q[O++],--E;);O=A-R,x=P}}else if(Y<E){if(O+=$+Y-E,(E-=Y)<C){for(C-=E;P[A++]=Q[O++],--E;);if(O=0,Y<C){for(C-=E=Y;P[A++]=Q[O++],--E;);O=A-R,x=P}}}else if(O+=Y-E,E<C){for(C-=E;P[A++]=Q[O++],--E;);O=A-R,x=P}for(;2<C;)P[A++]=x[O++],P[A++]=x[O++],P[A++]=x[O++],C-=3;C&&(P[A++]=x[O++],1<C)&&(P[A++]=x[O++])}else{for(O=A-R;P[A++]=P[O++],P[A++]=P[O++],P[A++]=P[O++],2<(C-=3););C&&(P[A++]=P[O++],1<C)&&(P[A++]=P[O++])}break}}break}}while(M<G&&A<J);M-=C=D>>3,L&=(1<<(D-=C<<3))-1,T.next_in=M,T.next_out=A,T.avail_in=M<G?G-M+5:5-(M-G),T.avail_out=A<J?J-A+257:257-(A-J),I.hold=L,I.bits=D,i=e.next_out,F=e.output,s=e.avail_out,r=e.next_in,n=e.input,o=e.avail_in,a=t.hold,l=t.bits,16191===t.mode&&(t.back=-1);break}for(t.back=0;h=(w=t.lencode[a&(1<<t.lenbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(h&&0==(240&h)){for(p=d,j=h,W=f;h=(w=t.lencode[W+((a&(1<<p+j)-1)>>p)])>>>16&255,f=65535&w,!(p+(d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}a>>>=p,l-=p,t.back+=p}if(a>>>=d,l-=d,t.back+=d,t.length=f,0===h){t.mode=16205;break}if(32&h){t.back=-1,t.mode=16191;break}if(64&h){e.msg="invalid literal/length code",t.mode=ie;break}t.extra=15&h,t.mode=16201;case 16201:if(t.extra){for(y=t.extra;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.length+=a&(1<<t.extra)-1,a>>>=t.extra,l-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=16202;case 16202:for(;h=(w=t.distcode[a&(1<<t.distbits)-1])>>>16&255,f=65535&w,!((d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(0==(240&h)){for(p=d,j=h,W=f;h=(w=t.distcode[W+((a&(1<<p+j)-1)>>p)])>>>16&255,f=65535&w,!(p+(d=w>>>24)<=l);){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}a>>>=p,l-=p,t.back+=p}if(a>>>=d,l-=d,t.back+=d,64&h){e.msg="invalid distance code",t.mode=ie;break}t.offset=f,t.extra=15&h,t.mode=16203;case 16203:if(t.extra){for(y=t.extra;l<y;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}t.offset+=a&(1<<t.extra)-1,a>>>=t.extra,l-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=ie;break}t.mode=16204;case 16204:if(0===s)break e;if(t.offset>(c=u-s)){if((c=t.offset-c)>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=ie;break}z=c>t.wnext?(c-=t.wnext,t.wsize-c):t.wnext-c,c>t.length&&(c=t.length),B=t.window}else B=F,z=i-t.offset,c=t.length;for(s-=c=s<c?s:c,t.length-=c;F[i++]=B[z++],--c;);0===t.length&&(t.mode=16200);break;case 16205:if(0===s)break e;F[i++]=t.length,s--,t.mode=16200;break;case 16206:if(t.wrap){for(;l<32;){if(0===o)break e;o--,a|=n[r++]<<l,l+=8}if(u-=s,e.total_out+=u,t.total+=u,4&t.wrap&&u&&(e.adler=t.check=(t.flags?Id:xd)(t.check,F,u,i-u)),u=s,4&t.wrap&&(t.flags?a:Fh(a))!==t.check){e.msg="incorrect data check",t.mode=ie;break}l=a=0}t.mode=16207;case 16207:if(t.wrap&&t.flags){for(;l<32;){if(0===o)break e;o--,a+=n[r++]<<l,l+=8}if(4&t.wrap&&a!==(4294967295&t.total)){e.msg="incorrect length check",t.mode=ie;break}l=a=0}t.mode=16208;case 16208:v=Zh;break e;case ie:v=$h;break e;case 16210:return Xh;default:return Kh}return e.next_out=i,e.avail_out=s,e.next_in=r,e.avail_in=o,t.hold=a,t.bits=l,(t.wsize||u!==e.avail_out&&t.mode<ie&&(t.mode<16206||N!==Hh))&&sf(e,e.output,e.next_out,u-e.avail_out),u-=e.avail_out,e.total_in+=U-=e.avail_in,e.total_out+=u,t.total+=u,4&t.wrap&&u&&(e.adler=t.check=(t.flags?Id:xd)(t.check,F,u,e.next_out-u)),e.data_type=t.bits+(t.last?64:0)+(16191===t.mode?128:0)+(16199===t.mode||16194===t.mode?256:0),v=(0==U&&0===u||N===Hh)&&v===Gh?Yh:v},mf=function(e){var t;return cf(e)?Kh:((t=e.state).window&&(t.window=null),e.state=null,Gh)},vf=function(e,t){return cf(e)||0==(2&(e=e.state).wrap)?Kh:((e.head=t).done=!1,Gh)},gf=function(e,t){var n,r=t.length;return cf(e)||0!==(n=e.state).wrap&&16190!==n.mode?Kh:16190===n.mode&&xd(1,t,r,0)!==n.check?$h:sf(e,t,r,r)?(n.mode=16210,Xh):(n.havedict=1,Gh)},yf=Object.prototype.toString,wf=S.Z_NO_FLUSH,bf=S.Z_FINISH,kf=S.Z_OK,_f=S.Z_STREAM_END,Sf=S.Z_NEED_DICT,Ef=S.Z_STREAM_ERROR,Cf=S.Z_DATA_ERROR,Rf=S.Z_MEM_ERROR,Of=S.Z_BUF_ERROR,xf={chunkSize:65536,windowBits:15,to:""};function Tf(e){this.options=hh({},xf,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 Ch,this.strm.avail_out=0,ff(this.strm,t.windowBits));if(e!==kf)throw new Error(Md[e]);if(this.header=new af,vf(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Eh(t.dictionary):"[object ArrayBuffer]"===yf.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=gf(this.strm,t.dictionary))!==kf)throw new Error(Md[e])}function If(e,t){t=new Tf(t);if(t.push(e,!0),t.err)throw t.msg||Md[t.err];return t.result}Tf.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?bf:wf,"[object ArrayBuffer]"===yf.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=pf(i,r))===Sf&&s&&((n=gf(i,s))===kf?n=pf(i,r):n===Cf&&(n=Sf));0<i.avail_in&&n===_f&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)hf(i),n=pf(i,r);switch(n){case Ef:case Cf:case Sf:case Rf:return this.onEnd(n),!(this.ended=!0)}var a,l,u,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===_f||0<r)&&("string"===this.options.to?(a=((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+_h[e[n]]>t?n:t})(i.output,i.next_out),l=i.next_out-a,u=((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 s=e[o++];if(s<128)r[i++]=s;else{var a=_h[s];if(4<a)r[i++]=65533,o+=a-1;else{for(s&=2===a?31:3===a?15:7;1<a&&o<n;)s=s<<6|63&e[o++],a--;1<a?r[i++]=65533:s<65536?r[i++]=s:(s-=65536,r[i++]=55296|s>>10&1023,r[i++]=56320|1023&s)}}}var l=r,u=i;if(u<65534&&l.subarray&&kh)return String.fromCharCode.apply(null,l.length===u?l:l.subarray(0,u));for(var c="",d=0;d<u;d++)c+=String.fromCharCode(l[d]);return c})(i.output,a),i.next_out=l,i.avail_out=o-l,l&&i.output.set(i.output.subarray(a,a+l),0),this.onData(u)):(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!==kf&&n!==Of||0!==c){if(n===_f)return n=mf(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===bf)return n=mf(this.strm),this.onEnd(n===kf?Of:n),!(this.ended=!0);break}}}return!0},Tf.prototype.onData=function(e){this.chunks.push(e)},Tf.prototype.onEnd=function(e){e===kf&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=fh(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var E={Inflate:Tf,inflate:If,inflateRaw:function(e,t){return(t=t||{}).raw=!0,If(e,t)},ungzip:If,constants:S},Mf={Deflate:Uh.Deflate,deflate:Uh.deflate,deflateRaw:Uh.deflateRaw,gzip:Uh.gzip,Inflate:E.Inflate,inflate:E.inflate,inflateRaw:E.inflateRaw,ungzip:E.ungzip,constants:S},Af=(Nf.prototype.uploadReplay=function(n){return I(this,void 0,void 0,function(){var t;return M(this,function(e){switch(e.label){case 0:if(this.isUploading)return xr("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)]:(g("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),g("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return Tr("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},Nf.prototype.doUploadWithRetry=function(r,i){return I(this,void 0,void 0,function(){var t,n;return M(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?(g("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]}})})},Nf.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 f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=Mf.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,s=r.length,a=i.length;return g("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(s/1024)+"KB -> base64 "+Math.round(a/1024)+"KB"),f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(n){return xr("Uploader","Events compression failed, fallback to plain_json:",n),f(f({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},Nf.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")},Nf.prototype.doUpload=function(i){return I(this,void 0,void 0,function(){var t,n,r;return M(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},g("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),r.length<65536||g("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]}})})},Nf.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(e){return Tr("Uploader","sendBeacon failed:",e),!1}},Nf.prototype.isUploadInProgress=function(){return this.isUploading},Nf.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},Nf),Pf=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),Lf=(Df.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,g("ClickDetector","Started"))},Df.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,g("ClickDetector","Stopped"))},Df.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||void 0}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},Df.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))},Df.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}))},Df.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},Df.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())},Df.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},Df.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},Df.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},Df.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},Df.prototype.getClickableElement=function(e){return e.matches(Pf)?e:e.closest(Pf)},Df.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},Df.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)}},Df.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(" > ")},Df.prototype.isActive=function(){return this.isRunning},Df);function Df(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 Nf(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 Ff(e){return Number.isNaN(e)?0:Math.max(0,Math.min(1,e))}function Uf(e){return Ff((e=e,(Number.isNaN(e)?0:Math.max(0,Math.min(100,e)))/100))}function zf(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bf(e,t){var e=!1===(e=e)||void 0===e?{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?Ff(e.sessionSampleRate):.1,errorSampleRate:"number"==typeof e.errorSampleRate?Ff(e.errorSampleRate):1,errorTraceback:void 0===e.errorTraceback||!!e.errorTraceback},t=t&&"object"==typeof t?t:null,n=e.enabled,r=(t&&zf(t,"enabled")&&(n=e.enabled&&!!t.enabled),e.sessionSampleRate),i=e.errorSampleRate,e=e.errorTraceback;return n&&t&&(zf(t,"replay_sample_rate")&&null!=t.replay_sample_rate&&(r=Uf(Number(t.replay_sample_rate))),zf(t,"error_traceback")&&null!=t.error_traceback&&(e=!!t.error_traceback),zf(t,"error_sample_rate"))&&null!=t.error_sample_rate&&(i=Uf(Number(t.error_sample_rate))),{enabled:n,sessionSampleRate:r,errorSampleRate:e?i:0,errorTraceback:e}}function jf(e,t){return f(f({},e),{enabled:t.enabled,sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,errorTraceback:t.errorTraceback})}function Wf(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 e({name:"sessionReplay"});var C=new e({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=jf(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()?(g("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()&&(g("Plugin","Remote SSR=0 with traceback on: demote session→buffer"),n.forceMode("buffer"),this.flushTimer)&&(clearInterval(this.flushTimer),this.flushTimer=null)):(g("Plugin","Effective policy no longer allows recording, stopping"),this.stopReplay(),null!=(t=this.eventBuffer)&&t.clear(),void n.forceMode(!1)):void 0;g("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=(Cr=i,e._effectiveReplayPolicy);i||(i=Bf(t,(n=e._prefetchedConfigData)&&"object"==typeof 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=jf(f(f({},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):g("Plugin","Not sampled by sampler, skipping")):g("Plugin","disabled by effective policy")},registerReplaySamplingCheck:function(t,e){function n(e){clearInterval(i),e?(g("Plugin","Session/policy rejected, stopping replay and clearing buffer"),r.stopReplay(),r.eventBuffer&&r.eventBuffer.clear()):g("Plugin","Session sampled, replay continues")}var r=this,i=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled&&(!(e=t._effectiveReplayPolicy)||e.enabled)?n(!1):n(!0))},50);t.lifeCycle.on("destroy",function(){clearInterval(i)})},parseConfig:function(e){return!0===e?{enabled:!0}:"object"==typeof e?f(f({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new Ir({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new Dr({},null!=(r=e.useCompression)&&r),this.samplerManager=new Dc({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new Lc({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?g("SessionReplay","Checkout in buffer mode (error traceback), skip flush"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(g("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 Af({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 Lf({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)}}),g("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(g("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=Mc(f({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):g("Plugin","Buffer mode - flush on error only")):Tr("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 s=0,a=n.attributes;s<a.length;s++){var l=a[s];if(null!=l&&l.attributes)for(var u=0,c=Object.entries(l.attributes);u<c.length;u++){var d=c[u],h=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(l.attributes[h]='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],s=n[o];"string"==typeof s&&s.length>t&&s.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 a=0,l=e.childNodes;a<l.length;a++){var u=l[a];this.sanitizeNodeTree(u,t)}}},handleSlowClick:function(e,t){g("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){g("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:f({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,h){return void 0===h&&(h=!1),I(this,void 0,void 0,function(){var t,n,r,i,o,s,a,l,u;return M(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&Wf(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(g("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(),!h&&n<10?(g("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(xr("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(e){return Tr("Flush","Failed to parse eventsJson from worker:",e),[2]}a=this.splitEventsIntoChunks(i),g("Flush","Flushing "+r.eventCount+" events in "+a.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,s=0,a=a,e.label=2;case 2:return s<a.length?(l=a[s],l=JSON.stringify(l),l={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:l},[4,this.uploader.uploadReplay(l)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return s++,[3,2];case 5:return l=this.eventBuffer.isUsingWorker(),u=l?"(worker)":"(sync)",g("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+u),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];xr("Split","Events size "+Math.round(r.length/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],s=2,a=0,l=e;a<l.length;a++){var u,c,d=l[a],h=JSON.stringify(d).length+1;0<o.length&&t<s+h&&(i.push(o),o=[],s=2),n<h?((c=2===(u=d.type)||4===u)?Tr:xr)("Split","Single event too large ("+Math.round(h/1024)+"KB), type="+u+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(d),s+=h)}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(),g("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)&&(g("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(n){}},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];void 0!==t&&-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,s=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=s.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(r=null==(i=o)?void 0:i.getOriginFrom)?void 0:r.call(i))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:v(),event_type:e,event_category:m.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),s.shouldSkipBufferFlush()?void g("Lifecycle","Buffer mode (error traceback), skip flush on hidden"):void s.flushReplayData(o,t,!0);"visible"===document.visibilityState&&(n(p.TAB_VISIBLE),(e=Date.now())-s._lastLifecycleSnapshotAt<5e3||(s._lastLifecycleSnapshotAt=e,null!=(e=s.recorderManager)&&e.takeFullSnapshot(),s.shouldSkipBufferFlush()?g("Lifecycle","Buffer mode (error traceback), skip flush on visible"):s.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){function t(){n.flushOnUnload(e)}var n=this;window.addEventListener("beforeunload",t),window.addEventListener("pagehide",t),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",t),window.removeEventListener("pagehide",t)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&Wf(e))if(this.shouldSkipBufferFlush())g("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,s=n;o<s.length;o++){var a=s[o],a={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(a)};this.uploader.sendBeacon(a)?r++:(i++,xr("Unload","sendBeacon rejected chunk (segment_id="+a.segment_id+"), likely exceeds 64KB browser limit or queue full"))}g("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,g("Plugin","destroyed")}}),Hf={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:void 0}},qf=new Set([p.JS_ERROR,p.PROMISE_ERROR,p.RESOURCE_ERROR,p.API_ERROR]),Vf=new Set([p.FORM_CHANGE,p.FORM_SUBMIT,p.FORM_SUBMIT_RESULT]),Gf=(new e({name:"struggleMonitor"}),new e({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?f({},Hf):e&&"object"==typeof e?f(f(f({},Hf),e),{click:f(f({},Hf.click),e.click||{}),performance:f(f({},Hf.performance),e.performance||{}),form:f(f({},Hf.form),e.form||{}),navigation:f(f({},Hf.navigation),e.navigation||{}),custom:f(f({},Hf.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:Hf).payloadAllowlist,enabled:!1!==e.enabled}):f(f({},Hf),{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 Lf({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||void 0)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_BLUR,e,e.form||void 0)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_CHANGE,e,e.form||void 0)}),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||void 0,n=o.buildFormBaseData(r,i,e,n),n={event_id:v(),event_type:p.FORM_SUBMIT_RESULT,event_category:m.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:f(f({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||void 0,event_properties:f(f({},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)||void 0,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"):void 0,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||void 0,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:rt(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:v(),timestamp:Date.now(),page_url:i};n!==p.FORM_FOCUS?n!==p.FORM_BLUR?n!==p.FORM_CHANGE?(i=f(f({},r),{event_type:p.FORM_SUBMIT,event_category:m.BEHAVIOR,data:f(f({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(n=f(f({},r),{event_type:p.FORM_CHANGE,event_category:m.BEHAVIOR,data:t}),null!=(i=e.reportTDEMEvent)&&i.call(e,n)):(i=f(f({},r),{event_type:p.FORM_BLUR,event_category:m.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(n=f(f({},r),{event_type:p.FORM_FOCUS,event_category:m.BEHAVIOR,data:t}),null!=(i=e.reportTDEMEvent)&&i.call(e,n))},onClickStart:function(e,t,n){var r,i=t.config.click||Hf.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,f(f({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:void 0;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,s){void 0===o&&(o=Date.now());var e,a=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||a<n||"spa_navigation"!==i&&"page_unload"!==i&&s&&e.pageUrl&&s!==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||Hf.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 A(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(e){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:void 0,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,s=this,a=Date.now(),n=o.config.click||Hf.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 a-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==p.STRUGGLE&&(t=e.timestamp||a,n=s.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}),s.linkPendingDeadClickToClickEvent(o,e,r)):(s.isEffectiveActionEvent(o,e)&&(s.resolvePendingDeadClicks(o,s.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(s.getEffectiveActionReason(e))),qf.has(e.event_type)?s.tryReportErrorClick(i,o,e):e.event_type===p.PAGE_LOAD||e.event_type===p.true?s.tryReportSlowPage(i,o,e):e.event_type===p.FORM_FOCUS?(s.trackFormFocus(o,e),s.trackFormChangeAndZigzag(i,o,e)):e.event_type===p.FORM_CHANGE?s.trackFormChangeAndZigzag(i,o,e):e.event_type===p.FORM_BLUR?s.tryReportLongFocusTime(i,o,e):e.event_type===p.FORM_SUBMIT?s.trackFormSubmitResult(o,e):e.event_type===p.FORM_SUBMIT_RESULT?(s.trackFormSubmitResult(o,e),s.tryReportFormValidationError(i,o,e)):e.event_type===p.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&s.tryReportBackForward(i,o,e)),s.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):Vf.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,s,a;n.event_type!==p.FORM_CHANGE?n.event_type!==p.FORM_FOCUS||(a=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(a=a.slice(-4))[0],s=a[1],!o)||!s||o===s||o!==a[2]||s!==a[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,a=null!=(s=null==(o=t.config.form)?void 0:o.zigzagMinCount)?s:2,i.zigzagHits<a)||(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==(s=null==r?void 0:r.data)?void 0:s.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,s,a;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(s=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(s=n.changedFieldIds.size/s)<(a=null!=(a=null==(a=t.config.form)?void 0:a.incompleteMinFieldRatio)?a:.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]:void 0,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(s.toFixed(4)),threshold_ratio:a}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,s,a=String((null==(a=null==n?void 0:n.data)?void 0:a.field_id)||"");a&&(i=t.focusStartMap.get(a))&&(t.focusStartMap.delete(a),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(s=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:a,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(r=null==n?void 0:n.data)?void 0:r.form_id)||i.formId,fieldId:a,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:s,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||Hf.click).errorClickWindowMs)?o:3e3,o=A(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,s=t.config.performance||Hf.performance;s.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=s.slowPageLcpThreshold)?o:4e3,s=null!=(s=s.slowPageInpThreshold)?s:500,o<=r||s<=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,s,a=(null==(a=null==n?void 0:n.data)?void 0:a.event_properties)||{},l=(null==n?void 0:n.data)||{};"fail"===String((null==a?void 0:a.status)||(null===(i=l)?void 0:i.status)||"")&&(i=String((null==a?void 0:a.field_id)||(null===(i=l)?void 0:i.field_id)||""),o=String((null==a?void 0:a.form_id)||(null===(o=l)?void 0:o.form_id)||""),s=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:s,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==a?void 0:a.validation_code)||(null===(r=l)?void 0:r.validation_code),validation_message:null==(e=null==n?void 0:n.data)?void 0:e.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||Hf.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||Hf.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=f(f({},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()}}));function Zf(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:void 0!==n.replay_sample_rate?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(e){}}function Jf(e){return e._tdemSampleGate||null}function Kf(e,t,n){e=Jf(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 $f(e,t){var t=Bf(e.config.sessionReplay,t),n=(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})),e=null==(e=null==n?void 0:n.option)?void 0:e.applyEffectivePolicy;"function"==typeof e&&e.call(n.option,t)}function Xf(e){var t={};return e&&"object"==typeof 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 Yf(e,t,n){var r,i=Jf(e);i&&((t=t?(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(e){return null}})(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate),n._cachedSampleRate=t.sampleRate,r={},void 0!==t.remoteEnabled&&(r.enabled=t.remoteEnabled),void 0!==t.replaySampleRate&&(r.replay_sample_rate=t.replaySampleRate),void 0!==t.errorTraceback&&(r.error_traceback=t.errorTraceback),void 0!==t.errorSampleRate&&(r.error_sample_rate=t.errorSampleRate),n._cachedRemote=r,n=void 0!==t.remoteEnabled?!!t.remoteEnabled:0<t.sampleRate,Kf(e,t.sampleRate,n),$f(e,r)):(console.warn("[TDEM] No cached config, default to not report"),i.decide(!1),$f(e,null)))}var Qf=new e({name:"tdemConfig",_cachedSampleRate:null,_cachedRemote:null,onNewTdem:function(e){var t=this,n=e._prefetchedConfigData;$f(e,n?Xf(n):null),function(l,u){I(this,void 0,void 0,function(){var n,r,i,o,s,a;return M(this,function(e){switch(e.label){case 0:if(!(n=l.config.id))return Yf(l,n,u),[2];if(r=l._prefetchedConfigData)return delete l._prefetchedConfigData,i=r.tdem_sample_rate,o=r.enabled,s=Xf(r),Zf(n,i,s),u._cachedSampleRate=i,u._cachedRemote=s,Kf(l,i,o),$f(l,s),[2];if(t=(l.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return Yf(l,n,u),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,l.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(a=e.sent()).ok)throw new Error("HTTP "+a.status);if(0===(a="string"==typeof a.body?JSON.parse(a.body):a.body).code&&a.data)return i=a.data.tdem_sample_rate,o=a.data.enabled,s=Xf(a.data),Zf(n,i,s),u._cachedSampleRate=i,u._cachedRemote=s,Kf(l,i,o),$f(l,s),[3,4];throw new Error("API error: code="+a.code);case 3:return a=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",a),Yf(l,n,u),[3,4];case 4:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=Jf(e);n&&n.isDecided&&null!=(t=this._cachedSampleRate)&&(n=n.reDecide(t),t=e._effectiveReplayPolicy,e._replaySampled=n&&(!t||t.enabled),console.info("[TDEM] Session refreshed, session="+n+", replayPolicyEnabled="+(null==t?void 0:t.enabled)))}});return yr.use(Jt),yr.use(Bt),yr.use(ot),yr.use(sr),yr.use(rr),yr.use(tt),yr.use(n),yr.use(lr),yr.use(kr),yr.use(Qt),yr.use(nn),yr.use(Wt),yr.use(Qf),yr.use(C),yr.use(Gf),yr})();
|