PageSourceSearch

https://www.eightsleep.com/_next/static/chunks/19967-167178c3f7753bbd.js

js eightsleep.com collected 2026-09-24 17:35:17 UTC 117,228 bytes, 5 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19967,22274,67036,99893],{4853:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20555:()=>{},25702:(e,t,n)=>{"use strict";n.d(t,{H:()=>s});var r=n(71450),i=n(76760),o=n.n(i),s=function(e){var t,n=this;void 0===e&&(e={});var i=e.osName,s=void 0===i||i,a=e.osVersion,c=void 0===a||a,u=e.deviceManufacturer,l=void 0===u||u,d=e.deviceModel,f=void 0===d||d;return{name:"@amplitude/plugin-user-agent-enrichment-browser",type:"enrichment",setup:function(e){return(0,r.sH)(this,void 0,void 0,function(){var n;return(0,r.YH)(this,function(r){return"undefined"!=typeof navigator&&(n=navigator.userAgent),t=new(o())(n).getResult(),e.loggerProvider.log("Installing @amplitude/plugin-user-agent-enrichment-browser."),[2]})})},execute:function(e){return(0,r.sH)(n,void 0,void 0,function(){var n,i,o,a;return(0,r.YH)(this,function(u){return n=t.browser.name,i=t.browser.version,o=t.device.model||t.os.name,a=t.device.vendor,[2,(0,r.Cl)((0,r.Cl)((0,r.Cl)((0,r.Cl)((0,r.Cl)({},e),s&&{os_name:n}),c&&{os_version:i}),l&&{device_manufacturer:a}),f&&{device_model:o})]})})}}}},25959:(e,t,n)=>{"use strict";n.d(t,{v:()=>c,P:()=>s});var r=n(12115);let i=e=>{let t,n=new Set,r=(e,r)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=r?r:"object"!=typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,o);return o},o=e=>e;function s(e,t=o){let n=r.useSyncExternalStore(e.subscribe,r.useCallback(()=>t(e.getState()),[e,t]),r.useCallback(()=>t(e.getInitialState()),[e,t]));return r.useDebugValue(n),n}let a=e=>{let t=(e=>e?i(e):i)(e),n=e=>s(t,e);return Object.assign(n,t),n},c=e=>e?a(e):a},28090:e=>{e.exports={style:{fontFamily:"'NeueMontreal', 'NeueMontreal Fallback'",fontStyle:"normal"},className:"__className_a95a1a",variable:"__variable_a95a1a"}},29001:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ESCAPE_REGEX:function(){return r},htmlEscapeAttributeString:function(){return a},htmlEscapeJsonString:function(){return s}});let n={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},r=/[&><\u2028\u2029]/g,i={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},o=/[&"'<>]/g;function s(e){return e.replace(r,e=>n[e])}function a(e){return e.replace(o,e=>i[e])}},37025:(e,t,n)=>{"use strict";n.d(t,{j:()=>c});var r=n(12115),i=n(87358);function o(){return"undefined"!=typeof window}function s(){return"production"}function a(){return"development"===((o()?window.vam:s())||"production")}function c(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{var t;!function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!0};if(!o())return;!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";if("auto"===e){window.vam=s();return}window.vam=e}(t.mode),window.va||(window.va=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];(window.vaq=window.vaq||[]).push(t)}),t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend));let n=t.scriptSrc?t.scriptSrc:a()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?"".concat(t.basePath,"/insights/script.
1js"):"/_vercel/insights/script.js";if(document.head.querySelector('script[src*="'.concat(n,'"]')))return;let r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(t.framework?"/".concat(t.framework):""),r.dataset.sdkv="1.5.0",t.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),t.endpoint?r.dataset.endpoint=t.endpoint:t.basePath&&(r.dataset.endpoint="".concat(t.basePath,"/insights")),t.dsn&&(r.dataset.dsn=t.dsn),r.onerror=()=>{let e=a()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log("[Vercel Web Analytics] Failed to load script from ".concat(n,". ").concat(e))},a()&&!1===t.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}({framework:e.framework||"react",basePath:null!=(t=e.basePath)?t:function(){if(void 0!==i&&void 0!==i.env)return i.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function(e){var t;let{route:n,path:r}=e;null==(t=window.va)||t.call(window,"pageview",{route:n,path:r})}({route:e.route,path:e.path})},[e.route,e.path]),null}},41402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return p},initScriptLoader:function(){return g}});let r=n(28140),i=n(49417),o=n(95155),s=r._(n(47650)),a=i._(n(12115)),c=n(82073),u=n(94681),l=n(4853),d=n(29001),f=new Map,h=new Set,v=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:i=null,dangerouslySetInnerHTML:o,children:a="",strategy:c="afterInteractive",onError:l,stylesheets:d}=e,v=n||t;if(v&&h.has(v))return;if(f.has(t)){h.add(v),f.get(t).then(r,l);return}let p=()=>{i&&i(),h.add(v)},g=document.createElement("script"),m=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),r&&r.call(this,t),p()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});o?(g.innerHTML=o.__html||"",p()):a?(g.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",p()):t&&(g.src=t,f.set(t,m)),(0,u.setAttributesFromProps)(g,e),"worker"===c&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",c),d&&(e=>{if(s.default.preinit)return e.forEach(e=>{s.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}})(d),document.body.appendChild(g)};function p(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,l.requestIdleCallback)(()=>v(e))}):v(e)}function g(e){e.forEach(p),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");h.add(t)})}function m(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:i=null,strategy:u="afterInteractive",onError:f,stylesheets:p,...g}=e,{updateScripts:m,scripts:b,getIsSsr:y,appDir:w,nonce:S}=(0,a.useContext)(c.HeadManagerContext);S=g.nonce||S;let C=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=t||n;C.current||(i&&e&&h.has(e)&&i(),C.current=!0)},[i,t,n]);let E=(0,a.useRef)(!1);if((0,a.useEffect)(()=>{if(!E.current){if("afterInteractive"===u)v(e);else"lazyOnload"===u&&("complete"===document.readyState?(0,l.requestIdleCallback)(()=>v(e)):window.addEventListener("load",()=>{(0,l.requestIdleCallback)(()=>v(e))}));E.current=!0}},[e,u]),("beforeInteractive"===u||"worker"===u)&&(m?(b[u]=(b[u]||[]).concat([{id:t,src:n,onLoad:r,onReady:i,onError:f,...g,nonce:S}]),m(b)):y&&y()?h.add(t||n):y&&!y()&&v({...e,nonce:S})),w){if(p&&p.forEach(e=>{s.default.preinit(e,{as:"style"})}),"beforeInteractive"===u)if(!n)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:S,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,d.htmlEscapeJsonString)(JSON.stringify([0,{...g,id:t}]))+")"}});else return s.default.preload(n,g.integrity?{as:"script",integrity:g.integrity,nonce:S,crossOrigin:g.crossOrigin}:{as:"script",nonce:S,crossOrigin:g.crossOrigin}),(0,o.jsx)("script",{nonce:S,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+(0,d.htmlEscapeJsonString)(JSON.stringify([n,{...g,id:t}]))+")"}});"afterInteractive"===u&&n&&s.default.preload(n,g.integrity?{as:"script",integrity:g.integrity,nonce:S,crossOrigin:g.crossOrigin}:{as:"script",nonce:S,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(m,"__nextScript",{value:!0});let b=m;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41606:(e,t,n)=>{"use strict";n.d(t,{hq:()=>g,d6:()=>b});var r=function(){return(r=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)},i=function(e,t){return t.reduce(function(e,t){return e[t]},e)},o=function(e,t,n){if(0===t.length)return n(e);var r=t[0],i=t.slice(1),c=o(e[r],i,n);return Array.isArray(e)?s(e,Number(r),c):a(e,r,c)},s=function(e,t,n){return e.map(function(e,r){return r===t?n:e})},a=function(e,t,n){var i;return r(r({},e),((i={})[t]=n,i))},c=function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(n){return e[n]===t[n]})},u=function(e){return!!e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype},l=function(){return(l=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)},d=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},f=Symbol("lens meta"),h=Symbol("store context");function v(e,t,n){var r=void 0===n?void 0:"string"==typeof n?[n]:n;return[function(n,s){for(var a=[],h=2;h<arguments.length;h++)a[h-2]=arguments[h];return e.apply(void 0,d([function(e){var h,v,p,g,m=r?i(e,r):e,b="function"==typeof n?n(m):n,y=u(m),w=r?i(t(),r):t();if(y&&m!==w){b&&Object.assign(m,b);var S=null==(v=null==(h=w[f])?void 0:h.postprocess)?void 0:v.call.apply(v,d([h,m,w],a,!1));S&&Object.assign(m,S);return}var C=s||!y?b:l(l({},m),b),E=y?l(l({},C),null==(g=null==(p=C[f])?void 0:p.postprocess)?void 0:g.call.apply(g,d([p,C,m],a,!1))):C;return(y?c(m,E):Object.is(m,E))?e:r?o(e,r,function(){return E}):E},!r&&s],a,!1))},function(){return r?i(t(),r):t()}]}var p="@dhmk/LENS_TAG";function g(e){var t=function(t,n,r,i){var o=v(t,n,i.relativePath),s=o[0],a=o[1];return i.set=s,i.get=a,e(s,a,r,i)};return t[p]=!0,t}var m=function(e,t){var n,r,i=e;return u(e)&&(i={},[].concat(Object.getOwnPropertyNames(e),null!=(r=null==(n=Object.getOwnPropertySymbols)?void 0:n.call(Object,e))?r:[]).forEach(function(n){var r,o,s=e[n];if("symbol"==typeof n){i[n]=s;return}var a=t.set,c=t.get,u=t.relativePath.concat(n);if((r=s)&&r[p]){var l={set:void 0,get:void 0,api:t.api,rootPath:t.rootPath.concat(n),relativePath:t.relativePath.concat(n),atomic:t.atomic===y?w:t.atomic},d=function(e){return e()};(null==(o=(s=s(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.atomic(function(){return d(function(){return t.set.apply(t,e)},l)})},t.get,t.api,l))[f])?void 0:o.setter)&&(d=s[f].setter),a=l.set,c=l.get,u=[]}i[n]=m(s,{set:a,get:c,api:t.api,rootPath:t.rootPath.concat(n),relativePath:u,atomic:t.atomic})})),i},b=function(e){return function(t,n,r){var i,o,s,a=null!=(o=null==(i=r[h])?void 0:i.atomic)?o:y,c=function(e){return e()},u=v(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return a(function(){return c(function(){return t.apply(void 0,e)},l)})},n,void 0)[0],l={set:u,get:n,api:r,rootPath:[],relativePath:[],atomic:a},d=m("function"==typeof e?e(u,n,r):e,l);return(null==(s=d[f])?void 0:s.setter)&&(c=d[f].setter),d}},y=function(e){return e()},w=function(e){return console.warn("You must include `atomic` middleware."),y(e)}},41950:(e,t,n)=>{"use strict";n.d(t,{j:()=>tM});var r,i,o,s,a,c,u,l,d,f=n(71450),h=n(39928),v=n(31760),p=n(91905),g=n(74459),m=n(20030),b=n(38897);!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(r||(r={}));var y=n(95690),w="[Amplitude]",S="".concat(w," Session Replay ID"),C=r.US,E={enabled:!0},I="".concat(w," Session Replay Debug"),k="amp-mask";y.r,!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision"}(i||(i={}));var P=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){if(!this.logger)return function(){};var t,n=this.logger[e];return"function"==typeof n?(null!=(t=n.__rrweb_original__)?t:n).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),_=n(87449),x="medium",T=function(e,t,n){switch(t){case"light":if("input"!==e)return!0;var r,i,o=n?(i=(r=n).type,r.hasAttribute("data-rr-is-password")?"password":i?i.toLowerCase():null):"";if(!o)return!1;if(["password","hidden","email","tel"].includes(o)||n.autocomplete.startsWith("cc-"))return!0;return!1;case"medium":case"conservative":return!0;default:return T(e,x,n)}},R=function(e,t,n){var r,i,o;if(void 0===t&&(t={defaultMaskLevel:x}),n){if(n.closest("."+k)||(null!=(r=t.maskSelector)?r:[]).some(function(e){return n.closest(e)}))return!0;
1if(n.closest(".amp-unmask")||(null!=(i=t.unmaskSelector)?i:[]).some(function(e){return n.closest(e)}))return!1}return T(e,null!=(o=t.defaultMaskLevel)?o:x,n)},O=function(e,t){return function(n,r){return R(e,t,r)?n.replace(/[^\s]/g,"*"):n}},M=function(){var e=(0,_.m)();return(null==e?void 0:e.location)?e.location.href:""},N=function(e,t){return t||(e===r.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===r.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")},D=function(e){var t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp("^".concat(t,"$"))},H=function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){var t;return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t)}))throw Error("ugcFilterRules must be an array of objects with valid globs")},L=function(e,t){var n,r;try{for(var i=(0,f.Ju)(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=D(s.selector);if(a.test(e))return e.replace(a,s.replacement)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},A=function(){return(0,f.sH)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,f.YH)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),!(e=(0,_.m)()))return[3,2];return[4,e.navigator.storage.estimate()];case 1:return n=(t=i.sent()).usage,r=t.quota,[2,{totalStorageSize:n?Math.round(n/1024):0,percentOfQuota:n&&r?Math.round((n/r+Number.EPSILON)*1e3)/1e3:0,usageDetails:JSON.stringify(t.usageDetails)}];case 2:return[3,4];case 3:return i.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},q=function(e){var t=(0,f.Cl)({},e),n=t.apiKey;return t.apiKey="****".concat(n.substring(n.length-4)),t},j=function(){return{flushMaxRetries:2,logLevel:p.$.Warn,loggerProvider:new g.V,transportProvider:new m.m}},U=function(e){function t(t,n){var r,i,o,s,a,c=this,u=j();return(c=e.call(this,(0,f.Cl)((0,f.Cl)({transportProvider:u.transportProvider,loggerProvider:new P(n.loggerProvider||u.loggerProvider)},n),{apiKey:t}))||this).flushMaxRetries=void 0!==n.flushMaxRetries&&n.flushMaxRetries<=u.flushMaxRetries?n.flushMaxRetries:u.flushMaxRetries,c.apiKey=t,c.sampleRate=n.sampleRate||0,c.serverZone=n.serverZone||C,c.configServerUrl=n.configServerUrl,c.trackServerUrl=n.trackServerUrl,c.shouldInlineStylesheet=n.shouldInlineStylesheet,c.version=n.version,c.performanceConfig=n.performanceConfig||E,c.storeType=null!=(r=n.storeType)?r:"idb",c.applyBackgroundColorToBlockedElements=null!=(i=n.applyBackgroundColorToBlockedElements)&&i,c.enableUrlChangePolling=null!=(o=n.enableUrlChangePolling)&&o,c.urlChangePollingInterval=null!=(s=n.urlChangePollingInterval)?s:1e3,c.captureDocumentTitle=null!=(a=n.captureDocumentTitle)&&a,n.privacyConfig&&(c.privacyConfig=n.privacyConfig),n.interactionConfig&&(c.interactionConfig=n.interactionConfig,c.interactionConfig.ugcFilterRules&&H(c.interactionConfig.ugcFilterRules)),n.debugMode&&(c.debugMode=n.debugMode),n.experimental&&(c.experimental=n.experimental),n.omitElementTags&&(c.omitElementTags=n.omitElementTags),c}return(0,f.C6)(t,e),t}(b.TS),B=n(11641),F=n(43272),z=n(37491),Y=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Y||{}),K=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(K||{}),V=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(V||{}),W=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(W||{}),J=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(J||{}),G=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(G||{}),$=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))($||{}),X=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(X||{}),Q=n(60370),Z=function(e,t){var n=document.createDocumentFragment(),r=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{n.querySelector(e)}catch(n){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invali
1d')),!1}return!0})).length)return e};return e.blockSelector=r(e.blockSelector),e.maskSelector=r(e.maskSelector),e.unmaskSelector=r(e.unmaskSelector),e},ee=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,t,n;return(0,f.sH)(this,void 0,void 0,function(){var r,i,o,s,a,c,u,l,d,h,v,p,g,m,b,y,w=this;return(0,f.YH)(this,function(S){switch(S.label){case 0:return(r=(0,f.Cl)({},this.localConfig)).optOut=this.localConfig.optOut,r.captureEnabled=!0,[4,new Promise(function(e){w.remoteConfigClient.subscribe("configs.sessionReplay","all",function(t,n){var o;if(w.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(n,":"),JSON.stringify(t,null,2)),t){var s=t.sr_sampling_config,a=t.sr_privacy_config,c=t.sr_targeting_config,u=null==(o=r.interactionConfig)?void 0:o.ugcFilterRules;r.interactionConfig=t.sr_interaction_config,r.interactionConfig&&u&&(r.interactionConfig.ugcFilterRules=u),r.loggingConfig=t.sr_logging_config,(s||a||c)&&(i={},s&&(i.sr_sampling_config=s),a&&(i.sr_privacy_config=a),c&&(i.sr_targeting_config=c))}e()})})];case 1:if(S.sent(),!i)return[2,{localConfig:this.localConfig,joinedConfig:r,remoteConfig:i}];if(o=i.sr_sampling_config,s=i.sr_privacy_config,a=i.sr_targeting_config,o&&Object.keys(o).length>0?(Object.prototype.hasOwnProperty.call(o,"capture_enabled")?r.captureEnabled=o.capture_enabled:r.captureEnabled=!1,Object.prototype.hasOwnProperty.call(o,"sample_rate")&&(r.sampleRate=o.sample_rate)):(r.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),s){c=null!=(e=r.privacyConfig)?e:{},u={defaultMaskLevel:null!=(n=null!=(t=s.defaultMaskLevel)?t:c.defaultMaskLevel)?n:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},l=function(e){var t,n,r,i,o,s,a,c,u,l={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=(0,f.Ju)(null!=(a=e.blockSelector)?a:[]),h=d.next();!h.done;h=d.next()){var v=h.value;l[v]="block"}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var p=(0,f.Ju)(null!=(c=e.maskSelector)?c:[]),g=p.next();!g.done;g=p.next()){var v=g.value;l[v]="mask"}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}try{for(var m=(0,f.Ju)(null!=(u=e.unmaskSelector)?u:[]),b=m.next();!b.done;b=m.next()){var v=b.value;l[v]="unmask"}}catch(e){o={error:e}}finally{try{b&&!b.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}return l},d=(0,f.Cl)((0,f.Cl)({},l(c)),l(s));try{for(v=(h=(0,f.Ju)(Object.entries(d))).next();!v.done;v=h.next())g=(p=(0,f.zs)(v.value,2))[0],m=p[1],"mask"===m?u.maskSelector.push(g):"block"===m?u.blockSelector.push(g):"unmask"===m&&u.unmaskSelector.push(g)}catch(e){b={error:e}}finally{try{v&&!v.done&&(y=h.return)&&y.call(h)}finally{if(b)throw b.error}}r.privacyConfig=Z(u,this.localConfig.loggerProvider)}return a&&Object.keys(a).length>0&&(r.targetingConfig=a),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:q(r)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:r,remoteConfig:i}]}})})},e}(),et=Uint8Array,en=Uint16Array,er=Uint32Array,ei=new et([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),eo=new et([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),es=new et([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ea=function(e,t){for(var n=new en(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new er(n[30]),r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},ec=ea(ei,2),eu=ec[0],el=ec[1];eu[28]=258,el[258]=28;for(var ed=ea(eo,0),ef=(ed[0],ed[1]),eh=new en(32768),ev=0;ev<32768;++ev){var ep=(43690&ev)>>>1|(21845&ev)<<1;ep=(61680&(ep=(52428&ep)>>>2|(13107&ep)<<2))>>>4|(3855&ep)<<4,eh[ev]=((65280&ep)>>>8|(255&ep)<<8)>>>1}for(var eg=function(e,t,n){for(var r,i=e.length,o=0,s=new en(t);o<i;++o)++s[e[o]-1];var a=new en(t);for(o=0;o<t;
1++o)a[o]=a[o-1]+s[o-1]<<1;if(n){r=new en(1<<t);var c=15-t;for(o=0;o<i;++o)if(e[o])for(var u=o<<4|e[o],l=t-e[o],d=a[e[o]-1]++<<l,f=d|(1<<l)-1;d<=f;++d)r[eh[d]>>>c]=u}else for(o=0,r=new en(i);o<i;++o)r[o]=eh[a[e[o]-1]++]>>>15-e[o];return r},em=new et(288),ev=0;ev<144;++ev)em[ev]=8;for(var ev=144;ev<256;++ev)em[ev]=9;for(var ev=256;ev<280;++ev)em[ev]=7;for(var ev=280;ev<288;++ev)em[ev]=8;for(var eb=new et(32),ev=0;ev<32;++ev)eb[ev]=5;var ey=eg(em,9,0),ew=eg(eb,5,0),eS=function(e){return(e/8|0)+(7&e&&1)},eC=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof en?en:e instanceof er?er:et)(n-t);return r.set(e.subarray(t,n)),r},eE=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},eI=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},ek=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new et(0),0];if(1==i){var s=new et(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var a=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};l!=i-1;)a=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:a.f+c.f,l:a,r:c};for(var f=o[0].s,r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var h=new en(f+1),v=eP(n[l-1],h,0);if(v>t){var r=0,p=0,g=v-t,m=1<<g;for(o.sort(function(e,t){return h[t.s]-h[e.s]||e.f-t.f});r<i;++r){var b=o[r].s;if(h[b]>t)p+=m-(1<<v-h[b]),h[b]=t;else break}for(p>>>=g;p>0;){var y=o[r].s;h[y]<t?p-=1<<t-h[y]++-1:++r}for(;r>=0&&p;--r){var w=o[r].s;h[w]==t&&(--h[w],++p)}v=t}return[new et(h),v]},eP=function(e,t,n){return -1==e.s?Math.max(eP(e.l,t,n+1),eP(e.r,t,n+1)):t[e.s]=n},e_=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new en(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},ex=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},eT=function(e,t,n){var r=n.length,i=eS(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return(i+4+r)*8},eR=function(e,t,n,r,i,o,s,a,c,u,l){eE(t,l++,n),++i[256];for(var d,f,h,v,p=ek(i,15),g=p[0],m=p[1],b=ek(o,15),y=b[0],w=b[1],S=e_(g),C=S[0],E=S[1],I=e_(y),k=I[0],P=I[1],_=new en(19),x=0;x<C.length;++x)_[31&C[x]]++;for(var x=0;x<k.length;++x)_[31&k[x]]++;for(var T=ek(_,7),R=T[0],O=T[1],M=19;M>4&&!R[es[M-1]];--M);var N=u+5<<3,D=ex(i,em)+ex(o,eb)+s,H=ex(i,g)+ex(o,y)+s+14+3*M+ex(_,R)+(2*_[16]+3*_[17]+7*_[18]);if(N<=D&&N<=H)return eT(t,l,e.subarray(c,c+u));if(eE(t,l,1+(H<D)),l+=2,H<D){d=eg(g,m,0),f=g,h=eg(y,w,0),v=y;var L=eg(R,O,0);eE(t,l,E-257),eE(t,l+5,P-1),eE(t,l+10,M-4),l+=14;for(var x=0;x<M;++x)eE(t,l+3*x,R[es[x]]);l+=3*M;for(var A=[C,k],q=0;q<2;++q)for(var j=A[q],x=0;x<j.length;++x){var U=31&j[x];eE(t,l,L[U]),l+=R[U],U>15&&(eE(t,l,j[x]>>>5&127),l+=j[x]>>>12)}}else d=ey,f=em,h=ew,v=eb;for(var x=0;x<a;++x)if(r[x]>255){var U=r[x]>>>18&31;eI(t,l,d[U+257]),l+=f[U+257],U>7&&(eE(t,l,r[x]>>>23&31),l+=ei[U]);var B=31&r[x];eI(t,l,h[B]),l+=v[B],B>3&&(eI(t,l,r[x]>>>5&8191),l+=eo[B])}else eI(t,l,d[r[x]]),l+=f[r[x]];return eI(t,l,d[256]),l+f[256]},eO=new er([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),eM=function(e,t,n,r,i,o){var s=e.length,a=new et(r+s+5*(1+Math.floor(s/7e3))+i),c=a.subarray(r,a.length-i),u=0;if(!t||s<8)for(var l=0;l<=s;l+=65535){var d=l+65535;d<s?u=eT(c,u,e.subarray(l,d)):(c[l]=o,u=eT(c,u,e.subarray(l,s)))}else{for(var f=eO[t-1],h=f>>>13,v=8191&f,p=(1<<n)-1,g=new en(32768),m=new en(p+1),b=Math.ceil(n/3),y=2*b,w=function(t){return(e[t]^e[t+1]<<b^e[t+2]<<y)&p},S=new er(25e3),C=new en(288),E=new en(32),I=0,k=0,l=0,P=0,_=0,x=0;l<s;++l){var T=w(l),R=32767&l,O=m[T];if(g[R]=O,m[T]=R,_<=l){var M=s-l;if((I>7e3||P>24576)&&M>423){u=eR(e,c,0,S,C,E,k,P,x,l-x,u),P=I=k=0,x=l;for(var N=0;N<286;++N)C[N]=0;for(var N=0;N<30;++N)E[N]=0}var D=2,H=0,L=v,A=R-O&32767;if(M>2&&T==w(l-A))for(var q=Math.min(h,M)-1,j=Math.min(32767,l),U=Math.min(258,M);A<=j&&--L&&R!=O;){if(e[l+D]==e[l+D-A]){for(var B=0;B<U&&e[l+B]==e[l+B-A];++B);if(B>D){if(D=B,H=A,B>q)break;for(var F=Math.min(A,B-2),z=0,N=0;N<F;++N){var Y=l-A+N+32768&32767,K=g[Y],V=Y-K+32768&32767;V>z&&(z=V,O=Y)}}}O=g[R=O],A+=R-O+32768&32767}if(H){S[P++]=0x10000000|el[D]<<18|ef[H];var W=31&el[D],J=31&ef[H];k+=ei[W]+eo[J],++C[257+W],++E[J],_=l+D,++I}else S[P++]=e[l],++C[e[l]]}}u=eR(e,c,o,S,C,E,k,P,x,l-x,u)}return eC(a,0,r+eS(u)+i)},eN=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,o=n.length,s=0;s!=o;){for(var a=Math.min(s+5552,o);s<a;++s)r+=n[s],i+=r;r%=65521,i%=65521}e=r,t=i},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+((255&e)<<23)*2}}},eD=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},eH=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},eL=function(){function e(e,t,n,r){var i,o=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){return JSON.stringify(function(e,t){var n="";if(!t&&"undefined"!=typeof TextDecoder)return new TextDecoder().decode(e);for(var r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((31&i)<<6|63&e[r++]):i<240?n+=String.fromCharCode((1
15&i)<<12|(63&e[r++])<<6|63&e[r++]):n+=String.fromCharCode(55296|(i=((15&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&i)}return n}(function(e,t){void 0===t&&(t={});var n,r=eN();r.p(e);var i=eM(e,null==(n=t).level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+n.mem,2,4,!0);return eH(i,t),eD(i,i.length-4,r.d()),i}(function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return new TextEncoder().encode(e);for(var r=new et(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;s<n;++s){if(i+5>r.length){var a=new et(i+8+(n-s<<1));a.set(r),r=a}var c=e.charCodeAt(s);c<128?o(c):(c<2048?o(192|c>>>6):(c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++s))>>>18),o(128|c>>>12&63)):o(224|c>>>12),o(128|c>>>6&63)),o(128|63&c))}return eC(r,0,i)}(JSON.stringify({...e,v:"v1"}))),!0))},this.addCompressedEventToManager=function(e,t){o.eventsManager&&o.deviceId&&o.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:o.deviceId})},this.addCompressedEvent=function(e,t){if(o.worker)try{o.worker.postMessage({event:e,sessionId:t})}catch(n){"DataCloneError"===n.name?o.worker.postMessage(JSON.stringify({event:e,sessionId:t})):o.config.loggerProvider.warn("Unexpected error while posting message to worker:",n)}else{var n=o.compressEvent(e);o.addCompressedEventToManager(n,t)}},this.terminate=function(){var e;null==(e=o.worker)||e.terminate()};var s=(0,_.m)();if(this.canUseIdleCallback=s&&"requestIdleCallback"in s,this.eventsManager=e,this.config=t,this.deviceId=n,this.timeout=(null==(i=t.performanceConfig)?void 0:i.timeout)||2e3,r){t.loggerProvider.log("[Experimental] Enabling web worker for compression");var a=new Worker(URL.createObjectURL(new Blob([r],{type:"application/javascript"})));a.onerror=function(e){t.loggerProvider.error(e)},a.onmessage=function(e){var t=e.data,n=t.compressedEvent,r=t.sessionId;o.addCompressedEventToManager(n,r)},this.worker=a}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var n;this.canUseIdleCallback&&(null==(n=this.config.performanceConfig)?void 0:n.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var n=this.taskQueue.shift();if(n){var r=n.event,i=n.sessionId;this.addCompressedEvent(r,i)}}this.taskQueue.length>0?requestIdleCallback(function(e){t.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e}(),eA=n(81199),eq=n(59087),ej="Failed to store session replay events in IndexedDB",eU="1.29.3",eB=function(){function e(e){var t=e.trackServerUrl,n=e.loggerProvider,r=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=n,this.payloadBatcher=r||function(e){return e},this.trackServerUrl=t}return e.prototype.sendEventsList=function(e){this.addToQueue((0,f.Cl)((0,f.Cl)({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.filter(function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:"Session replay event batch rejected due to exceeded retry count"}),!1)}).forEach(function(t){if(e.queue=e.queue.concat(t),0===t.timeout)return void e.schedule(0);setTimeout(function(){t.timeout=0,e.schedule(0)},t.timeout)})},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,f.sH)(this,void 0,void 0,function(){var t,n,r=this;return(0,f.YH)(this,function(i){switch(i.label){case 0:return t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(t.map(function(t){return r.send(t,e)}))];case 1:return i.sent(),[2]}})})},e.prototype.send=function(e,t){var n,r;return void 0===t&&(t=!0),(0,f.sH)(this,void 0,void 0,function(){var i,o,s,a,c,u,l,d,h,v,p,g;return(0,f.YH)(this,function(f){switch(f.label){case 0:if(!(i=e.apiKey))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})];if(!(o=e.deviceId))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})];if(s=M(),a=eU,c=e.sampleRate,u=new URLSearchParams({device_id:o,session_id:"".concat(e.sessionId),type:"".concat(e.type)}),l="".concat((null==(n=e.version)?void 0:n.type)||"standalone","/").concat((null==(r=e.version)?void 0:r.version)||a),0===(d=this.payloadBatcher({version:1,events:e.events})).events.length)return this.completeRequest({context:e}),[2];f.label=1;case 1:return f.trys.push([1,3,,4]),h={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(i),"X-Client-Version":a,"X-Client-Library":l,"X-Client-Url":s.substring(0,1e3),"X-Client-Sample-Rate":"".concat(c)},body:JSON.stringify(d),method:"POST"},[4,fetch("".concat(N(e.serverZone,this.trackServerUrl),"?").concat(u.toString()),h)];case 2:if(null===(v=f.sent()))return this.completeRequest({context:e,err:"Unexpected error occurred"}),[2];if(t)this.handleReponse(v.status,e);else{p="";try{p=JSON.stringify(v.body,null,2)}catch(e){}this.completeRequest({context:e,success:"".concat(v.status,": ").concat(p)})}return[3,4];case 3:return g=f.sent(),this.completeRequest({context:e,err:g}),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(e,t){switch(new eA.j().buildStatus(e)){case eq.n.Success:this.handleSuccessResponse(t);break;case eq.n.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){this.addToQueue((0,f.Cl)((0,f.Cl)({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,n=e.err,r=e.success;t.onComplete(),n?this.loggerProvider.warn(n):r&&this.loggerProvider.log(r)},e}(),eF=n(83899),ez=function(){function e(e){var t,n,r,i=this;
1this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var n=i.getStringSize(t);return i.getEventsArraySize(e)+n>=i.maxPersistedEventsSize||Date.now()-i.timeAtLastSplit>i.interval&&!!e.length&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!=(t=e.minInterval)?t:this.minInterval,this.maxInterval=null!=(n=e.maxInterval)?n:this.maxInterval,this.maxPersistedEventsSize=null!=(r=e.maxPersistedEventsSize)?r:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){return e.length},e.prototype.getEventsArraySize=function(e){var t,n,r=0;try{for(var i=(0,f.Ju)(e),o=i.next();!o.done;o=i.next()){var s=o.value;r+=this.getStringSize(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r+(2+Math.max(0,e.length-1)+2*e.length)},e}();!function(e){e.RECORDING="recording",e.SENT="sent"}(o||(o={}));var eY="sessionCurrentSequence",eK="sequencesToSend",eV=function(){var e=(0,_.m)();return new Promise(function(t,n){if(!e)return n(Error("Global scope not found"));if(!e.indexedDB)return n(Error("Session Replay: cannot find indexedDB"));try{var r=e.indexedDB.open("keyval-store");r.onupgradeneeded=function(){1===r.result.version&&(r.result.close(),r.transaction&&r.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},r.onsuccess=function(){t(r.result)},r.onerror=function(){n(r.error)}}catch(e){n(e)}})},eW=function(e){return(0,f.sH)(void 0,void 0,void 0,function(){return(0,f.YH)(this,function(t){switch(t.label){case 0:if(!(e.length>0))return[3,2];return[4,Promise.all(e.splice(0,10))];case 1:return t.sent(),[3,0];case 2:return[2]}})})},eJ=function(e){var t,n;return e.objectStoreNames.contains(eY)||(n=e.createObjectStore(eY,{keyPath:"sessionId"})),e.objectStoreNames.contains(eK)||(t=e.createObjectStore(eK,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:n}},eG=function(e){function t(t){var n=e.call(this,t)||this;return n.getSequencesToSend=function(){return(0,f.sH)(n,void 0,void 0,function(){var e,t,n,r,i,o;return(0,f.YH)(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),e=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:t=s.sent(),s.label=2;case 2:if(!t)return[3,4];return r=(n=t.value).sessionId,i=n.events,e.push({events:i,sequenceId:t.key,sessionId:r}),[4,t.continue()];case 3:return t=s.sent(),[3,2];case 4:return[2,e];case 5:return o=s.sent(),this.loggerProvider.warn("".concat(ej,": ").concat(o)),[3,6];case 6:return[2,void 0]}})})},n.storeCurrentSequence=function(e){return(0,f.sH)(n,void 0,void 0,function(){var t,n,r;return(0,f.YH)(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.db.get(eY,e)];case 1:if(!(t=i.sent()))return[2,void 0];return[4,this.db.put(eK,{sessionId:e,events:t.events})];case 2:return n=i.sent(),[4,this.db.put(eY,{sessionId:e,events:[]})];case 3:return i.sent(),[2,(0,f.Cl)((0,f.Cl)({},t),{sessionId:e,sequenceId:n})];case 4:return r=i.sent(),this.loggerProvider.warn("".concat(ej,": ").concat(r)),[3,5];case 5:return[2,void 0]}})})},n.addEventToCurrentSequence=function(e,t){return(0,f.sH)(n,void 0,void 0,function(){var n,r,i,o,s,a;return(0,f.YH)(this,function(c){switch(c.label){case 0:return c.trys.push([0,10,,11]),[4,(n=this.db.transaction(eY,"readwrite")).store.get(e)];case 1:if(r=c.sent())return[3,3];return[4,n.store.put({sessionId:e,events:[t]})];case 2:return c.sent(),[2];case 3:if(i=void 0,!this.shouldSplitEventsList(r.events,t))return[3,5];return i=r.events,[4,n.store.put({sessionId:e,events:[t]})];case 4:return c.sent(),[3,7];case 5:return o=r.events.concat(t),[4,n.store.put({sessionId:e,events:o})];case 6:c.sent(),c.label=7;case 7:return[4,n.done];case 8:if(c.sent(),!i)return[2,void 0];return[4,this.storeSendingEvents(e,i)];case 9:if(!(s=c.sent()))return[2,void 0];return[2,{events:i,sessionId:e,sequenceId:s}];case 10:return a=c.sent(),this.loggerProvider.warn("".concat(ej,": ").concat(a)),[3,11];case 11:return[2,void 0]}})})},n.storeSendingEvents=function(e,t){return(0,f.sH)(n,void 0,void 0,function(){var n;return(0,f.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.db.put(eK,{sessionId:e,events:t})];case 1:return[2,r.sent()];case 2:return n=r.sent(),this.loggerProvider.warn("".concat(ej,": ").concat(n)),[3,3];case 3:return[2,void 0]}})})},n.cleanUpSessionEventsStore=function(e,t){return(0,f.sH)(n,void 0,void 0,function(){var e;return(0,f.YH)(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.db.delete(eK,t)];case 2:return n.sent(),[3,4];case 3:return e=n.sent(),this.loggerProvider.warn("".concat(ej,": ").concat(e)),[3,4];case 4:return[2]}})})},n.transitionFromKeyValStore=function(e){return(0,f.sH)(n,void 0,void 0,function(){var t,n,r,i,s,a,c,u=this;return(0,f.YH)(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),[4,eV()];case 1:if(!(t=l.sent()))return[2];n=function(e,t){return(0,f.sH)(u,void 0,void 0,function(){var n,r,i=this;return(0,f.YH)(this,function(s){switch(s.label){case 0:return n=t.sessionSequences,r=[],Object.keys(n).forEac
1h(function(s){var a=parseInt(s,10),c=n[a];if(a===t.currentSequenceId){var u=c.events.map(function(t){return(0,f.sH)(i,void 0,void 0,function(){return(0,f.YH)(this,function(n){return[2,this.addEventToCurrentSequence(e,t)]})})});r.push.apply(r,(0,f.fX)([],(0,f.zs)(u),!1))}else c.status!==o.SENT&&r.push(i.storeSendingEvents(e,c.events))}),[4,eW(r)];case 1:return s.sent(),[2]}})})},r="".concat(y.fS,"_").concat(this.apiKey.substring(0,10)),l.label=2;case 2:return l.trys.push([2,4,,5]),i=t.transaction("keyval").objectStore("keyval").getAll(r),[4,new Promise(function(t){i.onsuccess=function(r){return(0,f.sH)(u,void 0,void 0,function(){var i,s,a,c=this;return(0,f.YH)(this,function(u){switch(u.label){case 0:if(!(s=(i=r&&r.target.result)&&i[0]))return[3,2];return a=[],Object.keys(s).forEach(function(t){var r=parseInt(t,10),i=s[r];if(e===r)a.push(n(r,i));else{var u=i.sessionSequences;Object.keys(u).forEach(function(e){var t=parseInt(e,10);u[t].status!==o.SENT&&a.push(c.storeSendingEvents(r,u[t].events))})}}),[4,eW(a)];case 1:u.sent(),u.label=2;case 2:return t(),[2]}})})}})];case 3:return l.sent(),(s=(0,_.m)())&&s.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return a=l.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(a)),[3,5];case 5:return[3,7];case 6:return c=l.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(c,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}})})},n.apiKey=t.apiKey,n.db=t.db,n}return(0,f.C6)(t,e),t.new=function(e,n,r){return(0,f.sH)(this,void 0,void 0,function(){var i,o,s,a;return(0,f.YH)(this,function(c){switch(c.label){case 0:var u;return c.trys.push([0,3,,4]),i="replay"===e?"":"_".concat(e),[4,(u="".concat(n.apiKey.substring(0,10),"_amp_session_replay_events").concat(i),(0,f.sH)(void 0,void 0,void 0,function(){return(0,f.YH)(this,function(e){switch(e.label){case 0:return[4,(0,eF.P2)(u,1,{upgrade:eJ})];case 1:return[2,e.sent()]}})}))];case 1:return o=c.sent(),[4,(s=new t((0,f.Cl)((0,f.Cl)({},n),{db:o}))).transitionFromKeyValStore(r)];case 2:return c.sent(),[2,s];case 3:return a=c.sent(),n.loggerProvider.warn("".concat(ej,": ").concat(a)),[3,4];case 4:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return(0,f.sH)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,f.YH)(this,function(a){switch(a.label){case 0:if(!e)return[3,2];return[4,this.db.get("sessionCurrentSequence",e)];case 1:if(!(t=a.sent()))return[2,void 0];return[2,[t]];case 2:n=[],a.label=3;case 3:return a.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=(r=f.Ju.apply(void 0,[a.sent()])).next(),a.label=5;case 5:if(i.done)return[3,7];
1t=i.value,n.push(t),a.label=6;case 6:return i=r.next(),[3,5];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(o)throw o.error}return[7];case 10:return[2,n]}})})},t}(ez),e$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return(0,f.C6)(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,n=(0,f.fX)([],(0,f.zs)(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:n},this.resetCurrentSequence(e),{sequenceId:t,events:n,sessionId:e}},t.prototype.getSequencesToSend=function(){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(e){return[2,Object.entries(this.finalizedSequences).map(function(e){var t=(0,f.zs)(e,2),n=t[0],r=t[1],i=r.sessionId,o=r.events;return{sequenceId:Number(n),sessionId:i,events:o}})]})})},t.prototype.storeCurrentSequence=function(e){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return(0,f.sH)(this,void 0,void 0,function(){var n;return(0,f.YH)(this,function(r){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(n=this.addSequence(e)),this.sequences[e].push(t),[2,n]})})},t.prototype.storeSendingEvents=function(e,t){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(n){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(ez),eX=function(e){var t=e.config,n=e.sessionId,r=e.minInterval,i=e.maxInterval,o=e.type,s=e.payloadBatcher,a=e.storeType;return(0,f.sH)(void 0,void 0,void 0,function(){var e,c,u,l,d;function h(t){return void 0===t&&(t=!1),(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(n){return[2,e.flush(t)]})})}return(0,f.YH)(this,function(v){switch(v.label){case 0:if(e=new eB((0,f.Cl)((0,f.Cl)({},t),{loggerProvider:t.loggerProvider,payloadBatcher:s})),c=function(){return new e$({loggerProvider:t.loggerProvider,maxInterval:i,minInterval:r})},"idb"!==a)return[3,2];return[4,(0,f.sH)(void 0,void 0,void 0,function(){var e;return(0,f.YH)(this,function(s){switch(s.label){case 0:return[4,eG.new(o,{loggerProvider:t.loggerProvider,minInterval:r,maxInterval:i,apiKey:t.apiKey},n)];case 1:return e=s.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,null!=e?e:c()]}})})];case 1:return l=v.sent(),[3,3];case 2:l=c(),v.label=3;case 3:return u=l,d=function(n){var r=n.events,i=n.sessionId,s=n.deviceId,a=n.sequenceId;t.debugMode&&A().then(function(e){var n=e.totalStorageSize,r=e.percentOfQuota,i=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(n," KB, percentage of quota: ").concat(r,"%, usage details: ").concat(i))}).catch(function(){}),e.sendEventsList({events:r,sessionId:i,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:s,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return(0,f.sH)(void 0,void 0,void 0,function(){return(0,f.YH)(this,function(e){switch(e.label){case 0:return[4,u.cleanUpSessionEventsStore(i,a)];case 1:return e.sent(),[2]}})})}})},[2,{sendCurrentSequenceEvents:function(e){var n=e.sessionId,r=e.deviceId;u.storeCurrentSequence(n).then(function(e){e&&d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})}).catch(function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})},addEvent:function(e){var n=e.event,r=e.sessionId,i=e.deviceId;u.addEventToCurrentSequence(r,n.data).then(function(e){return e&&d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}).catch(function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)})},sendStoredEvents:function(e){var t=e.deviceId;return(0,f.sH)(void 0,void 0,void 0,function(){var e;return(0,f.YH)(this,function(n){switch(n.label){case 0:return[4,u.getSequencesToSend()];case 1:return(e=n.sent())&&e.forEach(function(e){d({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]}})})},flush:h}]}})})},eQ=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new Map;e.forEach(function(e){n.set(e.name,e.manager)}),this.managers=n}return e.prototype.sendStoredEvents=function(e){return(0,f.sH)(this,void 0,void 0,function(){var t;return(0,f.YH)(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEac
1h(function(n){t.push(n.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,n=e.sessionId,r=e.event,i=e.deviceId;null==(t=this.managers.get(r.type))||t.addEvent({sessionId:n,event:r,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,n=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:n})})},e.prototype.flush=function(e){return(0,f.sH)(this,void 0,void 0,function(){var t;return(0,f.YH)(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.flush(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e}();let eZ={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},e0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},e1={};function e2(e){if(e1[e])return e1[e];let t=function(e){var t,n;let r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in eZ?eZ[e]:void 0,i=!!(r&&r.every(e=>{var t,r;return!!(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in e0?e0[e]:void 0,s=!!(o&&o.every(e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return e1[e]=t.prototype,t.prototype;try{let r=document.createElement("iframe");document.body.appendChild(r);let i=r.contentWindow;if(!i)return t.prototype;let o=i[e].prototype;if(document.body.removeChild(r),!o)return n;return e1[e]=o}catch{return n}}let e3={},e4={parentElement:function(e){var t,n="Node",r=e,i="parentElement";let o=`${n}.${String(i)}`;if(e3[o])return e3[o].call(r);let s=null==(t=Object.getOwnPropertyDescriptor(e2(n),i))?void 0:t.get;return s?(e3[o]=s,s.call(r)):r[i]}};function e5(){var e=(0,_.m)();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}function e6(){var e=(0,_.m)();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function e8(e,t,n){for(var r=null,i=[],o=e,a=0;o&&"break"!==function(){var e,u,l,d,h=new Date().getTime()-c.getTime();if(void 0!==s.timeoutMs&&h>s.timeoutMs)throw Error("Timeout: Can't find a unique selector after ".concat(h,"ms"));var v=to((e=o.getAttribute("id"))&&s.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||to.apply(void 0,(0,f.fX)([],(0,f.zs)(Array.from(o.attributes).filter(function(e){return s.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||to.apply(void 0,(0,f.fX)([],(0,f.zs)(Array.from(o.classList).filter(s.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||to((u=o.tagName.toLowerCase(),s.tagName(u)?{name:u,penalty:2}:null))||[tn()],p=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(o);if("all"==t)p&&(v=v.concat(v.filter(ti).map(function(e){return tr(e,p)})));else if("two"==t)v=v.slice(0,1),p&&(v=v.concat(v.filter(ti).map(function(e){return tr(e,p)})));else if("one"==t){var g=(0,f.zs)(v=v.slice(0,1),1)[0];p&&ti(g)&&(v=[tr(g,p)])}else"none"==t&&(v=[tn()],p&&(v=[tr(v[0],p)]));try{for(var m=(l=void 0,(0,f.Ju)(v)),b=m.next();!b.done;b=m.next()){var g=b.value;g.level=a}}catch(e){l={error:e}}finally{try{b&&!b.done&&(d=m.return)&&d.call(m)}finally{if(l)throw l.error}}if(i.push(v),i.length>=s.seedMinLength&&(r=e7(i,n)))return"break";o=o.parentElement,a++}(););return(r||(r=e7(i,n)),!r&&n)?n():r}function e7(e,t){var n,r,i=ta(function e(t,n){var r,i,o,s,a;return void 0===n&&(n=[]),(0,f.YH)(this,function(c){switch(c.label){case 0:if(!(t.length>0))return[3,9];c.label=1;case 1:c.trys.push([1,6,7,8]),i=(r=(0,f.Ju)(t[0])).next(),c.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,(0,f.Ju)(e(t.slice(1,t.length),n.concat(o)))];case 3:c.sent(),c.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return s={error:c.sent()},[3,8];case 7:try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}
1return[7];case 8:return[3,11];case 9:return[4,n];case 10:c.sent(),c.label=11;case 11:return[2]}})}(e));if(i.length>s.threshold)return t?t():null;try{for(var o=(0,f.Ju)(i),a=o.next();!a.done;a=o.next()){var c=a.value;if(tt(c))return c}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function e9(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function te(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function tt(e){var t=e9(e);switch(a.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function tn(){return{name:"*",penalty:3}}function tr(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function ti(e){return"html"!==e.name&&!e.name.startsWith("#")}function to(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(ts);return n.length>0?n:null}function ts(e){return null!=e}function ta(e){return(0,f.fX)([],(0,f.zs)(e),!1).sort(function(e,t){return te(e)-te(t)})}var tc=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)}),{version:t,events:r}},tu=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&r.push(t)}),{version:t,events:Object.values(r.reduce(function(e,t){var n=t.x,r=t.y,i=t.selector,o=t.timestamp,s=o-o%36e5,a="".concat(n,":").concat(r,":").concat(null!=i?i:"",":").concat(s);return e[a]?e[a].count+=1:e[a]=(0,f.Cl)((0,f.Cl)({},t),{timestamp:s,count:1}),e},{}))}},tl=function(e,t){var n=t.eventsManager,r=t.sessionId,i=t.deviceIdFn,o=t.mirror,u=t.ugcFilterRules;return function(t){if(t.type!==V.Click)return;var l,d=(0,_.m)();if(d){var h=d.location,v=d.innerHeight,p=d.innerWidth;if(h){var g=t.x,m=t.y;if(void 0!==g&&void 0!==m){var b,y,w,S,C,E=o.getNode(t.id);if(E)try{l=function(e,t){if(c=new Date,e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n,r,i={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};n=(s=(0,f.Cl)((0,f.Cl)({},i),void 0)).root,r=i,a=n.nodeType===Node.DOCUMENT_NODE?n:n===r.root?n.ownerDocument:n;var o=e8(e,"all",function(){return e8(e,"two",function(){return e8(e,"one",function(){return e8(e,"none")})})});if(o){var u=ta(function e(t,n,r){var i,o,c;return void 0===r&&(r={counter:0,visited:new Map}),(0,f.YH)(this,function(u){switch(u.label){case 0:if(!(t.length>2&&t.length>s.optimizedMinLength))return[3,5];i=1,u.label=1;case 1:var l,d;if(!(i<t.length-1))return[3,5];if(r.counter>s.maxNumberOfTries||(r.counter+=1,(o=(0,f.fX)([],(0,f.zs)(t),!1)).splice(i,1),c=e9(o),r.visited.has(c)))return[2];if(!(tt(o)&&(l=o,d=n,a.querySelector(e9(l))===d)))return[3,4];return[4,o];case 2:return u.sent(),r.visited.set(c,!0),[5,(0,f.Ju)(e(o,n,r))];case 3:u.sent(),u.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(o,e));return u.length>0&&(o=u[0]),e9(o)}throw Error("Selector was not found.")}(E)}catch(t){e.debug("error resolving selector from finder")}var I={left:(C=d.document).scrollingElement?C.scrollingElement.scrollLeft:void 0!==d.pageXOffset?d.pageXOffset:C.documentElement.scrollLeft||(null==C?void 0:C.body)&&(null==(b=e4.parentElement(C.body))?void 0:b.scrollLeft)||(null==(y=null==C?void 0:C.body)?void 0:y.scrollLeft)||0,top:C.scrollingElement?C.scrollingElement.scrollTop:void 0!==d.pageYOffset?d.pageYOffset:(null==C?void 0:C.documentElement.scrollTop)||(null==C?void 0:C.body)&&(null==(w=e4.parentElement(C.body))?void 0:w.scrollTop)||(null==(S=null==C?void 0:C.body)?void 0:S.scrollTop)||0},k={x:g+I.left,y:m+I.top,selector:l,viewportHeight:v,viewportWidth:p,pageUrl:L(h.href,u),timestamp:Date.now(),type:"click"},P=i();P&&n.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(k)},deviceId:P})}}}}},td=function(){function e(e,t){var n=(0,_.m)();n&&n.navigator&&"function"==typeof n.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(n.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var n=new XMLHttpRequest;return n.open("POST",e,!0),n.setRequestHeader("Accept","*/*"),n.send(JSON.stringify(t)),!0},this.basePageUrl=N(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var n=this.context,r=n.sessionId,i=n.type,o=new URLSearchParams({device_id:e,session_id:String(r),type:String(i),api_key:this.apiKey}),s="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(s,t)||this.sendXhr(s,t)},e}(),tf=function(){function e(e,t){var n=this;this.timestamp=Date.now(),this.hook=function(e){n.update(e)},this.send=function(e){return function(t){var r,i,o=e(),s=(0,_.m)();s&&o&&n.transport.send(o,{version:1,events:[{maxScrollX:n._maxScrollX,maxScrollY:n._maxScrollY,maxScrollWidth:n._maxScrollWidth,maxScrollHeight:n._maxScrollHeight,viewportHe
1ight:e5(),viewportWidth:e6(),pageUrl:L(s.location.href,null!=(i=null==(r=n.config.interactionConfig)?void 0:r.ugcFilterRules)?i:[]),timestamp:n.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=e6(),this._maxScrollHeight=e5(),this.config=t,this.transport=e}return e.default=function(t,n){return new e(new td(t,n),n)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(e.x>this._maxScrollX){var n=e6();this._maxScrollX=e.x;var r=e.x+n;r>this._maxScrollWidth&&(this._maxScrollWidth=r),this.timestamp=t}if(e.y>this._maxScrollY){var i=e5();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),th=function(e){var t=e.sessionId,n=e.deviceId;this.deviceId=n,this.sessionId=t,t&&n&&(this.sessionReplayId="".concat(n,"/").concat(t))},tv=new function(){var e=this;this.dbs={},this.createStore=function(t){return(0,f.sH)(e,void 0,void 0,function(){return(0,f.YH)(this,function(e){switch(e.label){case 0:return[4,(0,eF.P2)(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return(0,f.sH)(e,void 0,void 0,function(){var e,n;return(0,f.YH)(this,function(r){switch(r.label){case 0:if(this.dbs&&this.dbs[t])return[2,this.dbs[t]];return e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)];case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.getTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId;return(0,f.sH)(e,void 0,void 0,function(){var e,t,o,s;return(0,f.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=a.sent())?void 0:o.targetingMatch];case 3:return s=a.sent(),n.warn("Failed to get targeting match for session id ".concat(i,": ").concat(s)),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId,o=t.targetingMatch;return(0,f.sH)(e,void 0,void 0,function(){var e,t,s;return(0,f.YH)(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,a.sent()];case 3:return s=a.sent(),n.warn("Failed to store targeting match for session id ".concat(i,": ").concat(s)),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.currentSessionId;return(0,f.sH)(e,void 0,void 0,function(){var e,t,o,s,a,c,u,l;return(0,f.YH)(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(r)];case 1:return e=d.sent(),t=String(i),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:s=d.sent(),a=0,d.label=3;case 3:if(!(a<s.length))return[3,6];if(c=s[a],u=Date.now()-c.lastUpdated,!(c.sessionId!==t&&u>1728e5))return[3,5];return[4,o.store.delete(c.sessionId)];case 4:d.sent(),d.label=5;case 5:return a++,[3,3];case 6:return[4,o.done];case 7:return d.sent(),[3,9];case 8:return l=d.sent(),n.warn("Failed to clear old targeting matches for sessions: ".concat(l)),[3,9];case 9:return[2]}})})}},tp=function(e){var t=e.sessionId,r=e.targetingConfig,i=e.loggerProvider,o=e.apiKey,s=e.targetingParams;return(0,f.sH)(void 0,void 0,void 0,function(){var e,a,c;return(0,f.YH)(this,function(u){switch(u.label){case 0:return[4,tv.clearStoreOfOldSessions({loggerProvider:i,apiKey:o,currentSessionId:t})];case 1:return u.sent(),[4,tv.getTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:t})];case 2:if(!0===u.sent())return[2,!0];e=!0,u.label=3;case 3:return u.trys.push([3,6,,7]),[4,n.e(58596).then(n.bind(n,58596))];case 4:return[4,(0,u.sent().evaluateTargeting)((0,f.Cl)((0,f.Cl)({},s),{flag:r,sessionId:t,apiKey:o,loggerProvider:i}))];case 5:return(a=u.sent())&&a.sr_targeting_config&&(e="on"===a.sr_targeting_config.key),tv.storeTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:t,targetingMatch:e}),[3,7];case 6:return c=u.sent(),i.warn(c.message),[3,7];case 7:return[2,e]}})})};function tg(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,n,r){var i,o,s,a=(0,f.Cl)((0,f.Cl)({},e),r),c=a.ugcFilterRules||[],u=null!=(i=a.enablePolling)&&i,l=null!=(o=a.pollingInterval)?o:1e3,d=null!=(s=a.captureDocumentTitle)&&s;if(!n)return function(){};var h=void 0,v=function(){return n.location&&n.location.href||""},p=function(){var e=n.innerHeight,t=n.innerWidth,r=n.document,i=v(),o="";return d&&(o=(null==r?void 0:r.title)||""),{href:c.length>
10?L(i,c):i,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}},g=function(){var e=v();(void 0===h||e!==h)&&(h=e,t(p()))},m=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return g(),r}},b=function(){g()};if(u){var y=n.setInterval(function(){g()},l);return g(),function(){y&&n.clearInterval(y)}}if(n.history){var w=n.history.pushState.bind(n.history),S=n.history.replaceState.bind(n.history);return n.history.pushState=m(w),n.history.replaceState=m(S),n.addEventListener("popstate",g),n.addEventListener("hashchange",b),g(),function(){n.history.pushState=w,n.history.replaceState=S,n.removeEventListener("popstate",g),n.removeEventListener("hashchange",b)}}return n.addEventListener("hashchange",b),g(),function(){n.removeEventListener("hashchange",b)}},options:e}}tg();var tm=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.recordFunction=null,this.teardownEventListeners=function(t){var n=(0,_.m)();n&&(n.removeEventListener("blur",e.blurListener),n.removeEventListener("focus",e.focusListener),t||n.addEventListener("blur",e.blurListener),t||n.addEventListener("focus",e.focusListener),n.self&&"onpagehide"in n.self?(n.removeEventListener("pagehide",e.pageLeaveListener),t||n.addEventListener("pagehide",e.pageLeaveListener)):(n.removeEventListener("beforeunload",e.pageLeaveListener),t||n.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents(!1)},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!1),(0,f.sH)(e,void 0,void 0,function(){var e,i;return(0,f.YH)(this,function(o){switch(o.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig)if(!n)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];else this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.");if(this.lastTargetingParams=t,!(this.config.targetingConfig&&!this.sessionTargetingMatch))return[3,2];return(e=t.event)&&Object.values(h.S).includes(e.event_type)&&(e=void 0),i=this,[4,tp({sessionId:this.identifiers.sessionId,targetingConfig:this.config.targetingConfig,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:e}})];case 1:i.sessionTargetingMatch=o.sent(),this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:e,targetingParams:t},null,2)),o.label=2;case 2:if(!n)return[3,3];return this.initialize(!0),[3,5];case 3:if(!(r||!this.recordCancelCallback))return[3,5];return this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()];case 4:o.sent(),o.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r=!0),(0,f.sH)(e,void 0,void 0,function(){var e,o,s,a;return(0,f.YH)(this,function(c){switch(c.label){case 0:if(c.trys.push([0,3,,4]),e=void 0,!((o=this.config)&&t!==i.METADATA)||(e={config:q(o),version:eU},!r))return[3,2];return[4,A()];case 1:s=c.sent(),e=(0,f.Cl)((0,f.Cl)({},s),e),c.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(t,(0,f.Cl)((0,f.Cl)({},n),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return a=c.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",a),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null==(t=e.networkObservers)||t.stop()}catch(t){e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(t.toString()))}},this.loggerProvider=new P(new g.V)}return e.prototype.init=function(e,t){return(0,B.m)(this._init(e,t))},e.prototype._init=function(e,t){var r,i,o,s,a,c,u;return(0,f.sH)(this,void 0,void 0,function(){var l,d,h,v,p,m,b,y,w,S,C,E,I,k;return(0,f.YH)(this,function(x){switch(x.label){case 0:return this.loggerProvider=new P(t.loggerProvider||new g.V),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new th({sessionId:t.sessionId,deviceId:t.deviceId}),l=this,[4,(0,f.sH)(void 0,void 0,void 0,function(){var n;return(0,f.YH)(this,function(r){return n=new U(e,t),[2,new ee(new Q.IQ(e,n.loggerProvider,n.serverZone,t.configServerUrl),n)]})})];case 1:return l.joinedConfigGenerator=x.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:h=(d=x.sent()).joinedConfig,v=d.localConfig,p=d.remoteConfig,this.config=h,this.setMetadata(t.sessionId,h,v,p,null==(r=t.version)?void 0:r.version,eU,null==(i=t.version)?void 0:i.type),t.sessionId&&(null==(o=this.config.interactionConfig)?void 0:o.enabled)&&(m=tf.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[m.send(this.getDeviceId.bind(this)).bind(m)],this.scrollHook=m.hook.bind(m)),b=[],"idb"!==(y=this.config.storeType)||(null==(s=(0,_.m)())?void 0:s.indexedDB)||(y="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(y," for event storage.")),x.label=3;case 3:return x.trys.push([3,5,,6]),[4,eX({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:y})];
1case 4:return w=x.sent(),b.push({name:"replay",manager:w}),[3,6];case 5:return S=x.sent(),this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(S.toString())),[3,6];case 6:if(!(null==(a=this.config.interactionConfig)?void 0:a.enabled))return[3,10];C=this.config.interactionConfig.batch?tu:tc,x.label=7;case 7:return x.trys.push([7,9,,10]),[4,eX({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!=(c=this.config.interactionConfig.trackEveryNms)?c:3e4,maxInterval:6e4,payloadBatcher:C,storeType:y})];case 8:return E=x.sent(),b.push({name:"interaction",manager:E}),[3,10];case 9:return S=x.sent(),this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(S.toString())),[3,10];case 10:if(this.eventsManager=new(eQ.bind.apply(eQ,(0,f.fX)([void 0],(0,f.zs)(b),!1))),this.eventCompressor&&this.eventCompressor.terminate(),I=void 0,k=(0,_.m)(),!((null==(u=this.config.experimental)?void 0:u.useWebWorker)&&k&&k.Worker))return[3,12];return[4,n.e(12342).then(n.bind(n,89961))];case 11:I=x.sent().compressionScript,x.label=12;case 12:return this.eventCompressor=new eL(this.eventsManager,this.config,this.getDeviceId(),I),[4,this.initializeNetworkObservers()];case 13:return x.sent(),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:t.userProperties},!0)];case 14:return x.sent(),[2]}})})},e.prototype.setSessionId=function(e,t){return(0,B.m)(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,n){var r;return(0,f.sH)(this,void 0,void 0,function(){var i,o,s;return(0,f.YH)(this,function(a){switch(a.label){case 0:if(this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,(i=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(i),o=t||this.getDeviceId(),this.identifiers=new th({sessionId:e,deviceId:o}),!(this.joinedConfigGenerator&&i))return[3,2];return[4,this.joinedConfigGenerator.generateJoinedConfig()];case 1:s=a.sent().joinedConfig,this.config=s,a.label=2;case 2:if(!(null==(r=this.config)?void 0:r.targetingConfig))return[3,4];return[4,this.evaluateTargetingAndCapture({userProperties:null==n?void 0:n.userProperties},!1,!0)];case 3:return a.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:a.sent(),a.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,n=this.identifiers;if(!t||!n)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var r=this.getShouldRecord(),o={};return r&&((e={})[S]=n.sessionReplayId?n.sessionReplayId:null,o=e,t.debugMode&&(o[I]=JSON.stringify({appHash:(0,F.fI)(t.apiKey).toString()}))),this.addCustomRRWebEvent(i.GET_SR_PROPS,{shouldRecord:r,eventProperties:o},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,o},e.prototype.sendEvents=function(e){var t,n=e||(null==(t=this.identifiers)?void 0:t.sessionId),r=this.getDeviceId();this.eventsManager&&n&&r&&this.eventsManager.sendCurrentSequenceEvents({sessionId:n,deviceId:r})},e.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),(0,f.sH)(this,void 0,void 0,function(){var n;return(0,f.YH)(this,function(r){return(null==(t=this.identifiers)?void 0:t.sessionId)?(n=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:n}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){if(null==(e=this.config)?void 0:e.instanceName){var e,t,n;n=(0,z.w$)(this.config.instanceName).identityStore.getIdentity().optOut}return void 0!==n?n:null==(t=this.config)?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e=!1,t="",n=!1;return this.config.targetingConfig?this.sessionTargetingMatch?(t="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(t),e=!0,n=!0):(t="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(t),e=!1,n=!1):(0,F.OL)(this.identifiers.sessionId,this.config.sampleRate)?(e=!0,n=!0):(t="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(t),e=!1,n=!1),this.lastShouldRecordDecision!==e&&this.config.targetingConfig&&(this.addCustomRRWebEvent(i.TARGETING_DECISION,{message:t,sessionId:this.identifiers.sessionId,matched:n,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=e),e},e.prototype.getBlockSelectors=function(){var e,t,n,r=null!=(n=null==(t=null==(e=this.config)?void 0:e.privacyConfig)?void 0:t.blockSelector)?n:[];if(0!==r.length)return r},e.prototype.getMaskTextSelectors=function(){if((null==(t=null==(e=this.config)?void 0:e.privacyConfig)?void 0:t.defaultMaskLevel)==="conservative")return"*";var e,t,n,r,i=null==(r=null==(n=this.config)?void 0:n.privacyConfig)?void 0:r.maskSelector;if(i)return i},e.prototype.getRecordingPlugins=function(e){var t,r,i,o,s,a;return(0,f.sH)(this,void 0,void 0,function(){var c,u,l,d;return(0,f.YH)(this,function(f){switch(f.label){case 0:c=[];try{u=tg({ugcFilterRules:(null==(r=null==(t=this.config)?void 0:t.interactionConfig)?void 0:r.ugcFilterRules)||[],enablePolling:(null==(i=this.config)?void 0:i.enableUrlChangePolling)||!1,pollingInterval:null==(o=this.config)?void 0:o.urlChangePollingInterval,captureDocumentTitle:null==(s=this.config)?void 0:s.captureDocumentTitle}),c.push(u)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null==(a=null==e?void 0:e.console)?void 0:a.enabled))return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,n.e(76851).then(n.bind(n,37434))];case 2:return l=f.sent().getRecordConsolePlugin,c.push(l({level:e.console.levels})),[3,4];case 3:return d=f.sent(),this.loggerProvider.warn("Failed to load console plugin:",d),[3,4];case 4:return[2,c.length>0?c:void 0]}})})},e.prototype.getRecordFunction=function(){return(0,f.sH)(this,void 0,void 0,function(){var e,t;return(0,f.YH)(this,function(r){switch(r.label){case 0:if(this.recordFunction)return[2,this.recordFunction];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n.e(98950).then(n.bind(n,48770))];case 2:return e=r.sent().record,this.recordFunction=e,[2,e];case 3:return t=r.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){var t,n,r,o,s;return void 0===e&&(e=!0),(0,f.sH)(this,void 0,void 0,function(){var a,c,u,l,d,h,v,p,g,m,b,y,w,S=this;return(0,f.YH)(this,function(f){switch(f.label){case 0:if(a=this.config,c=this.getShouldRecord(),u=null==(t=this.identifiers)?void 0:t.sessionId,!c||!u||!a)return[2];return this.stopRecordingEvents(),[4,this.getRecordFunction()];case 1:if(!(l=f.sent()))return[2];return[4,this.initializeNetworkObservers()];case 2:f.sent(),null==(n=this.networkObservers)||n.start(function(e){
1S.addCustomRRWebEvent(i.FETCH_REQUEST,e)}),d=a.privacyConfig,h=a.interactionConfig,v=a.loggingConfig,p=(null==h?void 0:h.enabled)?{mouseInteraction:this.eventsManager&&tl(this.loggerProvider,{eventsManager:this.eventsManager,sessionId:u,deviceIdFn:this.getDeviceId.bind(this),mirror:l.mirror,ugcFilterRules:null!=(r=h.ugcFilterRules)?r:[]}),scroll:this.scrollHook}:{},g=(null==h?void 0:h.enabled)&&h.ugcFilterRules?h.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(u,".")),f.label=3;case 3:return f.trys.push([3,5,,6]),m=this,b=l,w={emit:function(e){if(S.shouldOptOut()){S.loggerProvider.log("Opting session ".concat(u," out of recording due to optOut config.")),S.stopRecordingEvents(),S.sendEvents();return}e.type===Y.Meta&&(e.data.href=L(e.data.href,g)),S.eventCompressor&&S.eventCompressor.enqueueEvent(e,u)},inlineStylesheet:a.shouldInlineStylesheet,hooks:p,maskAllInputs:!0,maskTextClass:k,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:a.applyBackgroundColorToBlockedElements,maskInputFn:O("input",d),maskTextFn:O("text",d),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,slimDOMOptions:{script:null==(o=a.omitElementTags)?void 0:o.script,comment:null==(s=a.omitElementTags)?void 0:s.comment},errorHandler:function(e){if(e.message.includes("insertRule")&&e.message.includes("CSSStyleSheet")||e._external_)throw e;return S.loggerProvider.warn("Error while capturing replay: ",e.toString()),!0}},[4,this.getRecordingPlugins(v)];case 4:return m.recordCancelCallback=b.apply(void 0,[(w.plugins=f.sent(),w)]),this.addCustomRRWebEvent(i.DEBUG_INFO),e&&this.addCustomRRWebEvent(i.METADATA,this.metadata),[3,6];case 5:return y=f.sent(),this.loggerProvider.warn("Failed to initialize session replay:",y),[3,6];case 6:return[2]}})})},e.prototype.getDeviceId=function(){var e;return null==(e=this.identifiers)?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null==(e=this.identifiers)?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(n){return[2,null==(t=this.eventsManager)?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(e,t,n,r,i,o,s){var a=(null==e?void 0:e.toString())?(0,F.fI)(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:n,remoteConfig:r,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(s),replaySDKVersion:i,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},e.prototype.initializeNetworkObservers=function(){var e,t,r;return(0,f.sH)(this,void 0,void 0,function(){var i,o;return(0,f.YH)(this,function(s){switch(s.label){case 0:if(!((null==(r=null==(t=null==(e=this.config)?void 0:e.loggingConfig)?void 0:t.network)?void 0:r.enabled)&&!this.networkObservers))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n.e(61091).then(n.bind(n,61091))];case 2:return i=s.sent().NetworkObservers,this.networkObservers=new i,[3,4];case 3:return o=s.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",o),[3,4];case 4:return[2]}})})},e}(),tb=function(e){return function(){var t=e.config||j();return{logger:t.loggerProvider,logLevel:t.logLevel}}};let ty=function(){var e=new tm;return{init:(0,v.nA)(e.init.bind(e),"init",tb(e)),evaluateTargetingAndCapture:(0,v.nA)(e.evaluateTargetingAndCapture.bind(e),"evaluateTargetingAndRecord",tb(e)),setSessionId:(0,v.nA)(e.setSessionId.bind(e),"setSessionId",tb(e)),getSessionId:(0,v.nA)(e.getSessionId.bind(e),"getSessionId",tb(e)),getSessionReplayProperties:(0,v.nA)(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",tb(e)),flush:(0,v.nA)(e.flush.bind(e),"flush",tb(e)),shutdown:(0,v.nA)(e.shutdown.bind(e),"shutdown",tb(e))}}();var tw=ty.init,tS=ty.setSessionId,tC=ty.getSessionId,tE=ty.getSessionReplayProperties,tI=ty.flush,tk=ty.shutdown,tP=ty.evaluateTargetingAndCapture,t_=n(84605);!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(u||(u={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(l||(l={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(d||(d={}));var tx=[u.SET,u.SET_ONCE,u.ADD,u.APPEND,u.PREPEND,u.POSTINSERT],tT=function(e){if(e.user_properties){var t={};
1return Object.keys(e.user_properties).forEach(function(n){if(tx.includes(n)){var r=e.user_properties&&e.user_properties[n];t=(0,f.Cl)((0,f.Cl)({},t),r)}}),t}},tR="1.23.1",tO=function(){function e(t){this.name=e.pluginName,this.type="enrichment",this.sessionReplay={flush:tI,getSessionId:tC,getSessionReplayProperties:tE,init:tw,setSessionId:tS,shutdown:tk,evaluateTargetingAndCapture:tP},this.options=(0,f.Cl)({forceSessionTracking:!1},t),this.srInitOptions=this.options}return e.prototype.setup=function(e,t){var n,r,i,o,s,a;return(0,f.sH)(this,void 0,void 0,function(){var t,c;return(0,f.YH)(this,function(u){switch(u.label){case 0:var l;return u.trys.push([0,2,,3]),null==e||e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(tR,".")),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=(0,f.Cl)((0,f.Cl)({},e.defaultTracking),{sessions:!0})),t=(void 0===(l=this.config.instanceName)&&(l="$default_instance"),t_.i.getInstance(l)).identityStore.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:null!=(n=this.options.deviceId)?n:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||(null==(r=this.config.remoteConfig)?void 0:r.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null==(i=this.options.privacyConfig)?void 0:i.blockSelector,maskSelector:null==(o=this.options.privacyConfig)?void 0:o.maskSelector,unmaskSelector:null==(s=this.options.privacyConfig)?void 0:s.unmaskSelector,defaultMaskLevel:null==(a=this.options.privacyConfig)?void 0:a.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:tR},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,experimental:this.options.experimental,userProperties:t,omitElementTags:this.options.omitElementTags,applyBackgroundColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval},[4,this.sessionReplay.init(e.apiKey,this.srInitOptions).promise];case 1:return u.sent(),[3,3];case 2:return c=u.sent(),null==e||e.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(c.message)),[3,3];case 3:return[2]}})})},e.prototype.onSessionIdChanged=function(e){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(t){switch(t.label){case 0:return this.config.loggerProvider.debug("Analytics session id is changed to ".concat(e,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(e).promise];case 1:return t.sent(),[2]}})})},e.prototype.onOptOutChanged=function(e){return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(t){switch(t.label){case 0:if(this.config.loggerProvider.debug("optOut is changed to ".concat(String(e),", calling ").concat(e?"sessionReplay.shutdown()":"sessionReplay.init()",".")),!e)return[3,1];return this.sessionReplay.shutdown(),[3,3];case 1:return[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise];case 2:t.sent(),t.label=3;case 3:return[2]}})})},e.prototype.execute=function(e){var t;return(0,f.sH)(this,void 0,void 0,function(){var n,r,i,o;return(0,f.YH)(this,function(s){switch(s.label){case 0:if(s.trys.push([0,9,,10]),!this.options.customSessionId)return[3,4];if(!(n=this.options.customSessionId(e)))return[3,3];if(n===this.sessionReplay.getSessionId())return[3,2];return[4,this.sessionReplay.setSessionId(n).promise];case 1:s.sent(),s.label=2;case 2:r=this.sessionReplay.getSessionReplayProperties(),e.event_properties=(0,f.Cl)((0,f.Cl)({},e.event_properties),r),s.label=3;case 3:return[3,8];case 4:if(!((n=this.config.sessionId)&&n!==this.sessionReplay.getSessionId()))return[3,6];return[4,this.sessionReplay.setSessionId(n).promise];case 5:s.sent(),s.label=6;case 6:if(!(n&&n===e.session_id))return[3,8];return i=void 0,e.event_type===h.S.IDENTIFY&&(i=tT(e)),[4,this.sessionReplay.evaluateTargetingAndCapture({event:e,userProperties:i})];case 7:s.sent(),r=this.sessionReplay.getSessionReplayProperties(),e.event_properties=(0,f.Cl)((0,f.Cl)({},e.event_properties),r),s.label=8;case 8:return[2,Promise.resolve(e)];case 9:return o=s.sent(),null==(t=this.config)||t.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(o.message)),[2,Promise.resolve(e)];case 10:return[2]}})})},e.prototype.teardown=function(){var e;return(0,f.sH)(this,void 0,void 0,function(){return(0,f.YH)(this,function(t){try{this.sessionReplay.shutdown(),this.config=null}catch(t){null==(e=this.config)||e.loggerProvider.error("Session Replay: teardown failed due to ".concat(t.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e}(),tM=function(e){return new tO(e)}},43166:e=>{e.exports={style:{fontFamily:"'DharmaGothic', 'DharmaGothic Fallback'",fontStyle:"normal"},className:"__className_884951",variable:"__variable_884951"}},47262:e=>{e.exports={style:{fontFamily:"'NeueMontrealItalic', 'NeueMontrealItalic Fallback'",fontStyle:"italic"},className:"__className_25a5f7",variable:"__variable_25a5f7"}},48181:e=>{e.exports={style:{fontFamily:"'EurostileExtended', 'EurostileExtended Fallback'",fontStyle:"normal"},className:"__className_805bf5",variable:"__variable_805bf5"}}
1,48854:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var r=n(12115),i=n(20063),o=n(87358);function s(){return"development"===function(){return"production"}()}function a(e){return new RegExp("/".concat(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"(?=[/?#]|$)"))}function c(e){(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{var n,r;let i=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof window||null===t.route)return null;window.si||(window.si=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];(window.siq=window.siq||[]).push(t)});let n=t.scriptSrc?t.scriptSrc:s()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":t.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":t.basePath?"".concat(t.basePath,"/speed-insights/script.js"):"/_vercel/speed-insights/script.js";if(document.head.querySelector('script[src*="'.concat(n,'"]')))return null;t.beforeSend&&(null==(e=window.si)||e.call(window,"beforeSend",t.beforeSend));let r=document.createElement("script");return r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/speed-insights"+(t.framework?"/".concat(t.framework):""),r.dataset.sdkv="1.2.0",t.sampleRate&&(r.dataset.sampleRate=t.sampleRate.toString()),t.route&&(r.dataset.route=t.route),t.endpoint?r.dataset.endpoint=t.endpoint:t.basePath&&(r.dataset.endpoint="".concat(t.basePath,"/speed-insights/vitals")),t.dsn&&(r.dataset.dsn=t.dsn),s()&&!1===t.debug&&(r.dataset.debug="false"),r.onerror=()=>{console.log("[Vercel Speed Insights] Failed to load script from ".concat(n,". Please check if any content blockers are enabled and try again."))},document.head.appendChild(r),{setRoute:e=>{r.dataset.route=null!=e?e:void 0}}}({framework:null!=(n=e.framework)?n:"react",basePath:null!=(r=e.basePath)?r:function(){if(void 0!==o&&void 0!==o.env)return o.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});i&&(t.current=i.setRoute)}},[e.route]),null}function u(e){let t=(()=>{let e=(0,i.useParams)(),t=(0,i.useSearchParams)()||new URLSearchParams,n=(0,i.usePathname)();return e?function(e,t){if(!e||!t)return e;let n=e;try{let e=Object.entries(t);for(let[t,r]of e)if(!Array.isArray(r)){let e=a(r);e.test(n)&&(n=n.replace(e,"/[".concat(t,"]")))}for(let[t,r]of e)if(Array.isArray(r)){let e=a(r.join("/"));e.test(n)&&(n=n.replace(e,"/[...".concat(t,"]")))}return n}catch(t){return e}}(n,Object.keys(e).length?e:Object.fromEntries(t.entries())):null})();return r.createElement(c,{route:t,...e,framework:"next",basePath:function(){if(void 0!==o&&void 0!==o.env)return o.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function l(e){return r.createElement(r.Suspense,{fallback:null},r.createElement(u,{...e}))}},61774:e=>{e.exports={style:{fontFamily:"'IBM Plex Mono', 'IBM Plex Mono Fallback'",fontStyle:"normal"},className:"__className_46fe82",variable:"__variable_46fe82"}},68321:(e,t,n)=>{"use strict";n.d(t,{default:()=>i.a});var r=n(41402),i=n.n(r)},76760:function(e,t,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",d="name",f="type",h="vendor",v="version",p="architecture",g="console",m="mobile",b="tablet",y="smarttv",w="wearable",S="embedded",C="Amazon",E="Apple",I="ASUS",k="BlackBerry",P="Browser",_="Chrome",x="Firefox",T="Google",R="Huawei",O="Microsoft",M="Motorola",N="Opera",D="Samsung",H="Sharp",L="Sony",A="Xiaomi",q="Zebra",j="Facebook",U=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},B=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},F=function(e,t){return typeof e===u&&-1!==z(t).indexOf(z(e))},z=function(e){return e.toLowerCase()},Y=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)},K=function(e,t){for(var n,r,i,a,u,l,d=0;d<t.length&&!u;){var f=t[d],h=t[d+1];for(n=r=0;n<f.length&&!u;)if(u=f[n++].exec(e))for(i=0;i<h.length;i++)l=u[++r],typeof(a=h[i])===c&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):void 0:this[a[0]]=l?a[1].call(this,l,a[2]):void 0:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;d+=2}},V=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(F(t[n][r],e))return"?"===n?o:n}else if(F(t[n],e))return"?"===n?o:n;return e},W={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,v],[/opios[\/ ]+([\w\.]+)/i],[v,[d,N+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[d,N]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[d,"UC"+P]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[v,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[v,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[v,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+P],v],[/\bfocus\/([\w\.]+)/i],[v,[d,x+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[d,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[d,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[d,"MIUI "+P]],[/fxios\/([-\w\.]+)/i],[v,[d,x]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+P]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+P],v],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,v],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,j],v],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[d,_+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,_+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[d,"Android "+P]],[/(chrome|omniweb|arora|[t
vendor: 4,850 bytes, line 1
1izenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[v,V,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[d,x+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,v],[/(cobalt)\/([\w\.]+)/i],[d,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,z]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[h,D],[f,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,D],[f,m]],[/((ipod|iphone)\d+,\d+)/i],[l,[h,E],[f,m]],[/(ipad\d+,\d+)/i],[l,[h,E],[f,b]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,E],[f,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,E],[f,b]],[/(macintosh);/i],[l,[h,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,R],[f,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,R],[f,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[h,A],[f,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,A],[f,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[f,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[f,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[f,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[h,M],[f,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,M],[f,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,"LG"],[f,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,"LG"],[f,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[f,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[f,m]],[/(pixel c)\b/i],[l,[h,T],[f,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,T],[f,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[h,L],[f,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,L],[f,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[f,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,C],[f,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,C],[f,m]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[f,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,k],[f,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,I],[f,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,I],[f,m]],[/(nexus 9)/i],[l,[h,"HTC"],[f,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[f,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[f,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[f,m]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,H],[f,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 6,871 bytes, line 1
1s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[f,m]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,l,[f,b]],[/(surface duo)/i],[l,[h,O],[f,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[f,m]],[/(u304aa)/i],[l,[h,"AT&T"],[f,m]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[f,m]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[f,b]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[f,b]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[f,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[f,b]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[f,b]],[/\b(k88) b/i],[l,[h,"ZTE"],[f,b]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[f,m]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[f,m]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[f,b]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[f,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[f,b]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[f,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[f,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[f,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[f,m]],[/\b(ph-1) /i],[l,[h,"Essential"],[f,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[f,b]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[f,b]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[f,b]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[f,b]],[/(sprint) (\w+)/i],[h,l,[f,m]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,O],[f,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,q],[f,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,q],[f,m]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[f,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[f,g]],[/(playstation [345portablevi]+)/i],[l,[h,L],[f,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,O],[f,g]],[/smart-tv.+(samsung)/i],[h,[f,y]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,D],[f,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[f,y]],[/(apple) ?tv/i],[h,[l,E+" TV"],[f,y]],[/crkey/i],[[l,_+"cast"],[h,T],[f,y]],[/droid.+aft(\w)( bui|\))/i],[l,[h,C],[f,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[h,H],[f,y]],[/(bravia[\w ]+)( bui|\))/i],[l,[h,L],[f,y]],[/(mitv-\w{5}) bui/i],[l,[h,A],[f,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,Y],[l,Y],[f,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,y]],[/((pebble))app/i],[h,l,[f,w]],[/droid.+; (glass) \d/i],[l,[h,T],[f,w]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,q],[f,w]],[/(quest( 2)?)/i],[l,[h,j],[f,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[f,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[f,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[f,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,m]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[d,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,v],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[v,V,W]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[v,V,W]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,"Mac OS"],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,v],[/\(bb(10);/i],[v,[d,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[d,x+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[v,[d,_+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[d,"Chromium OS"],v],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,v],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,v]]},G=function(e,t){if(typeof e===c&&(t=e,e=o),!(this instanceof G))return new G(e,t).getResult();var n=e||(typeof i!==a&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?U(J,t):J;return this.getBrowser=function(){var e,t={};return t[d]=o,t[v]=o,K.call(t,n,r.browser),t.major=typeof(e=t.version)===u?e.replace(/[^\d\.]/g,"").split(".")[0]:o,t},this.getCPU=function(){var e={};return e[p]=o,K.call(e,n,r.cpu),e},this.getDevice=function(){var e={};return e[h]=o,e[l]=o,e[f]=o,K.call(e,n,r.device),e},this.getEngine=function(){var e={};return e[d]=o,e[v]=o,K.call(e,n,r.engine),e},this.getOS=function(){var e={};return e[d]=o,e[v]=o,K.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===u&&e.length>350?Y(e,350):e,this},this.setUA(n),this};G.VERSION="0.7.33",G.BROWSER=B([d,v,"major"]),G.CPU=B([p]),G.DEVICE=B([l,h,f,g,m,y,b,w,S]),G.ENGINE=G.OS=B([d,v]),typeof t!==a?(e.exports&&(t=e.exports=G),t.UAParser=G):n.amdO?o===(r=(function(){return G}).call(t,n,t,e))||(e.exports=r):typeof i!==a&&(i.UAParser=G);var $=typeof i!==a&&(i.jQuery||i.Zepto);if($&&!$.ua){var X=new G;$.ua=X.getResult(),$.ua.get=function(){return X.getUA()},$.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var n in t)$.ua[n]=t[n]}}}("object"==typeof window?window:this)}
1,80549:(e,t,n)=>{"use strict";n.d(t,{useMutation:()=>l});var r=n(12115),i=n(38559),o=n(74268),s=n(38445),a=n(34049),c=class extends s.Q{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.EN)(t.mutationKey)!==(0,a.EN)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,i.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.jG.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},u=n(99776);function l(e,t){let n=(0,u.useQueryClient)(t),[i]=r.useState(()=>new c(n,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);let s=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(o.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((e,t)=>{i.mutate(e,t).catch(a.lQ)},[i]);if(s.error&&(0,a.GU)(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}},83899:(e,t,n)=>{"use strict";let r,i;n.d(t,{P2:()=>f});let o=(e,t)=>t.some(t=>e instanceof t),s=new WeakMap,a=new WeakMap,c=new WeakMap,u={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return l(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function l(e){if(e instanceof IDBRequest){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(l(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return c.set(t,e),t}if(a.has(e))return a.get(e);let t=function(e){if("function"==typeof e)return(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(d(this),t),l(this.request)}:function(...t){return l(e.apply(d(this),t))};return(e instanceof IDBTransaction&&function(e){if(s.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});s.set(e,t)}(e),o(e,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,u):e}(e);return t!==e&&(a.set(e,t),c.set(t,e)),t}let d=e=>c.get(e);function f(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){let s=indexedDB.open(e,t),a=l(s);return r&&s.addEventListener("upgradeneeded",e=>{r(l(s.result),e.oldVersion,e.newVersion,l(s.transaction),e)}),n&&s.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}let h=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],p=new Map;function g(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(p.get(t))return p.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||h.includes(n)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;
1return r&&(s=s.index(t.shift())),(await Promise.all([s[n](...t),i&&o.done]))[0]};return p.set(t,o),o}u=(e=>({...e,get:(t,n,r)=>g(t,n)||e.get(t,n,r),has:(t,n)=>!!g(t,n)||e.has(t,n)}))(u);let m=["continue","continuePrimaryKey","advance"],b={},y=new WeakMap,w=new WeakMap,S={get(e,t){if(!m.includes(t))return e[t];let n=b[t];return n||(n=b[t]=function(...e){y.set(this,w.get(this)[t](...e))}),n}};async function*C(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;let n=new Proxy(t,S);for(w.set(n,t),c.set(n,d(t));t;)yield n,t=await (y.get(n)||t.continue()),y.delete(n)}function E(e,t){return t===Symbol.asyncIterator&&o(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&o(e,[IDBIndex,IDBObjectStore])}u=(e=>({...e,get:(t,n,r)=>E(t,n)?C:e.get(t,n,r),has:(t,n)=>E(t,n)||e.has(t,n)}))(u)},89863:(e,t,n)=>{"use strict";n.d(t,{lt:()=>o});let r=new Map,i=e=>{let t=r.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([e,t])=>[e,t.getState()])):{}},o=(e,t={})=>(n,o,a)=>{let c,{enabled:u,anonymousActionType:l,store:d,...f}=t;try{c=(null==u||u)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,o,a);let{connection:h,...v}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};let i=r.get(n.name);if(i)return{type:"tracked",store:e,...i};let o={connection:t.connect(n),stores:{}};return r.set(n.name,o),{type:"tracked",store:e,...o}})(d,c,f),p=!0;a.setState=(e,t,r)=>{let s=n(e,t);if(!p)return s;let c=void 0===r?{type:l||(e=>{var t,n;if(!e)return;let r=e.split("\n"),i=r.findIndex(e=>e.includes("api.setState"));if(i<0)return;let o=(null==(t=r[i+1])?void 0:t.trim())||"";return null==(n=/.+ (.+) .+/.exec(o))?void 0:n[1]})(Error().stack)||"anonymous"}:"string"==typeof r?{type:r}:r;return void 0===d?null==h||h.send(c,o()):null==h||h.send({...c,type:`${d}/${c.type}`},{...i(f.name),[d]:a.getState()}),s},a.devtools={cleanup:()=>{h&&"function"==typeof h.unsubscribe&&h.unsubscribe(),((e,t)=>{if(void 0===t)return;let n=r.get(e);n&&(delete n.stores[t],0===Object.keys(n.stores).length&&r.delete(e))})(f.name,d)}};let g=(...e)=>{let t=p;p=!1,n(...e),p=t},m=e(a.setState,o,a);if("untracked"===v.type?null==h||h.init(m):(v.stores[v.store]=a,null==h||h.init(Object.fromEntries(Object.entries(v.stores).map(([e,t])=>[e,e===v.store?m:t.getState()])))),a.dispatchFromDevtools&&"function"==typeof a.dispatch){let e=!1,t=a.dispatch;a.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return h.subscribe(e=>{var t;switch(e.type){case"ACTION":if("string"!=typeof e.payload)return void console.error("[zustand devtools middleware] Unsupported action format");return s(e.payload,e=>{if("__setState"===e.type){if(void 0===d)return void g(e.state);1!==Object.keys(e.state).length&&console.error(`
2                    [zustand devtools middleware] Unsupported __setState action format.
3                    When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
4                    and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
5                    `);let t=e.state[d];return void(null==t||JSON.stringify(a.getState())!==JSON.stringify(t)&&g(t))}a.dispatchFromDevtools&&"function"==typeof a.dispatch&&a.dispatch(e)});case"DISPATCH":switch(e.payload.type){case"RESET":if(g(m),void 0===d)return null==h?void 0:h.init(a.getState());return null==h?void 0:h.init(i(f.name));case"COMMIT":if(void 0===d){null==h||h.init(a.getState());break}return null==h?void 0:h.init(i(f.name));case"ROLLBACK":return s(e.state,e=>{if(void 0===d){g(e),null==h||h.init(a.getState());return}g(e[d]),null==h||h.init(i(f.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return s(e.state,e=>{if(void 0===d)return void g(e);JSON.stringify(a.getState())!==JSON.stringify(e[d])&&g(e[d])});case"IMPORT_STATE":{let{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;void 0===d?g(r):g(r[d]),null==h||h.send(null,n);break}case"PAUSE_RECORDING":return p=!p}return}}),m},s=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.