/*! For license information please see app.js.LICENSE.txt */
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d4523f8f-2a60-4cac-90a2-c6fdcf0d8fbf",t._sentryDebugIdIdentifier="sentry-dbid-d4523f8f-2a60-4cac-90a2-c6fdcf0d8fbf")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"11f6510c43c7b0e978bf9af38a314ba9493fb229"},function(){var t={92207:function(t,e,n){t.exports=n(7452)},38341:function(t,e,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(e,{Z:function(){return r},e:function(){return o}})},36284:function(t,e,n){"use strict";n.d(e,{wD:function(){return i}});var r=n(38341);t=n.hmd(t);var o=n(65606);function i(){return!(0,r.Z)()&&"[object process]"===Object.prototype.toString.call(void 0!==o?o:0)}},51622:function(t,e,n){"use strict";n.d(e,{p:function(){return r}});var r=function(){return window.backEndVars}},21634:function(t,e,n){"use strict";n.d(e,{JF:function(){return i},f_:function(){return s}});var r=n(48406),o=(0,n(51622).p)(),i=function(){return o.promoCode?o.promoCode:r.A.get("promoCode")},s=function(){return(o.isPromoCodeValid?o.isPromoCodeValid:r.A.get("isPromoCodeValid"))?i():null}},48406:function(t,e){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},i={get:function(t){var e=localStorage.getItem(t);if(null===e)return e;try{return JSON.parse(e)}catch(t){return e}},set:function(t,e){localStorage.setItem(t,"string"==typeof e?e:JSON.stringify(e))},append:function(t,e){this.set(t,r(r({},this.get(t)||{}),e))},appendDiffTypes:function(t,e){var i=this.get(t);i?Array.isArray(i)&&Array.isArray(e)?this.set(t,o(o([],i,!0),e,!0)):"object"!==n(i)||"object"!==n(e)?this.set(t,e):this.set(t,r(r({},i),e)):this.set(t,e)},remove:function(t){localStorage.removeItem(t)},clear:function(){localStorage.clear()},getAnswers:function(){return this.get("answers")||{}},storeMarketingInfo:function(){this.storeUtmParams(window.location.search),this.storeLastUtmParams(window.location.search),this.storeScreenResolution(window.screen.width,window.screen.height,window.devicePixelRatio)},storeScreenResolution:function(t,e,n){this.append("marketing",{screen:{width:t*n,height:e*n}})},storeUtmParams:function(t){var e=this.parseUtmParams(t);Object.keys(e).length&&void 0===this.getMarketingInfo("utmParams")&&this.append("marketing",{utmParams:e})},storeLastUtmParams:function(t){var e=this.parseUtmParams(t);Object.keys(e).length&&(e.utm_creative=e.utm_creative||this.getMarketingInfo("utmParams").utm_creative,this.append("marketing",{lastUtmParams:e}))},parseUtmParams:function(t){return t.substring(1).split("&").filter((function(t){return t.startsWith("utm")})).map((function(t){return t.split("=").map(decodeURIComponent)})).reduce((function(t,e){var n,o=e[0],i=e[1];return r(r({},t),((n={})[o]=i,n))}),{})},getMarketingInfo:function(t){void 0===t&&(t=null);var e=this.get("marketing")||{};return t?e[t]:e},storeCustomerUuid:function(t){var e=new URLSearchParams(window.location.search),n=e.get("cid")||e.get("customerUuid")||t;this.getCustomerUuid()||this.setCustomerUuid(n)},setCustomerUuid:function(t){this.set("__cid",t)},getCustomerUuid:function(){return this.get("__cid")||""},setEventId:function(t){this.set("__eid",t)}};e.A=i,window.store=i},57822:function(t,e,n){"use strict";n.r(e),n.d(e,{buildExecutePaymentPayload:function(){return g},buildGeoip:function(){return x},buildVerifyCardOptions:function(){return I},executePaymentOnErrorCb:function(){return w},executePaymentOnSuccessCb:function(){return _},getFormButton:function(){return T},getFormNode:function(){return E},getSettings:function(){return C},renderPaymentSelector:function(){return S},renderVerificationError:function(){return k},setUpDropIn:function(){return v},showCardform:function(){return b},startPaymentProcessBraintree:function(){return A}});var r=n(92207),o=n.n(r),i=n(98619),s=n(85229),a=n(21634),c=n(72727),u=n(23160);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){var r;return r=function(t,e){if("object"!=l(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==l(r)?r:String(r))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){f(i,r,o,s,a,"next",t)}function a(t){f(i,r,o,s,a,"throw",t)}s(void 0)}))}}var y=!1;window.braintreeDropInV1Loaded=!1;var g=function(t){var e;return h(h({},t),{},{uuid:window.getUuid(),customerUuid:window.getCustomerUuid(),email:store.getAnswers()["saved-email"]||null,paymentMethod:"braintree",price:document.querySelector("#price").value,plan:document.querySelector("#braintree-plan").value,bundleId:null===(e=document.querySelector("#bundle-id"))||void 0===e?void 0:e.value,isSubscriptionBoxes:backEndVars.isExperimentsEnabled,pageSlug:backEndVars.pageSlug||"",purchasableType:backEndVars.purchasableIdentifier||"",checkoutOffer:backEndVars.checkoutOffer,type:backEndVars.type||"",promoCode:(0,a.f_)(),discountFlow:(0,u.a)()})},v=function(t,e){return{container:document.querySelector("#dropin-container"),hide:function(){this.container.classList.add("hidden")},show:function(){this.container.classList.remove("hidden")},showCardForm:function(t){this.show(),t.clearSelectedPaymentMethod()},executePayment:function(e,n){i.fetcher.post(backEndVars.braintreeDropInFormUrl,e,{"X-Requested-With":"XMLHttpRequest"}).then((function(r){_({response:r,provider:t,payments:payments,window:window,payload:e,dropinInstance:n})})).catch((function(e){var r=e.status,o=e.error;w({status:r,error:o,provider:t,payments:payments,dropinInstance:n})}))},settings:{authorization:e.auth,container:e.container,dataCollector:{kount:!0},card:{cardholderName:{required:!0}}}}},b=function(t){document.querySelector("#dropin-container").classList.remove("hidden"),t.clearSelectedPaymentMethod()},_=function(t){var e=t.response,n=t.provider,r=t.payments,o=(t.window,t.payload),i=t.dropinInstance;if(!e||!e.ok)return r.formError.display(n,"Something went wrong. Please try again"),void r.paymentFormCloseButton.show();var s={};s.pageSlug=o.pageSlug,s.checkoutOffer=backEndVars.checkoutOffer,y=r.checkPaymentStatusAndRedirect(n,(new Url).build("products",o.uuid,"is-paid"),s),b(i)},w=function(t){var e=t.status,n=t.error,r=t.provider,o=t.payments,i=t.dropinInstance;455===e?(new Url).redirectTo("meal-plan-error"):404===e?(new Url).redirectTo("/home"):(o.formError.display(r,n),o.formLoader.hide(),o.paymentFormCloseButton.show()),b(i)},S=function(t,e){document.querySelector("#dropin-container .braintree-toggle").addEventListener("click",(function(){t||(document.querySelector(".m-card-details__controls input[type='submit']").style.display="block",document.querySelector(".braintree-method--active").style.display="none",payments.formError.clear(e))}))},k=function(){document.querySelector(".braintree-method__check use").setAttribute("xlink:href","#iconX"),document.querySelector(".braintree-method--active").classList.add("braintree-error__message"),document.querySelector(".braintree-method__check").classList.add("braintree-error__icon"),document.querySelector('.m-card-details__controls input[type="submit"]').style.display="none"},E=function(t){return{element:document.querySelector("#".concat(t,"-card-details")),isBraintree:function(){return backEndVars.paymentTypes&&backEndVars.paymentTypes.braintree},paymentMethod:function(){return this.isBraintree()?"braintree":null}}},T=function(t){return{element:document.querySelector("#".concat(t,'-card-details input[type="submit"]')),enable:function(){this.element.disabled=!1,this.element.classList.remove("disabled")},disable:function(){this.element.disabled=!0,this.element.classList.add("disabled")}}},C=function(){return{auth:document.querySelector("#braintree-drop-in-token").textContent,container:"#dropin-container"}},x=function(){return{city:document.querySelector("#braintree-drop-in-geoip-city").textContent,postalCode:document.querySelector("#braintree-drop-in-geoip-postal-code").textContent,region:document.querySelector("#braintree-drop-in-geoip-region").textContent,countryName:document.querySelector("#braintree-drop-in-geoip-country-name").textContent,countryCode:document.querySelector("#braintree-drop-in-geoip-country-code").textContent,clientIp:document.querySelector("#braintree-drop-in-geoip-client-ip").textContent}},I=function(t){return{amount:t.price,nonce:t.nonce,bin:t.bin,email:t.email,collectDeviceData:!0,billingAddress:{givenName:t.firstName,surname:t.lastName,locality:t.geoip.city,region:t.geoip.region,postalCode:t.geoip.postalCode,countryCodeAlpha2:t.geoip.countryCode},additionalInformation:{acsWindowSize:"05",ipAddress:t.geoip.clientIp,shippingGivenName:t.firstName,shippingSurname:t.lastName,shippingAddress:{locality:t.geoip.city,region:t.geoip.region,postalCode:t.geoip.postalCode,countryCodeAlpha2:t.geoip.countryCode}},exemptionRequested:!0,onLookupComplete:function(t,e){e()}}},A=function(t){var e,n={uuid:t.uuid,customerUuid:t.customerUuid,email:store.getAnswers()["saved-email"]||null,paymentMethod:"braintree",price:document.querySelector("#price").value,plan:document.querySelector("#braintree-plan").value,bundleId:null===(e=document.querySelector("#bundle-id"))||void 0===e?void 0:e.value,isSubscriptionBoxes:backEndVars.isExperimentsEnabled,pageSlug:backEndVars.pageSlug||"",purchasableType:backEndVars.purchasableIdentifier||"",checkoutOffer:backEndVars.checkoutOffer||"",type:backEndVars.type||"",promoCode:(0,a.f_)(),discountFlow:(0,u.a)()};i.fetcher.post(backEndVars.braintreeDropInFormUrl,n,{Accept:"application/json"}).then((function(t){t.checkoutOffer=backEndVars.checkoutOffer,(0,s.checkPaymentStatusAndRedirect)("braintree",(new Url).build("products",t.uuid,"is-paid"),t)})).catch((function(t){console.error(t)}))};document.addEventListener("DOMContentLoaded",(function(){if(document.querySelector(".braintree-drop-in-v1"))var t=setInterval((function(){(function(){var t="braintree-drop-in-v1";if(!window.braintreeDropInV1Loaded&&(y=!1,"undefined"!=typeof braintree&&void 0!==braintree.client&&void 0!==braintree.dropin)){window.braintreeDropInV1Loaded=!0;var e=E(t),n=T(t),r=C(),i=x(),s=v(t,r),a=function(){var n=m(o().mark((function n(){var a,u;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,braintree.dropin.create(s.settings);case 3:return a=n.sent,n.next=6,braintree.threeDSecure.create({authorization:r.auth,version:2});case 6:u=n.sent,n.next=12;break;case 9:return n.prev=9,n.t0=n.catch(0),n.abrupt("return",Promise.reject("Authentication is invalid."));case 12:payments.formLoader.hide(),e.element.addEventListener("submit",(function(e){if(e.preventDefault(),!y){y=!0,document.querySelector('[data-error-field="'.concat(t,'"]')).classList.add("hidden");var n=document.querySelector("#price"),r=n.value?n.value:backEndVars.paymentTypes.braintree.price,l=document.querySelector("#braintree__card-view-input__cardholder-name").value.trim().split(" "),d=l[0],p=l.length>1?l[l.length-1]:"";a.requestPaymentMethod((function(e,n){if(e)return console.log("tokenization error:"),console.log(e),a.clearSelectedPaymentMethod(),void(y=!1);payments.formLoader.show(),payments.paymentFormCloseButton.hide(),(0,c.rR)(h(h({},(0,c.l5)({provider:"braintree"})),{},{nonce:n.nonce})).then(function(){var e=m(o().mark((function e(n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.verifyCard(I({firstName:d,lastName:p,nonce:n.nonce,bin:n.details.bin,price:r,email:store.getAnswers()["saved-email"],geoip:i}),(function(e,n){if(e||!n.liabilityShifted||!n.liabilityShiftPossible)return k(),payments.formError.display(t,"Something went wrong. Please try again"),payments.paymentFormCloseButton.show(),payments.formLoader.hide(),void(y=!1);payments.paymentFormCloseButton.hide(),s.hide(),payments.formLoader.show();var r=g(n);s.executePayment(r,a),y=!1}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){e.error,payments.formError.display(t,"Something went wrong. Please try again"),payments.paymentFormCloseButton.show(),payments.formLoader.hide(),y=!1}))}))}})),S(y,t);case 15:case"end":return n.stop()}}),n,null,[[0,9]])})));return function(){return n.apply(this,arguments)}}();return a().catch((function(e){payments.formError.display(t,e),n.disable(),payments.formLoader.hide()})),!0}})()&&clearInterval(t)}),1e3)}))},80541:function(t,e,n){"use strict";n.d(e,{G:function(){return o}});var r=function(t){var e=new URL(t.href);e.searchParams.append("cid",store.get("__cid")),t.setAttribute("href",e)},o=function(){var t=document.querySelectorAll('a[data-e2e="burger-menu-sign-in"]'),e=document.querySelectorAll('a[data-e2e="footer-sign-in"]');t.forEach((function(t){return r(t)})),e.forEach((function(t){return r(t)}))}},53601:function(t,e,n){"use strict";n.d(e,{K:function(){return r}});var r=function(t){return store.getAnswers().data?store.getAnswers().data[t]:""}},16655:function(t,e,n){"use strict";n.d(e,{g:function(){return i}});var r=n(58993),o=n(53601),i=function(){var t=new URLSearchParams(window.location.search),e=new RegExp(".+/(".concat(r.A.pattern(),")(/upsales|/downsale|/products|.+token)")).exec(window.location.pathname);return e&&(e=e[1]),e||t.get("cid")||t.get("customerUuid")||store.getCustomerUuid()||(0,o.K)("customer_uuid")||backEndVars.customerUuid}},53850:function(t,e,n){"use strict";n.d(e,{L:function(){return r}});var r=function(){var t=window.location;return"https://"+t.hostname+(t.port?":"+t.port:"")}},53814:function(t,e,n){"use strict";n.d(e,{J:function(){return r}});var r=function(t,e){var n=store.getAnswers();n[t]=e,store.set("answers",n)}},68503:function(t,e,n){"use strict";n.r(e),n.d(e,{Url:function(){return J},clearUserData:function(){return E},createPayPalCustomField:function(){return et},createPaymentInfo:function(){return Q},currentProductAlreadyPurchased:function(){return ft},failedPayments:function(){return L},getAnswersData:function(){return u.K},getCheckoutUrl:function(){return ht},getCurrentPurchaseUuid:function(){return v},getCustomerUuid:function(){return i.g},getFingerprint:function(){return A},getHost:function(){return s.L},getQueryParam:function(){return mt},getResendFormVisibility:function(){return C},getUuid:function(){return ut},hasToOpenDiscount:function(){return ot},hasUtmParams:function(){return Y},isAndroidMobile:function(){return U},isChromeMobileAndroid:function(){return $},isChromeMobileIOS:function(){return F},isIE10:function(){return W},isIE11:function(){return V},isIOSMobile:function(){return q},isMacOS:function(){return z},isNewestIos:function(){return H},moveToNextUrl:function(){return pt},purchasablePath:function(){return st},pushGTMDataLayer:function(){return nt},redirectToFinalPage:function(){return dt},redirectToURL:function(){return it},removeAnswer:function(){return S},removeAnswersData:function(){return k},removeFingerprint:function(){return O},removeMarketingInfo:function(){return K},replaceSearchParams:function(){return at},searchAdditionsDetailsByProvider:function(){return Z},searchPlanDetailsByProviderAndBillingOption:function(){return X},searchProviderDetailsByProvider:function(){return tt},setAnswer:function(){return a.J},setAnswersDataKey:function(){return R},setCheckoutUrl:function(){return b},setCurrentCustomerProductUuidWhenOfferIsDownsale:function(){return D},setCurrentPurchaseUuid:function(){return M},setCustomerUuid:function(){return ct},setFingerprint:function(){return I},setPurchasableUuidInGetItNowButton:function(){return w},setResendFormVisibility:function(){return x},setRightCustomerUuidOnGetItNowButtonWhenLoadFromCache:function(){return _},setUUID:function(){return P},toDecimal:function(){return N},trackEventInGTM:function(){return rt},urlContainsUUID:function(){return T}});var r=n(48406),o=n(58993),i=n(16655),s=n(53850),a=n(53814),c=n(80541),u=n(53601),l=n(21634),d=n(23160);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:String(e)}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(t,e)||y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}window.performance&&2===window.performance.navigation.type&&window.location.reload(),navigator.onLine&&setTimeout((function(){window.location.reload()}),864e5);var v=function(){return(0,u.K)("currentPurchaseUuid")?(0,u.K)("currentPurchaseUuid"):(0,u.K)("uuid")},b=function(){window.replaceSearchParams("customerUuid",r.A.getCustomerUuid());var t=document.getElementsByClassName("js-get-it-now-button");if(t.length){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=y(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){e.value.setAttribute("href",window.getCheckoutUrl())}}catch(t){n.e(t)}finally{n.f()}}},_=function(){window.addEventListener("pageshow",(function(t){t.persisted&&b()}))},w=function(){b()},S=function(t){var e=r.A.getAnswers();delete e[t],r.A.set("answers",e)},k=function(){var t=r.A.getAnswers();delete t.data,r.A.set("answers",t)},E=function(){var t=r.A.getAnswers(),e=["measurements","bodyClass","data"];for(var n in t)e.includes(n)||delete t[n],"data"===n&&(delete t[n].can_generate,delete t[n].measurement,delete t[n].uuid,delete t[n].temporary_code,r.A.set("answers",t))},T=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.pathname;return RegExp(window.backEndVars.systemType+"/".concat(o.A.pattern())).test(t)},C=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=r.A.get("resendFormVisibilityPerDiet")||{};return t?e[t]:e},x=function(t,e){var n=C();if(n[t]=e,"string"!=typeof t){n={};for(var o=0,i=Object.entries(t);o<i.length;o++){var s=m(i[o],2),a=s[0],c=s[1];n[a]=c}}r.A.set("resendFormVisibilityPerDiet",n)},I=function(t){r.A.set("fingerprint",t)},A=function(){return r.A.get("fingerprint")?r.A.get("fingerprint"):[]},O=function(){r.A.set("fingerprint",[])},R=function(t,e){if(t&&e){var n=r.A.getAnswers();n.data||(n.data={}),n.data[t]=e,r.A.set("answers",n)}},P=function(t){if(t){var e=r.A.getAnswers();e.data||(e.data={}),e.data.uuid=t,r.A.set("answers",e)}},M=function(t){if(t){var e=r.A.getAnswers();e.data||(e.data={}),e.data.currentPurchaseUuid=t,r.A.set("answers",e)}},D=function(){"downsale"==backEndVars.checkoutOffer&&(R("customer_uuid",backEndVars.customerUuid),R("uuid",backEndVars.purchasableUUID))},L=function(t,e){var n=r.A.getAnswers().failedPayments||[];n.push(t),(0,a.J)("failedPayments",n),(0,a.J)("showPaymentError",e||!0)},N=function(t){return parseFloat(t).toFixed(1)},B=navigator.userAgent.toLowerCase(),U=B.indexOf("android")>-1&&(B.indexOf("mobile")>-1||-1===B.indexOf("chrome")),j=B.indexOf("android")>-1&&-1===B.indexOf("mobile")&&-1===B.indexOf("x11"),F=B.match("crios"),$=B.indexOf("mobile")>-1&&-1!==B.indexOf("chrome"),q=/ipad|iphone|ipod/.test(B)&&!window.MSStream,z=/macintosh|macintel|macppc|mac68k|macos/.test(B)&&!window.MSStream,H=function(){var t=B.match(/os (\d{1,})_\d/);return!!t&&(q&&t[1]>11)};String.prototype.insertBeforeLastOccurrence=function(t,e){var n=this.lastIndexOf(t);if(n>-1)return this.substring(0,n)+e+this.substring(n)};var W=navigator.userAgent.match(/MSIE 10/i),V=/Trident.*rv:/.test(navigator.userAgent),Y=function(t){return 0!=t.substring(1).split("&").filter((function(t){return t.startsWith("utm")})).length},K=function(){r.A.remove("marketing")},J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,n=[{key:"build",value:function(){return"".concat((0,s.L)(),"/").concat(this._joinWithSlashes.apply(this,arguments))}},{key:"cdn",value:function(){return"".concat(this._trimSlashes(backEndVars.cdn),"/").concat(this._joinWithSlashes.apply(this,arguments))}},{key:"redirectTo",value:function(){window.location.href=this.build.apply(this,arguments)}},{key:"redirectAfter",value:function(t){var e=this;setTimeout((function(){window.location.href=e.build(t)}),3500)}},{key:"_ensureString",value:function(t){return"".concat(t)}},{key:"_trimSlashes",value:function(t){return this._ensureString(t).replace(/(^\/*|\/*$)/g,"")}},{key:"_joinWithSlashes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map((function(e){return t._trimSlashes(e)})).join("/")}}],n&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),G=function(t){var e="";switch(t){case"stripe":case"stripe-elements":case"stripe-pay-button":e="stripe";break;case"paypal-old":case"paypal-smart-button":e="paypal";break;case"braintree":e="braintree";break;case"primer":e="primer";break;case"adyen":e="adyen"}return e},X=function(t,e,n){return t.plans.find((function(t){return t.provider===G(e)&&t.billingOptionType===n}))},Q=function(t,e){var n=X(t.planDetails,e,t.planDetails.type),r=backEndVars.paymentDetails[backEndVars.boxSequence]||backEndVars.paymentDetails;return{customerUuid:window.getCustomerUuid(),purchase:{type:t.type,purchasable:{id:t.id,type:t.slug},bundleProducts:t.bundleProducts,finalPrice:{amount:r.price?r.price.amount:r.planDetails.additionalDetails[0].totalAmount,currency:r.price?r.price.currency:r.planDetails.additionalDetails[0].currency}},subscriptionPlan:n.planId,planId:n.planId,planType:t.planDetails.type}},Z=function(t,e){return t.additionalDetails.find((function(t){return t.provider===G(e)}))},tt=function(t,e){return t.initializationDetails.find((function(t){return t.provider===G(e)}))},et=function(t,e,n,r,o){return t+"|$|"+e+"|$|"+n+"|$|"+r+"|$|"+o.join("$$$")},nt=function(t){window.dataLayer=window.dataLayer||[],dataLayer.push(t)},rt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){"PageView"===t.eventType?r.A.setEventId(t.id):nt({event:t.type,eventID:t.id})}))},ot=function(){var t=localStorage.getItem("discountExpiration"),e=localStorage.getItem("paymentInit"),n=localStorage.getItem("discountSeen");return backEndVars.discountData&&!backEndVars.discountData.pageIsDiscount&&!!backEndVars.discountData.discountSlug&&!t&&!!e&&!n},it=function(t,e){if("downsale"===backEndVars.checkoutOffer){var n=document.querySelector(".".concat(e," .js-paypal-loader"));n&&$t(n).fadeOut();var r=document.querySelector("#flash-message-modal");"paypal-smart-button"!=e&&(t=r.dataset.redirectUrl),r&&$t(r).show()}setTimeout((function(){"-1"==t.indexOf("https")?window.location.href=t:window.location=t}),3500)},st=function(){var t,e=new URL(window.location.pathname,window.location.origin);e.searchParams.append("customerUuid",window.getCustomerUuid()),e.searchParams.append("uuid",null!==(t=backEndVars.purchasableUUID)&&void 0!==t?t:window.getUuid());var n=(0,l.JF)(),r=(0,d.a)();return n&&e.searchParams.append("promoCode",n),r&&e.searchParams.append("discountFlow",r),e.toString()},at=function(t,e){var n=new URL(window.location.href,window.location.origin);n.searchParams.has(t)&&(n.searchParams.set(t,e),history.replaceState(null,null,n.toString()))},ct=function(t){this.replaceSearchParams("cid",t),this.replaceSearchParams("customerUuid",t),r.A.setCustomerUuid(t),(0,u.K)("customer_uuid")&&R("customer_uuid",t)},ut=function(){var t=new URLSearchParams(window.location.search);return t.get("uuid")||t.get("purchasableUuid")||v()||backEndVars.purchasableUUID},lt=function(){return window.getHost()+"/final?customerUuid=".concat((0,i.g)(),"&uuid=").concat(ut(),"#get-plan")},dt=function(){window.location.href=lt()},ht=function(){return window.getHost()+"/checkout?customerUuid=".concat((0,i.g)(),"&uuid=").concat(ut())},pt=function(){var t=r.A.get("nextUrl");window.location=t||"/"},ft=function(){return r.A.get("productsPaid")&&r.A.get("productsPaid").includes(backEndVars.purchasableType)&&!window.location.href.includes("downsale")},mt=function(t){return new URLSearchParams(window.location.search).get(t)};window.clearUserData=E,window.createPaymentInfo=Q,window.createPayPalCustomField=et,window.failedPayments=L,window.getAnswersData=u.K,window.getCurrentPurchaseUuid=v,window.getFingerprint=A,window.getHost=s.L,window.getProviderType=G,window.getResendFormVisibility=C,window.hasToOpenDiscount=ot,window.hasUtmParams=Y,window.isAndroidMobile=U,window.isAndroidTablet=j,window.isChromeMobileIOS=F,window.isChromeMobileAndroid=$,window.isIE10=W,window.isIE11=V,window.isIOSMobile=q,window.isMacOS=z,window.isNewestIos=H,window.pushGTMDataLayer=nt,window.redirectToURL=it,window.removeAnswer=S,window.removeAnswersData=k,window.removeFingerprint=O,window.removeMarketingInfo=K,window.searchAdditionsDetailsByProvider=Z,window.searchPlanDetailsByProviderAndBillingOption=X,window.searchProviderDetailsByProvider=tt,window.setAnswer=a.J,window.setAnswersDataKey=R,window.setCurrentCustomerProductUuidWhenOfferIsDownsale=D,window.setCurrentPurchaseUuid=M,window.setFingerprint=I,window.setPurchasableUuidInGetItNowButton=w,window.setResendFormVisibility=x,window.setRightCustomerUuidOnGetItNowButtonWhenLoadFromCache=_,window.setUUID=P,window.toDecimal=N,window.trackEventInGTM=rt,window.Url=J,window.urlContainsUUID=T,window.purchasablePath=st,window.replaceSearchParams=at,window.getCustomerUuid=i.g,window.setCustomerUuid=ct,window.getFinalUrl=lt,window.getUuid=ut,window.redirectToFinalPage=dt,window.getCheckoutUrl=ht,window.setCheckoutUrl=b,window.moveToNextUrl=pt,window.currentProductAlreadyPurchased=ft,window.appendCidToMenuLinks=c.G},2204:function(){function t(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}document.addEventListener("DOMContentLoaded",(function(){var e,n=new IntersectionObserver((function(t,e){t.forEach((function(t){var e=t.target;t.intersectionRatio>0&&!e.hasAttribute("src")&&(e.classList.contains("lazy-background")?e.style.backgroundImage="url('".concat(e.dataset.img,"')"):e.setAttribute("src",e.dataset.src))}))}),{rootMargin:"0px 0px 200px 0px"}),r=t(document.getElementsByTagName("img"));try{for(r.s();!(e=r.n()).done;){var o=e.value;n.observe(o)}}catch(t){r.e(t)}finally{r.f()}var i,s=t(document.getElementsByTagName("video"));try{for(s.s();!(i=s.n()).done;){var a=i.value;n.observe(a)}}catch(t){s.e(t)}finally{s.f()}var c,u=t(document.getElementsByClassName("lazy-background"));try{for(u.s();!(c=u.n()).done;){var l=c.value;n.observe(l)}}catch(t){u.e(t)}finally{u.f()}}))},48835:function(t,e,n){"use strict";n.r(e),n.d(e,{handleConfirmChoicesClick:function(){return y},handleDOMContentLoaded:function(){return f},handleRadioChange:function(){return m},newCookiePolicy:function(){return p}});var r=n(48406),o="cookie-policy",i=function(){return r.A.get(o)||{}},s=function(t){r.A.set(o,t)},a=function(){r.A.remove(o),r.A.set(o,{"cookie-notification":!1})},c=["US-CA","AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB"];function u(){dataLayer.push(arguments)}function l(t){window.setCookie("ad_storage",t),window.setCookie("ad_user_data",t),window.setCookie("ad_personalization",t),function(t){u("consent","update",{ad_storage:t,ad_user_data:t,ad_personalization:t,region:c})}(t)}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}window.dataLayer=window.dataLayer||[],window.cookiePolicyAnswer=function(t){return function(t){return!1!==i()[t]}(t)},window.setCookie=function(t,e){document.cookie=t+"="+e+";"},window.getCookie=function(t){var e=document.cookie.match(new RegExp("(^| )"+t+"=([^;]+)"));if(e)return e[2]},document.addEventListener("DOMContentLoaded",f);var p=i();function f(){"/start"!==window.location.pathname&&"/cookie-policy"!==window.location.pathname&&"/cookie-policy/disagree"!==window.location.pathname&&store.set("cookiesVisited","true"),function(){var t="granted";u("consent","default",{ad_storage:t,ad_user_data:t,ad_personalization:t});var e=document.getElementById("cookies-popup-div"),n=r.A.get("cookiesVisited");(!1===i()["cookie-notification"]||n)&&e&&e.remove(),!1===i().targeting&&(t="denied"),l(t),document.getElementsByClassName("js-cookies-accept").length&&document.getElementsByClassName("js-cookies-accept")[0].addEventListener("click",(function(n){return n.preventDefault(),a(),l(t="granted"),e&&e.remove(),!1}))}();for(var t=document.querySelectorAll("input.cookies-disagree"),e=0;e<t.length;e++)t[e].addEventListener("change",m);for(var n=0,o=Object.entries(i());n<o.length;n++){var s,c=d(o[n],2),h=c[0],p=c[1],f=null===(s=document.getElementsByTagName("body")[0])||void 0===s?void 0:s.querySelector('input[name="'+h+'"][value="'+(0|p)+'"]');f&&f.click()}var g=document.getElementById("back-button");g&&g.addEventListener("click",y)}function m(t){var e=t.target.name,n="1"===t.target.value;p[e]=n}function y(){store.set("cookiesVisited","true"),0!==Object.keys(p).length&&s(p),document.referrer.length>1&&(window.location=document.referrer)}},59868:function(t,e,n){"use strict";var r=n(58993),o=n(48406);var i=n(68503),s=n(59607);o.A.storeCustomerUuid(window.getCustomerUuid()||r.A.v4()),document.addEventListener("DOMContentLoaded",(function(){backEndVars.gender&&(0,s.V)();var t,e=o.A.getAnswers().bodyClass||o.A.get("bodyClass")||"woman-theme";t=e,document.body&&document.body.classList&&t&&"/"!=window.location.pathname&&(document.body.classList.contains("woman-theme")&&document.body.classList.remove("woman-theme"),document.body.classList.contains("men-theme")&&document.body.classList.remove("men-theme"),document.body.classList.add(t)),(0,i.setPurchasableUuidInGetItNowButton)(),(0,i.setRightCustomerUuidOnGetItNowButtonWhenLoadFromCache)(),document.querySelectorAll('a[data-e2e="burger-menu-sign-in"]').forEach((function(t){var e=new URL(t.href);e.searchParams.append("cid",localStorage.getItem("__cid")),t.setAttribute("href",e)}))})),(0,i.urlContainsUUID)()&&(0,i.clearUserData)()},98619:function(t,e,n){"use strict";n.d(e,{fetcher:function(){return q}});var r=n(92207),o=n.n(r),i="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==i&&i,s="URLSearchParams"in i,a="Symbol"in i&&"iterator"in Symbol,c="FileReader"in i&&"Blob"in i&&function(){try{return new Blob,!0}catch(t){return!1}}(),u="FormData"in i,l="ArrayBuffer"in i;if(l)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&d.indexOf(Object.prototype.toString.call(t))>-1};function p(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function m(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return a&&(e[Symbol.iterator]=function(){return e}),e}function y(t){this.map={},t instanceof y?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function g(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function b(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function _(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:c&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:u&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:s&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():l&&c&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=_(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=_(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):s&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c&&(this.blob=function(){var t=g(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=g(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(b)}),this.text=function(){var t,e,n,r=g(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=v(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}y.prototype.append=function(t,e){t=p(t),e=f(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},y.prototype.delete=function(t){delete this.map[p(t)]},y.prototype.get=function(t){return t=p(t),this.has(t)?this.map[t]:null},y.prototype.has=function(t){return this.map.hasOwnProperty(p(t))},y.prototype.set=function(t,e){this.map[p(t)]=f(e)},y.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},y.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),m(t)},y.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),m(t)},y.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),m(t)},a&&(y.prototype[Symbol.iterator]=y.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function k(t,e){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,o=(e=e||{}).body;if(t instanceof k){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new y(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new y(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),S.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new y(e.headers),this.url=e.url||"",this._initBody(t)}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})},w.call(k.prototype),w.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var C=[301,302,303,307,308];T.redirect=function(t,e){if(-1===C.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})};var x=i.DOMException;try{new x}catch(t){(x=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),x.prototype.constructor=x}function I(t,e){return new Promise((function(n,r){var o=new k(t,e);if(o.signal&&o.signal.aborted)return r(new x("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var t,e,r={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new y,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}})),e)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;setTimeout((function(){n(new T(o,r))}),0)},s.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},s.onabort=function(){setTimeout((function(){r(new x("Aborted","AbortError"))}),0)},s.open(o.method,function(t){try{return""===t&&i.location.href?i.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&(c?s.responseType="blob":l&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(s.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof y?o.headers.forEach((function(t,e){s.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){s.setRequestHeader(t,f(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",a),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",a)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function O(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){P(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function P(t,e,n){var r;return r=function(t,e){if("object"!=A(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==A(r)?r:String(r))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M(t,e,n,r,o,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function D(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){M(i,r,o,s,a,"next",t)}function a(t){M(i,r,o,s,a,"throw",t)}s(void 0)}))}}function L(){return L=D(o().mark((function t(e){var n,r=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.abrupt("return",j(e,$("get","",n)));case 2:case"end":return t.stop()}}),t)}))),L.apply(this,arguments)}function N(){return N=D(o().mark((function t(e,n){var r,i=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},t.abrupt("return",j(e,$("post",n,r)));case 2:case"end":return t.stop()}}),t)}))),N.apply(this,arguments)}function B(){return B=D(o().mark((function t(e){var n,r=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},t.abrupt("return",j(e,$("delete","",n)));case 2:case"end":return t.stop()}}),t)}))),B.apply(this,arguments)}function U(){return U=D(o().mark((function t(e,n){var r,i=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:{},t.abrupt("return",j(e,$("put",n,r)));case 2:case"end":return t.stop()}}),t)}))),U.apply(this,arguments)}function j(t,e){return F.apply(this,arguments)}function F(){return(F=D(o().mark((function t(e,n){var r,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,n);case 2:return r=t.sent,t.prev=3,t.next=6,r.json();case 6:i=t.sent,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),i={};case 12:if(r.ok){t.next=14;break}throw R({status:r.status},i);case 14:return t.abrupt("return",i);case 15:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function $(t,e){var n={method:t,headers:R({"Content-Type":"application/json"},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})};e&&(n.body=JSON.stringify(e));var r=document.getElementsByName("csrf-token")[0].content;return null!=r&&(n.headers["X-CSRF-TOKEN"]=r),n}I.polyfill=!0,i.fetch||(i.fetch=I,i.Headers=y,i.Request=k,i.Response=T);var q={get:function(t){return L.apply(this,arguments)},post:function(t,e){return N.apply(this,arguments)},del:function(t){return B.apply(this,arguments)},put:function(t,e){return U.apply(this,arguments)}};window.fetcher=q},59607:function(t,e,n){"use strict";n.d(e,{V:function(){return i}});var r=n(48406),o=n(68503),i=function(){"man"===backEndVars.gender?((0,o.setAnswer)("bodyClass","men-theme"),r.A.set("bodyClass","men-theme")):((0,o.setAnswer)("bodyClass","woman-theme"),r.A.set("bodyClass","woman-theme"))}},60495:function(t,e,n){"use strict";n.r(e),n.d(e,{handleClickButton:function(){return r}}),document.addEventListener("DOMContentLoaded",(function(){var t=!1;document.querySelector(".back-button")&&"email-first"===document.referrer.split("/").pop()&&(t=!0),r(t,window,history)})),-1!==window.location.hash.indexOf("#_=_")&&history.replaceState(null,null,window.location.href.replace("#_=_",""));var r=function(t,e,n){var r;null===(r=document.querySelector(".back-button"))||void 0===r||r.addEventListener("click",(function(r){r.preventDefault();var o=r.target.dataset.href;return t?e.close():"back"!==o&&o?e.location=o:n.back()}))}},85229:function(t,e,n){"use strict";n.d(e,{checkPaymentStatusAndRedirect:function(){return m}});var r=n(98619),o=n(85670),i={hide:function(){var t=document.getElementById("payment-form-close-button");t&&(t.style.display="none")},show:function(){var t=document.getElementById("payment-form-close-button");t&&(t.style.display="block")}},s={getBtn:function(){return document.querySelector(".js-pay-button")},enable:function(){this.getBtn()&&(this.getBtn().disabled=!1,this.getBtn().classList.remove("disabled"),this.getBtn().style.pointerEvents="auto")},disable:function(){this.getBtn()&&(this.getBtn().disabled=!0,this.getBtn().classList.add("disabled"),this.getBtn().style.pointerEvents="none")}},a={getBtns:function(){return document.querySelectorAll(".js-apple-pay-btn")},enable:function(){var t=this.getBtns();t.forEach((function(t){return t.disabled=!1})),t.forEach((function(t){return t.classList.remove("disabled")})),t.forEach((function(t){return t.style.pointerEvents="auto"}))},disable:function(){var t=this.getBtns();t.forEach((function(t){return t.disabled=!0})),t.forEach((function(t){return t.classList.add("disabled")})),t.forEach((function(t){return t.style.pointerEvents="none"}))},hide:function(){this.getBtns().forEach((function(t){return t.style.display="none"}))}},c={clear:function(t){document.querySelector('[data-error-field="'.concat(t,'"]')).classList.add("hidden")},display:function(t,e){var n=document.querySelector('[data-error-field="'.concat(t,'"]'));n.classList.remove("hidden","none"),e&&(n.textContent=e)}},u=function(t,e){return"function"==typeof t[e]?t:new o.A(t)},l={hide:function(){var t=document.querySelector(".js-payment-loader");document.body.classList.remove("overflow-hidden"),t&&(t=u(t,"fadeOut")).fadeOut()},show:function(){var t=document.querySelector(".js-payment-loader");document.body.classList.add("overflow-hidden"),t&&(t=u(t,"fadeIn")).fadeIn("flex")},changeMessage:function(){var t=document.querySelector(".js-payment-message"),e=document.querySelector(".js-msg-spin");t&&(t.innerText=backEndVars.paymentDone,(e=u(e,"fadeOut")).fadeOut())}},d={hide:function(t){var e=document.querySelector('[data-btn-loader="'.concat(t,'"]'));e&&e.classList.add("hidden")},show:function(t){var e=document.querySelector('[data-btn-loader="'.concat(t,'"]'));e&&e.classList.remove("hidden")}},h=0,p=function(t,e){return"".concat(t,"?").concat(new URLSearchParams(e).toString())},f=function(t,e,n,r,o){if(store.appendDiffTypes("nextUrl",t),t){var i=o.redirectToURL,s=o.selector,a=o.onSuccess;return store.appendDiffTypes("productsPaid",[n]),l.changeMessage(),pushGTMDataLayer(e),i&&s&&i(t,s),clearInterval(r),a&&a(),!0}},m=function t(e,n,o){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5,c=p(n,o);d.show(e),i.hide(),l.show();var u=setInterval((function(){r.fetcher.get(c).then((function(t){var n=t.route,r=t.gtmData,o=t.productsPaid;f(n,r,o,u,{redirectToURL:redirectToURL,selector:e})})).catch((function(r){if(s&&a>0)return t(e,n,o,s,a--);v(r,e,u)})).finally(g(u,e))}),5e3)},y=function(t,e,n,o){var s=p(e,n);d.show(t),i.hide(),l.show();var a=setInterval((function(){r.fetcher.get(s).then((function(t){var e=t.route,n=t.gtmData,r=t.productsPaid;f(e,n,r,a,{onSuccess:o})})).catch((function(e){return v(e,t,a)})).finally(g(a,t))}),5e3)};function g(t,e){if(++h>=60)return c.display(e,"Timeout."),l.hide(),d.hide(e),i.show(),s.enable(),a.enable(),clearInterval(t),!1}function v(t,e,n){var r=t.error;return n&&clearInterval(n),c.display(e,r),l.hide(),d.hide(e),i.show(),s.enable(),a.enable(),!1}var b={chat:function(){y.apply(void 0,arguments)},web:function(){m.apply(void 0,arguments)}};document.addEventListener("DOMContentLoaded",(function(){currentProductAlreadyPurchased()&&moveToNextUrl(),window.payments={formError:c,formLoader:l,btnLoader:d,paymentFormCloseButton:i,payButton:s,applePayButtons:a,checkPaymentStatusAndRedirect:m,flows:b}}))},23160:function(t,e,n){"use strict";n.d(e,{a:function(){return i}});var r=n(51622),o=n(21634),i=function(){var t;if(null===(t=(0,r.p)().discountData)||void 0===t||!t.pageIsDiscount)return null;var e="direct";return s()?e="payment_method_closure":(0,o.f_)()&&(e="promo_code_application"),e},s=function(){return localStorage.getItem("discountApplied")}},72727:function(t,e,n){"use strict";n.d(e,{l5:function(){return a},rR:function(){return s}});var r=n(98619),o=n(21634),i=n(23160);function s(t){return r.fetcher.post((new Url).build("payments","payment-intent"),t).then((function(t){return t.data})).catch((function(e){455===e.status?(new Url).redirectTo("meal-plan-error"):404===e.status?(new Url).redirectTo("/"):(payments.formError.display(t.provider,e.responseJSON.message),payments.payButton.enable(),payments.applePayButtons.enable(),payments.btnLoader.hide(t.provider),payments.paymentFormCloseButton.show())}))}function a(t){var e=t.provider;return{purchasable_id:window.getUuid(),checkoutOffer:backEndVars.checkoutOffer,type:backEndVars.type,provider:e,promoCode:(0,o.f_)(),discountFlow:(0,i.a)()}}},34821:function(t,e,n){"use strict";var r=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))},o=setTimeout;function i(t){return Boolean(t&&void 0!==t.length)}function s(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(t,this)}function c(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void l(e.promise,t)}u(e.promise,r)}else(1===t._state?u:l)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void d(t);if("function"==typeof n)return void p((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,d(t)}catch(e){l(t,e)}var r,o}function l(t,e){t._state=2,t._value=e,d(t)}function d(t){2===t._state&&0===t._deferreds.length&&a._immediateFn((function(){t._handled||a._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)c(t,t._deferreds[e]);t._deferreds=null}function h(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function p(t,e){var n=!1;try{t((function(t){n||(n=!0,u(e,t))}),(function(t){n||(n=!0,l(e,t))}))}catch(t){if(n)return;n=!0,l(e,t)}}a.prototype.catch=function(t){return this.then(null,t)},a.prototype.then=function(t,e){var n=new this.constructor(s);return c(this,new h(t,e,n)),n},a.prototype.finally=r,a.all=function(t){return new a((function(e,n){if(!i(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;function s(t,i){try{if(i&&("object"==typeof i||"function"==typeof i)){var a=i.then;if("function"==typeof a)return void a.call(i,(function(e){s(t,e)}),n)}r[t]=i,0==--o&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)s(a,r[a])}))},a.resolve=function(t){return t&&"object"==typeof t&&t.constructor===a?t:new a((function(e){e(t)}))},a.reject=function(t){return new a((function(e,n){n(t)}))},a.race=function(t){return new a((function(e,n){if(!i(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=t.length;r<o;r++)a.resolve(t[r]).then(e,n)}))},a._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){o(t,0)},a._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var f,m,y,g,v=a,b=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("unable to locate global object")}();"Promise"in b?b.Promise.prototype.finally||(b.Promise.prototype.finally=r):b.Promise=v,Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}),Object.values||(Object.values=function(t){return Object.keys(t).map((function(e){return t[e]}))}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Array.from||(Array.from=(f=Object.prototype.toString,m=function(t){return"function"==typeof t||"[object Function]"===f.call(t)},y=Math.pow(2,53)-1,g=function(t){var e=function(t){var e=Number(t);return isNaN(e)?0:0!==e&&isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),y)},function(t){var e=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=arguments.length>1?arguments[1]:void 0;if(void 0!==r){if(!m(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(n=arguments[2])}for(var o,i=g(e.length),s=m(this)?Object(new this(i)):new Array(i),a=0;a<i;)o=e[a],s[a]=r?void 0===n?r(o,a):r.call(n,o,a):o,a+=1;return s.length=i,s})),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var o,i,s=0|e,a=Math.max(s>=0?s:r-Math.abs(s),0);for(;a<r;){if((o=n[a])===(i=t)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;a++}return!1}}),window._AutofillCallbackHandler=window._AutofillCallbackHandler||function(){}},93198:function(t,e,n){var r=n(38007);!function(){var t=null,e=[];backEndVars.webSocketServerUrl&&!window.location.hostname.match(/^.*.(lazarangelov|andreiabrazier|jenselter).diet$/)&&(t=r.connect(backEndVars.webSocketServerUrl,{transports:["websocket","polling"],upgrade:!0,secure:!0,reconnect:!0}));var n=function(){var t=/_fbp=(fb\.[0-2]\.\d+\.\d+)/.exec(window.document.cookie);return t&&t[1]?t[1]:null},o=function(){var t=/_fbc=(fb\.[0-2]\.\d+\.\w+)/.exec(window.document.cookie);return t&&t[1]?t[1]:null},i=function(){var t=window.gaClientId;return t||null},s=function(){return store.get("__clid")};window.tracking={event:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Date.now();return{id:t.customerUuid+"_"+t.eventType+"_"+e,type:t.eventType,system:t.systemType,uri:t.uri,domain:t.domain,email:t.email,phone:t.phone,customerUuid:t.customerUuid,data:t.additionalData,utmParams:t.utmParams,createdAt:e}},getFbClientId:n,getFbClickId:o,getGaClientId:i,getTwClickId:s,pushPromise:function(t){e.push(t)},trackClient:function(){if(t){for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];a.forEach((function(r){Promise.all(e).then((function(){e=[],t.emit("track",{id:r.id,type:r.type,system:r.system,uri:r.uri,domain:r.domain,email:r.email,phone:r.phone,customerUuid:r.customerUuid,data:r.data,date:r.createdAt,utm:r.utmParams,meta:{facebook:{clientId:n(),clickId:o()},googleAnalytics:{clientId:i()},twitter:{clickId:s()}}})}))}))}}}}()},57913:function(t,e,n){"use strict";const r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function o(t){return t&&t.Math==Math?t:void 0}const i="object"==typeof globalThis&&o(globalThis)||"object"==typeof window&&o(window)||"object"==typeof self&&o(self)||"object"==typeof n.g&&o(n.g)||function(){return this}()||{};function s(){return i}function a(t,e,n){const r=n||i,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const c=["debug","info","warn","error","log","assert","trace"],u={};function l(t){if(!("console"in i))return t();const e=i.console,n={},r=Object.keys(u);r.forEach((t=>{const r=u[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const d=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return r?c.forEach((n=>{e[n]=(...e)=>{t&&l((()=>{i.console[n](`Sentry Logger [${n}]:`,...e)}))}})):c.forEach((t=>{e[t]=()=>{}})),e}(),h=Object.prototype.toString;function p(t){switch(h.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return k(t,Error)}}function f(t,e){return h.call(t)===`[object ${e}]`}function m(t){return f(t,"ErrorEvent")}function y(t){return f(t,"DOMError")}function g(t){return f(t,"String")}function v(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function b(t){return null===t||v(t)||"object"!=typeof t&&"function"!=typeof t}function _(t){return f(t,"Object")}function w(t){return"undefined"!=typeof Event&&k(t,Event)}function S(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function k(t,e){try{return t instanceof e}catch(t){return!1}}function E(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}const T=s(),C=80;function x(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||C;for(;n&&i++<r&&(u=I(n,l),!("html"===u||i>1&&s+o.length*c+u.length>=d));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch(t){return"<unknown>"}}function I(t,e){const n=t,r=[];let o,i,s,a,c;if(!n||!n.tagName)return"";if(T.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(u&&u.length)u.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&g(o))for(i=o.split(/\s+/),c=0;c<i.length;c++)r.push(`.${i[c]}`);const l=["aria-label","type","name","title","alt"];for(c=0;c<l.length;c++)s=l[c],a=n.getAttribute(s),a&&r.push(`[${s}="${a}"]`);return r.join("")}function A(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function O(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{E(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function R(t,e,n=!1){return!!g(t)&&(f(e,"RegExp")?e.test(t):!!g(e)&&(n?t===e:t.includes(e)))}function P(t,e=[],n=!1){return e.some((e=>R(t,e,n)))}function M(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);"function"==typeof o&&L(o,r),t[e]=o}function D(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){r&&d.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function L(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,D(t,"__sentry_original__",e)}catch(t){}}function N(t){return t.__sentry_original__}function B(t){if(p(t))return{message:t.message,name:t.name,stack:t.stack,...j(t)};if(w(t)){const e={type:t.type,target:U(t.target),currentTarget:U(t.currentTarget),...j(t)};return"undefined"!=typeof CustomEvent&&k(t,CustomEvent)&&(e.detail=t.detail),e}return t}function U(t){try{return e=t,"undefined"!=typeof Element&&k(e,Element)?x(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function j(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function F(t){return $(t,new Map)}function $(t,e){if(function(t){if(!_(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=$(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push($(t,e))})),r}return t}function q(){const t=i,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function z(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function H(t){const{message:e,event_id:n}=t;if(e)return e;const r=z(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function W(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function V(t,e){const n=z(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function Y(t){if(t&&t.__sentry_captured__)return!0;try{D(t,"__sentry_captured__",!0)}catch(t){}return!1}function K(t){return Array.isArray(t)?t:[t]}const J="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var G;function X(t){return new Z((e=>{e(t)}))}function Q(t){return new Z(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(G||(G={}));class Z{constructor(t){Z.prototype.__init.call(this),Z.prototype.__init2.call(this),Z.prototype.__init3.call(this),Z.prototype.__init4.call(this),this._state=G.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Z(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Z(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this._resolve=t=>{this._setResult(G.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(G.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===G.PENDING&&(S(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===G.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===G.RESOLVED&&t[1](this._value),this._state===G.REJECTED&&t[2](this._value),t[0]=!0)}))}}}function tt(){return a("globalEventProcessors",(()=>[]))}function et(t){tt().push(t)}function nt(t,e,n,r=0){return new Z(((o,i)=>{const s=t[r];if(null===e||"function"!=typeof s)o(e);else{const a=s({...e},n);J&&s.id&&null===a&&d.log(`Event processor "${s.id}" dropped event`),S(a)?a.then((e=>nt(t,e,n,r+1).then(o))).then(null,i):nt(t,a,n,r+1).then(o).then(null,i)}}))}const rt=1e3;function ot(){return Date.now()/rt}const it=function(){const{performance:t}=i;if(!t||!t.now)return ot;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/rt}();let st;const at=(()=>{const{performance:t}=i;if(!t||!t.now)return void(st="none");const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=o<e,a=t.timing&&t.timing.navigationStart,c="number"==typeof a?Math.abs(a+n-r):e;return s||c<e?o<=c?(st="timeOrigin",t.timeOrigin):(st="navigationStart",a):(st="dateNow",r)})(),ct="production";function ut(t){const e=it(),n={sid:q(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return F({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&lt(n,t),n}function lt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||it(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:q()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function dt(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),lt(t,n)}const ht=50,pt=/\(error: (.*)\)/,ft=/captureMessage|captureException/;function mt(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[],o=t.split("\n");for(let t=n;t<o.length;t++){const n=o[t];if(n.length>1024)continue;const i=pt.test(n)?n.replace(pt,"$1"):n;if(!i.match(/\S*Error: /)){for(const t of e){const e=t(i);if(e){r.push(e);break}}if(r.length>=ht)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop();e.reverse(),ft.test(e[e.length-1].function||"")&&(e.pop(),ft.test(e[e.length-1].function||"")&&e.pop());return e.slice(0,ht).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"})))}(r)}}const yt="<anonymous>";function gt(t){try{return t&&"function"==typeof t&&t.name||yt}catch(t){return yt}}function vt(t,e=100,n=1/0){try{return _t("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function bt(t,e=3,n=102400){const r=vt(t,e);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>n?bt(t,e-1,n):r;var o}function _t(t,e,r=1/0,o=1/0,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null==e||["number","boolean","string"].includes(typeof e)&&("number"!=typeof(c=e)||c==c))return e;var c;const u=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==n.g&&e===n.g)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(E(e))return"[VueViewModel]";if(function(t){return _(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${gt(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}}(t,e);if(!u.startsWith("[object "))return u;if(e.__sentry_skip_normalization__)return e;const l="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:r;if(0===l)return u.replace("object ","");if(s(e))return"[Circular ~]";const d=e;if(d&&"function"==typeof d.toJSON)try{return _t("",d.toJSON(),l-1,o,i)}catch(t){}const h=Array.isArray(e)?[]:{};let p=0;const f=B(e);for(const t in f){if(!Object.prototype.hasOwnProperty.call(f,t))continue;if(p>=o){h[t]="[MaxProperties ~]";break}const e=f[t];h[t]=_t(t,e,l-1,o,i),p++}return a(e),h}const wt=1;function St(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:o,parent_span_id:i,status:s,tags:a,origin:c}=kt(t);return F({data:r,op:o,parent_span_id:i,span_id:e,status:s,tags:a,trace_id:n,origin:c})}function kt(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function Et(t){const{traceFlags:e}=t.spanContext();return Boolean(e&wt)}function Tt(t,e,n,r,o,s){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,u={...e,event_id:e.event_id||n.event_id||q(),timestamp:e.timestamp||ot()},l=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:ct);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==o&&(t.dist=o);t.message&&(t.message=A(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=A(s.value,i));const a=t.request;a&&a.url&&(a.url=A(a.url,i))}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,l),void 0===e.type&&function(t,e){const n=i._sentryDebugIds;if(!n)return;let r;const o=Ct.get(e);o?r=o:(r=new Map,Ct.set(e,r));const s=Object.keys(n).reduce(((t,o)=>{let i;const s=r.get(o);s?i=s:(i=e(o),r.set(o,i));for(let e=i.length-1;e>=0;e--){const r=i[e];if(r.filename){t[r.filename]=n[o];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=s[t.filename])}))}))}catch(t){}}(u,t.stackParser);const d=function(t,e){if(!e)return t;const n=t?t.clone():new Vt;return n.update(e),n}(r,n.captureContext);n.mechanism&&V(u,n.mechanism);const h=o&&o.getEventProcessors?o.getEventProcessors():[],p=function(){Wt||(Wt=new Vt);return Wt}().getScopeData();if(s){zt(p,s.getScopeData())}if(d){zt(p,d.getScopeData())}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),qt(u,p);return nt([...h,...tt(),...p.eventProcessors],u,n).then((t=>(t&&function(t){const e={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.keys(e).forEach((t=>{n.push({type:"sourcemap",code_file:t,debug_id:e[t]})}))}(t),"number"==typeof a&&a>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:vt(t.data,e,n)}})))},...t.user&&{user:vt(t.user,e,n)},...t.contexts&&{contexts:vt(t.contexts,e,n)},...t.extra&&{extra:vt(t.extra,e,n)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=vt(t.contexts.trace.data,e,n)));t.spans&&(r.spans=t.spans.map((t=>{const r=kt(t).data;return r&&(t.data=vt(r,e,n)),t})));return r}(t,a,c):t)))}const Ct=new WeakMap;function xt(t){if(t)return function(t){return t instanceof Vt||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>It.includes(t)))}(t)?{captureContext:t}:t}const It=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function At(t,e){return te().captureException(t,xt(e))}function Ot(t,e){return te().captureEvent(t,e)}function Rt(t,e){te().addBreadcrumb(t,e)}function Pt(...t){const e=te();if(2===t.length){const[n,r]=t;return n?e.withScope((()=>(e.getStackTop().scope=n,r(n)))):e.withScope(r)}return e.withScope(t[0])}function Mt(){return te().getClient()}function Dt(){return te().getScope()}function Lt(t){const e=Mt(),n=ee(),r=Dt(),{release:o,environment:s=ct}=e&&e.getOptions()||{},{userAgent:a}=i.navigator||{},c=ut({release:o,environment:s,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...t}),u=n.getSession();return u&&"ok"===u.status&&lt(u,{status:"exited"}),Nt(),n.setSession(c),r.setSession(c),c}function Nt(){const t=ee(),e=Dt(),n=e.getSession()||t.getSession();n&&dt(n),Bt(),t.setSession(),e.setSession()}function Bt(){const t=ee(),e=Dt(),n=Mt(),r=e.getSession()||t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Ut(t=!1){t?Nt():Bt()}function jt(t){return t.transaction}function Ft(t,e,n){const r=e.getOptions(),{publicKey:o}=e.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=F({environment:r.environment||ct,release:r.release,user_segment:i,public_key:o,trace_id:t});return e.emit&&e.emit("createDsc",s),s}function $t(t){const e=Mt();if(!e)return{};const n=Ft(kt(t).trace_id||"",e,Dt()),r=jt(t);if(!r)return n;const o=r&&r._frozenDynamicSamplingContext;if(o)return o;const{sampleRate:i,source:s}=r.metadata;null!=i&&(n.sample_rate=`${i}`);const a=kt(r);return s&&"url"!==s&&(n.transaction=a.description),n.sampled=String(Et(r)),e.emit&&e.emit("createDsc",n),n}function qt(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=e,c=F(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const u=F(r);u&&Object.keys(u).length&&(t.tags={...u,...t.tags});const l=F(o);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=F(i);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts});s&&(t.level=s);a&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:St(e),...t.contexts};const n=jt(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:$t(e),...t.sdkProcessingMetadata};const r=kt(n).description;r&&(t.tags={transaction:r,...t.tags})}}(t,r),function(t,e){t.fingerprint=t.fingerprint?K(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,o),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function zt(t,e){const{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:h,transactionName:p,span:f}=e;Ht(t,"extra",n),Ht(t,"tags",r),Ht(t,"user",o),Ht(t,"contexts",i),Ht(t,"sdkProcessingMetadata",a),s&&(t.level=s),p&&(t.transactionName=p),f&&(t.span=f),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...h}}function Ht(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}let Wt;class Vt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Yt()}static clone(t){return t?t.clone():new Vt}clone(){const t=new Vt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&lt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const e="function"==typeof t?t(this):t;if(e instanceof Vt){const t=e.getScopeData();this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&Object.keys(t.user).length&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint.length&&(this._fingerprint=t.fingerprint),e.getRequestSession()&&(this._requestSession=e.getRequestSession()),t.propagationContext&&(this._propagationContext=t.propagationContext)}else if(_(e)){const e=t;this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Yt(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:ot(),...t},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:r,_extra:o,_user:i,_level:s,_fingerprint:a,_eventProcessors:c,_propagationContext:u,_sdkProcessingMetadata:l,_transactionName:d,_span:h}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:o,user:i,level:s,fingerprint:a||[],eventProcessors:c,propagationContext:u,sdkProcessingMetadata:l,transactionName:d,span:h}}applyToEvent(t,e={},n=[]){qt(t,this.getScopeData());return nt([...n,...tt(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:q();if(!this._client)return d.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:q();if(!this._client)return d.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:q();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(d.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}function Yt(){return{traceId:q(),spanId:q().substring(16)}}const Kt="7.103.0",Jt=parseFloat(Kt),Gt=100;class Xt{constructor(t,e,n,r=Jt){let o,i;this._version=r,e?o=e:(o=new Vt,o.setClient(t)),n?i=n:(i=new Vt,i.setClient(t)),this._stack=[{scope:o}],t&&this.bindClient(t),this._isolationScope=i}isOlderThan(t){return this._version<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(t){throw this.popScope(),t}return S(n)?n.then((t=>(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:q(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:q(),o=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:q();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Gt}=r.getOptions&&r.getOptions()||{};if(i<=0)return;const s={timestamp:ot(),...t},a=o?l((()=>o(s,e))):s;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,e),n.addBreadcrumb(a,i))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=Zt(this);try{t(this)}finally{Zt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return J&&d.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);if(J&&!n){this.getClient()?d.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):d.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&dt(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:o=ct}=n&&n.getOptions()||{},{userAgent:s}=i.navigator||{},a=ut({release:r,environment:o,user:e.getUser(),...s&&{userAgent:s},...t}),c=e.getSession&&e.getSession();return c&&"ok"===c.status&&lt(c,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=Qt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);J&&d.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Qt(){return i.__SENTRY__=i.__SENTRY__||{extensions:{},hub:void 0},i}function Zt(t){const e=Qt(),n=oe(e);return ie(e,t),n}function te(){const t=Qt();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return ne(t)}function ee(){return te().getIsolationScope()}function ne(t=Qt()){return re(t)&&!oe(t).isOlderThan(Jt)||ie(t,new Xt),oe(t)}function re(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function oe(t){return a("hub",(()=>new Xt),t)}function ie(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}const se=[];function ae(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?K(n(e)):e;const o=function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.keys(e).map((t=>e[t]))}(r),i=function(t,e){for(let n=0;n<t.length;n++)if(!0===e(t[n]))return n;return-1}(o,(t=>"Debug"===t.name));if(-1!==i){const[t]=o.splice(i,1);o.push(t)}return o}function ce(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function ue(t,e,n){if(n[e.name])J&&d.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,-1===se.indexOf(e.name)&&(e.setupOnce(et,te),se.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),t.on&&"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if(t.addEventProcessor&&"function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}J&&d.log(`Integration installed: ${e.name}`)}}function le(t,e){return Object.assign((function(...t){return e(...t)}),{id:t})}const de=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],he=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],pe="InboundFilters",fe=(t={})=>({name:pe,setupOnce(){},processEvent(e,n,r){const o=r.getOptions(),i=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:de],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:he],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,o);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return J&&d.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${H(t)}`),!0;if(function(t,e){if(t.type||!e||!e.length)return!1;return function(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch(t){}n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`));J&&0===e.length&&d.error(`Could not extract message for event ${H(t)}`);return e}(t).some((t=>P(t,e)))}(t,e.ignoreErrors))return J&&d.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${H(t)}`),!0;if(function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&P(n,e)}(t,e.ignoreTransactions))return J&&d.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${H(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;const n=me(t);return!!n&&P(n,e)}(t,e.denyUrls))return J&&d.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${H(t)}.\nUrl: ${me(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;const n=me(t);return!n||P(n,e)}(t,e.allowUrls))return J&&d.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${H(t)}.\nUrl: ${me(t)}`),!0;return!1}(e,i)?null:e}});le(pe,fe);function me(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return J&&d.error(`Cannot extract url for event ${H(t)}`),null}}let ye;const ge="FunctionToString",ve=new WeakMap,be=()=>({name:ge,setupOnce(){ye=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=N(this),n=ve.has(Mt())&&void 0!==e?e:this;return ye.apply(n,t)}}catch(t){}},setup(t){ve.set(t,!0)}});le(ge,be);function _e(t,e){!0===e.debug&&(J?d.enable():l((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));Dt().update(e.initialScope);const n=new t(e);!function(t){const e=te().getStackTop();e.client=t,e.scope.setClient(t)}(n),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(n)}const we=s();function Se(){if(!("fetch"in we))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function ke(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const Ee=s();const Te={},Ce={};function xe(t,e){Te[t]=Te[t]||[],Te[t].push(e)}function Ie(t,e){Ce[t]||(e(),Ce[t]=!0)}function Ae(t,e){const n=t&&Te[t];if(n)for(const o of n)try{o(e)}catch(e){r&&d.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${gt(o)}\nError:`,e)}}const Oe=i;let Re;function Pe(t){const e="history";xe(e,t),Ie(e,Me)}function Me(){if(!function(){const t=Ee.chrome,e=t&&t.app&&t.app.runtime,n="history"in Ee&&!!Ee.history.pushState&&!!Ee.history.replaceState;return!e&&n}())return;const t=Oe.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=Re,e=String(n);Re=e;Ae("history",{from:t,to:e})}return t.apply(this,e)}}Oe.onpopstate=function(...e){const n=Oe.location.href,r=Re;Re=n;if(Ae("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},M(Oe.history,"pushState",e),M(Oe.history,"replaceState",e)}const De=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Le(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function Ne(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Be(t){const e="string"==typeof t?function(t){const e=De.exec(t);if(!e)return void l((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[n,r,o="",i,s="",a]=e.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return Ne({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}(t):Ne(t);if(e&&function(t){if(!r)return!0;const{port:e,projectId:n,protocol:o}=t;return!(["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(d.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(o)?e&&isNaN(parseInt(e,10))&&(d.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(d.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}function Ue(t,e=[]){return[t,e]}function je(t,e){const[n,r]=t;return[n,[...r,e]]}function Fe(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function $e(t,e){return(e||new TextEncoder).encode(t)}function qe(t,e){const[n,r]=t;let o=JSON.stringify(n);function i(t){"string"==typeof o?o="string"==typeof t?o+t:[$e(o,e),t]:o.push("string"==typeof t?$e(t,e):t)}for(const t of r){const[e,n]=t;if(i(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(vt(n))}i(t)}}return"string"==typeof o?o:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(o)}function ze(t,e){const n="string"==typeof t.data?$e(t.data,e):t.data;return[F({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const He={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",statsd:"unknown"};function We(t){return He[t]}function Ve(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ye(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Le(r)},...o&&{trace:F({...o})}}}class Ke extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}const Je="7";function Ge(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Xe(t,e){return n={sentry_key:t.publicKey,sentry_version:Je,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}function Qe(t,e={}){const n="string"==typeof e?e:e.tunnel,r="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return n||`${function(t){return`${Ge(t)}${t.projectId}/envelope/`}(t)}?${Xe(t,r)}`}function Ze(t,e,n,r){const o={sent_at:(new Date).toISOString()};n&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(o.dsn=Le(e));const i=function(t){const e=function(t){let e="";for(const n of t){const t=Object.entries(n.tags),r=t.length>0?`|#${t.map((([t,e])=>`${t}:${e}`)).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return e}(t);return[{type:"statsd",length:e.length},e]}(t);return Ue(o,[i])}const tn="Not capturing exception because it's already been captured.";class en{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Be(t.dsn):J&&d.warn("No DSN provided, client will not send events."),this._dsn){const e=Qe(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(Y(t))return void(J&&d.log(tn));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let o=n&&n.event_id;const i=v(t)?t:String(t),s=b(t)?this.eventFromMessage(i,e,n):this.eventFromException(t,n);return this._process(s.then((t=>this._captureEvent(t,n,r))).then((t=>{o=t}))),o}captureEvent(t,e,n){if(e&&e.originalException&&Y(e.originalException))return void(J&&d.log(tn));let r=e&&e.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,e,o||n).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release?J&&d.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),lt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t))))):X(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return J&&d.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){const e=this._integrations[t.name];ue(this,t,this._integrations),e||ce(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const o=Ve(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const s=Ye(t,o,r,e);return delete t.sdkProcessingMetadata,Ue(s,[[{type:i},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=je(n,ze(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((e=>this.emit("afterSendEvent",t,e)),null)}sendSession(t){const e=function(t,e,n,r){const o=Ve(n);return Ue({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:Le(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;J&&d.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}captureAggregateMetrics(t){J&&d.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const e=Ze(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach((t=>t(...e)))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach((e=>{e&&ue(t,e,n)})),n}(this,t),ce(this,t),this._integrationsInitialized=!0}_updateSessionFromEvent(t,e){let n=!1,r=!1;const o=e.exception&&e.exception.values;if(o){r=!0;for(const t of o){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&n)&&(lt(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Z((e=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r=ee()){const o=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),this.emit("preprocessEvent",t,e),Tt(o,t,e,n,this,r).then((t=>{if(null===t)return t;const e={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&e){const{traceId:r,spanId:o,parentSpanId:i,dsc:s}=e;t.contexts={trace:{trace_id:r,span_id:o,parent_span_id:i},...t.contexts};const a=s||Ft(r,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:a,...t.sdkProcessingMetadata}}return t}))}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{if(J){const e=t;"log"===e.logLevel?d.log(e.message):d.warn(e)}}))}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:o}=r,i=rn(t),s=nn(t),a=t.type||"error",c=`before send for type \`${a}\``;if(s&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",t),Q(new Ke(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const u="replay_event"===a?"replay":a,l=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,e,n,l).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,t),new Ke("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const o=function(t,e,n){const{beforeSend:r,beforeSendTransaction:o}=t;if(nn(e)&&r)return r(e,n);if(rn(e)&&o)return o(e,n);return e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(S(t))return t.then((t=>{if(!_(t)&&null!==t)throw new Ke(n);return t}),(t=>{throw new Ke(`${e} rejected with ${t}`)}));if(!_(t)&&null!==t)throw new Ke(n);return t}(o,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",u,t),new Ke(`${c} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const s=r.transaction_info;if(i&&s&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...s,source:t}}return this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof Ke)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new Ke(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing++,t.then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t)))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return this._transport.send(t).then(null,(t=>{J&&d.error("Error while sending event:",t)}));J&&d.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}function nn(t){return void 0===t.type}function rn(t){return"transaction"===t.type}var on=n(38341);const sn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function an(t,e){const n=un(t,e),r={type:e&&e.name,value:dn(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function cn(t,e){return{exception:{values:[an(t,e)]}}}function un(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(ln.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const ln=/Minified React error #\d+;/i;function dn(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function hn(t,e,n,r,o){let i;if(m(e)&&e.error){return cn(t,e.error)}if(y(e)||f(e,"DOMException")){const o=e;if("stack"in e)i=cn(t,e);else{const e=o.name||(y(o)?"DOMError":"DOMException"),s=o.message?`${e}: ${o.message}`:e;i=pn(t,s,n,r),W(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(p(e))return cn(t,e);if(_(e)||w(e)){return i=function(t,e,n,r){const o=Mt(),i=o&&o.getOptions().normalizeDepth,s={exception:{values:[{type:w(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:fn(e,{isUnhandledRejection:r})}]},extra:{__serialized__:bt(e,i)}};if(n){const e=un(t,n);e.length&&(s.exception.values[0].stacktrace={frames:e})}return s}(t,e,n,o),V(i,{synthetic:!0}),i}return i=pn(t,e,n,r),W(i,`${e}`,void 0),V(i,{synthetic:!0}),i}function pn(t,e,n,r){const o={};if(r&&n){const r=un(t,n);r.length&&(o.exception={values:[{value:e,stacktrace:{frames:r}}]})}if(v(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return o.logentry={message:t,params:n},o}return o.message=e,o}function fn(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(B(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return A(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:A(r,e)}return""}(t),r=e?"promise rejection":"exception";if(m(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(w(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}const mn=i;let yn=0;function gn(){return yn>0}function vn(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(N(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((t=>vn(t,e)));return t.apply(this,o)}catch(t){throw yn++,setTimeout((()=>{yn--})),Pt((n=>{n.addEventProcessor((t=>(e.mechanism&&(W(t,void 0,void 0),V(t,e.mechanism)),t.extra={...t.extra,arguments:r},t))),At(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}L(r,t),D(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch(t){}return r}class bn extends en{constructor(t){!function(t,e,n=[e],r="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map((t=>({name:`${r}:@sentry/${t}`,version:Kt}))),version:Kt}),t._metadata=o}(t,"browser",["browser"],mn.SENTRY_SDK_SOURCE||(0,on.e)()),super(t),t.sendClientReports&&mn.document&&mn.document.addEventListener("visibilitychange",(()=>{"hidden"===mn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return function(t,e,n,r){const o=hn(t,e,n&&n.syntheticException||void 0,r);return V(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),X(o)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,o){const i=pn(t,e,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),X(i)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(sn&&d.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Le(r)}},i=function(t){return[{type:"user_report"},t]}(t);return Ue(o,[i])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(sn&&d.log("No outcomes to send"));if(!this._dsn)return void(sn&&d.log("No dsn provided, will not send outcomes"));sn&&d.log("Sending outcomes:",t);const e=(n=t,Ue((r=this._options.tunnel&&Le(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||ot(),discarded_events:n}]]));var n,r,o;this._sendEnvelope(e)}}function _n(){"console"in i&&c.forEach((function(t){t in i.console&&M(i.console,t,(function(e){return u[t]=e,function(...e){Ae("console",{args:e,level:t});const n=u[t];n&&n.apply(i.console,e)}}))}))}const wn=i,Sn=1e3;let kn,En,Tn;function Cn(t){xe("dom",t),Ie("dom",xn)}function xn(){if(!wn.document)return;const t=Ae.bind(null,"dom"),e=In(t,!0);wn.document.addEventListener("click",e,!1),wn.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=wn[e]&&wn[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(M(n,"addEventListener",(function(e){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[n]=i[n]||{refCount:0};if(!s.handler){const r=In(t);s.handler=r,e.call(this,n,r,o)}s.refCount++}catch(t){}return e.call(this,n,r,o)}})),M(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[e];i&&(i.refCount--,i.refCount<=0&&(t.call(this,e,i.handler,r),i.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}function In(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch(t){return null}}(n);if(function(t,e){return"keypress"===t&&(!e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;D(n,"_sentryCaptured",!0),r&&!r._sentryId&&D(r,"_sentryId",q());const o="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==En)return!1;try{if(!t.target||t.target._sentryId!==Tn)return!1}catch(t){}return!0}(n)){t({event:n,name:o,global:e}),En=n.type,Tn=r?r._sentryId:void 0}clearTimeout(kn),kn=wn.setTimeout((()=>{Tn=void 0,En=void 0}),Sn)}}const An=i,On="__sentry_xhr_v3__";function Rn(t){xe("xhr",t),Ie("xhr",Pn)}function Pn(){if(!An.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;M(t,"open",(function(t){return function(...e){const n=Date.now(),r=g(e[0])?e[0].toUpperCase():void 0,o=function(t){if(g(t))return t;try{return t.toString()}catch(t){}return}(e[1]);if(!r||!o)return t.apply(this,e);this[On]={method:r,url:o,request_headers:{}},"POST"===r&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[On];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}Ae("xhr",{args:[r,o],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?M(this,"onreadystatechange",(function(t){return function(...e){return i(),t.apply(this,e)}})):this.addEventListener("readystatechange",i),M(this,"setRequestHeader",(function(t){return function(...e){const[n,r]=e,o=this[On];return o&&g(n)&&g(r)&&(o.request_headers[n.toLowerCase()]=r),t.apply(this,e)}})),t.apply(this,e)}})),M(t,"send",(function(t){return function(...e){const n=this[On];if(!n)return t.apply(this,e);void 0!==e[0]&&(n.body=e[0]);return Ae("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}function Mn(t){const e="fetch";xe(e,t),Ie(e,Dn)}function Dn(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!Se())return!1;if(ke(we.fetch))return!0;let t=!1;const e=we.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ke(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){r&&d.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&M(i,"fetch",(function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Nn(e),method:Ln(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Nn(e),method:Ln(e,"method")?String(e.method).toUpperCase():"GET"}}(e),o={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Ae("fetch",{...o}),t.apply(i,e).then((t=>(Ae("fetch",{...o,endTimestamp:Date.now(),response:t}),t)),(t=>{throw Ae("fetch",{...o,endTimestamp:Date.now(),error:t}),t}))}}))}function Ln(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Nn(t){return"string"==typeof t?t:t?Ln(t,"url")?t.url:t.toString?t.toString():"":""}const Bn=["fatal","error","warning","log","info","debug"];function Un(t){return"warn"===t?"warning":Bn.includes(t)?t:"log"}function jn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const Fn=1024,$n="Breadcrumbs",qn=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:$n,setupOnce(){},setup(t){e.console&&function(t){const e="console";xe(e,t),Ie(e,_n)}(function(t){return function(e){if(Mt()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Un(e.level),message:O(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${O(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Rt(n,{input:e.args,level:e.level})}}(t)),e.dom&&Cn(function(t,e){return function(n){if(Mt()!==t)return;let r,o,i="object"==typeof e?e.serializeAttribute:void 0,s="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;s&&s>Fn&&(sn&&d.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=Fn),"string"==typeof i&&(i=[i]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=x(e,{keyAttrs:i,maxStringLength:s}),o=function(t){if(!T.HTMLElement)return null;let e=t;for(let t=0;t<5;t++){if(!e)return null;if(e instanceof HTMLElement&&e.dataset.sentryComponent)return e.dataset.sentryComponent;e=e.parentNode}return null}(e)}catch(t){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Rt(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&Rn(function(t){return function(e){if(Mt()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,o=e.xhr[On];if(!n||!r||!o)return;const{method:i,url:s,status_code:a,body:c}=o;Rt({category:"xhr",data:{method:i,url:s,status_code:a},type:"http"},{xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r})}}(t)),e.fetch&&Mn(function(t){return function(e){if(Mt()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){Rt({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args,startTimestamp:n,endTimestamp:r})}else{const t=e.response;Rt({category:"fetch",data:{...e.fetchData,status_code:t&&t.status},type:"http"},{input:e.args,response:t,startTimestamp:n,endTimestamp:r})}}}(t)),e.history&&Pe(function(t){return function(e){if(Mt()!==t)return;let n=e.from,r=e.to;const o=jn(mn.location.href);let i=n?jn(n):void 0;const s=jn(r);i&&i.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Rt({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(e){Mt()===t&&Rt({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:H(e)},{event:e})}}(t))}}};le($n,qn);const zn="Dedupe",Hn=()=>{let t;return{name:zn,setupOnce(){},processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Vn(t,e))return!1;if(!Wn(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Yn(e),r=Yn(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Vn(t,e))return!1;if(!Wn(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return sn&&d.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){}return t=e}}};le(zn,Hn);function Wn(t,e){let n=Kn(t),r=Kn(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],o=n[t];if(e.filename!==o.filename||e.lineno!==o.lineno||e.colno!==o.colno||e.function!==o.function)return!1}return!0}function Vn(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function Yn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Kn(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}let Jn=null;function Gn(){Jn=i.onerror,i.onerror=function(t,e,n,r,o){return Ae("error",{column:r,error:o,line:n,msg:t,url:e}),!(!Jn||Jn.__SENTRY_LOADER__)&&Jn.apply(this,arguments)},i.onerror.__SENTRY_INSTRUMENTED__=!0}let Xn=null;function Qn(){Xn=i.onunhandledrejection,i.onunhandledrejection=function(t){return Ae("unhandledrejection",t),!(Xn&&!Xn.__SENTRY_LOADER__)||Xn.apply(this,arguments)},i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Zn="GlobalHandlers",tr=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:Zn,setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(!function(t){!function(t){const e="error";xe(e,t),Ie(e,Gn)}((e=>{const{stackParser:n,attachStacktrace:r}=rr();if(Mt()!==t||gn())return;const{msg:o,url:i,line:s,column:a,error:c}=e,u=void 0===c&&g(o)?function(t,e,n,r){const o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=m(t)?t.message:t,s="Error";const a=i.match(o);a&&(s=a[1],i=a[2]);const c={exception:{values:[{type:s,value:i}]}};return er(c,e,n,r)}(o,i,s,a):er(hn(n,c||o,void 0,r,!1),i,s,a);u.level="error",Ot(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}(t),nr("onerror")),e.onunhandledrejection&&(!function(t){!function(t){const e="unhandledrejection";xe(e,t),Ie(e,Qn)}((e=>{const{stackParser:n,attachStacktrace:r}=rr();if(Mt()!==t||gn())return;const o=function(t){if(b(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return t}(e),i=b(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:hn(n,o,void 0,r,!0);i.level="error",Ot(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t),nr("onunhandledrejection"))}}};le(Zn,tr);function er(t,e,n,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=g(e)&&e.length>0?e:function(){try{return T.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:l}),t}function nr(t){sn&&d.log(`Global Handler attached: ${t}`)}function rr(){const t=Mt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const or="HttpContext",ir=()=>({name:or,setupOnce(){},preprocessEvent(t){if(!mn.navigator&&!mn.location&&!mn.document)return;const e=t.request&&t.request.url||mn.location&&mn.location.href,{referrer:n}=mn.document||{},{userAgent:r}=mn.navigator||{},o={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:o};t.request=i}});le(or,ir);function sr(t,e,n=250,r,o,i,s){if(!(i.exception&&i.exception.values&&s&&k(s.originalException,Error)))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var c,u;a&&(i.exception.values=(c=ar(t,e,o,s.originalException,r,i.exception.values,a,0),u=n,c.map((t=>(t.value&&(t.value=A(t.value,u)),t)))))}function ar(t,e,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(k(r[o],Error)){cr(s,a);const i=t(e,r[o]),u=c.length;ur(i,o,u,a),c=ar(t,e,n,r[o],o,[i,...c],i,u)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(k(r,Error)){cr(s,a);const u=t(e,r),l=c.length;ur(u,`errors[${i}]`,l,a),c=ar(t,e,n,r,o,[u,...c],u,l)}})),c}function cr(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:e}}function ur(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}const lr="LinkedErrors",dr=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:lr,setupOnce(){},preprocessEvent(t,r,o){const i=o.getOptions();sr(an,i.stackParser,i.maxValueLength,n,e,t,r)}}},hr=(le(lr,dr),["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"]),pr="TryCatch",fr=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:pr,setupOnce(){e.setTimeout&&M(mn,"setTimeout",mr),e.setInterval&&M(mn,"setInterval",mr),e.requestAnimationFrame&&M(mn,"requestAnimationFrame",yr),e.XMLHttpRequest&&"XMLHttpRequest"in mn&&M(XMLHttpRequest.prototype,"send",gr);const t=e.eventTarget;if(t){(Array.isArray(t)?t:hr).forEach(vr)}}}};le(pr,fr);function mr(t){return function(...e){const n=e[0];return e[0]=vn(n,{mechanism:{data:{function:gt(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function yr(t){return function(e){return t.apply(this,[vn(e,{mechanism:{data:{function:"requestAnimationFrame",handler:gt(t)},handled:!1,type:"instrument"}})])}}function gr(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&M(n,t,(function(e){const n={mechanism:{data:{function:t,handler:gt(e)},handled:!1,type:"instrument"}},r=N(e);return r&&(n.mechanism.data.handler=gt(r)),vn(e,n)}))})),t.apply(this,e)}}function vr(t){const e=mn,n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(M(n,"addEventListener",(function(e){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=vn(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:gt(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return e.apply(this,[n,vn(r,{mechanism:{data:{function:"addEventListener",handler:gt(r),target:t},handled:!1,type:"instrument"}}),o])}})),M(n,"removeEventListener",(function(t){return function(e,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,o,r)}})))}const br="?";function _r(t,e,n,r){const o={filename:t,function:e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const wr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Sr=/\((\S*)(?::(\d+))(?::(\d+))\)/,kr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Er=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Tr=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Cr=mt(...[[30,t=>{const e=wr.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Sr.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=xr(e[1]||br,e[2]);return _r(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=kr.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Er.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||br;return[n,t]=xr(n,t),_r(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Tr.exec(t);return e?_r(e[2],e[1]||br,+e[3],e[4]?+e[4]:void 0):void 0}]]),xr=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:br,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function Ir(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Q(new Ke("Not adding Promise because buffer limit was reached."));const o=r();return-1===e.indexOf(o)&&e.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(t){return new Z(((n,r)=>{let o=e.length;if(!o)return n(!0);const i=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{X(t).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}const Ar=6e4;function Or(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function Rr(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(const t of i.trim().split(",")){const[e,n]=t.split(":",2),i=parseInt(e,10),s=1e3*(isNaN(i)?60:i);if(n)for(const t of n.split(";"))o[t]=r+s;else o.all=r+s}else s?o.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?Ar:r-e}(s,r):429===e&&(o.all=r+6e4);return o}const Pr=30;function Mr(t,e,n=Ir(t.bufferSize||Pr)){let r={};function o(o){const i=[];if(Fe(o,((e,n)=>{const o=We(n);if(Or(r,o)){const r=Dr(e,n);t.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(e)})),0===i.length)return X();const s=Ue(o[0],i),a=e=>{Fe(s,((n,r)=>{const o=Dr(n,r);t.recordDroppedEvent(e,We(r),o)}))};return n.add((()=>e({body:qe(s,t.textEncoder)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&J&&d.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=Rr(r,t),t)),(t=>{throw a("network_error"),t})))).then((t=>t),(t=>{if(t instanceof Ke)return J&&d.error("Skipped sending event because buffer is full."),a("queue_overflow"),X();throw t}))}return o.__sentry__baseTransport__=!0,{send:o,flush:t=>n.drain(t)}}function Dr(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}let Lr;function Nr(t,e=function(){if(Lr)return Lr;if(ke(mn.fetch))return Lr=mn.fetch.bind(mn);const t=mn.document;let e=mn.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){sn&&d.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return Lr=e.bind(mn)}()){let n=0,r=0;return Mr(t,(function(o){const i=o.body.length;n+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,s).then((t=>(n-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return Lr=void 0,n-=i,r--,Q(t)}}))}const Br=4;function Ur(t){return Mr(t,(function(e){return new Z(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{o.readyState===Br&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&o.setRequestHeader(e,t.headers[e]);o.send(e.body)}))}))}const jr=[fe(),be(),fr(),qn(),tr(),dr(),Hn(),ir()];function Fr(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}function $r(t,e){const n=e&&function(t){return void 0!==t.getClient}(e)?e.getClient():e,r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(t,e){return!!e&&t.includes(e.host)}(t,r)||function(t,e){if(!e)return!1;return qr(t)===qr(e)}(t,o)}function qr(t){return"/"===t[t.length-1]?t.slice(0,-1):t}var zr=n(36284);function Hr(){return"undefined"!=typeof window&&(!(0,zr.wD)()||void 0!==i.process&&"renderer"===i.process.type)}const Wr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Vr=i,Yr=()=>Vr.__WEB_VITALS_POLYFILL__?Vr.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Vr.performance.timing,e=Vr.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):Vr.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Kr=()=>{const t=Yr();return t&&t.activationStart||0},Jr=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Vr.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Gr=-1;const Xr=()=>(Gr<0&&(Gr="hidden"!==Vr.document.visibilityState||Vr.document.prerendering?1/0:0,Jr((({timeStamp:t})=>{Gr=t}),!0)),{get firstHiddenTime(){return Gr}}),Qr=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{e(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Zr={},to=t=>{const e=Xr(),n=((t,e)=>{const n=Yr();let r="navigate";return n&&(r=Vr.document.prerendering||Kr()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}})("LCP");let r;const o=t=>{const o=t[t.length-1];if(o){const t=Math.max(o.startTime-Kr(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[o],r())}},i=Qr("largest-contentful-paint",o);if(i){r=((t,e,n)=>{let r,o;return i=>{e.value>=0&&(i||n)&&(o=e.value-(r||0),(o||void 0===r)&&(r=e.value,e.delta=o,t(e)))}})(t,n);const e=()=>{Zr[n.id]||(o(i.takeRecords()),i.disconnect(),Zr[n.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),Jr(e,!0),e}},eo={},no={};let ro;function oo(t,e){return co(t,e),no[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Qr(t,(e=>{io(t,{entries:e})}),e)}(t),no[t]=!0),uo(t,e)}function io(t,e){const n=eo[t];if(n&&n.length)for(const r of n)try{r(e)}catch(e){Wr&&d.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${gt(r)}\nError:`,e)}}function so(){return to((t=>{io("lcp",{metric:t}),ro=t}))}function ao(t,e,n,r,o=!1){let i;return co(t,e),no[t]||(i=n(),no[t]=!0),r&&e({metric:r}),uo(t,e,o?i:void 0)}function co(t,e){eo[t]=eo[t]||[],eo[t].push(e)}function uo(t,e,n){return()=>{n&&n();const r=eo[t];if(!r)return;const o=r.indexOf(e);-1!==o&&r.splice(o,1)}}const lo=i,ho="sentryReplaySession",po="replay_event",fo="Unable to send Replay",mo=15e4,yo=5e3,go=2e7,vo=36e5;function bo(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}var _o;function wo(t){const e=bo([t,"optionalAccess",t=>t.host]);return Boolean(bo([e,"optionalAccess",t=>t.shadowRoot])===t)}function So(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function ko(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,Eo).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e):null}catch(t){return null}var e}function Eo(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=ko(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import",`url(${JSON.stringify(t.href)})`];return""===t.layerName?n.push("layer"):t.layerName&&n.push(`layer(${t.layerName})`),t.supportsText&&n.push(`supports(${t.supportsText})`),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(t){}else if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":"))return function(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}(t.cssText);return e||t.cssText}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(_o||(_o={}));class To{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const e=bo([this,"access",t=>t.getMeta,"call",e=>e(t),"optionalAccess",t=>t.id]);return r=()=>-1,null!=(n=e)?n:r();var n,r}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Co({maskInputOptions:t,tagName:e,type:n}){return"OPTION"===e&&(e="SELECT"),Boolean(t[e.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===e&&!n&&t.text)}function xo({isMasked:t,element:e,value:n,maskInputFn:r}){let o=n||"";return t?(r&&(o=r(o,e)),"*".repeat(o.length)):o}function Io(t){return t.toLowerCase()}function Ao(t){return t.toUpperCase()}const Oo="__rrweb_original__";function Ro(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Io(e):null}function Po(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let Mo=1;const Do=new RegExp("[^a-z0-9-_:]"),Lo=-2;function No(){return Mo++}let Bo,Uo;const jo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Fo=/^(?:[a-z+]+:)?\/\//i,$o=/^www\..*/i,qo=/^(data:)([^,]*),(.*)/i;function zo(t,e){return(t||"").replace(jo,((t,n,r,o,i,s)=>{const a=r||i||s,c=n||o||"";if(!a)return t;if(Fo.test(a)||$o.test(a))return`url(${c}${a}${c})`;if(qo.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a}${c})`;const u=e.split("/"),l=a.split("/");u.pop();for(const t of l)"."!==t&&(".."===t?u.pop():u.push(t));return`url(${c}${u.join("/")}${c})`}))}const Ho=/^[^ \t\n\r\u000c]+/,Wo=/^[, \t\n\r\u000c]+/;function Vo(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Yo(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Ko(){const t=document.createElement("a");return t.href="",t.href}function Jo(t,e,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==e||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Vo(t,r):"background"!==n||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===n?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const o=t.exec(e.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Wo),!(n>=e.length);){let i=r(Ho);if(","===i.slice(-1))i=Vo(t,i.substring(0,i.length-1)),o.push(i);else{let r="";i=Vo(t,i);let s=!1;for(;;){const t=e.charAt(n);if(""===t){o.push((i+r).trim());break}if(s)")"===t&&(s=!1);else{if(","===t){n+=1,o.push((i+r).trim());break}"("===t&&(s=!0)}r+=t,n+=1}}}return o.join(", ")}(t,r):"style"===n?zo(r,Ko()):"object"===e&&"data"===n?Vo(t,r):"function"==typeof i?i(n,r,o):r:Vo(t,r):r}function Go(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Xo(t,e,n=1/0,r=0){return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Xo(t.parentNode,e,n,r+1):-1}function Qo(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"==typeof t){if(r.matches(`.${t}`))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(t){return!1}}}function Zo(t,e,n,r,o,i){try{const s=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===s)return!1;if("INPUT"===s.tagName){const t=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,c=-1;if(i){if(c=Xo(s,Qo(r,o)),c<0)return!0;a=Xo(s,Qo(e,n),c>=0?c:1/0)}else{if(a=Xo(s,Qo(e,n)),a<0)return!1;c=Xo(s,Qo(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(t){}return!!i}function ti(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:f={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w=!1}=e,S=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:_o.Document,childNodes:[],compatMode:t.compatMode}:{type:_o.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:_o.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:S};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:f=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:_}=e,w=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(t){}return!1}(t,r,o,i),S=function(t){if(t instanceof HTMLFormElement)return"form";const e=Io(t.tagName);return Do.test(e)?"div":e}(t);let k={};const E=t.attributes.length;for(let e=0;e<E;e++){const r=t.attributes[e];r.name&&!Go(S,r.name,r.value)&&(k[r.name]=Jo(n,S,Io(r.name),r.value,t,c))}if("link"===S&&s){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;e&&(r=ko(e)),r&&(delete k.rel,delete k.href,k._cssText=zo(r,e.href))}if("style"===S&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=ko(t.sheet);e&&(k._cssText=zo(e,Ko()))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const e=t,n=Ro(e),r=Po(e,Ao(S),n),o=e.checked;if("submit"!==n&&"button"!==n&&r){const t=Zo(e,g,b,v,_,Co({type:n,tagName:Ao(S),maskInputOptions:a}));k.value=xo({isMasked:t,element:e,value:r,maskInputFn:u})}o&&(k.checked=o)}"option"===S&&(t.selected&&!a.select?k.selected=!0:delete k.selected);if("canvas"===S&&h)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const o=e.getImageData,i=Oo in o?o[Oo]:o;if(new Uint32Array(i.call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(k.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){const e=t.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height;e!==n.toDataURL(l.type,l.quality)&&(k.rr_dataURL=e)}if("img"===S&&d){Bo||(Bo=n.createElement("canvas"),Uo=Bo.getContext("2d"));const e=t,r=e.crossOrigin;e.crossOrigin="anonymous";const o=()=>{e.removeEventListener("load",o);try{Bo.width=e.naturalWidth,Bo.height=e.naturalHeight,Uo.drawImage(e,0,0),k.rr_dataURL=Bo.toDataURL(l.type,l.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}r?k.crossOrigin=r:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}"audio"!==S&&"video"!==S||(k.rr_mediaState=t.paused?"paused":"played",k.rr_mediaCurrentTime=t.currentTime);f||(t.scrollLeft&&(k.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(k.rr_scrollTop=t.scrollTop));if(w){const{width:e,height:n}=t.getBoundingClientRect();k={class:k.class,rr_width:`${e}px`,rr_height:`${n}px`}}"iframe"!==S||p(k.src)||(t.contentDocument||(k.rr_src=k.src),delete k.src);let T;try{customElements.get(S)&&(T=!0)}catch(t){}return{type:_o.Element,tagName:S,attributes:k,childNodes:[],isSVG:Yo(t)||void 0,needBlock:w,rootId:m,isCustom:T}}(t,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:f,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w,rootId:S,maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:l}=e,d=t.parentNode&&t.parentNode.tagName;let h=t.textContent;const p="STYLE"===d||void 0,f="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(p&&h){try{t.nextSibling||t.previousSibling||bo([t,"access",t=>t.parentNode,"access",t=>t.sheet,"optionalAccess",t=>t.cssRules])&&(h=ko(t.parentNode.sheet))}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}h=zo(h,Ko())}f&&(h="SCRIPT_PLACEHOLDER");const y=Zo(t,r,i,o,s,n);p||f||m||!h||!y||(h=a?a(h):h.replace(/[\S]/g,"*"));m&&h&&(c.textarea||y)&&(h=u?u(h,t.parentNode):h.replace(/[\S]/g,"*"));if("OPTION"===d&&h){h=xo({isMasked:Zo(t,r,i,o,s,Co({type:null,tagName:d,maskInputOptions:c})),element:t,value:h,maskInputFn:u})}return{type:_o.Text,textContent:h||"",isStyle:p,rootId:l}}(t,{maskAllText:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:h,maskTextFn:m,maskInputOptions:f,maskInputFn:y,rootId:S});case t.CDATA_SECTION_NODE:return{type:_o.CDATA,textContent:"",rootId:S};case t.COMMENT_NODE:return{type:_o.Comment,textContent:t.textContent||"",rootId:S};default:return!1}}function ei(t){return null==t?"":t.toLowerCase()}function ni(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:h=!1,inlineStylesheet:p=!0,maskInputOptions:f={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:w=!1,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:I=!1}=e;let{preserveWhiteSpace:A=!0}=e;const O=ti(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:_,recordCanvas:w,keepIframeSrcFn:x,newlyAddedElement:I});if(!O)return console.warn(t,"not serialized"),null;let R;R=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===_o.Comment)return!0;if(t.type===_o.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ei(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ei(t.attributes.name)||"icon"===ei(t.attributes.rel)||"apple-touch-icon"===ei(t.attributes.rel)||"shortcut icon"===ei(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ei(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ei(t.attributes.property).match(/^(og|twitter|fb):/)||ei(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ei(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===ei(t.attributes.name)||"googlebot"===ei(t.attributes.name)||"bingbot"===ei(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===ei(t.attributes.name)||"generator"===ei(t.attributes.name)||"framework"===ei(t.attributes.name)||"publisher"===ei(t.attributes.name)||"progid"===ei(t.attributes.name)||ei(t.attributes.property).match(/^article:/)||ei(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===ei(t.attributes.name)||"yandex-verification"===ei(t.attributes.name)||"csrf-token"===ei(t.attributes.name)||"p:domain_verify"===ei(t.attributes.name)||"verify-v1"===ei(t.attributes.name)||"verification"===ei(t.attributes.name)||"shopify-checkout-api-token"===ei(t.attributes.name)))return!0}}return!1}(O,v)&&(A||O.type!==_o.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?No():Lo;const P=Object.assign(O,{id:R});if(r.add(t,P),R===Lo)return null;S&&S(t);let M=!h;if(P.type===_o.Element){M=M&&!P.needBlock,delete P.needBlock;const e=t.shadowRoot;e&&So(e)&&(P.isShadowHost=!0)}if((P.type===_o.Document||P.type===_o.Element)&&M){v.headWhitespace&&P.type===_o.Element&&"head"===P.tagName&&(A=!1);const e={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:h,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:x};for(const n of Array.from(t.childNodes)){const t=ni(n,e);t&&P.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=ni(n,e);r&&(So(t.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return t.parentNode&&wo(t.parentNode)&&So(t.parentNode)&&(P.isShadow=!0),P.type===_o.Element&&"iframe"===P.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(t){return}if("complete"!==o){const r=setTimeout((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{clearTimeout(r),i=!0,e()}))}const s="about:blank";if(r.location.href!==s||t.src===s||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=t.contentDocument;if(e&&k){const n=ni(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:x});n&&k(t,n)}}),E),P.type===_o.Element&&"link"===P.tagName&&"stylesheet"===P.attributes.rel&&function(t,e,n){let r,o=!1;try{r=t.sheet}catch(t){return}if(r)return;const i=setTimeout((()=>{o||(e(),o=!0)}),n);t.addEventListener("load",(()=>{clearTimeout(i),o=!0,e()}))}(t,(()=>{if(T){const e=ni(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:A,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:x});e&&T(t,e)}}),C),P}function ri(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}function oi(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const ii="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let si={map:{},getId(){return console.error(ii),-1},getNode(){return console.error(ii),null},removeNodeFromMap(){console.error(ii)},has(){return console.error(ii),!1},reset(){console.error(ii)}};function ai(t,e,n={}){let r=null,o=0;return function(...i){const s=Date.now();o||!1!==n.leading||(o=s);const a=e-(s-o),c=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=s,t.apply(c,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,t.apply(c,i)}),a))}}function ci(t,e,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(t){setTimeout((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>ci(t,e,i||{},!0)}function ui(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch(t){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(si=new Proxy(si,{get(t,e,n){return"map"===e&&console.error(ii),Reflect.get(t,e,n)}}));let li,di=Date.now;function hi(t){const e=t.document;return{left:e.scrollingElement?e.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:ri([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollLeft])||ri([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollLeft])||ri([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollLeft])||0,top:e.scrollingElement?e.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:ri([e,"optionalAccess",t=>t.documentElement,"access",t=>t.scrollTop])||ri([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.parentElement,"optionalAccess",t=>t.scrollTop])||ri([e,"optionalAccess",t=>t.body,"optionalAccess",t=>t.scrollTop])||0}}function pi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mi(t,e,n,r,o){if(!t)return!1;const i=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!i)return!1;const s=Qo(e,n);if(!o){const t=r&&i.matches(r);return s(i)&&!t}const a=Xo(i,s);let c=-1;return!(a<0)&&(r&&(c=Xo(i,Qo(null,r))),a>-1&&c<0||a<c)}function yi(t,e){return e.getId(t)===Lo}function gi(t,e){if(wo(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||gi(t.parentNode,e))}function vi(t){return Boolean(t.changedTouches)}function bi(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function _i(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function wi(t){return Boolean(ri([t,"optionalAccess",t=>t.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(di=()=>(new Date).getTime());class Si{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return e=this.styleIDMap.get(t),n=()=>-1,null!=e?e:n();var e,n}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ki(t){let e=null;return ri([t,"access",t=>t.getRootNode,"optionalCall",t=>t(),"optionalAccess",t=>t.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(e=t.getRootNode().host),e}function Ei(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=ki(n);)n=e;return n}(t);return e.contains(n)}function Ti(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||Ei(t))}function Ci(...t){return function(){if(li)return li;const t=window.document;let e=window.requestAnimationFrame;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.requestAnimationFrame&&(e=r.requestAnimationFrame),t.head.removeChild(n)}catch(t){}return li=e.bind(window)}()(...t)}var xi=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(xi||{}),Ii=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Ii||{}),Ai=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ai||{}),Oi=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Oi||{});function Ri(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}function Pi(t){return"__ln"in t}class Mi{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=Ri([e,"optionalAccess",t=>t.next])||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Pi(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Pi(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Di=(t,e)=>`${t}@${e}`;class Li{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Mi,r=t=>{let e=t,n=Lo;for(;n===Lo;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},o=o=>{if(!o.parentNode||!Ti(o))return;const i=wo(o.parentNode)?this.mirror.getId(ki(o)):this.mirror.getId(o.parentNode),s=r(o);if(-1===i||-1===s)return n.addNode(o);const a=ni(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{bi(t,this.mirror)&&this.iframeManager.addIframe(t),_i(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),wi(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});a&&(t.push({parentId:i,nextId:s,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Bi(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||o(t);for(const t of this.addedSet)ji(this.droppedSet,t)||Bi(this.removes,t,this.mirror)?ji(this.movedSet,t)?o(t):this.droppedSet.add(t):o(t);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),o(t.value)}const s={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"==typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);n.length<e.style.length&&(n+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(yi(t.target,this.mirror))return;let e;try{e=document.implementation.createHTMLDocument()}catch(t){e=this.doc}switch(t.type){case"characterData":{const e=t.target.textContent;mi(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:Zo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if("value"===r){const e=Ro(n),r=n.tagName;o=Po(n,r,e);const i=Co({maskInputOptions:this.maskInputOptions,tagName:r,type:e});o=xo({isMasked:Zo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:n,value:o,maskInputFn:this.maskInputFn})}if(mi(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributes.find((e=>e.node===t.target));if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i)),"type"===r&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Go(n.tagName,r)&&(i.attributes[r]=Jo(this.doc,Io(n.tagName),Io(r),o,n,this.maskAttributeFn),"style"===r)){const r=e.createElement("span");t.oldValue&&r.setAttribute("style",t.oldValue);for(const t of Array.from(n.style)){const e=n.style.getPropertyValue(t),o=n.style.getPropertyPriority(t);e!==r.style.getPropertyValue(t)||o!==r.style.getPropertyPriority(t)?i.styleDiff[t]=""===o?e:[e,o]:i._unchangedStyles[t]=[e,o]}for(const t of Array.from(r.style))""===n.style.getPropertyValue(t)&&(i.styleDiff[t]=!1)}break}case"childList":if(mi(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=wo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);mi(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||yi(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Ni(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||gi(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Di(n,r)]?Ni(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!wo(t.target)||!So(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(yi(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Di(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);mi(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach((t=>this.genAdds(t))),wi(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ni(t,e){t.delete(e),e.childNodes.forEach((e=>Ni(t,e)))}function Bi(t,e,n){return 0!==t.length&&Ui(t,e,n)}function Ui(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return!!t.some((t=>t.id===o))||Ui(t,r,n)}function ji(t,e){return 0!==t.size&&Fi(t,e)}function Fi(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Fi(t,n))}let $i;function qi(t){$i=t}function zi(){$i=void 0}const Hi=t=>{if(!$i)return t;return(...e)=>{try{return t(...e)}catch(t){if($i&&!0===$i(t))return()=>{};throw t}}};function Wi(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}const Vi=[];function Yi(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Ki(t,e){const n=new Li;Vi.push(n),n.init(t);let r=window.MutationObserver||window.__rrMutationObserver;const o=Wi([window,"optionalAccess",t=>t.Zone,"optionalAccess",t=>t.__symbol__,"optionalCall",t=>t("MutationObserver")]);o&&window[o]&&(r=window[o]);const i=new r(Hi((e=>{t.onMutation&&!1===t.onMutation(e)||n.processMutations.bind(n)(e)})));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Ji({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(!1===s.mouseInteraction)return()=>{};const a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[];let u=null;return Object.keys(Ai).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==a[t])).forEach((s=>{let a=Io(s);const l=(e=>s=>{const a=Yi(s);if(mi(a,r,o,i,!0))return;let c=null,l=e;if("pointerType"in s){switch(s.pointerType){case"mouse":c=Oi.Mouse;break;case"touch":c=Oi.Touch;break;case"pen":c=Oi.Pen}c===Oi.Touch?Ai[e]===Ai.MouseDown?l="TouchStart":Ai[e]===Ai.MouseUp&&(l="TouchEnd"):Oi.Pen}else vi(s)&&(c=Oi.Touch);null!==c?(u=c,(l.startsWith("Touch")&&c===Oi.Touch||l.startsWith("Mouse")&&c===Oi.Mouse)&&(c=null)):Ai[e]===Ai.Click&&(c=u,u=null);const d=vi(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(a),{clientX:p,clientY:f}=d;Hi(t)({type:Ai[l],id:h,x:p,y:f,...null!==c&&{pointerType:c}})})(s);if(window.PointerEvent)switch(Ai[s]){case Ai.MouseDown:case Ai.MouseUp:a=a.replace("mouse","pointer");break;case Ai.TouchStart:case Ai.TouchEnd:return}c.push(oi(a,l,e))})),Hi((()=>{c.forEach((t=>t()))}))}function Gi({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){return oi("scroll",Hi(ai(Hi((s=>{const a=Yi(s);if(!a||mi(a,r,o,i,!0))return;const c=n.getId(a);if(a===e&&e.defaultView){const n=hi(e.defaultView);t({id:c,x:n.left,y:n.top})}else t({id:c,x:a.scrollLeft,y:a.scrollTop})})),s.scroll||100)),e)}const Xi=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap;function Zi({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:m}){function y(t){let n=Yi(t);const l=t.isTrusted,y=n&&Ao(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||Xi.indexOf(y)<0||mi(n,r,o,i,!0))return;const v=n;if(v.classList.contains(s)||a&&v.matches(a))return;const b=Ro(n);let _=Po(v,y,b),w=!1;const S=Co({maskInputOptions:c,tagName:y,type:b}),k=Zo(n,h,f,p,m,S);"radio"!==b&&"checkbox"!==b||(w=n.checked),_=xo({isMasked:k,element:n,value:_,maskInputFn:u}),g(n,d?{text:_,isChecked:w,userTriggered:l}:{text:_,isChecked:w});const E=n.name;"radio"===b&&E&&w&&e.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach((t=>{if(t!==n){const e=xo({isMasked:k,element:t,value:Po(t,y,b),maskInputFn:u});g(t,d?{text:e,isChecked:!w,userTriggered:!1}:{text:e,isChecked:!w})}}))}function g(e,r){const o=Qi.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Qi.set(e,r);const o=n.getId(e);Hi(t)({...r,id:o})}}const v=("last"===l.input?["change"]:["input","change"]).map((t=>oi(t,Hi(y),e))),b=e.defaultView;if(!b)return()=>{v.forEach((t=>t()))};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&v.push(...w.map((t=>ci(t[0],t[1],{set(){Hi(y)({target:this,isTrusted:!1})}},!1,b)))),Hi((()=>{v.forEach((t=>t()))}))}function ts(t){return function(t,e){if(os("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||os("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||os("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||os("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function es(t,e,n){let r,o;return t?(t.ownerNode?r=e.getId(t.ownerNode):o=n.getId(t),{styleId:o,id:r}):{}}function ns({mirror:t,stylesheetManager:e},n){let r=null;r="#document"===n.nodeName?t.getId(n):t.getId(n.host);const o="#document"===n.nodeName?Wi([n,"access",t=>t.defaultView,"optionalAccess",t=>t.Document]):Wi([n,"access",t=>t.ownerDocument,"optionalAccess",t=>t.defaultView,"optionalAccess",t=>t.ShadowRoot]),i=Wi([o,"optionalAccess",t=>t.prototype])?Object.getOwnPropertyDescriptor(Wi([o,"optionalAccess",t=>t.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Wi([i,"access",t=>t.get,"optionalAccess",t=>t.call,"call",t=>t(this)])},set(t){const n=Wi([i,"access",t=>t.set,"optionalAccess",t=>t.call,"call",e=>e(this,t)]);if(null!==r&&-1!==r)try{e.adoptStyleSheets(t,r)}catch(t){}return n}}),Hi((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function rs(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};const r=Ki(t,t.doc),o=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const o="number"==typeof e.mousemove?e.mousemove:50,i="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let s,a=[];const c=ai(Hi((e=>{const n=Date.now()-s;t(a.map((t=>(t.timeOffset-=n,t))),e),a=[],s=null})),i),u=Hi(ai(Hi((t=>{const e=Yi(t),{clientX:n,clientY:o}=vi(t)?t.changedTouches[0]:t;s||(s=di()),a.push({x:n,y:o,id:r.getId(e),timeOffset:di()-s}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?Ii.Drag:t instanceof MouseEvent?Ii.MouseMove:Ii.TouchMove)})),o,{trailing:!1})),l=[oi("mousemove",u,n),oi("touchmove",u,n),oi("drag",u,n)];return Hi((()=>{l.forEach((t=>t()))}))}(t),i=Ji(t),s=Gi(t),a=function({viewportResizeCb:t},{win:e}){let n=-1,r=-1;return oi("resize",Hi(ai(Hi((()=>{const e=pi(),o=fi();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)})),200)),e)}(t,{win:n}),c=Zi(t),u=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){const a=Hi((s=>ai(Hi((i=>{const a=Yi(i);if(!a||mi(a,e,n,r,!0))return;const{currentTime:c,volume:u,muted:l,playbackRate:d}=a;t({type:s,id:o.getId(a),currentTime:c,volume:u,muted:l,playbackRate:d})})),i.media||500))),c=[oi("play",a(0),s),oi("pause",a(1),s),oi("seeked",a(2),s),oi("volumechange",a(3),s),oi("ratechange",a(4),s)];return Hi((()=>{c.forEach((t=>t()))}))}(t),l=function({styleSheetRuleCb:t,mirror:e,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Hi(((r,o,i)=>{const[s,a]=i,{id:c,styleId:u}=es(o,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:s,index:a}]}),r.apply(o,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Hi(((r,o,i)=>{const[s]=i,{id:a,styleId:c}=es(o,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:s}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Hi(((r,o,i)=>{const[s]=i,{id:a,styleId:c}=es(o,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replace:s}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Hi(((r,o,i)=>{const[s]=i,{id:a,styleId:c}=es(o,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,replaceSync:s}),r.apply(o,i)}))}));const c={};is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach((([r,o])=>{u[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(u[r].insertRule,{apply:Hi(((r,o,i)=>{const[s,a]=i,{id:c,styleId:u}=es(o.parentStyleSheet,e,n.styleMirror);return(c&&-1!==c||u&&-1!==u)&&t({id:c,styleId:u,adds:[{rule:s,index:[...ts(o),a||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:Hi(((r,o,i)=>{const[s]=i,{id:a,styleId:c}=es(o.parentStyleSheet,e,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&t({id:a,styleId:c,removes:[{index:[...ts(o),s]}]}),r.apply(o,i)}))})})),Hi((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach((([t,e])=>{e.prototype.insertRule=u[t].insertRule,e.prototype.deleteRule=u[t].deleteRule}))}))}(t,{win:n}),d=ns(t,t.doc),h=function({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Hi(((o,s,a)=>{const[c,u,l]=a;if(n.has(c))return i.apply(s,[c,u,l]);const{id:d,styleId:h}=es(Wi([s,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(d&&-1!==d||h&&-1!==h)&&t({id:d,styleId:h,set:{property:c,value:u,priority:l},index:ts(s.parentRule)}),o.apply(s,a)}))});const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Hi(((o,i,a)=>{const[c]=a;if(n.has(c))return s.apply(i,[c]);const{id:u,styleId:l}=es(Wi([i,"access",t=>t.parentRule,"optionalAccess",t=>t.parentStyleSheet]),e,r.styleMirror);return(u&&-1!==u||l&&-1!==l)&&t({id:u,styleId:l,remove:{property:c},index:ts(i.parentRule)}),o.apply(i,a)}))}),Hi((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s}))}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(t,e,n){const r=new i(t,e,n);return o.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const s=ui(e.fonts,"add",(function(e){return function(n){return setTimeout(Hi((()=>{const e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(s),Hi((()=>{r.forEach((t=>t()))}))}(t):()=>{},f=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=t;let a=!0;const c=Hi((()=>{const t=e.getSelection();if(!t||a&&Wi([t,"optionalAccess",t=>t.isCollapsed]))return;a=t.isCollapsed||!1;const c=[],u=t.rangeCount||0;for(let e=0;e<u;e++){const s=t.getRangeAt(e),{startContainer:a,startOffset:u,endContainer:l,endOffset:d}=s;mi(a,r,o,i,!0)||mi(l,r,o,i,!0)||c.push({start:n.getId(a),startOffset:u,end:n.getId(l),endOffset:d})}s({ranges:c})}));return c(),oi("selectionchange",c)}(t),m=function({doc:t,customElementCb:e}){const n=t.defaultView;return n&&n.customElements?ui(n.customElements,"define",(function(t){return function(n,r,o){try{e({define:{name:n}})}catch(t){}return t.apply(this,[n,r,o])}})):()=>{}}(t),y=[];for(const e of t.plugins)y.push(e.observer(e.callback,n,e.options));return Hi((()=>{Vi.forEach((t=>t.reset())),r.disconnect(),o(),i(),s(),a(),c(),u(),l(),d(),h(),p(),f(),m(),y.forEach((t=>t()))}))}function os(t){return void 0!==window[t]}function is(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ss{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const o=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let s=o.get(e);return s||(s=this.generateIdFn(),o.set(e,s),i.set(s,e)),s}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;const o=r.get(e);return o||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}function as(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(e=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...t)=>n.call(e,...t))),e=void 0)}return n}class cs{constructor(){this.crossOriginIframeMirror=new ss(No),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class us{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ss(No),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ss(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),as([this,"access",t=>t.loadListener,"optionalCall",e=>e(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case xi.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:xi.IncrementalSnapshot,data:{source:Ii.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case xi.Meta:case xi.Load:case xi.DomContentLoaded:return!1;case xi.Plugin:return e;case xi.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case xi.IncrementalSnapshot:switch(e.data.source){case Ii.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Ii.Drag:case Ii.TouchMove:case Ii.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Ii.ViewportResize:return!1;case Ii.MediaInteraction:case Ii.MouseInteraction:case Ii.Scroll:case Ii.CanvasMutation:case Ii.Input:return this.replaceIds(e.data,t,["id"]),e;case Ii.StyleSheetRule:case Ii.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Ii.Font:return e;case Ii.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Ii.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),as([e,"access",t=>t.data,"access",t=>t.styles,"optionalAccess",t=>t.forEach,"call",e=>e((e=>{this.replaceStyleIds(e,t,["styleId"])}))]),e}}return!1}replace(t,e,n,r){for(const o of r)(Array.isArray(e[o])||"number"==typeof e[o])&&(Array.isArray(e[o])?e[o]=t.getIds(n,e[o]):e[o]=t.getId(n,e[o]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===_o.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}class ls{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class ds{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!So(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=Ki({...this.bypassOptions,doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Gi({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(ns({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(ui(t.prototype,"attachShadow",(function(t){return function(r){const o=t.call(this,r);return this.shadowRoot&&Ti(this)&&n.addShadowRoot(this.shadowRoot,e),o}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class hs{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class ps{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Si,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const e of t){let t;this.styleMirror.has(e)?t=this.styleMirror.getId(e):(t=this.styleMirror.add(e),r.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,e)=>({rule:Eo(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class fs{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){Ci((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function ms(t){const e=t;return e.timestamp=di(),e}let ys;const gs=new To;function vs(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:p=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,packFn:w,sampling:S={},dataURLOptions:k={},mousemoveWait:E,recordCanvas:T=!1,recordCrossOriginIframes:C=!1,recordAfter:x=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:A=!1,inlineImages:O=!1,plugins:R,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:D,onMutation:L,getCanvasManager:N}=t;qi(D);const B=!C||window.parent===window;let U=!1;if(!B)try{window.parent.document&&(U=!1)}catch(t){U=!0}if(B&&!e)throw new Error("emit function is required");void 0!==E&&void 0===S.mousemove&&(S.mousemove=E),gs.reset();const j=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},F=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let $;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let e=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let q=0;const z=t=>{for(const e of R||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!U&&(t=w(t)),t},H=(t,o)=>{if(!Fr([Vi,"access",t=>t[0],"optionalAccess",t=>t.isFrozen,"call",t=>t()])||t.type===xi.FullSnapshot||t.type===xi.IncrementalSnapshot&&t.data.source===Ii.Mutation||Vi.forEach((t=>t.unfreeze())),B)Fr([e,"optionalCall",e=>e(z(t),o)]);else if(U){const e={type:"rrweb",event:z(t),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(t.type===xi.FullSnapshot)$=t,q=0;else if(t.type===xi.IncrementalSnapshot){if(t.data.source===Ii.Mutation&&t.data.isAttachIframe)return;q++;const e=r&&q>=r,o=n&&t.timestamp-$.timestamp>n;(e||o)&&Z(!0)}},W=t=>{H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.Mutation,...t}}))},V=t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.Scroll,...t}})),Y=t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.CanvasMutation,...t}})),K=new ps({mutationCb:W,adoptedStyleSheetCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.AdoptedStyleSheet,...t}}))}),J="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new cs:new us({mirror:gs,mutationCb:W,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:H});for(const t of R||[])t.getMirror&&t.getMirror({nodeMirror:gs,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});const G=new fs,X=function(t,e){try{return t?t(e):new hs}catch(t){return console.warn("Unable to initialize CanvasManager"),new hs}}(N,{mirror:gs,win:window,mutationCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.CanvasMutation,...t}})),recordCanvas:T,blockClass:o,blockSelector:i,unblockSelector:s,sampling:S.canvas,dataURLOptions:k,errorHandler:D}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ls:new ds({mutationCb:W,scrollCb:V,bypassOptions:{onMutation:L,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:j,dataURLOptions:k,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,recordCanvas:T,inlineImages:O,sampling:S,slimDOMOptions:F,iframeManager:J,stylesheetManager:K,canvasManager:X,keepIframeSrcFn:P,processedNodeManager:G},mirror:gs}),Z=(t=!1)=>{H(ms({type:xi.Meta,data:{href:window.location.href,width:fi(),height:pi()}}),t),K.reset(),Q.init(),Vi.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new To,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:f=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:C=()=>!1}=e||{};return ni(t,{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:h,recordCanvas:p,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:gs,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:f,maskAllInputs:j,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,slimDOM:F,dataURLOptions:k,recordCanvas:T,inlineImages:O,onSerialize:t=>{bi(t,gs)&&J.addIframe(t),_i(t,gs)&&K.trackLinkElement(t),wi(t)&&Q.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{J.attachIframe(t,e),Q.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{K.attachLinkElement(t,e)},keepIframeSrcFn:P});if(!e)return console.warn("Failed to snapshot the document");H(ms({type:xi.FullSnapshot,data:{node:e,initialOffset:hi(window)}})),Vi.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,gs.getId(document))};ys=Z;try{const t=[],e=t=>Hi(rs)({onMutation:L,mutationCb:W,mousemoveCb:(t,e)=>H(ms({type:xi.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.MouseInteraction,...t}})),scrollCb:V,viewportResizeCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.ViewportResize,...t}})),inputCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.Input,...t}})),mediaInteractionCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.MediaInteraction,...t}})),styleSheetRuleCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.StyleSheetRule,...t}})),styleDeclarationCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.StyleDeclaration,...t}})),canvasMutationCb:Y,fontCb:t=>H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.Font,...t}})),selectionCb:t=>{H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.Selection,...t}}))},customElementCb:t=>{H(ms({type:xi.IncrementalSnapshot,data:{source:Ii.CustomElement,...t}}))},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,maskInputOptions:j,inlineStylesheet:f,sampling:S,recordCanvas:T,inlineImages:O,userTriggeredOnInput:I,collectFonts:A,doc:t,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:P,blockSelector:i,unblockSelector:s,slimDOMOptions:F,dataURLOptions:k,mirror:gs,iframeManager:J,stylesheetManager:K,shadowDomManager:Q,processedNodeManager:G,canvasManager:X,ignoreCSSAttributes:M,plugins:Fr([R,"optionalAccess",t=>t.filter,"call",t=>t((t=>t.observer)),"optionalAccess",t=>t.map,"call",t=>t((t=>({observer:t.observer,options:t.options,callback:e=>H(ms({type:xi.Plugin,data:{plugin:t.name,payload:e}}))})))])||[]},{});J.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}}));const n=()=>{Z(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(oi("DOMContentLoaded",(()=>{H(ms({type:xi.DomContentLoaded,data:{}})),"DOMContentLoaded"===x&&n()}))),t.push(oi("load",(()=>{H(ms({type:xi.Load,data:{}})),"load"===x&&n()}),window))),()=>{t.forEach((t=>t())),G.destroy(),ys=void 0,zi()}}catch(t){console.warn(t)}}vs.mirror=gs,vs.takeFullSnapshot=function(t){if(!ys)throw new Error("please take full snapshot after start recording");ys(t)};const bs=3;function _s(t){return t>9999999999?t:1e3*t}function ws(t){return t>9999999999?t/1e3:t}function Ss(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:xi.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:vt(e,10,1e3)}}),"console"===e.category))))}const ks="button,a";function Es(t){return t.closest(ks)||t}function Ts(t){const e=Cs(t);return e&&e instanceof Element?Es(e):e}function Cs(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}let xs;function Is(t){return xs||(xs=[],M(lo,"open",(function(t){return function(...e){if(xs)try{xs.forEach((t=>t()))}catch(t){}return t.apply(lo,e)}}))),xs.push(t),()=>{const e=xs?xs.indexOf(t):-1;e>-1&&xs.splice(e,1)}}class As{constructor(t,e,n=Ss){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=Is((()=>{this._lastMutation=Rs()}));this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){if(function(t,e){if(!Os.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this._ignoreSelector)||!function(t){return!(!t.data||"number"!=typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:ws(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=ws(t)}registerScroll(t=Date.now()){this._lastScroll=ws(t)}registerClick(t){const e=Es(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[],e=Rs();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=e&&t.push(n)}));for(const e of t){const t=this._clicks.indexOf(e);t>-1&&(this._generateBreadcrumbs(e),this._clicks.splice(t,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:s}=t;if(o){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:lo.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(e,o)}else if(i>1){const t={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:lo.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const Os=["A","BUTTON","INPUT"];function Rs(){return Date.now()/1e3}function Ps(t,e){try{if(!function(t){return t.type===bs}(e))return;const{source:n}=e.data;if(n===Ii.Mutation&&t.registerMutation(e.timestamp),n===Ii.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===Ii.MouseInteraction}(e)){const{type:n,id:r}=e.data,o=vs.mirror.getNode(r);o instanceof HTMLElement&&n===Ai.Click&&t.registerClick(o)}}catch(t){}}function Ms(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var Ds;!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(Ds||(Ds={}));const Ls=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Ns(t){const e={};for(const n in t)if(Ls.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const Bs=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ts(t.event):Cs(t.event),n=x(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}(t);return Ms({category:`ui.${t.name}`,...Us(e,n)})}(e);if(!n)return;const r="click"===e.name,o=r?e.event:void 0;!(r&&t.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||function(t,e,n){t.handleClick(e,n)}(t.clickDetector,n,Ts(e.event)),Ss(t,n)};function Us(t,e){const n=vs.mirror.getId(t),r=n&&vs.mirror.getNode(n),o=r&&vs.mirror.getMeta(r),i=o&&function(t){return t.type===Ds.Element}(o)?o:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((t=>t.type===Ds.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Ns(i.attributes)}}:{}}}function js(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=t;if(!s||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(s)||!i)return null;const a=e||r||o,c=1===i.length;if(!a&&c)return null;const u=x(s,{maxStringLength:200})||"<unknown>",l=Us(s,u);return Ms({category:"ui.keyDown",message:u,data:{...l.data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(e);n&&Ss(t,n)}const Fs={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${e}.${n}`,start:qs(i),end:qs(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:o}=t,i=qs(o);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:h,startTime:p,transferSize:f,type:m}=t;if(0===o)return null;return{type:`${e}.${m}`,start:qs(p),end:qs(i),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:h}}}};function $s(t){return Fs[t.entryType]?Fs[t.entryType](t):null}function qs(t){return((at||lo.performance.timeOrigin)+t)/1e3}function zs(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n({entries:t}){t.forEach(e)}const r=[];return["navigation","paint","resource"].forEach((t=>{r.push(oo(t,n))})),r.push(function(t,e=!1){return ao("lcp",t,so,ro,e)}((({metric:e})=>{t.replayPerformanceEntries.push(function(t){const e=t.entries,n=e[e.length-1],r=n?n.element:void 0,o=t.value,i=qs(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?vs.mirror.getId(r):void 0}}}(e))}))),()=>{r.forEach((t=>t()))}}const Hs="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ws='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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]),i=new t([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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Vs(t,e){Hs&&(d.info(t),e&&Ks(t))}function Ys(t,e){Hs&&(d.info(t),e&&setTimeout((()=>{Ks(t)}),0))}function Ks(t){Rt({category:"console",data:{logger:"replay"},level:"info",message:t},{level:"info"})}class Js extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Gs{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>go)throw new Js;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map((t=>t.timestamp)).sort()[0];return t?_s(t):null}}class Xs{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?t():e()}),{once:!0}),this._worker.addEventListener("error",(t=>{e(t)}),{once:!0})}))),this._ensureReadyPromise}destroy(){Vs("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=({data:e})=>{const s=e;if(s.method===t&&s.id===n){if(this._worker.removeEventListener("message",i),!s.success)return Hs&&d.error("[Replay]",s.response),void o(new Error("Error in compression worker"));r(s.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:t,arg:e})}))}_getAndIncrementId(){return this._id++}}class Qs{constructor(t){this._worker=new Xs(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=_s(t.timestamp);(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>go?Promise.reject(new Js):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(t=>{Hs&&d.warn('[Replay] Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class Zs{constructor(t){this._fallback=new Gs,this._compression=new Qs(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void Vs("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e}=this._fallback,n=[];for(const e of t)n.push(this._compression.addEvent(e));this._compression.hasCheckout=e,this._used=this._compression;try{await Promise.all(n)}catch(t){Hs&&d.warn("[Replay] Failed to add events when switching buffers.",t)}}}function ta({useCompression:t,workerUrl:e}){if(t&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob([Ws]);return URL.createObjectURL(t)}();return""}();if(!e)return;Vs("[Replay] Using compression worker"+(t?` from ${t}`:""));const n=new Worker(e);return new Zs(n)}catch(t){Vs("[Replay] Failed to create compression worker")}}(e);if(t)return t}return Vs("[Replay] Using simple buffer"),new Gs}function ea(){try{return"sessionStorage"in lo&&!!lo.sessionStorage}catch(t){return!1}}function na(t){!function(){if(!ea())return;try{lo.sessionStorage.removeItem(ho)}catch(t){}}(),t.session=void 0}function ra(t){return void 0!==t&&Math.random()<t}function oa(t){const e=Date.now();return{id:t.id||q(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,previousSessionId:t.previousSessionId}}function ia(t){if(ea())try{lo.sessionStorage.setItem(ho,JSON.stringify(t))}catch(t){}}function sa({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1},{previousSessionId:r}={}){const o=function(t,e){return ra(t)?"session":!!e&&"buffer"}(t,e),i=oa({sampled:o,previousSessionId:r});return n&&ia(i),i}function aa(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function ca(t,{maxReplayDuration:e,sessionIdleExpire:n,targetTime:r=Date.now()}){return aa(t.started,e,r)||aa(t.lastActivity,n,r)}function ua(t,{sessionIdleExpire:e,maxReplayDuration:n}){return!!ca(t,{sessionIdleExpire:e,maxReplayDuration:n})&&("buffer"!==t.sampled||0!==t.segmentId)}function la({traceInternals:t,sessionIdleExpire:e,maxReplayDuration:n,previousSessionId:r},o){const i=o.stickySession&&function(t){if(!ea())return null;try{const e=lo.sessionStorage.getItem(ho);if(!e)return null;const n=JSON.parse(e);return Ys("[Replay] Loading existing session",t),oa(n)}catch(t){return null}}(t);return i?ua(i,{sessionIdleExpire:e,maxReplayDuration:n})?(Ys("[Replay] Session in sessionStorage is expired, creating new one..."),sa(o,{previousSessionId:i.id})):i:(Ys("[Replay] Creating new session",t),sa(o,{previousSessionId:r}))}function da(t,e,n){return!!pa(t,e)&&(ha(t,e,n),!0)}async function ha(t,e,n){if(!t.eventBuffer)return null;try{n&&"buffer"===t.recordingMode&&t.eventBuffer.clear(),n&&(t.eventBuffer.hasCheckout=!0);const r=function(t,e){try{if("function"==typeof e&&function(t){return t.type===xi.Custom}(t))return e(t)}catch(t){return Hs&&d.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",t),null}return t}(e,t.getOptions().beforeAddRecordingEvent);if(!r)return;return await t.eventBuffer.addEvent(r)}catch(e){const n=e&&e instanceof Js?"addEventSizeExceeded":"addEvent";Hs&&d.error(e),await t.stop({reason:n});const r=Mt();r&&r.recordDroppedEvent("internal_sdk_error","replay")}}function pa(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=_s(e.timestamp);return!(n+t.timeouts.sessionIdlePause<Date.now())&&(!(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(Vs(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,t.getOptions()._experiments.traceInternals),!1))}function fa(t){return!t.type}function ma(t){return"transaction"===t.type}function ya(t){return"feedback"===t.type}function ga(t){const e=function(){const t=Mt();if(!t)return!1;const e=t.getTransport();if(!e)return!1;return e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!t.isEnabled()||!fa(n)&&!ma(n))return;const o=r&&r.statusCode;e&&(!o||o<200||o>=300)||(ma(n)?function(t,e){const n=t.getContext();e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(e.contexts.trace.trace_id)}(t,n):function(t,e){const n=t.getContext();e.event_id&&n.errorIds.size<100&&n.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||!e.tags||!e.tags.replayId)return;const{beforeErrorSampling:r}=t.getOptions();if("function"==typeof r&&!r(e))return;setTimeout((()=>{t.sendBufferedReplayOrFlush()}))}(t,n))}}function va(t){return e=>{t.isEnabled()&&fa(e)&&function(t,e){const n=e.exception&&e.exception.values&&e.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){Ss(t,Ms({category:"replay.hydrate-error"}))}}(t,e)}}function ba(t,e=!1){const n=e?ga(t):void 0;return Object.assign(((e,r)=>{if(!t.isEnabled())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!fa(e)&&!ma(e)&&!ya(e))return e;if(!t.checkAndHandleExpiredSession())return e;if(ya(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:xi.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1)))}(t,e),e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length||!e.originalException||!e.originalException.__rrweb__)}(e,r)&&!t.getOptions()._experiments.captureExceptions)return Hs&&d.log("[Replay] Ignoring error from rrweb internals",e),null;const o=function(t,e){return"buffer"===t.recordingMode&&e.message!==fo&&!(!e.exception||e.type)&&ra(t.getOptions().errorSampleRate)}(t,e);return(o||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),n&&n(e,{statusCode:200}),e}),{id:"Replay"})}function _a(t,e){return e.map((({type:e,start:n,end:r,name:o,data:i})=>{const s=t.throttledAddEvent({type:xi.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:o,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof s?Promise.resolve(null):s}))}function wa(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(_a(t,[n]),!1))))}}function Sa(t,e){t.isEnabled()&&null!==e&&(function(t,e){return(!Hs||!t.getOptions()._experiments.traceInternals)&&$r(e,Mt())}(t,e.name)||t.addUpdate((()=>(_a(t,[e]),!0))))}function ka(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,o=r[On];if(!e||!n||!o)return null;const{method:i,url:s,status_code:a}=o;return void 0===s?null:{type:"resource.xhr",name:s,start:e/1e3,end:n/1e3,data:{method:i,statusCode:a}}}(e);Sa(t,n)}}function Ea(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Pa(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function Ta(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Ca(t){try{if("string"==typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Pa(t)];if(!t)return[void 0]}catch(e){return Hs&&d.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Hs&&d.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function xa(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n={...t._meta},r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function Ia(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:o,data:F({method:i,statusCode:s,request:a,response:c})}}function Aa(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Oa(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:o,warnings:i}=function(t){if(!t||"string"!=typeof t)return{body:t};const e=t.length>mo,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,mo);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${e}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch(t){}return{body:t}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function Ra(t,e){return Object.keys(t).reduce(((n,r)=>{const o=r.toLowerCase();return e.includes(o)&&t[r]&&(n[o]=t[r]),n}),{})}function Pa(t){return new URLSearchParams(t).toString()}function Ma(t,e){const n=function(t,e=lo.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(lo.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return P(n,e)}async function Da(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=e,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:l}=t.data,h=Ma(s,n.networkDetailAllowUrls)&&!Ma(s,n.networkDetailDenyUrls),p=h?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){const o=n?function(t,e){if(1===t.length&&"string"!=typeof t[0])return Ba(t[0],e);if(2===t.length)return Ba(t[1],e);return{}}(n,e):{};if(!t)return Oa(o,r,void 0);const i=La(n),[s,a]=Ca(i),c=Oa(o,r,s);if(a)return xa(c,a);return c}(n,e.input,u):Aa(u),f=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},o,i){if(!t&&void 0!==i)return Aa(i);const s=o?Na(o.headers,r):{};if(!o||!e&&void 0!==i)return Oa(s,i,void 0);const[a,c]=await async function(t){const e=function(t){try{return t.clone()}catch(t){Hs&&d.warn("[Replay] Failed to clone response body",t)}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise(((e,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(t){return await t.text()})(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}(e);return[t]}catch(t){return Hs&&d.warn("[Replay] Failed to get text body from response",t),[void 0,"BODY_PARSE_ERROR"]}}(o),u=function(t,{networkCaptureBodies:e,textEncoder:n,responseBodySize:r,captureDetails:o,headers:i}){try{const s=t&&t.length&&void 0===r?Ea(t,n):r;return o?Oa(i,s,e?t:void 0):Aa(s)}catch(t){return Hs&&d.warn("[Replay] Failed to serialize response body",t),Oa(i,r,void 0)}}(a,{networkCaptureBodies:e,textEncoder:n,responseBodySize:i,captureDetails:t,headers:s});if(c)return xa(u,c);return u}(h,n,e.response,l);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:p,response:f}}(t,e,n),o=Ia("resource.fetch",r);Sa(n.replay,o)}catch(t){Hs&&d.error("[Replay] Failed to capture fetch breadcrumb",t)}}function La(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function Na(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function Ba(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Na(n,e):Array.isArray(n)?{}:Ra(n,e):{}}async function Ua(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=e,{url:c,method:u,status_code:l=0,request_body_size:h,response_body_size:p}=t.data;if(!c)return null;if(!a||!Ma(c,n.networkDetailAllowUrls)||Ma(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:Aa(h),response:Aa(p)}}const f=a[On],m=f?Ra(f.request_headers,n.networkRequestHeaders):{},y=Ra(function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t}),{})}(a),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?Ca(s):[void 0],[b,_]=n.networkCaptureBodies?function(t){const e=[];try{return[t.responseText]}catch(t){e.push(t)}try{return function(t,e){try{if("string"==typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"==typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(e){return Hs&&d.warn("[Replay] Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Hs&&d.info("[Replay] Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(t){e.push(t)}return Hs&&d.warn("[Replay] Failed to get xhr response body",...e),[void 0]}(a):[void 0],w=Oa(m,h,g),S=Oa(y,p,b);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:l,request:v?xa(w,v):w,response:_?xa(S,_):S}}(t,e,n),o=Ia("resource.xhr",r);Sa(n.replay,o)}catch(t){Hs&&d.error("[Replay] Failed to capture xhr breadcrumb",t)}}function ja(t,e,n){const{xhr:r,input:o}=e;if(!r)return;const i=Ea(o,n.textEncoder),s=r.getResponseHeader("content-length")?Ta(r.getResponseHeader("content-length")):function(t,e,n){try{return Ea("json"===e&&t&&"object"==typeof t?JSON.stringify(t):t,n)}catch(t){return}}(r.response,r.responseType,n.textEncoder);void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}function Fa(t){const e=Mt();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=t.getOptions(),c={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:o,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(ja(e,n,t),Ua(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(!function(t,e,n){const{input:r,response:o}=e,i=Ea(r?La(r):void 0,n.textEncoder),s=o?Ta(o.headers.get("content-length")):void 0;void 0!==i&&(t.data.request_body_size=i),void 0!==s&&(t.data.response_body_size=s)}(e,n,t),Da(e,n,t))}catch(t){Hs&&d.warn("Error when enriching network breadcrumb")}}(c,t,e))):(Mn(function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:o}=t;if(!n)return null;const{method:i,url:s}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:s,data:{method:i,statusCode:o?o.status:void 0}}}(e);Sa(t,n)}}(t)),Rn(ka(t)))}catch(t){}}let $a=null;const qa=t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();if($a===e||!e)return null;if($a=e,!function(t){return!!t.category}(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return Ms(t);let n=!1;const r=e.map((t=>{if(!t)return t;if("string"==typeof t)return t.length>yo?(n=!0,`${t.slice(0,yo)}…`):t;if("object"==typeof t)try{const e=vt(t,7);return JSON.stringify(e).length>yo?(n=!0,`${JSON.stringify(e,null,2).slice(0,yo)}…`):e}catch(t){}return t}));return Ms({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return Ms(e)}(e);n&&Ss(t,n)};function za(t){const e=Dt(),n=Mt();e.addScopeListener(qa(t)),Cn(Bs(t)),Pe(wa(t)),Fa(t);const r=ba(t,!Ha(n));n&&n.addEventProcessor?n.addEventProcessor(r):function(t){const e=Mt();e&&e.addEventProcessor&&e.addEventProcessor(t)}(r),Ha(n)&&(n.on("beforeSendEvent",va(t)),n.on("afterSendEvent",ga(t)),n.on("createDsc",(e=>{const n=t.getSessionId();if(n&&t.isEnabled()&&"session"===t.recordingMode){t.checkAndHandleExpiredSession()&&(e.replay_id=n)}})),n.on("startTransaction",(e=>{t.lastTransaction=e})),n.on("finishTransaction",(e=>{t.lastTransaction=e})),n.on("beforeSendFeedback",((e,n)=>{const r=t.getSessionId();n&&n.includeReplay&&t.isEnabled()&&r&&(t.flush(),e.contexts&&e.contexts.feedback&&(e.contexts.feedback.replay_id=r))})))}function Ha(t){return!(!t||!t.on)}function Wa(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Va(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(Hs&&d.warn("[Replay] Received replay event after session expired."));const o=r||!e;e=!0,t.clickDetector&&Ps(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&o&&t.setInitialState(),!da(t,n,o))return!0;if(!o)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return;da(t,function(t){const e=t.getOptions();return{type:xi.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,o),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(Vs(`[Replay] Updating session start time to earliest event in buffer to ${new Date(e)}`,t.getOptions()._experiments.traceInternals),t.session.started=e,t.getOptions().stickySession&&ia(t.session))}return"session"===t.recordingMode&&t.flush(),!0}))}}async function Ya({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:o,session:i}){const s=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:l}=r,d=Mt(),h=Dt(),p=d&&d.getTransport(),f=d&&d.getDsn();if(!(d&&p&&f&&i.sampled))return;const m={type:po,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:e,segment_id:n,replay_type:i.sampled},y=await async function({client:t,scope:e,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations)};t.emit&&t.emit("preprocessEvent",r,o);const i=await Tt(t.getOptions(),r,o,e,t,ee());if(!i)return null;i.platform=i.platform||"javascript";const s=t.getSdkMetadata&&t.getSdkMetadata(),{name:a,version:c}=s&&s.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0"},i}({scope:h,client:d,replayId:e,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay",m),void Vs("An event processor returned `null`, will not send event.");delete y.sdkProcessingMetadata;const g=function(t,e,n,r){return Ue(Ye(t,Ve(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,s,f,d.getOptions().tunnel);let v;try{v=await p.send(g)}catch(t){const e=new Error(fo);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Ka(v.statusCode);const b=Rr({},v);if(Or(b,"replay"))throw new Ja(b);return v}class Ka extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ja extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Ga(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var o,i;if(n.length)try{return await Ya(t),!0}catch(n){if(n instanceof Ka||n instanceof Ja)throw n;if(o="Replays",i={_retryCount:e.count},te().setContext(o,i),Hs&&r._experiments&&r._experiments.captureExceptions&&At(n),e.count>=3){const t=new Error(`${fo} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await Ga(t,e),n(!0)}catch(t){r(t)}}),e.interval)}))}}const Xa="__THROTTLED";function Qa(t,e,n){const r=new Map;let o=!1;return(...i)=>{const s=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{n<e&&r.delete(n)}))})(s),[...r.values()].reduce(((t,e)=>t+e),0)>=e){const t=o;return o=!0,t?"__SKIPPED":Xa}o=!1;const a=r.get(s)||0;return r.set(s,a+1),t(...i)}}class Za{constructor({options:t,recordingOptions:e}){Za.prototype.__init.call(this),Za.prototype.__init2.call(this),Za.prototype.__init3.call(this),Za.prototype.__init4.call(this),Za.prototype.__init5.call(this),Za.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,o,i;const s=n&&n.maxWait?Math.max(n.maxWait,e):0;function a(){return c(),r=t(),r}function c(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function u(){return o&&clearTimeout(o),o=setTimeout(a,e),s&&void 0===i&&(i=setTimeout(a,s)),r}return u.cancel=c,u.flush=function(){return void 0!==o||void 0!==i?a():r},u}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Qa(((t,e)=>function(t,e,n){return pa(t,e)?ha(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new As(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options;e<=0&&n<=0||(this._initializeSessionForSampling(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Ys(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");Ys("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const t=la({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");Ys("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const t=la({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=vs({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Va(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop({forceFlush:t=!1,reason:e}={}){if(this._isEnabled){this._isEnabled=!1;try{Vs("[Replay] Stopping Replay"+(e?` triggered by ${e}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,na(this)}catch(t){this._handleException(t)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Vs("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Vs("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();Vs("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(e),this._updateSessionActivity(e),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&aa(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const t=`${lo.location.pathname}${lo.location.hash}${lo.location.search}`,e=`${lo.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===Xa){const t=Ms({category:"replay.throttled"});this.addUpdate((()=>!da(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastTransaction||Dt().getTransaction(),e=(t&&kt(t).data||{})["sentry.source"];if(t&&e&&["route","custom"].includes(e))return kt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=ta({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(t){Hs&&d.error("[Replay]",t),Hs&&this._options._experiments&&this._options._experiments.captureExceptions&&At(t)}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0,n=la({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return!ua(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(t),!1)}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{lo.document.addEventListener("visibilitychange",this._handleVisibilityChange),lo.addEventListener("blur",this._handleWindowBlur),lo.addEventListener("focus",this._handleWindowFocus),lo.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(za(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}this._performanceCleanupCallback=zs(this)}_removeListeners(){try{lo.document.removeEventListener("visibilitychange",this._handleVisibilityChange),lo.removeEventListener("blur",this._handleWindowBlur),lo.removeEventListener("focus",this._handleWindowFocus),lo.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this._handleException(t)}}__init(){this._handleVisibilityChange=()=>{"visible"===lo.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Ms({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Ms({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{js(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;ca(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):Vs("[Replay] Document has become active, but session has expired")}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:xi.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})}))}_addPerformanceEntries(){const t=(e=this.performanceEntries,e.map($s).filter(Boolean)).concat(this.replayPerformanceEntries);var e;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(_a(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(this.session&&this.eventBuffer&&t){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(_a(t,[Wa(lo.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Ga({replayId:t,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:e})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});const e=Mt();e&&e.recordDroppedEvent("send_error","replay")}}else Hs&&d.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession())return void(Hs&&d.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const e=this.session.started,n=Date.now()-e;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,o=n>this._options.maxReplayDuration+5e3;if(r||o)return Vs(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&Vs("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(t){Hs&&d.error(t)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ia(this.session)}__init6(){this._onMutationHandler=t=>{const e=t.length,n=this._options.mutationLimit,r=n&&e>n;if(e>this._options.mutationBreadcrumbLimit||r){const t=Ms({category:"replay.mutations",data:{count:e,limit:r}});this._createCustomBreadcrumb(t)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function tc(t,e,n,r){const o=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&o.push(`.${n}`),l((()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")}))),o.join(",")}const ec='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',nc=["content-length","content-type","accept"];let rc=!1;class oc{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:s,_experiments:a={},sessionSampleRate:c,errorSampleRate:u,maskAllText:l=!0,maskAllInputs:d=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:v=[],networkCaptureBodies:b=!0,networkRequestHeaders:_=[],networkResponseHeaders:w=[],mask:S=[],maskAttributes:k=["title","placeholder"],unmask:E=[],block:T=[],unblock:C=[],ignore:x=[],maskFn:I,beforeAddRecordingEvent:A,beforeErrorSampling:O,blockClass:R,blockSelector:P,maskInputOptions:M,maskTextClass:D,maskTextSelector:L,ignoreClass:N}={}){this.name=oc.id;const B=function({mask:t,unmask:e,block:n,unblock:r,ignore:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:c,ignoreClass:u}){const l={maskTextSelector:tc(t,[".sentry-mask","[data-sentry-mask]"],a,c),unmaskTextSelector:tc(e,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:tc(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],i,s),unblockSelector:tc(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:tc(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return i instanceof RegExp&&(l.blockClass=i),a instanceof RegExp&&(l.maskTextClass=a),l}({mask:S,unmask:E,block:T,unblock:C,ignore:x,blockClass:R,blockSelector:P,maskTextClass:D,maskTextSelector:L,ignoreClass:N});if(this._recordingOptions={maskAllInputs:d,maskAllText:l,maskInputOptions:{...M||{},password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(t,e,n)=>function({el:t,key:e,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return r?o.unmaskTextSelector&&t.matches(o.unmaskTextSelector)?i:n.includes(e)||"value"===e&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:k,maskAllText:l,privacyOptions:B,key:t,value:e,el:n}),...B,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(t){}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,vo),stickySession:o,sessionSampleRate:c,errorSampleRate:u,useCompression:i,workerUrl:s,blockAllMedia:h,maskAllInputs:d,maskAllText:l,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:m,slowClickIgnoreSelectors:y,networkDetailAllowUrls:g,networkDetailDenyUrls:v,networkCaptureBodies:b,networkRequestHeaders:ic(_),networkResponseHeaders:ic(w),beforeAddRecordingEvent:A,beforeErrorSampling:O,_experiments:a},"number"==typeof c&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${c} })`),this._initialOptions.sessionSampleRate=c),"number"==typeof u&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${ec}`:ec),this._isInitialized&&Hr())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return rc}set _isInitialized(t){rc=t}setupOnce(){Hr()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const t=function(t){const e=Mt(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...F(t)};if(!n)return l((()=>{console.warn("SDK client is not available.")})),r;null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&l((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate);return r}(this._initialOptions);this._replay=new Za({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const t=Mt().getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(t){}}}function ic(t){return[...nc,...t.map((t=>t.toLowerCase()))]}var sc;oc.__initStatic(),function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=[...jr]),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),mn.SENTRY_RELEASE&&mn.SENTRY_RELEASE.id&&(t.release=mn.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||Cr,Array.isArray(n)?mt(...n):n),integrations:ae(t),transport:t.transport||(Se()?Nr:Ur)};var n;_e(bn,e),t.autoSessionTracking&&(void 0!==mn.document?(Lt({ignoreDuration:!0}),Ut(),Pe((({from:t,to:e})=>{void 0!==t&&t!==e&&(Lt({ignoreDuration:!0}),Ut())}))):sn&&d.warn("Session tracking in non-browser environment with @sentry/browser is not supported."))}({environment:"production",dsn:"https://6b4db739b3b7e5855c1962ce8b18f874@o96111.ingest.sentry.io/4506789782487040",release:"#30995-11f6510c43c7b0e978bf9af38a314ba9493fb229",integrations:[new oc(sc)],replaysOnErrorSampleRate:.01,sampleRate:.1,beforeSend:function(t){return function(t){var e,n,r,o,i=null==t||null===(e=t.exception)||void 0===e||null===(n=e.values)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.stacktrace)||void 0===o?void 0:o.frames;if(!i||0===i.length)return!1;var s=i[0];return["<anonymous>","Unknown","unknown"].includes(s.filename)}(t)?null:t}})},85670:function(t,e){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:String(e)}var i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=e,this.previousState=null}var e,n,o;return e=t,n=[{key:"fadeIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"block";this.element.style.display=t,this.element.animationRunning=!0,this.element.style.opacity=this.element.style.opacity?this.element.style.opacity:0,this.fadeInExec()}},{key:"fadeInExec",value:function(){var t=this,e=parseFloat(this.element.style.opacity);(e+=.1)>1?this.element.animationRunning=!1:(this.element.style.opacity=e,requestAnimationFrame((function(){return t.fadeInExec()})))}},{key:"fadeOut",value:function(){var t=this;this.element.style.opacity=this.element.style.opacity?this.element.style.opacity:1;var e=setInterval((function(){t.element.animationRunning||(clearInterval(e),t.fadeOutExec())}),100)}},{key:"fadeOutExec",value:function(){var t=this;this.element.animationRunning=!0,(this.element.style.opacity-=.1)<0?(this.element.style.display="none",this.element.animationRunning=!1):requestAnimationFrame((function(){return t.fadeOutExec()}))}},{key:"show",value:function(){this.element&&(this.element.style.display=this.previousState||"block")}},{key:"hide",value:function(){this.element&&(this.previousState=this.element.style.display,this.element.style.display="none")}}],n&&r(e.prototype,n),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();window.$t=function(t){var e=[],r="object"===n(t)?t:document.querySelector(t);e.find((function(t){return t.element===r}));var o=new i(r);return e.push(o),o},e.A=i},58993:function(t,e){"use strict";e.A={v4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},pattern:function(){return"[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}"}}},67526:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=a(t),s=i[0],c=i[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,c)),l=0,d=c>0?s-4:s;for(n=0;n<d;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===c&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,u[l++]=255&e);1===c&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],s=16383,a=0,u=r-o;a<u;a+=s)i.push(c(t,a,a+s>u?u:a+s));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var o,i,s=[],a=e;a<r;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},48287:function(t,e,n){"use strict";var r=n(67526),o=n(251),i=n(35336);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return u(this,t,e,n)}function u(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|f(e,n);t=a(t,r);var o=t.write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(c.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(l(e),t=a(t,e<0?0:0|p(e)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function f(t,e){if(c.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(r)return $(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){var i,s=1,a=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,n/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<a;i++)if(u(t,i)===u(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+c>a&&(n=a-c),i=n;i>=0;i--){for(var d=!0,h=0;h<c;h++)if(u(t,i+h)!==u(e,h)){d=!1;break}if(d)return i}return-1}function b(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function _(t,e,n,r){return z($(e,t.length-n),t,n,r)}function w(t,e,n,r){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return w(t,e,n,r)}function k(t,e,n,r){return z(q(e),t,n,r)}function E(t,e,n,r){return z(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,c,u=t[o],l=null,d=u>239?4:u>223?3:u>191?2:1;if(o+d<=n)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(i=t[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=d}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=x));return n}(r)}e.hp=c,e.IS=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),s(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return u(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},c.allocUnsafe=function(t){return d(null,t)},c.allocUnsafeSlow=function(t){return d(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=c.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=f,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):m.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",n=e.IS;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,n,r,o){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(r,o),l=t.slice(e,n),d=0;d<a;++d)if(u[d]!==l[d]){i=u[d],s=l[d];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},c.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},c.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},c.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function I(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function A(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function O(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=F(t[i]);return o}function R(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function P(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,o,i){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function N(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,i){return i||N(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||N(t,0,n,8),o.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=c.prototype;else{var o=e-t;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},c.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},c.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},c.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},c.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},c.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);M(this,t,e,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},c.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=c.isBuffer(t)?t:$(new c(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}},35336:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},17833:function(t,e,n){var r=n(65606);e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))})),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG);return t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(40736)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},40736:function(t,e,n){t.exports=function(t){function e(t){let n,o,i,s=null;function a(...t){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=e.formatters[o];if("function"==typeof i){const e=t[s];n=i.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t);(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==e.namespaces&&(o=e.namespaces,i=e.enabled(t)),i),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function o(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){const t=[...e.names.map(o),...e.skips.map(o).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(t=r[n].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;let n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1},e.humanize=n(6585),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((n=>{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}},251:function(t,e){e.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,c=(1<<a)-1,u=c>>1,l=-7,d=n?o-1:0,h=n?-1:1,p=t[e+d];for(d+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+t[e+d],d+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+d],d+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var s,a,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,f=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(e*c-1)*Math.pow(2,o),s+=d):(a=e*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;t[n+p]=255&a,p+=f,a/=256,o-=8);for(s=s<<o|a,u+=o;u>0;t[n+p]=255&s,p+=f,s/=256,u-=8);t[n+p-f]|=128*m}},6585:function(t){var e=1e3,n=60*e,r=60*n,o=24*r,i=7*o,s=365.25*o;function a(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,c){c=c||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(t);if("number"===u&&isFinite(t))return c.long?function(t){var i=Math.abs(t);if(i>=o)return a(t,i,o,"day");if(i>=r)return a(t,i,r,"hour");if(i>=n)return a(t,i,n,"minute");if(i>=e)return a(t,i,e,"second");return t+" ms"}(t):function(t){var i=Math.abs(t);if(i>=o)return Math.round(t/o)+"d";if(i>=r)return Math.round(t/r)+"h";if(i>=n)return Math.round(t/n)+"m";if(i>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},65606:function(t){var e,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(t){n=i}}();var a,c=[],u=!1,l=-1;function d(){u&&a&&(u=!1,a.length?c=a.concat(c):l=-1,c.length&&h())}function h(){if(!u){var t=s(d);u=!0;for(var e=c.length;e;){for(a=c,c=[];++l<e;)a&&a[l].run();l=-1,e=c.length}a=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function f(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},7452:function(t){var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),s=new I(r||[]);return i._invoke=function(t,e,n){var r=d;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?f:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=f,n.method="throw",n.arg=c.arg)}}}(t,n,s),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d="suspendedStart",h="suspendedYield",p="executing",f="completed",m={};function y(){}function g(){}function v(){}var b={};c(b,i,(function(){return this}));var _=Object.getPrototypeOf,w=_&&_(_(A([])));w&&w!==n&&r.call(w,i)&&(b=w);var S=v.prototype=y.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,i,s,a){var c=l(t[o],t,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:O}}function O(){return{value:e,done:!0}}return g.prototype=v,c(S,"constructor",v),c(v,"constructor",g),g.displayName=c(v,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,a,"GeneratorFunction")),t.prototype=Object.create(S),t},t.awrap=function(t){return{__await:t}},k(E.prototype),c(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new E(u(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},k(S),c(S,a,"Generator"),c(S,i,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=A,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},34110:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},28661:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t<r;t++){let r=n[t].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}},91015:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){if(t.length>2e3)throw"URI too long";const e=t,o=t.indexOf("["),i=t.indexOf("]");-1!=o&&-1!=i&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));let s=n.exec(t||""),a={},c=14;for(;c--;)a[r[c]]=s[c]||"";return-1!=o&&-1!=i&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||r.splice(0,1);"/"==e.slice(-1)&&r.splice(r.length-1,1);return r}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a}},80732:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r=64,o={};let i,s=0,a=0;function c(t){let e="";do{e=n[t%r]+e,t=Math.floor(t/r)}while(t>0);return e}for(e.encode=c,e.decode=function(t){let e=0;for(a=0;a<t.length;a++)e=e*r+o[t.charAt(a)];return e},e.yeast=function(){const t=c(+new Date);return t!==i?(s=0,i=t):t+"."+c(s++)};a<r;a++)o[n[a]]=a},26235:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},4956:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.TransportError=e.Transport=e.protocol=e.Socket=void 0;const r=n(78223);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var o=n(44689);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return o.Transport}}),Object.defineProperty(e,"TransportError",{enumerable:!0,get:function(){return o.TransportError}});var i=n(19419);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return i.transports}});var s=n(85374);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var a=n(91015);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var c=n(94087);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return c.nextTick}})},78223:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const o=n(19419),i=n(85374),s=n(28661),a=n(91015),c=r(n(17833)),u=n(27285),l=n(46376),d=n(94087),h=(0,c.default)("engine.io-client:socket");class p extends u.Emitter{constructor(t,e={}){super(),this.binaryType=d.defaultBinaryType,this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,i.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,s.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){h('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=l.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return h("options: %j",n),new o.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return h("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){h("setting transport %s",t.name),this.transport&&(h("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){h('probing transport "%s"',t);let e=this.createTransport(t),n=!1;p.priorWebsocketSuccess=!1;const r=()=>{n||(h('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(h('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;p.priorWebsocketSuccess="websocket"===e.name,h('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(h("changing transport and sending upgrade packet"),u(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{h('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function o(){n||(n=!0,u(),e.close(),e=null)}const i=n=>{const r=new Error("probe error: "+n);r.transport=e.name,o(),h('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function s(){i("transport closed")}function a(){i("socket closed")}function c(t){e&&t.name!==e.name&&(h('"%s" works - aborting "%s"',t.name,e.name),o())}const u=()=>{e.removeListener("open",r),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",c)};e.once("open",r),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",c),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn((()=>{n||e.open()}),200):e.open()}onOpen(){if(h("socket open"),this.readyState="open",p.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){h("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t<e;t++)this.probe(this.upgrades[t])}}onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(h('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}else h('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn((()=>{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();h("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const n=this.writeBuffer[e].data;if(n&&(t+=(0,i.byteLength)(n)),e>0&&t>this.maxPayload)return h("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return h("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const o={type:t,data:e,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),h("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}onError(t){h("socket error %j",t),p.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(h('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n<r;n++)~this.transports.indexOf(t[n])&&e.push(t[n]);return e}}e.Socket=p,p.protocol=l.protocol},44689:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.TransportError=void 0;const o=n(46376),i=n(27285),s=n(85374),a=r(n(17833)),c=n(28661),u=(0,a.default)("engine.io-client:transport");class l extends Error{constructor(t,e,n){super(t),this.description=e,this.context=n,this.type="TransportError"}}e.TransportError=l;class d extends i.Emitter{constructor(t){super(),this.writable=!1,(0,s.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,n){return super.emitReserved("error",new l(t,e,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState?this.write(t):u("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=(0,o.decodePacket)(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=(0,c.encode)(t);return e.length?"?"+e:""}}e.Transport=d},19419:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(30528),o=n(38716),i=n(44480);e.transports={websocket:o.WS,webtransport:i.WT,polling:r.Polling}},30528:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const o=n(44689),i=r(n(17833)),s=n(80732),a=n(46376),c=n(3519),u=n(27285),l=n(85374),d=n(26235),h=(0,i.default)("engine.io-client:polling");function p(){}const f=null!=new c.XHR({xdomain:!1}).responseType;class m extends o.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port}const e=t&&t.forceBase64;this.supportsBinary=f&&!e,this.opts.withCredentials&&(this.cookieJar=(0,c.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{h("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(h("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){h("pre-pause polling complete"),--t||e()}))),this.writable||(h("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){h("pre-pause writing complete"),--t||e()})))}else e()}poll(){h("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){h("polling got data %s",t);(0,a.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():h('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{h("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(h("transport open - closing"),t()):(h("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,a.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new y(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){h("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=m;class y extends u.Emitter{constructor(t,e){super(),(0,l.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=void 0!==e.data?e.data:null,this.create()}create(){var t;const e=(0,l.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const n=this.xhr=new c.XHR(e);try{h("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&n.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{n.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this.opts.cookieJar)||void 0===t||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var t;3===n.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(n)),4===n.readyState&&(200===n.status||1223===n.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof n.status?n.status:0)}),0))},h("xhr data %s",this.data),n.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=y.requestsCount++,y.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete y.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=y,y.requestsCount=0,y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",g);else if("function"==typeof addEventListener){const t="onpagehide"in d.globalThisShim?"pagehide":"unload";addEventListener(t,g,!1)}function g(){for(let t in y.requests)y.requests.hasOwnProperty(t)&&y.requests[t].abort()}},94087:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const r=n(26235);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},38716:function(t,e,n){"use strict";var r=n(48287).hp,o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const i=n(44689),s=n(80732),a=n(85374),c=n(94087),u=o(n(17833)),l=n(46376),d=(0,u.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class p extends i.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=c.usingBrowserWebSocket&&!h?e?new c.WebSocket(t,e):new c.WebSocket(t):new c.WebSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],o=e===t.length-1;(0,l.encodePacket)(n,this.supportsBinary,(t=>{const e={};if(!c.usingBrowserWebSocket&&(n.options&&(e.compress=n.options.compress),this.opts.perMessageDeflate)){("string"==typeof t?r.byteLength(t):t.length)<this.opts.perMessageDeflate.threshold&&(e.compress=!1)}try{c.usingBrowserWebSocket?this.ws.send(t):this.ws.send(t,e)}catch(t){d("websocket closed before onclose event")}o&&(0,c.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!c.WebSocket}}e.WS=p},44480:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WT=void 0;const o=n(44689),i=n(94087),s=n(46376),a=(0,r(n(17833)).default)("engine.io-client:webtransport");class c extends o.Transport{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{a("transport closed gracefully"),this.onClose()})).catch((t=>{a("transport closed due to %s",t),this.onError("webtransport error",t)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=(0,s.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(e).getReader(),r=(0,s.createPacketEncoderStream)();r.readable.pipeTo(t.writable),this.writer=r.writable.getWriter();const o=()=>{n.read().then((({done:t,value:e})=>{t?a("session is closed"):(a("received chunk: %o",e),this.onPacket(e),o())})).catch((t=>{a("an error occurred while reading: %s",t)}))};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this.writer.write(i).then((()=>this.onOpen()))}))})))}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const n=t[e],r=e===t.length-1;this.writer.write(n).then((()=>{r&&(0,i.nextTick)((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}}e.WT=c},3519:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCookieJar=e.XHR=void 0;const r=n(34110),o=n(26235);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(o.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}},e.createCookieJar=function(){}},85374:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const r=n(26235);e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})};const o=r.globalThisShim.setTimeout,i=r.globalThisShim.clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=o.bind(r.globalThisShim),t.clearTimeoutFn=i.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))};e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},62046:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t}));e.ERROR_PACKET={type:"error",data:"parser error"}},42745:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),o=r.length,i="";for(e=0;e<o;e+=3)i+=n[r[e]>>2],i+=n[(3&r[e])<<4|r[e+1]>>4],i+=n[(15&r[e+1])<<2|r[e+2]>>6],i+=n[63&r[e+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i};e.decode=t=>{let e,n,o,i,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const l=new ArrayBuffer(a),d=new Uint8Array(l);for(e=0;e<c;e+=4)n=r[t.charCodeAt(e)],o=r[t.charCodeAt(e+1)],i=r[t.charCodeAt(e+2)],s=r[t.charCodeAt(e+3)],d[u++]=n<<2|o>>4,d[u++]=(15&o)<<4|i>>2,d[u++]=(3&i)<<6|63&s;return l}},32662:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePacket=void 0;const r=n(62046),o=n(42745),i="function"==typeof ArrayBuffer;e.decodePacket=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);if("b"===n)return{type:"message",data:s(t.substring(1),e)};return r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET};const s=(t,e)=>{if(i){const n=(0,o.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer},2686:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodePacket=void 0,e.encodePacketToBinary=function(t,e){if(o&&t.data instanceof Blob)return t.data.arrayBuffer().then(u).then(e);if(i&&(t.data instanceof ArrayBuffer||s(t.data)))return e(u(t.data));a(t,!1,(t=>{l||(l=new TextEncoder),e(l.encode(t))}))};const r=n(62046),o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,s=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,a=({type:t,data:e},n,a)=>o&&e instanceof Blob?n?a(e):c(e,a):i&&(e instanceof ArrayBuffer||s(e))?n?a(e):c(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));e.encodePacket=a;const c=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};function u(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let l},46376:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0,e.createPacketEncoderStream=function(){return new TransformStream({transform(t,e){(0,r.encodePacketToBinary)(t,(n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const t=new DataView(o.buffer);t.setUint8(0,126),t.setUint16(1,r)}else{o=new Uint8Array(9);const t=new DataView(o.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(o[0]|=128),e.enqueue(o),e.enqueue(n)}))}})},e.createPacketDecoderStream=function(t,e){a||(a=new TextDecoder);const n=[];let r=0,s=-1,l=!1;return new TransformStream({transform(d,h){for(n.push(d);;){if(0===r){if(c(n)<1)break;const t=u(n,1);l=!(128&~t[0]),s=127&t[0],r=s<126?3:126===s?1:2}else if(1===r){if(c(n)<2)break;const t=u(n,2);s=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),r=3}else if(2===r){if(c(n)<8)break;const t=u(n,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){h.enqueue(i.ERROR_PACKET);break}s=o*Math.pow(2,32)+e.getUint32(4),r=3}else{if(c(n)<s)break;const t=u(n,s);h.enqueue((0,o.decodePacket)(l?t:a.decode(t),e)),r=0}if(0===s||s>t){h.enqueue(i.ERROR_PACKET);break}}}})};const r=n(2686);Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return r.encodePacket}});const o=n(32662);Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return o.decodePacket}});const i=n(62046),s=String.fromCharCode(30);e.encodePayload=(t,e)=>{const n=t.length,o=new Array(n);let i=0;t.forEach(((t,a)=>{(0,r.encodePacket)(t,!1,(t=>{o[a]=t,++i===n&&e(o.join(s))}))}))};let a;function c(t){return t.reduce(((t,e)=>t+e.length),0)}function u(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}e.decodePayload=(t,e)=>{const n=t.split(s),r=[];for(let t=0;t<n.length;t++){const i=(0,o.decodePacket)(n[t],e);if(r.push(i),"error"===i.type)break}return r},e.protocol=4},57743:function(t,e){"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=1&Math.floor(10*e)?t+n:t-n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},38007:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const o=n(76894),i=n(23776);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return i.Manager}});const s=n(56214);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}});const a=r(n(17833)).default("socket.io-client"),c={};function u(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=o.url(t,e.path||"/socket.io"),r=n.source,s=n.id,u=n.path,l=c[s]&&u in c[s].nsps;let d;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(a("ignoring socket cache for %s",r),d=new i.Manager(r,e)):(c[s]||(a("new io instance for %s",r),c[s]=new i.Manager(r,e)),d=c[s]),n.query&&!e.query&&(e.query=n.queryKey),d.socket(n.path,e)}e.io=u,e.connect=u,e.default=u,Object.assign(u,{Manager:i.Manager,Socket:s.Socket,io:u,connect:u});var l=n(84627);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return l.protocol}}),t.exports=u},23776:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4956),c=n(56214),u=i(n(84627)),l=n(25942),d=n(57743),h=n(27285),p=s(n(17833)).default("socket.io-client:manager");class f extends h.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new d.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||u;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(p("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=l.on(e,"open",(function(){n.onopen(),t&&t()})),o=e=>{p("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},i=l.on(e,"error",o);if(!1!==this._timeout){const t=this._timeout;p("connect attempt will timeout after %d",t);const n=this.setTimeoutFn((()=>{p("connect attempt timed out after %d",t),r(),o(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){p("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){p("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new c.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return void p("socket %s is still active, skipping close",t)}this._close()}_packet(t){p("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;n<e.length;n++)this.engine.write(e[n],t.options)}cleanup(){p("cleanup"),this.subs.forEach((t=>t())),this.subs.length=0,this.decoder.destroy()}_close(){p("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){p("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();p("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(p("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(p("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(p("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((()=>{this.clearTimeoutFn(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=f},25942:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},56214:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const o=n(84627),i=n(25942),s=n(27285),a=r(n(17833)).default("socket.io-client:socket"),c=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class u extends s.Emitter{constructor(t,e,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[i.on(t,"open",this.onopen.bind(this)),i.on(t,"packet",this.onpacket.bind(this)),i.on(t,"error",this.onerror.bind(this)),i.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(c.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:o.PacketType.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!r||!this.connected)?a("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const o=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&(a("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(e,1));a("event with ack id %d has timed out after %d ms",t,r),e.call(this,new Error("operation has timed out"))}),r),i=(...t)=>{this.io.clearTimeoutFn(o),e.apply(this,t)};i.withError=!0,this.acks[t]=i}emitWithAck(t,...e){return new Promise(((n,r)=>{const o=(t,e)=>t?r(t):n(e);o.withError=!0,e.push(o),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n!==this._queue[0])return;return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:o.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((t=>{if(!this.sendBuffer.some((e=>String(e.id)===t))){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}}))}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case o.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case o.PacketType.EVENT:case o.PacketType.BINARY_EVENT:this.onevent(t);break;case o.PacketType.ACK:case o.PacketType.BINARY_ACK:this.onack(t);break;case o.PacketType.DISCONNECT:this.ondisconnect();break;case o.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:o.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(delete this.acks[t.id],a("calling ack %s with %j",t.id,t.data),e.withError&&t.data.unshift(null),e.apply(this,t.data)):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:o.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let n=0;n<e.length;n++)if(t===e[n])return e.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const n of e)n.apply(this,t.data)}}}e.Socket=u},76894:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.url=void 0;const o=n(4956),i=r(n(17833)).default("socket.io-client:url");e.url=function(t,e="",n){let r=t;n=n||"undefined"!=typeof location&&location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t=void 0!==n?n.protocol+"//"+t:"https://"+t),i("parse %s",t),r=o.parse(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}},84926:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(79133);function o(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=o(t[r],e);return n}if("object"==typeof t&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=o(t[r],e));return n}return t}function i(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=i(t[n],e);else if("object"==typeof t)for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=i(t[n],e));return t}e.deconstructPacket=function(t){const e=[],n=t.data,r=t;return r.data=o(n,e),r.attachments=e.length,{packet:r,buffers:e}},e.reconstructPacket=function(t,e){return t.data=i(t.data,e),delete t.attachments,t}},84627:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(27285),o=n(84926),i=n(79133),s=(0,n(17833).default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(c=e.PacketType||(e.PacketType={}));function u(t){return"[object Object]"===Object.prototype.toString.call(t)}e.Encoder=class{constructor(t){this.replacer=t}encode(t){return s("encoding packet %j",t),t.type!==c.EVENT&&t.type!==c.ACK||!(0,i.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==c.BINARY_EVENT&&t.type!==c.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,o.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class l extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===c.BINARY_EVENT;n||e.type===c.BINARY_ACK?(e.type=n?c.EVENT:c.ACK,this.reconstructor=new d(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,i.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===c[n.type])throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(r,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(o)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!l.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return u(e);case c.DISCONNECT:return void 0===e;case c.CONNECT_ERROR:return"string"==typeof e||u(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===a.indexOf(e[0]));case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=l;class d{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,o.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},79133:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,o=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);function a(t){return n&&(t instanceof ArrayBuffer||r(t))||i&&t instanceof Blob||s&&t instanceof File}e.isBinary=a,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(t(e[n]))return!0;return!1}if(a(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return t(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return!0;return!1}},27285:function(t,e,n){"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:function(){return r}}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(57913),n(34821),n(60495),n(48835),n(68503),n(93198),n(2204),n(59868),n(57822)}();
//# sourceMappingURL=app.js.map