var E8=Object.defineProperty;var x8=(ht,un,Bs)=>un in ht?E8(ht,un,{enumerable:!0,configurable:!0,writable:!0,value:Bs}):ht[un]=Bs;var Lt=(ht,un,Bs)=>x8(ht,typeof un!="symbol"?un+"":un,Bs);try{let ht=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},un=new ht.Error().stack;un&&(ht._sentryDebugIds=ht._sentryDebugIds||{},ht._sentryDebugIds[un]="7357bf4d-9f58-4ccb-b869-08f4f3633dc5",ht._sentryDebugIdIdentifier="sentry-dbid-7357bf4d-9f58-4ccb-b869-08f4f3633dc5")}catch{}(function(){"use strict";{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"b95f85f89dfad0c24fd26543cb7b75d1aa89085e"}}const ht={mounted:"edmap-root-mounted",unmounted:"edmap-root-unmounted"};class un extends HTMLElement{constructor(){super()}connectedCallback(){window.dispatchEvent(new CustomEvent(ht.mounted)),console.log(ht.mounted)}disconnectedCallback(){window.dispatchEvent(new CustomEvent(ht.unmounted)),console.log(ht.unmounted)}}customElements.get("edmap-view-root")||customElements.define("edmap-view-root",un);function Bs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qc={exports:{}},Vo={},Yc={exports:{}},ke={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var rh;function g_(){if(rh)return ke;rh=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,T={};function k(R,z,ye){this.props=R,this.context=z,this.refs=T,this.updater=ye||E}k.prototype.isReactComponent={},k.prototype.setState=function(R,z){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,z,"setState")},k.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function M(){}M.prototype=k.prototype;function P(R,z,ye){this.props=R,this.context=z,this.refs=T,this.updater=ye||E}var $=P.prototype=new M;$.constructor=P,_($,k.prototype),$.isPureReactComponent=!0;var q=Array.isArray,W=Object.prototype.hasOwnProperty,j={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function Y(R,z,ye){var Se,Pe={},Oe=null,ze=null;if(z!=null)for(Se in z.ref!==void 0&&(ze=z.ref),z.key!==void 0&&(Oe=""+z.key),z)W.call(z,Se)&&!D.hasOwnProperty(Se)&&(Pe[Se]=z[Se]);var je=arguments.length-2;if(je===1)Pe.children=ye;else if(1<je){for(var qe=Array(je),vt=0;vt<je;vt++)qe[vt]=arguments[vt+2];Pe.children=qe}if(R&&R.defaultProps)for(Se in je=R.defaultProps,je)Pe[Se]===void 0&&(Pe[Se]=je[Se]);return{$$typeof:e,type:R,key:Oe,ref:ze,props:Pe,_owner:j.current}}function K(R,z){return{$$typeof:e,type:R.type,key:z,ref:R.ref,props:R.props,_owner:R._owner}}function V(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function se(R){var z={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(ye){return z[ye]})}var ie=/\/+/g;function ge(R,z){return typeof R=="object"&&R!==null&&R.key!=null?se(""+R.key):z.toString(36)}function Ce(R,z,ye,Se,Pe){var Oe=typeof R;(Oe==="undefined"||Oe==="boolean")&&(R=null);var ze=!1;if(R===null)ze=!0;else switch(Oe){case"string":case"number":ze=!0;break;case"object":switch(R.$$typeof){case e:case t:ze=!0}}if(ze)return ze=R,Pe=Pe(ze),R=Se===""?"."+ge(ze,0):Se,q(Pe)?(ye="",R!=null&&(ye=R.replace(ie,"$&/")+"/"),Ce(Pe,z,ye,"",function(vt){return vt})):Pe!=null&&(V(Pe)&&(Pe=K(Pe,ye+(!Pe.key||ze&&ze.key===Pe.key?"":(""+Pe.key).replace(ie,"$&/")+"/")+R)),z.push(Pe)),1;if(ze=0,Se=Se===""?".":Se+":",q(R))for(var je=0;je<R.length;je++){Oe=R[je];var qe=Se+ge(Oe,je);ze+=Ce(Oe,z,ye,qe,Pe)}else if(qe=w(R),typeof qe=="function")for(R=qe.call(R),je=0;!(Oe=R.next()).done;)Oe=Oe.value,qe=Se+ge(Oe,je++),ze+=Ce(Oe,z,ye,qe,Pe);else if(Oe==="object")throw z=String(R),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return ze}function He(R,z,ye){if(R==null)return R;var Se=[],Pe=0;return Ce(R,Se,"","",function(Oe){return z.call(ye,Oe,Pe++)}),Se}function le(R){if(R._status===-1){var z=R._result;z=z(),z.then(function(ye){(R._status===0||R._status===-1)&&(R._status=1,R._result=ye)},function(ye){(R._status===0||R._status===-1)&&(R._status=2,R._result=ye)}),R._status===-1&&(R._status=0,R._result=z)}if(R._status===1)return R._result.default;throw R._result}var Ee={current:null},B={transition:null},ne={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:B,ReactCurrentOwner:j};function J(){throw Error("act(...) is not supported in production builds of React.")}return ke.Children={map:He,forEach:function(R,z,ye){He(R,function(){z.apply(this,arguments)},ye)},count:function(R){var z=0;return He(R,function(){z++}),z},toArray:function(R){return He(R,function(z){return z})||[]},only:function(R){if(!V(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},ke.Component=k,ke.Fragment=n,ke.Profiler=i,ke.PureComponent=P,ke.StrictMode=s,ke.Suspense=f,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,ke.act=J,ke.cloneElement=function(R,z,ye){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var Se=_({},R.props),Pe=R.key,Oe=R.ref,ze=R._owner;if(z!=null){if(z.ref!==void 0&&(Oe=z.ref,ze=j.current),z.key!==void 0&&(Pe=""+z.key),R.type&&R.type.defaultProps)var je=R.type.defaultProps;for(qe in z)W.call(z,qe)&&!D.hasOwnProperty(qe)&&(Se[qe]=z[qe]===void 0&&je!==void 0?je[qe]:z[qe])}var qe=arguments.length-2;if(qe===1)Se.children=ye;else if(1<qe){je=Array(qe);for(var vt=0;vt<qe;vt++)je[vt]=arguments[vt+2];Se.children=je}return{$$typeof:e,type:R.type,key:Pe,ref:Oe,props:Se,_owner:ze}},ke.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:l,_context:R},R.Consumer=R},ke.createElement=Y,ke.createFactory=function(R){var z=Y.bind(null,R);return z.type=R,z},ke.createRef=function(){return{current:null}},ke.forwardRef=function(R){return{$$typeof:d,render:R}},ke.isValidElement=V,ke.lazy=function(R){return{$$typeof:y,_payload:{_status:-1,_result:R},_init:le}},ke.memo=function(R,z){return{$$typeof:m,type:R,compare:z===void 0?null:z}},ke.startTransition=function(R){var z=B.transition;B.transition={};try{R()}finally{B.transition=z}},ke.unstable_act=J,ke.useCallback=function(R,z){return Ee.current.useCallback(R,z)},ke.useContext=function(R){return Ee.current.useContext(R)},ke.useDebugValue=function(){},ke.useDeferredValue=function(R){return Ee.current.useDeferredValue(R)},ke.useEffect=function(R,z){return Ee.current.useEffect(R,z)},ke.useId=function(){return Ee.current.useId()},ke.useImperativeHandle=function(R,z,ye){return Ee.current.useImperativeHandle(R,z,ye)},ke.useInsertionEffect=function(R,z){return Ee.current.useInsertionEffect(R,z)},ke.useLayoutEffect=function(R,z){return Ee.current.useLayoutEffect(R,z)},ke.useMemo=function(R,z){return Ee.current.useMemo(R,z)},ke.useReducer=function(R,z,ye){return Ee.current.useReducer(R,z,ye)},ke.useRef=function(R){return Ee.current.useRef(R)},ke.useState=function(R){return Ee.current.useState(R)},ke.useSyncExternalStore=function(R,z,ye){return Ee.current.useSyncExternalStore(R,z,ye)},ke.useTransition=function(){return Ee.current.useTransition()},ke.version="18.3.1",ke}var sh;function Kc(){return sh||(sh=1,Yc.exports=g_()),Yc.exports}/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var oh;function y_(){if(oh)return Vo;oh=1;var e=Kc(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,f,m){var y,v={},w=null,E=null;m!==void 0&&(w=""+m),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(E=f.ref);for(y in f)s.call(f,y)&&!l.hasOwnProperty(y)&&(v[y]=f[y]);if(d&&d.defaultProps)for(y in f=d.defaultProps,f)v[y]===void 0&&(v[y]=f[y]);return{$$typeof:t,type:d,key:w,ref:E,props:v,_owner:i.current}}return Vo.Fragment=n,Vo.jsx=c,Vo.jsxs=c,Vo}var ih;function v_(){return ih||(ih=1,Qc.exports=y_()),Qc.exports}var g=v_(),b=Kc();const xt=Bs(b);var ca={},Xc={exports:{}},Ut={},Jc={exports:{}},Zc={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ah;function S_(){return ah||(ah=1,function(e){function t(B,ne){var J=B.length;B.push(ne);e:for(;0<J;){var R=J-1>>>1,z=B[R];if(0<i(z,ne))B[R]=ne,B[J]=z,J=R;else break e}}function n(B){return B.length===0?null:B[0]}function s(B){if(B.length===0)return null;var ne=B[0],J=B.pop();if(J!==ne){B[0]=J;e:for(var R=0,z=B.length,ye=z>>>1;R<ye;){var Se=2*(R+1)-1,Pe=B[Se],Oe=Se+1,ze=B[Oe];if(0>i(Pe,J))Oe<z&&0>i(ze,Pe)?(B[R]=ze,B[Oe]=J,R=Oe):(B[R]=Pe,B[Se]=J,R=Se);else if(Oe<z&&0>i(ze,J))B[R]=ze,B[Oe]=J,R=Oe;else break e}}return ne}function i(B,ne){var J=B.sortIndex-ne.sortIndex;return J!==0?J:B.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],m=[],y=1,v=null,w=3,E=!1,_=!1,T=!1,k=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(B){for(var ne=n(m);ne!==null;){if(ne.callback===null)s(m);else if(ne.startTime<=B)s(m),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=n(m)}}function q(B){if(T=!1,$(B),!_)if(n(f)!==null)_=!0,le(W);else{var ne=n(m);ne!==null&&Ee(q,ne.startTime-B)}}function W(B,ne){_=!1,T&&(T=!1,M(Y),Y=-1),E=!0;var J=w;try{for($(ne),v=n(f);v!==null&&(!(v.expirationTime>ne)||B&&!se());){var R=v.callback;if(typeof R=="function"){v.callback=null,w=v.priorityLevel;var z=R(v.expirationTime<=ne);ne=e.unstable_now(),typeof z=="function"?v.callback=z:v===n(f)&&s(f),$(ne)}else s(f);v=n(f)}if(v!==null)var ye=!0;else{var Se=n(m);Se!==null&&Ee(q,Se.startTime-ne),ye=!1}return ye}finally{v=null,w=J,E=!1}}var j=!1,D=null,Y=-1,K=5,V=-1;function se(){return!(e.unstable_now()-V<K)}function ie(){if(D!==null){var B=e.unstable_now();V=B;var ne=!0;try{ne=D(!0,B)}finally{ne?ge():(j=!1,D=null)}}else j=!1}var ge;if(typeof P=="function")ge=function(){P(ie)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,He=Ce.port2;Ce.port1.onmessage=ie,ge=function(){He.postMessage(null)}}else ge=function(){k(ie,0)};function le(B){D=B,j||(j=!0,ge())}function Ee(B,ne){Y=k(function(){B(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_continueExecution=function(){_||E||(_=!0,le(W))},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(B){switch(w){case 1:case 2:case 3:var ne=3;break;default:ne=w}var J=w;w=ne;try{return B()}finally{w=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(B,ne){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var J=w;w=B;try{return ne()}finally{w=J}},e.unstable_scheduleCallback=function(B,ne,J){var R=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?R+J:R):J=R,B){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=J+z,B={id:y++,callback:ne,priorityLevel:B,startTime:J,expirationTime:z,sortIndex:-1},J>R?(B.sortIndex=J,t(m,B),n(f)===null&&B===n(m)&&(T?(M(Y),Y=-1):T=!0,Ee(q,J-R))):(B.sortIndex=z,t(f,B),_||E||(_=!0,le(W))),B},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(B){var ne=w;return function(){var J=w;w=ne;try{return B.apply(this,arguments)}finally{w=J}}}}(Zc)),Zc}var lh;function w_(){return lh||(lh=1,Jc.exports=S_()),Jc.exports}/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ch;function __(){if(ch)return Ut;ch=1;var e=Kc(),t=w_();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function l(r,o){c(r,o),c(r+"Capture",o)}function c(r,o){for(i[r]=o,r=0;r<o.length;r++)s.add(o[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function w(r){return f.call(v,r)?!0:f.call(y,r)?!1:m.test(r)?v[r]=!0:(y[r]=!0,!1)}function E(r,o,a,u){if(a!==null&&a.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function _(r,o,a,u){if(o===null||typeof o>"u"||E(r,o,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function T(r,o,a,u,p,h,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=r,this.type=o,this.sanitizeURL=h,this.removeEmptyString=S}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){k[r]=new T(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];k[o]=new T(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){k[r]=new T(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){k[r]=new T(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){k[r]=new T(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){k[r]=new T(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){k[r]=new T(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){k[r]=new T(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){k[r]=new T(r,5,!1,r.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function P(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(M,P);k[o]=new T(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(M,P);k[o]=new T(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(M,P);k[o]=new T(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){k[r]=new T(r,1,!1,r.toLowerCase(),null,!1,!1)}),k.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){k[r]=new T(r,1,!1,r.toLowerCase(),null,!0,!0)});function $(r,o,a,u){var p=k.hasOwnProperty(o)?k[o]:null;(p!==null?p.type!==0:u||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,a,p,u)&&(a=null),u||p===null?w(o)&&(a===null?r.removeAttribute(o):r.setAttribute(o,""+a)):p.mustUseProperty?r[p.propertyName]=a===null?p.type===3?!1:"":a:(o=p.attributeName,u=p.attributeNamespace,a===null?r.removeAttribute(o):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,u?r.setAttributeNS(u,o,a):r.setAttribute(o,a))))}var q=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),j=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),He=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),B=Symbol.iterator;function ne(r){return r===null||typeof r!="object"?null:(r=B&&r[B]||r["@@iterator"],typeof r=="function"?r:null)}var J=Object.assign,R;function z(r){if(R===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);R=o&&o[1]||""}return`
`+R+r}var ye=!1;function Se(r,o){if(!r||ye)return"";ye=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(L){var u=L}Reflect.construct(r,[],o)}else{try{o.call()}catch(L){u=L}r.call(o.prototype)}else{try{throw Error()}catch(L){u=L}r()}}catch(L){if(L&&u&&typeof L.stack=="string"){for(var p=L.stack.split(`
`),h=u.stack.split(`
`),S=p.length-1,x=h.length-1;1<=S&&0<=x&&p[S]!==h[x];)x--;for(;1<=S&&0<=x;S--,x--)if(p[S]!==h[x]){if(S!==1||x!==1)do if(S--,x--,0>x||p[S]!==h[x]){var I=`
`+p[S].replace(" at new "," at ");return r.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",r.displayName)),I}while(1<=S&&0<=x);break}}}finally{ye=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?z(r):""}function Pe(r){switch(r.tag){case 5:return z(r.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return r=Se(r.type,!1),r;case 11:return r=Se(r.type.render,!1),r;case 1:return r=Se(r.type,!0),r;default:return""}}function Oe(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case D:return"Fragment";case j:return"Portal";case K:return"Profiler";case Y:return"StrictMode";case ge:return"Suspense";case Ce:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case se:return(r.displayName||"Context")+".Consumer";case V:return(r._context.displayName||"Context")+".Provider";case ie:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case He:return o=r.displayName||null,o!==null?o:Oe(r.type)||"Memo";case le:o=r._payload,r=r._init;try{return Oe(r(o))}catch{}}return null}function ze(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(o);case 8:return o===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function je(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function qe(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function vt(r){var o=qe(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),u=""+r[o];if(!r.hasOwnProperty(o)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,h=a.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return p.call(this)},set:function(S){u=""+S,h.call(this,S)}}),Object.defineProperty(r,o,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(S){u=""+S},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function xs(r){r._valueTracker||(r._valueTracker=vt(r))}function Fl(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var a=o.getValue(),u="";return r&&(u=qe(r)?r.checked?"true":"false":r.value),r=u,r!==a?(o.setValue(r),!0):!1}function wo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Cn(r,o){var a=o.checked;return J({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Hn(r,o){var a=o.defaultValue==null?"":o.defaultValue,u=o.checked!=null?o.checked:o.defaultChecked;a=je(o.value!=null?o.value:a),r._wrapperState={initialChecked:u,initialValue:a,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function _o(r,o){o=o.checked,o!=null&&$(r,"checked",o,!1)}function Ts(r,o){_o(r,o);var a=je(o.value),u=o.type;if(a!=null)u==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(u==="submit"||u==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?Is(r,o.type,a):o.hasOwnProperty("defaultValue")&&Is(r,o.type,je(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function ks(r,o,a){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var u=o.type;if(!(u!=="submit"&&u!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,a||o===r.value||(r.value=o),r.defaultValue=o}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function Is(r,o,a){(o!=="number"||wo(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var Re=Array.isArray;function St(r,o,a,u){if(r=r.options,o){o={};for(var p=0;p<a.length;p++)o["$"+a[p]]=!0;for(a=0;a<r.length;a++)p=o.hasOwnProperty("$"+r[a].value),r[a].selected!==p&&(r[a].selected=p),p&&u&&(r[a].defaultSelected=!0)}else{for(a=""+je(a),o=null,p=0;p<r.length;p++){if(r[p].value===a){r[p].selected=!0,u&&(r[p].defaultSelected=!0);return}o!==null||r[p].disabled||(o=r[p])}o!==null&&(o.selected=!0)}}function be(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return J({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Ye(r,o){var a=o.value;if(a==null){if(a=o.children,o=o.defaultValue,a!=null){if(o!=null)throw Error(n(92));if(Re(a)){if(1<a.length)throw Error(n(93));a=a[0]}o=a}o==null&&(o=""),a=o}r._wrapperState={initialValue:je(a)}}function Le(r,o){var a=je(o.value),u=je(o.defaultValue);a!=null&&(a=""+a,a!==r.value&&(r.value=a),o.defaultValue==null&&r.defaultValue!==a&&(r.defaultValue=a)),u!=null&&(r.defaultValue=""+u)}function Wn(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function $l(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hf(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?$l(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Bl,R1=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,a,u,p){MSApp.execUnsafeLocalFunction(function(){return r(o,a,u,p)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(Bl=Bl||document.createElement("div"),Bl.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Bl.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function ki(r,o){if(o){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=o;return}}r.textContent=o}var Ii={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},I5=["Webkit","ms","Moz","O"];Object.keys(Ii).forEach(function(r){I5.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Ii[o]=Ii[r]})});function A1(r,o,a){return o==null||typeof o=="boolean"||o===""?"":a||typeof o!="number"||o===0||Ii.hasOwnProperty(r)&&Ii[r]?(""+o).trim():o+"px"}function P1(r,o){r=r.style;for(var a in o)if(o.hasOwnProperty(a)){var u=a.indexOf("--")===0,p=A1(a,o[a],u);a==="float"&&(a="cssFloat"),u?r.setProperty(a,p):r[a]=p}}var C5=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mf(r,o){if(o){if(C5[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function gf(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yf=null;function vf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Sf=null,Eo=null,xo=null;function O1(r){if(r=Qi(r)){if(typeof Sf!="function")throw Error(n(280));var o=r.stateNode;o&&(o=cc(o),Sf(r.stateNode,r.type,o))}}function N1(r){Eo?xo?xo.push(r):xo=[r]:Eo=r}function M1(){if(Eo){var r=Eo,o=xo;if(xo=Eo=null,O1(r),o)for(r=0;r<o.length;r++)O1(o[r])}}function L1(r,o){return r(o)}function j1(){}var wf=!1;function D1(r,o,a){if(wf)return r(o,a);wf=!0;try{return L1(r,o,a)}finally{wf=!1,(Eo!==null||xo!==null)&&(j1(),M1())}}function Ci(r,o){var a=r.stateNode;if(a===null)return null;var u=cc(a);if(u===null)return null;a=u[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(r=r.type,u=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!u;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(n(231,o,typeof a));return a}var _f=!1;if(d)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){_f=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{_f=!1}function b5(r,o,a,u,p,h,S,x,I){var L=Array.prototype.slice.call(arguments,3);try{o.apply(a,L)}catch(H){this.onError(H)}}var Ri=!1,zl=null,Ul=!1,Ef=null,R5={onError:function(r){Ri=!0,zl=r}};function A5(r,o,a,u,p,h,S,x,I){Ri=!1,zl=null,b5.apply(R5,arguments)}function P5(r,o,a,u,p,h,S,x,I){if(A5.apply(this,arguments),Ri){if(Ri){var L=zl;Ri=!1,zl=null}else throw Error(n(198));Ul||(Ul=!0,Ef=L)}}function Cs(r){var o=r,a=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,o.flags&4098&&(a=o.return),r=o.return;while(r)}return o.tag===3?a:null}function F1(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function $1(r){if(Cs(r)!==r)throw Error(n(188))}function O5(r){var o=r.alternate;if(!o){if(o=Cs(r),o===null)throw Error(n(188));return o!==r?null:r}for(var a=r,u=o;;){var p=a.return;if(p===null)break;var h=p.alternate;if(h===null){if(u=p.return,u!==null){a=u;continue}break}if(p.child===h.child){for(h=p.child;h;){if(h===a)return $1(p),r;if(h===u)return $1(p),o;h=h.sibling}throw Error(n(188))}if(a.return!==u.return)a=p,u=h;else{for(var S=!1,x=p.child;x;){if(x===a){S=!0,a=p,u=h;break}if(x===u){S=!0,u=p,a=h;break}x=x.sibling}if(!S){for(x=h.child;x;){if(x===a){S=!0,a=h,u=p;break}if(x===u){S=!0,u=h,a=p;break}x=x.sibling}if(!S)throw Error(n(189))}}if(a.alternate!==u)throw Error(n(190))}if(a.tag!==3)throw Error(n(188));return a.stateNode.current===a?r:o}function B1(r){return r=O5(r),r!==null?z1(r):null}function z1(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=z1(r);if(o!==null)return o;r=r.sibling}return null}var U1=t.unstable_scheduleCallback,H1=t.unstable_cancelCallback,N5=t.unstable_shouldYield,M5=t.unstable_requestPaint,it=t.unstable_now,L5=t.unstable_getCurrentPriorityLevel,xf=t.unstable_ImmediatePriority,W1=t.unstable_UserBlockingPriority,Hl=t.unstable_NormalPriority,j5=t.unstable_LowPriority,q1=t.unstable_IdlePriority,Wl=null,qn=null;function D5(r){if(qn&&typeof qn.onCommitFiberRoot=="function")try{qn.onCommitFiberRoot(Wl,r,void 0,(r.current.flags&128)===128)}catch{}}var bn=Math.clz32?Math.clz32:B5,F5=Math.log,$5=Math.LN2;function B5(r){return r>>>=0,r===0?32:31-(F5(r)/$5|0)|0}var ql=64,Vl=4194304;function Ai(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Gl(r,o){var a=r.pendingLanes;if(a===0)return 0;var u=0,p=r.suspendedLanes,h=r.pingedLanes,S=a&268435455;if(S!==0){var x=S&~p;x!==0?u=Ai(x):(h&=S,h!==0&&(u=Ai(h)))}else S=a&~p,S!==0?u=Ai(S):h!==0&&(u=Ai(h));if(u===0)return 0;if(o!==0&&o!==u&&!(o&p)&&(p=u&-u,h=o&-o,p>=h||p===16&&(h&4194240)!==0))return o;if(u&4&&(u|=a&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=u;0<o;)a=31-bn(o),p=1<<a,u|=r[a],o&=~p;return u}function z5(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U5(r,o){for(var a=r.suspendedLanes,u=r.pingedLanes,p=r.expirationTimes,h=r.pendingLanes;0<h;){var S=31-bn(h),x=1<<S,I=p[S];I===-1?(!(x&a)||x&u)&&(p[S]=z5(x,o)):I<=o&&(r.expiredLanes|=x),h&=~x}}function Tf(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function V1(){var r=ql;return ql<<=1,!(ql&4194240)&&(ql=64),r}function kf(r){for(var o=[],a=0;31>a;a++)o.push(r);return o}function Pi(r,o,a){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-bn(o),r[o]=a}function H5(r,o){var a=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var u=r.eventTimes;for(r=r.expirationTimes;0<a;){var p=31-bn(a),h=1<<p;o[p]=0,u[p]=-1,r[p]=-1,a&=~h}}function If(r,o){var a=r.entangledLanes|=o;for(r=r.entanglements;a;){var u=31-bn(a),p=1<<u;p&o|r[u]&o&&(r[u]|=o),a&=~p}}var Ue=0;function G1(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var Q1,Cf,Y1,K1,X1,bf=!1,Ql=[],Dr=null,Fr=null,$r=null,Oi=new Map,Ni=new Map,Br=[],W5="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function J1(r,o){switch(r){case"focusin":case"focusout":Dr=null;break;case"dragenter":case"dragleave":Fr=null;break;case"mouseover":case"mouseout":$r=null;break;case"pointerover":case"pointerout":Oi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ni.delete(o.pointerId)}}function Mi(r,o,a,u,p,h){return r===null||r.nativeEvent!==h?(r={blockedOn:o,domEventName:a,eventSystemFlags:u,nativeEvent:h,targetContainers:[p]},o!==null&&(o=Qi(o),o!==null&&Cf(o)),r):(r.eventSystemFlags|=u,o=r.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),r)}function q5(r,o,a,u,p){switch(o){case"focusin":return Dr=Mi(Dr,r,o,a,u,p),!0;case"dragenter":return Fr=Mi(Fr,r,o,a,u,p),!0;case"mouseover":return $r=Mi($r,r,o,a,u,p),!0;case"pointerover":var h=p.pointerId;return Oi.set(h,Mi(Oi.get(h)||null,r,o,a,u,p)),!0;case"gotpointercapture":return h=p.pointerId,Ni.set(h,Mi(Ni.get(h)||null,r,o,a,u,p)),!0}return!1}function Z1(r){var o=bs(r.target);if(o!==null){var a=Cs(o);if(a!==null){if(o=a.tag,o===13){if(o=F1(a),o!==null){r.blockedOn=o,X1(r.priority,function(){Y1(a)});return}}else if(o===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Yl(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var a=Af(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(a===null){a=r.nativeEvent;var u=new a.constructor(a.type,a);yf=u,a.target.dispatchEvent(u),yf=null}else return o=Qi(a),o!==null&&Cf(o),r.blockedOn=a,!1;o.shift()}return!0}function eS(r,o,a){Yl(r)&&a.delete(o)}function V5(){bf=!1,Dr!==null&&Yl(Dr)&&(Dr=null),Fr!==null&&Yl(Fr)&&(Fr=null),$r!==null&&Yl($r)&&($r=null),Oi.forEach(eS),Ni.forEach(eS)}function Li(r,o){r.blockedOn===o&&(r.blockedOn=null,bf||(bf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,V5)))}function ji(r){function o(p){return Li(p,r)}if(0<Ql.length){Li(Ql[0],r);for(var a=1;a<Ql.length;a++){var u=Ql[a];u.blockedOn===r&&(u.blockedOn=null)}}for(Dr!==null&&Li(Dr,r),Fr!==null&&Li(Fr,r),$r!==null&&Li($r,r),Oi.forEach(o),Ni.forEach(o),a=0;a<Br.length;a++)u=Br[a],u.blockedOn===r&&(u.blockedOn=null);for(;0<Br.length&&(a=Br[0],a.blockedOn===null);)Z1(a),a.blockedOn===null&&Br.shift()}var To=q.ReactCurrentBatchConfig,Kl=!0;function G5(r,o,a,u){var p=Ue,h=To.transition;To.transition=null;try{Ue=1,Rf(r,o,a,u)}finally{Ue=p,To.transition=h}}function Q5(r,o,a,u){var p=Ue,h=To.transition;To.transition=null;try{Ue=4,Rf(r,o,a,u)}finally{Ue=p,To.transition=h}}function Rf(r,o,a,u){if(Kl){var p=Af(r,o,a,u);if(p===null)Gf(r,o,u,Xl,a),J1(r,u);else if(q5(p,r,o,a,u))u.stopPropagation();else if(J1(r,u),o&4&&-1<W5.indexOf(r)){for(;p!==null;){var h=Qi(p);if(h!==null&&Q1(h),h=Af(r,o,a,u),h===null&&Gf(r,o,u,Xl,a),h===p)break;p=h}p!==null&&u.stopPropagation()}else Gf(r,o,u,null,a)}}var Xl=null;function Af(r,o,a,u){if(Xl=null,r=vf(u),r=bs(r),r!==null)if(o=Cs(r),o===null)r=null;else if(a=o.tag,a===13){if(r=F1(o),r!==null)return r;r=null}else if(a===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return Xl=r,null}function tS(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(L5()){case xf:return 1;case W1:return 4;case Hl:case j5:return 16;case q1:return 536870912;default:return 16}default:return 16}}var zr=null,Pf=null,Jl=null;function nS(){if(Jl)return Jl;var r,o=Pf,a=o.length,u,p="value"in zr?zr.value:zr.textContent,h=p.length;for(r=0;r<a&&o[r]===p[r];r++);var S=a-r;for(u=1;u<=S&&o[a-u]===p[h-u];u++);return Jl=p.slice(r,1<u?1-u:void 0)}function Zl(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function ec(){return!0}function rS(){return!1}function on(r){function o(a,u,p,h,S){this._reactName=a,this._targetInst=p,this.type=u,this.nativeEvent=h,this.target=S,this.currentTarget=null;for(var x in r)r.hasOwnProperty(x)&&(a=r[x],this[x]=a?a(h):h[x]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ec:rS,this.isPropagationStopped=rS,this}return J(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ec)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ec)},persist:function(){},isPersistent:ec}),o}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Of=on(ko),Di=J({},ko,{view:0,detail:0}),Y5=on(Di),Nf,Mf,Fi,tc=J({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jf,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Fi&&(Fi&&r.type==="mousemove"?(Nf=r.screenX-Fi.screenX,Mf=r.screenY-Fi.screenY):Mf=Nf=0,Fi=r),Nf)},movementY:function(r){return"movementY"in r?r.movementY:Mf}}),sS=on(tc),K5=J({},tc,{dataTransfer:0}),X5=on(K5),J5=J({},Di,{relatedTarget:0}),Lf=on(J5),Z5=J({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),eD=on(Z5),tD=J({},ko,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),nD=on(tD),rD=J({},ko,{data:0}),oS=on(rD),sD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},iD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aD(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=iD[r])?!!o[r]:!1}function jf(){return aD}var lD=J({},Di,{key:function(r){if(r.key){var o=sD[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Zl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?oD[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jf,charCode:function(r){return r.type==="keypress"?Zl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Zl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),cD=on(lD),uD=J({},tc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),iS=on(uD),dD=J({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jf}),fD=on(dD),pD=J({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),hD=on(pD),mD=J({},tc,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),gD=on(mD),yD=[9,13,27,32],Df=d&&"CompositionEvent"in window,$i=null;d&&"documentMode"in document&&($i=document.documentMode);var vD=d&&"TextEvent"in window&&!$i,aS=d&&(!Df||$i&&8<$i&&11>=$i),lS=" ",cS=!1;function uS(r,o){switch(r){case"keyup":return yD.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dS(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Io=!1;function SD(r,o){switch(r){case"compositionend":return dS(o);case"keypress":return o.which!==32?null:(cS=!0,lS);case"textInput":return r=o.data,r===lS&&cS?null:r;default:return null}}function wD(r,o){if(Io)return r==="compositionend"||!Df&&uS(r,o)?(r=nS(),Jl=Pf=zr=null,Io=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return aS&&o.locale!=="ko"?null:o.data;default:return null}}var _D={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fS(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!_D[r.type]:o==="textarea"}function pS(r,o,a,u){N1(u),o=ic(o,"onChange"),0<o.length&&(a=new Of("onChange","change",null,a,u),r.push({event:a,listeners:o}))}var Bi=null,zi=null;function ED(r){PS(r,0)}function nc(r){var o=Po(r);if(Fl(o))return r}function xD(r,o){if(r==="change")return o}var hS=!1;if(d){var Ff;if(d){var $f="oninput"in document;if(!$f){var mS=document.createElement("div");mS.setAttribute("oninput","return;"),$f=typeof mS.oninput=="function"}Ff=$f}else Ff=!1;hS=Ff&&(!document.documentMode||9<document.documentMode)}function gS(){Bi&&(Bi.detachEvent("onpropertychange",yS),zi=Bi=null)}function yS(r){if(r.propertyName==="value"&&nc(zi)){var o=[];pS(o,zi,r,vf(r)),D1(ED,o)}}function TD(r,o,a){r==="focusin"?(gS(),Bi=o,zi=a,Bi.attachEvent("onpropertychange",yS)):r==="focusout"&&gS()}function kD(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return nc(zi)}function ID(r,o){if(r==="click")return nc(o)}function CD(r,o){if(r==="input"||r==="change")return nc(o)}function bD(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Rn=typeof Object.is=="function"?Object.is:bD;function Ui(r,o){if(Rn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var a=Object.keys(r),u=Object.keys(o);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var p=a[u];if(!f.call(o,p)||!Rn(r[p],o[p]))return!1}return!0}function vS(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function SS(r,o){var a=vS(r);r=0;for(var u;a;){if(a.nodeType===3){if(u=r+a.textContent.length,r<=o&&u>=o)return{node:a,offset:o-r};r=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vS(a)}}function wS(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?wS(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function _S(){for(var r=window,o=wo();o instanceof r.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)r=o.contentWindow;else break;o=wo(r.document)}return o}function Bf(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function RD(r){var o=_S(),a=r.focusedElem,u=r.selectionRange;if(o!==a&&a&&a.ownerDocument&&wS(a.ownerDocument.documentElement,a)){if(u!==null&&Bf(a)){if(o=u.start,r=u.end,r===void 0&&(r=o),"selectionStart"in a)a.selectionStart=o,a.selectionEnd=Math.min(r,a.value.length);else if(r=(o=a.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var p=a.textContent.length,h=Math.min(u.start,p);u=u.end===void 0?h:Math.min(u.end,p),!r.extend&&h>u&&(p=u,u=h,h=p),p=SS(a,h);var S=SS(a,u);p&&S&&(r.rangeCount!==1||r.anchorNode!==p.node||r.anchorOffset!==p.offset||r.focusNode!==S.node||r.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(p.node,p.offset),r.removeAllRanges(),h>u?(r.addRange(o),r.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),r.addRange(o)))}}for(o=[],r=a;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<o.length;a++)r=o[a],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var AD=d&&"documentMode"in document&&11>=document.documentMode,Co=null,zf=null,Hi=null,Uf=!1;function ES(r,o,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Uf||Co==null||Co!==wo(u)||(u=Co,"selectionStart"in u&&Bf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Hi&&Ui(Hi,u)||(Hi=u,u=ic(zf,"onSelect"),0<u.length&&(o=new Of("onSelect","select",null,o,a),r.push({event:o,listeners:u}),o.target=Co)))}function rc(r,o){var a={};return a[r.toLowerCase()]=o.toLowerCase(),a["Webkit"+r]="webkit"+o,a["Moz"+r]="moz"+o,a}var bo={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},Hf={},xS={};d&&(xS=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function sc(r){if(Hf[r])return Hf[r];if(!bo[r])return r;var o=bo[r],a;for(a in o)if(o.hasOwnProperty(a)&&a in xS)return Hf[r]=o[a];return r}var TS=sc("animationend"),kS=sc("animationiteration"),IS=sc("animationstart"),CS=sc("transitionend"),bS=new Map,RS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ur(r,o){bS.set(r,o),l(o,[r])}for(var Wf=0;Wf<RS.length;Wf++){var qf=RS[Wf],PD=qf.toLowerCase(),OD=qf[0].toUpperCase()+qf.slice(1);Ur(PD,"on"+OD)}Ur(TS,"onAnimationEnd"),Ur(kS,"onAnimationIteration"),Ur(IS,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur(CS,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ND=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wi));function AS(r,o,a){var u=r.type||"unknown-event";r.currentTarget=a,P5(u,o,void 0,r),r.currentTarget=null}function PS(r,o){o=(o&4)!==0;for(var a=0;a<r.length;a++){var u=r[a],p=u.event;u=u.listeners;e:{var h=void 0;if(o)for(var S=u.length-1;0<=S;S--){var x=u[S],I=x.instance,L=x.currentTarget;if(x=x.listener,I!==h&&p.isPropagationStopped())break e;AS(p,x,L),h=I}else for(S=0;S<u.length;S++){if(x=u[S],I=x.instance,L=x.currentTarget,x=x.listener,I!==h&&p.isPropagationStopped())break e;AS(p,x,L),h=I}}}if(Ul)throw r=Ef,Ul=!1,Ef=null,r}function Xe(r,o){var a=o[Zf];a===void 0&&(a=o[Zf]=new Set);var u=r+"__bubble";a.has(u)||(OS(o,r,2,!1),a.add(u))}function Vf(r,o,a){var u=0;o&&(u|=4),OS(a,r,u,o)}var oc="_reactListening"+Math.random().toString(36).slice(2);function qi(r){if(!r[oc]){r[oc]=!0,s.forEach(function(a){a!=="selectionchange"&&(ND.has(a)||Vf(a,!1,r),Vf(a,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[oc]||(o[oc]=!0,Vf("selectionchange",!1,o))}}function OS(r,o,a,u){switch(tS(o)){case 1:var p=G5;break;case 4:p=Q5;break;default:p=Rf}a=p.bind(null,o,a,r),p=void 0,!_f||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),u?p!==void 0?r.addEventListener(o,a,{capture:!0,passive:p}):r.addEventListener(o,a,!0):p!==void 0?r.addEventListener(o,a,{passive:p}):r.addEventListener(o,a,!1)}function Gf(r,o,a,u,p){var h=u;if(!(o&1)&&!(o&2)&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var x=u.stateNode.containerInfo;if(x===p||x.nodeType===8&&x.parentNode===p)break;if(S===4)for(S=u.return;S!==null;){var I=S.tag;if((I===3||I===4)&&(I=S.stateNode.containerInfo,I===p||I.nodeType===8&&I.parentNode===p))return;S=S.return}for(;x!==null;){if(S=bs(x),S===null)return;if(I=S.tag,I===5||I===6){u=h=S;continue e}x=x.parentNode}}u=u.return}D1(function(){var L=h,H=vf(a),G=[];e:{var U=bS.get(r);if(U!==void 0){var ee=Of,re=r;switch(r){case"keypress":if(Zl(a)===0)break e;case"keydown":case"keyup":ee=cD;break;case"focusin":re="focus",ee=Lf;break;case"focusout":re="blur",ee=Lf;break;case"beforeblur":case"afterblur":ee=Lf;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=sS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=X5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=fD;break;case TS:case kS:case IS:ee=eD;break;case CS:ee=hD;break;case"scroll":ee=Y5;break;case"wheel":ee=gD;break;case"copy":case"cut":case"paste":ee=nD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=iS}var oe=(o&4)!==0,at=!oe&&r==="scroll",A=oe?U!==null?U+"Capture":null:U;oe=[];for(var C=L,O;C!==null;){O=C;var Q=O.stateNode;if(O.tag===5&&Q!==null&&(O=Q,A!==null&&(Q=Ci(C,A),Q!=null&&oe.push(Vi(C,Q,O)))),at)break;C=C.return}0<oe.length&&(U=new ee(U,re,null,a,H),G.push({event:U,listeners:oe}))}}if(!(o&7)){e:{if(U=r==="mouseover"||r==="pointerover",ee=r==="mouseout"||r==="pointerout",U&&a!==yf&&(re=a.relatedTarget||a.fromElement)&&(bs(re)||re[cr]))break e;if((ee||U)&&(U=H.window===H?H:(U=H.ownerDocument)?U.defaultView||U.parentWindow:window,ee?(re=a.relatedTarget||a.toElement,ee=L,re=re?bs(re):null,re!==null&&(at=Cs(re),re!==at||re.tag!==5&&re.tag!==6)&&(re=null)):(ee=null,re=L),ee!==re)){if(oe=sS,Q="onMouseLeave",A="onMouseEnter",C="mouse",(r==="pointerout"||r==="pointerover")&&(oe=iS,Q="onPointerLeave",A="onPointerEnter",C="pointer"),at=ee==null?U:Po(ee),O=re==null?U:Po(re),U=new oe(Q,C+"leave",ee,a,H),U.target=at,U.relatedTarget=O,Q=null,bs(H)===L&&(oe=new oe(A,C+"enter",re,a,H),oe.target=O,oe.relatedTarget=at,Q=oe),at=Q,ee&&re)t:{for(oe=ee,A=re,C=0,O=oe;O;O=Ro(O))C++;for(O=0,Q=A;Q;Q=Ro(Q))O++;for(;0<C-O;)oe=Ro(oe),C--;for(;0<O-C;)A=Ro(A),O--;for(;C--;){if(oe===A||A!==null&&oe===A.alternate)break t;oe=Ro(oe),A=Ro(A)}oe=null}else oe=null;ee!==null&&NS(G,U,ee,oe,!1),re!==null&&at!==null&&NS(G,at,re,oe,!0)}}e:{if(U=L?Po(L):window,ee=U.nodeName&&U.nodeName.toLowerCase(),ee==="select"||ee==="input"&&U.type==="file")var ae=xD;else if(fS(U))if(hS)ae=CD;else{ae=kD;var ce=TD}else(ee=U.nodeName)&&ee.toLowerCase()==="input"&&(U.type==="checkbox"||U.type==="radio")&&(ae=ID);if(ae&&(ae=ae(r,L))){pS(G,ae,a,H);break e}ce&&ce(r,U,L),r==="focusout"&&(ce=U._wrapperState)&&ce.controlled&&U.type==="number"&&Is(U,"number",U.value)}switch(ce=L?Po(L):window,r){case"focusin":(fS(ce)||ce.contentEditable==="true")&&(Co=ce,zf=L,Hi=null);break;case"focusout":Hi=zf=Co=null;break;case"mousedown":Uf=!0;break;case"contextmenu":case"mouseup":case"dragend":Uf=!1,ES(G,a,H);break;case"selectionchange":if(AD)break;case"keydown":case"keyup":ES(G,a,H)}var ue;if(Df)e:{switch(r){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else Io?uS(r,a)&&(he="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(aS&&a.locale!=="ko"&&(Io||he!=="onCompositionStart"?he==="onCompositionEnd"&&Io&&(ue=nS()):(zr=H,Pf="value"in zr?zr.value:zr.textContent,Io=!0)),ce=ic(L,he),0<ce.length&&(he=new oS(he,r,null,a,H),G.push({event:he,listeners:ce}),ue?he.data=ue:(ue=dS(a),ue!==null&&(he.data=ue)))),(ue=vD?SD(r,a):wD(r,a))&&(L=ic(L,"onBeforeInput"),0<L.length&&(H=new oS("onBeforeInput","beforeinput",null,a,H),G.push({event:H,listeners:L}),H.data=ue))}PS(G,o)})}function Vi(r,o,a){return{instance:r,listener:o,currentTarget:a}}function ic(r,o){for(var a=o+"Capture",u=[];r!==null;){var p=r,h=p.stateNode;p.tag===5&&h!==null&&(p=h,h=Ci(r,a),h!=null&&u.unshift(Vi(r,h,p)),h=Ci(r,o),h!=null&&u.push(Vi(r,h,p))),r=r.return}return u}function Ro(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function NS(r,o,a,u,p){for(var h=o._reactName,S=[];a!==null&&a!==u;){var x=a,I=x.alternate,L=x.stateNode;if(I!==null&&I===u)break;x.tag===5&&L!==null&&(x=L,p?(I=Ci(a,h),I!=null&&S.unshift(Vi(a,I,x))):p||(I=Ci(a,h),I!=null&&S.push(Vi(a,I,x)))),a=a.return}S.length!==0&&r.push({event:o,listeners:S})}var MD=/\r\n?/g,LD=/\u0000|\uFFFD/g;function MS(r){return(typeof r=="string"?r:""+r).replace(MD,`
`).replace(LD,"")}function ac(r,o,a){if(o=MS(o),MS(r)!==o&&a)throw Error(n(425))}function lc(){}var Qf=null,Yf=null;function Kf(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Xf=typeof setTimeout=="function"?setTimeout:void 0,jD=typeof clearTimeout=="function"?clearTimeout:void 0,LS=typeof Promise=="function"?Promise:void 0,DD=typeof queueMicrotask=="function"?queueMicrotask:typeof LS<"u"?function(r){return LS.resolve(null).then(r).catch(FD)}:Xf;function FD(r){setTimeout(function(){throw r})}function Jf(r,o){var a=o,u=0;do{var p=a.nextSibling;if(r.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(u===0){r.removeChild(p),ji(o);return}u--}else a!=="$"&&a!=="$?"&&a!=="$!"||u++;a=p}while(a);ji(o)}function Hr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function jS(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"){if(o===0)return r;o--}else a==="/$"&&o++}r=r.previousSibling}return null}var Ao=Math.random().toString(36).slice(2),Vn="__reactFiber$"+Ao,Gi="__reactProps$"+Ao,cr="__reactContainer$"+Ao,Zf="__reactEvents$"+Ao,$D="__reactListeners$"+Ao,BD="__reactHandles$"+Ao;function bs(r){var o=r[Vn];if(o)return o;for(var a=r.parentNode;a;){if(o=a[cr]||a[Vn]){if(a=o.alternate,o.child!==null||a!==null&&a.child!==null)for(r=jS(r);r!==null;){if(a=r[Vn])return a;r=jS(r)}return o}r=a,a=r.parentNode}return null}function Qi(r){return r=r[Vn]||r[cr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Po(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function cc(r){return r[Gi]||null}var ep=[],Oo=-1;function Wr(r){return{current:r}}function Je(r){0>Oo||(r.current=ep[Oo],ep[Oo]=null,Oo--)}function Ke(r,o){Oo++,ep[Oo]=r.current,r.current=o}var qr={},Pt=Wr(qr),Gt=Wr(!1),Rs=qr;function No(r,o){var a=r.type.contextTypes;if(!a)return qr;var u=r.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===o)return u.__reactInternalMemoizedMaskedChildContext;var p={},h;for(h in a)p[h]=o[h];return u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=p),p}function Qt(r){return r=r.childContextTypes,r!=null}function uc(){Je(Gt),Je(Pt)}function DS(r,o,a){if(Pt.current!==qr)throw Error(n(168));Ke(Pt,o),Ke(Gt,a)}function FS(r,o,a){var u=r.stateNode;if(o=o.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var p in u)if(!(p in o))throw Error(n(108,ze(r)||"Unknown",p));return J({},a,u)}function dc(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||qr,Rs=Pt.current,Ke(Pt,r),Ke(Gt,Gt.current),!0}function $S(r,o,a){var u=r.stateNode;if(!u)throw Error(n(169));a?(r=FS(r,o,Rs),u.__reactInternalMemoizedMergedChildContext=r,Je(Gt),Je(Pt),Ke(Pt,r)):Je(Gt),Ke(Gt,a)}var ur=null,fc=!1,tp=!1;function BS(r){ur===null?ur=[r]:ur.push(r)}function zD(r){fc=!0,BS(r)}function Vr(){if(!tp&&ur!==null){tp=!0;var r=0,o=Ue;try{var a=ur;for(Ue=1;r<a.length;r++){var u=a[r];do u=u(!0);while(u!==null)}ur=null,fc=!1}catch(p){throw ur!==null&&(ur=ur.slice(r+1)),U1(xf,Vr),p}finally{Ue=o,tp=!1}}return null}var Mo=[],Lo=0,pc=null,hc=0,gn=[],yn=0,As=null,dr=1,fr="";function Ps(r,o){Mo[Lo++]=hc,Mo[Lo++]=pc,pc=r,hc=o}function zS(r,o,a){gn[yn++]=dr,gn[yn++]=fr,gn[yn++]=As,As=r;var u=dr;r=fr;var p=32-bn(u)-1;u&=~(1<<p),a+=1;var h=32-bn(o)+p;if(30<h){var S=p-p%5;h=(u&(1<<S)-1).toString(32),u>>=S,p-=S,dr=1<<32-bn(o)+p|a<<p|u,fr=h+r}else dr=1<<h|a<<p|u,fr=r}function np(r){r.return!==null&&(Ps(r,1),zS(r,1,0))}function rp(r){for(;r===pc;)pc=Mo[--Lo],Mo[Lo]=null,hc=Mo[--Lo],Mo[Lo]=null;for(;r===As;)As=gn[--yn],gn[yn]=null,fr=gn[--yn],gn[yn]=null,dr=gn[--yn],gn[yn]=null}var an=null,ln=null,Ze=!1,An=null;function US(r,o){var a=_n(5,null,null,0);a.elementType="DELETED",a.stateNode=o,a.return=r,o=r.deletions,o===null?(r.deletions=[a],r.flags|=16):o.push(a)}function HS(r,o){switch(r.tag){case 5:var a=r.type;return o=o.nodeType!==1||a.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,an=r,ln=Hr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,an=r,ln=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(a=As!==null?{id:dr,overflow:fr}:null,r.memoizedState={dehydrated:o,treeContext:a,retryLane:1073741824},a=_n(18,null,null,0),a.stateNode=o,a.return=r,r.child=a,an=r,ln=null,!0):!1;default:return!1}}function sp(r){return(r.mode&1)!==0&&(r.flags&128)===0}function op(r){if(Ze){var o=ln;if(o){var a=o;if(!HS(r,o)){if(sp(r))throw Error(n(418));o=Hr(a.nextSibling);var u=an;o&&HS(r,o)?US(u,a):(r.flags=r.flags&-4097|2,Ze=!1,an=r)}}else{if(sp(r))throw Error(n(418));r.flags=r.flags&-4097|2,Ze=!1,an=r}}}function WS(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;an=r}function mc(r){if(r!==an)return!1;if(!Ze)return WS(r),Ze=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Kf(r.type,r.memoizedProps)),o&&(o=ln)){if(sp(r))throw qS(),Error(n(418));for(;o;)US(r,o),o=Hr(o.nextSibling)}if(WS(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"){if(o===0){ln=Hr(r.nextSibling);break e}o--}else a!=="$"&&a!=="$!"&&a!=="$?"||o++}r=r.nextSibling}ln=null}}else ln=an?Hr(r.stateNode.nextSibling):null;return!0}function qS(){for(var r=ln;r;)r=Hr(r.nextSibling)}function jo(){ln=an=null,Ze=!1}function ip(r){An===null?An=[r]:An.push(r)}var UD=q.ReactCurrentBatchConfig;function Yi(r,o,a){if(r=a.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(n(309));var u=a.stateNode}if(!u)throw Error(n(147,r));var p=u,h=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===h?o.ref:(o=function(S){var x=p.refs;S===null?delete x[h]:x[h]=S},o._stringRef=h,o)}if(typeof r!="string")throw Error(n(284));if(!a._owner)throw Error(n(290,r))}return r}function gc(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function VS(r){var o=r._init;return o(r._payload)}function GS(r){function o(A,C){if(r){var O=A.deletions;O===null?(A.deletions=[C],A.flags|=16):O.push(C)}}function a(A,C){if(!r)return null;for(;C!==null;)o(A,C),C=C.sibling;return null}function u(A,C){for(A=new Map;C!==null;)C.key!==null?A.set(C.key,C):A.set(C.index,C),C=C.sibling;return A}function p(A,C){return A=es(A,C),A.index=0,A.sibling=null,A}function h(A,C,O){return A.index=O,r?(O=A.alternate,O!==null?(O=O.index,O<C?(A.flags|=2,C):O):(A.flags|=2,C)):(A.flags|=1048576,C)}function S(A){return r&&A.alternate===null&&(A.flags|=2),A}function x(A,C,O,Q){return C===null||C.tag!==6?(C=Xp(O,A.mode,Q),C.return=A,C):(C=p(C,O),C.return=A,C)}function I(A,C,O,Q){var ae=O.type;return ae===D?H(A,C,O.props.children,Q,O.key):C!==null&&(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===le&&VS(ae)===C.type)?(Q=p(C,O.props),Q.ref=Yi(A,C,O),Q.return=A,Q):(Q=Bc(O.type,O.key,O.props,null,A.mode,Q),Q.ref=Yi(A,C,O),Q.return=A,Q)}function L(A,C,O,Q){return C===null||C.tag!==4||C.stateNode.containerInfo!==O.containerInfo||C.stateNode.implementation!==O.implementation?(C=Jp(O,A.mode,Q),C.return=A,C):(C=p(C,O.children||[]),C.return=A,C)}function H(A,C,O,Q,ae){return C===null||C.tag!==7?(C=$s(O,A.mode,Q,ae),C.return=A,C):(C=p(C,O),C.return=A,C)}function G(A,C,O){if(typeof C=="string"&&C!==""||typeof C=="number")return C=Xp(""+C,A.mode,O),C.return=A,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case W:return O=Bc(C.type,C.key,C.props,null,A.mode,O),O.ref=Yi(A,null,C),O.return=A,O;case j:return C=Jp(C,A.mode,O),C.return=A,C;case le:var Q=C._init;return G(A,Q(C._payload),O)}if(Re(C)||ne(C))return C=$s(C,A.mode,O,null),C.return=A,C;gc(A,C)}return null}function U(A,C,O,Q){var ae=C!==null?C.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return ae!==null?null:x(A,C,""+O,Q);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case W:return O.key===ae?I(A,C,O,Q):null;case j:return O.key===ae?L(A,C,O,Q):null;case le:return ae=O._init,U(A,C,ae(O._payload),Q)}if(Re(O)||ne(O))return ae!==null?null:H(A,C,O,Q,null);gc(A,O)}return null}function ee(A,C,O,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return A=A.get(O)||null,x(C,A,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case W:return A=A.get(Q.key===null?O:Q.key)||null,I(C,A,Q,ae);case j:return A=A.get(Q.key===null?O:Q.key)||null,L(C,A,Q,ae);case le:var ce=Q._init;return ee(A,C,O,ce(Q._payload),ae)}if(Re(Q)||ne(Q))return A=A.get(O)||null,H(C,A,Q,ae,null);gc(C,Q)}return null}function re(A,C,O,Q){for(var ae=null,ce=null,ue=C,he=C=0,Et=null;ue!==null&&he<O.length;he++){ue.index>he?(Et=ue,ue=null):Et=ue.sibling;var Be=U(A,ue,O[he],Q);if(Be===null){ue===null&&(ue=Et);break}r&&ue&&Be.alternate===null&&o(A,ue),C=h(Be,C,he),ce===null?ae=Be:ce.sibling=Be,ce=Be,ue=Et}if(he===O.length)return a(A,ue),Ze&&Ps(A,he),ae;if(ue===null){for(;he<O.length;he++)ue=G(A,O[he],Q),ue!==null&&(C=h(ue,C,he),ce===null?ae=ue:ce.sibling=ue,ce=ue);return Ze&&Ps(A,he),ae}for(ue=u(A,ue);he<O.length;he++)Et=ee(ue,A,he,O[he],Q),Et!==null&&(r&&Et.alternate!==null&&ue.delete(Et.key===null?he:Et.key),C=h(Et,C,he),ce===null?ae=Et:ce.sibling=Et,ce=Et);return r&&ue.forEach(function(ts){return o(A,ts)}),Ze&&Ps(A,he),ae}function oe(A,C,O,Q){var ae=ne(O);if(typeof ae!="function")throw Error(n(150));if(O=ae.call(O),O==null)throw Error(n(151));for(var ce=ae=null,ue=C,he=C=0,Et=null,Be=O.next();ue!==null&&!Be.done;he++,Be=O.next()){ue.index>he?(Et=ue,ue=null):Et=ue.sibling;var ts=U(A,ue,Be.value,Q);if(ts===null){ue===null&&(ue=Et);break}r&&ue&&ts.alternate===null&&o(A,ue),C=h(ts,C,he),ce===null?ae=ts:ce.sibling=ts,ce=ts,ue=Et}if(Be.done)return a(A,ue),Ze&&Ps(A,he),ae;if(ue===null){for(;!Be.done;he++,Be=O.next())Be=G(A,Be.value,Q),Be!==null&&(C=h(Be,C,he),ce===null?ae=Be:ce.sibling=Be,ce=Be);return Ze&&Ps(A,he),ae}for(ue=u(A,ue);!Be.done;he++,Be=O.next())Be=ee(ue,A,he,Be.value,Q),Be!==null&&(r&&Be.alternate!==null&&ue.delete(Be.key===null?he:Be.key),C=h(Be,C,he),ce===null?ae=Be:ce.sibling=Be,ce=Be);return r&&ue.forEach(function(_8){return o(A,_8)}),Ze&&Ps(A,he),ae}function at(A,C,O,Q){if(typeof O=="object"&&O!==null&&O.type===D&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case W:e:{for(var ae=O.key,ce=C;ce!==null;){if(ce.key===ae){if(ae=O.type,ae===D){if(ce.tag===7){a(A,ce.sibling),C=p(ce,O.props.children),C.return=A,A=C;break e}}else if(ce.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===le&&VS(ae)===ce.type){a(A,ce.sibling),C=p(ce,O.props),C.ref=Yi(A,ce,O),C.return=A,A=C;break e}a(A,ce);break}else o(A,ce);ce=ce.sibling}O.type===D?(C=$s(O.props.children,A.mode,Q,O.key),C.return=A,A=C):(Q=Bc(O.type,O.key,O.props,null,A.mode,Q),Q.ref=Yi(A,C,O),Q.return=A,A=Q)}return S(A);case j:e:{for(ce=O.key;C!==null;){if(C.key===ce)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){a(A,C.sibling),C=p(C,O.children||[]),C.return=A,A=C;break e}else{a(A,C);break}else o(A,C);C=C.sibling}C=Jp(O,A.mode,Q),C.return=A,A=C}return S(A);case le:return ce=O._init,at(A,C,ce(O._payload),Q)}if(Re(O))return re(A,C,O,Q);if(ne(O))return oe(A,C,O,Q);gc(A,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,C!==null&&C.tag===6?(a(A,C.sibling),C=p(C,O),C.return=A,A=C):(a(A,C),C=Xp(O,A.mode,Q),C.return=A,A=C),S(A)):a(A,C)}return at}var Do=GS(!0),QS=GS(!1),yc=Wr(null),vc=null,Fo=null,ap=null;function lp(){ap=Fo=vc=null}function cp(r){var o=yc.current;Je(yc),r._currentValue=o}function up(r,o,a){for(;r!==null;){var u=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,u!==null&&(u.childLanes|=o)):u!==null&&(u.childLanes&o)!==o&&(u.childLanes|=o),r===a)break;r=r.return}}function $o(r,o){vc=r,ap=Fo=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&o&&(Yt=!0),r.firstContext=null)}function vn(r){var o=r._currentValue;if(ap!==r)if(r={context:r,memoizedValue:o,next:null},Fo===null){if(vc===null)throw Error(n(308));Fo=r,vc.dependencies={lanes:0,firstContext:r}}else Fo=Fo.next=r;return o}var Os=null;function dp(r){Os===null?Os=[r]:Os.push(r)}function YS(r,o,a,u){var p=o.interleaved;return p===null?(a.next=a,dp(o)):(a.next=p.next,p.next=a),o.interleaved=a,pr(r,u)}function pr(r,o){r.lanes|=o;var a=r.alternate;for(a!==null&&(a.lanes|=o),a=r,r=r.return;r!==null;)r.childLanes|=o,a=r.alternate,a!==null&&(a.childLanes|=o),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Gr=!1;function fp(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function KS(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function hr(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function Qr(r,o,a){var u=r.updateQueue;if(u===null)return null;if(u=u.shared,De&2){var p=u.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),u.pending=o,pr(r,a)}return p=u.interleaved,p===null?(o.next=o,dp(u)):(o.next=p.next,p.next=o),u.interleaved=o,pr(r,a)}function Sc(r,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194240)!==0)){var u=o.lanes;u&=r.pendingLanes,a|=u,o.lanes=a,If(r,a)}}function XS(r,o){var a=r.updateQueue,u=r.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var p=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var S={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};h===null?p=h=S:h=h.next=S,a=a.next}while(a!==null);h===null?p=h=o:h=h.next=o}else p=h=o;a={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:h,shared:u.shared,effects:u.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=o:r.next=o,a.lastBaseUpdate=o}function wc(r,o,a,u){var p=r.updateQueue;Gr=!1;var h=p.firstBaseUpdate,S=p.lastBaseUpdate,x=p.shared.pending;if(x!==null){p.shared.pending=null;var I=x,L=I.next;I.next=null,S===null?h=L:S.next=L,S=I;var H=r.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==S&&(x===null?H.firstBaseUpdate=L:x.next=L,H.lastBaseUpdate=I))}if(h!==null){var G=p.baseState;S=0,H=L=I=null,x=h;do{var U=x.lane,ee=x.eventTime;if((u&U)===U){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var re=r,oe=x;switch(U=o,ee=a,oe.tag){case 1:if(re=oe.payload,typeof re=="function"){G=re.call(ee,G,U);break e}G=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=oe.payload,U=typeof re=="function"?re.call(ee,G,U):re,U==null)break e;G=J({},G,U);break e;case 2:Gr=!0}}x.callback!==null&&x.lane!==0&&(r.flags|=64,U=p.effects,U===null?p.effects=[x]:U.push(x))}else ee={eventTime:ee,lane:U,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(L=H=ee,I=G):H=H.next=ee,S|=U;if(x=x.next,x===null){if(x=p.shared.pending,x===null)break;U=x,x=U.next,U.next=null,p.lastBaseUpdate=U,p.shared.pending=null}}while(!0);if(H===null&&(I=G),p.baseState=I,p.firstBaseUpdate=L,p.lastBaseUpdate=H,o=p.shared.interleaved,o!==null){p=o;do S|=p.lane,p=p.next;while(p!==o)}else h===null&&(p.shared.lanes=0);Ls|=S,r.lanes=S,r.memoizedState=G}}function JS(r,o,a){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var u=r[o],p=u.callback;if(p!==null){if(u.callback=null,u=a,typeof p!="function")throw Error(n(191,p));p.call(u)}}}var Ki={},Gn=Wr(Ki),Xi=Wr(Ki),Ji=Wr(Ki);function Ns(r){if(r===Ki)throw Error(n(174));return r}function pp(r,o){switch(Ke(Ji,o),Ke(Xi,r),Ke(Gn,Ki),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:hf(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=hf(o,r)}Je(Gn),Ke(Gn,o)}function Bo(){Je(Gn),Je(Xi),Je(Ji)}function ZS(r){Ns(Ji.current);var o=Ns(Gn.current),a=hf(o,r.type);o!==a&&(Ke(Xi,r),Ke(Gn,a))}function hp(r){Xi.current===r&&(Je(Gn),Je(Xi))}var et=Wr(0);function _c(r){for(var o=r;o!==null;){if(o.tag===13){var a=o.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var mp=[];function gp(){for(var r=0;r<mp.length;r++)mp[r]._workInProgressVersionPrimary=null;mp.length=0}var Ec=q.ReactCurrentDispatcher,yp=q.ReactCurrentBatchConfig,Ms=0,tt=null,ft=null,wt=null,xc=!1,Zi=!1,ea=0,HD=0;function Ot(){throw Error(n(321))}function vp(r,o){if(o===null)return!1;for(var a=0;a<o.length&&a<r.length;a++)if(!Rn(r[a],o[a]))return!1;return!0}function Sp(r,o,a,u,p,h){if(Ms=h,tt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Ec.current=r===null||r.memoizedState===null?GD:QD,r=a(u,p),Zi){h=0;do{if(Zi=!1,ea=0,25<=h)throw Error(n(301));h+=1,wt=ft=null,o.updateQueue=null,Ec.current=YD,r=a(u,p)}while(Zi)}if(Ec.current=Ic,o=ft!==null&&ft.next!==null,Ms=0,wt=ft=tt=null,xc=!1,o)throw Error(n(300));return r}function wp(){var r=ea!==0;return ea=0,r}function Qn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?tt.memoizedState=wt=r:wt=wt.next=r,wt}function Sn(){if(ft===null){var r=tt.alternate;r=r!==null?r.memoizedState:null}else r=ft.next;var o=wt===null?tt.memoizedState:wt.next;if(o!==null)wt=o,ft=r;else{if(r===null)throw Error(n(310));ft=r,r={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},wt===null?tt.memoizedState=wt=r:wt=wt.next=r}return wt}function ta(r,o){return typeof o=="function"?o(r):o}function _p(r){var o=Sn(),a=o.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var u=ft,p=u.baseQueue,h=a.pending;if(h!==null){if(p!==null){var S=p.next;p.next=h.next,h.next=S}u.baseQueue=p=h,a.pending=null}if(p!==null){h=p.next,u=u.baseState;var x=S=null,I=null,L=h;do{var H=L.lane;if((Ms&H)===H)I!==null&&(I=I.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),u=L.hasEagerState?L.eagerState:r(u,L.action);else{var G={lane:H,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};I===null?(x=I=G,S=u):I=I.next=G,tt.lanes|=H,Ls|=H}L=L.next}while(L!==null&&L!==h);I===null?S=u:I.next=x,Rn(u,o.memoizedState)||(Yt=!0),o.memoizedState=u,o.baseState=S,o.baseQueue=I,a.lastRenderedState=u}if(r=a.interleaved,r!==null){p=r;do h=p.lane,tt.lanes|=h,Ls|=h,p=p.next;while(p!==r)}else p===null&&(a.lanes=0);return[o.memoizedState,a.dispatch]}function Ep(r){var o=Sn(),a=o.queue;if(a===null)throw Error(n(311));a.lastRenderedReducer=r;var u=a.dispatch,p=a.pending,h=o.memoizedState;if(p!==null){a.pending=null;var S=p=p.next;do h=r(h,S.action),S=S.next;while(S!==p);Rn(h,o.memoizedState)||(Yt=!0),o.memoizedState=h,o.baseQueue===null&&(o.baseState=h),a.lastRenderedState=h}return[h,u]}function ew(){}function tw(r,o){var a=tt,u=Sn(),p=o(),h=!Rn(u.memoizedState,p);if(h&&(u.memoizedState=p,Yt=!0),u=u.queue,xp(sw.bind(null,a,u,r),[r]),u.getSnapshot!==o||h||wt!==null&&wt.memoizedState.tag&1){if(a.flags|=2048,na(9,rw.bind(null,a,u,p,o),void 0,null),_t===null)throw Error(n(349));Ms&30||nw(a,o,p)}return p}function nw(r,o,a){r.flags|=16384,r={getSnapshot:o,value:a},o=tt.updateQueue,o===null?(o={lastEffect:null,stores:null},tt.updateQueue=o,o.stores=[r]):(a=o.stores,a===null?o.stores=[r]:a.push(r))}function rw(r,o,a,u){o.value=a,o.getSnapshot=u,ow(o)&&iw(r)}function sw(r,o,a){return a(function(){ow(o)&&iw(r)})}function ow(r){var o=r.getSnapshot;r=r.value;try{var a=o();return!Rn(r,a)}catch{return!0}}function iw(r){var o=pr(r,1);o!==null&&Mn(o,r,1,-1)}function aw(r){var o=Qn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:r},o.queue=r,r=r.dispatch=VD.bind(null,tt,r),[o.memoizedState,r]}function na(r,o,a,u){return r={tag:r,create:o,destroy:a,deps:u,next:null},o=tt.updateQueue,o===null?(o={lastEffect:null,stores:null},tt.updateQueue=o,o.lastEffect=r.next=r):(a=o.lastEffect,a===null?o.lastEffect=r.next=r:(u=a.next,a.next=r,r.next=u,o.lastEffect=r)),r}function lw(){return Sn().memoizedState}function Tc(r,o,a,u){var p=Qn();tt.flags|=r,p.memoizedState=na(1|o,a,void 0,u===void 0?null:u)}function kc(r,o,a,u){var p=Sn();u=u===void 0?null:u;var h=void 0;if(ft!==null){var S=ft.memoizedState;if(h=S.destroy,u!==null&&vp(u,S.deps)){p.memoizedState=na(o,a,h,u);return}}tt.flags|=r,p.memoizedState=na(1|o,a,h,u)}function cw(r,o){return Tc(8390656,8,r,o)}function xp(r,o){return kc(2048,8,r,o)}function uw(r,o){return kc(4,2,r,o)}function dw(r,o){return kc(4,4,r,o)}function fw(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function pw(r,o,a){return a=a!=null?a.concat([r]):null,kc(4,4,fw.bind(null,o,r),a)}function Tp(){}function hw(r,o){var a=Sn();o=o===void 0?null:o;var u=a.memoizedState;return u!==null&&o!==null&&vp(o,u[1])?u[0]:(a.memoizedState=[r,o],r)}function mw(r,o){var a=Sn();o=o===void 0?null:o;var u=a.memoizedState;return u!==null&&o!==null&&vp(o,u[1])?u[0]:(r=r(),a.memoizedState=[r,o],r)}function gw(r,o,a){return Ms&21?(Rn(a,o)||(a=V1(),tt.lanes|=a,Ls|=a,r.baseState=!0),o):(r.baseState&&(r.baseState=!1,Yt=!0),r.memoizedState=a)}function WD(r,o){var a=Ue;Ue=a!==0&&4>a?a:4,r(!0);var u=yp.transition;yp.transition={};try{r(!1),o()}finally{Ue=a,yp.transition=u}}function yw(){return Sn().memoizedState}function qD(r,o,a){var u=Jr(r);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},vw(r))Sw(o,a);else if(a=YS(r,o,a,u),a!==null){var p=zt();Mn(a,r,u,p),ww(a,o,u)}}function VD(r,o,a){var u=Jr(r),p={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(vw(r))Sw(o,p);else{var h=r.alternate;if(r.lanes===0&&(h===null||h.lanes===0)&&(h=o.lastRenderedReducer,h!==null))try{var S=o.lastRenderedState,x=h(S,a);if(p.hasEagerState=!0,p.eagerState=x,Rn(x,S)){var I=o.interleaved;I===null?(p.next=p,dp(o)):(p.next=I.next,I.next=p),o.interleaved=p;return}}catch{}finally{}a=YS(r,o,p,u),a!==null&&(p=zt(),Mn(a,r,u,p),ww(a,o,u))}}function vw(r){var o=r.alternate;return r===tt||o!==null&&o===tt}function Sw(r,o){Zi=xc=!0;var a=r.pending;a===null?o.next=o:(o.next=a.next,a.next=o),r.pending=o}function ww(r,o,a){if(a&4194240){var u=o.lanes;u&=r.pendingLanes,a|=u,o.lanes=a,If(r,a)}}var Ic={readContext:vn,useCallback:Ot,useContext:Ot,useEffect:Ot,useImperativeHandle:Ot,useInsertionEffect:Ot,useLayoutEffect:Ot,useMemo:Ot,useReducer:Ot,useRef:Ot,useState:Ot,useDebugValue:Ot,useDeferredValue:Ot,useTransition:Ot,useMutableSource:Ot,useSyncExternalStore:Ot,useId:Ot,unstable_isNewReconciler:!1},GD={readContext:vn,useCallback:function(r,o){return Qn().memoizedState=[r,o===void 0?null:o],r},useContext:vn,useEffect:cw,useImperativeHandle:function(r,o,a){return a=a!=null?a.concat([r]):null,Tc(4194308,4,fw.bind(null,o,r),a)},useLayoutEffect:function(r,o){return Tc(4194308,4,r,o)},useInsertionEffect:function(r,o){return Tc(4,2,r,o)},useMemo:function(r,o){var a=Qn();return o=o===void 0?null:o,r=r(),a.memoizedState=[r,o],r},useReducer:function(r,o,a){var u=Qn();return o=a!==void 0?a(o):o,u.memoizedState=u.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},u.queue=r,r=r.dispatch=qD.bind(null,tt,r),[u.memoizedState,r]},useRef:function(r){var o=Qn();return r={current:r},o.memoizedState=r},useState:aw,useDebugValue:Tp,useDeferredValue:function(r){return Qn().memoizedState=r},useTransition:function(){var r=aw(!1),o=r[0];return r=WD.bind(null,r[1]),Qn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,a){var u=tt,p=Qn();if(Ze){if(a===void 0)throw Error(n(407));a=a()}else{if(a=o(),_t===null)throw Error(n(349));Ms&30||nw(u,o,a)}p.memoizedState=a;var h={value:a,getSnapshot:o};return p.queue=h,cw(sw.bind(null,u,h,r),[r]),u.flags|=2048,na(9,rw.bind(null,u,h,a,o),void 0,null),a},useId:function(){var r=Qn(),o=_t.identifierPrefix;if(Ze){var a=fr,u=dr;a=(u&~(1<<32-bn(u)-1)).toString(32)+a,o=":"+o+"R"+a,a=ea++,0<a&&(o+="H"+a.toString(32)),o+=":"}else a=HD++,o=":"+o+"r"+a.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},QD={readContext:vn,useCallback:hw,useContext:vn,useEffect:xp,useImperativeHandle:pw,useInsertionEffect:uw,useLayoutEffect:dw,useMemo:mw,useReducer:_p,useRef:lw,useState:function(){return _p(ta)},useDebugValue:Tp,useDeferredValue:function(r){var o=Sn();return gw(o,ft.memoizedState,r)},useTransition:function(){var r=_p(ta)[0],o=Sn().memoizedState;return[r,o]},useMutableSource:ew,useSyncExternalStore:tw,useId:yw,unstable_isNewReconciler:!1},YD={readContext:vn,useCallback:hw,useContext:vn,useEffect:xp,useImperativeHandle:pw,useInsertionEffect:uw,useLayoutEffect:dw,useMemo:mw,useReducer:Ep,useRef:lw,useState:function(){return Ep(ta)},useDebugValue:Tp,useDeferredValue:function(r){var o=Sn();return ft===null?o.memoizedState=r:gw(o,ft.memoizedState,r)},useTransition:function(){var r=Ep(ta)[0],o=Sn().memoizedState;return[r,o]},useMutableSource:ew,useSyncExternalStore:tw,useId:yw,unstable_isNewReconciler:!1};function Pn(r,o){if(r&&r.defaultProps){o=J({},o),r=r.defaultProps;for(var a in r)o[a]===void 0&&(o[a]=r[a]);return o}return o}function kp(r,o,a,u){o=r.memoizedState,a=a(u,o),a=a==null?o:J({},o,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var Cc={isMounted:function(r){return(r=r._reactInternals)?Cs(r)===r:!1},enqueueSetState:function(r,o,a){r=r._reactInternals;var u=zt(),p=Jr(r),h=hr(u,p);h.payload=o,a!=null&&(h.callback=a),o=Qr(r,h,p),o!==null&&(Mn(o,r,p,u),Sc(o,r,p))},enqueueReplaceState:function(r,o,a){r=r._reactInternals;var u=zt(),p=Jr(r),h=hr(u,p);h.tag=1,h.payload=o,a!=null&&(h.callback=a),o=Qr(r,h,p),o!==null&&(Mn(o,r,p,u),Sc(o,r,p))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var a=zt(),u=Jr(r),p=hr(a,u);p.tag=2,o!=null&&(p.callback=o),o=Qr(r,p,u),o!==null&&(Mn(o,r,u,a),Sc(o,r,u))}};function _w(r,o,a,u,p,h,S){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(u,h,S):o.prototype&&o.prototype.isPureReactComponent?!Ui(a,u)||!Ui(p,h):!0}function Ew(r,o,a){var u=!1,p=qr,h=o.contextType;return typeof h=="object"&&h!==null?h=vn(h):(p=Qt(o)?Rs:Pt.current,u=o.contextTypes,h=(u=u!=null)?No(r,p):qr),o=new o(a,h),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Cc,r.stateNode=o,o._reactInternals=r,u&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=p,r.__reactInternalMemoizedMaskedChildContext=h),o}function xw(r,o,a,u){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(a,u),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(a,u),o.state!==r&&Cc.enqueueReplaceState(o,o.state,null)}function Ip(r,o,a,u){var p=r.stateNode;p.props=a,p.state=r.memoizedState,p.refs={},fp(r);var h=o.contextType;typeof h=="object"&&h!==null?p.context=vn(h):(h=Qt(o)?Rs:Pt.current,p.context=No(r,h)),p.state=r.memoizedState,h=o.getDerivedStateFromProps,typeof h=="function"&&(kp(r,o,h,a),p.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(o=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),o!==p.state&&Cc.enqueueReplaceState(p,p.state,null),wc(r,a,p,u),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308)}function zo(r,o){try{var a="",u=o;do a+=Pe(u),u=u.return;while(u);var p=a}catch(h){p=`
Error generating stack: `+h.message+`
`+h.stack}return{value:r,source:o,stack:p,digest:null}}function Cp(r,o,a){return{value:r,source:null,stack:a??null,digest:o??null}}function bp(r,o){try{console.error(o.value)}catch(a){setTimeout(function(){throw a})}}var KD=typeof WeakMap=="function"?WeakMap:Map;function Tw(r,o,a){a=hr(-1,a),a.tag=3,a.payload={element:null};var u=o.value;return a.callback=function(){Mc||(Mc=!0,Hp=u),bp(r,o)},a}function kw(r,o,a){a=hr(-1,a),a.tag=3;var u=r.type.getDerivedStateFromError;if(typeof u=="function"){var p=o.value;a.payload=function(){return u(p)},a.callback=function(){bp(r,o)}}var h=r.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(a.callback=function(){bp(r,o),typeof u!="function"&&(Kr===null?Kr=new Set([this]):Kr.add(this));var S=o.stack;this.componentDidCatch(o.value,{componentStack:S!==null?S:""})}),a}function Iw(r,o,a){var u=r.pingCache;if(u===null){u=r.pingCache=new KD;var p=new Set;u.set(o,p)}else p=u.get(o),p===void 0&&(p=new Set,u.set(o,p));p.has(a)||(p.add(a),r=u8.bind(null,r,o,a),o.then(r,r))}function Cw(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function bw(r,o,a,u,p){return r.mode&1?(r.flags|=65536,r.lanes=p,r):(r===o?r.flags|=65536:(r.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(o=hr(-1,1),o.tag=2,Qr(a,o,1))),a.lanes|=1),r)}var XD=q.ReactCurrentOwner,Yt=!1;function Bt(r,o,a,u){o.child=r===null?QS(o,null,a,u):Do(o,r.child,a,u)}function Rw(r,o,a,u,p){a=a.render;var h=o.ref;return $o(o,p),u=Sp(r,o,a,u,h,p),a=wp(),r!==null&&!Yt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~p,mr(r,o,p)):(Ze&&a&&np(o),o.flags|=1,Bt(r,o,u,p),o.child)}function Aw(r,o,a,u,p){if(r===null){var h=a.type;return typeof h=="function"&&!Kp(h)&&h.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(o.tag=15,o.type=h,Pw(r,o,h,u,p)):(r=Bc(a.type,null,u,o,o.mode,p),r.ref=o.ref,r.return=o,o.child=r)}if(h=r.child,!(r.lanes&p)){var S=h.memoizedProps;if(a=a.compare,a=a!==null?a:Ui,a(S,u)&&r.ref===o.ref)return mr(r,o,p)}return o.flags|=1,r=es(h,u),r.ref=o.ref,r.return=o,o.child=r}function Pw(r,o,a,u,p){if(r!==null){var h=r.memoizedProps;if(Ui(h,u)&&r.ref===o.ref)if(Yt=!1,o.pendingProps=u=h,(r.lanes&p)!==0)r.flags&131072&&(Yt=!0);else return o.lanes=r.lanes,mr(r,o,p)}return Rp(r,o,a,u,p)}function Ow(r,o,a){var u=o.pendingProps,p=u.children,h=r!==null?r.memoizedState:null;if(u.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(Ho,cn),cn|=a;else{if(!(a&1073741824))return r=h!==null?h.baseLanes|a:a,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Ke(Ho,cn),cn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=h!==null?h.baseLanes:a,Ke(Ho,cn),cn|=u}else h!==null?(u=h.baseLanes|a,o.memoizedState=null):u=a,Ke(Ho,cn),cn|=u;return Bt(r,o,p,a),o.child}function Nw(r,o){var a=o.ref;(r===null&&a!==null||r!==null&&r.ref!==a)&&(o.flags|=512,o.flags|=2097152)}function Rp(r,o,a,u,p){var h=Qt(a)?Rs:Pt.current;return h=No(o,h),$o(o,p),a=Sp(r,o,a,u,h,p),u=wp(),r!==null&&!Yt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~p,mr(r,o,p)):(Ze&&u&&np(o),o.flags|=1,Bt(r,o,a,p),o.child)}function Mw(r,o,a,u,p){if(Qt(a)){var h=!0;dc(o)}else h=!1;if($o(o,p),o.stateNode===null)Rc(r,o),Ew(o,a,u),Ip(o,a,u,p),u=!0;else if(r===null){var S=o.stateNode,x=o.memoizedProps;S.props=x;var I=S.context,L=a.contextType;typeof L=="object"&&L!==null?L=vn(L):(L=Qt(a)?Rs:Pt.current,L=No(o,L));var H=a.getDerivedStateFromProps,G=typeof H=="function"||typeof S.getSnapshotBeforeUpdate=="function";G||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(x!==u||I!==L)&&xw(o,S,u,L),Gr=!1;var U=o.memoizedState;S.state=U,wc(o,u,S,p),I=o.memoizedState,x!==u||U!==I||Gt.current||Gr?(typeof H=="function"&&(kp(o,a,H,u),I=o.memoizedState),(x=Gr||_w(o,a,x,u,U,I,L))?(G||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=u,o.memoizedState=I),S.props=u,S.state=I,S.context=L,u=x):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),u=!1)}else{S=o.stateNode,KS(r,o),x=o.memoizedProps,L=o.type===o.elementType?x:Pn(o.type,x),S.props=L,G=o.pendingProps,U=S.context,I=a.contextType,typeof I=="object"&&I!==null?I=vn(I):(I=Qt(a)?Rs:Pt.current,I=No(o,I));var ee=a.getDerivedStateFromProps;(H=typeof ee=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(x!==G||U!==I)&&xw(o,S,u,I),Gr=!1,U=o.memoizedState,S.state=U,wc(o,u,S,p);var re=o.memoizedState;x!==G||U!==re||Gt.current||Gr?(typeof ee=="function"&&(kp(o,a,ee,u),re=o.memoizedState),(L=Gr||_w(o,a,L,u,U,re,I)||!1)?(H||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(u,re,I),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(u,re,I)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||x===r.memoizedProps&&U===r.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&U===r.memoizedState||(o.flags|=1024),o.memoizedProps=u,o.memoizedState=re),S.props=u,S.state=re,S.context=I,u=L):(typeof S.componentDidUpdate!="function"||x===r.memoizedProps&&U===r.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||x===r.memoizedProps&&U===r.memoizedState||(o.flags|=1024),u=!1)}return Ap(r,o,a,u,h,p)}function Ap(r,o,a,u,p,h){Nw(r,o);var S=(o.flags&128)!==0;if(!u&&!S)return p&&$S(o,a,!1),mr(r,o,h);u=o.stateNode,XD.current=o;var x=S&&typeof a.getDerivedStateFromError!="function"?null:u.render();return o.flags|=1,r!==null&&S?(o.child=Do(o,r.child,null,h),o.child=Do(o,null,x,h)):Bt(r,o,x,h),o.memoizedState=u.state,p&&$S(o,a,!0),o.child}function Lw(r){var o=r.stateNode;o.pendingContext?DS(r,o.pendingContext,o.pendingContext!==o.context):o.context&&DS(r,o.context,!1),pp(r,o.containerInfo)}function jw(r,o,a,u,p){return jo(),ip(p),o.flags|=256,Bt(r,o,a,u),o.child}var Pp={dehydrated:null,treeContext:null,retryLane:0};function Op(r){return{baseLanes:r,cachePool:null,transitions:null}}function Dw(r,o,a){var u=o.pendingProps,p=et.current,h=!1,S=(o.flags&128)!==0,x;if((x=S)||(x=r!==null&&r.memoizedState===null?!1:(p&2)!==0),x?(h=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(p|=1),Ke(et,p&1),r===null)return op(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(o.mode&1?r.data==="$!"?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(S=u.children,r=u.fallback,h?(u=o.mode,h=o.child,S={mode:"hidden",children:S},!(u&1)&&h!==null?(h.childLanes=0,h.pendingProps=S):h=zc(S,u,0,null),r=$s(r,u,a,null),h.return=o,r.return=o,h.sibling=r,o.child=h,o.child.memoizedState=Op(a),o.memoizedState=Pp,r):Np(o,S));if(p=r.memoizedState,p!==null&&(x=p.dehydrated,x!==null))return JD(r,o,S,u,x,p,a);if(h){h=u.fallback,S=o.mode,p=r.child,x=p.sibling;var I={mode:"hidden",children:u.children};return!(S&1)&&o.child!==p?(u=o.child,u.childLanes=0,u.pendingProps=I,o.deletions=null):(u=es(p,I),u.subtreeFlags=p.subtreeFlags&14680064),x!==null?h=es(x,h):(h=$s(h,S,a,null),h.flags|=2),h.return=o,u.return=o,u.sibling=h,o.child=u,u=h,h=o.child,S=r.child.memoizedState,S=S===null?Op(a):{baseLanes:S.baseLanes|a,cachePool:null,transitions:S.transitions},h.memoizedState=S,h.childLanes=r.childLanes&~a,o.memoizedState=Pp,u}return h=r.child,r=h.sibling,u=es(h,{mode:"visible",children:u.children}),!(o.mode&1)&&(u.lanes=a),u.return=o,u.sibling=null,r!==null&&(a=o.deletions,a===null?(o.deletions=[r],o.flags|=16):a.push(r)),o.child=u,o.memoizedState=null,u}function Np(r,o){return o=zc({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function bc(r,o,a,u){return u!==null&&ip(u),Do(o,r.child,null,a),r=Np(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function JD(r,o,a,u,p,h,S){if(a)return o.flags&256?(o.flags&=-257,u=Cp(Error(n(422))),bc(r,o,S,u)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(h=u.fallback,p=o.mode,u=zc({mode:"visible",children:u.children},p,0,null),h=$s(h,p,S,null),h.flags|=2,u.return=o,h.return=o,u.sibling=h,o.child=u,o.mode&1&&Do(o,r.child,null,S),o.child.memoizedState=Op(S),o.memoizedState=Pp,h);if(!(o.mode&1))return bc(r,o,S,null);if(p.data==="$!"){if(u=p.nextSibling&&p.nextSibling.dataset,u)var x=u.dgst;return u=x,h=Error(n(419)),u=Cp(h,u,void 0),bc(r,o,S,u)}if(x=(S&r.childLanes)!==0,Yt||x){if(u=_t,u!==null){switch(S&-S){case 4:p=2;break;case 16:p=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=p&(u.suspendedLanes|S)?0:p,p!==0&&p!==h.retryLane&&(h.retryLane=p,pr(r,p),Mn(u,r,p,-1))}return Yp(),u=Cp(Error(n(421))),bc(r,o,S,u)}return p.data==="$?"?(o.flags|=128,o.child=r.child,o=d8.bind(null,r),p._reactRetry=o,null):(r=h.treeContext,ln=Hr(p.nextSibling),an=o,Ze=!0,An=null,r!==null&&(gn[yn++]=dr,gn[yn++]=fr,gn[yn++]=As,dr=r.id,fr=r.overflow,As=o),o=Np(o,u.children),o.flags|=4096,o)}function Fw(r,o,a){r.lanes|=o;var u=r.alternate;u!==null&&(u.lanes|=o),up(r.return,o,a)}function Mp(r,o,a,u,p){var h=r.memoizedState;h===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:p}:(h.isBackwards=o,h.rendering=null,h.renderingStartTime=0,h.last=u,h.tail=a,h.tailMode=p)}function $w(r,o,a){var u=o.pendingProps,p=u.revealOrder,h=u.tail;if(Bt(r,o,u.children,a),u=et.current,u&2)u=u&1|2,o.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Fw(r,a,o);else if(r.tag===19)Fw(r,a,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}u&=1}if(Ke(et,u),!(o.mode&1))o.memoizedState=null;else switch(p){case"forwards":for(a=o.child,p=null;a!==null;)r=a.alternate,r!==null&&_c(r)===null&&(p=a),a=a.sibling;a=p,a===null?(p=o.child,o.child=null):(p=a.sibling,a.sibling=null),Mp(o,!1,p,a,h);break;case"backwards":for(a=null,p=o.child,o.child=null;p!==null;){if(r=p.alternate,r!==null&&_c(r)===null){o.child=p;break}r=p.sibling,p.sibling=a,a=p,p=r}Mp(o,!0,a,null,h);break;case"together":Mp(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Rc(r,o){!(o.mode&1)&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function mr(r,o,a){if(r!==null&&(o.dependencies=r.dependencies),Ls|=o.lanes,!(a&o.childLanes))return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,a=es(r,r.pendingProps),o.child=a,a.return=o;r.sibling!==null;)r=r.sibling,a=a.sibling=es(r,r.pendingProps),a.return=o;a.sibling=null}return o.child}function ZD(r,o,a){switch(o.tag){case 3:Lw(o),jo();break;case 5:ZS(o);break;case 1:Qt(o.type)&&dc(o);break;case 4:pp(o,o.stateNode.containerInfo);break;case 10:var u=o.type._context,p=o.memoizedProps.value;Ke(yc,u._currentValue),u._currentValue=p;break;case 13:if(u=o.memoizedState,u!==null)return u.dehydrated!==null?(Ke(et,et.current&1),o.flags|=128,null):a&o.child.childLanes?Dw(r,o,a):(Ke(et,et.current&1),r=mr(r,o,a),r!==null?r.sibling:null);Ke(et,et.current&1);break;case 19:if(u=(a&o.childLanes)!==0,r.flags&128){if(u)return $w(r,o,a);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Ke(et,et.current),u)break;return null;case 22:case 23:return o.lanes=0,Ow(r,o,a)}return mr(r,o,a)}var Bw,Lp,zw,Uw;Bw=function(r,o){for(var a=o.child;a!==null;){if(a.tag===5||a.tag===6)r.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Lp=function(){},zw=function(r,o,a,u){var p=r.memoizedProps;if(p!==u){r=o.stateNode,Ns(Gn.current);var h=null;switch(a){case"input":p=Cn(r,p),u=Cn(r,u),h=[];break;case"select":p=J({},p,{value:void 0}),u=J({},u,{value:void 0}),h=[];break;case"textarea":p=be(r,p),u=be(r,u),h=[];break;default:typeof p.onClick!="function"&&typeof u.onClick=="function"&&(r.onclick=lc)}mf(a,u);var S;a=null;for(L in p)if(!u.hasOwnProperty(L)&&p.hasOwnProperty(L)&&p[L]!=null)if(L==="style"){var x=p[L];for(S in x)x.hasOwnProperty(S)&&(a||(a={}),a[S]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(i.hasOwnProperty(L)?h||(h=[]):(h=h||[]).push(L,null));for(L in u){var I=u[L];if(x=p!=null?p[L]:void 0,u.hasOwnProperty(L)&&I!==x&&(I!=null||x!=null))if(L==="style")if(x){for(S in x)!x.hasOwnProperty(S)||I&&I.hasOwnProperty(S)||(a||(a={}),a[S]="");for(S in I)I.hasOwnProperty(S)&&x[S]!==I[S]&&(a||(a={}),a[S]=I[S])}else a||(h||(h=[]),h.push(L,a)),a=I;else L==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,x=x?x.__html:void 0,I!=null&&x!==I&&(h=h||[]).push(L,I)):L==="children"?typeof I!="string"&&typeof I!="number"||(h=h||[]).push(L,""+I):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(i.hasOwnProperty(L)?(I!=null&&L==="onScroll"&&Xe("scroll",r),h||x===I||(h=[])):(h=h||[]).push(L,I))}a&&(h=h||[]).push("style",a);var L=h;(o.updateQueue=L)&&(o.flags|=4)}},Uw=function(r,o,a,u){a!==u&&(o.flags|=4)};function ra(r,o){if(!Ze)switch(r.tailMode){case"hidden":o=r.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:u.sibling=null}}function Nt(r){var o=r.alternate!==null&&r.alternate.child===r.child,a=0,u=0;if(o)for(var p=r.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags&14680064,u|=p.flags&14680064,p.return=r,p=p.sibling;else for(p=r.child;p!==null;)a|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=r,p=p.sibling;return r.subtreeFlags|=u,r.childLanes=a,o}function e8(r,o,a){var u=o.pendingProps;switch(rp(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(o),null;case 1:return Qt(o.type)&&uc(),Nt(o),null;case 3:return u=o.stateNode,Bo(),Je(Gt),Je(Pt),gp(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(mc(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,An!==null&&(Vp(An),An=null))),Lp(r,o),Nt(o),null;case 5:hp(o);var p=Ns(Ji.current);if(a=o.type,r!==null&&o.stateNode!=null)zw(r,o,a,u,p),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!u){if(o.stateNode===null)throw Error(n(166));return Nt(o),null}if(r=Ns(Gn.current),mc(o)){u=o.stateNode,a=o.type;var h=o.memoizedProps;switch(u[Vn]=o,u[Gi]=h,r=(o.mode&1)!==0,a){case"dialog":Xe("cancel",u),Xe("close",u);break;case"iframe":case"object":case"embed":Xe("load",u);break;case"video":case"audio":for(p=0;p<Wi.length;p++)Xe(Wi[p],u);break;case"source":Xe("error",u);break;case"img":case"image":case"link":Xe("error",u),Xe("load",u);break;case"details":Xe("toggle",u);break;case"input":Hn(u,h),Xe("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!h.multiple},Xe("invalid",u);break;case"textarea":Ye(u,h),Xe("invalid",u)}mf(a,h),p=null;for(var S in h)if(h.hasOwnProperty(S)){var x=h[S];S==="children"?typeof x=="string"?u.textContent!==x&&(h.suppressHydrationWarning!==!0&&ac(u.textContent,x,r),p=["children",x]):typeof x=="number"&&u.textContent!==""+x&&(h.suppressHydrationWarning!==!0&&ac(u.textContent,x,r),p=["children",""+x]):i.hasOwnProperty(S)&&x!=null&&S==="onScroll"&&Xe("scroll",u)}switch(a){case"input":xs(u),ks(u,h,!0);break;case"textarea":xs(u),Wn(u);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(u.onclick=lc)}u=p,o.updateQueue=u,u!==null&&(o.flags|=4)}else{S=p.nodeType===9?p:p.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=$l(a)),r==="http://www.w3.org/1999/xhtml"?a==="script"?(r=S.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof u.is=="string"?r=S.createElement(a,{is:u.is}):(r=S.createElement(a),a==="select"&&(S=r,u.multiple?S.multiple=!0:u.size&&(S.size=u.size))):r=S.createElementNS(r,a),r[Vn]=o,r[Gi]=u,Bw(r,o,!1,!1),o.stateNode=r;e:{switch(S=gf(a,u),a){case"dialog":Xe("cancel",r),Xe("close",r),p=u;break;case"iframe":case"object":case"embed":Xe("load",r),p=u;break;case"video":case"audio":for(p=0;p<Wi.length;p++)Xe(Wi[p],r);p=u;break;case"source":Xe("error",r),p=u;break;case"img":case"image":case"link":Xe("error",r),Xe("load",r),p=u;break;case"details":Xe("toggle",r),p=u;break;case"input":Hn(r,u),p=Cn(r,u),Xe("invalid",r);break;case"option":p=u;break;case"select":r._wrapperState={wasMultiple:!!u.multiple},p=J({},u,{value:void 0}),Xe("invalid",r);break;case"textarea":Ye(r,u),p=be(r,u),Xe("invalid",r);break;default:p=u}mf(a,p),x=p;for(h in x)if(x.hasOwnProperty(h)){var I=x[h];h==="style"?P1(r,I):h==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&R1(r,I)):h==="children"?typeof I=="string"?(a!=="textarea"||I!=="")&&ki(r,I):typeof I=="number"&&ki(r,""+I):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(i.hasOwnProperty(h)?I!=null&&h==="onScroll"&&Xe("scroll",r):I!=null&&$(r,h,I,S))}switch(a){case"input":xs(r),ks(r,u,!1);break;case"textarea":xs(r),Wn(r);break;case"option":u.value!=null&&r.setAttribute("value",""+je(u.value));break;case"select":r.multiple=!!u.multiple,h=u.value,h!=null?St(r,!!u.multiple,h,!1):u.defaultValue!=null&&St(r,!!u.multiple,u.defaultValue,!0);break;default:typeof p.onClick=="function"&&(r.onclick=lc)}switch(a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Nt(o),null;case 6:if(r&&o.stateNode!=null)Uw(r,o,r.memoizedProps,u);else{if(typeof u!="string"&&o.stateNode===null)throw Error(n(166));if(a=Ns(Ji.current),Ns(Gn.current),mc(o)){if(u=o.stateNode,a=o.memoizedProps,u[Vn]=o,(h=u.nodeValue!==a)&&(r=an,r!==null))switch(r.tag){case 3:ac(u.nodeValue,a,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ac(u.nodeValue,a,(r.mode&1)!==0)}h&&(o.flags|=4)}else u=(a.nodeType===9?a:a.ownerDocument).createTextNode(u),u[Vn]=o,o.stateNode=u}return Nt(o),null;case 13:if(Je(et),u=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Ze&&ln!==null&&o.mode&1&&!(o.flags&128))qS(),jo(),o.flags|=98560,h=!1;else if(h=mc(o),u!==null&&u.dehydrated!==null){if(r===null){if(!h)throw Error(n(318));if(h=o.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(n(317));h[Vn]=o}else jo(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;Nt(o),h=!1}else An!==null&&(Vp(An),An=null),h=!0;if(!h)return o.flags&65536?o:null}return o.flags&128?(o.lanes=a,o):(u=u!==null,u!==(r!==null&&r.memoizedState!==null)&&u&&(o.child.flags|=8192,o.mode&1&&(r===null||et.current&1?pt===0&&(pt=3):Yp())),o.updateQueue!==null&&(o.flags|=4),Nt(o),null);case 4:return Bo(),Lp(r,o),r===null&&qi(o.stateNode.containerInfo),Nt(o),null;case 10:return cp(o.type._context),Nt(o),null;case 17:return Qt(o.type)&&uc(),Nt(o),null;case 19:if(Je(et),h=o.memoizedState,h===null)return Nt(o),null;if(u=(o.flags&128)!==0,S=h.rendering,S===null)if(u)ra(h,!1);else{if(pt!==0||r!==null&&r.flags&128)for(r=o.child;r!==null;){if(S=_c(r),S!==null){for(o.flags|=128,ra(h,!1),u=S.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),o.subtreeFlags=0,u=a,a=o.child;a!==null;)h=a,r=u,h.flags&=14680066,S=h.alternate,S===null?(h.childLanes=0,h.lanes=r,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=S.childLanes,h.lanes=S.lanes,h.child=S.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=S.memoizedProps,h.memoizedState=S.memoizedState,h.updateQueue=S.updateQueue,h.type=S.type,r=S.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a=a.sibling;return Ke(et,et.current&1|2),o.child}r=r.sibling}h.tail!==null&&it()>Wo&&(o.flags|=128,u=!0,ra(h,!1),o.lanes=4194304)}else{if(!u)if(r=_c(S),r!==null){if(o.flags|=128,u=!0,a=r.updateQueue,a!==null&&(o.updateQueue=a,o.flags|=4),ra(h,!0),h.tail===null&&h.tailMode==="hidden"&&!S.alternate&&!Ze)return Nt(o),null}else 2*it()-h.renderingStartTime>Wo&&a!==1073741824&&(o.flags|=128,u=!0,ra(h,!1),o.lanes=4194304);h.isBackwards?(S.sibling=o.child,o.child=S):(a=h.last,a!==null?a.sibling=S:o.child=S,h.last=S)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=it(),o.sibling=null,a=et.current,Ke(et,u?a&1|2:a&1),o):(Nt(o),null);case 22:case 23:return Qp(),u=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==u&&(o.flags|=8192),u&&o.mode&1?cn&1073741824&&(Nt(o),o.subtreeFlags&6&&(o.flags|=8192)):Nt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function t8(r,o){switch(rp(o),o.tag){case 1:return Qt(o.type)&&uc(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Bo(),Je(Gt),Je(Pt),gp(),r=o.flags,r&65536&&!(r&128)?(o.flags=r&-65537|128,o):null;case 5:return hp(o),null;case 13:if(Je(et),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));jo()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Je(et),null;case 4:return Bo(),null;case 10:return cp(o.type._context),null;case 22:case 23:return Qp(),null;case 24:return null;default:return null}}var Ac=!1,Mt=!1,n8=typeof WeakSet=="function"?WeakSet:Set,te=null;function Uo(r,o){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){st(r,o,u)}else a.current=null}function jp(r,o,a){try{a()}catch(u){st(r,o,u)}}var Hw=!1;function r8(r,o){if(Qf=Kl,r=_S(),Bf(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var p=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var S=0,x=-1,I=-1,L=0,H=0,G=r,U=null;t:for(;;){for(var ee;G!==a||p!==0&&G.nodeType!==3||(x=S+p),G!==h||u!==0&&G.nodeType!==3||(I=S+u),G.nodeType===3&&(S+=G.nodeValue.length),(ee=G.firstChild)!==null;)U=G,G=ee;for(;;){if(G===r)break t;if(U===a&&++L===p&&(x=S),U===h&&++H===u&&(I=S),(ee=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=ee}a=x===-1||I===-1?null:{start:x,end:I}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yf={focusedElem:r,selectionRange:a},Kl=!1,te=o;te!==null;)if(o=te,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,te=r;else for(;te!==null;){o=te;try{var re=o.alternate;if(o.flags&1024)switch(o.tag){case 0:case 11:case 15:break;case 1:if(re!==null){var oe=re.memoizedProps,at=re.memoizedState,A=o.stateNode,C=A.getSnapshotBeforeUpdate(o.elementType===o.type?oe:Pn(o.type,oe),at);A.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var O=o.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Q){st(o,o.return,Q)}if(r=o.sibling,r!==null){r.return=o.return,te=r;break}te=o.return}return re=Hw,Hw=!1,re}function sa(r,o,a){var u=o.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&r)===r){var h=p.destroy;p.destroy=void 0,h!==void 0&&jp(o,a,h)}p=p.next}while(p!==u)}}function Pc(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var a=o=o.next;do{if((a.tag&r)===r){var u=a.create;a.destroy=u()}a=a.next}while(a!==o)}}function Dp(r){var o=r.ref;if(o!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof o=="function"?o(r):o.current=r}}function Ww(r){var o=r.alternate;o!==null&&(r.alternate=null,Ww(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Vn],delete o[Gi],delete o[Zf],delete o[$D],delete o[BD])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function qw(r){return r.tag===5||r.tag===3||r.tag===4}function Vw(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||qw(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Fp(r,o,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,o?a.nodeType===8?a.parentNode.insertBefore(r,o):a.insertBefore(r,o):(a.nodeType===8?(o=a.parentNode,o.insertBefore(r,a)):(o=a,o.appendChild(r)),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=lc));else if(u!==4&&(r=r.child,r!==null))for(Fp(r,o,a),r=r.sibling;r!==null;)Fp(r,o,a),r=r.sibling}function $p(r,o,a){var u=r.tag;if(u===5||u===6)r=r.stateNode,o?a.insertBefore(r,o):a.appendChild(r);else if(u!==4&&(r=r.child,r!==null))for($p(r,o,a),r=r.sibling;r!==null;)$p(r,o,a),r=r.sibling}var bt=null,On=!1;function Yr(r,o,a){for(a=a.child;a!==null;)Gw(r,o,a),a=a.sibling}function Gw(r,o,a){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(Wl,a)}catch{}switch(a.tag){case 5:Mt||Uo(a,o);case 6:var u=bt,p=On;bt=null,Yr(r,o,a),bt=u,On=p,bt!==null&&(On?(r=bt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):bt.removeChild(a.stateNode));break;case 18:bt!==null&&(On?(r=bt,a=a.stateNode,r.nodeType===8?Jf(r.parentNode,a):r.nodeType===1&&Jf(r,a),ji(r)):Jf(bt,a.stateNode));break;case 4:u=bt,p=On,bt=a.stateNode.containerInfo,On=!0,Yr(r,o,a),bt=u,On=p;break;case 0:case 11:case 14:case 15:if(!Mt&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var h=p,S=h.destroy;h=h.tag,S!==void 0&&(h&2||h&4)&&jp(a,o,S),p=p.next}while(p!==u)}Yr(r,o,a);break;case 1:if(!Mt&&(Uo(a,o),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(x){st(a,o,x)}Yr(r,o,a);break;case 21:Yr(r,o,a);break;case 22:a.mode&1?(Mt=(u=Mt)||a.memoizedState!==null,Yr(r,o,a),Mt=u):Yr(r,o,a);break;default:Yr(r,o,a)}}function Qw(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new n8),o.forEach(function(u){var p=f8.bind(null,r,u);a.has(u)||(a.add(u),u.then(p,p))})}}function Nn(r,o){var a=o.deletions;if(a!==null)for(var u=0;u<a.length;u++){var p=a[u];try{var h=r,S=o,x=S;e:for(;x!==null;){switch(x.tag){case 5:bt=x.stateNode,On=!1;break e;case 3:bt=x.stateNode.containerInfo,On=!0;break e;case 4:bt=x.stateNode.containerInfo,On=!0;break e}x=x.return}if(bt===null)throw Error(n(160));Gw(h,S,p),bt=null,On=!1;var I=p.alternate;I!==null&&(I.return=null),p.return=null}catch(L){st(p,o,L)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Yw(o,r),o=o.sibling}function Yw(r,o){var a=r.alternate,u=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Nn(o,r),Yn(r),u&4){try{sa(3,r,r.return),Pc(3,r)}catch(oe){st(r,r.return,oe)}try{sa(5,r,r.return)}catch(oe){st(r,r.return,oe)}}break;case 1:Nn(o,r),Yn(r),u&512&&a!==null&&Uo(a,a.return);break;case 5:if(Nn(o,r),Yn(r),u&512&&a!==null&&Uo(a,a.return),r.flags&32){var p=r.stateNode;try{ki(p,"")}catch(oe){st(r,r.return,oe)}}if(u&4&&(p=r.stateNode,p!=null)){var h=r.memoizedProps,S=a!==null?a.memoizedProps:h,x=r.type,I=r.updateQueue;if(r.updateQueue=null,I!==null)try{x==="input"&&h.type==="radio"&&h.name!=null&&_o(p,h),gf(x,S);var L=gf(x,h);for(S=0;S<I.length;S+=2){var H=I[S],G=I[S+1];H==="style"?P1(p,G):H==="dangerouslySetInnerHTML"?R1(p,G):H==="children"?ki(p,G):$(p,H,G,L)}switch(x){case"input":Ts(p,h);break;case"textarea":Le(p,h);break;case"select":var U=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!h.multiple;var ee=h.value;ee!=null?St(p,!!h.multiple,ee,!1):U!==!!h.multiple&&(h.defaultValue!=null?St(p,!!h.multiple,h.defaultValue,!0):St(p,!!h.multiple,h.multiple?[]:"",!1))}p[Gi]=h}catch(oe){st(r,r.return,oe)}}break;case 6:if(Nn(o,r),Yn(r),u&4){if(r.stateNode===null)throw Error(n(162));p=r.stateNode,h=r.memoizedProps;try{p.nodeValue=h}catch(oe){st(r,r.return,oe)}}break;case 3:if(Nn(o,r),Yn(r),u&4&&a!==null&&a.memoizedState.isDehydrated)try{ji(o.containerInfo)}catch(oe){st(r,r.return,oe)}break;case 4:Nn(o,r),Yn(r);break;case 13:Nn(o,r),Yn(r),p=r.child,p.flags&8192&&(h=p.memoizedState!==null,p.stateNode.isHidden=h,!h||p.alternate!==null&&p.alternate.memoizedState!==null||(Up=it())),u&4&&Qw(r);break;case 22:if(H=a!==null&&a.memoizedState!==null,r.mode&1?(Mt=(L=Mt)||H,Nn(o,r),Mt=L):Nn(o,r),Yn(r),u&8192){if(L=r.memoizedState!==null,(r.stateNode.isHidden=L)&&!H&&r.mode&1)for(te=r,H=r.child;H!==null;){for(G=te=H;te!==null;){switch(U=te,ee=U.child,U.tag){case 0:case 11:case 14:case 15:sa(4,U,U.return);break;case 1:Uo(U,U.return);var re=U.stateNode;if(typeof re.componentWillUnmount=="function"){u=U,a=U.return;try{o=u,re.props=o.memoizedProps,re.state=o.memoizedState,re.componentWillUnmount()}catch(oe){st(u,a,oe)}}break;case 5:Uo(U,U.return);break;case 22:if(U.memoizedState!==null){Jw(G);continue}}ee!==null?(ee.return=U,te=ee):Jw(G)}H=H.sibling}e:for(H=null,G=r;;){if(G.tag===5){if(H===null){H=G;try{p=G.stateNode,L?(h=p.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(x=G.stateNode,I=G.memoizedProps.style,S=I!=null&&I.hasOwnProperty("display")?I.display:null,x.style.display=A1("display",S))}catch(oe){st(r,r.return,oe)}}}else if(G.tag===6){if(H===null)try{G.stateNode.nodeValue=L?"":G.memoizedProps}catch(oe){st(r,r.return,oe)}}else if((G.tag!==22&&G.tag!==23||G.memoizedState===null||G===r)&&G.child!==null){G.child.return=G,G=G.child;continue}if(G===r)break e;for(;G.sibling===null;){if(G.return===null||G.return===r)break e;H===G&&(H=null),G=G.return}H===G&&(H=null),G.sibling.return=G.return,G=G.sibling}}break;case 19:Nn(o,r),Yn(r),u&4&&Qw(r);break;case 21:break;default:Nn(o,r),Yn(r)}}function Yn(r){var o=r.flags;if(o&2){try{e:{for(var a=r.return;a!==null;){if(qw(a)){var u=a;break e}a=a.return}throw Error(n(160))}switch(u.tag){case 5:var p=u.stateNode;u.flags&32&&(ki(p,""),u.flags&=-33);var h=Vw(r);$p(r,h,p);break;case 3:case 4:var S=u.stateNode.containerInfo,x=Vw(r);Fp(r,x,S);break;default:throw Error(n(161))}}catch(I){st(r,r.return,I)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function s8(r,o,a){te=r,Kw(r)}function Kw(r,o,a){for(var u=(r.mode&1)!==0;te!==null;){var p=te,h=p.child;if(p.tag===22&&u){var S=p.memoizedState!==null||Ac;if(!S){var x=p.alternate,I=x!==null&&x.memoizedState!==null||Mt;x=Ac;var L=Mt;if(Ac=S,(Mt=I)&&!L)for(te=p;te!==null;)S=te,I=S.child,S.tag===22&&S.memoizedState!==null?Zw(p):I!==null?(I.return=S,te=I):Zw(p);for(;h!==null;)te=h,Kw(h),h=h.sibling;te=p,Ac=x,Mt=L}Xw(r)}else p.subtreeFlags&8772&&h!==null?(h.return=p,te=h):Xw(r)}}function Xw(r){for(;te!==null;){var o=te;if(o.flags&8772){var a=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:Mt||Pc(5,o);break;case 1:var u=o.stateNode;if(o.flags&4&&!Mt)if(a===null)u.componentDidMount();else{var p=o.elementType===o.type?a.memoizedProps:Pn(o.type,a.memoizedProps);u.componentDidUpdate(p,a.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var h=o.updateQueue;h!==null&&JS(o,h,u);break;case 3:var S=o.updateQueue;if(S!==null){if(a=null,o.child!==null)switch(o.child.tag){case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}JS(o,S,a)}break;case 5:var x=o.stateNode;if(a===null&&o.flags&4){a=x;var I=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&a.focus();break;case"img":I.src&&(a.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var L=o.alternate;if(L!==null){var H=L.memoizedState;if(H!==null){var G=H.dehydrated;G!==null&&ji(G)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Mt||o.flags&512&&Dp(o)}catch(U){st(o,o.return,U)}}if(o===r){te=null;break}if(a=o.sibling,a!==null){a.return=o.return,te=a;break}te=o.return}}function Jw(r){for(;te!==null;){var o=te;if(o===r){te=null;break}var a=o.sibling;if(a!==null){a.return=o.return,te=a;break}te=o.return}}function Zw(r){for(;te!==null;){var o=te;try{switch(o.tag){case 0:case 11:case 15:var a=o.return;try{Pc(4,o)}catch(I){st(o,a,I)}break;case 1:var u=o.stateNode;if(typeof u.componentDidMount=="function"){var p=o.return;try{u.componentDidMount()}catch(I){st(o,p,I)}}var h=o.return;try{Dp(o)}catch(I){st(o,h,I)}break;case 5:var S=o.return;try{Dp(o)}catch(I){st(o,S,I)}}}catch(I){st(o,o.return,I)}if(o===r){te=null;break}var x=o.sibling;if(x!==null){x.return=o.return,te=x;break}te=o.return}}var o8=Math.ceil,Oc=q.ReactCurrentDispatcher,Bp=q.ReactCurrentOwner,wn=q.ReactCurrentBatchConfig,De=0,_t=null,ct=null,Rt=0,cn=0,Ho=Wr(0),pt=0,oa=null,Ls=0,Nc=0,zp=0,ia=null,Kt=null,Up=0,Wo=1/0,gr=null,Mc=!1,Hp=null,Kr=null,Lc=!1,Xr=null,jc=0,aa=0,Wp=null,Dc=-1,Fc=0;function zt(){return De&6?it():Dc!==-1?Dc:Dc=it()}function Jr(r){return r.mode&1?De&2&&Rt!==0?Rt&-Rt:UD.transition!==null?(Fc===0&&(Fc=V1()),Fc):(r=Ue,r!==0||(r=window.event,r=r===void 0?16:tS(r.type)),r):1}function Mn(r,o,a,u){if(50<aa)throw aa=0,Wp=null,Error(n(185));Pi(r,a,u),(!(De&2)||r!==_t)&&(r===_t&&(!(De&2)&&(Nc|=a),pt===4&&Zr(r,Rt)),Xt(r,u),a===1&&De===0&&!(o.mode&1)&&(Wo=it()+500,fc&&Vr()))}function Xt(r,o){var a=r.callbackNode;U5(r,o);var u=Gl(r,r===_t?Rt:0);if(u===0)a!==null&&H1(a),r.callbackNode=null,r.callbackPriority=0;else if(o=u&-u,r.callbackPriority!==o){if(a!=null&&H1(a),o===1)r.tag===0?zD(t_.bind(null,r)):BS(t_.bind(null,r)),DD(function(){!(De&6)&&Vr()}),a=null;else{switch(G1(u)){case 1:a=xf;break;case 4:a=W1;break;case 16:a=Hl;break;case 536870912:a=q1;break;default:a=Hl}a=c_(a,e_.bind(null,r))}r.callbackPriority=o,r.callbackNode=a}}function e_(r,o){if(Dc=-1,Fc=0,De&6)throw Error(n(327));var a=r.callbackNode;if(qo()&&r.callbackNode!==a)return null;var u=Gl(r,r===_t?Rt:0);if(u===0)return null;if(u&30||u&r.expiredLanes||o)o=$c(r,u);else{o=u;var p=De;De|=2;var h=r_();(_t!==r||Rt!==o)&&(gr=null,Wo=it()+500,Ds(r,o));do try{l8();break}catch(x){n_(r,x)}while(!0);lp(),Oc.current=h,De=p,ct!==null?o=0:(_t=null,Rt=0,o=pt)}if(o!==0){if(o===2&&(p=Tf(r),p!==0&&(u=p,o=qp(r,p))),o===1)throw a=oa,Ds(r,0),Zr(r,u),Xt(r,it()),a;if(o===6)Zr(r,u);else{if(p=r.current.alternate,!(u&30)&&!i8(p)&&(o=$c(r,u),o===2&&(h=Tf(r),h!==0&&(u=h,o=qp(r,h))),o===1))throw a=oa,Ds(r,0),Zr(r,u),Xt(r,it()),a;switch(r.finishedWork=p,r.finishedLanes=u,o){case 0:case 1:throw Error(n(345));case 2:Fs(r,Kt,gr);break;case 3:if(Zr(r,u),(u&130023424)===u&&(o=Up+500-it(),10<o)){if(Gl(r,0)!==0)break;if(p=r.suspendedLanes,(p&u)!==u){zt(),r.pingedLanes|=r.suspendedLanes&p;break}r.timeoutHandle=Xf(Fs.bind(null,r,Kt,gr),o);break}Fs(r,Kt,gr);break;case 4:if(Zr(r,u),(u&4194240)===u)break;for(o=r.eventTimes,p=-1;0<u;){var S=31-bn(u);h=1<<S,S=o[S],S>p&&(p=S),u&=~h}if(u=p,u=it()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*o8(u/1960))-u,10<u){r.timeoutHandle=Xf(Fs.bind(null,r,Kt,gr),u);break}Fs(r,Kt,gr);break;case 5:Fs(r,Kt,gr);break;default:throw Error(n(329))}}}return Xt(r,it()),r.callbackNode===a?e_.bind(null,r):null}function qp(r,o){var a=ia;return r.current.memoizedState.isDehydrated&&(Ds(r,o).flags|=256),r=$c(r,o),r!==2&&(o=Kt,Kt=a,o!==null&&Vp(o)),r}function Vp(r){Kt===null?Kt=r:Kt.push.apply(Kt,r)}function i8(r){for(var o=r;;){if(o.flags&16384){var a=o.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var u=0;u<a.length;u++){var p=a[u],h=p.getSnapshot;p=p.value;try{if(!Rn(h(),p))return!1}catch{return!1}}}if(a=o.child,o.subtreeFlags&16384&&a!==null)a.return=o,o=a;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Zr(r,o){for(o&=~zp,o&=~Nc,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var a=31-bn(o),u=1<<a;r[a]=-1,o&=~u}}function t_(r){if(De&6)throw Error(n(327));qo();var o=Gl(r,0);if(!(o&1))return Xt(r,it()),null;var a=$c(r,o);if(r.tag!==0&&a===2){var u=Tf(r);u!==0&&(o=u,a=qp(r,u))}if(a===1)throw a=oa,Ds(r,0),Zr(r,o),Xt(r,it()),a;if(a===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Fs(r,Kt,gr),Xt(r,it()),null}function Gp(r,o){var a=De;De|=1;try{return r(o)}finally{De=a,De===0&&(Wo=it()+500,fc&&Vr())}}function js(r){Xr!==null&&Xr.tag===0&&!(De&6)&&qo();var o=De;De|=1;var a=wn.transition,u=Ue;try{if(wn.transition=null,Ue=1,r)return r()}finally{Ue=u,wn.transition=a,De=o,!(De&6)&&Vr()}}function Qp(){cn=Ho.current,Je(Ho)}function Ds(r,o){r.finishedWork=null,r.finishedLanes=0;var a=r.timeoutHandle;if(a!==-1&&(r.timeoutHandle=-1,jD(a)),ct!==null)for(a=ct.return;a!==null;){var u=a;switch(rp(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&uc();break;case 3:Bo(),Je(Gt),Je(Pt),gp();break;case 5:hp(u);break;case 4:Bo();break;case 13:Je(et);break;case 19:Je(et);break;case 10:cp(u.type._context);break;case 22:case 23:Qp()}a=a.return}if(_t=r,ct=r=es(r.current,null),Rt=cn=o,pt=0,oa=null,zp=Nc=Ls=0,Kt=ia=null,Os!==null){for(o=0;o<Os.length;o++)if(a=Os[o],u=a.interleaved,u!==null){a.interleaved=null;var p=u.next,h=a.pending;if(h!==null){var S=h.next;h.next=p,u.next=S}a.pending=u}Os=null}return r}function n_(r,o){do{var a=ct;try{if(lp(),Ec.current=Ic,xc){for(var u=tt.memoizedState;u!==null;){var p=u.queue;p!==null&&(p.pending=null),u=u.next}xc=!1}if(Ms=0,wt=ft=tt=null,Zi=!1,ea=0,Bp.current=null,a===null||a.return===null){pt=1,oa=o,ct=null;break}e:{var h=r,S=a.return,x=a,I=o;if(o=Rt,x.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var L=I,H=x,G=H.tag;if(!(H.mode&1)&&(G===0||G===11||G===15)){var U=H.alternate;U?(H.updateQueue=U.updateQueue,H.memoizedState=U.memoizedState,H.lanes=U.lanes):(H.updateQueue=null,H.memoizedState=null)}var ee=Cw(S);if(ee!==null){ee.flags&=-257,bw(ee,S,x,h,o),ee.mode&1&&Iw(h,L,o),o=ee,I=L;var re=o.updateQueue;if(re===null){var oe=new Set;oe.add(I),o.updateQueue=oe}else re.add(I);break e}else{if(!(o&1)){Iw(h,L,o),Yp();break e}I=Error(n(426))}}else if(Ze&&x.mode&1){var at=Cw(S);if(at!==null){!(at.flags&65536)&&(at.flags|=256),bw(at,S,x,h,o),ip(zo(I,x));break e}}h=I=zo(I,x),pt!==4&&(pt=2),ia===null?ia=[h]:ia.push(h),h=S;do{switch(h.tag){case 3:h.flags|=65536,o&=-o,h.lanes|=o;var A=Tw(h,I,o);XS(h,A);break e;case 1:x=I;var C=h.type,O=h.stateNode;if(!(h.flags&128)&&(typeof C.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Kr===null||!Kr.has(O)))){h.flags|=65536,o&=-o,h.lanes|=o;var Q=kw(h,x,o);XS(h,Q);break e}}h=h.return}while(h!==null)}o_(a)}catch(ae){o=ae,ct===a&&a!==null&&(ct=a=a.return);continue}break}while(!0)}function r_(){var r=Oc.current;return Oc.current=Ic,r===null?Ic:r}function Yp(){(pt===0||pt===3||pt===2)&&(pt=4),_t===null||!(Ls&268435455)&&!(Nc&268435455)||Zr(_t,Rt)}function $c(r,o){var a=De;De|=2;var u=r_();(_t!==r||Rt!==o)&&(gr=null,Ds(r,o));do try{a8();break}catch(p){n_(r,p)}while(!0);if(lp(),De=a,Oc.current=u,ct!==null)throw Error(n(261));return _t=null,Rt=0,pt}function a8(){for(;ct!==null;)s_(ct)}function l8(){for(;ct!==null&&!N5();)s_(ct)}function s_(r){var o=l_(r.alternate,r,cn);r.memoizedProps=r.pendingProps,o===null?o_(r):ct=o,Bp.current=null}function o_(r){var o=r;do{var a=o.alternate;if(r=o.return,o.flags&32768){if(a=t8(a,o),a!==null){a.flags&=32767,ct=a;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{pt=6,ct=null;return}}else if(a=e8(a,o,cn),a!==null){ct=a;return}if(o=o.sibling,o!==null){ct=o;return}ct=o=r}while(o!==null);pt===0&&(pt=5)}function Fs(r,o,a){var u=Ue,p=wn.transition;try{wn.transition=null,Ue=1,c8(r,o,a,u)}finally{wn.transition=p,Ue=u}return null}function c8(r,o,a,u){do qo();while(Xr!==null);if(De&6)throw Error(n(327));a=r.finishedWork;var p=r.finishedLanes;if(a===null)return null;if(r.finishedWork=null,r.finishedLanes=0,a===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var h=a.lanes|a.childLanes;if(H5(r,h),r===_t&&(ct=_t=null,Rt=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||Lc||(Lc=!0,c_(Hl,function(){return qo(),null})),h=(a.flags&15990)!==0,a.subtreeFlags&15990||h){h=wn.transition,wn.transition=null;var S=Ue;Ue=1;var x=De;De|=4,Bp.current=null,r8(r,a),Yw(a,r),RD(Yf),Kl=!!Qf,Yf=Qf=null,r.current=a,s8(a),M5(),De=x,Ue=S,wn.transition=h}else r.current=a;if(Lc&&(Lc=!1,Xr=r,jc=p),h=r.pendingLanes,h===0&&(Kr=null),D5(a.stateNode),Xt(r,it()),o!==null)for(u=r.onRecoverableError,a=0;a<o.length;a++)p=o[a],u(p.value,{componentStack:p.stack,digest:p.digest});if(Mc)throw Mc=!1,r=Hp,Hp=null,r;return jc&1&&r.tag!==0&&qo(),h=r.pendingLanes,h&1?r===Wp?aa++:(aa=0,Wp=r):aa=0,Vr(),null}function qo(){if(Xr!==null){var r=G1(jc),o=wn.transition,a=Ue;try{if(wn.transition=null,Ue=16>r?16:r,Xr===null)var u=!1;else{if(r=Xr,Xr=null,jc=0,De&6)throw Error(n(331));var p=De;for(De|=4,te=r.current;te!==null;){var h=te,S=h.child;if(te.flags&16){var x=h.deletions;if(x!==null){for(var I=0;I<x.length;I++){var L=x[I];for(te=L;te!==null;){var H=te;switch(H.tag){case 0:case 11:case 15:sa(8,H,h)}var G=H.child;if(G!==null)G.return=H,te=G;else for(;te!==null;){H=te;var U=H.sibling,ee=H.return;if(Ww(H),H===L){te=null;break}if(U!==null){U.return=ee,te=U;break}te=ee}}}var re=h.alternate;if(re!==null){var oe=re.child;if(oe!==null){re.child=null;do{var at=oe.sibling;oe.sibling=null,oe=at}while(oe!==null)}}te=h}}if(h.subtreeFlags&2064&&S!==null)S.return=h,te=S;else e:for(;te!==null;){if(h=te,h.flags&2048)switch(h.tag){case 0:case 11:case 15:sa(9,h,h.return)}var A=h.sibling;if(A!==null){A.return=h.return,te=A;break e}te=h.return}}var C=r.current;for(te=C;te!==null;){S=te;var O=S.child;if(S.subtreeFlags&2064&&O!==null)O.return=S,te=O;else e:for(S=C;te!==null;){if(x=te,x.flags&2048)try{switch(x.tag){case 0:case 11:case 15:Pc(9,x)}}catch(ae){st(x,x.return,ae)}if(x===S){te=null;break e}var Q=x.sibling;if(Q!==null){Q.return=x.return,te=Q;break e}te=x.return}}if(De=p,Vr(),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot(Wl,r)}catch{}u=!0}return u}finally{Ue=a,wn.transition=o}}return!1}function i_(r,o,a){o=zo(a,o),o=Tw(r,o,1),r=Qr(r,o,1),o=zt(),r!==null&&(Pi(r,1,o),Xt(r,o))}function st(r,o,a){if(r.tag===3)i_(r,r,a);else for(;o!==null;){if(o.tag===3){i_(o,r,a);break}else if(o.tag===1){var u=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Kr===null||!Kr.has(u))){r=zo(a,r),r=kw(o,r,1),o=Qr(o,r,1),r=zt(),o!==null&&(Pi(o,1,r),Xt(o,r));break}}o=o.return}}function u8(r,o,a){var u=r.pingCache;u!==null&&u.delete(o),o=zt(),r.pingedLanes|=r.suspendedLanes&a,_t===r&&(Rt&a)===a&&(pt===4||pt===3&&(Rt&130023424)===Rt&&500>it()-Up?Ds(r,0):zp|=a),Xt(r,o)}function a_(r,o){o===0&&(r.mode&1?(o=Vl,Vl<<=1,!(Vl&130023424)&&(Vl=4194304)):o=1);var a=zt();r=pr(r,o),r!==null&&(Pi(r,o,a),Xt(r,a))}function d8(r){var o=r.memoizedState,a=0;o!==null&&(a=o.retryLane),a_(r,a)}function f8(r,o){var a=0;switch(r.tag){case 13:var u=r.stateNode,p=r.memoizedState;p!==null&&(a=p.retryLane);break;case 19:u=r.stateNode;break;default:throw Error(n(314))}u!==null&&u.delete(o),a_(r,a)}var l_;l_=function(r,o,a){if(r!==null)if(r.memoizedProps!==o.pendingProps||Gt.current)Yt=!0;else{if(!(r.lanes&a)&&!(o.flags&128))return Yt=!1,ZD(r,o,a);Yt=!!(r.flags&131072)}else Yt=!1,Ze&&o.flags&1048576&&zS(o,hc,o.index);switch(o.lanes=0,o.tag){case 2:var u=o.type;Rc(r,o),r=o.pendingProps;var p=No(o,Pt.current);$o(o,a),p=Sp(null,o,u,r,p,a);var h=wp();return o.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Qt(u)?(h=!0,dc(o)):h=!1,o.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,fp(o),p.updater=Cc,o.stateNode=p,p._reactInternals=o,Ip(o,u,r,a),o=Ap(null,o,u,!0,h,a)):(o.tag=0,Ze&&h&&np(o),Bt(null,o,p,a),o=o.child),o;case 16:u=o.elementType;e:{switch(Rc(r,o),r=o.pendingProps,p=u._init,u=p(u._payload),o.type=u,p=o.tag=h8(u),r=Pn(u,r),p){case 0:o=Rp(null,o,u,r,a);break e;case 1:o=Mw(null,o,u,r,a);break e;case 11:o=Rw(null,o,u,r,a);break e;case 14:o=Aw(null,o,u,Pn(u.type,r),a);break e}throw Error(n(306,u,""))}return o;case 0:return u=o.type,p=o.pendingProps,p=o.elementType===u?p:Pn(u,p),Rp(r,o,u,p,a);case 1:return u=o.type,p=o.pendingProps,p=o.elementType===u?p:Pn(u,p),Mw(r,o,u,p,a);case 3:e:{if(Lw(o),r===null)throw Error(n(387));u=o.pendingProps,h=o.memoizedState,p=h.element,KS(r,o),wc(o,u,null,a);var S=o.memoizedState;if(u=S.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=h,o.memoizedState=h,o.flags&256){p=zo(Error(n(423)),o),o=jw(r,o,u,a,p);break e}else if(u!==p){p=zo(Error(n(424)),o),o=jw(r,o,u,a,p);break e}else for(ln=Hr(o.stateNode.containerInfo.firstChild),an=o,Ze=!0,An=null,a=QS(o,null,u,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(jo(),u===p){o=mr(r,o,a);break e}Bt(r,o,u,a)}o=o.child}return o;case 5:return ZS(o),r===null&&op(o),u=o.type,p=o.pendingProps,h=r!==null?r.memoizedProps:null,S=p.children,Kf(u,p)?S=null:h!==null&&Kf(u,h)&&(o.flags|=32),Nw(r,o),Bt(r,o,S,a),o.child;case 6:return r===null&&op(o),null;case 13:return Dw(r,o,a);case 4:return pp(o,o.stateNode.containerInfo),u=o.pendingProps,r===null?o.child=Do(o,null,u,a):Bt(r,o,u,a),o.child;case 11:return u=o.type,p=o.pendingProps,p=o.elementType===u?p:Pn(u,p),Rw(r,o,u,p,a);case 7:return Bt(r,o,o.pendingProps,a),o.child;case 8:return Bt(r,o,o.pendingProps.children,a),o.child;case 12:return Bt(r,o,o.pendingProps.children,a),o.child;case 10:e:{if(u=o.type._context,p=o.pendingProps,h=o.memoizedProps,S=p.value,Ke(yc,u._currentValue),u._currentValue=S,h!==null)if(Rn(h.value,S)){if(h.children===p.children&&!Gt.current){o=mr(r,o,a);break e}}else for(h=o.child,h!==null&&(h.return=o);h!==null;){var x=h.dependencies;if(x!==null){S=h.child;for(var I=x.firstContext;I!==null;){if(I.context===u){if(h.tag===1){I=hr(-1,a&-a),I.tag=2;var L=h.updateQueue;if(L!==null){L=L.shared;var H=L.pending;H===null?I.next=I:(I.next=H.next,H.next=I),L.pending=I}}h.lanes|=a,I=h.alternate,I!==null&&(I.lanes|=a),up(h.return,a,o),x.lanes|=a;break}I=I.next}}else if(h.tag===10)S=h.type===o.type?null:h.child;else if(h.tag===18){if(S=h.return,S===null)throw Error(n(341));S.lanes|=a,x=S.alternate,x!==null&&(x.lanes|=a),up(S,a,o),S=h.sibling}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===o){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}Bt(r,o,p.children,a),o=o.child}return o;case 9:return p=o.type,u=o.pendingProps.children,$o(o,a),p=vn(p),u=u(p),o.flags|=1,Bt(r,o,u,a),o.child;case 14:return u=o.type,p=Pn(u,o.pendingProps),p=Pn(u.type,p),Aw(r,o,u,p,a);case 15:return Pw(r,o,o.type,o.pendingProps,a);case 17:return u=o.type,p=o.pendingProps,p=o.elementType===u?p:Pn(u,p),Rc(r,o),o.tag=1,Qt(u)?(r=!0,dc(o)):r=!1,$o(o,a),Ew(o,u,p),Ip(o,u,p,a),Ap(null,o,u,!0,r,a);case 19:return $w(r,o,a);case 22:return Ow(r,o,a)}throw Error(n(156,o.tag))};function c_(r,o){return U1(r,o)}function p8(r,o,a,u){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(r,o,a,u){return new p8(r,o,a,u)}function Kp(r){return r=r.prototype,!(!r||!r.isReactComponent)}function h8(r){if(typeof r=="function")return Kp(r)?1:0;if(r!=null){if(r=r.$$typeof,r===ie)return 11;if(r===He)return 14}return 2}function es(r,o){var a=r.alternate;return a===null?(a=_n(r.tag,o,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=o,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,o=r.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function Bc(r,o,a,u,p,h){var S=2;if(u=r,typeof r=="function")Kp(r)&&(S=1);else if(typeof r=="string")S=5;else e:switch(r){case D:return $s(a.children,p,h,o);case Y:S=8,p|=8;break;case K:return r=_n(12,a,o,p|2),r.elementType=K,r.lanes=h,r;case ge:return r=_n(13,a,o,p),r.elementType=ge,r.lanes=h,r;case Ce:return r=_n(19,a,o,p),r.elementType=Ce,r.lanes=h,r;case Ee:return zc(a,p,h,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case V:S=10;break e;case se:S=9;break e;case ie:S=11;break e;case He:S=14;break e;case le:S=16,u=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=_n(S,a,o,p),o.elementType=r,o.type=u,o.lanes=h,o}function $s(r,o,a,u){return r=_n(7,r,u,o),r.lanes=a,r}function zc(r,o,a,u){return r=_n(22,r,u,o),r.elementType=Ee,r.lanes=a,r.stateNode={isHidden:!1},r}function Xp(r,o,a){return r=_n(6,r,null,o),r.lanes=a,r}function Jp(r,o,a){return o=_n(4,r.children!==null?r.children:[],r.key,o),o.lanes=a,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function m8(r,o,a,u,p){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kf(0),this.expirationTimes=kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kf(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Zp(r,o,a,u,p,h,S,x,I){return r=new m8(r,o,a,x,I),o===1?(o=1,h===!0&&(o|=8)):o=0,h=_n(3,null,null,o),r.current=h,h.stateNode=r,h.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},fp(h),r}function g8(r,o,a){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:u==null?null:""+u,children:r,containerInfo:o,implementation:a}}function u_(r){if(!r)return qr;r=r._reactInternals;e:{if(Cs(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Qt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var a=r.type;if(Qt(a))return FS(r,a,o)}return o}function d_(r,o,a,u,p,h,S,x,I){return r=Zp(a,u,!0,r,p,h,S,x,I),r.context=u_(null),a=r.current,u=zt(),p=Jr(a),h=hr(u,p),h.callback=o??null,Qr(a,h,p),r.current.lanes=p,Pi(r,p,u),Xt(r,u),r}function Uc(r,o,a,u){var p=o.current,h=zt(),S=Jr(p);return a=u_(a),o.context===null?o.context=a:o.pendingContext=a,o=hr(h,S),o.payload={element:r},u=u===void 0?null:u,u!==null&&(o.callback=u),r=Qr(p,o,S),r!==null&&(Mn(r,p,S,h),Sc(r,p,S)),S}function Hc(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function f_(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<o?a:o}}function eh(r,o){f_(r,o),(r=r.alternate)&&f_(r,o)}function y8(){return null}var p_=typeof reportError=="function"?reportError:function(r){console.error(r)};function th(r){this._internalRoot=r}Wc.prototype.render=th.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Uc(r,o,null,null)},Wc.prototype.unmount=th.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;js(function(){Uc(null,r,null,null)}),o[cr]=null}};function Wc(r){this._internalRoot=r}Wc.prototype.unstable_scheduleHydration=function(r){if(r){var o=K1();r={blockedOn:null,target:r,priority:o};for(var a=0;a<Br.length&&o!==0&&o<Br[a].priority;a++);Br.splice(a,0,r),a===0&&Z1(r)}};function nh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function qc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function h_(){}function v8(r,o,a,u,p){if(p){if(typeof u=="function"){var h=u;u=function(){var L=Hc(S);h.call(L)}}var S=d_(o,u,r,0,null,!1,!1,"",h_);return r._reactRootContainer=S,r[cr]=S.current,qi(r.nodeType===8?r.parentNode:r),js(),S}for(;p=r.lastChild;)r.removeChild(p);if(typeof u=="function"){var x=u;u=function(){var L=Hc(I);x.call(L)}}var I=Zp(r,0,!1,null,null,!1,!1,"",h_);return r._reactRootContainer=I,r[cr]=I.current,qi(r.nodeType===8?r.parentNode:r),js(function(){Uc(o,I,a,u)}),I}function Vc(r,o,a,u,p){var h=a._reactRootContainer;if(h){var S=h;if(typeof p=="function"){var x=p;p=function(){var I=Hc(S);x.call(I)}}Uc(o,S,r,p)}else S=v8(a,o,r,p,u);return Hc(S)}Q1=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var a=Ai(o.pendingLanes);a!==0&&(If(o,a|1),Xt(o,it()),!(De&6)&&(Wo=it()+500,Vr()))}break;case 13:js(function(){var u=pr(r,1);if(u!==null){var p=zt();Mn(u,r,1,p)}}),eh(r,1)}},Cf=function(r){if(r.tag===13){var o=pr(r,134217728);if(o!==null){var a=zt();Mn(o,r,134217728,a)}eh(r,134217728)}},Y1=function(r){if(r.tag===13){var o=Jr(r),a=pr(r,o);if(a!==null){var u=zt();Mn(a,r,o,u)}eh(r,o)}},K1=function(){return Ue},X1=function(r,o){var a=Ue;try{return Ue=r,o()}finally{Ue=a}},Sf=function(r,o,a){switch(o){case"input":if(Ts(r,a),o=a.name,a.type==="radio"&&o!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<a.length;o++){var u=a[o];if(u!==r&&u.form===r.form){var p=cc(u);if(!p)throw Error(n(90));Fl(u),Ts(u,p)}}}break;case"textarea":Le(r,a);break;case"select":o=a.value,o!=null&&St(r,!!a.multiple,o,!1)}},L1=Gp,j1=js;var S8={usingClientEntryPoint:!1,Events:[Qi,Po,cc,N1,M1,Gp]},la={findFiberByHostInstance:bs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w8={bundleType:la.bundleType,version:la.version,rendererPackageName:la.rendererPackageName,rendererConfig:la.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=B1(r),r===null?null:r.stateNode},findFiberByHostInstance:la.findFiberByHostInstance||y8,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{Wl=Gc.inject(w8),qn=Gc}catch{}}return Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S8,Ut.createPortal=function(r,o){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nh(o))throw Error(n(200));return g8(r,o,null,a)},Ut.createRoot=function(r,o){if(!nh(r))throw Error(n(299));var a=!1,u="",p=p_;return o!=null&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(u=o.identifierPrefix),o.onRecoverableError!==void 0&&(p=o.onRecoverableError)),o=Zp(r,1,!1,null,null,a,!1,u,p),r[cr]=o.current,qi(r.nodeType===8?r.parentNode:r),new th(o)},Ut.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=B1(o),r=r===null?null:r.stateNode,r},Ut.flushSync=function(r){return js(r)},Ut.hydrate=function(r,o,a){if(!qc(o))throw Error(n(200));return Vc(null,r,o,!0,a)},Ut.hydrateRoot=function(r,o,a){if(!nh(r))throw Error(n(405));var u=a!=null&&a.hydratedSources||null,p=!1,h="",S=p_;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),o=d_(o,null,r,1,a??null,p,!1,h,S),r[cr]=o.current,qi(r),u)for(r=0;r<u.length;r++)a=u[r],p=a._getVersion,p=p(a._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[a,p]:o.mutableSourceEagerHydrationData.push(a,p);return new Wc(o)},Ut.render=function(r,o,a){if(!qc(o))throw Error(n(200));return Vc(null,r,o,!1,a)},Ut.unmountComponentAtNode=function(r){if(!qc(r))throw Error(n(40));return r._reactRootContainer?(js(function(){Vc(null,null,r,!1,function(){r._reactRootContainer=null,r[cr]=null})}),!0):!1},Ut.unstable_batchedUpdates=Gp,Ut.unstable_renderSubtreeIntoContainer=function(r,o,a,u){if(!qc(a))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Vc(r,o,a,!1,u)},Ut.version="18.3.1-next-f1338f8080-20240426",Ut}var uh;function dh(){if(uh)return Xc.exports;uh=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Xc.exports=__(),Xc.exports}var fh;function E_(){if(fh)return ca;fh=1;var e=dh();return ca.createRoot=e.createRoot,ca.hydrateRoot=e.hydrateRoot,ca}var x_=E_();const Kn=e=>{const t=crypto.randomUUID();return e?t.substring(0,e):t},dn={userId:"edmap-user-id",profileEmoji:"edmap-profileEmoji",defaultName:"edmap-random-name",accessToken:"edmap-access-token"},T_=()=>{localStorage.removeItem("edmap-access-token"),localStorage.removeItem("edmap-refresh-token")},k_=async()=>(I_(),await tn()),I_=()=>{localStorage.removeItem(dn.userId)},C_=()=>{const e=new URL(window.location.href);e.searchParams.delete("code"),window.history.replaceState({index:0,scrollX:0,scrollY:document.scrollY},"",e.toString())},ph=async()=>(T_(),C_(),await k_());function hh(e,t){return function(){return e.apply(t,arguments)}}const{toString:b_}=Object.prototype,{getPrototypeOf:eu}=Object,ua=(e=>t=>{const n=b_.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),En=e=>(e=e.toLowerCase(),t=>ua(t)===e),da=e=>t=>typeof t===e,{isArray:zs}=Array,Go=da("undefined");function R_(e){return e!==null&&!Go(e)&&e.constructor!==null&&!Go(e.constructor)&&Jt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mh=En("ArrayBuffer");function A_(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mh(e.buffer),t}const P_=da("string"),Jt=da("function"),gh=da("number"),fa=e=>e!==null&&typeof e=="object",O_=e=>e===!0||e===!1,pa=e=>{if(ua(e)!=="object")return!1;const t=eu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},N_=En("Date"),M_=En("File"),L_=En("Blob"),j_=En("FileList"),D_=e=>fa(e)&&Jt(e.pipe),F_=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Jt(e.append)&&((t=ua(e))==="formdata"||t==="object"&&Jt(e.toString)&&e.toString()==="[object FormData]"))},$_=En("URLSearchParams"),[B_,z_,U_,H_]=["ReadableStream","Request","Response","Headers"].map(En),W_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,i;if(typeof e!="object"&&(e=[e]),zs(e))for(s=0,i=e.length;s<i;s++)t.call(null,e[s],s,e);else{const l=n?Object.getOwnPropertyNames(e):Object.keys(e),c=l.length;let d;for(s=0;s<c;s++)d=l[s],t.call(null,e[d],d,e)}}function yh(e,t){t=t.toLowerCase();const n=Object.keys(e);let s=n.length,i;for(;s-- >0;)if(i=n[s],t===i.toLowerCase())return i;return null}const ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vh=e=>!Go(e)&&e!==ns;function tu(){const{caseless:e}=vh(this)&&this||{},t={},n=(s,i)=>{const l=e&&yh(t,i)||i;pa(t[l])&&pa(s)?t[l]=tu(t[l],s):pa(s)?t[l]=tu({},s):zs(s)?t[l]=s.slice():t[l]=s};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Qo(arguments[s],n);return t}const q_=(e,t,n,{allOwnKeys:s}={})=>(Qo(t,(i,l)=>{n&&Jt(i)?e[l]=hh(i,n):e[l]=i},{allOwnKeys:s}),e),V_=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),G_=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Q_=(e,t,n,s)=>{let i,l,c;const d={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),l=i.length;l-- >0;)c=i[l],(!s||s(c,e,t))&&!d[c]&&(t[c]=e[c],d[c]=!0);e=n!==!1&&eu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Y_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},K_=e=>{if(!e)return null;if(zs(e))return e;let t=e.length;if(!gh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},X_=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&eu(Uint8Array)),J_=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=s.next())&&!i.done;){const l=i.value;t.call(e,l[0],l[1])}},Z_=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},eE=En("HTMLFormElement"),tE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,i){return s.toUpperCase()+i}),Sh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),nE=En("RegExp"),wh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Qo(n,(i,l)=>{let c;(c=t(i,l,e))!==!1&&(s[l]=c||i)}),Object.defineProperties(e,s)},rE=e=>{wh(e,(t,n)=>{if(Jt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(Jt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},sE=(e,t)=>{const n={},s=i=>{i.forEach(l=>{n[l]=!0})};return zs(e)?s(e):s(String(e).split(t)),n},oE=()=>{},iE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,nu="abcdefghijklmnopqrstuvwxyz",_h="0123456789",Eh={DIGIT:_h,ALPHA:nu,ALPHA_DIGIT:nu+nu.toUpperCase()+_h},aE=(e=16,t=Eh.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function lE(e){return!!(e&&Jt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const cE=e=>{const t=new Array(10),n=(s,i)=>{if(fa(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[i]=s;const l=zs(s)?[]:{};return Qo(s,(c,d)=>{const f=n(c,i+1);!Go(f)&&(l[d]=f)}),t[i]=void 0,l}}return s};return n(e,0)},uE=En("AsyncFunction"),dE=e=>e&&(fa(e)||Jt(e))&&Jt(e.then)&&Jt(e.catch),xh=((e,t)=>e?setImmediate:t?((n,s)=>(ns.addEventListener("message",({source:i,data:l})=>{i===ns&&l===n&&s.length&&s.shift()()},!1),i=>{s.push(i),ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jt(ns.postMessage)),fE=typeof queueMicrotask<"u"?queueMicrotask.bind(ns):typeof process<"u"&&process.nextTick||xh,F={isArray:zs,isArrayBuffer:mh,isBuffer:R_,isFormData:F_,isArrayBufferView:A_,isString:P_,isNumber:gh,isBoolean:O_,isObject:fa,isPlainObject:pa,isReadableStream:B_,isRequest:z_,isResponse:U_,isHeaders:H_,isUndefined:Go,isDate:N_,isFile:M_,isBlob:L_,isRegExp:nE,isFunction:Jt,isStream:D_,isURLSearchParams:$_,isTypedArray:X_,isFileList:j_,forEach:Qo,merge:tu,extend:q_,trim:W_,stripBOM:V_,inherits:G_,toFlatObject:Q_,kindOf:ua,kindOfTest:En,endsWith:Y_,toArray:K_,forEachEntry:J_,matchAll:Z_,isHTMLForm:eE,hasOwnProperty:Sh,hasOwnProp:Sh,reduceDescriptors:wh,freezeMethods:rE,toObjectSet:sE,toCamelCase:tE,noop:oE,toFiniteNumber:iE,findKey:yh,global:ns,isContextDefined:vh,ALPHABET:Eh,generateString:aE,isSpecCompliantForm:lE,toJSONObject:cE,isAsyncFn:uE,isThenable:dE,setImmediate:xh,asap:fE};function we(e,t,n,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const Th=we.prototype,kh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{kh[e]={value:e}}),Object.defineProperties(we,kh),Object.defineProperty(Th,"isAxiosError",{value:!0}),we.from=(e,t,n,s,i,l)=>{const c=Object.create(Th);return F.toFlatObject(e,c,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),we.call(c,e.message,t,n,s,i),c.cause=e,c.name=e.name,l&&Object.assign(c,l),c};const pE=null;function ru(e){return F.isPlainObject(e)||F.isArray(e)}function Ih(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function Ch(e,t,n){return e?e.concat(t).map(function(i,l){return i=Ih(i),!n&&l?"["+i+"]":i}).join(n?".":""):t}function hE(e){return F.isArray(e)&&!e.some(ru)}const mE=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function ha(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,k){return!F.isUndefined(k[T])});const s=n.metaTokens,i=n.visitor||y,l=n.dots,c=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function m(_){if(_===null)return"";if(F.isDate(_))return _.toISOString();if(!f&&F.isBlob(_))throw new we("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(_)||F.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function y(_,T,k){let M=_;if(_&&!k&&typeof _=="object"){if(F.endsWith(T,"{}"))T=s?T:T.slice(0,-2),_=JSON.stringify(_);else if(F.isArray(_)&&hE(_)||(F.isFileList(_)||F.endsWith(T,"[]"))&&(M=F.toArray(_)))return T=Ih(T),M.forEach(function($,q){!(F.isUndefined($)||$===null)&&t.append(c===!0?Ch([T],q,l):c===null?T:T+"[]",m($))}),!1}return ru(_)?!0:(t.append(Ch(k,T,l),m(_)),!1)}const v=[],w=Object.assign(mE,{defaultVisitor:y,convertValue:m,isVisitable:ru});function E(_,T){if(!F.isUndefined(_)){if(v.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));v.push(_),F.forEach(_,function(M,P){(!(F.isUndefined(M)||M===null)&&i.call(t,M,F.isString(P)?P.trim():P,T,w))===!0&&E(M,T?T.concat(P):[P])}),v.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return E(e),t}function bh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function su(e,t){this._pairs=[],e&&ha(e,this,t)}const Rh=su.prototype;Rh.append=function(t,n){this._pairs.push([t,n])},Rh.toString=function(t){const n=t?function(s){return t.call(this,s,bh)}:bh;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function gE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ah(e,t,n){if(!t)return e;const s=n&&n.encode||gE;F.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let l;if(i?l=i(t,n):l=F.isURLSearchParams(t)?t.toString():new su(t,n).toString(s),l){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Ph{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Oh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yE={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:su,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ou=typeof window<"u"&&typeof document<"u",iu=typeof navigator=="object"&&navigator||void 0,vE=ou&&(!iu||["ReactNative","NativeScript","NS"].indexOf(iu.product)<0),SE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wE=ou&&window.location.href||"http://localhost",At={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ou,hasStandardBrowserEnv:vE,hasStandardBrowserWebWorkerEnv:SE,navigator:iu,origin:wE},Symbol.toStringTag,{value:"Module"})),...yE};function _E(e,t){return ha(e,new At.classes.URLSearchParams,Object.assign({visitor:function(n,s,i,l){return At.isNode&&F.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function EE(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xE(e){const t={},n=Object.keys(e);let s;const i=n.length;let l;for(s=0;s<i;s++)l=n[s],t[l]=e[l];return t}function Nh(e){function t(n,s,i,l){let c=n[l++];if(c==="__proto__")return!0;const d=Number.isFinite(+c),f=l>=n.length;return c=!c&&F.isArray(i)?i.length:c,f?(F.hasOwnProp(i,c)?i[c]=[i[c],s]:i[c]=s,!d):((!i[c]||!F.isObject(i[c]))&&(i[c]=[]),t(n,s,i[c],l)&&F.isArray(i[c])&&(i[c]=xE(i[c])),!d)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,(s,i)=>{t(EE(s),i,n,0)}),n}return null}function TE(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(0,JSON.stringify)(e)}const Yo={transitional:Oh,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",i=s.indexOf("application/json")>-1,l=F.isObject(t);if(l&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return i?JSON.stringify(Nh(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t)||F.isReadableStream(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){if(s.indexOf("application/x-www-form-urlencoded")>-1)return _E(t,this.formSerializer).toString();if((d=F.isFileList(t))||s.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ha(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return l||i?(n.setContentType("application/json",!1),TE(t)):t}],transformResponse:[function(t){const n=this.transitional||Yo.transitional,s=n&&n.forcedJSONParsing,i=this.responseType==="json";if(F.isResponse(t)||F.isReadableStream(t))return t;if(t&&F.isString(t)&&(s&&!this.responseType||i)){const c=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(d){if(c)throw d.name==="SyntaxError"?we.from(d,we.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{Yo.headers[e]={}});const kE=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),IE=e=>{const t={};let n,s,i;return e&&e.split(`
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),s=c.substring(i+1).trim(),!(!n||t[n]&&kE[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Mh=Symbol("internals");function Ko(e){return e&&String(e).trim().toLowerCase()}function ma(e){return e===!1||e==null?e:F.isArray(e)?e.map(ma):String(e)}function CE(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const bE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function au(e,t,n,s,i){if(F.isFunction(s))return s.call(this,t,n);if(i&&(t=n),!!F.isString(t)){if(F.isString(s))return t.indexOf(s)!==-1;if(F.isRegExp(s))return s.test(t)}}function RE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function AE(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(i,l,c){return this[s].call(this,t,i,l,c)},configurable:!0})})}let Ht=class{constructor(t){t&&this.set(t)}set(t,n,s){const i=this;function l(d,f,m){const y=Ko(f);if(!y)throw new Error("header name must be a non-empty string");const v=F.findKey(i,y);(!v||i[v]===void 0||m===!0||m===void 0&&i[v]!==!1)&&(i[v||f]=ma(d))}const c=(d,f)=>F.forEach(d,(m,y)=>l(m,y,f));if(F.isPlainObject(t)||t instanceof this.constructor)c(t,n);else if(F.isString(t)&&(t=t.trim())&&!bE(t))c(IE(t),n);else if(F.isHeaders(t))for(const[d,f]of t.entries())l(f,d,s);else t!=null&&l(n,t,s);return this}get(t,n){if(t=Ko(t),t){const s=F.findKey(this,t);if(s){const i=this[s];if(!n)return i;if(n===!0)return CE(i);if(F.isFunction(n))return n.call(this,i,s);if(F.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ko(t),t){const s=F.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||au(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let i=!1;function l(c){if(c=Ko(c),c){const d=F.findKey(s,c);d&&(!n||au(s,s[d],d,n))&&(delete s[d],i=!0)}}return F.isArray(t)?t.forEach(l):l(t),i}clear(t){const n=Object.keys(this);let s=n.length,i=!1;for(;s--;){const l=n[s];(!t||au(this,this[l],l,t,!0))&&(delete this[l],i=!0)}return i}normalize(t){const n=this,s={};return F.forEach(this,(i,l)=>{const c=F.findKey(s,l);if(c){n[c]=ma(i),delete n[l];return}const d=t?RE(l):String(l).trim();d!==l&&delete n[l],n[d]=ma(i),s[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return F.forEach(this,(s,i)=>{s!=null&&s!==!1&&(n[i]=t&&F.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(i=>s.set(i)),s}static accessor(t){const s=(this[Mh]=this[Mh]={accessors:{}}).accessors,i=this.prototype;function l(c){const d=Ko(c);s[d]||(AE(i,c),s[d]=!0)}return F.isArray(t)?t.forEach(l):l(t),this}};Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(Ht.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),F.freezeMethods(Ht);function lu(e,t){const n=this||Yo,s=t||n,i=Ht.from(s.headers);let l=s.data;return F.forEach(e,function(d){l=d.call(n,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function Lh(e){return!!(e&&e.__CANCEL__)}function Us(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(Us,we,{__CANCEL__:!0});function jh(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function PE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function OE(e,t){e=e||10;const n=new Array(e),s=new Array(e);let i=0,l=0,c;return t=t!==void 0?t:1e3,function(f){const m=Date.now(),y=s[l];c||(c=m),n[i]=f,s[i]=m;let v=l,w=0;for(;v!==i;)w+=n[v++],v=v%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),m-c<t)return;const E=y&&m-y;return E?Math.round(w*1e3/E):void 0}}function NE(e,t){let n=0,s=1e3/t,i,l;const c=(m,y=Date.now())=>{n=y,i=null,l&&(clearTimeout(l),l=null),e.apply(null,m)};return[(...m)=>{const y=Date.now(),v=y-n;v>=s?c(m,y):(i=m,l||(l=setTimeout(()=>{l=null,c(i)},s-v)))},()=>i&&c(i)]}const ga=(e,t,n=3)=>{let s=0;const i=OE(50,250);return NE(l=>{const c=l.loaded,d=l.lengthComputable?l.total:void 0,f=c-s,m=i(f),y=c<=d;s=c;const v={loaded:c,total:d,progress:d?c/d:void 0,bytes:f,rate:m||void 0,estimated:m&&d&&y?(d-c)/m:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(v)},n)},Dh=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Fh=e=>(...t)=>F.asap(()=>e(...t)),ME=At.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,At.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(At.origin),At.navigator&&/(msie|trident)/i.test(At.navigator.userAgent)):()=>!0,LE=At.hasStandardBrowserEnv?{write(e,t,n,s,i,l){const c=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),F.isString(s)&&c.push("path="+s),F.isString(i)&&c.push("domain="+i),l===!0&&c.push("secure"),document.cookie=c.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $h(e,t){return e&&!jE(t)?DE(e,t):t}const Bh=e=>e instanceof Ht?{...e}:e;function rs(e,t){t=t||{};const n={};function s(m,y,v,w){return F.isPlainObject(m)&&F.isPlainObject(y)?F.merge.call({caseless:w},m,y):F.isPlainObject(y)?F.merge({},y):F.isArray(y)?y.slice():y}function i(m,y,v,w){if(F.isUndefined(y)){if(!F.isUndefined(m))return s(void 0,m,v,w)}else return s(m,y,v,w)}function l(m,y){if(!F.isUndefined(y))return s(void 0,y)}function c(m,y){if(F.isUndefined(y)){if(!F.isUndefined(m))return s(void 0,m)}else return s(void 0,y)}function d(m,y,v){if(v in t)return s(m,y);if(v in e)return s(void 0,m)}const f={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:d,headers:(m,y,v)=>i(Bh(m),Bh(y),v,!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(y){const v=f[y]||i,w=v(e[y],t[y],y);F.isUndefined(w)&&v!==d||(n[y]=w)}),n}const zh=e=>{const t=rs({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:l,headers:c,auth:d}=t;t.headers=c=Ht.from(c),t.url=Ah($h(t.baseURL,t.url),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(F.isFormData(n)){if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((f=c.getContentType())!==!1){const[m,...y]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];c.setContentType([m||"multipart/form-data",...y].join("; "))}}if(At.hasStandardBrowserEnv&&(s&&F.isFunction(s)&&(s=s(t)),s||s!==!1&&ME(t.url))){const m=i&&l&&LE.read(l);m&&c.set(i,m)}return t},FE=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const i=zh(e);let l=i.data;const c=Ht.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:m}=i,y,v,w,E,_;function T(){E&&E(),_&&_(),i.cancelToken&&i.cancelToken.unsubscribe(y),i.signal&&i.signal.removeEventListener("abort",y)}let k=new XMLHttpRequest;k.open(i.method.toUpperCase(),i.url,!0),k.timeout=i.timeout;function M(){if(!k)return;const $=Ht.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),W={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:$,config:e,request:k};jh(function(D){n(D),T()},function(D){s(D),T()},W),k=null}"onloadend"in k?k.onloadend=M:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(M)},k.onabort=function(){k&&(s(new we("Request aborted",we.ECONNABORTED,e,k)),k=null)},k.onerror=function(){s(new we("Network Error",we.ERR_NETWORK,e,k)),k=null},k.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const W=i.transitional||Oh;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),s(new we(q,W.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,k)),k=null},l===void 0&&c.setContentType(null),"setRequestHeader"in k&&F.forEach(c.toJSON(),function(q,W){k.setRequestHeader(W,q)}),F.isUndefined(i.withCredentials)||(k.withCredentials=!!i.withCredentials),d&&d!=="json"&&(k.responseType=i.responseType),m&&([w,_]=ga(m,!0),k.addEventListener("progress",w)),f&&k.upload&&([v,E]=ga(f),k.upload.addEventListener("progress",v),k.upload.addEventListener("loadend",E)),(i.cancelToken||i.signal)&&(y=$=>{k&&(s(!$||$.type?new Us(null,e,k):$),k.abort(),k=null)},i.cancelToken&&i.cancelToken.subscribe(y),i.signal&&(i.signal.aborted?y():i.signal.addEventListener("abort",y)));const P=PE(i.url);if(P&&At.protocols.indexOf(P)===-1){s(new we("Unsupported protocol "+P+":",we.ERR_BAD_REQUEST,e));return}k.send(l||null)})},$E=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,i;const l=function(m){if(!i){i=!0,d();const y=m instanceof Error?m:this.reason;s.abort(y instanceof we?y:new Us(y instanceof Error?y.message:y))}};let c=t&&setTimeout(()=>{c=null,l(new we(`timeout ${t} of ms exceeded`,we.ETIMEDOUT))},t);const d=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(l):m.removeEventListener("abort",l)}),e=null)};e.forEach(m=>m.addEventListener("abort",l));const{signal:f}=s;return f.unsubscribe=()=>F.asap(d),f}},BE=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,i;for(;s<n;)i=s+t,yield e.slice(s,i),s=i},zE=async function*(e,t){for await(const n of UE(e))yield*BE(n,t)},UE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},Uh=(e,t,n,s)=>{const i=zE(e,t);let l=0,c,d=f=>{c||(c=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:m,value:y}=await i.next();if(m){d(),f.close();return}let v=y.byteLength;if(n){let w=l+=v;n(w)}f.enqueue(new Uint8Array(y))}catch(m){throw d(m),m}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},ya=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Hh=ya&&typeof ReadableStream=="function",HE=ya&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Wh=(e,...t)=>{try{return!!e(...t)}catch{return!1}},WE=Hh&&Wh(()=>{let e=!1;const t=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),qh=64*1024,cu=Hh&&Wh(()=>F.isReadableStream(new Response("").body)),va={stream:cu&&(e=>e.body)};ya&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!va[t]&&(va[t]=F.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new we(`Response type '${t}' is not supported`,we.ERR_NOT_SUPPORT,s)})})})(new Response);const qE=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new Request(At.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e=e+""),F.isString(e))return(await HE(e)).byteLength},VE=async(e,t)=>{const n=F.toFiniteNumber(e.getContentLength());return n??qE(t)},uu={http:pE,xhr:FE,fetch:ya&&(async e=>{let{url:t,method:n,data:s,signal:i,cancelToken:l,timeout:c,onDownloadProgress:d,onUploadProgress:f,responseType:m,headers:y,withCredentials:v="same-origin",fetchOptions:w}=zh(e);m=m?(m+"").toLowerCase():"text";let E=$E([i,l&&l.toAbortSignal()],c),_;const T=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let k;try{if(f&&WE&&n!=="get"&&n!=="head"&&(k=await VE(y,s))!==0){let W=new Request(t,{method:"POST",body:s,duplex:"half"}),j;if(F.isFormData(s)&&(j=W.headers.get("content-type"))&&y.setContentType(j),W.body){const[D,Y]=Dh(k,ga(Fh(f)));s=Uh(W.body,qh,D,Y)}}F.isString(v)||(v=v?"include":"omit");const M="credentials"in Request.prototype;_=new Request(t,{...w,signal:E,method:n.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:"half",credentials:M?v:void 0});let P=await fetch(_);const $=cu&&(m==="stream"||m==="response");if(cu&&(d||$&&T)){const W={};["status","statusText","headers"].forEach(K=>{W[K]=P[K]});const j=F.toFiniteNumber(P.headers.get("content-length")),[D,Y]=d&&Dh(j,ga(Fh(d),!0))||[];P=new Response(Uh(P.body,qh,D,()=>{Y&&Y(),T&&T()}),W)}m=m||"text";let q=await va[F.findKey(va,m)||"text"](P,e);return!$&&T&&T(),await new Promise((W,j)=>{jh(W,j,{data:q,headers:Ht.from(P.headers),status:P.status,statusText:P.statusText,config:e,request:_})})}catch(M){throw T&&T(),M&&M.name==="TypeError"&&/fetch/i.test(M.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,_),{cause:M.cause||M}):we.from(M,M&&M.code,e,_)}})};F.forEach(uu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Vh=e=>`- ${e}`,GE=e=>F.isFunction(e)||e===null||e===!1,Gh={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,s;const i={};for(let l=0;l<t;l++){n=e[l];let c;if(s=n,!GE(n)&&(s=uu[(c=String(n)).toLowerCase()],s===void 0))throw new we(`Unknown adapter '${c}'`);if(s)break;i[c||"#"+l]=s}if(!s){const l=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=t?l.length>1?`since :
`+l.map(Vh).join(`
`):" "+Vh(l[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s},adapters:uu};function du(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Us(null,e)}function Qh(e){return du(e),e.headers=Ht.from(e.headers),e.data=lu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gh.getAdapter(e.adapter||Yo.adapter)(e).then(function(s){return du(e),s.data=lu.call(e,e.transformResponse,s),s.headers=Ht.from(s.headers),s},function(s){return Lh(s)||(du(e),s&&s.response&&(s.response.data=lu.call(e,e.transformResponse,s.response),s.response.headers=Ht.from(s.response.headers))),Promise.reject(s)})}const Yh="1.7.9",Sa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Sa[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Kh={};Sa.transitional=function(t,n,s){function i(l,c){return"[Axios v"+Yh+"] Transitional option '"+l+"'"+c+(s?". "+s:"")}return(l,c,d)=>{if(t===!1)throw new we(i(c," has been removed"+(n?" in "+n:"")),we.ERR_DEPRECATED);return n&&!Kh[c]&&(Kh[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,c,d):!0}},Sa.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function QE(e,t,n){if(typeof e!="object")throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let i=s.length;for(;i-- >0;){const l=s[i],c=t[l];if(c){const d=e[l],f=d===void 0||c(d,l,e);if(f!==!0)throw new we("option "+l+" must be "+f,we.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new we("Unknown option "+l,we.ERR_BAD_OPTION)}}const wa={assertOptions:QE,validators:Sa},Ln=wa.validators;let ss=class{constructor(t){this.defaults=t,this.interceptors={request:new Ph,response:new Ph}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?l&&!String(s.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(s.stack+=`
`+l):s.stack=l}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rs(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:l}=n;s!==void 0&&wa.assertOptions(s,{silentJSONParsing:Ln.transitional(Ln.boolean),forcedJSONParsing:Ln.transitional(Ln.boolean),clarifyTimeoutError:Ln.transitional(Ln.boolean)},!1),i!=null&&(F.isFunction(i)?n.paramsSerializer={serialize:i}:wa.assertOptions(i,{encode:Ln.function,serialize:Ln.function},!0)),wa.assertOptions(n,{baseUrl:Ln.spelling("baseURL"),withXsrfToken:Ln.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c=l&&F.merge(l.common,l[n.method]);l&&F.forEach(["delete","get","head","post","put","patch","common"],_=>{delete l[_]}),n.headers=Ht.concat(c,l);const d=[];let f=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(f=f&&T.synchronous,d.unshift(T.fulfilled,T.rejected))});const m=[];this.interceptors.response.forEach(function(T){m.push(T.fulfilled,T.rejected)});let y,v=0,w;if(!f){const _=[Qh.bind(this),void 0];for(_.unshift.apply(_,d),_.push.apply(_,m),w=_.length,y=Promise.resolve(n);v<w;)y=y.then(_[v++],_[v++]);return y}w=d.length;let E=n;for(v=0;v<w;){const _=d[v++],T=d[v++];try{E=_(E)}catch(k){T.call(this,k);break}}try{y=Qh.call(this,E)}catch(_){return Promise.reject(_)}for(v=0,w=m.length;v<w;)y=y.then(m[v++],m[v++]);return y}getUri(t){t=rs(this.defaults,t);const n=$h(t.baseURL,t.url);return Ah(n,t.params,t.paramsSerializer)}};F.forEach(["delete","get","head","options"],function(t){ss.prototype[t]=function(n,s){return this.request(rs(s||{},{method:t,url:n,data:(s||{}).data}))}}),F.forEach(["post","put","patch"],function(t){function n(s){return function(l,c,d){return this.request(rs(d||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}ss.prototype[t]=n(),ss.prototype[t+"Form"]=n(!0)});let YE=class m_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const s=this;this.promise.then(i=>{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](i);s._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(d=>{s.subscribe(d),l=d}).then(i);return c.cancel=function(){s.unsubscribe(l)},c},t(function(l,c,d){s.reason||(s.reason=new Us(l,c,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new m_(function(i){t=i}),cancel:t}}};function KE(e){return function(n){return e.apply(null,n)}}function XE(e){return F.isObject(e)&&e.isAxiosError===!0}const fu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fu).forEach(([e,t])=>{fu[t]=e});function Xh(e){const t=new ss(e),n=hh(ss.prototype.request,t);return F.extend(n,ss.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Xh(rs(e,i))},n}const nt=Xh(Yo);nt.Axios=ss,nt.CanceledError=Us,nt.CancelToken=YE,nt.isCancel=Lh,nt.VERSION=Yh,nt.toFormData=ha,nt.AxiosError=we,nt.Cancel=nt.CanceledError,nt.all=function(t){return Promise.all(t)},nt.spread=KE,nt.isAxiosError=XE,nt.mergeConfig=rs,nt.AxiosHeaders=Ht,nt.formToJSON=e=>Nh(F.isHTMLForm(e)?new FormData(e):e),nt.getAdapter=Gh.getAdapter,nt.HttpStatusCode=fu,nt.default=nt;const{Axios:A8,AxiosError:JE,CanceledError:P8,isCancel:O8,CancelToken:N8,VERSION:M8,all:L8,Cancel:j8,isAxiosError:D8,spread:F8,toFormData:$8,AxiosHeaders:B8,HttpStatusCode:z8,formToJSON:U8,getAdapter:H8,mergeConfig:W8}=nt,pu="https://api.edmap.space",lt=nt.create();lt.defaults.baseURL=pu,lt.interceptors.request.use(async e=>{const t=localStorage.getItem("edmap-access-token");return e.headers.Accept="application/json",t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));const Xo={},Jh=async e=>(await ph(),Promise.reject(e)),Zh=async(e,t)=>{const n=e.data.accessToken,s=e.data.refreshToken;return localStorage.setItem("edmap-access-token",n),localStorage.setItem("edmap-refresh-token",s),t.headers||(t.headers={}),t.headers.Authorization=`Bearer ${n}`,lt(t)};lt.interceptors.response.use(e=>e,async e=>{const t=e.config;if(!e.response)return Promise.reject(e);const n=e.response.status===401,s=t._retry;if(!n||s)return Promise.reject(e);t._retry=!0;const i=localStorage.getItem("edmap-refresh-token");if(!i)return Jh(e);try{if(!Xo.time||Date.now()-Xo.time>1e3*3){const c=nt.get(`${pu}/tokens/refresh-token/user`,{headers:{Authorization:`Bearer ${i}`}});Xo.time=Date.now(),Xo.request=c;const d=await c;return Zh(d,t)}const l=await Xo.request;if(!l)throw new Error;return Zh(l,t)}catch(l){return Jh(l)}});class ZE{constructor(){Lt(this,"reportAction",(t,n)=>{this.reportActiveUser(),this.actions+=1,this.performPost(t,n)});Lt(this,"reportEdgeClick",t=>{const{mapId:n,questId:s}=this.getBaseAnalyticsProps();this.reportAction("/journey-edge-click",{mapId:n,questId:s,userId:_l(),edgeId:t})});Lt(this,"reportTestAnswers",t=>{const{mapId:n,questId:s}=this.getBaseAnalyticsProps(),i=_l(),l=t.map(c=>({mapId:n,questId:s,questionId:c.questionId,answerId:c.answerId||"",userId:i}));this.reportAction("/test-selected-answer",l)});Lt(this,"reportWidgetView",()=>{if(this.isWidgetViewed)return;this.isWidgetViewed=!0;const{mapId:t,questId:n}=this.getBaseAnalyticsProps();return this.performPost("/widget-view",{mapId:t,questId:n})});Lt(this,"reportActiveUser",()=>{if(this.isUserActive)return;this.isUserActive=!0,this.reportWidgetView();const{mapId:t,questId:n}=this.getBaseAnalyticsProps();return this.performPost("/active-user",{mapId:t,questId:n})});Lt(this,"reportActions",(t,n)=>{this.actions!==0&&(this.performPost("/actions-agriggated",{mapId:t,questId:n,userId:_l(),actionCount:this.actions}),this.actions=0)});Lt(this,"reportQuestCompletion",(t,n)=>{this.performPost("/quest-competed",{mapId:t,questId:n})});Lt(this,"reportNewUserCreated",()=>{this.performPost("/user-created",this.getBaseAnalyticsProps())});Lt(this,"reportUserRegistration",()=>{this.performPost("/user-registrated",{...this.getBaseAnalyticsProps(),userId:_l()})});Lt(this,"reportQuestEnded",(t,n)=>{this.reportQuestCompletion(t,n)});Lt(this,"drainPendingAnalytics",()=>{const{mapId:t,questId:n}=this.getBaseAnalyticsProps();this.reportActions(t,n)});Lt(this,"performPost",(t,n)=>{try{const s=this.formPayload(n);return navigator.sendBeacon(`${this.baseUrl}${t}`,s)}catch{}});Lt(this,"dropUserActivation",()=>{this.isUserActive=!1,this.isWidgetViewed=!1});Lt(this,"formPayload",t=>{const n=JSON.stringify(t);return new Blob([n],{type:"application/json"})});Lt(this,"getBaseAnalyticsProps",()=>{const[t,n]=localStorage.getItem("analytics").split("@");return{mapId:t,questId:n}});this.actions=0,this.isUserActive=!1,this.isWidgetViewed=!1,this.baseUrl=`${pu}/analytics`}}const yr=new ZE,_e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,os="8.50.0",Ne=globalThis;function _a(e,t,n){const s=Ne,i=s.__SENTRY__=s.__SENTRY__||{},l=i[os]=i[os]||{};return l[e]||(l[e]=t())}const vr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ex="Sentry Logger ",hu=["debug","info","warn","error","log","assert","trace"],Ea={};function Sr(e){if(!("console"in Ne))return e();const t=Ne.console,n={},s=Object.keys(Ea);s.forEach(i=>{const l=Ea[i];n[i]=t[i],t[i]=l});try{return e()}finally{s.forEach(i=>{t[i]=n[i]})}}function tx(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return vr?hu.forEach(n=>{t[n]=(...s)=>{e&&Sr(()=>{Ne.console[n](`${ex}[${n}]:`,...s)})}}):hu.forEach(n=>{t[n]=()=>{}}),t}const X=_a("logger",tx),em=50,is="?",tm=/\(error: (.*)\)/,nm=/captureMessage|captureException/;function rm(...e){const t=e.sort((n,s)=>n[0]-s[0]).map(n=>n[1]);return(n,s=0,i=0)=>{const l=[],c=n.split(`
`);for(let d=s;d<c.length;d++){const f=c[d];if(f.length>1024)continue;const m=tm.test(f)?f.replace(tm,"$1"):f;if(!m.match(/\S*Error: /)){for(const y of t){const v=y(m);if(v){l.push(v);break}}if(l.length>=em+i)break}}return rx(l.slice(i))}}function nx(e){return Array.isArray(e)?rm(...e):e}function rx(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(xa(t).function||"")&&t.pop(),t.reverse(),nm.test(xa(t).function||"")&&(t.pop(),nm.test(xa(t).function||"")&&t.pop()),t.slice(0,em).map(n=>({...n,filename:n.filename||xa(t).filename,function:n.function||is}))}function xa(e){return e[e.length-1]||{}}const mu="<anonymous>";function Xn(e){try{return!e||typeof e!="function"?mu:e.name||mu}catch{return mu}}function sm(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(s=>{s.stacktrace.frames&&n.push(...s.stacktrace.frames)}),n}catch{return}}}const Ta={},om={};function wr(e,t){Ta[e]=Ta[e]||[],Ta[e].push(t)}function _r(e,t){if(!om[e]){om[e]=!0;try{t()}catch(n){vr&&X.error(`Error while instrumenting ${e}`,n)}}}function fn(e,t){const n=e&&Ta[e];if(n)for(const s of n)try{s(t)}catch(i){vr&&X.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Xn(s)}
Error:`,i)}}let gu=null;function im(e){const t="error";wr(t,e),_r(t,sx)}function sx(){gu=Ne.onerror,Ne.onerror=function(e,t,n,s,i){return fn("error",{column:s,error:i,line:n,msg:e,url:t}),gu?gu.apply(this,arguments):!1},Ne.onerror.__SENTRY_INSTRUMENTED__=!0}let yu=null;function am(e){const t="unhandledrejection";wr(t,e),_r(t,ox)}function ox(){yu=Ne.onunhandledrejection,Ne.onunhandledrejection=function(e){return fn("unhandledrejection",e),yu?yu.apply(this,arguments):!0},Ne.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function as(){return vu(Ne),Ne}function vu(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||os,t[os]=t[os]||{}}const lm=Object.prototype.toString;function Su(e){switch(lm.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Zn(e,Error)}}function Hs(e,t){return lm.call(e)===`[object ${t}]`}function cm(e){return Hs(e,"ErrorEvent")}function um(e){return Hs(e,"DOMError")}function ix(e){return Hs(e,"DOMException")}function Jn(e){return Hs(e,"String")}function wu(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function _u(e){return e===null||wu(e)||typeof e!="object"&&typeof e!="function"}function Ws(e){return Hs(e,"Object")}function ka(e){return typeof Event<"u"&&Zn(e,Event)}function ax(e){return typeof Element<"u"&&Zn(e,Element)}function lx(e){return Hs(e,"RegExp")}function Ia(e){return!!(e&&e.then&&typeof e.then=="function")}function cx(e){return Ws(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Zn(e,t){try{return e instanceof t}catch{return!1}}function dm(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const qs=Ne,ux=80;function er(e,t={}){if(!e)return"<unknown>";try{let n=e;const s=5,i=[];let l=0,c=0;const d=" > ",f=d.length;let m;const y=Array.isArray(t)?t:t.keyAttrs,v=!Array.isArray(t)&&t.maxStringLength||ux;for(;n&&l++<s&&(m=dx(n,y),!(m==="html"||l>1&&c+i.length*f+m.length>=v));)i.push(m),c+=m.length,n=n.parentNode;return i.reverse().join(d)}catch{return"<unknown>"}}function dx(e,t){const n=e,s=[];if(!n||!n.tagName)return"";if(qs.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}s.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter(c=>n.getAttribute(c)).map(c=>[c,n.getAttribute(c)]):null;if(i&&i.length)i.forEach(c=>{s.push(`[${c[0]}="${c[1]}"]`)});else{n.id&&s.push(`#${n.id}`);const c=n.className;if(c&&Jn(c)){const d=c.split(/\s+/);for(const f of d)s.push(`.${f}`)}}const l=["aria-label","type","name","title","alt"];for(const c of l){const d=n.getAttribute(c);d&&s.push(`[${c}="${d}"]`)}return s.join("")}function fm(){try{return qs.document.location.href}catch{return""}}function fx(e){return qs.document&&qs.document.querySelector?qs.document.querySelector(e):null}function pm(e){if(!qs.HTMLElement)return null;let t=e;const n=5;for(let s=0;s<n;s++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Vs(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function hm(e,t){if(!Array.isArray(e))return"";const n=[];for(let s=0;s<e.length;s++){const i=e[s];try{dm(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function px(e,t,n=!1){return Jn(e)?lx(t)?t.test(e):Jn(t)?n?e===t:e.includes(t):!1:!1}function Er(e,t=[],n=!1){return t.some(s=>px(e,s,n))}function Wt(e,t,n){if(!(t in e))return;const s=e[t],i=n(s);typeof i=="function"&&mm(i,s);try{e[t]=i}catch{vr&&X.log(`Failed to replace method "${t}" in object`,e)}}function pn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{vr&&X.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function mm(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pn(e,"__sentry_original__",t)}catch{}}function Eu(e){return e.__sentry_original__}function gm(e){if(Su(e))return{message:e.message,name:e.name,stack:e.stack,...vm(e)};if(ka(e)){const t={type:e.type,target:ym(e.target),currentTarget:ym(e.currentTarget),...vm(e)};return typeof CustomEvent<"u"&&Zn(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function ym(e){try{return ax(e)?er(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function vm(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function hx(e,t=40){const n=Object.keys(gm(e));n.sort();const s=n[0];if(!s)return"[object has no keys]";if(s.length>=t)return Vs(s,t);for(let i=n.length;i>0;i--){const l=n.slice(0,i).join(", ");if(!(l.length>t))return i===n.length?l:Vs(l,t)}return""}function ut(e){return xu(e,new Map)}function xu(e,t){if(mx(e)){const n=t.get(e);if(n!==void 0)return n;const s={};t.set(e,s);for(const i of Object.getOwnPropertyNames(e))typeof e[i]<"u"&&(s[i]=xu(e[i],t));return s}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const s=[];return t.set(e,s),e.forEach(i=>{s.push(xu(i,t))}),s}return e}function mx(e){if(!Ws(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Sm=1e3;function Jo(){return Date.now()/Sm}function gx(){const{performance:e}=Ne;if(!e||!e.now)return Jo;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Sm}const jt=gx(),Dt=(()=>{const{performance:e}=Ne;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),s=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-s):t,l=i<t,c=e.timing&&e.timing.navigationStart,f=typeof c=="number"?Math.abs(c+n-s):t,m=f<t;return l||m?i<=f?e.timeOrigin:c:s})();function Zt(){const e=Ne,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const s=new Uint8Array(1);return t.getRandomValues(s),s[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,s=>(s^(n()&15)>>s/4).toString(16))}function wm(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function xr(e){const{message:t,event_id:n}=e;if(t)return t;const s=wm(e);return s?s.type&&s.value?`${s.type}: ${s.value}`:s.type||s.value||n||"<unknown>":n||"<unknown>"}function Tu(e,t,n){const s=e.exception=e.exception||{},i=s.values=s.values||[],l=i[0]=i[0]||{};l.value||(l.value=t||""),l.type||(l.type="Error")}function Gs(e,t){const n=wm(e);if(!n)return;const s={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...s,...i,...t},t&&"data"in t){const l={...i&&i.data,...t.data};n.mechanism.data=l}}function _m(e){if(yx(e))return!0;try{pn(e,"__sentry_captured__",!0)}catch{}return!1}function yx(e){try{return e.__sentry_captured__}catch{}}var tr;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const s=2;e[e.REJECTED=s]="REJECTED"})(tr||(tr={}));function nr(e){return new hn(t=>{t(e)})}function Ca(e){return new hn((t,n)=>{n(e)})}class hn{constructor(t){hn.prototype.__init.call(this),hn.prototype.__init2.call(this),hn.prototype.__init3.call(this),hn.prototype.__init4.call(this),this._state=tr.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new hn((s,i)=>{this._handlers.push([!1,l=>{if(!t)s(l);else try{s(t(l))}catch(c){i(c)}},l=>{if(!n)i(l);else try{s(n(l))}catch(c){i(c)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new hn((n,s)=>{let i,l;return this.then(c=>{l=!1,i=c,t&&t()},c=>{l=!0,i=c,t&&t()}).then(()=>{if(l){s(i);return}n(i)})})}__init(){this._resolve=t=>{this._setResult(tr.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(tr.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===tr.PENDING){if(Ia(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===tr.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===tr.RESOLVED&&n[1](this._value),this._state===tr.REJECTED&&n[2](this._value),n[0]=!0)})}}}function vx(e){const t=jt(),n={sid:Zt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>wx(n)};return e&&Qs(n,e),n}function Qs(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||jt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Zt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Sx(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Qs(e,n)}function wx(e){return ut({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Tr(){return Zt()}function kr(){return Zt().substring(16)}function ba(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const s={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(s[i]=ba(s[i],t[i],n-1));return s}const ku="_sentrySpan";function Zo(e,t){t?pn(e,ku,t):delete e[ku]}function Ra(e){return e[ku]}const _x=100;class Iu{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Tr(),spanId:kr()}}clone(){const t=new Iu;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,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._lastEventId=this._lastEventId,Zo(t,Ra(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}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,username:void 0},this._session&&Qs(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,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},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,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[s,i]=n instanceof ls?[n.getScopeData(),n.getRequestSession()]:Ws(n)?[t,t.requestSession]:[],{tags:l,extra:c,user:d,contexts:f,level:m,fingerprint:y=[],propagationContext:v}=s||{};return this._tags={...this._tags,...l},this._extra={...this._extra,...c},this._contexts={...this._contexts,...f},d&&Object.keys(d).length&&(this._user=d),m&&(this._level=m),y.length&&(this._fingerprint=y),v&&(this._propagationContext=v),i&&(this._requestSession=i),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._session=void 0,Zo(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Tr()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const s=typeof n=="number"?n:_x;if(s<=0)return this;const i={timestamp:Jo(),...t},l=this._breadcrumbs;return l.push(i),this._breadcrumbs=l.length>s?l.slice(-s):l,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}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ra(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=ba(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:kr(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const s=n&&n.event_id?n.event_id:Zt();if(!this._client)return X.warn("No client configured on scope - will not capture exception!"),s;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:s},this),s}captureMessage(t,n,s){const i=s&&s.event_id?s.event_id:Zt();if(!this._client)return X.warn("No client configured on scope - will not capture message!"),i;const l=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:l,...s,event_id:i},this),i}captureEvent(t,n){const s=n&&n.event_id?n.event_id:Zt();return this._client?(this._client.captureEvent(t,{...n,event_id:s},this),s):(X.warn("No client configured on scope - will not capture event!"),s)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const ls=Iu;function Ex(){return _a("defaultCurrentScope",()=>new ls)}function xx(){return _a("defaultIsolationScope",()=>new ls)}class Tx{constructor(t,n){let s;t?s=t:s=new ls;let i;n?i=n:i=new ls,this._stack=[{scope:s}],this._isolationScope=i}withScope(t){const n=this._pushScope();let s;try{s=t(n)}catch(i){throw this._popScope(),i}return Ia(s)?s.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),s)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Ys(){const e=as(),t=vu(e);return t.stack=t.stack||new Tx(Ex(),xx())}function kx(e){return Ys().withScope(e)}function Ix(e,t){const n=Ys();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Em(e){return Ys().withScope(()=>e(Ys().getIsolationScope()))}function Cx(){return{withIsolationScope:Em,withScope:kx,withSetScope:Ix,withSetIsolationScope:(e,t)=>Em(t),getCurrentScope:()=>Ys().getScope(),getIsolationScope:()=>Ys().getIsolationScope()}}function Ks(e){const t=vu(e);return t.acs?t.acs:Cx()}function Ve(){const e=as();return Ks(e).getCurrentScope()}function xn(){const e=as();return Ks(e).getIsolationScope()}function bx(){return _a("globalScope",()=>new ls)}function Cu(...e){const t=as(),n=Ks(t);if(e.length===2){const[s,i]=e;return s?n.withSetScope(s,i):n.withScope(i)}return n.withScope(e[0])}function Ae(){return Ve().getClient()}function Rx(e){const t=e.getPropagationContext(),{traceId:n,spanId:s,parentSpanId:i}=t;return ut({trace_id:n,span_id:s,parent_span_id:i})}const Ax="_sentryMetrics";function bu(e){const t=e[Ax];if(!t)return;const n={};for(const[,[s,i]]of t)(n[s]||(n[s]=[])).push(ut(i));return n}const jn="sentry.source",xm="sentry.sample_rate",cs="sentry.op",mt="sentry.origin",Ru="sentry.idle_span_finish_reason",Aa="sentry.measurement_unit",Pa="sentry.measurement_value",Tm="sentry.custom_span_name",Px="sentry.profile_id",Au="sentry.exclusive_time",Ox=0,km=1,gt=2;function Nx(e){if(e<400&&e>=100)return{code:km};if(e>=400&&e<500)switch(e){case 401:return{code:gt,message:"unauthenticated"};case 403:return{code:gt,message:"permission_denied"};case 404:return{code:gt,message:"not_found"};case 409:return{code:gt,message:"already_exists"};case 413:return{code:gt,message:"failed_precondition"};case 429:return{code:gt,message:"resource_exhausted"};case 499:return{code:gt,message:"cancelled"};default:return{code:gt,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:gt,message:"unimplemented"};case 503:return{code:gt,message:"unavailable"};case 504:return{code:gt,message:"deadline_exceeded"};default:return{code:gt,message:"internal_error"}}return{code:gt,message:"unknown_error"}}function Im(e,t){e.setAttribute("http.response.status_code",t);const n=Nx(t);n.message!=="unknown_error"&&e.setStatus(n)}const Pu="sentry-",Mx=/^sentry-/,Lx=8192;function Cm(e){const t=Dx(e);if(!t)return;const n=Object.entries(t).reduce((s,[i,l])=>{if(i.match(Mx)){const c=i.slice(Pu.length);s[c]=l}return s},{});if(Object.keys(n).length>0)return n}function jx(e){if(!e)return;const t=Object.entries(e).reduce((n,[s,i])=>(i&&(n[`${Pu}${s}`]=i),n),{});return Fx(t)}function Dx(e){if(!(!e||!Jn(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const s=bm(n);return Object.entries(s).forEach(([i,l])=>{t[i]=l}),t},{}):bm(e)}function bm(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,s])=>(n&&s&&(t[n]=s),t),{})}function Fx(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,s],i)=>{const l=`${encodeURIComponent(n)}=${encodeURIComponent(s)}`,c=i===0?l:`${t},${l}`;return c.length>Lx?(vr&&X.warn(`Not adding key: ${n} with val: ${s} to baggage header due to exceeding baggage size limits.`),t):c},"")}const Rm=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function $x(e){if(!e)return;const t=e.match(Rm);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Bx(e,t){const n=$x(e),s=Cm(t);if(!n||!n.traceId)return{traceId:Tr(),spanId:kr()};const{traceId:i,parentSpanId:l,parentSampled:c}=n,d=kr();return{traceId:i,parentSpanId:l,spanId:d,sampled:c,dsc:s||{}}}function Am(e=Tr(),t=kr(),n){let s="";return n!==void 0&&(s=n?"-1":"-0"),`${e}-${t}${s}`}const Pm=0,Om=1;let Nm=!1;function zx(e){const{spanId:t,traceId:n}=e.spanContext(),{data:s,op:i,parent_span_id:l,status:c,origin:d}=Fe(e);return ut({parent_span_id:l,span_id:t,trace_id:n,data:s,op:i,status:c,origin:d})}function Ux(e){const{spanId:t,traceId:n,isRemote:s}=e.spanContext(),i=s?t:Fe(e).parent_span_id,l=s?kr():t;return ut({parent_span_id:i,span_id:l,trace_id:n})}function Hx(e){const{traceId:t,spanId:n}=e.spanContext(),s=ds(e);return Am(t,n,s)}function us(e){return typeof e=="number"?Mm(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mm(e.getTime()):jt()}function Mm(e){return e>9999999999?e/1e3:e}function Fe(e){if(qx(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Wx(e)){const{attributes:s,startTime:i,name:l,endTime:c,parentSpanId:d,status:f}=e;return ut({span_id:t,trace_id:n,data:s,description:l,parent_span_id:d,start_timestamp:us(i),timestamp:us(c)||void 0,status:Lm(f),op:s[cs],origin:s[mt],_metrics_summary:bu(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Wx(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function qx(e){return typeof e.getSpanJSON=="function"}function ds(e){const{traceFlags:t}=e.spanContext();return t===Om}function Lm(e){if(!(!e||e.code===Ox))return e.code===km?"ok":e.message||"unknown_error"}const fs="_sentryChildSpans",Ou="_sentryRootSpan";function jm(e,t){const n=e[Ou]||e;pn(t,Ou,n),e[fs]?e[fs].add(t):pn(e,fs,new Set([t]))}function Vx(e,t){e[fs]&&e[fs].delete(t)}function Oa(e){const t=new Set;function n(s){if(!t.has(s)&&ds(s)){t.add(s);const i=s[fs]?Array.from(s[fs]):[];for(const l of i)n(l)}}return n(e),Array.from(t)}function Tt(e){return e[Ou]||e}function yt(){const e=as(),t=Ks(e);return t.getActiveSpan?t.getActiveSpan():Ra(Ve())}function Dm(){Nm||(Sr(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),Nm=!0)}let Fm=!1;function Gx(){Fm||(Fm=!0,im(Nu),am(Nu))}function Nu(){const e=yt(),t=e&&Tt(e);if(t){const n="internal_error";_e&&X.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:gt,message:n})}}Nu.tag="sentry_tracingErrorCallback";const $m="_sentryScope",Bm="_sentryIsolationScope";function Qx(e,t,n){e&&(pn(e,Bm,n),pn(e,$m,t))}function zm(e){return{scope:e[$m],isolationScope:e[Bm]}}function Ir(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ae(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Xs{constructor(t={}){this._traceId=t.traceId||Tr(),this._spanId=t.spanId||kr()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Pm}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,s){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}const Mu="production",Um="_frozenDsc";function Hm(e,t){pn(e,Um,t)}function Wm(e,t){const n=t.getOptions(),{publicKey:s}=t.getDsn()||{},i=ut({environment:n.environment||Mu,release:n.release,public_key:s,trace_id:e});return t.emit("createDsc",i),i}function qm(e,t){const n=t.getPropagationContext();return n.dsc||Wm(n.traceId,e)}function ps(e){const t=Ae();if(!t)return{};const n=Tt(e),s=n[Um];if(s)return s;const i=n.spanContext().traceState,l=i&&i.get("sentry.dsc"),c=l&&Cm(l);if(c)return c;const d=Wm(e.spanContext().traceId,t),f=Fe(n),m=f.data||{},y=m[xm];y!=null&&(d.sample_rate=`${y}`);const v=m[jn],w=f.description;return v!=="url"&&w&&(d.transaction=w),Ir()&&(d.sampled=String(ds(n))),t.emit("createDsc",d,n),d}function Yx(e){if(!_e)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:s}=Fe(e),{spanId:i}=e.spanContext(),l=ds(e),c=Tt(e),d=c===e,f=`[Tracing] Starting ${l?"sampled":"unsampled"} ${d?"root ":""}span`,m=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(s&&m.push(`parent ID: ${s}`),!d){const{op:y,description:v}=Fe(c);m.push(`root ID: ${c.spanContext().spanId}`),y&&m.push(`root op: ${y}`),v&&m.push(`root description: ${v}`)}X.log(`${f}
  ${m.join(`
  `)}`)}function Kx(e){if(!_e)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Fe(e),{spanId:s}=e.spanContext(),l=Tt(e)===e,c=`[Tracing] Finishing "${n}" ${l?"root ":""}span "${t}" with ID ${s}`;X.log(c)}function Na(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){_e&&X.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function Xx(e,t){if(!Ir(e))return[!1];const n=xn().getScopeData().sdkProcessingMetadata.normalizedRequest,s={...t,normalizedRequest:t.normalizedRequest||n};let i;typeof e.tracesSampler=="function"?i=e.tracesSampler(s):s.parentSampled!==void 0?i=s.parentSampled:typeof e.tracesSampleRate<"u"?i=e.tracesSampleRate:i=1;const l=Na(i);return l===void 0?(_e&&X.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):l?Math.random()<l?[!0,l]:(_e&&X.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[!1,l]):(_e&&X.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,l])}const Jx=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Zx(e){return e==="http"||e==="https"}function ei(e,t=!1){const{host:n,path:s,pass:i,port:l,projectId:c,protocol:d,publicKey:f}=e;return`${d}://${f}${t&&i?`:${i}`:""}@${n}${l?`:${l}`:""}/${s&&`${s}/`}${c}`}function eT(e){const t=Jx.exec(e);if(!t){Sr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,s,i="",l="",c="",d=""]=t.slice(1);let f="",m=d;const y=m.split("/");if(y.length>1&&(f=y.slice(0,-1).join("/"),m=y.pop()),m){const v=m.match(/^\d+/);v&&(m=v[0])}return Vm({host:l,pass:i,path:f,projectId:m,port:c,protocol:n,publicKey:s})}function Vm(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function tT(e){if(!vr)return!0;const{port:t,projectId:n,protocol:s}=e;return["protocol","publicKey","host","projectId"].find(c=>e[c]?!1:(X.error(`Invalid Sentry Dsn: ${c} missing`),!0))?!1:n.match(/^\d+$/)?Zx(s)?t&&isNaN(parseInt(t,10))?(X.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(X.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),!1):(X.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function nT(e){const t=typeof e=="string"?eT(e):Vm(e);if(!(!t||!tT(t)))return t}function rT(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(let l=0;l<t.length;l++)if(t[l]===i)return!0;return t.push(i),!1}function s(i){if(e)t.delete(i);else for(let l=0;l<t.length;l++)if(t[l]===i){t.splice(l,1);break}}return[n,s]}function Tn(e,t=100,n=1/0){try{return Lu("",e,t,n)}catch(s){return{ERROR:`**non-serializable** (${s})`}}}function Gm(e,t=3,n=100*1024){const s=Tn(e,t);return aT(s)>n?Gm(e,t-1,n):s}function Lu(e,t,n=1/0,s=1/0,i=rT()){const[l,c]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const d=sT(e,t);if(!d.startsWith("[object "))return d;if(t.__sentry_skip_normalization__)return t;const f=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(f===0)return d.replace("object ","");if(l(t))return"[Circular ~]";const m=t;if(m&&typeof m.toJSON=="function")try{const E=m.toJSON();return Lu("",E,f-1,s,i)}catch{}const y=Array.isArray(t)?[]:{};let v=0;const w=gm(t);for(const E in w){if(!Object.prototype.hasOwnProperty.call(w,E))continue;if(v>=s){y[E]="[MaxProperties ~]";break}const _=w[E];y[E]=Lu(E,_,f-1,s,i),v++}return c(t),y}function sT(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(dm(t))return"[VueViewModel]";if(cx(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Xn(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=oT(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function oT(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function iT(e){return~-encodeURI(e).split(/%..|./).length}function aT(e){return iT(JSON.stringify(e))}function hs(e,t=[]){return[e,t]}function lT(e,t){const[n,s]=e;return[n,[...s,t]]}function Qm(e,t){const n=e[1];for(const s of n){const i=s[0].type;if(t(s,i))return!0}return!1}function ju(e){return Ne.__SENTRY__&&Ne.__SENTRY__.encodePolyfill?Ne.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function cT(e){const[t,n]=e;let s=JSON.stringify(t);function i(l){typeof s=="string"?s=typeof l=="string"?s+l:[ju(s),l]:s.push(typeof l=="string"?ju(l):l)}for(const l of n){const[c,d]=l;if(i(`
${JSON.stringify(c)}
`),typeof d=="string"||d instanceof Uint8Array)i(d);else{let f;try{f=JSON.stringify(d)}catch{f=JSON.stringify(Tn(d))}i(f)}}return typeof s=="string"?s:uT(s)}function uT(e){const t=e.reduce((i,l)=>i+l.length,0),n=new Uint8Array(t);let s=0;for(const i of e)n.set(i,s),s+=i.length;return n}function dT(e){return[{type:"span"},e]}function fT(e){const t=typeof e.data=="string"?ju(e.data):e.data;return[ut({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const pT={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ym(e){return pT[e]}function Du(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Km(e,t,n,s){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&s&&{dsn:ei(s)},...i&&{trace:ut({...i})}}}function hT(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function mT(e,t,n,s){const i=Du(n),l={sent_at:new Date().toISOString(),...i&&{sdk:i},...!!s&&t&&{dsn:ei(t)}},c="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return hs(l,[c])}function gT(e,t,n,s){const i=Du(n),l=e.type&&e.type!=="replay_event"?e.type:"event";hT(e,n&&n.sdk);const c=Km(e,i,s,t);return delete e.sdkProcessingMetadata,hs(c,[[{type:l},e]])}function yT(e,t){function n(y){return!!y.trace_id&&!!y.public_key}const s=ps(e[0]),i=t&&t.getDsn(),l=t&&t.getOptions().tunnel,c={sent_at:new Date().toISOString(),...n(s)&&{trace:s},...!!l&&i&&{dsn:ei(i)}},d=t&&t.getOptions().beforeSendSpan,f=d?y=>{const v=d(Fe(y));return v||Dm(),v}:y=>Fe(y),m=[];for(const y of e){const v=f(y);v&&m.push(dT(v))}return hs(c,m)}function vT(e,t,n,s=yt()){const i=s&&Tt(s);i&&(_e&&X.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[Pa]:t,[Aa]:n}))}function Xm(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const s=n.attributes||{},i=s[Aa],l=s[Pa];typeof i=="string"&&typeof l=="number"&&(t[n.name]={value:l,unit:i})}),t}const Jm=1e3;class Fu{constructor(t={}){this._traceId=t.traceId||Tr(),this._spanId=t.spanId||kr(),this._startTime=t.startTimestamp||jt(),this._attributes={},this.setAttributes({[mt]:"manual",[cs]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:s}=this;return{spanId:t,traceId:n,traceFlags:s?Om:Pm}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=us(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(jn,"custom"),this}end(t){this._endTime||(this._endTime=us(t),Kx(this),this._onSpanEnded())}getSpanJSON(){return ut({data:this._attributes,description:this._name,op:this._attributes[cs],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Lm(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[mt],_metrics_summary:bu(this),profile_id:this._attributes[Px],exclusive_time:this._attributes[Au],measurements:Xm(this._events),is_segment:this._isStandaloneSpan&&Tt(this)===this||void 0,segment_id:this._isStandaloneSpan?Tt(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,s){_e&&X.log("[Tracing] Adding an event to span:",t);const i=Zm(n)?n:s||jt(),l=Zm(n)?{}:n||{},c={name:t,time:us(i),attributes:l};return this._events.push(c),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Ae();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Tt(this)))return;if(this._isStandaloneSpan){this._sampled?wT(yT([this],t)):(_e&&X.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const s=this._convertSpanToTransaction();s&&(zm(this).scope||Ve()).captureEvent(s)}_convertSpanToTransaction(){if(!eg(Fe(this)))return;this._name||(_e&&X.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=zm(this),i=(t||Ve()).getClient()||Ae();if(this._sampled!==!0){_e&&X.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),i&&i.recordDroppedEvent("sample_rate","transaction");return}const c=Oa(this).filter(v=>v!==this&&!ST(v)).map(v=>Fe(v)).filter(eg),d=this._attributes[jn];delete this._attributes[Tm],c.forEach(v=>{v.data&&delete v.data[Tm]});const f={contexts:{trace:zx(this)},spans:c.length>Jm?c.sort((v,w)=>v.start_timestamp-w.start_timestamp).slice(0,Jm):c,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...ut({dynamicSamplingContext:ps(this)})},_metrics_summary:bu(this),...d&&{transaction_info:{source:d}}},m=Xm(this._events);return m&&Object.keys(m).length&&(_e&&X.log("[Measurements] Adding measurements to transaction event",JSON.stringify(m,void 0,2)),f.measurements=m),f}}function Zm(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function eg(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ST(e){return e instanceof Fu&&e.isStandaloneSpan()}function wT(e){const t=Ae();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const tg="__SENTRY_SUPPRESS_TRACING__";function ti(e){const t=rg();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=ET(e),{forceTransaction:s,parentSpan:i}=e;return(e.scope?c=>Cu(e.scope,c):i!==void 0?c=>ng(i,c):c=>c())(()=>{const c=Ve(),d=TT(c);return e.onlyIfParent&&!d?new Xs:_T({parentSpan:d,spanArguments:n,forceTransaction:s,scope:c})})}function ng(e,t){const n=rg();return n.withActiveSpan?n.withActiveSpan(e,t):Cu(s=>(Zo(s,e||void 0),t(s)))}function _T({parentSpan:e,spanArguments:t,forceTransaction:n,scope:s}){if(!Ir())return new Xs;const i=xn();let l;if(e&&!n)l=xT(e,s,t),jm(e,l);else if(e){const c=ps(e),{traceId:d,spanId:f}=e.spanContext(),m=ds(e);l=sg({traceId:d,parentSpanId:f,...t},s,m),Hm(l,c)}else{const{traceId:c,dsc:d,parentSpanId:f,sampled:m}={...i.getPropagationContext(),...s.getPropagationContext()};l=sg({traceId:c,parentSpanId:f,...t},s,m),d&&Hm(l,d)}return Yx(l),Qx(l,s,i),l}function ET(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const s={...n};return s.startTimestamp=us(e.startTime),delete s.startTime,s}return n}function rg(){const e=as();return Ks(e)}function sg(e,t,n){const s=Ae(),i=s&&s.getOptions()||{},{name:l="",attributes:c}=e,[d,f]=t.getScopeData().sdkProcessingMetadata[tg]?[!1]:Xx(i,{name:l,parentSampled:n,attributes:c,transactionContext:{name:l,parentSampled:n}}),m=new Fu({...e,attributes:{[jn]:"custom",...e.attributes},sampled:d});return f!==void 0&&m.setAttribute(xm,f),s&&s.emit("spanStart",m),m}function xT(e,t,n){const{spanId:s,traceId:i}=e.spanContext(),l=t.getScopeData().sdkProcessingMetadata[tg]?!1:ds(e),c=l?new Fu({...n,parentSpanId:s,traceId:i,sampled:l}):new Xs({traceId:i});jm(e,c);const d=Ae();return d&&(d.emit("spanStart",c),n.endTimestamp&&d.emit("spanEnd",c)),c}function TT(e){const t=Ra(e);if(!t)return;const n=Ae();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Tt(t):t}const Ma={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},kT="heartbeatFailed",IT="idleTimeout",CT="finalTimeout",bT="externalFinish";function og(e,t={}){const n=new Map;let s=!1,i,l=bT,c=!t.disableAutoFinish;const d=[],{idleTimeout:f=Ma.idleTimeout,finalTimeout:m=Ma.finalTimeout,childSpanTimeout:y=Ma.childSpanTimeout,beforeSpanEnd:v}=t,w=Ae();if(!w||!Ir())return new Xs;const E=Ve(),_=yt(),T=RT(e);T.end=new Proxy(T.end,{apply(j,D,Y){v&&v(T);const[K,...V]=Y,se=K||jt(),ie=us(se),ge=Oa(T).filter(B=>B!==T);if(!ge.length)return W(ie),Reflect.apply(j,D,[ie,...V]);const Ce=ge.map(B=>Fe(B).timestamp).filter(B=>!!B),He=Ce.length?Math.max(...Ce):void 0,le=Fe(T).start_timestamp,Ee=Math.min(le?le+m/1e3:1/0,Math.max(le||-1/0,Math.min(ie,He||1/0)));return W(Ee),Reflect.apply(j,D,[Ee,...V])}});function k(){i&&(clearTimeout(i),i=void 0)}function M(j){k(),i=setTimeout(()=>{!s&&n.size===0&&c&&(l=IT,T.end(j))},f)}function P(j){i=setTimeout(()=>{!s&&c&&(l=kT,T.end(j))},y)}function $(j){k(),n.set(j,!0);const D=jt();P(D+y/1e3)}function q(j){if(n.has(j)&&n.delete(j),n.size===0){const D=jt();M(D+f/1e3)}}function W(j){s=!0,n.clear(),d.forEach(ie=>ie()),Zo(E,_);const D=Fe(T),{start_timestamp:Y}=D;if(!Y)return;(D.data||{})[Ru]||T.setAttribute(Ru,l),X.log(`[Tracing] Idle span "${D.op}" finished`);const V=Oa(T).filter(ie=>ie!==T);let se=0;V.forEach(ie=>{ie.isRecording()&&(ie.setStatus({code:gt,message:"cancelled"}),ie.end(j),_e&&X.log("[Tracing] Cancelling span since span ended early",JSON.stringify(ie,void 0,2)));const ge=Fe(ie),{timestamp:Ce=0,start_timestamp:He=0}=ge,le=He<=j,Ee=(m+f)/1e3,B=Ce-He<=Ee;if(_e){const ne=JSON.stringify(ie,void 0,2);le?B||X.log("[Tracing] Discarding span since it finished after idle span final timeout",ne):X.log("[Tracing] Discarding span since it happened after idle span was finished",ne)}(!B||!le)&&(Vx(T,ie),se++)}),se>0&&T.setAttribute("sentry.idle_span_discarded_spans",se)}return d.push(w.on("spanStart",j=>{if(s||j===T||Fe(j).timestamp)return;Oa(T).includes(j)&&$(j.spanContext().spanId)})),d.push(w.on("spanEnd",j=>{s||q(j.spanContext().spanId)})),d.push(w.on("idleSpanEnableAutoFinish",j=>{j===T&&(c=!0,M(),n.size&&P())})),t.disableAutoFinish||M(),setTimeout(()=>{s||(T.setStatus({code:gt,message:"deadline_exceeded"}),l=CT,T.end())},m),T}function RT(e){const t=ti(e);return Zo(Ve(),t),_e&&X.log("[Tracing] Started span is an idle span"),t}function $u(e,t,n,s=0){return new hn((i,l)=>{const c=e[s];if(t===null||typeof c!="function")i(t);else{const d=c({...t},n);_e&&c.id&&d===null&&X.log(`Event processor "${c.id}" dropped event`),Ia(d)?d.then(f=>$u(e,f,n,s+1).then(i)).then(null,l):$u(e,d,n,s+1).then(i).then(null,l)}})}let La,ig,ja;function AT(e){const t=Ne._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return ja&&n.length===ig||(ig=n.length,ja=n.reduce((s,i)=>{La||(La={});const l=La[i];if(l)s[l[0]]=l[1];else{const c=e(i);for(let d=c.length-1;d>=0;d--){const f=c[d],m=f&&f.filename,y=t[i];if(m&&y){s[m]=y,La[i]=[m,y];break}}}return s},{})),ja}function PT(e,t){const{fingerprint:n,span:s,breadcrumbs:i,sdkProcessingMetadata:l}=t;OT(e,t),s&&LT(e,s),jT(e,n),NT(e,i),MT(e,l)}function ag(e,t){const{extra:n,tags:s,user:i,contexts:l,level:c,sdkProcessingMetadata:d,breadcrumbs:f,fingerprint:m,eventProcessors:y,attachments:v,propagationContext:w,transactionName:E,span:_}=t;Da(e,"extra",n),Da(e,"tags",s),Da(e,"user",i),Da(e,"contexts",l),e.sdkProcessingMetadata=ba(e.sdkProcessingMetadata,d,2),c&&(e.level=c),E&&(e.transactionName=E),_&&(e.span=_),f.length&&(e.breadcrumbs=[...e.breadcrumbs,...f]),m.length&&(e.fingerprint=[...e.fingerprint,...m]),y.length&&(e.eventProcessors=[...e.eventProcessors,...y]),v.length&&(e.attachments=[...e.attachments,...v]),e.propagationContext={...e.propagationContext,...w}}function Da(e,t,n){e[t]=ba(e[t],n,1)}function OT(e,t){const{extra:n,tags:s,user:i,contexts:l,level:c,transactionName:d}=t,f=ut(n);f&&Object.keys(f).length&&(e.extra={...f,...e.extra});const m=ut(s);m&&Object.keys(m).length&&(e.tags={...m,...e.tags});const y=ut(i);y&&Object.keys(y).length&&(e.user={...y,...e.user});const v=ut(l);v&&Object.keys(v).length&&(e.contexts={...v,...e.contexts}),c&&(e.level=c),d&&e.type!=="transaction"&&(e.transaction=d)}function NT(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function MT(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function LT(e,t){e.contexts={trace:Ux(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ps(t),...e.sdkProcessingMetadata};const n=Tt(t),s=Fe(n).description;s&&!e.transaction&&e.type==="transaction"&&(e.transaction=s)}function jT(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function lg(e,t,n,s,i,l){const{normalizeDepth:c=3,normalizeMaxBreadth:d=1e3}=e,f={...t,event_id:t.event_id||n.event_id||Zt(),timestamp:t.timestamp||Jo()},m=n.integrations||e.integrations.map(k=>k.name);DT(f,e),BT(f,m),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&FT(f,e.stackParser);const y=UT(s,n.captureContext);n.mechanism&&Gs(f,n.mechanism);const v=i?i.getEventProcessors():[],w=bx().getScopeData();if(l){const k=l.getScopeData();ag(w,k)}if(y){const k=y.getScopeData();ag(w,k)}const E=[...n.attachments||[],...w.attachments];E.length&&(n.attachments=E),PT(f,w);const _=[...v,...w.eventProcessors];return $u(_,f,n).then(k=>(k&&$T(k),typeof c=="number"&&c>0?zT(k,c,d):k))}function DT(e,t){const{environment:n,release:s,dist:i,maxValueLength:l=250}=t;e.environment=e.environment||n||Mu,!e.release&&s&&(e.release=s),!e.dist&&i&&(e.dist=i),e.message&&(e.message=Vs(e.message,l));const c=e.exception&&e.exception.values&&e.exception.values[0];c&&c.value&&(c.value=Vs(c.value,l));const d=e.request;d&&d.url&&(d.url=Vs(d.url,l))}function FT(e,t){const n=AT(t);try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(i=>{n&&i.filename&&(i.debug_id=n[i.filename])})})}catch{}}function $T(e){const t={};try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([s,i])=>{n.push({type:"sourcemap",code_file:s,debug_id:i})})}function BT(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function zT(e,t,n){if(!e)return null;const s={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Tn(i.data,t,n)}}))},...e.user&&{user:Tn(e.user,t,n)},...e.contexts&&{contexts:Tn(e.contexts,t,n)},...e.extra&&{extra:Tn(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&s.contexts&&(s.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(s.contexts.trace.data=Tn(e.contexts.trace.data,t,n))),e.spans&&(s.spans=e.spans.map(i=>({...i,...i.data&&{data:Tn(i.data,t,n)}}))),e.contexts&&e.contexts.flags&&s.contexts&&(s.contexts.flags=Tn(e.contexts.flags,3,n)),s}function UT(e,t){if(!t)return e;const n=e?e.clone():new ls;return n.update(t),n}function q8(e){}function Dn(e,t){return Ve().captureException(e,void 0)}function cg(e,t){return Ve().captureEvent(e,t)}function ug(e,t){xn().setContext(e,t)}function HT(){const e=Ae();return!!e&&e.getOptions().enabled!==!1&&!!e.getTransport()}function WT(e){xn().addEventProcessor(e)}function dg(e){const t=Ae(),n=xn(),s=Ve(),{release:i,environment:l=Mu}=t&&t.getOptions()||{},{userAgent:c}=Ne.navigator||{},d=vx({release:i,environment:l,user:s.getUser()||n.getUser(),...c&&{userAgent:c},...e}),f=n.getSession();return f&&f.status==="ok"&&Qs(f,{status:"exited"}),fg(),n.setSession(d),s.setSession(d),d}function fg(){const e=xn(),t=Ve(),n=t.getSession()||e.getSession();n&&Sx(n),pg(),e.setSession(),t.setSession()}function pg(){const e=xn(),t=Ve(),n=Ae(),s=t.getSession()||e.getSession();s&&n&&n.captureSession(s)}function hg(e=!1){if(e){fg();return}pg()}const qT="7";function VT(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function GT(e){return`${VT(e)}${e.projectId}/envelope/`}function QT(e,t){const n={sentry_version:qT};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function YT(e,t,n){return t||`${GT(e)}?${QT(e,n)}`}const mg=[];function KT(e){const t={};return e.forEach(n=>{const{name:s}=n,i=t[s];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[s]=n)}),Object.values(t)}function XT(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(c=>{c.isDefaultInstance=!0});let s;if(Array.isArray(n))s=[...t,...n];else if(typeof n=="function"){const c=n(t);s=Array.isArray(c)?c:[c]}else s=t;const i=KT(s),l=i.findIndex(c=>c.name==="Debug");if(l>-1){const[c]=i.splice(l,1);i.push(c)}return i}function JT(e,t){const n={};return t.forEach(s=>{s&&yg(e,s,n)}),n}function gg(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function yg(e,t,n){if(n[t.name]){_e&&X.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,mg.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),mg.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const s=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,l)=>s(i,l,e))}if(typeof t.processEvent=="function"){const s=t.processEvent.bind(t),i=Object.assign((l,c)=>s(l,c,e),{id:t.name});e.addEventProcessor(i)}_e&&X.log(`Integration installed: ${t.name}`)}function V8(e){return e}function ZT(e,t,n){const s=[{type:"client_report"},{timestamp:Jo(),discarded_events:e}];return hs(t?{dsn:t}:{},[s])}class Fn extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const vg="Not capturing exception because it's already been captured.";class ek{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=nT(t.dsn):_e&&X.warn("No DSN provided, client will not send events."),this._dsn){const i=YT(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}const s=["enableTracing","tracesSampleRate","tracesSampler"].find(i=>i in t&&t[i]==null);s&&Sr(()=>{console.warn(`[Sentry] Deprecation warning: \`${s}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,n,s){const i=Zt();if(_m(t))return _e&&X.log(vg),i;const l={event_id:i,...n};return this._process(this.eventFromException(t,l).then(c=>this._captureEvent(c,l,s))),l.event_id}captureMessage(t,n,s,i){const l={event_id:Zt(),...s},c=wu(t)?t:String(t),d=_u(t)?this.eventFromMessage(c,n,l):this.eventFromException(t,l);return this._process(d.then(f=>this._captureEvent(f,l,i))),l.event_id}captureEvent(t,n,s){const i=Zt();if(n&&n.originalException&&_m(n.originalException))return _e&&X.log(vg),i;const l={event_id:i,...n},d=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,l,d||s)),l.event_id}captureSession(t){typeof t.release!="string"?_e&&X.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Qs(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(s=>n.flush(t).then(i=>s&&i))):nr(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];yg(this,t,this._integrations),n||gg(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let s=gT(t,this._dsn,this._options._metadata,this._options.tunnel);for(const l of n.attachments||[])s=lT(s,fT(l));const i=this.sendEnvelope(s);i&&i.then(l=>this.emit("afterSendEvent",t,l),null)}sendSession(t){const n=mT(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,s){if(this._options.sendClientReports){const i=typeof s=="number"?s:1,l=`${t}:${n}`;_e&&X.log(`Recording outcome: "${l}"${i>1?` (${i} times)`:""}`),this._outcomes[l]=(this._outcomes[l]||0)+i}}on(t,n){const s=this._hooks[t]=this._hooks[t]||[];return s.push(n),()=>{const i=s.indexOf(n);i>-1&&s.splice(i,1)}}emit(t,...n){const s=this._hooks[t];s&&s.forEach(i=>i(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(_e&&X.error("Error while sending envelope:",n),n)):(_e&&X.error("Transport disabled"),nr({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=JT(this,t),gg(this,t)}_updateSessionFromEvent(t,n){let s=!1,i=!1;const l=n.exception&&n.exception.values;if(l){i=!0;for(const f of l){const m=f.mechanism;if(m&&m.handled===!1){s=!0;break}}}const c=t.status==="ok";(c&&t.errors===0||c&&s)&&(Qs(t,{...s&&{status:"crashed"},errors:t.errors||Number(i||s)}),this.captureSession(t))}_isClientDoneProcessing(t){return new hn(n=>{let s=0;const i=1,l=setInterval(()=>{this._numProcessing==0?(clearInterval(l),n(!0)):(s+=i,t&&s>=t&&(clearInterval(l),n(!1)))},i)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,s=Ve(),i=xn()){const l=this.getOptions(),c=Object.keys(this._integrations);return!n.integrations&&c.length>0&&(n.integrations=c),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),lg(l,t,n,s,this,i).then(d=>{if(d===null)return d;d.contexts={trace:Rx(s),...d.contexts};const f=qm(this,s);return d.sdkProcessingMetadata={dynamicSamplingContext:f,...d.sdkProcessingMetadata},d})}_captureEvent(t,n={},s){return this._processEvent(t,n,s).then(i=>i.event_id,i=>{if(_e){const l=i;l.logLevel==="log"?X.log(l.message):X.warn(l)}})}_processEvent(t,n,s){const i=this.getOptions(),{sampleRate:l}=i,c=wg(t),d=Sg(t),f=t.type||"error",m=`before send for type \`${f}\``,y=typeof l>"u"?void 0:Na(l);if(d&&typeof y=="number"&&Math.random()>y)return this.recordDroppedEvent("sample_rate","error",t),Ca(new Fn(`Discarding event because it's not included in the random sample (sampling rate = ${l})`,"log"));const v=f==="replay_event"?"replay":f,E=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,s,E).then(_=>{if(_===null)throw this.recordDroppedEvent("event_processor",v,t),new Fn("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return _;const k=nk(this,i,_,n);return tk(k,m)}).then(_=>{if(_===null){if(this.recordDroppedEvent("before_send",v,t),c){const P=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",P)}throw new Fn(`${m} returned \`null\`, will not send event.`,"log")}const T=s&&s.getSession();if(!c&&T&&this._updateSessionFromEvent(T,_),c){const M=_.sdkProcessingMetadata&&_.sdkProcessingMetadata.spanCountBeforeProcessing||0,P=_.spans?_.spans.length:0,$=M-P;$>0&&this.recordDroppedEvent("before_send","span",$)}const k=_.transaction_info;if(c&&k&&_.transaction!==t.transaction){const M="custom";_.transaction_info={...k,source:M}}return this.sendEvent(_,n),_}).then(null,_=>{throw _ instanceof Fn?_:(this.captureException(_,{data:{__sentry__:!0},originalException:_}),new Fn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${_}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,s])=>{const[i,l]=n.split(":");return{reason:i,category:l,quantity:s}})}_flushOutcomes(){_e&&X.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){_e&&X.log("No outcomes to send");return}if(!this._dsn){_e&&X.log("No dsn provided, will not send outcomes");return}_e&&X.log("Sending outcomes:",t);const n=ZT(t,this._options.tunnel&&ei(this._dsn));this.sendEnvelope(n)}}function tk(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ia(e))return e.then(s=>{if(!Ws(s)&&s!==null)throw new Fn(n);return s},s=>{throw new Fn(`${t} rejected with ${s}`)});if(!Ws(e)&&e!==null)throw new Fn(n);return e}function nk(e,t,n,s){const{beforeSend:i,beforeSendTransaction:l,beforeSendSpan:c}=t;if(Sg(n)&&i)return i(n,s);if(wg(n)){if(n.spans&&c){const d=[];for(const f of n.spans){const m=c(f);m?d.push(m):(Dm(),e.recordDroppedEvent("before_send","span"))}n.spans=d}if(l){if(n.spans){const d=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:d}}return l(n,s)}}return n}function Sg(e){return e.type===void 0}function wg(e){return e.type==="transaction"}function rk(e,t){t.debug===!0&&(_e?X.enable():Sr(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ve().update(t.initialScope);const s=new e(t);return sk(s),s.init(),s}function sk(e){Ve().setClient(e)}function ok(e){const t=[];function n(){return e===void 0||t.length<e}function s(c){return t.splice(t.indexOf(c),1)[0]||Promise.resolve(void 0)}function i(c){if(!n())return Ca(new Fn("Not adding Promise because buffer limit was reached."));const d=c();return t.indexOf(d)===-1&&t.push(d),d.then(()=>s(d)).then(null,()=>s(d).then(null,()=>{})),d}function l(c){return new hn((d,f)=>{let m=t.length;if(!m)return d(!0);const y=setTimeout(()=>{c&&c>0&&d(!1)},c);t.forEach(v=>{nr(v).then(()=>{--m||(clearTimeout(y),d(!0))},f)})})}return{$:t,add:i,drain:l}}const ik=60*1e3;function ak(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const s=Date.parse(`${e}`);return isNaN(s)?ik:s-t}function lk(e,t){return e[t]||e.all||0}function _g(e,t,n=Date.now()){return lk(e,t)>n}function Eg(e,{statusCode:t,headers:n},s=Date.now()){const i={...e},l=n&&n["x-sentry-rate-limits"],c=n&&n["retry-after"];if(l)for(const d of l.trim().split(",")){const[f,m,,,y]=d.split(":",5),v=parseInt(f,10),w=(isNaN(v)?60:v)*1e3;if(!m)i.all=s+w;else for(const E of m.split(";"))E==="metric_bucket"?(!y||y.split(";").includes("custom"))&&(i[E]=s+w):i[E]=s+w}else c?i.all=s+ak(c,s):t===429&&(i.all=s+60*1e3);return i}const ck=64;function uk(e,t,n=ok(e.bufferSize||ck)){let s={};const i=c=>n.drain(c);function l(c){const d=[];if(Qm(c,(v,w)=>{const E=Ym(w);if(_g(s,E)){const _=xg(v,w);e.recordDroppedEvent("ratelimit_backoff",E,_)}else d.push(v)}),d.length===0)return nr({});const f=hs(c[0],d),m=v=>{Qm(f,(w,E)=>{const _=xg(w,E);e.recordDroppedEvent(v,Ym(E),_)})},y=()=>t({body:cT(f)}).then(v=>(v.statusCode!==void 0&&(v.statusCode<200||v.statusCode>=300)&&_e&&X.warn(`Sentry responded with status code ${v.statusCode} to sent event.`),s=Eg(s,v),v),v=>{throw m("network_error"),v});return n.add(y).then(v=>v,v=>{if(v instanceof Fn)return _e&&X.error("Skipped sending event because buffer is full."),m("queue_overflow"),nr({});throw v})}return{send:l,flush:i}}function xg(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function dk(e,t){const n=t&&t.getDsn(),s=t&&t.getOptions().tunnel;return pk(e,n)||fk(e,s)}function fk(e,t){return t?Tg(e)===Tg(t):!1}function pk(e,t){return t?e.includes(t.host):!1}function Tg(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function kg(e,t,n=[t],s="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(l=>({name:`${s}:@sentry/${l}`,version:os})),version:os}),e._metadata=i}function Ig(e={}){const t=Ae();if(!HT()||!t)return{};const n=as(),s=Ks(n);if(s.getTraceData)return s.getTraceData(e);const i=Ve(),l=e.span||yt(),c=l?Hx(l):hk(i),d=l?ps(l):qm(t,i),f=jx(d);return Rm.test(c)?{"sentry-trace":c,baggage:f}:(X.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function hk(e){const{traceId:t,sampled:n,spanId:s}=e.getPropagationContext();return Am(t,s,n)}const mk=100;function Cr(e,t){const n=Ae(),s=xn();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:l=mk}=n.getOptions();if(l<=0)return;const d={timestamp:Jo(),...e},f=i?Sr(()=>i(d,t)):d;f!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",f,t),s.addBreadcrumb(f,l))}let Cg;const gk="FunctionToString",bg=new WeakMap,yk=()=>({name:gk,setupOnce(){Cg=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Eu(this),n=bg.has(Ae())&&t!==void 0?t:this;return Cg.apply(n,e)}}catch{}},setup(e){bg.set(e,!0)}}),vk=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Sk="InboundFilters",wk=(e={})=>({name:Sk,processEvent(t,n,s){const i=s.getOptions(),l=_k(e,i);return Ek(t,l)?null:t}});function _k(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:vk],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Ek(e,t){return t.ignoreInternal&&bk(e)?(_e&&X.warn(`Event dropped due to being internal Sentry Error.
Event: ${xr(e)}`),!0):xk(e,t.ignoreErrors)?(_e&&X.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
Event: ${xr(e)}`),!0):Ak(e)?(_e&&X.warn(`Event dropped due to not having an error message, error type or stacktrace.
Event: ${xr(e)}`),!0):Tk(e,t.ignoreTransactions)?(_e&&X.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
Event: ${xr(e)}`),!0):kk(e,t.denyUrls)?(_e&&X.warn(`Event dropped due to being matched by \`denyUrls\` option.
Event: ${xr(e)}.
Url: ${Fa(e)}`),!0):Ik(e,t.allowUrls)?!1:(_e&&X.warn(`Event dropped due to not being matched by \`allowUrls\` option.
Event: ${xr(e)}.
Url: ${Fa(e)}`),!0)}function xk(e,t){return e.type||!t||!t.length?!1:Ck(e).some(n=>Er(n,t))}function Tk(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Er(n,t):!1}function kk(e,t){if(!t||!t.length)return!1;const n=Fa(e);return n?Er(n,t):!1}function Ik(e,t){if(!t||!t.length)return!0;const n=Fa(e);return n?Er(n,t):!0}function Ck(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function bk(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Rk(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Fa(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Rk(t):null}catch{return _e&&X.error(`Cannot extract url for event ${xr(e)}`),null}}function Ak(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function Pk(e,t,n=250,s,i,l,c){if(!l.exception||!l.exception.values||!c||!Zn(c.originalException,Error))return;const d=l.exception.values.length>0?l.exception.values[l.exception.values.length-1]:void 0;d&&(l.exception.values=Ok(Bu(e,t,i,c.originalException,s,l.exception.values,d,0),n))}function Bu(e,t,n,s,i,l,c,d){if(l.length>=n+1)return l;let f=[...l];if(Zn(s[i],Error)){Rg(c,d);const m=e(t,s[i]),y=f.length;Ag(m,i,y,d),f=Bu(e,t,n,s[i],i,[m,...f],m,y)}return Array.isArray(s.errors)&&s.errors.forEach((m,y)=>{if(Zn(m,Error)){Rg(c,d);const v=e(t,m),w=f.length;Ag(v,`errors[${y}]`,w,d),f=Bu(e,t,n,m,i,[v,...f],v,w)}}),f}function Rg(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ag(e,t,n,s){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:s}}function Ok(e,t){return e.map(n=>(n.value&&(n.value=Vs(n.value,t)),n))}function ms(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",s=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:s,relative:t[5]+n+s}}function Nk(e){const t="console";wr(t,e),_r(t,Mk)}function Mk(){"console"in Ne&&hu.forEach(function(e){e in Ne.console&&Wt(Ne.console,e,function(t){return Ea[e]=t,function(...n){fn("console",{args:n,level:e});const i=Ea[e];i&&i.apply(Ne.console,n)}})})}function Pg(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Lk="Dedupe",jk=()=>{let e;return{name:Lk,processEvent(t){if(t.type)return t;try{if(Dk(t,e))return _e&&X.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Dk(e,t){return t?!!(Fk(e,t)||$k(e,t)):!1}function Fk(e,t){const n=e.message,s=t.message;return!(!n&&!s||n&&!s||!n&&s||n!==s||!Ng(e,t)||!Og(e,t))}function $k(e,t){const n=Mg(t),s=Mg(e);return!(!n||!s||n.type!==s.type||n.value!==s.value||!Ng(e,t)||!Og(e,t))}function Og(e,t){let n=sm(e),s=sm(t);if(!n&&!s)return!0;if(n&&!s||!n&&s||(n=n,s=s,s.length!==n.length))return!1;for(let i=0;i<s.length;i++){const l=s[i],c=n[i];if(l.filename!==c.filename||l.lineno!==c.lineno||l.colno!==c.colno||l.function!==c.function)return!1}return!0}function Ng(e,t){let n=e.fingerprint,s=t.fingerprint;if(!n&&!s)return!0;if(n&&!s||!n&&s)return!1;n=n,s=s;try{return n.join("")===s.join("")}catch{return!1}}function Mg(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Bk(e,t,n,s,i="auto.http.browser"){if(!e.fetchData)return;const l=Ir()&&t(e.fetchData.url);if(e.endTimestamp&&l){const w=e.fetchData.__span;if(!w)return;const E=s[w];E&&(Hk(E,e),delete s[w]);return}const{method:c,url:d}=e.fetchData,f=Uk(d),m=f?ms(f).host:void 0,y=!!yt(),v=l&&y?ti({name:`${c} ${d}`,attributes:{url:d,type:"fetch","http.method":c,"http.url":f,"server.address":m,[mt]:i,[cs]:"http.client"}}):new Xs;if(e.fetchData.__span=v.spanContext().spanId,s[v.spanContext().spanId]=v,n(e.fetchData.url)){const w=e.args[0],E=e.args[1]||{},_=zk(w,E,Ir()&&y?v:void 0);_&&(e.args[1]=E,E.headers=_)}return v}function zk(e,t,n){const s=Ig({span:n}),i=s["sentry-trace"],l=s.baggage;if(!i)return;const c=t.headers||(Wk(e)?e.headers:void 0);if(c)if(qk(c)){const d=new Headers(c);if(d.set("sentry-trace",i),l){const f=d.get("baggage");if(f){const m=$a(f);d.set("baggage",m?`${m},${l}`:l)}else d.set("baggage",l)}return d}else if(Array.isArray(c)){const d=[...c.filter(f=>!(Array.isArray(f)&&f[0]==="sentry-trace")).map(f=>{if(Array.isArray(f)&&f[0]==="baggage"&&typeof f[1]=="string"){const[m,y,...v]=f;return[m,$a(y),...v]}else return f}),["sentry-trace",i]];return l&&d.push(["baggage",l]),d}else{const d="baggage"in c?c.baggage:void 0;let f=[];return Array.isArray(d)?f=d.map(m=>typeof m=="string"?$a(m):m).filter(m=>m===""):d&&f.push($a(d)),l&&f.push(l),{...c,"sentry-trace":i,baggage:f.length>0?f.join(","):void 0}}else return{...s}}function Uk(e){try{return new URL(e).href}catch{return}}function Hk(e,t){if(t.response){Im(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const s=parseInt(n);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:gt,message:"internal_error"});e.end()}function $a(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(Pu)).join(",")}function Wk(e){return typeof Request<"u"&&Zn(e,Request)}function qk(e){return typeof Headers<"u"&&Zn(e,Headers)}function Lg(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const zu=Ne;function jg(){if(!("fetch"in zu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Uu(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Vk(){if(typeof EdgeRuntime=="string")return!0;if(!jg())return!1;if(Uu(zu.fetch))return!0;let e=!1;const t=zu.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Uu(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){vr&&X.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Dg(e,t){const n="fetch";wr(n,e),_r(n,()=>Fg(void 0,t))}function Gk(e){const t="fetch-body-resolved";wr(t,e),_r(t,()=>Fg(Yk))}function Fg(e,t=!1){t&&!Vk()||Wt(Ne,"fetch",function(n){return function(...s){const i=new Error,{method:l,url:c}=Kk(s),d={args:s,fetchData:{method:l,url:c},startTimestamp:jt()*1e3,virtualError:i};return e||fn("fetch",{...d}),n.apply(Ne,s).then(async f=>(e?e(f):fn("fetch",{...d,endTimestamp:jt()*1e3,response:f}),f),f=>{throw fn("fetch",{...d,endTimestamp:jt()*1e3,error:f}),Su(f)&&f.stack===void 0&&(f.stack=i.stack,pn(f,"framesToPop",1)),f})}})}async function Qk(e,t){if(e&&e.body){const n=e.body,s=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let l=!0;for(;l;){let c;try{c=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:d}=await s.read();clearTimeout(c),d&&(t(),l=!1)}catch{l=!1}finally{clearTimeout(c)}}clearTimeout(i),s.releaseLock(),n.cancel().then(null,()=>{})}}function Yk(e){let t;try{t=e.clone()}catch{return}Qk(t,()=>{fn("fetch-body-resolved",{endTimestamp:jt()*1e3,response:e})})}function Hu(e,t){return!!e&&typeof e=="object"&&!!e[t]}function $g(e){return typeof e=="string"?e:e?Hu(e,"url")?e.url:e.toString?e.toString():"":""}function Kk(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,s]=e;return{url:$g(n),method:Hu(s,"method")?String(s.method).toUpperCase():"GET"}}const t=e[0];return{url:$g(t),method:Hu(t,"method")?String(t.method).toUpperCase():"GET"}}function Xk(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Jk(){return"npm"}function Zk(){return!Xk()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Bg(){return typeof window<"u"&&(!Zk()||eI())}function eI(){const e=Ne.process;return!!e&&e.type==="renderer"}const Ba=Ne;function tI(){const e=Ba.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ba&&!!Ba.history.pushState&&!!Ba.history.replaceState;return!t&&n}function nI(e,t){return e??t()}function za(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}const ve=Ne;let Wu=0;function zg(){return Wu>0}function rI(){Wu++,setTimeout(()=>{Wu--})}function Js(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{const i=e.__sentry_wrapped__;if(i)return typeof i=="function"?i:e;if(Eu(e))return e}catch{return e}const s=function(...i){try{const l=i.map(c=>Js(c,t));return e.apply(this,l)}catch(l){throw rI(),Cu(c=>{c.addEventProcessor(d=>(t.mechanism&&(Tu(d,void 0),Gs(d,t.mechanism)),d.extra={...d.extra,arguments:i},d)),Dn(l)}),l}};try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s[i]=e[i])}catch{}mm(s,e),pn(e,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get(){return e.name}})}catch{}return s}const $n=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function qu(e,t){const n=Gu(e,t),s={type:lI(t),value:cI(t)};return n.length&&(s.stacktrace={frames:n}),s.type===void 0&&s.value===""&&(s.value="Unrecoverable error caught"),s}function sI(e,t,n,s){const i=Ae(),l=i&&i.getOptions().normalizeDepth,c=hI(t),d={__serialized__:Gm(t,l)};if(c)return{exception:{values:[qu(e,c)]},extra:d};const f={exception:{values:[{type:ka(t)?t.constructor.name:s?"UnhandledRejection":"Error",value:fI(t,{isUnhandledRejection:s})}]},extra:d};if(n){const m=Gu(e,n);m.length&&(f.exception.values[0].stacktrace={frames:m})}return f}function Vu(e,t){return{exception:{values:[qu(e,t)]}}}function Gu(e,t){const n=t.stacktrace||t.stack||"",s=iI(t),i=aI(t);try{return e(n,s,i)}catch{}return[]}const oI=/Minified React error #\d+;/i;function iI(e){return e&&oI.test(e.message)?1:0}function aI(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ug(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function lI(e){const t=e&&e.name;return!t&&Ug(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function cI(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Ug(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function uI(e,t,n,s){const i=n&&n.syntheticException||void 0,l=Qu(e,t,i,s);return Gs(l),l.level="error",n&&n.event_id&&(l.event_id=n.event_id),nr(l)}function dI(e,t,n="info",s,i){const l=s&&s.syntheticException||void 0,c=Yu(e,t,l,i);return c.level=n,s&&s.event_id&&(c.event_id=s.event_id),nr(c)}function Qu(e,t,n,s,i){let l;if(cm(t)&&t.error)return Vu(e,t.error);if(um(t)||ix(t)){const c=t;if("stack"in t)l=Vu(e,t);else{const d=c.name||(um(c)?"DOMError":"DOMException"),f=c.message?`${d}: ${c.message}`:d;l=Yu(e,f,n,s),Tu(l,f)}return"code"in c&&(l.tags={...l.tags,"DOMException.code":`${c.code}`}),l}return Su(t)?Vu(e,t):Ws(t)||ka(t)?(l=sI(e,t,n,i),Gs(l,{synthetic:!0}),l):(l=Yu(e,t,n,s),Tu(l,`${t}`),Gs(l,{synthetic:!0}),l)}function Yu(e,t,n,s){const i={};if(s&&n){const l=Gu(e,n);l.length&&(i.exception={values:[{value:t,stacktrace:{frames:l}}]}),Gs(i,{synthetic:!0})}if(wu(t)){const{__sentry_template_string__:l,__sentry_template_values__:c}=t;return i.logentry={message:l,params:c},i}return i.message=t,i}function fI(e,{isUnhandledRejection:t}){const n=hx(e),s=t?"promise rejection":"exception";return cm(e)?`Event \`ErrorEvent\` captured as ${s} with message \`${e.message}\``:ka(e)?`Event \`${pI(e)}\` (type=${e.type}) captured as ${s}`:`Object captured as ${s} with keys: ${n}`}function pI(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function hI(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function mI(e,{metadata:t,tunnel:n,dsn:s}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!s&&{dsn:ei(s)}},l=gI(e);return hs(i,[l])}function gI(e){return[{type:"user_report"},e]}class yI extends ek{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},s=ve.SENTRY_SDK_SOURCE||Jk();kg(n,"browser",["browser"],s),super(n),n.sendClientReports&&ve.document&&ve.document.addEventListener("visibilitychange",()=>{ve.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return uI(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",s){return dI(this._options.stackParser,t,n,s,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){$n&&X.warn("SDK not enabled, will not capture user feedback.");return}const n=mI(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,s)}}const Ku=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,vI=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Zs=(e,t,n,s)=>{let i,l;return c=>{t.value>=0&&(c||s)&&(l=t.value-(i||0),(l||i===void 0)&&(i=t.value,t.delta=l,t.rating=vI(t.value,n),e(t)))}},de=Ne,SI=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ni=(e=!0)=>{const t=de.performance&&de.performance.getEntriesByType&&de.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},ri=()=>{const e=ni();return e&&e.activationStart||0},eo=(e,t)=>{const n=ni();let s="navigate";return n&&(de.document&&de.document.prerendering||ri()>0?s="prerender":de.document&&de.document.wasDiscarded?s="restore":n.type&&(s=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:SI(),navigationType:s}},gs=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const s=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return s.observe(Object.assign({type:e,buffered:!0},n||{})),s}}catch{}},to=e=>{const t=n=>{(n.type==="pagehide"||de.document&&de.document.visibilityState==="hidden")&&e(n)};de.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Ua=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let si=-1;const wI=()=>de.document.visibilityState==="hidden"&&!de.document.prerendering?0:1/0,Ha=e=>{de.document.visibilityState==="hidden"&&si>-1&&(si=e.type==="visibilitychange"?e.timeStamp:0,EI())},_I=()=>{addEventListener("visibilitychange",Ha,!0),addEventListener("prerenderingchange",Ha,!0)},EI=()=>{removeEventListener("visibilitychange",Ha,!0),removeEventListener("prerenderingchange",Ha,!0)},Wa=()=>(de.document&&si<0&&(si=wI(),_I()),{get firstHiddenTime(){return si}}),oi=e=>{de.document&&de.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},xI=[1800,3e3],TI=(e,t={})=>{oi(()=>{const n=Wa(),s=eo("FCP");let i;const c=gs("paint",d=>{d.forEach(f=>{f.name==="first-contentful-paint"&&(c.disconnect(),f.startTime<n.firstHiddenTime&&(s.value=Math.max(f.startTime-ri(),0),s.entries.push(f),i(!0)))})});c&&(i=Zs(e,s,xI,t.reportAllChanges))})},kI=[.1,.25],II=(e,t={})=>{TI(Ua(()=>{const n=eo("CLS",0);let s,i=0,l=[];const c=f=>{f.forEach(m=>{if(!m.hadRecentInput){const y=l[0],v=l[l.length-1];i&&y&&v&&m.startTime-v.startTime<1e3&&m.startTime-y.startTime<5e3?(i+=m.value,l.push(m)):(i=m.value,l=[m])}}),i>n.value&&(n.value=i,n.entries=l,s())},d=gs("layout-shift",c);d&&(s=Zs(e,n,kI,t.reportAllChanges),to(()=>{c(d.takeRecords()),s(!0)}),setTimeout(s,0))}))},CI=[100,300],bI=(e,t={})=>{oi(()=>{const n=Wa(),s=eo("FID");let i;const l=f=>{f.startTime<n.firstHiddenTime&&(s.value=f.processingStart-f.startTime,s.entries.push(f),i(!0))},c=f=>{f.forEach(l)},d=gs("first-input",c);i=Zs(e,s,CI,t.reportAllChanges),d&&to(Ua(()=>{c(d.takeRecords()),d.disconnect()}))})};let Hg=0,Xu=1/0,qa=0;const RI=e=>{e.forEach(t=>{t.interactionId&&(Xu=Math.min(Xu,t.interactionId),qa=Math.max(qa,t.interactionId),Hg=qa?(qa-Xu)/7+1:0)})};let Ju;const AI=()=>Ju?Hg:performance.interactionCount||0,PI=()=>{"interactionCount"in performance||Ju||(Ju=gs("event",RI,{type:"event",buffered:!0,durationThreshold:0}))},rr=[],Zu=new Map,OI=40;let NI=0;const MI=()=>AI()-NI,LI=()=>{const e=Math.min(rr.length-1,Math.floor(MI()/50));return rr[e]},ed=10,jI=[],DI=e=>{if(jI.forEach(s=>s(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=rr[rr.length-1],n=Zu.get(e.interactionId);if(n||rr.length<ed||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const s={id:e.interactionId,latency:e.duration,entries:[e]};Zu.set(s.id,s),rr.push(s)}rr.sort((s,i)=>i.latency-s.latency),rr.length>ed&&rr.splice(ed).forEach(s=>Zu.delete(s.id))}},Wg=e=>{const t=de.requestIdleCallback||de.setTimeout;let n=-1;return e=Ua(e),de.document&&de.document.visibilityState==="hidden"?e():(n=t(e),to(e)),n},FI=[200,500],$I=(e,t={})=>{"PerformanceEventTiming"in de&&"interactionId"in PerformanceEventTiming.prototype&&oi(()=>{PI();const n=eo("INP");let s;const i=c=>{Wg(()=>{c.forEach(DI);const d=LI();d&&d.latency!==n.value&&(n.value=d.latency,n.entries=d.entries,s())})},l=gs("event",i,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:OI});s=Zs(e,n,FI,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),to(()=>{i(l.takeRecords()),s(!0)}))})},BI=[2500,4e3],qg={},zI=(e,t={})=>{oi(()=>{const n=Wa(),s=eo("LCP");let i;const l=d=>{t.reportAllChanges||(d=d.slice(-1)),d.forEach(f=>{f.startTime<n.firstHiddenTime&&(s.value=Math.max(f.startTime-ri(),0),s.entries=[f],i())})},c=gs("largest-contentful-paint",l);if(c){i=Zs(e,s,BI,t.reportAllChanges);const d=Ua(()=>{qg[s.id]||(l(c.takeRecords()),c.disconnect(),qg[s.id]=!0,i(!0))});["keydown","click"].forEach(f=>{de.document&&addEventListener(f,()=>Wg(d),{once:!0,capture:!0})}),to(d)}})},UI=[800,1800],td=e=>{de.document&&de.document.prerendering?oi(()=>td(e)):de.document&&de.document.readyState!=="complete"?addEventListener("load",()=>td(e),!0):setTimeout(e,0)},HI=(e,t={})=>{const n=eo("TTFB"),s=Zs(e,n,UI,t.reportAllChanges);td(()=>{const i=ni();i&&(n.value=Math.max(i.responseStart-ri(),0),n.entries=[i],s(!0))})},ii={},Va={};let Vg,Gg,Qg,Yg,Kg;function nd(e,t=!1){return ai("cls",e,qI,Vg,t)}function Xg(e,t=!1){return ai("lcp",e,GI,Qg,t)}function Jg(e){return ai("fid",e,VI,Gg)}function WI(e){return ai("ttfb",e,QI,Yg)}function Zg(e){return ai("inp",e,YI,Kg)}function no(e,t){return ey(e,t),Va[e]||(KI(e),Va[e]=!0),ty(e,t)}function ro(e,t){const n=ii[e];if(!(!n||!n.length))for(const s of n)try{s(t)}catch(i){Ku&&X.error(`Error while triggering instrumentation handler.
Type: ${e}
Name: ${Xn(s)}
Error:`,i)}}function qI(){return II(e=>{ro("cls",{metric:e}),Vg=e},{reportAllChanges:!0})}function VI(){return bI(e=>{ro("fid",{metric:e}),Gg=e})}function GI(){return zI(e=>{ro("lcp",{metric:e}),Qg=e},{reportAllChanges:!0})}function QI(){return HI(e=>{ro("ttfb",{metric:e}),Yg=e})}function YI(){return $I(e=>{ro("inp",{metric:e}),Kg=e})}function ai(e,t,n,s,i=!1){ey(e,t);let l;return Va[e]||(l=n(),Va[e]=!0),s&&t({metric:s}),ty(e,t,i?l:void 0)}function KI(e){const t={};e==="event"&&(t.durationThreshold=0),gs(e,n=>{ro(e,{entries:n})},t)}function ey(e,t){ii[e]=ii[e]||[],ii[e].push(t)}function ty(e,t,n){return()=>{n&&n();const s=ii[e];if(!s)return;const i=s.indexOf(t);i!==-1&&s.splice(i,1)}}function XI(e){return"duration"in e}function rd(e){return typeof e=="number"&&isFinite(e)}function sr(e,t,n,{...s}){const i=Fe(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ng(e,()=>{const l=ti({startTime:t,...s});return l&&l.end(n),l})}function ny(e){const t=Ae();if(!t)return;const{name:n,transaction:s,attributes:i,startTime:l}=e,{release:c,environment:d}=t.getOptions(),f=t.getIntegrationByName("Replay"),m=f&&f.getReplayId(),y=Ve(),v=y.getUser(),w=v!==void 0?v.email||v.id||v.ip_address:void 0;let E;try{E=y.getScopeData().contexts.profile.profile_id}catch{}const _={release:c,environment:d,user:w||void 0,profile_id:E||void 0,replay_id:m||void 0,transaction:s,"user_agent.original":de.navigator&&de.navigator.userAgent,...i};return ti({name:n,attributes:_,startTime:l,experimental:{standalone:!0}})}function sd(){return de&&de.addEventListener&&de.performance}function ot(e){return e/1e3}function JI(){let e=0,t,n;if(!eC())return;let s=!1;function i(){s||(s=!0,n&&ZI(e,t,n),l())}const l=nd(({metric:c})=>{const d=c.entries[c.entries.length-1];d&&(e=c.value,t=d)},!0);to(()=>{i()}),setTimeout(()=>{const c=Ae();if(!c)return;const d=c.on("startNavigationSpan",()=>{i(),d&&d()}),f=yt(),m=f&&Tt(f),y=m&&Fe(m);y&&y.op==="pageload"&&(n=m.spanContext().spanId)},0)}function ZI(e,t,n){Ku&&X.log(`Sending CLS span (${e})`);const s=ot((Dt||0)+(t&&t.startTime||0)),i=Ve().getScopeData().transactionName,l=t?er(t.sources[0]&&t.sources[0].node):"Layout shift",c=ut({[mt]:"auto.http.browser.cls",[cs]:"ui.webvital.cls",[Au]:t&&t.duration||0,"sentry.pageload.span_id":n}),d=ny({name:l,transaction:i,attributes:c,startTime:s});d&&(d.addEvent("cls",{[Aa]:"",[Pa]:e}),d.end(s))}function eC(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const tC=2147483647;let ry=0,kt={},qt,li;function nC({recordClsStandaloneSpans:e}){const t=sd();if(t&&Dt){t.mark&&de.performance.mark("sentry-tracing-init");const n=lC(),s=aC(),i=cC(),l=e?JI():iC();return()=>{n(),s(),i(),l&&l()}}return()=>{}}function rC(){no("longtask",({entries:e})=>{const t=yt();if(!t)return;const{op:n,start_timestamp:s}=Fe(t);for(const i of e){const l=ot(Dt+i.startTime),c=ot(i.duration);n==="navigation"&&s&&l<s||sr(t,l,l+c,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[mt]:"auto.ui.browser.metrics"}})}})}function sC(){new PerformanceObserver(t=>{const n=yt();if(n)for(const s of t.getEntries()){if(!s.scripts[0])continue;const i=ot(Dt+s.startTime),{start_timestamp:l,op:c}=Fe(n);if(c==="navigation"&&l&&i<l)continue;const d=ot(s.duration),f={[mt]:"auto.ui.browser.metrics"},m=s.scripts[0],{invoker:y,invokerType:v,sourceURL:w,sourceFunctionName:E,sourceCharPosition:_}=m;f["browser.script.invoker"]=y,f["browser.script.invoker_type"]=v,w&&(f["code.filepath"]=w),E&&(f["code.function"]=E),_!==-1&&(f["browser.script.source_char_position"]=_),sr(n,i,i+d,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:f})}}).observe({type:"long-animation-frame",buffered:!0})}function oC(){no("event",({entries:e})=>{const t=yt();if(t){for(const n of e)if(n.name==="click"){const s=ot(Dt+n.startTime),i=ot(n.duration),l={name:er(n.target),op:`ui.interaction.${n.name}`,startTime:s,attributes:{[mt]:"auto.ui.browser.metrics"}},c=pm(n.target);c&&(l.attributes["ui.component_name"]=c),sr(t,s,s+i,l)}}})}function iC(){return nd(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(kt.cls={value:e.value,unit:""},li=t)},!0)}function aC(){return Xg(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(kt.lcp={value:e.value,unit:"millisecond"},qt=t)},!0)}function lC(){return Jg(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ot(Dt),s=ot(t.startTime);kt.fid={value:e.value,unit:"millisecond"},kt["mark.fid"]={value:n+s,unit:"second"}})}function cC(){return WI(({metric:e})=>{e.entries[e.entries.length-1]&&(kt.ttfb={value:e.value,unit:"millisecond"})})}function uC(e,t){const n=sd();if(!n||!n.getEntries||!Dt)return;const s=ot(Dt),i=n.getEntries(),{op:l,start_timestamp:c}=Fe(e);if(i.slice(ry).forEach(d=>{const f=ot(d.startTime),m=ot(Math.max(0,d.duration));if(!(l==="navigation"&&c&&s+f<c))switch(d.entryType){case"navigation":{fC(e,d,s);break}case"mark":case"paint":case"measure":{dC(e,d,f,m,s);const y=Wa(),v=d.startTime<y.firstHiddenTime;d.name==="first-paint"&&v&&(kt.fp={value:d.startTime,unit:"millisecond"}),d.name==="first-contentful-paint"&&v&&(kt.fcp={value:d.startTime,unit:"millisecond"});break}case"resource":{mC(e,d,d.name,f,m,s);break}}}),ry=Math.max(i.length-1,0),gC(e),l==="pageload"){vC(kt);const d=kt["mark.fid"];d&&kt.fid&&(sr(e,d.value,d.value+ot(kt.fid.value),{name:"first input delay",op:"ui.action",attributes:{[mt]:"auto.ui.browser.metrics"}}),delete kt["mark.fid"]),(!("fcp"in kt)||!t.recordClsOnPageloadSpan)&&delete kt.cls,Object.entries(kt).forEach(([f,m])=>{vT(f,m.value,m.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",ri()),yC(e)}qt=void 0,li=void 0,kt={}}function dC(e,t,n,s,i){const l=ni(!1),c=ot(l?l.requestStart:0),d=i+Math.max(n,c),f=i+n,m=f+s,y={[mt]:"auto.resource.browser.metrics"};return d!==f&&(y["sentry.browser.measure_happened_before_request"]=!0,y["sentry.browser.measure_start_time"]=d),sr(e,d,m,{name:t.name,op:t.entryType,attributes:y}),d}function fC(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(s=>{Ga(e,t,s,n)}),Ga(e,t,"secureConnection",n,"TLS/SSL"),Ga(e,t,"fetch",n,"cache"),Ga(e,t,"domainLookup",n,"DNS"),hC(e,t,n)}function Ga(e,t,n,s,i=n){const l=pC(n),c=t[l],d=t[`${n}Start`];!d||!c||sr(e,s+ot(d),s+ot(c),{op:`browser.${i}`,name:t.name,attributes:{[mt]:"auto.ui.browser.metrics"}})}function pC(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function hC(e,t,n){const s=n+ot(t.requestStart),i=n+ot(t.responseEnd),l=n+ot(t.responseStart);t.responseEnd&&(sr(e,s,i,{op:"browser.request",name:t.name,attributes:{[mt]:"auto.ui.browser.metrics"}}),sr(e,l,i,{op:"browser.response",name:t.name,attributes:{[mt]:"auto.ui.browser.metrics"}}))}function mC(e,t,n,s,i,l){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const c=ms(n),d={[mt]:"auto.resource.browser.metrics"};od(d,t,"transferSize","http.response_transfer_size"),od(d,t,"encodedBodySize","http.response_content_length"),od(d,t,"decodedBodySize","http.decoded_response_content_length");const f=t.deliveryType;f!=null&&(d["http.response_delivery_type"]=f);const m=t.renderBlockingStatus;m&&(d["resource.render_blocking_status"]=m),c.protocol&&(d["url.scheme"]=c.protocol.split(":").pop()),c.host&&(d["server.address"]=c.host),d["url.same_origin"]=n.includes(de.location.origin);const y=l+s,v=y+i;sr(e,y,v,{name:n.replace(de.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:d})}function gC(e){const t=de.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),rd(n.rtt)&&(kt["connection.rtt"]={value:n.rtt,unit:"millisecond"})),rd(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),rd(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function yC(e){qt&&(qt.element&&e.setAttribute("lcp.element",er(qt.element)),qt.id&&e.setAttribute("lcp.id",qt.id),qt.url&&e.setAttribute("lcp.url",qt.url.trim().slice(0,200)),qt.loadTime!=null&&e.setAttribute("lcp.loadTime",qt.loadTime),qt.renderTime!=null&&e.setAttribute("lcp.renderTime",qt.renderTime),e.setAttribute("lcp.size",qt.size)),li&&li.sources&&li.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,er(t.node)))}function od(e,t,n,s){const i=t[n];i!=null&&i<tC&&(e[s]=i)}function vC(e){const t=ni(!1);if(!t)return;const{responseStart:n,requestStart:s}=t;s<=n&&(e["ttfb.requestTime"]={value:n-s,unit:"millisecond"})}const SC=1e3;let sy,id,ad;function oy(e){const t="dom";wr(t,e),_r(t,wC)}function wC(){if(!de.document)return;const e=fn.bind(null,"dom"),t=iy(e,!0);de.document.addEventListener("click",t,!1),de.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const i=de[n],l=i&&i.prototype;!l||!l.hasOwnProperty||!l.hasOwnProperty("addEventListener")||(Wt(l,"addEventListener",function(c){return function(d,f,m){if(d==="click"||d=="keypress")try{const y=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},v=y[d]=y[d]||{refCount:0};if(!v.handler){const w=iy(e);v.handler=w,c.call(this,d,w,m)}v.refCount++}catch{}return c.call(this,d,f,m)}}),Wt(l,"removeEventListener",function(c){return function(d,f,m){if(d==="click"||d=="keypress")try{const y=this.__sentry_instrumentation_handlers__||{},v=y[d];v&&(v.refCount--,v.refCount<=0&&(c.call(this,d,v.handler,m),v.handler=void 0,delete y[d]),Object.keys(y).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,d,f,m)}}))})}function _C(e){if(e.type!==id)return!1;try{if(!e.target||e.target._sentryId!==ad)return!1}catch{}return!0}function EC(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function iy(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const s=xC(n);if(EC(n.type,s))return;pn(n,"_sentryCaptured",!0),s&&!s._sentryId&&pn(s,"_sentryId",Zt());const i=n.type==="keypress"?"input":n.type;_C(n)||(e({event:n,name:i,global:t}),id=n.type,ad=s?s._sentryId:void 0),clearTimeout(sy),sy=de.setTimeout(()=>{ad=void 0,id=void 0},SC)}}function xC(e){try{return e.target}catch{return null}}let Qa;function Ya(e){const t="history";wr(t,e),_r(t,TC)}function TC(){if(!tI())return;const e=de.onpopstate;de.onpopstate=function(...n){const s=de.location.href,i=Qa;if(Qa=s,fn("history",{from:i,to:s}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...s){const i=s.length>2?s[2]:void 0;if(i){const l=Qa,c=String(i);Qa=c,fn("history",{from:l,to:c})}return n.apply(this,s)}}Wt(de.history,"pushState",t),Wt(de.history,"replaceState",t)}const Ka={};function ay(e){const t=Ka[e];if(t)return t;let n=de[e];if(Uu(n))return Ka[e]=n.bind(de);const s=de.document;if(s&&typeof s.createElement=="function")try{const i=s.createElement("iframe");i.hidden=!0,s.head.appendChild(i);const l=i.contentWindow;l&&l[e]&&(n=l[e]),s.head.removeChild(i)}catch(i){Ku&&X.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(Ka[e]=n.bind(de))}function ly(e){Ka[e]=void 0}function so(...e){return ay("setTimeout")(...e)}const ys="__sentry_xhr_v3__";function cy(e){const t="xhr";wr(t,e),_r(t,kC)}function kC(){if(!de.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,s){const i=new Error,l=jt()*1e3,c=Jn(s[0])?s[0].toUpperCase():void 0,d=IC(s[1]);if(!c||!d)return t.apply(n,s);n[ys]={method:c,url:d,request_headers:{}},c==="POST"&&d.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const f=()=>{const m=n[ys];if(m&&n.readyState===4){try{m.status_code=n.status}catch{}const y={endTimestamp:jt()*1e3,startTimestamp:l,xhr:n,virtualError:i};fn("xhr",y)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(m,y,v){return f(),m.apply(y,v)}}):n.addEventListener("readystatechange",f),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(m,y,v){const[w,E]=v,_=y[ys];return _&&Jn(w)&&Jn(E)&&(_.request_headers[w.toLowerCase()]=E),m.apply(y,v)}}),t.apply(n,s)}}),e.send=new Proxy(e.send,{apply(t,n,s){const i=n[ys];if(!i)return t.apply(n,s);s[0]!==void 0&&(i.body=s[0]);const l={startTimestamp:jt()*1e3,xhr:n};return fn("xhr",l),t.apply(n,s)}})}function IC(e){if(Jn(e))return e;try{return e.toString()}catch{}}const ld=[],Xa=new Map;function CC(){if(sd()&&Dt){const t=bC();return()=>{t()}}return()=>{}}const uy={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function bC(){return Zg(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(_=>_.duration===e.value&&uy[_.name]);if(!t)return;const{interactionId:n}=t,s=uy[t.name],i=ot(Dt+t.startTime),l=ot(e.value),c=yt(),d=c?Tt(c):void 0,m=(n!=null?Xa.get(n):void 0)||d,y=m?Fe(m).description:Ve().getScopeData().transactionName,v=er(t.target),w=ut({[mt]:"auto.http.browser.inp",[cs]:`ui.interaction.${s}`,[Au]:t.duration}),E=ny({name:v,transaction:y,attributes:w,startTime:i});E&&(E.addEvent("inp",{[Aa]:"millisecond",[Pa]:e.value}),E.end(i+l))})}function RC(e){const t=({entries:n})=>{const s=yt(),i=s&&Tt(s);n.forEach(l=>{if(!XI(l)||!i)return;const c=l.interactionId;if(c!=null&&!Xa.has(c)){if(ld.length>10){const d=ld.shift();Xa.delete(d)}ld.push(c),Xa.set(c,i)}})};no("event",t),no("first-input",t)}function AC(e,t=ay("fetch")){let n=0,s=0;function i(l){const c=l.body.length;n+=c,s++;const d={body:l.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&s<15,...e.fetchOptions};if(!t)return ly("fetch"),Ca("No fetch implementation available");try{return t(e.url,d).then(f=>(n-=c,s--,{statusCode:f.status,headers:{"x-sentry-rate-limits":f.headers.get("X-Sentry-Rate-Limits"),"retry-after":f.headers.get("Retry-After")}}))}catch(f){return ly("fetch"),n-=c,s--,Ca(f)}}return uk(e,i)}const PC=30,OC=50;function cd(e,t,n,s){const i={filename:e,function:t==="<anonymous>"?is:t,in_app:!0};return n!==void 0&&(i.lineno=n),s!==void 0&&(i.colno=s),i}const NC=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,MC=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,LC=/\((\S*)(?::(\d+))(?::(\d+))\)/,jC=[PC,e=>{const t=NC.exec(e);if(t){const[,s,i,l]=t;return cd(s,is,+i,+l)}const n=MC.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const c=LC.exec(n[2]);c&&(n[2]=c[1],n[3]=c[2],n[4]=c[3])}const[i,l]=dy(n[1]||is,n[2]);return cd(l,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],DC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,FC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$C=rm(...[jC,[OC,e=>{const t=DC.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const l=FC.exec(t[3]);l&&(t[1]=t[1]||"eval",t[3]=l[1],t[4]=l[2],t[5]="")}let s=t[3],i=t[1]||is;return[i,s]=dy(i,s),cd(s,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),dy=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,s=e.indexOf("safari-web-extension")!==-1;return n||s?[e.indexOf("@")!==-1?e.split("@")[0]:is,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ja=1024,BC="Breadcrumbs",zC=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:BC,setup(n){t.console&&Nk(WC(n)),t.dom&&oy(HC(n,t.dom)),t.xhr&&cy(qC(n)),t.fetch&&Dg(VC(n)),t.history&&Ya(GC(n)),t.sentry&&n.on("beforeSendEvent",UC(n))}}};function UC(e){return function(n){Ae()===e&&Cr({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:xr(n)},{event:n})}}function HC(e,t){return function(s){if(Ae()!==e)return;let i,l,c=typeof t=="object"?t.serializeAttribute:void 0,d=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;d&&d>Ja&&($n&&X.warn(`\`dom.maxStringLength\` cannot exceed ${Ja}, but a value of ${d} was configured. Sentry will use ${Ja} instead.`),d=Ja),typeof c=="string"&&(c=[c]);try{const m=s.event,y=QC(m)?m.target:m;i=er(y,{keyAttrs:c,maxStringLength:d}),l=pm(y)}catch{i="<unknown>"}if(i.length===0)return;const f={category:`ui.${s.name}`,message:i};l&&(f.data={"ui.component_name":l}),Cr(f,{event:s.event,name:s.name,global:s.global})}}function WC(e){return function(n){if(Ae()!==e)return;const s={category:"console",data:{arguments:n.args,logger:"console"},level:Pg(n.level),message:hm(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)s.message=`Assertion failed: ${hm(n.args.slice(1)," ")||"console.assert"}`,s.data.arguments=n.args.slice(1);else return;Cr(s,{input:n.args,level:n.level})}}function qC(e){return function(n){if(Ae()!==e)return;const{startTimestamp:s,endTimestamp:i}=n,l=n.xhr[ys];if(!s||!i||!l)return;const{method:c,url:d,status_code:f,body:m}=l,y={method:c,url:d,status_code:f},v={xhr:n.xhr,input:m,startTimestamp:s,endTimestamp:i},w=Lg(f);Cr({category:"xhr",data:y,type:"http",level:w},v)}}function VC(e){return function(n){if(Ae()!==e)return;const{startTimestamp:s,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const l=n.fetchData,c={data:n.error,input:n.args,startTimestamp:s,endTimestamp:i};Cr({category:"fetch",data:l,level:"error",type:"http"},c)}else{const l=n.response,c={...n.fetchData,status_code:l&&l.status},d={input:n.args,response:l,startTimestamp:s,endTimestamp:i},f=Lg(c.status_code);Cr({category:"fetch",data:c,type:"http",level:f},d)}}}function GC(e){return function(n){if(Ae()!==e)return;let s=n.from,i=n.to;const l=ms(ve.location.href);let c=s?ms(s):void 0;const d=ms(i);(!c||!c.path)&&(c=l),l.protocol===d.protocol&&l.host===d.host&&(i=d.relative),l.protocol===c.protocol&&l.host===c.host&&(s=c.relative),Cr({category:"navigation",data:{from:s,to:i}})}}function QC(e){return!!e&&!!e.target}const YC=["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"],KC="BrowserApiErrors",XC=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:KC,setupOnce(){t.setTimeout&&Wt(ve,"setTimeout",fy),t.setInterval&&Wt(ve,"setInterval",fy),t.requestAnimationFrame&&Wt(ve,"requestAnimationFrame",JC),t.XMLHttpRequest&&"XMLHttpRequest"in ve&&Wt(XMLHttpRequest.prototype,"send",ZC);const n=t.eventTarget;n&&(Array.isArray(n)?n:YC).forEach(eb)}}};function fy(e){return function(...t){const n=t[0];return t[0]=Js(n,{mechanism:{data:{function:Xn(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function JC(e){return function(t){return e.apply(this,[Js(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Xn(e)},handled:!1,type:"instrument"}})])}}function ZC(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&Wt(n,i,function(l){const c={mechanism:{data:{function:i,handler:Xn(l)},handled:!1,type:"instrument"}},d=Eu(l);return d&&(c.mechanism.data.handler=Xn(d)),Js(l,c)})}),e.apply(this,t)}}function eb(e){const n=ve[e],s=n&&n.prototype;!s||!s.hasOwnProperty||!s.hasOwnProperty("addEventListener")||(Wt(s,"addEventListener",function(i){return function(l,c,d){try{tb(c)&&(c.handleEvent=Js(c.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Xn(c),target:e},handled:!1,type:"instrument"}}))}catch{}return i.apply(this,[l,Js(c,{mechanism:{data:{function:"addEventListener",handler:Xn(c),target:e},handled:!1,type:"instrument"}}),d])}}),Wt(s,"removeEventListener",function(i){return function(l,c,d){try{const f=c.__sentry_wrapped__;f&&i.call(this,l,f,d)}catch{}return i.call(this,l,c,d)}}))}function tb(e){return typeof e.handleEvent=="function"}const nb=()=>({name:"BrowserSession",setupOnce(){if(typeof ve.document>"u"){$n&&X.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}dg({ignoreDuration:!0}),hg(),Ya(({from:e,to:t})=>{e!==void 0&&e!==t&&(dg({ignoreDuration:!0}),hg())})}}),rb="GlobalHandlers",sb=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:rb,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(ob(n),py("onerror")),t.onunhandledrejection&&(ib(n),py("onunhandledrejection"))}}};function ob(e){im(t=>{const{stackParser:n,attachStacktrace:s}=hy();if(Ae()!==e||zg())return;const{msg:i,url:l,line:c,column:d,error:f}=t,m=cb(Qu(n,f||i,void 0,s,!1),l,c,d);m.level="error",cg(m,{originalException:f,mechanism:{handled:!1,type:"onerror"}})})}function ib(e){am(t=>{const{stackParser:n,attachStacktrace:s}=hy();if(Ae()!==e||zg())return;const i=ab(t),l=_u(i)?lb(i):Qu(n,i,void 0,s,!0);l.level="error",cg(l,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function ab(e){if(_u(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function lb(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function cb(e,t,n,s){const i=e.exception=e.exception||{},l=i.values=i.values||[],c=l[0]=l[0]||{},d=c.stacktrace=c.stacktrace||{},f=d.frames=d.frames||[],m=s,y=n,v=Jn(t)&&t.length>0?t:fm();return f.length===0&&f.push({colno:m,filename:v,function:is,in_app:!0,lineno:y}),e}function py(e){$n&&X.log(`Global Handler attached: ${e}`)}function hy(){const e=Ae();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const ub=()=>({name:"HttpContext",preprocessEvent(e){if(!ve.navigator&&!ve.location&&!ve.document)return;const t=e.request&&e.request.url||ve.location&&ve.location.href,{referrer:n}=ve.document||{},{userAgent:s}=ve.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...s&&{"User-Agent":s}},l={...e.request,...t&&{url:t},headers:i};e.request=l}}),db="cause",fb=5,pb="LinkedErrors",hb=(e={})=>{const t=e.limit||fb,n=e.key||db;return{name:pb,preprocessEvent(s,i,l){const c=l.getOptions();Pk(qu,c.stackParser,c.maxValueLength,n,t,s,i)}}};function mb(e){const t=[wk(),yk(),XC(),zC(),sb(),hb(),jk(),ub()];return e.autoSessionTracking!==!1&&t.push(nb()),t}function gb(e={}){const t={defaultIntegrations:mb(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:ve.SENTRY_RELEASE&&ve.SENTRY_RELEASE.id?ve.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function yb(){const e=typeof ve.window<"u"&&ve;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],s=n&&n.runtime&&n.runtime.id,i=ve.location&&ve.location.href||"",l=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],c=!!s&&ve===ve.top&&l.some(f=>i.startsWith(`${f}//`)),d=typeof e.nw<"u";return!!s&&!c&&!d}function vb(e={}){const t=gb(e);if(!t.skipBrowserExtensionCheck&&yb()){Sr(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}$n&&(jg()||X.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:nx(t.stackParser||$C),integrations:XT(t),transport:t.transport||AC};return rk(yI,n)}const Ge=Ne,ud="sentryReplaySession",Sb="replay_event",dd="Unable to send Replay",wb=3e5,_b=9e5,Eb=5e3,xb=5500,Tb=6e4,kb=5e3,Ib=3,my=15e4,Za=5e3,Cb=3e3,bb=300,fd=2e7,Rb=4999,Ab=15e3,gy=36e5;function pd(e,t){return e??t()}function ci(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}var dt;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(dt||(dt={}));function Pb(e){return e.nodeType===e.ELEMENT_NODE}function ui(e){const t=ci([e,"optionalAccess",n=>n.host]);return ci([t,"optionalAccess",n=>n.shadowRoot])===e}function di(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ob(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Nb(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function el(e){try{const t=e.rules||e.cssRules;return t?Ob(Array.from(t,yy).join("")):null}catch{return null}}function Mb(e){let t="";for(let n=0;n<e.style.length;n++){const s=e.style,i=s[n],l=s.getPropertyPriority(i);t+=`${i}:${s.getPropertyValue(i)}${l?" !important":""};`}return`${e.selectorText} { ${t} }`}function yy(e){let t;if(jb(e))try{t=el(e.styleSheet)||Nb(e)}catch{}else if(Db(e)){let n=e.cssText;const s=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=Mb(e)),s&&(n=Lb(n)),s||i)return n}return t||e.cssText}function Lb(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function jb(e){return"styleSheet"in e}function Db(e){return"selectorText"in e}class vy{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=ci([this,"access",s=>s.getMeta,"call",s=>s(t),"optionalAccess",s=>s.id]);return pd(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const s=n.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,n)}replace(t,n){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Fb(){return new vy}function tl({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function fi({isMasked:e,element:t,value:n,maskInputFn:s}){let i=n||"";return e?(s&&(i=s(i,t)),"*".repeat(i.length)):i}function oo(e){return e.toLowerCase()}function hd(e){return e.toUpperCase()}const Sy="__rrweb_original__";function $b(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let s=0;s<e.width;s+=n)for(let i=0;i<e.height;i+=n){const l=t.getImageData,c=Sy in l?l[Sy]:l;if(new Uint32Array(c.call(t,s,i,Math.min(n,e.width-s),Math.min(n,e.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}function md(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?oo(t):null}function nl(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function wy(e,t){let n;try{n=new URL(e,pd(t,()=>window.location.href))}catch{return null}const s=/\.([0-9a-z]+)(?:$)/i,i=n.pathname.match(s);return pd(ci([i,"optionalAccess",l=>l[1]]),()=>null)}const _y={};function Ey(e){const t=_y[e];if(t)return t;const n=window.document;let s=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const l=i.contentWindow;l&&l[e]&&(s=l[e]),n.head.removeChild(i)}catch{}return _y[e]=s.bind(window)}function gd(...e){return Ey("setTimeout")(...e)}function xy(...e){return Ey("clearTimeout")(...e)}function Ty(e){try{return e.contentDocument}catch{}}let Bb=1;const zb=new RegExp("[^a-z0-9-_:]"),pi=-2;function yd(){return Bb++}function Ub(e){if(e instanceof HTMLFormElement)return"form";const t=oo(e.tagName);return zb.test(t)?"div":t}function Hb(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let io,ky;const Wb=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qb=/^(?:[a-z+]+:)?\/\//i,Vb=/^www\..*/i,Gb=/^(data:)([^,]*),(.*)/i;function rl(e,t){return(e||"").replace(Wb,(n,s,i,l,c,d)=>{const f=i||c||d,m=s||l||"";if(!f)return n;if(qb.test(f)||Vb.test(f))return`url(${m}${f}${m})`;if(Gb.test(f))return`url(${m}${f}${m})`;if(f[0]==="/")return`url(${m}${Hb(t)+f}${m})`;const y=t.split("/"),v=f.split("/");y.pop();for(const w of v)w!=="."&&(w===".."?y.pop():y.push(w));return`url(${m}${y.join("/")}${m})`})}const Qb=/^[^ \t\n\r\u000c]+/,Yb=/^[, \t\n\r\u000c]+/;function Kb(e,t){if(t.trim()==="")return t;let n=0;function s(l){let c;const d=l.exec(t.substring(n));return d?(c=d[0],n+=c.length,c):""}const i=[];for(;s(Yb),!(n>=t.length);){let l=s(Qb);if(l.slice(-1)===",")l=ao(e,l.substring(0,l.length-1)),i.push(l);else{let c="";l=ao(e,l);let d=!1;for(;;){const f=t.charAt(n);if(f===""){i.push((l+c).trim());break}else if(d)f===")"&&(d=!1);else if(f===","){n+=1,i.push((l+c).trim());break}else f==="("&&(d=!0);c+=f,n+=1}}}return i.join(", ")}const Iy=new WeakMap;function ao(e,t){return!t||t.trim()===""?t:sl(e,t)}function Xb(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function sl(e,t){let n=Iy.get(e);if(n||(n=e.createElement("a"),Iy.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Cy(e,t,n,s,i,l){return s&&(n==="src"||n==="href"&&!(t==="use"&&s[0]==="#")||n==="xlink:href"&&s[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?ao(e,s):n==="srcset"?Kb(e,s):n==="style"?rl(s,sl(e)):t==="object"&&n==="data"?ao(e,s):typeof l=="function"?l(n,s,i):s)}function by(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Jb(e,t,n,s){try{if(s&&e.matches(s))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const l=e.classList[i];if(t.test(l))return!0}if(n)return e.matches(n)}catch{}return!1}function Zb(e,t){for(let n=e.classList.length;n--;){const s=e.classList[n];if(t.test(s))return!0}return!1}function vs(e,t,n=1/0,s=0){return!e||e.nodeType!==e.ELEMENT_NODE||s>n?-1:t(e)?s:vs(e.parentNode,t,n,s+1)}function lo(e,t){return n=>{const s=n;if(s===null)return!1;try{if(e){if(typeof e=="string"){if(s.matches(`.${e}`))return!0}else if(Zb(s,e))return!0}return!!(t&&s.matches(t))}catch{return!1}}}function co(e,t,n,s,i,l){try{const c=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(c===null)return!1;if(c.tagName==="INPUT"){const m=c.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(m))return!0}let d=-1,f=-1;if(l){if(f=vs(c,lo(s,i)),f<0)return!0;d=vs(c,lo(t,n),f>=0?f:1/0)}else{if(d=vs(c,lo(t,n)),d<0)return!1;f=vs(c,lo(s,i),d>=0?d:1/0)}return d>=0?f>=0?d<=f:!0:f>=0?!1:!!l}catch{}return!!l}function e2(e,t,n){const s=e.contentWindow;if(!s)return;let i=!1,l;try{l=s.document.readyState}catch{return}if(l!=="complete"){const d=gd(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{xy(d),i=!0,t()});return}const c="about:blank";if(s.location.href!==c||e.src===c||e.src==="")return gd(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function t2(e,t,n){let s=!1,i;try{i=e.sheet}catch{return}if(i)return;const l=gd(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{xy(l),s=!0,t()})}function n2(e,t){const{doc:n,mirror:s,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:d,maskAttributeFn:f,maskTextClass:m,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:w,inlineStylesheet:E,maskInputOptions:_={},maskTextFn:T,maskInputFn:k,dataURLOptions:M={},inlineImages:P,recordCanvas:$,keepIframeSrcFn:q,newlyAddedElement:W=!1}=t,j=r2(n,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:dt.Document,childNodes:[],compatMode:e.compatMode}:{type:dt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:dt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:j};case e.ELEMENT_NODE:return o2(e,{doc:n,blockClass:i,blockSelector:l,unblockSelector:c,inlineStylesheet:E,maskAttributeFn:f,maskInputOptions:_,maskInputFn:k,dataURLOptions:M,inlineImages:P,recordCanvas:$,keepIframeSrcFn:q,newlyAddedElement:W,rootId:j,maskAllText:d,maskTextClass:m,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:w});case e.TEXT_NODE:return s2(e,{doc:n,maskAllText:d,maskTextClass:m,unmaskTextClass:y,maskTextSelector:v,unmaskTextSelector:w,maskTextFn:T,maskInputOptions:_,maskInputFn:k,rootId:j});case e.CDATA_SECTION_NODE:return{type:dt.CDATA,textContent:"",rootId:j};case e.COMMENT_NODE:return{type:dt.Comment,textContent:e.textContent||"",rootId:j};default:return!1}}function r2(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function s2(e,t){const{maskAllText:n,maskTextClass:s,unmaskTextClass:i,maskTextSelector:l,unmaskTextSelector:c,maskTextFn:d,maskInputOptions:f,maskInputFn:m,rootId:y}=t,v=e.parentNode&&e.parentNode.tagName;let w=e.textContent;const E=v==="STYLE"?!0:void 0,_=v==="SCRIPT"?!0:void 0,T=v==="TEXTAREA"?!0:void 0;if(E&&w){try{e.nextSibling||e.previousSibling||ci([e,"access",M=>M.parentNode,"access",M=>M.sheet,"optionalAccess",M=>M.cssRules])&&(w=el(e.parentNode.sheet))}catch(M){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${M}`,e)}w=rl(w,sl(t.doc))}_&&(w="SCRIPT_PLACEHOLDER");const k=co(e,s,l,i,c,n);if(!E&&!_&&!T&&w&&k&&(w=d?d(w,e.parentElement):w.replace(/[\S]/g,"*")),T&&w&&(f.textarea||k)&&(w=m?m(w,e.parentNode):w.replace(/[\S]/g,"*")),v==="OPTION"&&w){const M=tl({type:null,tagName:v,maskInputOptions:f});w=fi({isMasked:co(e,s,l,i,c,M),element:e,value:w,maskInputFn:m})}return{type:dt.Text,textContent:w||"",isStyle:E,rootId:y}}function o2(e,t){const{doc:n,blockClass:s,blockSelector:i,unblockSelector:l,inlineStylesheet:c,maskInputOptions:d={},maskAttributeFn:f,maskInputFn:m,dataURLOptions:y={},inlineImages:v,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:_=!1,rootId:T,maskAllText:k,maskTextClass:M,unmaskTextClass:P,maskTextSelector:$,unmaskTextSelector:q}=t,W=Jb(e,s,i,l),j=Ub(e);let D={};const Y=e.attributes.length;for(let V=0;V<Y;V++){const se=e.attributes[V];se.name&&!by(j,se.name,se.value)&&(D[se.name]=Cy(n,j,oo(se.name),se.value,e,f))}if(j==="link"&&c){const V=Array.from(n.styleSheets).find(ie=>ie.href===e.href);let se=null;V&&(se=el(V)),se&&(D.rel=null,D.href=null,D.crossorigin=null,D._cssText=rl(se,V.href))}if(j==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const V=el(e.sheet);V&&(D._cssText=rl(V,sl(n)))}if(j==="input"||j==="textarea"||j==="select"||j==="option"){const V=e,se=md(V),ie=nl(V,hd(j),se),ge=V.checked;if(se!=="submit"&&se!=="button"&&ie){const Ce=co(V,M,$,P,q,tl({type:se,tagName:hd(j),maskInputOptions:d}));D.value=fi({isMasked:Ce,element:V,value:ie,maskInputFn:m})}ge&&(D.checked=ge)}if(j==="option"&&(e.selected&&!d.select?D.selected=!0:delete D.selected),j==="canvas"&&w){if(e.__context==="2d")$b(e)||(D.rr_dataURL=e.toDataURL(y.type,y.quality));else if(!("__context"in e)){const V=e.toDataURL(y.type,y.quality),se=n.createElement("canvas");se.width=e.width,se.height=e.height;const ie=se.toDataURL(y.type,y.quality);V!==ie&&(D.rr_dataURL=V)}}if(j==="img"&&v){io||(io=n.createElement("canvas"),ky=io.getContext("2d"));const V=e,se=V.currentSrc||V.getAttribute("src")||"<unknown-src>",ie=V.crossOrigin,ge=()=>{V.removeEventListener("load",ge);try{io.width=V.naturalWidth,io.height=V.naturalHeight,ky.drawImage(V,0,0),D.rr_dataURL=io.toDataURL(y.type,y.quality)}catch(Ce){if(V.crossOrigin!=="anonymous"){V.crossOrigin="anonymous",V.complete&&V.naturalWidth!==0?ge():V.addEventListener("load",ge);return}else console.warn(`Cannot inline img src=${se}! Error: ${Ce}`)}V.crossOrigin==="anonymous"&&(ie?D.crossOrigin=ie:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?ge():V.addEventListener("load",ge)}if((j==="audio"||j==="video")&&(D.rr_mediaState=e.paused?"paused":"played",D.rr_mediaCurrentTime=e.currentTime),_||(e.scrollLeft&&(D.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(D.rr_scrollTop=e.scrollTop)),W){const{width:V,height:se}=e.getBoundingClientRect();D={class:D.class,rr_width:`${V}px`,rr_height:`${se}px`}}j==="iframe"&&!E(D.src)&&(!W&&!Ty(e)&&(D.rr_src=D.src),delete D.src);let K;try{customElements.get(j)&&(K=!0)}catch{}return{type:dt.Element,tagName:j,attributes:D,childNodes:[],isSVG:Xb(e)||void 0,needBlock:W,rootId:T,isCustom:K}}function Qe(e){return e==null?"":e.toLowerCase()}function i2(e,t){if(t.comment&&e.type===dt.Comment)return!0;if(e.type===dt.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&wy(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Qe(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Qe(e.attributes.name)==="application-name"||Qe(e.attributes.rel)==="icon"||Qe(e.attributes.rel)==="apple-touch-icon"||Qe(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Qe(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Qe(e.attributes.property).match(/^(og|twitter|fb):/)||Qe(e.attributes.name).match(/^(og|twitter):/)||Qe(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Qe(e.attributes.name)==="robots"||Qe(e.attributes.name)==="googlebot"||Qe(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Qe(e.attributes.name)==="author"||Qe(e.attributes.name)==="generator"||Qe(e.attributes.name)==="framework"||Qe(e.attributes.name)==="publisher"||Qe(e.attributes.name)==="progid"||Qe(e.attributes.property).match(/^article:/)||Qe(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Qe(e.attributes.name)==="google-site-verification"||Qe(e.attributes.name)==="yandex-verification"||Qe(e.attributes.name)==="csrf-token"||Qe(e.attributes.name)==="p:domain_verify"||Qe(e.attributes.name)==="verify-v1"||Qe(e.attributes.name)==="verification"||Qe(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function uo(e,t){const{doc:n,mirror:s,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:f,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:v,skipChild:w=!1,inlineStylesheet:E=!0,maskInputOptions:_={},maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOMOptions:P,dataURLOptions:$={},inlineImages:q=!1,recordCanvas:W=!1,onSerialize:j,onIframeLoad:D,iframeLoadTimeout:Y=5e3,onStylesheetLoad:K,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:se=()=>!1,newlyAddedElement:ie=!1}=t;let{preserveWhiteSpace:ge=!0}=t;const Ce=n2(e,{doc:n,mirror:s,blockClass:i,blockSelector:l,maskAllText:d,unblockSelector:c,maskTextClass:f,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:v,inlineStylesheet:E,maskInputOptions:_,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,dataURLOptions:$,inlineImages:q,recordCanvas:W,keepIframeSrcFn:se,newlyAddedElement:ie});if(!Ce)return console.warn(e,"not serialized"),null;let He;s.hasNode(e)?He=s.getId(e):i2(Ce,P)||!ge&&Ce.type===dt.Text&&!Ce.isStyle&&!Ce.textContent.replace(/^\s+|\s+$/gm,"").length?He=pi:He=yd();const le=Object.assign(Ce,{id:He});if(s.add(e,le),He===pi)return null;j&&j(e);let Ee=!w;if(le.type===dt.Element){Ee=Ee&&!le.needBlock,delete le.needBlock;const B=e.shadowRoot;B&&di(B)&&(le.isShadowHost=!0)}if((le.type===dt.Document||le.type===dt.Element)&&Ee){P.headWhitespace&&le.type===dt.Element&&le.tagName==="head"&&(ge=!1);const B={doc:n,mirror:s,blockClass:i,blockSelector:l,maskAllText:d,unblockSelector:c,maskTextClass:f,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:v,skipChild:w,inlineStylesheet:E,maskInputOptions:_,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOMOptions:P,dataURLOptions:$,inlineImages:q,recordCanvas:W,preserveWhiteSpace:ge,onSerialize:j,onIframeLoad:D,iframeLoadTimeout:Y,onStylesheetLoad:K,stylesheetLoadTimeout:V,keepIframeSrcFn:se};for(const ne of Array.from(e.childNodes)){const J=uo(ne,B);J&&le.childNodes.push(J)}if(Pb(e)&&e.shadowRoot)for(const ne of Array.from(e.shadowRoot.childNodes)){const J=uo(ne,B);J&&(di(e.shadowRoot)&&(J.isShadow=!0),le.childNodes.push(J))}}return e.parentNode&&ui(e.parentNode)&&di(e.parentNode)&&(le.isShadow=!0),le.type===dt.Element&&le.tagName==="iframe"&&e2(e,()=>{const B=Ty(e);if(B&&D){const ne=uo(B,{doc:B,mirror:s,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:f,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:v,skipChild:!1,inlineStylesheet:E,maskInputOptions:_,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOMOptions:P,dataURLOptions:$,inlineImages:q,recordCanvas:W,preserveWhiteSpace:ge,onSerialize:j,onIframeLoad:D,iframeLoadTimeout:Y,onStylesheetLoad:K,stylesheetLoadTimeout:V,keepIframeSrcFn:se});ne&&D(e,ne)}},Y),le.type===dt.Element&&le.tagName==="link"&&typeof le.attributes.rel=="string"&&(le.attributes.rel==="stylesheet"||le.attributes.rel==="preload"&&typeof le.attributes.href=="string"&&wy(le.attributes.href)==="css")&&t2(e,()=>{if(K){const B=uo(e,{doc:n,mirror:s,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:f,unmaskTextClass:m,maskTextSelector:y,unmaskTextSelector:v,skipChild:!1,inlineStylesheet:E,maskInputOptions:_,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOMOptions:P,dataURLOptions:$,inlineImages:q,recordCanvas:W,preserveWhiteSpace:ge,onSerialize:j,onIframeLoad:D,iframeLoadTimeout:Y,onStylesheetLoad:K,stylesheetLoadTimeout:V,keepIframeSrcFn:se});B&&K(e,B)}},V),le}function a2(e,t){const{mirror:n=new vy,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:l=null,maskAllText:c=!1,maskTextClass:d="rr-mask",unmaskTextClass:f=null,maskTextSelector:m=null,unmaskTextSelector:y=null,inlineStylesheet:v=!0,inlineImages:w=!1,recordCanvas:E=!1,maskAllInputs:_=!1,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOM:P=!1,dataURLOptions:$,preserveWhiteSpace:q,onSerialize:W,onIframeLoad:j,iframeLoadTimeout:D,onStylesheetLoad:Y,stylesheetLoadTimeout:K,keepIframeSrcFn:V=()=>!1}=t||{};return uo(e,{doc:e,mirror:n,blockClass:s,blockSelector:i,unblockSelector:l,maskAllText:c,maskTextClass:d,unmaskTextClass:f,maskTextSelector:m,unmaskTextSelector:y,skipChild:!1,inlineStylesheet:v,maskInputOptions:_===!0?{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?{}:_,maskAttributeFn:T,maskTextFn:k,maskInputFn:M,slimDOMOptions:P===!0||P==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:P==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:P===!1?{}:P,dataURLOptions:$,inlineImages:w,recordCanvas:E,preserveWhiteSpace:q,onSerialize:W,onIframeLoad:j,iframeLoadTimeout:D,onStylesheetLoad:Y,stylesheetLoadTimeout:K,keepIframeSrcFn:V,newlyAddedElement:!1})}function br(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}function Ft(e,t,n=document){const s={capture:!0,passive:!0};return n.addEventListener(e,t,s),()=>n.removeEventListener(e,t,s)}const fo=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let Ry={map:{},getId(){return console.error(fo),-1},getNode(){return console.error(fo),null},removeNodeFromMap(){console.error(fo)},has(){return console.error(fo),!1},reset(){console.error(fo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ry=new Proxy(Ry,{get(e,t,n){return t==="map"&&console.error(fo),Reflect.get(e,t,n)}}));function hi(e,t,n={}){let s=null,i=0;return function(...l){const c=Date.now();!i&&n.leading===!1&&(i=c);const d=t-(c-i),f=this;d<=0||d>t?(s&&(h2(s),s=null),i=c,e.apply(f,l)):!s&&n.trailing!==!1&&(s=il(()=>{i=n.leading===!1?0:Date.now(),s=null,e.apply(f,l)},d))}}function Ay(e,t,n,s,i=window){const l=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?n:{set(c){il(()=>{n.set.call(this,c)},0),l&&l.set&&l.set.call(this,c)}}),()=>Ay(e,t,l||{},!0)}function vd(e,t,n){try{if(!(t in e))return()=>{};const s=e[t],i=n(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch{return()=>{}}}let ol=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ol=()=>new Date().getTime());function Py(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:br([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||br([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||br([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:br([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||br([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||br([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Oy(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ny(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function My(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function en(e,t,n,s,i){if(!e)return!1;const l=My(e);if(!l)return!1;const c=lo(t,n);if(!i){const m=s&&l.matches(s);return c(l)&&!m}const d=vs(l,c);let f=-1;return d<0?!1:(s&&(f=vs(l,lo(null,s))),d>-1&&f<0?!0:d<f)}function l2(e,t){return t.getId(e)!==-1}function Sd(e,t){return t.getId(e)===pi}function Ly(e,t){if(ui(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Ly(e.parentNode,t):!0:!0}function wd(e){return!!e.changedTouches}function c2(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function jy(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Dy(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function _d(e){return!!br([e,"optionalAccess",t=>t.shadowRoot])}class u2{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return nI(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let s;return n===void 0?s=this.id++:s=n,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}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 Fy(e){let t=null;return br([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function d2(e){let t=e,n;for(;n=Fy(t);)t=n;return t}function f2(e){const t=e.ownerDocument;if(!t)return!1;const n=d2(e);return t.contains(n)}function $y(e){const t=e.ownerDocument;return t?t.contains(e)||f2(e):!1}const By={};function Ed(e){const t=By[e];if(t)return t;const n=window.document;let s=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const l=i.contentWindow;l&&l[e]&&(s=l[e]),n.head.removeChild(i)}catch{}return By[e]=s.bind(window)}function p2(...e){return Ed("requestAnimationFrame")(...e)}function il(...e){return Ed("setTimeout")(...e)}function h2(...e){return Ed("clearTimeout")(...e)}var Te=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Te||{}),me=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(me||{}),$t=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))($t||{}),or=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(or||{}),zy;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(zy||(zy={}));var Uy;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Uy||(Uy={}));function xd(e){try{return e.contentDocument}catch{}}function m2(e){try{return e.contentWindow}catch{}}function g2(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}function Hy(e){return"__ln"in e}class y2{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 n=this.head;for(let s=0;s<t;s++)n=g2([n,"optionalAccess",i=>i.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Hy(t.previousSibling)){const s=t.previousSibling.__ln.next;n.next=s,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,s&&(s.previous=n)}else if(t.nextSibling&&Hy(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;n.previous=s,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,s&&(s.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Wy=(e,t)=>`${e}@${t}`;class v2{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,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=[],n=new Set,s=new y2,i=f=>{let m=f,y=pi;for(;y===pi;)m=m&&m.nextSibling,y=m&&this.mirror.getId(m);return y},l=f=>{if(!f.parentNode||!$y(f))return;const m=ui(f.parentNode)?this.mirror.getId(Fy(f)):this.mirror.getId(f.parentNode),y=i(f);if(m===-1||y===-1)return s.addNode(f);const v=uo(f,{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:w=>{jy(w,this.mirror)&&!en(w,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(w),Dy(w,this.mirror)&&this.stylesheetManager.trackLinkElement(w),_d(f)&&this.shadowDomManager.addShadowRoot(f.shadowRoot,this.doc)},onIframeLoad:(w,E)=>{en(w,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(w,E),w.contentWindow&&this.canvasManager.addWindow(w.contentWindow),this.shadowDomManager.observeAttachShadow(w))},onStylesheetLoad:(w,E)=>{this.stylesheetManager.attachLinkElement(w,E)}});v&&(t.push({parentId:m,nextId:y,node:v}),n.add(v.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)qy(this.removes,f,this.mirror)&&!this.movedSet.has(f.parentNode)||l(f);for(const f of this.addedSet)!Vy(this.droppedSet,f)&&!qy(this.removes,f,this.mirror)||Vy(this.movedSet,f)?l(f):this.droppedSet.add(f);let c=null;for(;s.length;){let f=null;if(c){const m=this.mirror.getId(c.value.parentNode),y=i(c.value);m!==-1&&y!==-1&&(f=c)}if(!f){let m=s.tail;for(;m;){const y=m;if(m=m.previous,y){const v=this.mirror.getId(y.value.parentNode);if(i(y.value)===-1)continue;if(v!==-1){f=y;break}else{const E=y.value;if(E.parentNode&&E.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const _=E.parentNode.host;if(this.mirror.getId(_)!==-1){f=y;break}}}}}}if(!f){for(;s.head;)s.removeNode(s.head.value);break}c=f.previous,s.removeNode(f.value),l(f.value)}const d={texts:this.texts.map(f=>({id:this.mirror.getId(f.node),value:f.value})).filter(f=>!n.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:m}=f;if(typeof m.style=="string"){const y=JSON.stringify(f.styleDiff),v=JSON.stringify(f._unchangedStyles);y.length<m.style.length&&(y+v).split("var(").length===m.style.split("var(").length&&(m.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:m}}).filter(f=>!n.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(d))},this.processMutation=t=>{if(!Sd(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!en(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:co(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,My(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const c=md(n),d=n.tagName;i=nl(n,d,c);const f=tl({maskInputOptions:this.maskInputOptions,tagName:d,type:c}),m=co(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,f);i=fi({isMasked:m,element:n,value:i,maskInputFn:this.maskInputFn})}if(en(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let l=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!xd(n))s="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),s==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!by(n.tagName,s)&&(l.attributes[s]=Cy(this.doc,oo(n.tagName),oo(s),i,n,this.maskAttributeFn),s==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(const d of Array.from(n.style)){const f=n.style.getPropertyValue(d),m=n.style.getPropertyPriority(d);f!==c.style.getPropertyValue(d)||m!==c.style.getPropertyPriority(d)?m===""?l.styleDiff[d]=f:l.styleDiff[d]=[f,m]:l._unchangedStyles[d]=[f,m]}for(const d of Array.from(c.style))n.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}break}case"childList":{if(en(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const s=this.mirror.getId(n),i=ui(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);en(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sd(n,this.mirror)||!l2(n,this.mirror)||(this.addedSet.has(n)?(Td(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&s===-1||Ly(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Wy(s,i)]?Td(this.movedSet,n):this.removes.push({parentId:i,id:s,isShadow:ui(t.target)&&di(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Sd(t,this.mirror))return;this.movedSet.add(t);let s=null;n&&this.mirror.hasNode(n)&&(s=this.mirror.getId(n)),s&&s!==-1&&(this.movedMap[Wy(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);en(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(s=>this.genAdds(s)),_d(t)&&t.shadowRoot.childNodes.forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,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(n=>{this[n]=t[n]})}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 Td(e,t){e.delete(t),t.childNodes.forEach(n=>Td(e,n))}function qy(e,t,n){return e.length===0?!1:S2(e,t,n)}function S2(e,t,n){let s=t.parentNode;for(;s;){const i=n.getId(s);if(e.some(l=>l.id===i))return!0;s=s.parentNode}return!1}function Vy(e,t){return e.size===0?!1:Gy(e,t)}function Gy(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Gy(e,n):!1}let mi;function w2(e){mi=e}function _2(){mi=void 0}const Me=e=>mi?(...n)=>{try{return e(...n)}catch(s){if(mi&&mi(s)===!0)return()=>{};throw s}}:e;function kn(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}const po=[];function gi(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Qy(e,t){const n=new v2;po.push(n),n.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const i=kn([window,"optionalAccess",c=>c.Zone,"optionalAccess",c=>c.__symbol__,"optionalCall",c=>c("MutationObserver")]);i&&window[i]&&(s=window[i]);const l=new s(Me(c=>{e.onMutation&&e.onMutation(c)===!1||n.processMutations.bind(n)(c)}));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function E2({mousemoveCb:e,sampling:t,doc:n,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let c=[],d;const f=hi(Me(v=>{const w=Date.now()-d;e(c.map(E=>(E.timeOffset-=w,E)),v),c=[],d=null}),l),m=Me(hi(Me(v=>{const w=gi(v),{clientX:E,clientY:_}=wd(v)?v.changedTouches[0]:v;d||(d=ol()),c.push({x:E,y:_,id:s.getId(w),timeOffset:ol()-d}),f(typeof DragEvent<"u"&&v instanceof DragEvent?me.Drag:v instanceof MouseEvent?me.MouseMove:me.TouchMove)}),i,{trailing:!1})),y=[Ft("mousemove",m,n),Ft("touchmove",m,n),Ft("drag",m,n)];return Me(()=>{y.forEach(v=>v())})}function x2({mouseInteractionCb:e,doc:t,mirror:n,blockClass:s,blockSelector:i,unblockSelector:l,sampling:c}){if(c.mouseInteraction===!1)return()=>{};const d=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,f=[];let m=null;const y=v=>w=>{const E=gi(w);if(en(E,s,i,l,!0))return;let _=null,T=v;if("pointerType"in w){switch(w.pointerType){case"mouse":_=or.Mouse;break;case"touch":_=or.Touch;break;case"pen":_=or.Pen;break}_===or.Touch?$t[v]===$t.MouseDown?T="TouchStart":$t[v]===$t.MouseUp&&(T="TouchEnd"):or.Pen}else wd(w)&&(_=or.Touch);_!==null?(m=_,(T.startsWith("Touch")&&_===or.Touch||T.startsWith("Mouse")&&_===or.Mouse)&&(_=null)):$t[v]===$t.Click&&(_=m,m=null);const k=wd(w)?w.changedTouches[0]:w;if(!k)return;const M=n.getId(E),{clientX:P,clientY:$}=k;Me(e)({type:$t[T],id:M,x:P,y:$,..._!==null&&{pointerType:_}})};return Object.keys($t).filter(v=>Number.isNaN(Number(v))&&!v.endsWith("_Departed")&&d[v]!==!1).forEach(v=>{let w=oo(v);const E=y(v);if(window.PointerEvent)switch($t[v]){case $t.MouseDown:case $t.MouseUp:w=w.replace("mouse","pointer");break;case $t.TouchStart:case $t.TouchEnd:return}f.push(Ft(w,E,t))}),Me(()=>{f.forEach(v=>v())})}function Yy({scrollCb:e,doc:t,mirror:n,blockClass:s,blockSelector:i,unblockSelector:l,sampling:c}){const d=Me(hi(Me(f=>{const m=gi(f);if(!m||en(m,s,i,l,!0))return;const y=n.getId(m);if(m===t&&t.defaultView){const v=Py(t.defaultView);e({id:y,x:v.left,y:v.top})}else e({id:y,x:m.scrollLeft,y:m.scrollTop})}),c.scroll||100));return Ft("scroll",d,t)}function T2({viewportResizeCb:e},{win:t}){let n=-1,s=-1;const i=Me(hi(Me(()=>{const l=Oy(),c=Ny();(n!==l||s!==c)&&(e({width:Number(c),height:Number(l)}),n=l,s=c)}),200));return Ft("resize",i,t)}const k2=["INPUT","TEXTAREA","SELECT"],Ky=new WeakMap;function I2({inputCb:e,doc:t,mirror:n,blockClass:s,blockSelector:i,unblockSelector:l,ignoreClass:c,ignoreSelector:d,maskInputOptions:f,maskInputFn:m,sampling:y,userTriggeredOnInput:v,maskTextClass:w,unmaskTextClass:E,maskTextSelector:_,unmaskTextSelector:T}){function k(D){let Y=gi(D);const K=D.isTrusted,V=Y&&hd(Y.tagName);if(V==="OPTION"&&(Y=Y.parentElement),!Y||!V||k2.indexOf(V)<0||en(Y,s,i,l,!0))return;const se=Y;if(se.classList.contains(c)||d&&se.matches(d))return;const ie=md(Y);let ge=nl(se,V,ie),Ce=!1;const He=tl({maskInputOptions:f,tagName:V,type:ie}),le=co(Y,w,_,E,T,He);(ie==="radio"||ie==="checkbox")&&(Ce=Y.checked),ge=fi({isMasked:le,element:Y,value:ge,maskInputFn:m}),M(Y,v?{text:ge,isChecked:Ce,userTriggered:K}:{text:ge,isChecked:Ce});const Ee=Y.name;ie==="radio"&&Ee&&Ce&&t.querySelectorAll(`input[type="radio"][name="${Ee}"]`).forEach(B=>{if(B!==Y){const ne=fi({isMasked:le,element:B,value:nl(B,V,ie),maskInputFn:m});M(B,v?{text:ne,isChecked:!Ce,userTriggered:!1}:{text:ne,isChecked:!Ce})}})}function M(D,Y){const K=Ky.get(D);if(!K||K.text!==Y.text||K.isChecked!==Y.isChecked){Ky.set(D,Y);const V=n.getId(D);Me(e)({...Y,id:V})}}const $=(y.input==="last"?["change"]:["input","change"]).map(D=>Ft(D,Me(k),t)),q=t.defaultView;if(!q)return()=>{$.forEach(D=>D())};const W=q.Object.getOwnPropertyDescriptor(q.HTMLInputElement.prototype,"value"),j=[[q.HTMLInputElement.prototype,"value"],[q.HTMLInputElement.prototype,"checked"],[q.HTMLSelectElement.prototype,"value"],[q.HTMLTextAreaElement.prototype,"value"],[q.HTMLSelectElement.prototype,"selectedIndex"],[q.HTMLOptionElement.prototype,"selected"]];return W&&W.set&&$.push(...j.map(D=>Ay(D[0],D[1],{set(){Me(k)({target:this,isTrusted:!1})}},!1,q))),Me(()=>{$.forEach(D=>D())})}function al(e){const t=[];function n(s,i){if(ll("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||ll("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||ll("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||ll("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const c=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(c)}else if(s.parentStyleSheet){const c=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(c)}return i}return n(e,t)}function Rr(e,t,n){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:s}):{}}function C2({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Me((y,v,w)=>{const[E,_]=w,{id:T,styleId:k}=Rr(v,t,n.styleMirror);return(T&&T!==-1||k&&k!==-1)&&e({id:T,styleId:k,adds:[{rule:E,index:_}]}),y.apply(v,w)})});const l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Me((y,v,w)=>{const[E]=w,{id:_,styleId:T}=Rr(v,t,n.styleMirror);return(_&&_!==-1||T&&T!==-1)&&e({id:_,styleId:T,removes:[{index:E}]}),y.apply(v,w)})});let c;s.CSSStyleSheet.prototype.replace&&(c=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:Me((y,v,w)=>{const[E]=w,{id:_,styleId:T}=Rr(v,t,n.styleMirror);return(_&&_!==-1||T&&T!==-1)&&e({id:_,styleId:T,replace:E}),y.apply(v,w)})}));let d;s.CSSStyleSheet.prototype.replaceSync&&(d=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:Me((y,v,w)=>{const[E]=w,{id:_,styleId:T}=Rr(v,t,n.styleMirror);return(_&&_!==-1||T&&T!==-1)&&e({id:_,styleId:T,replaceSync:E}),y.apply(v,w)})}));const f={};cl("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(cl("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),cl("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),cl("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));const m={};return Object.entries(f).forEach(([y,v])=>{m[y]={insertRule:v.prototype.insertRule,deleteRule:v.prototype.deleteRule},v.prototype.insertRule=new Proxy(m[y].insertRule,{apply:Me((w,E,_)=>{const[T,k]=_,{id:M,styleId:P}=Rr(E.parentStyleSheet,t,n.styleMirror);return(M&&M!==-1||P&&P!==-1)&&e({id:M,styleId:P,adds:[{rule:T,index:[...al(E),k||0]}]}),w.apply(E,_)})}),v.prototype.deleteRule=new Proxy(m[y].deleteRule,{apply:Me((w,E,_)=>{const[T]=_,{id:k,styleId:M}=Rr(E.parentStyleSheet,t,n.styleMirror);return(k&&k!==-1||M&&M!==-1)&&e({id:k,styleId:M,removes:[{index:[...al(E),T]}]}),w.apply(E,_)})})}),Me(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=l,c&&(s.CSSStyleSheet.prototype.replace=c),d&&(s.CSSStyleSheet.prototype.replaceSync=d),Object.entries(f).forEach(([y,v])=>{v.prototype.insertRule=m[y].insertRule,v.prototype.deleteRule=m[y].deleteRule})})}function Xy({mirror:e,stylesheetManager:t},n){let s=null;n.nodeName==="#document"?s=e.getId(n):s=e.getId(n.host);const i=n.nodeName==="#document"?kn([n,"access",c=>c.defaultView,"optionalAccess",c=>c.Document]):kn([n,"access",c=>c.ownerDocument,"optionalAccess",c=>c.defaultView,"optionalAccess",c=>c.ShadowRoot]),l=kn([i,"optionalAccess",c=>c.prototype])?Object.getOwnPropertyDescriptor(kn([i,"optionalAccess",c=>c.prototype]),"adoptedStyleSheets"):void 0;return s===null||s===-1||!i||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){return kn([l,"access",c=>c.get,"optionalAccess",c=>c.call,"call",c=>c(this)])},set(c){const d=kn([l,"access",f=>f.set,"optionalAccess",f=>f.call,"call",f=>f(this,c)]);if(s!==null&&s!==-1)try{t.adoptStyleSheets(c,s)}catch{}return d}}),Me(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function b2({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:s},{win:i}){const l=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:Me((d,f,m)=>{const[y,v,w]=m;if(n.has(y))return l.apply(f,[y,v,w]);const{id:E,styleId:_}=Rr(kn([f,"access",T=>T.parentRule,"optionalAccess",T=>T.parentStyleSheet]),t,s.styleMirror);return(E&&E!==-1||_&&_!==-1)&&e({id:E,styleId:_,set:{property:y,value:v,priority:w},index:al(f.parentRule)}),d.apply(f,m)})});const c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:Me((d,f,m)=>{const[y]=m;if(n.has(y))return c.apply(f,[y]);const{id:v,styleId:w}=Rr(kn([f,"access",E=>E.parentRule,"optionalAccess",E=>E.parentStyleSheet]),t,s.styleMirror);return(v&&v!==-1||w&&w!==-1)&&e({id:v,styleId:w,remove:{property:y},index:al(f.parentRule)}),d.apply(f,m)})}),Me(()=>{i.CSSStyleDeclaration.prototype.setProperty=l,i.CSSStyleDeclaration.prototype.removeProperty=c})}function R2({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:s,mirror:i,sampling:l,doc:c}){const d=Me(m=>hi(Me(y=>{const v=gi(y);if(!v||en(v,t,n,s,!0))return;const{currentTime:w,volume:E,muted:_,playbackRate:T}=v;e({type:m,id:i.getId(v),currentTime:w,volume:E,muted:_,playbackRate:T})}),l.media||500)),f=[Ft("play",d(0),c),Ft("pause",d(1),c),Ft("seeked",d(2),c),Ft("volumechange",d(3),c),Ft("ratechange",d(4),c)];return Me(()=>{f.forEach(m=>m())})}function A2({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const s=[],i=new WeakMap,l=n.FontFace;n.FontFace=function(f,m,y){const v=new l(f,m,y);return i.set(v,{family:f,buffer:typeof m!="string",descriptors:y,fontSource:typeof m=="string"?m:JSON.stringify(Array.from(new Uint8Array(m)))}),v};const c=vd(t.fonts,"add",function(d){return function(f){return il(Me(()=>{const m=i.get(f);m&&(e(m),i.delete(f))}),0),d.apply(this,[f])}});return s.push(()=>{n.FontFace=l}),s.push(c),Me(()=>{s.forEach(d=>d())})}function P2(e){const{doc:t,mirror:n,blockClass:s,blockSelector:i,unblockSelector:l,selectionCb:c}=e;let d=!0;const f=Me(()=>{const m=t.getSelection();if(!m||d&&kn([m,"optionalAccess",w=>w.isCollapsed]))return;d=m.isCollapsed||!1;const y=[],v=m.rangeCount||0;for(let w=0;w<v;w++){const E=m.getRangeAt(w),{startContainer:_,startOffset:T,endContainer:k,endOffset:M}=E;en(_,s,i,l,!0)||en(k,s,i,l,!0)||y.push({start:n.getId(_),startOffset:T,end:n.getId(k),endOffset:M})}c({ranges:y})});return f(),Ft("selectionchange",f)}function O2({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:vd(n.customElements,"define",function(i){return function(l,c,d){try{t({define:{name:l}})}catch{}return i.apply(this,[l,c,d])}})}function N2(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let s;e.recordDOM&&(s=Qy(e,e.doc));const i=E2(e),l=x2(e),c=Yy(e),d=T2(e,{win:n}),f=I2(e),m=R2(e);let y=()=>{},v=()=>{},w=()=>{},E=()=>{};e.recordDOM&&(y=C2(e,{win:n}),v=Xy(e,e.doc),w=b2(e,{win:n}),e.collectFonts&&(E=A2(e)));const _=P2(e),T=O2(e),k=[];for(const M of e.plugins)k.push(M.observer(M.callback,n,M.options));return Me(()=>{po.forEach(M=>M.reset()),kn([s,"optionalAccess",M=>M.disconnect,"call",M=>M()]),i(),l(),c(),d(),f(),m(),y(),v(),w(),E(),_(),T(),k.forEach(M=>M())})}function ll(e){return typeof window[e]<"u"}function cl(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class kd{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,s,i){const l=s||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t);let d=l.get(n);return d||(d=this.generateIdFn(),l.set(n,d),c.set(d,n)),d}getIds(t,n){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(l=>this.getId(t,l,s,i))}getRemoteId(t,n,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const l=i.get(n);return l||-1}getRemoteIds(t,n){const s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function Jy(e){let t,n=e[0],s=1;for(;s<e.length;){const i=e[s],l=e[s+1];if(s+=2,(i==="optionalAccess"||i==="optionalCall")&&n==null)return;i==="access"||i==="optionalAccess"?(t=n,n=l(n)):(i==="call"||i==="optionalCall")&&(n=l((...c)=>n.call(t,...c)),t=void 0)}return n}class M2{constructor(){this.crossOriginIframeMirror=new kd(yd),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class L2{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new kd(yd),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kd(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,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Jy([this,"access",i=>i.loadListener,"optionalCall",i=>i(t)]);const s=xd(t);s&&s.adoptedStyleSheets&&s.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(s.adoptedStyleSheets,this.mirror.getId(s))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const l=this.transformCrossOriginEvent(i,n.data.event);l&&this.wrappedEmit(l,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Te.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:Te.IncrementalSnapshot,data:{source:me.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Te.Meta:case Te.Load:case Te.DomContentLoaded:return!1;case Te.Plugin:return n;case Te.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Te.IncrementalSnapshot:switch(n.data.source){case me.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case me.Drag:case me.TouchMove:case me.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case me.ViewportResize:return!1;case me.MediaInteraction:case me.MouseInteraction:case me.Scroll:case me.CanvasMutation:case me.Input:return this.replaceIds(n.data,t,["id"]),n;case me.StyleSheetRule:case me.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case me.Font:return n;case me.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case me.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),Jy([n,"access",s=>s.data,"access",s=>s.styles,"optionalAccess",s=>s.forEach,"call",s=>s(i=>{this.replaceStyleIds(i,t,["styleId"])})]),n}}return!1}replace(t,n,s,i){for(const l of i)!Array.isArray(n[l])&&typeof n[l]!="number"||(Array.isArray(n[l])?n[l]=t.getIds(s,n[l]):n[l]=t.getId(s,n[l]));return n}replaceIds(t,n,s){return this.replace(this.crossOriginIframeMirror,t,n,s)}replaceStyleIds(t,n,s){return this.replace(this.crossOriginIframeStyleMirror,t,n,s)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,n)})}patchRootIdOnNode(t,n){t.type!==dt.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,n)})}}class j2{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class D2{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,n){if(!di(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const s=Qy({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Yy({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),il(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Xy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=xd(t),s=m2(t);!n||!s||this.patchAttachShadow(s.Element,n)}patchAttachShadow(t,n){const s=this;this.restoreHandlers.push(vd(t.prototype,"attachShadow",function(i){return function(l){const c=i.call(this,l);return this.shadowRoot&&$y(this)&&s.addShadowRoot(this.shadowRoot,n),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class Zy{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class F2{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new u2,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const s={id:n,styleIds:[]},i=[];for(const l of t){let c;this.styleMirror.has(l)?c=this.styleMirror.getId(l):(c=this.styleMirror.add(l),i.push({styleId:c,rules:Array.from(l.rules||CSSRule,(d,f)=>({rule:yy(d),index:f}))})),s.styleIds.push(c)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class $2{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,p2(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let rt,ul;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=za([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const In=Fb();function ir(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:l=null,unblockSelector:c=null,ignoreClass:d="rr-ignore",ignoreSelector:f=null,maskAllText:m=!1,maskTextClass:y="rr-mask",unmaskTextClass:v=null,maskTextSelector:w=null,unmaskTextSelector:E=null,inlineStylesheet:_=!0,maskAllInputs:T,maskInputOptions:k,slimDOMOptions:M,maskAttributeFn:P,maskInputFn:$,maskTextFn:q,maxCanvasSize:W=null,packFn:j,sampling:D={},dataURLOptions:Y={},mousemoveWait:K,recordDOM:V=!0,recordCanvas:se=!1,recordCrossOriginIframes:ie=!1,recordAfter:ge=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:Ce=!1,collectFonts:He=!1,inlineImages:le=!1,plugins:Ee,keepIframeSrcFn:B=()=>!1,ignoreCSSAttributes:ne=new Set([]),errorHandler:J,onMutation:R,getCanvasManager:z}=e;w2(J);const ye=ie?window.parent===window:!0;let Se=!1;if(!ye)try{window.parent.document&&(Se=!1)}catch{Se=!0}if(ye&&!t)throw new Error("emit function is required");if(!ye&&!Se)return()=>{};K!==void 0&&D.mousemove===void 0&&(D.mousemove=K),In.reset();const Pe=T===!0?{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}:k!==void 0?k:{},Oe=M===!0||M==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:M==="all",headMetaDescKeywords:M==="all"}:M||{};c2();let ze,je=0;const qe=Re=>{for(const St of Ee||[])St.eventProcessor&&(Re=St.eventProcessor(Re));return j&&!Se&&(Re=j(Re)),Re};rt=(Re,St)=>{const be=Re;if(be.timestamp=ol(),za([po,"access",Ye=>Ye[0],"optionalAccess",Ye=>Ye.isFrozen,"call",Ye=>Ye()])&&be.type!==Te.FullSnapshot&&!(be.type===Te.IncrementalSnapshot&&be.data.source===me.Mutation)&&po.forEach(Ye=>Ye.unfreeze()),ye)za([t,"optionalCall",Ye=>Ye(qe(be),St)]);else if(Se){const Ye={type:"rrweb",event:qe(be),origin:window.location.origin,isCheckout:St};window.parent.postMessage(Ye,"*")}if(be.type===Te.FullSnapshot)ze=be,je=0;else if(be.type===Te.IncrementalSnapshot){if(be.data.source===me.Mutation&&be.data.isAttachIframe)return;je++;const Ye=s&&je>=s,Le=n&&ze&&be.timestamp-ze.timestamp>n;(Ye||Le)&&Is(!0)}};const vt=Re=>{rt({type:Te.IncrementalSnapshot,data:{source:me.Mutation,...Re}})},xs=Re=>rt({type:Te.IncrementalSnapshot,data:{source:me.Scroll,...Re}}),Fl=Re=>rt({type:Te.IncrementalSnapshot,data:{source:me.CanvasMutation,...Re}}),wo=Re=>rt({type:Te.IncrementalSnapshot,data:{source:me.AdoptedStyleSheet,...Re}}),Cn=new F2({mutationCb:vt,adoptedStyleSheetCb:wo}),Hn=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new M2:new L2({mirror:In,mutationCb:vt,stylesheetManager:Cn,recordCrossOriginIframes:ie,wrappedEmit:rt});for(const Re of Ee||[])Re.getMirror&&Re.getMirror({nodeMirror:In,crossOriginIframeMirror:Hn.crossOriginIframeMirror,crossOriginIframeStyleMirror:Hn.crossOriginIframeStyleMirror});const _o=new $2,Ts=z2(z,{mirror:In,win:window,mutationCb:Re=>rt({type:Te.IncrementalSnapshot,data:{source:me.CanvasMutation,...Re}}),recordCanvas:se,blockClass:i,blockSelector:l,unblockSelector:c,maxCanvasSize:W,sampling:D.canvas,dataURLOptions:Y,errorHandler:J}),ks=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new j2:new D2({mutationCb:vt,scrollCb:xs,bypassOptions:{onMutation:R,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:m,maskTextClass:y,unmaskTextClass:v,maskTextSelector:w,unmaskTextSelector:E,inlineStylesheet:_,maskInputOptions:Pe,dataURLOptions:Y,maskAttributeFn:P,maskTextFn:q,maskInputFn:$,recordCanvas:se,inlineImages:le,sampling:D,slimDOMOptions:Oe,iframeManager:Hn,stylesheetManager:Cn,canvasManager:Ts,keepIframeSrcFn:B,processedNodeManager:_o},mirror:In}),Is=(Re=!1)=>{if(!V)return;rt({type:Te.Meta,data:{href:window.location.href,width:Ny(),height:Oy()}},Re),Cn.reset(),ks.init(),po.forEach(be=>be.lock());const St=a2(document,{mirror:In,blockClass:i,blockSelector:l,unblockSelector:c,maskAllText:m,maskTextClass:y,unmaskTextClass:v,maskTextSelector:w,unmaskTextSelector:E,inlineStylesheet:_,maskAllInputs:Pe,maskAttributeFn:P,maskInputFn:$,maskTextFn:q,slimDOM:Oe,dataURLOptions:Y,recordCanvas:se,inlineImages:le,onSerialize:be=>{jy(be,In)&&Hn.addIframe(be),Dy(be,In)&&Cn.trackLinkElement(be),_d(be)&&ks.addShadowRoot(be.shadowRoot,document)},onIframeLoad:(be,Ye)=>{Hn.attachIframe(be,Ye),be.contentWindow&&Ts.addWindow(be.contentWindow),ks.observeAttachShadow(be)},onStylesheetLoad:(be,Ye)=>{Cn.attachLinkElement(be,Ye)},keepIframeSrcFn:B});if(!St)return console.warn("Failed to snapshot the document");rt({type:Te.FullSnapshot,data:{node:St,initialOffset:Py(window)}}),po.forEach(be=>be.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Cn.adoptStyleSheets(document.adoptedStyleSheets,In.getId(document))};ul=Is;try{const Re=[],St=Ye=>Me(N2)({onMutation:R,mutationCb:vt,mousemoveCb:(Le,Wn)=>rt({type:Te.IncrementalSnapshot,data:{source:Wn,positions:Le}}),mouseInteractionCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.MouseInteraction,...Le}}),scrollCb:xs,viewportResizeCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.ViewportResize,...Le}}),inputCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.Input,...Le}}),mediaInteractionCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.MediaInteraction,...Le}}),styleSheetRuleCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.StyleSheetRule,...Le}}),styleDeclarationCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.StyleDeclaration,...Le}}),canvasMutationCb:Fl,fontCb:Le=>rt({type:Te.IncrementalSnapshot,data:{source:me.Font,...Le}}),selectionCb:Le=>{rt({type:Te.IncrementalSnapshot,data:{source:me.Selection,...Le}})},customElementCb:Le=>{rt({type:Te.IncrementalSnapshot,data:{source:me.CustomElement,...Le}})},blockClass:i,ignoreClass:d,ignoreSelector:f,maskAllText:m,maskTextClass:y,unmaskTextClass:v,maskTextSelector:w,unmaskTextSelector:E,maskInputOptions:Pe,inlineStylesheet:_,sampling:D,recordDOM:V,recordCanvas:se,inlineImages:le,userTriggeredOnInput:Ce,collectFonts:He,doc:Ye,maskAttributeFn:P,maskInputFn:$,maskTextFn:q,keepIframeSrcFn:B,blockSelector:l,unblockSelector:c,slimDOMOptions:Oe,dataURLOptions:Y,mirror:In,iframeManager:Hn,stylesheetManager:Cn,shadowDomManager:ks,processedNodeManager:_o,canvasManager:Ts,ignoreCSSAttributes:ne,plugins:za([Ee,"optionalAccess",Le=>Le.filter,"call",Le=>Le(Wn=>Wn.observer),"optionalAccess",Le=>Le.map,"call",Le=>Le(Wn=>({observer:Wn.observer,options:Wn.options,callback:$l=>rt({type:Te.Plugin,data:{plugin:Wn.name,payload:$l}})}))])||[]},{});Hn.addLoadListener(Ye=>{try{Re.push(St(Ye.contentDocument))}catch(Le){console.warn(Le)}});const be=()=>{Is(),Re.push(St(document))};return document.readyState==="interactive"||document.readyState==="complete"?be():(Re.push(Ft("DOMContentLoaded",()=>{rt({type:Te.DomContentLoaded,data:{}}),ge==="DOMContentLoaded"&&be()})),Re.push(Ft("load",()=>{rt({type:Te.Load,data:{}}),ge==="load"&&be()},window))),()=>{Re.forEach(Ye=>Ye()),_o.destroy(),ul=void 0,_2()}}catch(Re){console.warn(Re)}}function B2(e){if(!ul)throw new Error("please take full snapshot after start recording");ul(e)}ir.mirror=In,ir.takeFullSnapshot=B2;function z2(e,t){try{return e?e(t):new Zy}catch{return console.warn("Unable to initialize CanvasManager"),new Zy}}const U2=3,H2=5;function Id(e){return e>9999999999?e:e*1e3}function Cd(e){return e>9999999999?e/1e3:e}function yi(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Te.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Tn(t,10,1e3)}}),t.category==="console")))}const W2="button,a";function ev(e){return e.closest(W2)||e}function tv(e){const t=nv(e);return!t||!(t instanceof Element)?t:ev(t)}function nv(e){return q2(e)?e.target:e}function q2(e){return typeof e=="object"&&!!e&&"target"in e}let Ar;function V2(e){return Ar||(Ar=[],G2()),Ar.push(e),()=>{const t=Ar?Ar.indexOf(e):-1;t>-1&&Ar.splice(t,1)}}function G2(){Wt(Ge,"open",function(e){return function(...t){if(Ar)try{Ar.forEach(n=>n())}catch{}return e.apply(Ge,t)}})}const Q2=new Set([me.Mutation,me.StyleSheetRule,me.StyleDeclaration,me.AdoptedStyleSheet,me.CanvasMutation,me.Selection,me.MediaInteraction]);function Y2(e,t,n){e.handleClick(t,n)}class K2{constructor(t,n,s=yi){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=s}addListeners(){const t=V2(()=>{this._lastMutation=rv()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(J2(n,this._ignoreSelector)||!Z2(t))return;const s={timestamp:Cd(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===s.node&&Math.abs(i.timestamp-s.timestamp)<1)||(this._clicks.push(s),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Cd(t)}registerScroll(t=Date.now()){this._lastScroll=Cd(t)}registerClick(t){const n=ev(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=rv();this._clicks.forEach(s=>{!s.mutationAfter&&this._lastMutation&&(s.mutationAfter=s.timestamp<=this._lastMutation?this._lastMutation-s.timestamp:void 0),!s.scrollAfter&&this._lastScroll&&(s.scrollAfter=s.timestamp<=this._lastScroll?this._lastScroll-s.timestamp:void 0),s.timestamp+this._timeout<=n&&t.push(s)});for(const s of t){const i=this._clicks.indexOf(s);i>-1&&(this._generateBreadcrumbs(s),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,s=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,l=!s&&!i,{clickCount:c,clickBreadcrumb:d}=t;if(l){const f=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,m=f<this._timeout*1e3?"mutation":"timeout",y={type:"default",message:d.message,timestamp:d.timestamp,category:"ui.slowClickDetected",data:{...d.data,url:Ge.location.href,route:n.getCurrentRoute(),timeAfterClickMs:f,endReason:m,clickCount:c||1}};this._addBreadcrumbEvent(n,y);return}if(c>1){const f={type:"default",message:d.message,timestamp:d.timestamp,category:"ui.multiClick",data:{...d.data,url:Ge.location.href,route:n.getCurrentRoute(),clickCount:c,metric:!0}};this._addBreadcrumbEvent(n,f)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=so(()=>this._checkClicks(),1e3)}}const X2=["A","BUTTON","INPUT"];function J2(e,t){return!!(!X2.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Z2(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function rv(){return Date.now()/1e3}function eR(e,t){try{if(!tR(t))return;const{source:n}=t.data;if(Q2.has(n)&&e.registerMutation(t.timestamp),n===me.Scroll&&e.registerScroll(t.timestamp),nR(t)){const{type:s,id:i}=t.data,l=ir.mirror.getNode(i);l instanceof HTMLElement&&s===$t.Click&&e.registerClick(l)}}catch{}}function tR(e){return e.type===U2}function nR(e){return e.data.source===me.MouseInteraction}function Bn(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var dl;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(dl||(dl={}));const rR=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function sR(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(rR.has(n)){let s=n;(n==="data-testid"||n==="data-test-id")&&(s="testId"),t[s]=e[n]}return t}const oR=e=>t=>{if(!e.isEnabled())return;const n=iR(t);if(!n)return;const s=t.name==="click",i=s?t.event:void 0;s&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&Y2(e.clickDetector,n,tv(t.event)),yi(e,n)};function sv(e,t){const n=ir.mirror.getId(e),s=n&&ir.mirror.getNode(n),i=s&&ir.mirror.getMeta(s),l=i&&lR(i)?i:null;return{message:t,data:l?{nodeId:n,node:{id:n,tagName:l.tagName,textContent:Array.from(l.childNodes).map(c=>c.type===dl.Text&&c.textContent).filter(Boolean).map(c=>c.trim()).join(""),attributes:sR(l.attributes)}}:{}}}function iR(e){const{target:t,message:n}=aR(e);return Bn({category:`ui.${e.name}`,...sv(t,n)})}function aR(e){const t=e.name==="click";let n,s=null;try{s=t?tv(e.event):nv(e.event),n=er(s,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:s,message:n}}function lR(e){return e.type===dl.Element}function cR(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=uR(t);n&&yi(e,n)}function uR(e){const{metaKey:t,shiftKey:n,ctrlKey:s,altKey:i,key:l,target:c}=e;if(!c||dR(c)||!l)return null;const d=t||s||i,f=l.length===1;if(!d&&f)return null;const m=er(c,{maxStringLength:200})||"<unknown>",y=sv(c,m);return Bn({category:"ui.keyDown",message:m,data:{...y.data,metaKey:t,shiftKey:n,ctrlKey:s,altKey:i,key:l}})}function dR(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const fR={resource:yR,paint:mR,navigation:gR};function fl(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function pR(e){return e.map(hR).filter(Boolean)}function hR(e){const t=fR[e.entryType];return t?t(e):null}function ho(e){return((Dt||Ge.performance.timeOrigin)+e)/1e3}function mR(e){const{duration:t,entryType:n,name:s,startTime:i}=e,l=ho(i);return{type:n,name:s,start:l,end:l+t,data:void 0}}function gR(e){const{entryType:t,name:n,decodedBodySize:s,duration:i,domComplete:l,encodedBodySize:c,domContentLoadedEventStart:d,domContentLoadedEventEnd:f,domInteractive:m,loadEventStart:y,loadEventEnd:v,redirectCount:w,startTime:E,transferSize:_,type:T}=e;return i===0?null:{type:`${t}.${T}`,start:ho(E),end:ho(l),name:n,data:{size:_,decodedBodySize:s,encodedBodySize:c,duration:i,domInteractive:m,domContentLoadedEventStart:d,domContentLoadedEventEnd:f,loadEventStart:y,loadEventEnd:v,domComplete:l,redirectCount:w}}}function yR(e){const{entryType:t,initiatorType:n,name:s,responseEnd:i,startTime:l,decodedBodySize:c,encodedBodySize:d,responseStatus:f,transferSize:m}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:ho(l),end:ho(i),name:s,data:{size:m,statusCode:f,decodedBodySize:c,encodedBodySize:d}}}function vR(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return pl(e,"largest-contentful-paint",n)}function SR(e){return e.sources!==void 0}function wR(e){const t=[],n=[];for(const s of e.entries)if(SR(s)){const i=[];for(const l of s.sources)if(l.node){n.push(l.node);const c=ir.mirror.getId(l.node);c&&i.push(c)}t.push({value:s.value,nodeIds:i.length?i:void 0})}return pl(e,"cumulative-layout-shift",n,t)}function _R(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return pl(e,"first-input-delay",n)}function ER(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return pl(e,"interaction-to-next-paint",n)}function pl(e,t,n,s){const i=e.value,l=e.rating,c=ho(i);return{type:"web-vital",name:t,start:c,end:c,data:{value:i,size:i,rating:l,nodeIds:n?n.map(d=>ir.mirror.getId(d)):void 0,attributions:s}}}function xR(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}){i.forEach(t)}const s=[];return["navigation","paint","resource"].forEach(i=>{s.push(no(i,n))}),s.push(Xg(fl(vR,e)),nd(fl(wR,e)),Jg(fl(_R,e)),Zg(fl(ER,e))),()=>{s.forEach(i=>i())}}const fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,TR='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==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},_=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},x=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=A(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}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(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)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),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=x(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,U)+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(U,C,0),R=U;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){_(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;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=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;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}}},L=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}}},O=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=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(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-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[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=U(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=x,c.p=_,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)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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(const r of t)n+=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 kR(){const e=new Blob([TR]);return URL.createObjectURL(e)}const ov=["info","warn","error","log"],hl="[Replay] ";function bd(e,t="info"){Cr({category:"console",data:{logger:"replay"},level:t,message:`${hl}${e}`},{level:t})}function IR(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:s=>{e=s.captureExceptions,t=s.traceInternals}};return fe?(ov.forEach(s=>{n[s]=(...i)=>{X[s](hl,...i),t&&bd(i.join(""),Pg(s))}}),n.exception=(s,...i)=>{i.length&&n.error&&n.error(...i),X.error(hl,s),e?Dn(s):t&&bd(s,"error")},n.infoTick=(...s)=>{X.info(hl,...s),t&&setTimeout(()=>bd(s[0]),0)}):ov.forEach(s=>{n[s]=()=>{}}),n}const pe=IR();class Rd extends Error{constructor(){super(`Event buffer exceeded maximum size of ${fd}.`)}}class iv{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>fd)throw new Rd;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Id(t):null}}class CR{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:s})=>{s.success?t():n()},{once:!0}),this._worker.addEventListener("error",s=>{n(s)},{once:!0})}),this._ensureReadyPromise)}destroy(){fe&&pe.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const s=this._getAndIncrementId();return new Promise((i,l)=>{const c=({data:d})=>{const f=d;if(f.method===t&&f.id===s){if(this._worker.removeEventListener("message",c),!f.success){fe&&pe.error("Error in compression worker: ",f.response),l(new Error("Error in compression worker"));return}i(f.response)}};this._worker.addEventListener("message",c),this._worker.postMessage({id:s,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class bR{constructor(t){this._worker=new CR(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Id(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const s=JSON.stringify(t);return this._totalSize+=s.length,this._totalSize>fd?Promise.reject(new Rd):this._sendEventToWorker(s)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{fe&&pe.exception(t,'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 RR{constructor(t){this._fallback=new iv,this._compression=new bR(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}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}set waitForCheckout(t){this._used.waitForCheckout=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){fe&&pe.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:s}=this._fallback,i=[];for(const l of t)i.push(this._compression.addEvent(l));this._compression.hasCheckout=n,this._compression.waitForCheckout=s,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(l){fe&&pe.exception(l,"Failed to add events when switching buffers.")}}}function AR({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=PR(t);if(n)return n}return fe&&pe.info("Using simple buffer"),new iv}function PR(e){try{const t=e||OR();if(!t)return;fe&&pe.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new RR(n)}catch(t){fe&&pe.exception(t,"Failed to create compression worker")}}function OR(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?kR():""}function Ad(){try{return"sessionStorage"in Ge&&!!Ge.sessionStorage}catch{return!1}}function NR(e){MR(),e.session=void 0}function MR(){if(Ad())try{Ge.sessionStorage.removeItem(ud)}catch{}}function av(e){return e===void 0?!1:Math.random()<e}function lv(e){const t=Date.now(),n=e.id||Zt(),s=e.started||t,i=e.lastActivity||t,l=e.segmentId||0,c=e.sampled,d=e.previousSessionId;return{id:n,started:s,lastActivity:i,segmentId:l,sampled:c,previousSessionId:d}}function Pd(e){if(Ad())try{Ge.sessionStorage.setItem(ud,JSON.stringify(e))}catch{}}function LR(e,t){return av(e)?"session":t?"buffer":!1}function cv({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:s}={}){const i=LR(e,t),l=lv({sampled:i,previousSessionId:s});return n&&Pd(l),l}function jR(){if(!Ad())return null;try{const e=Ge.sessionStorage.getItem(ud);if(!e)return null;const t=JSON.parse(e);return fe&&pe.infoTick("Loading existing session"),lv(t)}catch{return null}}function Od(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function uv(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:s=Date.now()}){return Od(e.started,t,s)||Od(e.lastActivity,n,s)}function dv(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!uv(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Nd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},s){const i=s.stickySession&&jR();return i?dv(i,{sessionIdleExpire:e,maxReplayDuration:t})?(fe&&pe.infoTick("Session in sessionStorage is expired, creating new one..."),cv(s,{previousSessionId:i.id})):i:(fe&&pe.infoTick("Creating new session"),cv(s,{previousSessionId:n}))}function DR(e){return e.type===Te.Custom}function Md(e,t,n){return pv(e,t)?(fv(e,t,n),!0):!1}function FR(e,t,n){return pv(e,t)?fv(e,t,n):Promise.resolve(null)}async function fv(e,t,n){const{eventBuffer:s}=e;if(!s||s.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&s.clear(),n&&(s.hasCheckout=!0,s.waitForCheckout=!1);const l=e.getOptions(),c=$R(t,l.beforeAddRecordingEvent);return c?await s.addEvent(c):void 0}catch(l){const c=l&&l instanceof Rd,d=c?"addEventSizeExceeded":"addEvent";if(c&&i)return s.clear(),s.waitForCheckout=!0,null;e.handleException(l),await e.stop({reason:d});const f=Ae();f&&f.recordDroppedEvent("internal_sdk_error","replay")}}function pv(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Id(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(fe&&pe.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function $R(e,t){try{if(typeof t=="function"&&DR(e))return t(e)}catch(n){return fe&&pe.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Ld(e){return!e.type}function jd(e){return e.type==="transaction"}function BR(e){return e.type==="replay_event"}function hv(e){return e.type==="feedback"}function zR(e){return(t,n)=>{if(!e.isEnabled()||!Ld(t)&&!jd(t))return;const s=n&&n.statusCode;if(!(!s||s<200||s>=300)){if(jd(t)){UR(e,t);return}HR(e,t)}}}function UR(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function HR(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:s}=e.getOptions();typeof s=="function"&&!s(t)||so(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function WR(e){return t=>{!e.isEnabled()||!Ld(t)||qR(e,t)}}function qR(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const s=Bn({category:"replay.hydrate-error",data:{url:fm()}});yi(e,s)}}function VR(e){const t=Ae();t&&t.on("beforeAddBreadcrumb",n=>GR(e,n))}function GR(e,t){if(!e.isEnabled()||!mv(t))return;const n=QR(t);n&&yi(e,n)}function QR(e){return!mv(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?YR(e):Bn(e)}function YR(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Bn(e);let n=!1;const s=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Za?(n=!0,`${i.slice(0,Za)}…`):i;if(typeof i=="object")try{const l=Tn(i,7);return JSON.stringify(l).length>Za?(n=!0,`${JSON.stringify(l,null,2).slice(0,Za)}…`):l}catch{}return i});return Bn({...e,data:{...e.data,arguments:s,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function mv(e){return!!e.category}function KR(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function gv(){const e=Ve().getPropagationContext().dsc;e&&delete e.replay_id;const t=yt();if(t){const n=ps(t);delete n.replay_id}}function XR(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Te.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function JR(e,t){return e.recordingMode!=="buffer"||t.message===dd||!t.exception||t.type?!1:av(e.getOptions().errorSampleRate)}function ZR(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:BR(t)?(delete t.breadcrumbs,t):!Ld(t)&&!jd(t)&&!hv(t)?t:e.checkAndHandleExpiredSession()?hv(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),XR(e,t),t):KR(t,n)&&!e.getOptions()._experiments.captureExceptions?(fe&&pe.log("Ignoring error from rrweb internals",t),null):((JR(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(gv(),t),{id:"Replay"})}function ml(e,t){return t.map(({type:n,start:s,end:i,name:l,data:c})=>{const d=e.throttledAddEvent({type:Te.Custom,timestamp:s,data:{tag:"performanceSpan",payload:{op:n,description:l,startTimestamp:s,endTimestamp:i,data:c}}});return typeof d=="string"?Promise.resolve(null):d})}function eA(e){const{from:t,to:n}=e,s=Date.now()/1e3;return{type:"navigation.push",start:s,end:s,name:n,data:{previous:t}}}function tA(e){return t=>{if(!e.isEnabled())return;const n=eA(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ml(e,[n]),!1)))}}function nA(e,t){return fe&&e.getOptions()._experiments.traceInternals?!1:dk(t,Ae())}function yv(e,t){e.isEnabled()&&t!==null&&(nA(e,t.name)||e.addUpdate(()=>(ml(e,[t]),!0)))}function gl(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=_v(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function vv(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Sv(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[_v(e)];if(!e)return[void 0]}catch(t){return fe&&pe.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return fe&&pe.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function yl(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},s=n.warnings||[];return n.warnings=[...s,t],e._meta=n,e}function wv(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:s,url:i,method:l,statusCode:c,request:d,response:f}=t;return{type:e,start:n/1e3,end:s/1e3,name:i,data:ut({method:l,statusCode:c,request:d,response:f})}}function vi(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Pr(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const s={headers:e,size:t},{body:i,warnings:l}=rA(n);return s.body=i,l&&l.length>0&&(s._meta={warnings:l}),s}function Dd(e,t){return Object.entries(e).reduce((n,[s,i])=>{const l=s.toLowerCase();return t.includes(l)&&e[s]&&(n[l]=i),n},{})}function _v(e){return new URLSearchParams(e).toString()}function rA(e){if(!e||typeof e!="string")return{body:e};const t=e.length>my,n=sA(e);if(t){const s=e.slice(0,my);return n?{body:s,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${s}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function sA(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function vl(e,t){const n=oA(e);return Er(n,t)}function oA(e,t=Ge.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ge.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const s=n.href;return!e.endsWith("/")&&s.endsWith("/")?s.slice(0,-1):s}async function iA(e,t,n){try{const s=await lA(e,t,n),i=wv("resource.fetch",s);yv(n.replay,i)}catch(s){fe&&pe.exception(s,"Failed to capture fetch breadcrumb")}}function aA(e,t){const{input:n,response:s}=t,i=n?Ev(n):void 0,l=gl(i),c=s?vv(s.headers.get("content-length")):void 0;l!==void 0&&(e.data.request_body_size=l),c!==void 0&&(e.data.response_body_size=c)}async function lA(e,t,n){const s=Date.now(),{startTimestamp:i=s,endTimestamp:l=s}=t,{url:c,method:d,status_code:f=0,request_body_size:m,response_body_size:y}=e.data,v=vl(c,n.networkDetailAllowUrls)&&!vl(c,n.networkDetailDenyUrls),w=v?cA(n,t.input,m):vi(m),E=await uA(v,n,t.response,y);return{startTimestamp:i,endTimestamp:l,url:c,method:d,statusCode:f,request:w,response:E}}function cA({networkCaptureBodies:e,networkRequestHeaders:t},n,s){const i=n?pA(n,t):{};if(!e)return Pr(i,s,void 0);const l=Ev(n),[c,d]=Sv(l),f=Pr(i,s,c);return d?yl(f,d):f}async function uA(e,{networkCaptureBodies:t,networkResponseHeaders:n},s,i){if(!e&&i!==void 0)return vi(i);const l=s?xv(s.headers,n):{};if(!s||!t&&i!==void 0)return Pr(l,i,void 0);const[c,d]=await fA(s),f=dA(c,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:l});return d?yl(f,d):f}function dA(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:s,headers:i}){try{const l=e&&e.length&&n===void 0?gl(e):n;return s?t?Pr(i,l,e):Pr(i,l,void 0):vi(l)}catch(l){return fe&&pe.exception(l,"Failed to serialize response body"),Pr(i,n,void 0)}}async function fA(e){const t=hA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await mA(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(fe&&pe.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(fe&&pe.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Ev(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function xv(e,t){const n={};return t.forEach(s=>{e.get(s)&&(n[s]=e.get(s))}),n}function pA(e,t){return e.length===1&&typeof e[0]!="string"?Tv(e[0],t):e.length===2?Tv(e[1],t):{}}function Tv(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?xv(n,t):Array.isArray(n)?{}:Dd(n,t):{}}function hA(e){try{return e.clone()}catch(t){fe&&pe.exception(t,"Failed to clone response body")}}function mA(e){return new Promise((t,n)=>{const s=so(()=>n(new Error("Timeout while trying to read response body")),500);gA(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(s))})}async function gA(e){return await e.text()}async function yA(e,t,n){try{const s=SA(e,t,n),i=wv("resource.xhr",s);yv(n.replay,i)}catch(s){fe&&pe.exception(s,"Failed to capture xhr breadcrumb")}}function vA(e,t){const{xhr:n,input:s}=t;if(!n)return;const i=gl(s),l=n.getResponseHeader("content-length")?vv(n.getResponseHeader("content-length")):xA(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),l!==void 0&&(e.data.response_body_size=l)}function SA(e,t,n){const s=Date.now(),{startTimestamp:i=s,endTimestamp:l=s,input:c,xhr:d}=t,{url:f,method:m,status_code:y=0,request_body_size:v,response_body_size:w}=e.data;if(!f)return null;if(!d||!vl(f,n.networkDetailAllowUrls)||vl(f,n.networkDetailDenyUrls)){const j=vi(v),D=vi(w);return{startTimestamp:i,endTimestamp:l,url:f,method:m,statusCode:y,request:j,response:D}}const E=d[ys],_=E?Dd(E.request_headers,n.networkRequestHeaders):{},T=Dd(wA(d),n.networkResponseHeaders),[k,M]=n.networkCaptureBodies?Sv(c):[void 0],[P,$]=n.networkCaptureBodies?_A(d):[void 0],q=Pr(_,v,k),W=Pr(T,w,P);return{startTimestamp:i,endTimestamp:l,url:f,method:m,statusCode:y,request:M?yl(q,M):q,response:$?yl(W,$):W}}function wA(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
`).reduce((n,s)=>{const[i,l]=s.split(": ");return l&&(n[i.toLowerCase()]=l),n},{}):{}}function _A(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return EA(e.response,e.responseType)}catch(n){t.push(n)}return fe&&pe.warn("Failed to get xhr response body",...t),[void 0]}function EA(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return fe&&pe.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return fe&&pe.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function xA(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return gl(n)}catch{return}}function TA(e){const t=Ae();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:l,networkResponseHeaders:c}=e.getOptions(),d={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:l,networkResponseHeaders:c};t&&t.on("beforeAddBreadcrumb",(f,m)=>kA(d,f,m))}catch{}}function kA(e,t,n){if(t.data)try{IA(t)&&bA(n)&&(vA(t,n),yA(t,n,e)),CA(t)&&RA(n)&&(aA(t,n),iA(t,n,e))}catch(s){fe&&pe.exception(s,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function CA(e){return e.category==="fetch"}function bA(e){return e&&e.xhr}function RA(e){return e&&e.response}function AA(e){const t=Ae();oy(oR(e)),Ya(tA(e)),VR(e),TA(e);const n=ZR(e);WT(n),t&&(t.on("beforeSendEvent",WR(e)),t.on("afterSendEvent",zR(e)),t.on("createDsc",s=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(s.replay_id=i)}),t.on("spanStart",s=>{e.lastActiveSpan=s}),t.on("spanEnd",s=>{e.lastActiveSpan=s}),t.on("beforeSendFeedback",(s,i)=>{const l=e.getSessionId();i&&i.includeReplay&&e.isEnabled()&&l&&s.contexts&&s.contexts.feedback&&(s.contexts.feedback.replay_id=l)}))}async function PA(e){try{return Promise.all(ml(e,[OA(Ge.performance.memory)]))}catch{return[]}}function OA(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:s}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:s}}}}function NA(e,t,n){let s,i,l;const c=n&&n.maxWait?Math.max(n.maxWait,t):0;function d(){return f(),s=e(),s}function f(){i!==void 0&&clearTimeout(i),l!==void 0&&clearTimeout(l),i=l=void 0}function m(){return i!==void 0||l!==void 0?d():s}function y(){return i&&clearTimeout(i),i=so(d,t),c&&l===void 0&&(l=so(d,c)),s}return y.cancel=f,y.flush=m,y}const Ss=Ne.navigator;function MA(){return/iPhone|iPad|iPod/i.test(Ss&&Ss.userAgent||"")||/Macintosh/i.test(Ss&&Ss.userAgent||"")&&Ss&&Ss.maxTouchPoints&&Ss.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function LA(e){let t=!1;return(n,s)=>{if(!e.checkAndHandleExpiredSession()){fe&&pe.warn("Received replay event after session expired.");return}const i=s||!t;t=!0,e.clickDetector&&eR(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Md(e,n,i))return!0;if(!i)return!1;const l=e.session;if(DA(e,i),e.recordingMode==="buffer"&&l&&e.eventBuffer){const c=e.eventBuffer.getEarliestTimestamp();c&&(fe&&pe.info(`Updating session start time to earliest event in buffer to ${new Date(c)}`),l.started=c,e.getOptions().stickySession&&Pd(l))}return l&&l.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function jA(e){const t=e.getOptions();return{type:Te.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function DA(e,t){!t||!e.session||e.session.segmentId!==0||Md(e,jA(e),!1)}function FA(e,t,n,s){return hs(Km(e,Du(e),s,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function $A({recordingData:e,headers:t}){let n;const s=`${JSON.stringify(t)}
`;if(typeof e=="string")n=`${s}${e}`;else{const l=new TextEncoder().encode(s);n=new Uint8Array(l.length+e.length),n.set(l),n.set(e,l.length)}return n}async function BA({client:e,scope:t,replayId:n,event:s}){const i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,l={event_id:n,integrations:i};e.emit("preprocessEvent",s,l);const c=await lg(e.getOptions(),s,l,t,e,xn());if(!c)return null;c.platform=c.platform||"javascript";const d=e.getSdkMetadata(),{name:f,version:m}=d&&d.sdk||{};return c.sdk={...c.sdk,name:f||"sentry.javascript.unknown",version:m||"0.0.0"},c}async function zA({recordingData:e,replayId:t,segmentId:n,eventContext:s,timestamp:i,session:l}){const c=$A({recordingData:e,headers:{segment_id:n}}),{urls:d,errorIds:f,traceIds:m,initialTimestamp:y}=s,v=Ae(),w=Ve(),E=v&&v.getTransport(),_=v&&v.getDsn();if(!v||!E||!_||!l.sampled)return nr({});const T={type:Sb,replay_start_timestamp:y/1e3,timestamp:i/1e3,error_ids:f,trace_ids:m,urls:d,replay_id:t,segment_id:n,replay_type:l.sampled},k=await BA({scope:w,client:v,replayId:t,event:T});if(!k)return v.recordDroppedEvent("event_processor","replay",T),fe&&pe.info("An event processor returned `null`, will not send event."),nr({});delete k.sdkProcessingMetadata;const M=FA(k,c,_,v.getOptions().tunnel);let P;try{P=await E.send(M)}catch(q){const W=new Error(dd);try{W.cause=q}catch{}throw W}if(typeof P.statusCode=="number"&&(P.statusCode<200||P.statusCode>=300))throw new kv(P.statusCode);const $=Eg({},P);if(_g($,"replay"))throw new Fd($);return P}class kv extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Fd extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function Iv(e,t={count:0,interval:kb}){const{recordingData:n,onError:s}=e;if(n.length)try{return await zA(e),!0}catch(i){if(i instanceof kv||i instanceof Fd)throw i;if(ug("Replays",{_retryCount:t.count}),s&&s(i),t.count>=Ib){const l=new Error(`${dd} - max retries exceeded`);try{l.cause=i}catch{}throw l}return t.interval*=++t.count,new Promise((l,c)=>{so(async()=>{try{await Iv(e,t),l(!0)}catch(d){c(d)}},t.interval)})}}const Cv="__THROTTLED",UA="__SKIPPED";function HA(e,t,n){const s=new Map,i=d=>{const f=d-n;s.forEach((m,y)=>{y<f&&s.delete(y)})},l=()=>[...s.values()].reduce((d,f)=>d+f,0);let c=!1;return(...d)=>{const f=Math.floor(Date.now()/1e3);if(i(f),l()>=t){const y=c;return c=!0,y?UA:Cv}c=!1;const m=s.get(f)||0;return s.set(f,m+1),e(...d)}}class Or{constructor({options:t,recordingOptions:n}){Or.prototype.__init.call(this),Or.prototype.__init2.call(this),Or.prototype.__init3.call(this),Or.prototype.__init4.call(this),Or.prototype.__init5.call(this),Or.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:wb,sessionIdleExpire:_b},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=NA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=HA((c,d)=>FR(this,c,d),300,5);const{slowClickTimeout:s,slowClickIgnoreSelectors:i}=this.getOptions(),l=s?{threshold:Math.min(Cb,s),timeout:s,scrollTimeout:bb,ignoreSelector:i?i.join(","):""}:void 0;if(l&&(this.clickDetector=new K2(this,l)),fe){const c=t._experiments;pe.setConfig({captureExceptions:!!c.captureExceptions,traceInternals:!!c.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){fe&&pe.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:s}=this._options,i=n<=0&&s<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){fe&&pe.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",fe&&pe.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){fe&&pe.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){fe&&pe.info("Buffering is in progress, call `flush()` to save the replay");return}fe&&pe.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Nd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){fe&&pe.info("Buffering is in progress, call `flush()` to save the replay");return}fe&&pe.infoTick("Starting replay in buffer mode");const t=Nd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=ir({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:Tb}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:LA(this),...MA(),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:n}={}){if(this._isEnabled){this._isEnabled=!1;try{fe&&pe.info(`Stopping Replay${n?` triggered by ${n}`:""}`),gv(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,NR(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),fe&&pe.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),fe&&pe.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();fe&&pe.info("Converting buffer to session"),await this.flushImmediate();const s=this.stopRecording();!t||!s||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?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&&Od(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Ge.location.pathname}${Ge.location.hash}${Ge.location.search}`,n=`${Ge.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const s=this._throttledAddEvent(t,n);if(s===Cv){const i=Bn({category:"replay.throttled"});this.addUpdate(()=>!Md(this,{type:H2,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return s}getCurrentRoute(){const t=this.lastActiveSpan||yt(),n=t&&Tt(t),i=(n&&Fe(n).data||{})[jn];if(!(!n||!i||!["route","custom"].includes(i)))return Fe(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=AR({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,s=Nd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=s}_checkSession(){if(!this.session)return!1;const t=this.session;return dv(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Ge.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ge.addEventListener("blur",this._handleWindowBlur),Ge.addEventListener("focus",this._handleWindowFocus),Ge.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(AA(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=xR(this)}_removeListeners(){try{Ge.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ge.removeEventListener("blur",this._handleWindowBlur),Ge.removeEventListener("focus",this._handleWindowFocus),Ge.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{Ge.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Bn({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Bn({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{cR(this,t)}}_doChangeToBackgroundTasks(t){!this.session||uv(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){fe&&pe.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_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:Te.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=pR(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(s=>s.start>=n)}return Promise.all(ml(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const s=n.getEarliestTimestamp();s&&s<this._context.initialTimestamp&&(this._context.initialTimestamp=s)}_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){fe&&pe.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await PA(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const l=await this.eventBuffer.finish();await Iv({replayId:t,recordingData:l,segmentId:i,eventContext:s,session:this.session,timestamp:n,onError:c=>this.handleException(c)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const s=Ae();if(s){const i=n instanceof Fd?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){fe&&pe.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();const l=i<this._options.minReplayDuration,c=i>this._options.maxReplayDuration+5e3;if(l||c){fe&&pe.info(`Session duration (${Math.floor(i/1e3)}s) is too ${l?"short":"long"}, not sending replay.`),l&&this._debouncedFlush();return}const d=this.eventBuffer;d&&this.session.segmentId===0&&!d.hasCheckout&&fe&&pe.info("Flushing initial segment without checkout.");const f=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(m){this.handleException(m)}finally{this._flushLock=void 0,f&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Pd(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,l=s&&n>s;if(n>i||l){const c=Bn({category:"replay.mutations",data:{count:n,limit:l}});this._createCustomBreadcrumb(c)}return l?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Si(e,t){return[...e,...t].join(",")}function WA({mask:e,unmask:t,block:n,unblock:s,ignore:i}){const l=["base","iframe[srcdoc]:not([src])"],c=Si(e,[".sentry-mask","[data-sentry-mask]"]),d=Si(t,[]);return{maskTextSelector:c,unmaskTextSelector:d,blockSelector:Si(n,[".sentry-block","[data-sentry-block]",...l]),unblockSelector:Si(s,[]),ignoreSelector:Si(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function qA({el:e,key:t,maskAttributes:n,maskAllText:s,privacyOptions:i,value:l}){return!s||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?l:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?l.replace(/[\S]/g,"*"):l}const bv='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',VA=["content-length","content-type","accept"];let Rv=!1;const GA=e=>new Sl(e);class Sl{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Eb,flushMaxDelay:n=xb,minReplayDuration:s=Rb,maxReplayDuration:i=gy,stickySession:l=!0,useCompression:c=!0,workerUrl:d,_experiments:f={},maskAllText:m=!0,maskAllInputs:y=!0,blockAllMedia:v=!0,mutationBreadcrumbLimit:w=750,mutationLimit:E=1e4,slowClickTimeout:_=7e3,slowClickIgnoreSelectors:T=[],networkDetailAllowUrls:k=[],networkDetailDenyUrls:M=[],networkCaptureBodies:P=!0,networkRequestHeaders:$=[],networkResponseHeaders:q=[],mask:W=[],maskAttributes:j=["title","placeholder"],unmask:D=[],block:Y=[],unblock:K=[],ignore:V=[],maskFn:se,beforeAddRecordingEvent:ie,beforeErrorSampling:ge,onError:Ce}={}){this.name=Sl.id;const He=WA({mask:W,unmask:D,block:Y,unblock:K,ignore:V});if(this._recordingOptions={maskAllInputs:y,maskAllText:m,maskInputOptions:{password:!0},maskTextFn:se,maskInputFn:se,maskAttributeFn:(le,Ee,B)=>qA({maskAttributes:j,maskAllText:m,privacyOptions:He,key:le,value:Ee,el:B}),...He,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:le=>{try{le.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(s,Ab),maxReplayDuration:Math.min(i,gy),stickySession:l,useCompression:c,workerUrl:d,blockAllMedia:v,maskAllInputs:y,maskAllText:m,mutationBreadcrumbLimit:w,mutationLimit:E,slowClickTimeout:_,slowClickIgnoreSelectors:T,networkDetailAllowUrls:k,networkDetailDenyUrls:M,networkCaptureBodies:P,networkRequestHeaders:Av($),networkResponseHeaders:Av(q),beforeAddRecordingEvent:ie,beforeErrorSampling:ge,onError:Ce,_experiments:f},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${bv}`:bv),this._isInitialized&&Bg())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Rv}set _isInitialized(t){Rv=t}afterAllSetup(t){!Bg()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}getRecordingMode(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=QA(this._initialOptions,t);this._replay=new Or({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}Sl.__initStatic();function QA(e,t){const n=t.getOptions(),s={sessionSampleRate:0,errorSampleRate:0,...ut(e)},i=Na(n.replaysSessionSampleRate),l=Na(n.replaysOnErrorSampleRate);return i==null&&l==null&&Sr(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(s.sessionSampleRate=i),l!=null&&(s.errorSampleRate=l),s}function Av(e){return[...VA,...e.map(t=>t.toLowerCase())]}const Pv=new WeakMap,$d=new Map,wl={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function YA(e,t){const{traceFetch:n,traceXHR:s,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:l,enableHTTPTimings:c,tracePropagationTargets:d}={traceFetch:wl.traceFetch,traceXHR:wl.traceXHR,trackFetchStreamPerformance:wl.trackFetchStreamPerformance,...t},f=typeof l=="function"?l:v=>!0,m=v=>ZA(v,d),y={};n&&(e.addEventProcessor(v=>(v.type==="transaction"&&v.spans&&v.spans.forEach(w=>{if(w.op==="http.client"){const E=$d.get(w.span_id);E&&(w.timestamp=E/1e3,$d.delete(w.span_id))}}),v)),i&&Gk(v=>{if(v.response){const w=Pv.get(v.response);w&&v.endTimestamp&&$d.set(w,v.endTimestamp)}}),Dg(v=>{const w=Bk(v,f,m,y);if(v.response&&v.fetchData.__span&&Pv.set(v.response,v.fetchData.__span),w){const E=Nv(v.fetchData.url),_=E?ms(E).host:void 0;w.setAttributes({"http.url":E,"server.address":_})}c&&w&&Ov(w)})),s&&cy(v=>{const w=eP(v,f,m,y);c&&w&&Ov(w)})}function KA(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Ov(e){const{url:t}=Fe(e).data||{};if(!t||typeof t!="string")return;const n=no("resource",({entries:s})=>{s.forEach(i=>{KA(i)&&i.name.endsWith(t)&&(JA(i).forEach(c=>e.setAttribute(...c)),setTimeout(n))})})}function XA(e){let t="unknown",n="unknown",s="";for(const i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=s==="h"?"http":s,n=e.split(s)[1];break}s+=i}return s===e&&(t=s),{name:t,version:n}}function zn(e=0){return((Dt||performance.timeOrigin)+e)/1e3}function JA(e){const{name:t,version:n}=XA(e.nextHopProtocol),s=[];return s.push(["network.protocol.version",n],["network.protocol.name",t]),Dt?[...s,["http.request.redirect_start",zn(e.redirectStart)],["http.request.fetch_start",zn(e.fetchStart)],["http.request.domain_lookup_start",zn(e.domainLookupStart)],["http.request.domain_lookup_end",zn(e.domainLookupEnd)],["http.request.connect_start",zn(e.connectStart)],["http.request.secure_connection_start",zn(e.secureConnectionStart)],["http.request.connection_end",zn(e.connectEnd)],["http.request.request_start",zn(e.requestStart)],["http.request.response_start",zn(e.responseStart)],["http.request.response_end",zn(e.responseEnd)]]:s}function ZA(e,t){const n=ve.location&&ve.location.href;if(n){let s,i;try{s=new URL(e,n),i=new URL(n).origin}catch{return!1}const l=s.origin===i;return t?Er(s.toString(),t)||l&&Er(s.pathname,t):l}else{const s=!!e.match(/^\/(?!\/)/);return t?Er(e,t):s}}function eP(e,t,n,s){const i=e.xhr,l=i&&i[ys];if(!i||i.__sentry_own_request__||!l)return;const c=Ir()&&t(l.url);if(e.endTimestamp&&c){const v=i.__sentry_xhr_span_id__;if(!v)return;const w=s[v];w&&l.status_code!==void 0&&(Im(w,l.status_code),w.end(),delete s[v]);return}const d=Nv(l.url),f=d?ms(d).host:void 0,m=!!yt(),y=c&&m?ti({name:`${l.method} ${l.url}`,attributes:{type:"xhr","http.method":l.method,"http.url":d,url:l.url,"server.address":f,[mt]:"auto.http.browser",[cs]:"http.client"}}):new Xs;return i.__sentry_xhr_span_id__=y.spanContext().spanId,s[i.__sentry_xhr_span_id__]=y,n(l.url)&&tP(i,Ir()&&m?y:void 0),y}function tP(e,t){const{"sentry-trace":n,baggage:s}=Ig({span:t});n&&nP(e,n,s)}function nP(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function Nv(e){try{return new URL(e,ve.location.origin).href}catch{return}}function rP(){ve&&ve.document?ve.document.addEventListener("visibilitychange",()=>{const e=yt();if(!e)return;const t=Tt(e);if(ve.document.hidden&&t){const n="cancelled",{op:s,status:i}=Fe(t);$n&&X.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${s}`),i||t.setStatus({code:gt,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):$n&&X.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const sP="BrowserTracing",oP={...Ma,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...wl},iP=(e={})=>{Gx();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:l},beforeStartSpan:c,idleTimeout:d,finalTimeout:f,childSpanTimeout:m,markBackgroundSpan:y,traceFetch:v,traceXHR:w,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:_,enableHTTPTimings:T,instrumentPageLoad:k,instrumentNavigation:M}={...oP,...e},P=nC({recordClsStandaloneSpans:l||!1});t&&CC(),s&&Ne.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?sC():n&&rC(),i&&oC();const $={name:void 0,source:void 0};function q(W,j){const D=j.op==="pageload",Y=c?c(j):j,K=Y.attributes||{};j.name!==Y.name&&(K[jn]="custom",Y.attributes=K),$.name=Y.name,$.source=K[jn];const V=og(Y,{idleTimeout:d,finalTimeout:f,childSpanTimeout:m,disableAutoFinish:D,beforeSpanEnd:ie=>{P(),uC(ie,{recordClsOnPageloadSpan:!l})}});function se(){["interactive","complete"].includes(ve.document.readyState)&&W.emit("idleSpanEnableAutoFinish",V)}return D&&ve.document&&(ve.document.addEventListener("readystatechange",()=>{se()}),se()),V}return{name:sP,afterAllSetup(W){let j,D=ve.location&&ve.location.href;function Y(){j&&!Fe(j).timestamp&&($n&&X.log(`[Tracing] Finishing current active span with op: ${Fe(j).op}`),j.end())}W.on("startNavigationSpan",K=>{Ae()===W&&(Y(),j=q(W,{op:"navigation",...K}))}),W.on("startPageLoadSpan",(K,V={})=>{if(Ae()!==W)return;Y();const se=V.sentryTrace||Mv("sentry-trace"),ie=V.baggage||Mv("baggage"),ge=Bx(se,ie);Ve().setPropagationContext(ge),j=q(W,{op:"pageload",...K})}),W.on("spanEnd",K=>{const V=Fe(K).op;if(K!==Tt(K)||V!=="navigation"&&V!=="pageload")return;const se=Ve(),ie=se.getPropagationContext();se.setPropagationContext({...ie,sampled:ie.sampled!==void 0?ie.sampled:ds(K),dsc:ie.dsc||ps(K)})}),ve.location&&(k&&aP(W,{name:ve.location.pathname,startTime:Dt?Dt/1e3:void 0,attributes:{[jn]:"url",[mt]:"auto.pageload.browser"}}),M&&Ya(({to:K,from:V})=>{if(V===void 0&&D&&D.indexOf(K)!==-1){D=void 0;return}V!==K&&(D=void 0,lP(W,{name:ve.location.pathname,attributes:{[jn]:"url",[mt]:"auto.navigation.browser"}}))})),y&&rP(),i&&cP(d,f,m,$),t&&RC(),YA(W,{traceFetch:v,traceXHR:w,trackFetchStreamPerformance:E,tracePropagationTargets:W.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:T})}}};function aP(e,t,n){e.emit("startPageLoadSpan",t,n),Ve().setTransactionName(t.name);const s=yt();return(s&&Fe(s).op)==="pageload"?s:void 0}function lP(e,t){xn().setPropagationContext({traceId:Tr()}),Ve().setPropagationContext({traceId:Tr()}),e.emit("startNavigationSpan",t),Ve().setTransactionName(t.name);const n=yt();return(n&&Fe(n).op)==="navigation"?n:void 0}function Mv(e){const t=fx(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function cP(e,t,n,s){let i;const l=()=>{const c="ui.action.click",d=yt(),f=d&&Tt(d);if(f){const m=Fe(f).op;if(["navigation","pageload"].includes(m)){$n&&X.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Ru,"interactionInterrupted"),i.end(),i=void 0),!s.name){$n&&X.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=og({name:s.name,op:c,attributes:{[jn]:s.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};ve.document&&addEventListener("click",l,{once:!1,capture:!0})}function uP(e){const t={...e};return kg(t,"react"),ug("react",{version:b.version}),vb(t)}const dP=async e=>{try{return await hP(e),yr.reportNewUserCreated(),e}catch(t){throw console.error("User haven't been registered"),t}},Lv=e=>dP(e).then(()=>{Bd(e)}).catch(t=>{fP()}),tn=async()=>{const e=wi();if(e)return e;const t=Kn(13);return await Lv(t),Bd(t),t},_l=()=>{const e=wi();if(e)return e;const t=Kn(13);return Bd(t),Lv(t),t},Bd=e=>localStorage.setItem(dn.userId,e),wi=()=>localStorage.getItem(dn.userId),fP=()=>{localStorage.removeItem(dn.userId)},pP=async()=>{const e=wi();return!e||e==="undefined"?"dafult-user":e},hP=async e=>{var s,i;const n=(((s=window.__widgetEdmap)==null?void 0:s.mode)||"default")==="admin"?"/user/disposable?seconds=32400":"/user";try{const l=await lt.post(n,{id:e});return(i=l==null?void 0:l.data)==null?void 0:i.id}catch(l){throw console.error("Error registering new user:",l),l}},mP=async e=>{var c;e.preventDefault(),e.stopPropagation();const t=(c=window==null?void 0:window.__widgetEdmap)==null?void 0:c.mapId;if(!t)return;const n=await tn(),s=window.location.href,i=encodeURIComponent(s),l=`/auth/telegram?mapId=${t}&userId=${n}&frontendRedirectUrl=${i}`;try{window.location.href=`${lt.defaults.baseURL}${l}`}catch(d){Dn(d),console.error("Error registering new user through telegram",d)}},jv=async e=>{var c;const t=(c=window==null?void 0:window.__widgetEdmap)==null?void 0:c.mapId,n=await tn(),s=encodeURIComponent(window.location.href);if(!t)return;const i=new URLSearchParams;i.set("mapId",t),i.set("userId",n),i.set("frontendRedirectUrl",s);const l=`/auth/oauth/${e}?${i.toString()}`;try{window.location.href=`${lt.defaults.baseURL}${l}`}catch(d){Dn(d),console.error("Error registering new user through gmail",d)}},gP=async e=>(e.preventDefault(),e.stopPropagation(),jv("google")),yP=async e=>(e.preventDefault(),e.stopPropagation(),jv("yandex")),vP=async e=>{try{const{data:t}=await lt.get(`auth/login-from-tempcode/${e}`);SP(t)}catch{}},SP=e=>{yr.reportUserRegistration(),localStorage.setItem(dn.userId,e==null?void 0:e.userId),localStorage.setItem("edmap-access-token",e==null?void 0:e.accessToken),localStorage.setItem("edmap-refresh-token",e==null?void 0:e.refreshToken)},wP=e=>{if(!e)return"edmap-session-prob";const t=Kn(13),n=`edmap-session-${e}`;return localStorage.setItem(n,`${t}@${Date.now()}`),t},Dv=e=>{const t=`edmap-session-${e}`;localStorage.removeItem(t)},_P=e=>{const t=localStorage.getItem(`edmap-session-${e}`);return t||null},Un=e=>{const t=EP(e),[n,s]=t.split("@");return n},EP=e=>{const t=localStorage.getItem(`edmap-session-${e}`);return t||wP(e)},xP=async(e,t)=>{t&&await vP(t);const n=await pP();return $v(e,n)},Fv=()=>typeof window>"u"?!1:!!localStorage.getItem("edmap-access-token"),TP=async(e,t)=>{const n=`/quest/${e}/${encodeURIComponent(t)}`;try{const s=await lt.get(n);return s.data?s.data:null}catch{return null}},kP=async e=>{const t=`/quest/widget/${e}`;try{const n=await lt.get(t);return n.data?n.data:null}catch(n){Dn(n),console.error("Error fetching quest:",n)}},IP=async e=>{const t="/result-quest-answer/test";try{return await lt.post(t,{id:Kn(13),sessionId:Un(e.id),questId:e.id,mapId:e.mapId,userId:await tn()})}catch(n){throw console.error("Failed to send result test answers:",n),n}},$v=async(e,t)=>{const s=`/user-result/${window.__widgetEdmap.mode==="admin"?"stand/":""}${e}/${t}`;try{return(await lt.get(s)).data}catch(i){Dn(i),console.error("Failed to get user results:",i)}},CP=async(e,t,n)=>{const s=`/leaderboard/${e}`;try{return await lt.get(s,{params:{take:t,skip:n}})}catch(i){Dn(i),console.error("Failed to fetch leaderboard:",i)}},Bv=e=>{let t;const n=new Set,s=(m,y)=>{const v=typeof m=="function"?m(t):m;if(!Object.is(v,t)){const w=t;t=y??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(E=>E(t,w))}},i=()=>t,d={setState:s,getState:i,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m))},f=t=e(s,i,d);return d},bP=e=>e?Bv(e):Bv,RP=e=>e;function AP(e,t=RP){const n=xt.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return xt.useDebugValue(n),n}const zv=e=>{const t=bP(e),n=s=>AP(t,s);return Object.assign(n,t),n},PP=e=>e?zv(e):zv,Uv=new Set,OP=()=>{Uv.forEach(e=>e())},It=e=>{const t=PP(e),n=t.getState();return Uv.add(()=>t.setState(n,!0)),t},xe=It((e,t)=>({quest:{},stepCount:0,currentStep:0,currentTryPoints:0,isFinished:null,mapLeaderboard:[],isError:!1,resetQuest:()=>e({currentTryPoints:0,isFinished:!1}),increaseCurrentStep:()=>e({currentStep:t().currentStep+1}),setQuest:n=>e({quest:n}),setIsFinished:n=>e({isFinished:n}),setMapLeaderboard:n=>e({mapLeaderboard:n}),setCurrentTryPoints:n=>e({currentTryPoints:n}),setIsError:n=>e({isError:n})}));xe.getState.bind(xe);const zd="eddpzuabl",Hv="edl168snjk",NP="edwbmletw",Wv="edr10i0h72",Ud="edn16xylqg",MP="edb19h1gx0",qv="edt1n7onvl",LP="edw16bh3dw",jP="edw1j9fzy2";function DP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var FP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Hd=DP(function(e){return FP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),$P=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},s=[];t.forEach(l=>{(l?l.split(" "):[]).forEach(d=>{if(d.startsWith("atm_")){const[,f]=d.split("_");n[f]=d}else s.push(d)})});const i=[];for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&i.push(n[l]);return i.push(...s),i.join(" ")},Vv=$P,BP=e=>e.toUpperCase()===e,zP=e=>t=>e.indexOf(t)===-1,Gv=(e,t)=>{const n={};return Object.keys(e).filter(zP(t)).forEach(s=>{n[s]=e[s]}),n};function UP(e,t,n){const s=Gv(t,n);if(!e){const i=typeof Hd=="function"?{default:Hd}:Hd;Object.keys(s).forEach(l=>{i.default(l)||delete s[l]})}return s}var HP=(e,t)=>{};function WP(e){let t="";return n=>{const s=(l,c)=>{const{as:d=e,class:f=t}=l,m=n.propsAsIs===void 0?!(typeof d=="string"&&d.indexOf("-")===-1&&!BP(d[0])):n.propsAsIs,y=UP(m,l,["as","class"]);y.ref=c,y.className=n.atomic?Vv(n.class,y.className||f):Vv(y.className||f,n.class);const{vars:v}=n;if(v){const w={};for(const T in v){const k=v[T],M=k[0],P=k[1]||"",$=typeof M=="function"?M(l):M;HP($,n.name),w[`--${T}`]=`${$}${P}`}const E=y.style||{},_=Object.keys(E);_.length>0&&_.forEach(T=>{w[T]=E[T]}),y.style=w}return e.__wyw_meta&&e!==d?(y.as=d,xt.createElement(e,y)):xt.createElement(d,y)},i=xt.forwardRef?xt.forwardRef(s):l=>{const c=Gv(l,["innerRef"]);return s(c,l.innerRef)};return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var N=WP;const qP=N("div")({name:"Container",class:"edc2mc3o7",propsAsIs:!1}),VP=N("div")({name:"ContentWrapper",class:"edc1mezuql",propsAsIs:!1}),Qv=N("div")({name:"InfoBlock",class:"edi282h0s",propsAsIs:!1}),Yv=N("p")({name:"InfoBlockTitle",class:"edi1hvj2ef",propsAsIs:!1}),Kv=N("p")({name:"InfoBlockSubtitle",class:"edil1zahd",propsAsIs:!1}),Xv=N("div")({name:"ButtonsWrapper",class:"edb19bodzu",propsAsIs:!1}),GP=N("div")({name:"SignInBlock",class:"eds1kockd",propsAsIs:!1}),QP=N("div")({name:"MenuSection",class:"edm1mglzga",propsAsIs:!1}),YP=N("div")({name:"Container",class:"edc1j8vq8z",propsAsIs:!1}),KP=N("ul")({name:"Nav",class:"edn1cd6joy",propsAsIs:!1}),XP=()=>e=>e.isActive?"var(--accent)":"var(--popup-menu-tabs)",JP=()=>e=>e.isActive?"var(--accent)":"var(--popup-menu-tabs-font-hover)",ZP=N("li")({name:"NavItem",class:"edn1fabm11",propsAsIs:!1,vars:{"n1fabm11-0":[XP()],"n1fabm11-1":[JP()]}}),Jv=e=>({...e,prizes:e3(e)}),e3=e=>{var t,n;return[...(t=e.receivedPrizes)==null?void 0:t.map(t3).map(s=>Zv(s,!0)),...(n=e.restPrizes)==null?void 0:n.map(s=>Zv(s,!1))]},t3=e=>({...e,...e.prize,id:e.id}),Zv=(e,t=!0)=>({...e,isReceived:t}),Ct=It(e=>({points:0,results:{},pointsAreReceived:!1,resetUser:()=>e({pointsAreReceived:!1}),setUserPoints:t=>e(n=>({points:n.points+t})),setUserResults:t=>e({results:Jv(t)}),setPointsAreReceived:t=>e({pointsAreReceived:t}),refreshUserResults:async t=>{const n=await tn(),s=await $v(t,n);e({results:Jv(s)})}})),n3=({data:e,activeIndex:t,setActiveIndex:n})=>{var l;const s=Ct(c=>c.results),i=(l=s==null?void 0:s.prizes)==null?void 0:l.length;return g.jsx(YP,{children:g.jsx(KP,{children:e.map((c,d)=>g.jsxs(ZP,{onClick:()=>n(d),isActive:d===t,children:[c,d===0&&g.jsx("span",{children:i})]},c))})})},r3=N("div")({name:"Container",class:"edc17us64y",propsAsIs:!1}),e0=N("div")({name:"Header",class:"edh141t6pe",propsAsIs:!1}),t0=N("div")({name:"PrizeBackground",class:"edp1oopuya",propsAsIs:!1}),n0=N("div")({name:"Title",class:"edtlw5k9f",propsAsIs:!1}),s3=N("div")({name:"ButtonWrapper",class:"edbggxr7n",propsAsIs:!1}),o3=N("div")({name:"IconButtonWrapper",class:"edi16rf10j",propsAsIs:!1}),i3=N("div")({name:"ProgressWrapper",class:"edp121tjyk",propsAsIs:!1}),a3=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},b.createElement("path",{fill:"currentColor",d:"M13 10v9h-2v-9zm0-5v2h-2V5z"}));function l3(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var c3=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Wd=l3(function(e){return c3.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),u3=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},s=[];t.forEach(l=>{(l?l.split(" "):[]).forEach(d=>{if(d.startsWith("atm_")){const[,f]=d.split("_");n[f]=d}else s.push(d)})});const i=[];for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&i.push(n[l]);return i.push(...s),i.join(" ")},r0=u3,d3=e=>e.toUpperCase()===e,f3=e=>t=>e.indexOf(t)===-1,s0=(e,t)=>{const n={};return Object.keys(e).filter(f3(t)).forEach(s=>{n[s]=e[s]}),n};function p3(e,t,n){const s=s0(t,n);if(!e){const i=typeof Wd=="function"?{default:Wd}:Wd;Object.keys(s).forEach(l=>{i.default(l)||delete s[l]})}return s}var h3=(e,t)=>{};function m3(e){let t="";return n=>{const s=(l,c)=>{const{as:d=e,class:f=t}=l,m=n.propsAsIs===void 0?!(typeof d=="string"&&d.indexOf("-")===-1&&!d3(d[0])):n.propsAsIs,y=p3(m,l,["as","class"]);y.ref=c,y.className=n.atomic?r0(n.class,y.className||f):r0(y.className||f,n.class);const{vars:v}=n;if(v){const w={};for(const T in v){const k=v[T],M=k[0],P=k[1]||"",$=typeof M=="function"?M(l):M;h3($,n.name),w[`--${T}`]=`${$}${P}`}const E=y.style||{},_=Object.keys(E);_.length>0&&_.forEach(T=>{w[T]=E[T]}),y.style=w}return e.__wyw_meta&&e!==d?(y.as=d,xt.createElement(e,y)):xt.createElement(d,y)},i=xt.forwardRef?xt.forwardRef(s):l=>{const c=s0(l,["innerRef"]);return s(c,l.innerRef)};return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var Z=m3;const o0=Z("button")({name:"ColoredButton",class:"edc1h8okqi",propsAsIs:!1}),El=Z(o0)({name:"Button",class:"edbym73sg",propsAsIs:!0}),i0=({icon:e,title:t,...n})=>g.jsx(g3,{...n,children:e||t}),g3=Z(El)({name:"CustomButton",class:"edc1r5q1nu",propsAsIs:!0}),mn=({title:e,isAccent:t,isSuccess:n,link:s,target:i="_blank",linkProps:l,...c})=>s?g.jsx("a",{target:i,href:s,rel:i==="_blank"&&"noopener noreferrer",...l,children:g.jsx(a0,{isAccent:t,...c,children:e})}):g.jsx(a0,{isAccent:t,...c,children:e}),y3=()=>e=>e.isAccent?"var(--main-btn-accent-bg)":"var(--main-btn-bg)",v3=()=>e=>e.isAccent?"900":"400",S3=()=>e=>e.isAccent?"var(--edmap-text-on-main)":"var(--accent)",w3=()=>e=>e.isAccent?"var(--main-btn-accent-bg-hover)":"var(--main-btn-bg-hover)",_3=()=>e=>e.isAccent?"var(--main-btn-accent-bg-active)":"var(--main-btn-bg-active)",a0=Z("button")({name:"Button",class:"edb16ruis3",propsAsIs:!1,vars:{"b16ruis3-0":[y3()],"b16ruis3-1":[v3()],"b16ruis3-2":[S3()],"b16ruis3-3":[w3()],"b16ruis3-4":[_3()]}}),xl=({progressValue:e,overallValue:t})=>{const n=e<=t?(100/t*e).toFixed(0):100;return g.jsx(x3,{progressBarWidth:n})},E3=()=>e=>`${e.progressBarWidth}%`,x3=Z("div")({name:"Bar",class:"edb1pz075f",propsAsIs:!1,vars:{"b1pz075f-0":[E3()]}}),ws=({progressValue:e,overallValue:t,text:n})=>g.jsxs(T3,{children:[g.jsx("span",{children:e}),g.jsxs("span",{children:["/",t," "]}),n&&g.jsx(k3,{children:n})]}),T3=Z("div")({name:"Container",class:"edc1sl84gi",propsAsIs:!1}),k3=Z("span")({name:"PointsText",class:"edpccfrec",propsAsIs:!1}),I3=()=>g.jsx("svg",{viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("g",{"data-name":"Layer 2",id:"Layer_2",children:g.jsx("g",{id:"Interface-Light",children:g.jsxs("g",{id:"interface-light-rating-stars-1",children:[g.jsx("path",{d:"M15.78,14.07l1.46,4.14a.82.82,0,0,0,.74.56L22.2,19a.87.87,0,0,1,.48,1.54l-3.31,2.74a.9.9,0,0,0-.29.91l1.15,4.26a.84.84,0,0,1-1.26,1L15.46,26.9a.78.78,0,0,0-.92,0L11,29.35a.84.84,0,0,1-1.26-1l1.15-4.26a.9.9,0,0,0-.29-.91L7.32,20.49A.87.87,0,0,1,7.8,19L12,18.77a.82.82,0,0,0,.74-.56l1.46-4.14A.82.82,0,0,1,15.78,14.07Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M7.08.92,8.18,4a.63.63,0,0,0,.56.43l3.16.13a.65.65,0,0,1,.36,1.16L9.78,7.8a.65.65,0,0,0-.22.68l.86,3.19a.63.63,0,0,1-.94.72L6.84,10.55a.57.57,0,0,0-.68,0L3.52,12.39a.63.63,0,0,1-.94-.72l.86-3.19a.65.65,0,0,0-.22-.68l-2.48-2A.65.65,0,0,1,1.1,4.59l3.16-.13A.63.63,0,0,0,4.82,4L5.92.92A.61.61,0,0,1,7.08.92Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M24.08.92,25.18,4a.63.63,0,0,0,.56.43l3.16.13a.65.65,0,0,1,.36,1.16L26.78,7.8a.65.65,0,0,0-.22.68l.86,3.19a.63.63,0,0,1-.94.72l-2.64-1.84a.57.57,0,0,0-.68,0l-2.64,1.84a.63.63,0,0,1-.94-.72l.86-3.19a.65.65,0,0,0-.22-.68l-2.48-2a.65.65,0,0,1,.36-1.16l3.16-.13A.63.63,0,0,0,21.82,4L22.92.92A.61.61,0,0,1,24.08.92Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})})})}),C3=()=>g.jsxs("svg",{viewBox:"-4 0 30 30",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsx("style",{children:".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;}"})}),g.jsx("title",{children:"Award Medal"}),g.jsx("g",{"data-name":"Layer 2",id:"Layer_2",children:g.jsx("g",{id:"Interface-Light",children:g.jsxs("g",{id:"interface-light-award-medal-1",children:[g.jsx("polyline",{className:"cls-1",points:"21.5 0.5 10.5 0.5 0.5 0.5"}),g.jsx("line",{className:"cls-1",x1:"21.5",x2:"17",y1:"0.5",y2:"12.5"}),g.jsx("line",{className:"cls-1",x1:"0.5",x2:"5",y1:"0.5",y2:"12.5"}),g.jsx("circle",{className:"cls-1",cx:"11",cy:"20",r:"9.5"}),g.jsx("line",{className:"cls-1",x1:"8",x2:"9",y1:"0.5",y2:"10.5"}),g.jsx("line",{className:"cls-1",x1:"14",x2:"13",y1:"0.5",y2:"10.5"}),g.jsx("path",{className:"cls-1",d:"M11.49,15.35l.91,2.59a.52.52,0,0,0,.46.36l2.64.11a.54.54,0,0,1,.3,1l-2.07,1.71a.58.58,0,0,0-.18.57l.72,2.66a.53.53,0,0,1-.79.6l-2.19-1.54a.51.51,0,0,0-.58,0L8.52,24.91a.53.53,0,0,1-.79-.6l.72-2.66a.58.58,0,0,0-.18-.57L6.2,19.37a.54.54,0,0,1,.3-1l2.64-.11a.52.52,0,0,0,.46-.36l.91-2.59A.52.52,0,0,1,11.49,15.35Z"})]})})})]}),b3=()=>g.jsxs("svg",{viewBox:"-0.5 0 30 30",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsx("style",{children:".cls-1{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;}"})}),g.jsx("title",{children:"Award Trophie"}),g.jsx("g",{"data-name":"Layer 2",id:"Layer_2",children:g.jsx("g",{id:"Interface-Light",children:g.jsxs("g",{id:"interface-light-award-trophie",children:[g.jsx("path",{className:"cls-1",d:"M9.5.5h-6c0,7.73,4.92,14,11,14s11-6.27,11-14h-6"}),g.jsx("rect",{className:"cls-1",height:"5",rx:"1",width:"13",x:"8",y:"24.5"}),g.jsx("line",{className:"cls-1",x1:"12.5",x2:"12.5",y1:"14.3",y2:"24.5"}),g.jsx("line",{className:"cls-1",x1:"16.5",x2:"16.5",y1:"14.3",y2:"24.5"}),g.jsx("path",{className:"cls-1",d:"M25.1,4.5a3.36,3.36,0,0,1,3.4,3c0,1.66-1.34,5-3,5"}),g.jsx("path",{className:"cls-1",d:"M3.5,12.5c-1.66,0-3-3.34-3-5a3.36,3.36,0,0,1,3.4-3"}),g.jsx("path",{className:"cls-1",d:"M15,.85l.91,2.59a.52.52,0,0,0,.46.36L19,3.91a.54.54,0,0,1,.3,1L17.23,6.58a.58.58,0,0,0-.18.57l.72,2.66a.53.53,0,0,1-.79.6L14.79,8.87a.51.51,0,0,0-.58,0L12,10.41a.53.53,0,0,1-.79-.6L12,7.15a.58.58,0,0,0-.18-.57L9.7,4.87a.54.54,0,0,1,.3-1l2.64-.11a.52.52,0,0,0,.46-.36L14,.85A.52.52,0,0,1,15,.85Z"})]})})})]}),R3={1:g.jsx(I3,{}),2:g.jsx(C3,{}),3:g.jsx(b3,{})},A3=Z("div")({name:"InnerIconContainer",class:"edim3awnl",propsAsIs:!1}),l0=({iconId:e,...t})=>g.jsx(A3,{...t,children:R3[e]}),Tl={es:{timer:{remainingTitle:"Límite de tiempo:"},popup:{skillsTitle:"experiencia",menuItems:["Premios","Misiones","Participantes","Configuración"],prizes:{buttonTitle:"Obtener premio",questionsTitle:"puntos"}},gameMenu:{restart:"Empezar de nuevo"},share:{share:"Compartir",downloadFallback:"Descargar"},popupBar:{prizesTitle:"premios",skillsTitle:"exp"},widget:{skillsTitle:"experiencia",accentButtonTitle:"Confirmar respuesta",buttonTitle:"Omitir"},next:"Siguiente",confirmAnswer:"Enviar respuesta",skip:"Omitir",preloader:{text:"El modelo está pensando"},input:{placeholder:"Introduzca texto…"},testCard:{successTitle:"Has aprobado el test",failureTitle:"No aprobaste la prueba",buttonTitle:"Volver a intentar",worstScoreTemplate:"Has obtenido <mark>{points} de {maxPoints}</mark> puntos. Tu mejor resultado es <mark>{bestPoints} de {maxPoints}</mark>.",bestScoreTemplate:"Has obtenido <mark>{bestPoints} de {maxPoints}</mark> puntos.",prizesTitle:"Premios que aún puedes conseguir",questsTitle:"Misiones que aún puedes completar",chooseAnswer:"Seleccione todas las respuestas que correspondan de la lista:"},journeyCard:{successTitle:"Has completado el juego",failureTitle:"No aprobaste el juego",buttonTitle:"Volver a jugar",worstScoreTemplate:"Has obtenido <mark>{points} de {maxPoints}</mark> puntos. Tu mejor resultado es <mark>{bestPoints} de {maxPoints}</mark>.",bestScoreTemplate:"Has obtenido <mark>{bestPoints} de {maxPoints}</mark> puntos.",prizesTitle:"Premios que aún puedes conseguir",questsTitle:"Misiones que aún puedes completar",chooseAnswer:"Seleccione una respuesta:"},repetitiveTrainer:{successTitle:"Has completado el entrenador",failureTitle:"No has superado el entrenador",buttonTitle:"Volver a jugar",worstScoreTemplate:"Has obtenido <mark>{points} de {maxPoints}</mark> puntos. Tu mejor resultado es <mark>{bestPoints} de {maxPoints}</mark>.",bestScoreTemplate:"Has obtenido <mark>{bestPoints} de {maxPoints}</mark> puntos.",prizesTitle:"Premios que aún puedes conseguir",questsTitle:"Misiones que aún puedes completar",chooseAnswer:"Seleccione una respuesta:",currentScore:"Puntuación actual"},settings:{signInPopup:{title:"Para guardar tu progreso y obtener premios, necesitas registrar una cuenta.",subtitle:"¡Tu progreso se transferirá a ella!",buttonTitle:"Cerrar",accentButtonTitle:"Registrarse"},logout:"Cerrar sesión"},globalError:{title:"Algo salió mal 🤔",subtitle:"Mientras pensamos cómo solucionarlo, puedes intentar actualizar la misión"},socialsPopup:{title:"Registrarse con",subTitle:"Próximamente...",telegram:{title:"Telegram"},google:{title:"Google"},yandex:{title:"Yandex"},discord:{title:"Discord"}},footer:{buttonTitle:"Omitir",accentButtonTitle:"Confirmar respuesta"},header:{title:"Semana gratuita de entrenamiento en el plan «Erich Fromm»",progressText:"experiencia",freeAccessBlock:{title:"1",subtitle:"semana",text:"gratis"},button:{link:"/"},image:{url:"/src/assets/header/robert.webp",alt:"Imagen de encabezado"}},prizeList:{title:"Premios"},questList:{title:"Misiones",emptyQuestsWarning:"No hay misiones"},errors:{gpt:{connectionFail:"No se pudo conectar a los servidores de GPT. Por favor, inténtelo más tarde.",insufficientQuota:"GPT se ha quedado sin tokens. Por favor, contacte a los administradores de {{domain}}.",rateLimit:"Demasiadas solicitudes a GPT. Por favor, inténtelo más tarde o contacte a los administradores de {{domain}}.",invalidKey:"La clave de API no es válida. Por favor, contacte a los administradores de {{domain}}.",userTokenLimitExceeded:"Lo sentimos, ha agotado sus tokens. Inténtelo después de {{time}}"}},user:{defaultName:"Juan Pérez",avatar:{alt:"Foto de perfil"},ban:{forbiddenQuest:"Esta misión no está disponible temporalmente para usted",wait:"Por favor, espere"},randomNames:[{id:1,name:"Pelusa Traviesa"},{id:2,name:"Copito Alegre"},{id:3,name:"Trasto Gruñón"},{id:4,name:"Peludo Saltarín"},{id:5,name:"Chispa Pícara"},{id:6,name:"Canela Veloz"},{id:7,name:"Gordi Glotón"},{id:8,name:"Nube Temblorosa"},{id:9,name:"Lento Perezoso"},{id:10,name:"Capitán Migaja"},{id:11,name:"Señor Hámster"},{id:12,name:"Lola Risueña"},{id:13,name:"Bigotes Curiosos"},{id:14,name:"Jack Comilón"},{id:15,name:"Bufón Resoplón"},{id:16,name:"Rey Miau"},{id:17,name:"Ron Ron Peludo"},{id:18,name:"Boris Refunfuñón"},{id:19,name:"Zorro Astuto"},{id:20,name:"Pugron Sueñón"},{id:21,name:"Gruñón Fuerte"},{id:22,name:"Solecito Feliz"},{id:23,name:"Manchitas Ágil"},{id:24,name:"Quesito Veloz"},{id:25,name:"Peluchín Divertido"},{id:26,name:"Gominita Dulzona"},{id:27,name:"Trueno Travieso"},{id:28,name:"Barrigón Juguetón"},{id:29,name:"Tomás Espía"},{id:30,name:"Marisol Saltarina"},{id:31,name:"Erizo Astuto"},{id:32,name:"Chispero Enérgico"},{id:33,name:"Snoopy Parlanchín"},{id:34,name:"Desayuno Feliz"},{id:35,name:"Coco Risueño"},{id:36,name:"Pica Lástima"},{id:37,name:"Pelusón Suave"},{id:38,name:"Aurora Matutina"},{id:39,name:"Jerry Travieso"},{id:40,name:"Tigre Nube"},{id:41,name:"Panda Risueña"},{id:42,name:"Hugo Pensativo"},{id:43,name:"Pompa Burbuja"},{id:44,name:"Sedosa Delicia"},{id:45,name:"Dómini Donut"},{id:46,name:"Brisa Vivaz"},{id:47,name:"Garza Alegre"},{id:48,name:"Félix Narizudo"},{id:49,name:"Peludín Suave"},{id:50,name:"Pinto Manchado"}]}},de:{timer:{remainingTitle:"Zeitlimit:"},popup:{skillsTitle:"Erfahrung",menuItems:["Preise","Quests","Teilnehmer","Einstellungen"],prizes:{buttonTitle:"Preis erhalten",questionsTitle:"Punkte"}},gameMenu:{restart:"Neu starten"},popupBar:{prizesTitle:"Preise",skillsTitle:"Erfahrung"},share:{share:"Teilen",downloadFallback:"Herunterladen"},widget:{skillsTitle:"Erfahrung",accentButtonTitle:"Antwort bestätigen",buttonTitle:"Überspringen"},next:"Weiter",confirmAnswer:"Antwort senden",skip:"Überspringen",preloader:{text:"Das Modell denkt nach"},input:{placeholder:"Geben Sie Text ein…"},testCard:{successTitle:"Test bestanden",failureTitle:"Du hast den Test nicht bestanden",buttonTitle:"Erneut versuchen",worstScoreTemplate:"Sie haben <mark>{points} von {maxPoints}</mark> Punkten erzielt. Ihr bester Wert ist <mark>{bestPoints} von {maxPoints}</mark>.",bestScoreTemplate:"Sie haben <mark>{bestPoints} von {maxPoints}</mark> Punkten erzielt.",prizesTitle:"Preise, die Sie noch erhalten können",questsTitle:"Quests, die Sie noch abschließen können",chooseAnswer:"Wählen Sie alle zutreffenden Antworten aus der Liste aus:"},journeyCard:{successTitle:"Spiel abgeschlossen",failureTitle:"Du hast das Spiel nicht bestanden",buttonTitle:"Nochmals spielen",worstScoreTemplate:"Sie haben <mark>{points} von {maxPoints}</mark> Punkten erzielt. Ihr bester Wert ist <mark>{bestPoints} von {maxPoints}</mark>.",bestScoreTemplate:"Sie haben <mark>{bestPoints} von {maxPoints}</mark> Punkten erzielt.",prizesTitle:"Preise, die Sie noch erhalten können",questsTitle:"Quests, die Sie noch abschließen können",chooseAnswer:"Wählen Sie eine Antwort aus:"},repetitiveTrainer:{successTitle:"Sie haben den Trainer abgeschlossen",failureTitle:"Sie haben den Trainer nicht bestanden",buttonTitle:"Nochmals spielen",worstScoreTemplate:"Sie haben <mark>{points} von {maxPoints}</mark> Punkten erzielt. Ihr bester Wert ist <mark>{bestPoints} von {maxPoints}</mark>.",bestScoreTemplate:"Sie haben <mark>{bestPoints} von {maxPoints}</mark> Punkten erzielt.",prizesTitle:"Preise, die Sie noch erhalten können",questsTitle:"Quests, die Sie noch abschließen können",chooseAnswer:"Wählen Sie eine Antwort aus:",currentScore:"Huidige score"},settings:{signInPopup:{title:"Um Ihren Fortschritt zu speichern und Preise zu erhalten, müssen Sie ein Konto registrieren.",subtitle:"Ihr bisheriger Fortschritt wird darauf übertragen!",buttonTitle:"Schließen",accentButtonTitle:"Registrieren"},logout:"Abmelden"},globalError:{title:"Etwas ist schiefgelaufen 🤔",subtitle:"Während wir herausfinden, wie wir das Problem beheben können, können Sie versuchen, die Quest neu zu laden."},socialsPopup:{title:"Anmelden mit",subTitle:"Demnächst...",telegram:{title:"Telegram"},google:{title:"Google"},yandex:{title:"Yandex"},discord:{title:"Discord"}},footer:{buttonTitle:"Überspringen",accentButtonTitle:"Antwort bestätigen"},header:{title:"Kostenlose Trainingswoche im Tarif „Erich Fromm“",progressText:"Erfahrung",freeAccessBlock:{title:"1",subtitle:"Woche",text:"kostenlos"},button:{link:"/"},image:{url:"/src/assets/header/robert.webp",alt:"Header-Bild"}},prizeList:{title:"Preise"},questList:{title:"Quests",emptyQuestsWarning:"Keine Quests verfügbar"},errors:{gpt:{connectionFail:"Verbindung zu den GPT-Servern fehlgeschlagen. Bitte versuchen Sie es später erneut.",insufficientQuota:"GPT hat keine Token mehr. Bitte wenden Sie sich an die Administratoren von {{domain}}.",rateLimit:"Zu viele Anfragen an GPT. Bitte versuchen Sie es später erneut oder wenden Sie sich an die Administratoren von {{domain}}.",invalidKey:"Der API-Schlüssel ist ungültig. Bitte wenden Sie sich an die Administratoren von {{domain}}.",userTokenLimitExceeded:"Helaas heeft u uw tokens opgebruikt. Probeer het na {{time}} opnieuw"}},user:{defaultName:"Max Mustermann",avatar:{alt:"Profilbild"},ban:{forbiddenQuest:"Diese Quest ist vorübergehend nicht für Sie verfügbar",wait:"Bitte warten"},randomNames:[{id:1,name:"Luna"},{id:2,name:"Bella"},{id:3,name:"Charlie"},{id:4,name:"Max"},{id:5,name:"Mia"},{id:6,name:"Lucy"},{id:7,name:"Leo"},{id:8,name:"Lotte"},{id:9,name:"Lilo"},{id:10,name:"Balu"},{id:11,name:"Molly"},{id:12,name:"Sammy"},{id:13,name:"Flocke"},{id:14,name:"Finja"},{id:15,name:"Frida"},{id:16,name:"Henry"},{id:17,name:"Lenny"},{id:18,name:"Lia"},{id:19,name:"Fiona"},{id:20,name:"Emil"},{id:21,name:"Paula"},{id:22,name:"Oskar"},{id:23,name:"Rico"},{id:24,name:"Nala"},{id:25,name:"Loki"},{id:26,name:"Kira"},{id:27,name:"Benji"},{id:28,name:"Leia"},{id:29,name:"Teddy"},{id:30,name:"Sophie"},{id:31,name:"Arco"},{id:32,name:"Chico"},{id:33,name:"Lilly"},{id:34,name:"Emma"},{id:35,name:"Maja"},{id:36,name:"Nele"},{id:37,name:"Milo"},{id:38,name:"Rosie"},{id:39,name:"Toby"},{id:40,name:"Yuki"},{id:41,name:"Keks"},{id:42,name:"Bruno"},{id:43,name:"Fritz"},{id:44,name:"Gismo"},{id:45,name:"Nicky"},{id:46,name:"Ronja"},{id:47,name:"Trixi"},{id:48,name:"Zoe"},{id:49,name:"Hugo"},{id:50,name:"Pia"}]}},en:{timer:{remainingTitle:"Time limit:"},popup:{skillsTitle:"experience",menuItems:["Prizes","Quests","Participants","Settings"],prizes:{buttonTitle:"Get Prize",questionsTitle:"points"}},gameMenu:{restart:"Start over"},share:{share:"Share",downloadFallback:"Download"},popupBar:{prizesTitle:"prizes",skillsTitle:"exp"},widget:{skillsTitle:"experience",accentButtonTitle:"Confirm Answer",buttonTitle:"Skip"},next:"Next",confirmAnswer:"Submit answer",skip:"Skip",preloader:{text:"The model is thinking"},input:{placeholder:"Enter text…"},testCard:{successTitle:"You passed the test",failureTitle:"You did not pass the test",buttonTitle:"Retake",worstScoreTemplate:"You scored <mark>{points} out of {maxPoints}</mark> points. Your best result is <mark>{bestPoints} out of {maxPoints}<mark/>",bestScoreTemplate:"You scored <mark>{bestPoints} out of {maxPoints}</mark> points",prizesTitle:"Prizes you can still earn",questsTitle:"Quests you can still complete",chooseAnswer:"Select all answers that apply from the list:"},journeyCard:{successTitle:"You completed the game",failureTitle:"You did not pass the game",buttonTitle:"Play Again",worstScoreTemplate:"You scored <mark>{points} out of {maxPoints}</mark> points. Your best result is <mark>{bestPoints} out of {maxPoints}<mark/>",bestScoreTemplate:"You scored <mark>{bestPoints} out of {maxPoints}</mark> points",prizesTitle:"Prizes you can still earn",questsTitle:"Quests you can still complete",chooseAnswer:"Select an answer:"},repetitiveTrainer:{successTitle:"You've completed the trainer",failureTitle:"You've failed the trainer",buttonTitle:"Play Again",worstScoreTemplate:"You scored <mark>{points} out of {maxPoints}</mark> points. Your best result is <mark>{bestPoints} out of {maxPoints}<mark/>",bestScoreTemplate:"You scored <mark>{bestPoints} out of {maxPoints}</mark> points",prizesTitle:"Prizes you can still earn",questsTitle:"Quests you can still complete",chooseAnswer:"Select an answer:",currentScore:"Current score"},settings:{signInPopup:{title:"To save your progress and earn prizes, you need to register an account.",subtitle:"Your progress will be transferred to it!",buttonTitle:"Close",accentButtonTitle:"Register"},logout:"Log Out"},globalError:{title:"Something went wrong 🤔",subtitle:"While we figure out how to fix it, you can try refreshing the quest"},socialsPopup:{title:"Sign up with",subTitle:"Coming soon...",telegram:{title:"Telegram"},google:{title:"Google"},yandex:{title:"Yandex"},discord:{title:"Discord"}},footer:{buttonTitle:"Skip",accentButtonTitle:"Confirm Answer"},header:{title:'Free week of training on the "Erich Fromm" plan',progressText:"experience",freeAccessBlock:{title:"1",subtitle:"week",text:"free"},button:{link:"/"},image:{url:"/src/assets/header/robert.webp",alt:"Header image"}},prizeList:{title:"Prizes"},questList:{title:"Quests",emptyQuestsWarning:"There is no quest"},errors:{gpt:{connectionFail:"Failed to connect to GPT servers. Please try again later.",insufficientQuota:"GPT has run out of tokens. Please contact the administrators of {{domain}}.",rateLimit:"Too many requests to GPT. Please try again later or contact the administrators of {{domain}}.",invalidKey:"The API key is invalid. Please contact the administrators of {{domain}}.",userTokenLimitExceeded:"Unfortunately, you have exhausted your tokens. Please try again after {{time}}"}},user:{defaultName:"Guest",avatar:{alt:"Profile picture"},ban:{forbiddenQuest:"This quest is temporarily unavailable to you",wait:"Please wait"},randomNames:[{id:1,name:"Whiskers"},{id:2,name:"Buddy"},{id:3,name:"Grumpy"},{id:4,name:"Oliver"},{id:5,name:"Cleo"},{id:6,name:"Bubbles"},{id:7,name:"Rex"},{id:8,name:"Shadow"},{id:9,name:"Max"},{id:10,name:"Charlie"},{id:11,name:"Nibbles"},{id:12,name:"Daisy"},{id:13,name:"Chip"},{id:14,name:"Jack"},{id:15,name:"Toby"},{id:16,name:"Simba"},{id:17,name:"Ginger"},{id:18,name:"Oscar"},{id:19,name:"Bandit"},{id:20,name:"Pugsley"},{id:21,name:"Spike"},{id:22,name:"Sunny"},{id:23,name:"Cutie"},{id:24,name:"Dash"},{id:25,name:"Snowball"},{id:26,name:"Sparkle"},{id:27,name:"Mischief"},{id:28,name:"Pumpkin"},{id:29,name:"Thomas"},{id:30,name:"Bella"},{id:31,name:"Bandit"},{id:32,name:"Zippy"},{id:33,name:"Snoopy"},{id:34,name:"Chappy"},{id:35,name:"Coco"},{id:36,name:"Pip"},{id:37,name:"Fuzzy"},{id:38,name:"Misty"},{id:39,name:"Jerry"},{id:40,name:"Tigger"},{id:41,name:"Panda"},{id:42,name:"Hugo"},{id:43,name:"Bubbles"},{id:44,name:"Silky"},{id:45,name:"Midnight"},{id:46,name:"Bonnie"},{id:47,name:"Herbie"},{id:48,name:"Fiona"},{id:49,name:"Dusty"},{id:50,name:"Speckles"}]}},ru:{timer:{remainingTitle:"Ограничение времени:"},popup:{skillsTitle:"опыта",menuItems:["Призы","Квесты","Участники","Настройки"],prizes:{buttonTitle:"Получить приз",questionsTitle:"баллов"}},gameMenu:{restart:"Начать заново"},share:{share:"Поделиться",downloadFallback:"Скачать"},popupBar:{prizesTitle:"призов",skillsTitle:"опыта"},widget:{skillsTitle:"опыта",accentButtonTitle:"Подтвердить ответ",buttonTitle:"Пропустить"},next:"Далее",confirmAnswer:"Отправить ответ",skip:"Пропустить",preloader:{text:"ИИ думает"},input:{placeholder:"Введите текст…"},testCard:{successTitle:"Вы прошли тест",failureTitle:"Вы не прошли тест",buttonTitle:"Пройти еще раз",worstScoreTemplate:"Вы набрали <mark>{points} из {maxPoints}</mark> баллов. Ваш лучший результат <mark>{bestPoints} из {maxPoints}</mark>",bestScoreTemplate:"Вы набрали <mark>{bestPoints} из {maxPoints} баллов</mark>",prizesTitle:"Призы, которые еще можно получить",questsTitle:"Квесты, которые можно пройти ещё",chooseAnswer:"Выберите все подходящие ответы из списка:"},journeyCard:{successTitle:"Вы прошли игру",failureTitle:"Вы не прошли игру",buttonTitle:"Пройти еще раз",worstScoreTemplate:"Вы набрали <mark>{points} из {maxPoints}</mark> баллов. Ваш лучший результат <mark>{bestPoints} из {maxPoints}</mark>",bestScoreTemplate:"Вы набрали <mark>{bestPoints} из {maxPoints} баллов</mark>",prizesTitle:"Призы, которые еще можно получить",questsTitle:"Квесты, которые можно пройти ещё",chooseAnswer:"Выберите ответ:"},repetitiveTrainer:{successTitle:"Вы прошли тренажер",failureTitle:"Вы не прошли тренажер",buttonTitle:"Пройти еще раз",worstScoreTemplate:"Вы набрали <mark>{points} из {maxPoints}</mark> баллов. Ваш лучший результат <mark>{bestPoints} из {maxPoints}</mark>",bestScoreTemplate:"Вы набрали <mark>{bestPoints} из {maxPoints} баллов</mark>",prizesTitle:"Призы, которые еще можно получить",questsTitle:"Квесты, которые можно пройти ещё",chooseAnswer:"Выберите ответ:",currentScore:"Текущий счет"},settings:{signInPopup:{title:"Чтобы сохранить прогресс и получить призы, необходимо зарегистрировать аккаунт.",subtitle:"Полученный прогресс перенесется на него!",buttonTitle:"Закрыть",accentButtonTitle:"Зарегистрироваться"},logout:"Выйти"},globalError:{title:"Что-то пошло не так 🤔",subtitle:"Пока мы думаем, как всё починить, можете попробовать обновить квест"},socialsPopup:{title:"Зарегистрироваться с",subTitle:"Скоро...",telegram:{title:"Telegram"},google:{title:"Google"},yandex:{title:"Yandex"},discord:{title:"Discord"}},footer:{buttonTitle:"Пропустить",accentButtonTitle:"Подтвердить ответ"},header:{title:"Бесплатная неделя обучения по тарифу «Эрих Фром»",progressText:"опыта",freeAccessBlock:{title:"1",subtitle:"неделя",text:"бесплатно"},button:{link:"/"},image:{url:"/src/assets/header/robert.webp",alt:"Header image"}},prizeList:{title:"Призы"},questList:{title:"Квесты",emptyQuestsWarning:"Квестов нет"},errors:{gpt:{connectionFail:"Не удалось подключиться к серверам gpt. Попробуйте позже.",insufficientQuota:"У gpt кончились токены. Пожалуйста, обратитесь к администраторам сайта {{domain}}.",rateLimit:"Слишком много запросов к gpt. Попробуйте позже или обратитесь к администраторам сайта {{domain}}.",invalidKey:"Ключ для API не валиден. Пожалуйста, обратитесь к администраторам сайта {{domain}}.",userTokenLimitExceeded:"К сожалению вы исчерпали свои токены. Попробуйте после {{time}}"}},user:{defaultName:"Иван Иванов",avatar:{alt:"Картинка профиля"},ban:{forbiddenQuest:"Этот квест временно не доступен для вас",wait:"Подождите"},randomNames:[{id:1,name:"Барсик Грозный"},{id:2,name:"Пушистый Соловей"},{id:3,name:"Тяпа Угрюмый"},{id:4,name:"Василий Хвостатый"},{id:5,name:"Кеша Коварный"},{id:6,name:"Бублик Шустрый"},{id:7,name:"Шарик Проглот"},{id:8,name:"Мурзик Трепещущий"},{id:9,name:"Жора Ленивый"},{id:10,name:"Капитан Блоха"},{id:11,name:"Лорд Хомяк"},{id:12,name:"Жужа Смешная"},{id:13,name:"Чип Усатый"},{id:14,name:"Джек Обжора"},{id:15,name:"Тихон Пыхтящий"},{id:16,name:"Мяу Царь"},{id:17,name:"Рыжик Пушистик"},{id:18,name:"Борис Фырчащий"},{id:19,name:"Зорро Хитрый"},{id:20,name:"Мопсик Храпун"},{id:21,name:"Хрюша Громкий"},{id:22,name:"Гаврюша Радостный"},{id:23,name:"Котлетка Ловкая"},{id:24,name:"Сырник Бегущий"},{id:25,name:"Умка Забавный"},{id:26,name:"Бусинка Мимимишная"},{id:27,name:"Крош Шалун"},{id:28,name:"Пузик Забавный"},{id:29,name:"Томас Шпионистый"},{id:30,name:"Маруся Скачущая"},{id:31,name:"Ёжик Хитрый"},{id:32,name:"Клёпа Задорный"},{id:33,name:"Снупи Болтун"},{id:34,name:"Чапа Завтрак"},{id:35,name:"Кокос Хохотун"},{id:36,name:"Лапка Ласточка"},{id:37,name:"Фунтик Плюшевый"},{id:38,name:"Мурка Утренняя"},{id:39,name:"Джерри Нахальный"},{id:40,name:"Тигрик Зефирный"},{id:41,name:"Панда Забавная"},{id:42,name:"Хома Задумчивый"},{id:43,name:"Рыбка Пузырь"},{id:44,name:"Ласка Шелковая"},{id:45,name:"Мурзик Пончик"},{id:46,name:"Бонька Резвый"},{id:47,name:"Цапля Весёлая"},{id:48,name:"Филя Носатый"},{id:49,name:"Тузик Мохнатый"},{id:50,name:"Зяблик Пятнистый"}]}}},kl=Object.keys(Tl)[0],$e=It(e=>({translations:Tl[kl],localeName:kl,setLocale:t=>{let n=Tl[t];n||(n=Tl[kl],t=kl),e(()=>({translations:n,localeName:t}))}})),P3=(e,t)=>t.split(".").reduce((n,s)=>n&&n[s],e),O3=(e,t)=>{const n=$e.getState().translations,s=P3(n,e),i=/{{(\w+)}}/g;return s.replace(i,(l,c)=>t[c]||"")},N3=async e=>{const{data:t}=await lt.post("/certificate",{userPrizeId:e},{responseType:"blob"});return t},M3={plain:"Plain",certificate:"Certificate"},nn=It((e,t)=>({prize:null,certificate:{url:"",file:null},richTextBlocks:[],isRegistrationModalOpen:!1,isRichTextModalOpen:!1,isCertificateModalOpen:!1,openModalForRegistration(n){e({prize:n,isRegistrationModalOpen:!0})},openModalForRichText(n){e({richTextBlocks:n,isRichTextModalOpen:!0})},opemCertificateModal(n){e({certificate:n,isCertificateModalOpen:!0})},closeModalForRegistration(){e({prize:null,isRegistrationModalOpen:!1})},closeModalForRichText(){e({prize:null,isRichTextModalOpen:!1})},closeCertificateModal(){e({certificate:{url:"",file:null},isCertificateModalOpen:!1})}})),L3=()=>{const e=nn(s=>s.openModalForRegistration),t=nn(s=>s.openModalForRichText),n=nn(s=>s.opemCertificateModal);return b.useMemo(()=>{const s={handleWantForPrize:i=>{if(!localStorage.getItem(dn.accessToken)){s.askForRegistration(i);return}return s.openPrize(i)},askForRegistration(i){e(i)},openPrize(i){if(i.type===M3.plain){s.showAwardRichText(i);return}return s.openCertificate(i)},async openCertificate(i){const l=await N3(i.id);n({url:URL.createObjectURL(l),file:s.constractFile(i.id,l)})},constractFile(i,l){const c=l.type||"image/webp",d=c.split("/")[1];return new File([l],`certificate-${i}.${d}`,{type:c})},showFullDescription(i){t(i.descriptionRichText.blocks)},showAwardRichText(i){t(i.awardRichText.blocks)}};return s},[e,t,n])},qd=({prizeData:e,userPoints:t,index:n})=>{const s=$e(c=>c.translations.popup.prizes),{handleWantForPrize:i,showFullDescription:l}=L3();return g.jsxs(r3,{children:[g.jsxs(e0,{children:[g.jsx(t0,{children:g.jsx(l0,{iconId:e==null?void 0:e.iconId})}),g.jsx(n0,{children:e==null?void 0:e.name})]}),g.jsxs(s3,{children:[e!=null&&e.isReceived?g.jsx(mn,{"data-testid":`edmap-widget__prize-btn-${n+1}`,title:s.buttonTitle,isAccent:!0,style:{minWidth:"159px"},onClick:()=>i(e)}):g.jsx(g.Fragment,{children:g.jsxs(i3,{children:[g.jsx(ws,{text:s.questionsTitle,progressValue:t,overallValue:e==null?void 0:e.awardPoints}),g.jsx(xl,{progressValue:t,overallValue:e==null?void 0:e.awardPoints})]})}),g.jsx(o3,{children:g.jsx(i0,{icon:g.jsx(a3,{}),onClick:()=>l(e)})})]})]})},j3=N("div")({name:"GiftsContainer",class:"edg1do84z2",propsAsIs:!1}),D3=()=>{var t;const e=Ct(n=>n.results);return g.jsx(j3,{children:(t=e==null?void 0:e.prizes)==null?void 0:t.map((n,s)=>g.jsx(qd,{index:s,prizeData:n,userPoints:e==null?void 0:e.allPoints},n==null?void 0:n.id))})},F3=N("div")({name:"UserInfoWrapper",class:"eduxnm4b4",propsAsIs:!1}),$3=N("div")({name:"ImageWrapper",class:"edi1fh8glv",propsAsIs:!1}),B3=N("div")({name:"InfoWrapper",class:"edi1e8ga1u",propsAsIs:!1}),z3=N("div")({name:"MainInfo",class:"edm1qs3iet",propsAsIs:!1}),U3=N("div")({name:"TitleWrapper",class:"edtbtnkwj",propsAsIs:!1}),H3=N("div")({name:"PoweredContainer",class:"edp1rvtj15",propsAsIs:!1}),W3=N("div")({name:"ProgressTextWrapper",class:"edpseoz31",propsAsIs:!1}),q3=N("h3")({name:"Title",class:"edt1jzrydq",propsAsIs:!1}),V3=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:22,height:26,fill:"none",...e},b.createElement("path",{fill:"#C3C3C3",stroke:"#363636",strokeWidth:2,d:"m20.66 18.577-.5.29-8.66 5-.5.287-.5-.288-8.66-5-.5-.289V7.423l.5-.29 8.66-5 .5-.287.5.288 8.66 5 .5.289z"})),G3=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:22,height:24,fill:"none",...e},b.createElement("path",{fill:"#FCBC21",stroke:"#ED7527",strokeWidth:2,d:"M9 2a4 4 0 0 1 4 0l5.66 3.268c1.238.714 2 2.035 2 3.464v6.536c0 1.429-.762 2.75-2 3.464L13 22a4 4 0 0 1-4 0l-5.66-3.268a4 4 0 0 1-2-3.464V8.732c0-1.429.762-2.75 2-3.464z"})),Vd=({level:e})=>g.jsxs(K3,{children:[g.jsx(Y3,{children:g.jsx(V3,{})}),g.jsx(Q3,{children:g.jsx(G3,{})}),g.jsx("span",{children:e})]}),Q3=Z("div")({name:"SmoothContainer",class:"edsvd1acj",propsAsIs:!1}),Y3=Z("div")({name:"RoughContainer",class:"edr1a0zzy8",propsAsIs:!1}),K3=Z("div")({name:"Container",class:"edc1fcmc7w",propsAsIs:!1}),X3=[...new Intl.Segmenter("en",{granularity:"grapheme"}).segment("🦄🐺🪼🐝🦅🐋")].map(e=>e.segment),J3=e=>[...e].map(t=>t.codePointAt(0)).join("-"),Il=Object.fromEntries(X3.map(e=>[J3(e),e])),Z3=()=>{const e=localStorage.getItem(dn.profileEmoji);if(e&&Il[e])return Il[e];const t=eO();return localStorage.setItem(dn.profileEmoji,t),Il[t]},eO=()=>{const e=Object.keys(Il),t=tO(e.length);return e[t]},tO=e=>Math.floor(Math.random()*e),c0=N("div")({name:"Container",class:"edci91fsv",propsAsIs:!1}),Gd=({src:e,...t})=>{const n=$e(i=>i.translations.user.avatar.alt);if(e)return g.jsx(c0,{children:g.jsx("img",{...t,src:e,alt:n})});const s=Z3();return g.jsx(c0,{children:s})},Qd=e=>e?e<10?1:Math.floor(e/10):1,nO=N("a")({name:"Container",class:"edc1ryazt0",propsAsIs:!1}),rO=N("span")({name:"Text",class:"edtk7p3bu",propsAsIs:!1}),sO=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:85,height:12,fill:"none",...e},b.createElement("path",{fill:"currentColor",d:"M4.992 0h10.144q1.04 0 1.936.4a4.9 4.9 0 0 1 1.584 1.056q.688.672 1.072 1.584.4.896.4 1.936v1.6H2.8q0 .511.176.96.192.432.496.768.32.32.752.512t.928.192h9.808q.336 0 .592-.064.255-.08.448-.192.208-.112.368-.256t.304-.32h3.264a5 5 0 0 1-.688 1.456 5.008 5.008 0 0 1-2.48 1.904 4.9 4.9 0 0 1-1.632.272H4.992a5 5 0 0 1-1.952-.384 5.1 5.1 0 0 1-1.584-1.072A5.1 5.1 0 0 1 .384 8.768 4.9 4.9 0 0 1 0 6.832V4.976q0-1.04.384-1.936a5.1 5.1 0 0 1 1.072-1.584Q2.128.784 3.04.4A4.8 4.8 0 0 1 4.992 0m.16 2.8q-.495 0-.928.192a2.3 2.3 0 0 0-.752.528q-.304.32-.496.768a2.5 2.5 0 0 0-.176.944h14.528a2.5 2.5 0 0 0-.176-.944 2.2 2.2 0 0 0-.496-.768 2.298 2.298 0 0 0-1.696-.72zM20.938.304H36.09q1.04 0 1.935.4A4.9 4.9 0 0 1 39.61 1.76q.672.672 1.056 1.584.4.896.4 1.936v1.248q0 1.024-.4 1.936a4.9 4.9 0 0 1-1.056 1.584 5.1 5.1 0 0 1-1.584 1.072 4.9 4.9 0 0 1-1.935.384H20.937zm2.8 2.8v5.6H36.09q.431 0 .831-.16.4-.176.688-.464.305-.304.48-.688.177-.4.177-.832V5.248q-.001-.432-.176-.816a2.1 2.1 0 0 0-.48-.688 1.9 1.9 0 0 0-.688-.464 2.05 2.05 0 0 0-.832-.176zM41.078 11.504l3.184-11.2h3.488l3.392 8.144L54.55.304h3.488l3.168 11.2h-3.04l-2.704-8.656-3.776 8.656h-1.088l-3.776-9.248-2.704 9.248zM65.037.304h5.471l2.225 11.2h-2.8l-.945-4.928h-2.431l-.945 4.928h-2.8zm3.328 2.768H67.18l-.352 2.16h1.888zM81.064.304q.656 0 1.232.256.592.24 1.024.672t.672 1.024q.255.576.256 1.232 0 .656-.256 1.232-.24.56-.672.976t-1.024.656q-.576.224-1.232.224h-3.936v4.928h-2.8V.304zm-.832 2.8h-3.104v2.128h3.104q.56 0 .88-.288.336-.288.336-.784 0-.48-.336-.768-.32-.288-.88-.288"})),u0={en:"en",ru:"ru",de:"de",es:"es",default:"en"},oO=e=>{const t=u0[e];return t||u0.default},d0=()=>{const e=$e(s=>s.localeName),t=oO(e),n=new URLSearchParams;return n.set("utm_source",window.location.hostname),n.set("utm_medium",window.location.href),g.jsxs(nO,{href:`https://edmap.space/${t}?${n}`,target:"_blank",children:[g.jsx(rO,{children:"Powered by"}),g.jsx(sO,{})]})},iO=()=>typeof window<"u"&&window.location.hostname==="edmap.space",aO=()=>{var d,f,m,y,v;const[e,t]=b.useState(""),n=Ct(w=>w.results),s=(d=n==null?void 0:n.User)==null?void 0:d.username,i=$e(w=>w.translations.user.randomNames),l=$e(w=>w.translations.popup),c=iO();return b.useEffect(()=>{const w=_=>{var k;const T=Math.floor(Math.random()*_.length);return(k=_[T])==null?void 0:k.name};(_=>{const T=localStorage.getItem("edmap-access-token"),k=localStorage.getItem(dn.defaultName);if(!k&&!T){const M=w(_);localStorage.setItem(dn.defaultName,M),t(M)}else T?(localStorage.removeItem(dn.defaultName),t(s)):t(k)})(i)},[s,i]),g.jsxs(F3,{children:[g.jsx($3,{children:g.jsx(Gd,{src:(m=(f=n==null?void 0:n.User)==null?void 0:f.avatar)==null?void 0:m.src})}),g.jsxs(B3,{children:[g.jsxs(z3,{children:[g.jsxs(U3,{children:[g.jsx(q3,{children:s??e}),g.jsx(Vd,{level:Qd(n==null?void 0:n.allPoints)})]}),g.jsx(W3,{children:g.jsx(ws,{progressValue:n==null?void 0:n.allPoints,overallValue:(y=n==null?void 0:n.map)==null?void 0:y.points,text:l.skillsTitle})}),g.jsx(xl,{progressValue:n==null?void 0:n.allPoints,overallValue:(v=n==null?void 0:n.map)==null?void 0:v.points})]}),!c&&g.jsx(H3,{children:g.jsx(d0,{})})]})]})},lO=N("ul")({name:"Container",class:"edc18eiqam",propsAsIs:!1}),cO=N("li")({name:"Item",class:"edi8drxbn",propsAsIs:!1}),uO=N("a")({name:"ItemLink",class:"edi1ovdisv",propsAsIs:!1}),dO=N("p")({name:"QuestName",class:"edqiwgwie",propsAsIs:!1}),fO=N("div")({name:"IconWrapper",class:"edi5p8aot",propsAsIs:!1}),f0=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",...e},b.createElement("path",{fill:"currentColor",d:"M16 15h-2V3.414L1.707 15.707.293 14.293 12.586 2H1V0h15z"})),Yd=({quests:e})=>g.jsx(lO,{children:e==null?void 0:e.map(t=>{var s;const n=t.questUrlPaths[0].path;return g.jsx(cO,{children:g.jsxs(uO,{href:n,children:[g.jsx(dO,{children:t==null?void 0:t.name}),g.jsxs(fO,{children:[g.jsx(ws,{progressValue:((s=t==null?void 0:t.resultQuestAnswer)==null?void 0:s.points)??0,overallValue:t==null?void 0:t.maxPoints}),g.jsx(f0,{})]})]})},t==null?void 0:t.id)})}),pO=N("div")({name:"Container",class:"edc1cuvton",propsAsIs:!1}),hO=N("div")({name:"Wrapper",class:"edw1bhqzg6",propsAsIs:!1}),rn=It(e=>({isPanelModalOpen:!1,isRegistrationOpen:!1,setIsPanelOpen:t=>e({isPanelModalOpen:t}),setIsRegistrationOpen:t=>e({isRegistrationOpen:t})})),Kd=({setIsRegInfoVisible:e})=>{const t=rn(i=>i.setIsRegistrationOpen),n=$e(i=>i.translations.settings.signInPopup),s=()=>{t(!0)};return g.jsxs(hO,{children:[g.jsxs(Qv,{children:[g.jsx(Yv,{children:n.title}),g.jsx(Kv,{children:n.subtitle})]}),g.jsxs(Xv,{children:[g.jsx(mn,{title:n.buttonTitle,onClick:()=>e(!1)}),g.jsx(mn,{title:n.accentButtonTitle,isAccent:!0,onClick:s})]})]})},p0=async(e=[],t="high")=>{const n=e.map(i=>new Promise(l=>{const c=new Image;c.src=i,c.fetchPriority=t,c.onload=()=>l(),c.onerror=()=>l()}));return await Promise.all(n)},Cl=200,Xd=()=>new Promise(e=>{setTimeout(()=>{e()},Cl)}),h0=e=>{const t=e.current;if(!t)return()=>{};const n=t.getBoundingClientRect().height;return t.style.height=`${n}px`,()=>{setTimeout(()=>{t.style.height="auto";const s=t.getBoundingClientRect().height;t.style.height=`${n}px`,setTimeout(()=>{t.style.height=`${s}px`,setTimeout(()=>{t.style.height="auto"},Cl+25)},25)},25)}},Nr=It((e,t)=>({isHidden:!1,preloader:null,ref:{current:null},setRef:n=>e({ref:n}),preparePreloader:async n=>{const s=t().ref;e({isHidden:!0}),await Xd();const i=h0(s);let l=null;const c=new Promise(d=>{setTimeout(d,600)});e({preloader:{promise:c,resolve:l,text:n.text}}),i(),await Xd(),e({isHidden:!1})},startFadeTransition:async(n=[])=>{const s=t().ref,i=t().preloader;if(i&&await i.preloaderPromise,!s||!s.current){const y=Promise.resolve();return[y,()=>y]}e({isHidden:!0});const l=h0(s),c=Xd(),d=async()=>{await c,l(),e({isHidden:!1,preloader:null})},f=async(y=[])=>{const v=await p0(y);return await d(),v};return await(async(y=[])=>{const[v,w]=await Promise.all([c,f(y)]);return w})(n)}})),m0=(e=0)=>{setTimeout(()=>{const t=document.getElementById("edmap-widget__container");if(!t)return;const n=t.getBoundingClientRect();window.scrollTo({behavior:"smooth",top:n.top+window.scrollY-e})},Cl)},Ie={test:"Test",journey:"Journey",repetitionTrainer:"RepetitionTrainer"},ar=It(e=>({topOffset:0,marginRootTop:0,gapFromOffset:0,breakPoints:null,setGapFromOffset:t=>e({gapFromOffset:t}),setTopOffset:t=>e({topOffset:t}),setMarginRootTop:t=>e({marginRootTop:t}),setBreakPoints:t=>e({breakPoints:t})})),_s={node:"node",inputAnswerNode:"input-answer-node",random:"random",if:"if",present:"present",ai:"ai"},We={journeyDefault:"journey-default",testDefault:"test-default",journeyText:"journey-text",journeyAi:"journey-ai",repetitiveTrainerGptComments:"repetitive-trainer-gpt-comments",repetitiveTrainerQuestion:"repetitive-trainer-question"},mO={[Ie.journey]:"/user-journey-answer",[Ie.test]:"/user-test-answer",[Ie.repetitionTrainer]:"/user-repetition-trainer-answers"},gO={[Ie.journey]:!1,[Ie.test]:!1,[Ie.repetitionTrainer]:(e,t)=>{}},yO=e=>({currentNode:e.node,currentResources:w0(e.currentResources)}),g0={[Ie.journey]:yO,[Ie.test]:e=>e,[Ie.repetitionTrainer]:e=>e},vO=e=>({quest:{currentStep:e.questionIndex+1},zustandState:e}),SO=e=>({quest:{},zustandState:e}),wO=e=>{const{resolvedQuestionCount:t,comments:n,openingRichText:s,...i}=e;let l=null;return n&&(l={blocks:[{type:"paragraph",data:{text:n}}]}),s&&(l=s),{quest:{currentStep:t},zustandState:{...i,richTextToDisplay:l}}},y0={[Ie.journey]:SO,[Ie.test]:vO,[Ie.repetitionTrainer]:wO},_O={[We.journeyDefault]:"/user-journey-answer",[We.journeyText]:"/user-journey-answer/text",[We.journeyAi]:"/user-journey-answer/text",[We.testDefault]:"/user-test-answer",[We.repetitiveTrainerGptComments]:"/user-repetition-trainer-answers/generate-drill",[We.repetitiveTrainerQuestion]:"/user-repetition-trainer-answers/answer"},v0=async(e,t,n)=>({text:t.textAnswer,sessionId:Un(e.id),userId:await tn(),nodeId:t.currentNode.id}),EO=async(e,t,n)=>({id:Kn(13),journeyEdgeId:n.journeyEdgeId,sessionId:Un(e.id),userId:await tn()}),xO=async(e,t,n)=>({sessionId:Un(e.id),questId:e.id,userId:await tn()}),TO=async(e,t,n)=>{var s;return{cachedRepetitionQuestionId:((s=t.currentQuestion)==null?void 0:s.id)||null,answer:t.answer,sessionId:Un(e.id),questId:e.id,userId:await tn()}},kO=async(e,t,n)=>{const s=await tn(),i=Un(e.id);return(t.selectedAnswers.length>0?t.selectedAnswers:[{id:null}]).map(c=>({id:`${Kn(13)}`,answerId:c.answerId,questId:e.id,questionId:t.currentQuestion.id,userId:s,sessionId:i}))},IO={[We.journeyDefault]:EO,[We.testDefault]:kO,[We.journeyText]:v0,[We.journeyAi]:v0,[We.repetitiveTrainerGptComments]:xO,[We.repetitiveTrainerQuestion]:TO},CO=e=>e.currentNode.type===_s.present,bO=e=>e.currentQuestion===null,RO=e=>e.currentQuestion===null&&e.richTextToDisplay===null,AO={[Ie.journey]:CO,[Ie.test]:bO,[Ie.repetitionTrainer]:RO},PO=(e,t)=>AO[e.quest.questType](t),S0=(e,t,n)=>{if(e.questType===Ie.test)return We.testDefault;if(e.questType===Ie.journey)return _s.ai===t.currentNode.type?We.journeyAi:_s.inputAnswerNode===t.currentNode.type?We.journeyText:We.journeyDefault;if(e.questType===Ie.repetitionTrainer)return t.richTextToDisplay?We.repetitiveTrainerGptComments:We.repetitiveTrainerQuestion},OO=async(e,t,n)=>{const s=S0(e,t),i=await IO[s](e,t,n),l=_O[s],{data:c}=await lt.post(l,i);return g0[e.questType](c)},Jd=async e=>{if(!e)return null;const t=Un(e.id),n=`${mO[e.questType]}/${e.id}/${t}`,s=await lt.get(n);return g0[e.questType](s.data)},NO=e=>{const t=e.currentNode;if(!t)return[];const n=ef(t.data.blocks);return[...t.sourceEdges.flatMap(i=>ef(i.richText.blocks)),...n]},MO=e=>{const t=e.currentQuestion;return t?ef(t.text.blocks):[]},Zd={[Ie.journey]:NO,[Ie.test]:MO,[Ie.repetitionTrainer]:()=>{}},LO=async e=>await lt.post("/result-quest-answer/journey",{id:Kn(16),sessionId:Un(e.id),questId:e.id,mapId:e.mapId,userId:await tn()}),jO=async e=>await lt.post("/result-quest-answer/repetitive-trainer",{id:Kn(16),sessionId:Un(e.id),questId:e.id,mapId:e.mapId,userId:await tn()}),w0=e=>e.map(zO),DO=e=>{const t=Number.isInteger(e);return new Intl.NumberFormat(void 0,{minimumFractionDigits:t?0:2,maximumFractionDigits:2}).format(e)},FO=(e,t,n)=>yr.reportEdgeClick(n.journeyEdgeId),$O=(e,t,n)=>yr.reportTestAnswers(t.selectedAnswers),BO={[We.journeyDefault]:FO,[We.journeyText]:()=>{},[We.journeyAi]:()=>{},[We.testDefault]:$O,[We.repetitiveTrainerGptComments]:()=>{},[We.repetitiveTrainerQuestion]:()=>{}},zO=e=>({...e,value:DO(e.value)}),ef=e=>e.filter(n=>n.type==="image").map(n=>{var s,i;return(i=(s=n.data)==null?void 0:s.file)==null?void 0:i.url}),UO=async(e,t)=>{const n=`/journey-node/${e}/resources`;try{const{data:s}=await lt.get(n,{signal:t});return s}catch{return{imageUrls:[]}}},lr=It(e=>({currentNode:{data:{blocks:[]},sourceEdges:[]},currentResources:[],textAnswer:"",setTextAnswer:t=>e({textAnswer:t}),setCurrentNode:(t,n)=>{e({currentNode:t,currentResources:w0(n)})},initialize:async t=>{if(!t)return;const{node:n,currentResources:s}=await Jd(t);e(()=>({currentNode:n,currentResources:s}))},restart:(t,n)=>{e({currentNode:t,currentResources:n})}})),bl=It(e=>({currentQuestion:null,selectedAnswers:[],setQuestion:t=>e({currentQuestion:t}),addAnswer:async(t,n,s)=>{const i={id:`${Kn(13)}`,answerId:n,questionId:s,questId:t,userId:await tn(),sessionId:Un(t)};e(l=>({selectedAnswers:[...l.selectedAnswers,i]}))},initialize:async t=>{if(!t)return;const{node:n,currentResources:s}=await Jd(t);e(()=>({currentNode:n,resources:s}))},removeAnswer:t=>e(n=>({selectedAnswers:n.selectedAnswers.filter(s=>s.answerId!==t)})),resetAnswers:()=>e({selectedAnswers:[]}),resetTest:()=>e({selectedAnswers:[]})})),mo=It(e=>({richTextToDisplay:null,isInitialized:!1,cachedRepetitionQuestionId:null,currentQuestion:null,answer:null,rightAnswerCount:0,pointsPerDril:0,points:0,setTextAnswer:t=>e({answer:t}),restart:()=>{}})),tf={[Ie.test]:bl,[Ie.journey]:lr,[Ie.repetitionTrainer]:mo},nf=()=>{const e=xe(n=>n.quest),t=tf[e.questType];return b.useMemo(()=>({quest:e,currentZustandHook:t}))},HO=()=>{const e=$e(t=>t.translations.preloader.text);return b.useMemo(()=>({[We.journeyAi]:{text:e},[We.repetitiveTrainerGptComments]:{text:e},[We.repetitiveTrainerQuestion]:{text:e}}),[e])},go=()=>{const{quest:e,currentZustandHook:t}=nf(),n=xe(f=>f.setIsFinished),s=Nr(f=>f.startFadeTransition),i=Nr(f=>f.preparePreloader),l=HO();let c=!1;const d=ar(f=>f.marginRootTop);return b.useMemo(()=>{const f=tf[e.questType],m={fetchPreviousProgress:async y=>{const v=await Jd(y),w=y0[y.questType](v);await s(Zd[y.questType](w.zustandState)),xe.setState(w.quest),tf[y.questType].setState(w.zustandState)},createBeggining:async()=>{const y=gO[e.questType];y&&y(e,f)},makeStep:async y=>{if(c)return;c=!0;const v=f.getState(),w=S0(e,v),E=l[w];E&&await i(E);const _=await OO(e,v,y);BO[w](e,v,y);const T=y0[e.questType](_),k=Nr.getState().preloader;k&&await k.promise,E||await s(Zd[e.questType](T.zustandState)),xe.setState(T.quest),f.setState(T.zustandState),E&&await s(Zd[e.questType](T.zustandState));const M=PO(xe.getState(),T.zustandState);n(M),m0(d),c=!1},cleanQuestInit:async y=>{await m.fetchPreviousProgress(y),n(!1)},restartQuest:async()=>{Dv(e.id),m.cleanQuestInit(e),m0(d)}};return m},[e,t,d])},WO=()=>{const{restartQuest:e}=go(),t=Ct(i=>i.refreshUserResults),n=$e(i=>i.translations.settings),s=async()=>{var i;await ph(),t((i=window.__widgetEdmap)==null?void 0:i.mapId),e()};return g.jsx(mn,{onClick:s,title:n.logout,isAccent:!0})},qO=()=>{const e=localStorage.getItem(dn.accessToken),[t,n]=b.useState(!0);return g.jsx(pO,{children:e&&g.jsx(Xv,{children:g.jsx(WO,{})})||t&&g.jsx(Kd,{setIsRegInfoVisible:n})})},VO=N("div")({name:"PoweredContainer",class:"edp153jgy2",propsAsIs:!1}),GO=N("div")({name:"ProgressTextContainer",class:"edp88qvra",propsAsIs:!1}),QO=N("div")({name:"StepContainer",class:"eds3v2lpt",propsAsIs:!1}),_0=N("div")({name:"ButtonWrapper",class:"edb1h6cmje",propsAsIs:!1}),YO=N("div")({name:"Container",class:"edc1g9vmxh",propsAsIs:!1}),KO=N("div")({name:"Background",class:"edb1dvqizg",propsAsIs:!1}),XO=N("div")({name:"Container",class:"edc24c84i",propsAsIs:!1}),JO=N("div")({name:"InfoBlock",class:"edic7ywtw",propsAsIs:!1}),ZO=N("p")({name:"InfoBlockTitle",class:"ediy16h9m",propsAsIs:!1}),eN=N("p")({name:"InfoBlockSubtitle",class:"edi1m54nr",propsAsIs:!1}),tN=N(_0)({name:"CustomButtonWrapper",class:"edc10pc0jd",propsAsIs:!0}),nN=N("div")({name:"Container",class:"edc1mwrga6",propsAsIs:!1}),E0=N("h3")({name:"Title",class:"edt1l3a9ma",propsAsIs:!1}),rN=N("div")({name:"UnavailableButtons",class:"edutbpur",propsAsIs:!1}),sN=N("div")({name:"CloseButton",class:"edcnx305o",propsAsIs:!1}),oN=({icon:e,title:t,...n})=>g.jsxs(iN,{...n,children:[e,g.jsx(aN,{children:t})]}),iN=Z(El)({name:"CustomButton",class:"edc1yr71r",propsAsIs:!0}),aN=Z("p")({name:"Title",class:"edtsdg8a8",propsAsIs:!1}),x0=e=>g.jsx(oN,{"data-testid":`edmap-widget__social-${e.name}-btn`,title:e.title,icon:e.icon,disabled:e.disabled,onMouseDown:e.onClick},e.name),lN=(e,t)=>{var n;return{...e,title:(n=t[e.name])==null?void 0:n.title}},cN=(e,t)=>({...e,disabled:t}),uN=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",viewBox:"0 0 333334 333334",...e},b.createElement("path",{d:"M166667 0c92048 0 166667 74619 166667 166667s-74619 166667-166667 166667S0 258715 0 166667 74619 0 166667 0m80219 91205-29735 149919s-4158 10396-15594 5404l-68410-53854s76104-68409 79222-71320c3119-2911 2079-3534 2079-3534 207-3535-5614 0-5614 0l-100846 64043-42002-14140s-6446-2288-7069-7277c-624-4992 7277-7694 7277-7694l166970-65498s13722-6030 13722 3951m-87637 122889-27141 24745s-2122 1609-4443 601l5197-45965z"})),dN=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2,clipRule:"evenodd",viewBox:"0 0 512 512",...e},b.createElement("path",{d:"M32.582 370.734C15.127 336.291 5.12 297.425 5.12 256c0-41.426 10.007-80.291 27.462-114.735C74.705 57.484 161.047 0 261.12 0c69.12 0 126.836 25.367 171.287 66.793l-73.31 73.309c-26.763-25.135-60.276-38.168-97.977-38.168-66.56 0-123.113 44.917-143.36 105.426-5.12 15.36-8.146 31.65-8.146 48.64 0 16.989 3.026 33.28 8.146 48.64l-.303.232h.303c20.247 60.51 76.8 105.426 143.36 105.426 34.443 0 63.534-9.31 86.341-24.67 27.23-18.152 45.382-45.148 51.433-77.032H261.12v-99.142h241.105c3.025 16.757 4.654 34.211 4.654 52.364 0 77.963-27.927 143.592-76.334 188.276-42.356 39.098-100.305 61.905-169.425 61.905-100.073 0-186.415-57.483-228.538-141.032z"})),fN=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 512 512",...e},b.createElement("path",{fill:"currentColor",d:"M281.1 315.8 193.7 512H130l96-209.8c-45.1-22.9-75.2-64.4-75.2-141.1C150.7 53.7 218.8 0 299.7 0H382v512h-55.1V315.8zm45.8-269.3h-29.4c-44.4 0-87.4 29.4-87.4 114.6 0 82.3 39.4 108.8 87.4 108.8h29.4z"})),pN=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 50 50",...e},b.createElement("path",{d:"M41.625 10.77c-3.98-3.204-10.277-3.747-10.547-3.766a.99.99 0 0 0-.988.586 7 7 0 0 0-.305.832c2.633.445 5.867 1.34 8.793 3.156a1 1 0 1 1-1.055 1.7C32.493 10.155 26.211 10 25 10c-1.21 0-7.496.156-12.523 3.277a1 1 0 0 1-1.055-1.7c2.926-1.811 6.16-2.71 8.793-3.151-.152-.496-.29-.809-.3-.836a.99.99 0 0 0-.993-.586c-.27.02-6.567.562-10.602 3.809C6.215 12.762 2 24.153 2 34c0 .176.047.344.133.496 2.906 5.11 10.84 6.445 12.648 6.504h.031a1 1 0 0 0 .81-.41l1.827-2.516c-4.933-1.273-7.453-3.437-7.597-3.566a1 1 0 0 1 1.324-1.5C11.234 33.063 15.875 37 25 37c9.14 0 13.781-3.953 13.828-3.992a1 1 0 0 1 1.41.094.996.996 0 0 1-.09 1.406c-.144.129-2.664 2.293-7.597 3.566l1.828 2.516a1 1 0 0 0 .809.41h.03c1.81-.059 9.743-1.395 12.65-6.504.085-.152.132-.32.132-.496 0-9.848-4.215-21.238-6.375-23.23M18.5 30c-1.934 0-3.5-1.79-3.5-4s1.566-4 3.5-4 3.5 1.79 3.5 4-1.566 4-3.5 4m13 0c-1.934 0-3.5-1.79-3.5-4s1.566-4 3.5-4 3.5 1.79 3.5 4-1.566 4-3.5 4"})),hN=()=>{const e=$e(t=>t.localeName);return b.useMemo(()=>[{name:"telegram",icon:g.jsx(uN,{}),onClick:mP},{name:"google",icon:g.jsx(dN,{}),onClick:gP},{name:"yandex",icon:g.jsx(fN,{}),onClick:yP},{name:"discord",icon:g.jsx(pN,{}),onClick:console.log}].filter(t=>!(e==="ru"&&t.name==="discord")),[e])},mN=({closeModal:e})=>{var m;const t=$e(y=>y.translations.socialsPopup),n=Ct(y=>y.results),s=hN(),i=(m=n==null?void 0:n.map)==null?void 0:m.registration,c=s.map(y=>lN(y,t)).map(y=>cN(y,!i[y.name])),d=c.filter(y=>!y.disabled),f=c.filter(y=>y.disabled);return g.jsxs(nN,{"data-testid":"edmap-widget__social-popup",children:[d.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(sN,{onClick:e,children:"✕"}),g.jsx(E0,{children:t.title}),d.map(x0)]}),f.length>0&&g.jsxs(rN,{children:[g.jsx(E0,{children:t.subTitle}),f.map(x0)]})]})},T0=({isOpen:e,closeModal:t,isSocialModalVisible:n,setIsSocialModalVisible:s})=>{const i=b.useRef(null),l=$e(y=>y.translations.signInPopup),[c,d]=b.useState(!1),f=y=>{i.current&&!i.current.contains(y.target)&&(t(),s(!1),d(!1))},m=()=>{s(!1),d(!1),t()};if(b.useEffect(()=>(d(!1),e?document.addEventListener("mousedown",f):document.removeEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}),[e]),!!e)return g.jsx(KO,{children:g.jsx(XO,{ref:i,children:c||n?g.jsx(mN,{closeModal:m}):g.jsxs("div",{"data-testid":"edmap-widget__signin-popup",children:[g.jsxs(JO,{children:[g.jsx(ZO,{children:l.title}),g.jsx(eN,{children:l.subtitle})]}),g.jsxs(tN,{children:[g.jsx(mn,{title:l.buttonTitle,onClick:t}),g.jsx(mn,{"data-testid":"edmap-widget__signin-popup-btn",title:l.accentButtonTitle,isAccent:!0,onClick:()=>d(!0)})]})]})})})},gN=N("div")({name:"Background",class:"edbwx2goj",propsAsIs:!1}),yN=N("div")({name:"Container",class:"edcc2hi8c",propsAsIs:!1}),vN=N("div")({name:"CloseButton",class:"edc1td8pnr",propsAsIs:!1}),yo=Z("p")({name:"FittableText",class:"edf16hcfkz",propsAsIs:!1}),SN=Z(yo)({name:"QuestionParagraph",class:"edqbe2o7o",propsAsIs:!0}),wN=Z(yo)({name:"AnswerParagraph",class:"eda1u10kac",propsAsIs:!0}),_N=Z(yo)({name:"JourneyWidgetText",class:"edj1c2nqbc",propsAsIs:!0}),k0=Z(yo)({name:"EdgeText",class:"edew0t9wk",propsAsIs:!0}),EN=Z(k0)({name:"NodeDescription",class:"edn13pdjrz",propsAsIs:!0}),xN=Z(yo)({name:"PrizeInfoParagraph",class:"edp1ot2zjf",propsAsIs:!0}),TN=Z(yo)({name:"PrizeDescParagraph",class:"edp120urih",propsAsIs:!0}),kN=Z("div")({name:"RichTextWrap",class:"edr4pnqsv",propsAsIs:!1}),IN=Z("table")({name:"StyledTable",class:"edsnwt7pg",propsAsIs:!1}),CN=Z("div")({name:"Border",class:"edb1uwnm14",propsAsIs:!1}),bN=Z("img")({name:"StyledImage",class:"eds4xz4ib",propsAsIs:!1}),RN=Z("div")({name:"CenteringBlock",class:"edc1nwul5g",propsAsIs:!1}),AN=Z("img")({name:"NodeDescriptionImage",class:"ednk9d4jz",propsAsIs:!1}),PN=Z("span")({name:"ImageCaption",class:"ediz6of6y",propsAsIs:!1}),ON=Z("h1")({name:"Heading1",class:"edh1mrpu6g",propsAsIs:!1}),NN=Z("h2")({name:"Heading2",class:"edh4lzuk3",propsAsIs:!1}),MN=Z("h3")({name:"Heading3",class:"edhpo5zbv",propsAsIs:!1}),LN=Z("h4")({name:"Heading4",class:"edhm6a0je",propsAsIs:!1}),jN=Z("div")({name:"BlockWrapper",class:"edbaa4gm3",propsAsIs:!1}),DN=Z("div")({name:"Container",class:"edc1gv2nxr",propsAsIs:!1}),FN=Z("div")({name:"Header",class:"edh1ox5ey6",propsAsIs:!1}),$N=Z("div")({name:"CodeBackground",class:"edc1pst60x",propsAsIs:!1}),BN=Z("div")({name:"CodeBlock",class:"edc1m8ekz6",propsAsIs:!1}),zN=Z("pre")({name:"Scrollable",class:"eds1002l4s",propsAsIs:!1}),UN=Z("span")({name:"LangName",class:"edllrx5n5",propsAsIs:!1});function Rl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var HN=typeof global=="object"&&global&&global.Object===Object&&global,WN=typeof self=="object"&&self&&self.Object===Object&&self,I0=HN||WN||Function("return this")(),rf=function(){return I0.Date.now()},qN=/\s/;function VN(e){for(var t=e.length;t--&&qN.test(e.charAt(t)););return t}var GN=/^\s+/;function QN(e){return e&&e.slice(0,VN(e)+1).replace(GN,"")}var Al=I0.Symbol,C0=Object.prototype,YN=C0.hasOwnProperty,KN=C0.toString,_i=Al?Al.toStringTag:void 0;function XN(e){var t=YN.call(e,_i),n=e[_i];try{e[_i]=void 0;var s=!0}catch{}var i=KN.call(e);return s&&(t?e[_i]=n:delete e[_i]),i}var JN=Object.prototype,ZN=JN.toString;function eM(e){return ZN.call(e)}var tM="[object Null]",nM="[object Undefined]",b0=Al?Al.toStringTag:void 0;function rM(e){return e==null?e===void 0?nM:tM:b0&&b0 in Object(e)?XN(e):eM(e)}function sM(e){return e!=null&&typeof e=="object"}var oM="[object Symbol]";function iM(e){return typeof e=="symbol"||sM(e)&&rM(e)==oM}var R0=NaN,aM=/^[-+]0x[0-9a-f]+$/i,lM=/^0b[01]+$/i,cM=/^0o[0-7]+$/i,uM=parseInt;function A0(e){if(typeof e=="number")return e;if(iM(e))return R0;if(Rl(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rl(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=QN(e);var n=lM.test(e);return n||cM.test(e)?uM(e.slice(2),n?2:8):aM.test(e)?R0:+e}var dM="Expected a function",fM=Math.max,pM=Math.min;function Pl(e,t,n){var s,i,l,c,d,f,m=0,y=!1,v=!1,w=!0;if(typeof e!="function")throw new TypeError(dM);t=A0(t)||0,Rl(n)&&(y=!!n.leading,v="maxWait"in n,l=v?fM(A0(n.maxWait)||0,t):l,w="trailing"in n?!!n.trailing:w);function E(j){var D=s,Y=i;return s=i=void 0,m=j,c=e.apply(Y,D),c}function _(j){return m=j,d=setTimeout(M,t),y?E(j):c}function T(j){var D=j-f,Y=j-m,K=t-D;return v?pM(K,l-Y):K}function k(j){var D=j-f,Y=j-m;return f===void 0||D>=t||D<0||v&&Y>=l}function M(){var j=rf();if(k(j))return P(j);d=setTimeout(M,T(j))}function P(j){return d=void 0,w&&s?E(j):(s=i=void 0,c)}function $(){d!==void 0&&clearTimeout(d),m=0,s=f=i=d=void 0}function q(){return d===void 0?c:P(rf())}function W(){var j=rf(),D=k(j);if(s=arguments,i=this,f=j,D){if(d===void 0)return _(f);if(v)return clearTimeout(d),d=setTimeout(M,t),E(f)}return d===void 0&&(d=setTimeout(M,t)),c}return W.cancel=$,W.flush=q,W}var hM="Expected a function";function mM(e,t,n){var s=!0,i=!0;if(typeof e!="function")throw new TypeError(hM);return Rl(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),Pl(e,t,{leading:s,maxWait:t,trailing:i})}var vo=function(){return vo=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},vo.apply(this,arguments)};function P0(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function O0(e){return!e||!e.ownerDocument?document:e.ownerDocument}var N0=function(e){var t={},n=Array.prototype.reduce.call(e,function(s,i){var l=i.name.match(/data-simplebar-(.+)/);if(l){var c=l[1].replace(/\W+(.)/g,function(d,f){return f.toUpperCase()});switch(i.value){case"true":s[c]=!0;break;case"false":s[c]=!1;break;case void 0:s[c]=!0;break;default:s[c]=i.value}}return s},t);return n};function M0(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function L0(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function j0(e){return".".concat(e.split(" ").join("."))}var sf=!!(typeof window<"u"&&window.document&&window.document.createElement),gM=Object.freeze({__proto__:null,addClasses:M0,canUseDOM:sf,classNamesToQuery:j0,getElementDocument:O0,getElementWindow:P0,getOptions:N0,removeClasses:L0}),So=null,D0=null;sf&&window.addEventListener("resize",function(){D0!==window.devicePixelRatio&&(D0=window.devicePixelRatio,So=null)});function F0(){if(So===null){if(typeof document>"u")return So=0,So;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),So=n}return So}var Mr=P0,of=O0,yM=N0,Lr=M0,jr=L0,Vt=j0,Ei=function(){function e(t,n){n===void 0&&(n={});var s=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=Mr(s.el);s.scrollXTicking||(i.requestAnimationFrame(s.scrollX),s.scrollXTicking=!0),s.scrollYTicking||(i.requestAnimationFrame(s.scrollY),s.scrollYTicking=!0),s.isScrolling||(s.isScrolling=!0,Lr(s.el,s.classNames.scrolling)),s.showScrollbar("x"),s.showScrollbar("y"),s.onStopScrolling()},this.scrollX=function(){s.axis.x.isOverflowing&&s.positionScrollbar("x"),s.scrollXTicking=!1},this.scrollY=function(){s.axis.y.isOverflowing&&s.positionScrollbar("y"),s.scrollYTicking=!1},this._onStopScrolling=function(){jr(s.el,s.classNames.scrolling),s.options.autoHide&&(s.hideScrollbar("x"),s.hideScrollbar("y")),s.isScrolling=!1},this.onMouseEnter=function(){s.isMouseEntering||(Lr(s.el,s.classNames.mouseEntered),s.showScrollbar("x"),s.showScrollbar("y"),s.isMouseEntering=!0),s.onMouseEntered()},this._onMouseEntered=function(){jr(s.el,s.classNames.mouseEntered),s.options.autoHide&&(s.hideScrollbar("x"),s.hideScrollbar("y")),s.isMouseEntering=!1},this._onMouseMove=function(i){s.mouseX=i.clientX,s.mouseY=i.clientY,(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseMoveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseMoveForAxis("y")},this.onMouseLeave=function(){s.onMouseMove.cancel(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&s.onMouseLeaveForAxis("x"),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&s.onMouseLeaveForAxis("y"),s.mouseX=-1,s.mouseY=-1},this._onWindowResize=function(){s.scrollbarWidth=s.getScrollbarWidth(),s.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!s.axis.x.track.el||!s.axis.y.track.el||!s.axis.x.scrollbar.el||!s.axis.y.scrollbar.el)){var l,c;s.axis.x.track.rect=s.axis.x.track.el.getBoundingClientRect(),s.axis.y.track.rect=s.axis.y.track.el.getBoundingClientRect(),(s.axis.x.isOverflowing||s.axis.x.forceVisible)&&(l=s.isWithinBounds(s.axis.x.track.rect)),(s.axis.y.isOverflowing||s.axis.y.forceVisible)&&(c=s.isWithinBounds(s.axis.y.track.rect)),(l||c)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(l&&(s.axis.x.scrollbar.rect=s.axis.x.scrollbar.el.getBoundingClientRect(),s.isWithinBounds(s.axis.x.scrollbar.rect)?s.onDragStart(i,"x"):s.onTrackClick(i,"x")),c&&(s.axis.y.scrollbar.rect=s.axis.y.scrollbar.el.getBoundingClientRect(),s.isWithinBounds(s.axis.y.scrollbar.rect)?s.onDragStart(i,"y"):s.onTrackClick(i,"y"))))}},this.drag=function(i){var l,c,d,f,m,y,v,w,E,_,T;if(!(!s.draggedAxis||!s.contentWrapperEl)){var k,M=s.axis[s.draggedAxis].track,P=(c=(l=M.rect)===null||l===void 0?void 0:l[s.axis[s.draggedAxis].sizeAttr])!==null&&c!==void 0?c:0,$=s.axis[s.draggedAxis].scrollbar,q=(f=(d=s.contentWrapperEl)===null||d===void 0?void 0:d[s.axis[s.draggedAxis].scrollSizeAttr])!==null&&f!==void 0?f:0,W=parseInt((y=(m=s.elStyles)===null||m===void 0?void 0:m[s.axis[s.draggedAxis].sizeAttr])!==null&&y!==void 0?y:"0px",10);i.preventDefault(),i.stopPropagation(),s.draggedAxis==="y"?k=i.pageY:k=i.pageX;var j=k-((w=(v=M.rect)===null||v===void 0?void 0:v[s.axis[s.draggedAxis].offsetAttr])!==null&&w!==void 0?w:0)-s.axis[s.draggedAxis].dragOffset;j=s.draggedAxis==="x"&&s.isRtl?((_=(E=M.rect)===null||E===void 0?void 0:E[s.axis[s.draggedAxis].sizeAttr])!==null&&_!==void 0?_:0)-$.size-j:j;var D=j/(P-$.size),Y=D*(q-W);s.draggedAxis==="x"&&s.isRtl&&(Y=!((T=e.getRtlHelpers())===null||T===void 0)&&T.isScrollingToNegative?-Y:Y),s.contentWrapperEl[s.axis[s.draggedAxis].scrollOffsetAttr]=Y}},this.onEndDrag=function(i){s.isDragging=!1;var l=of(s.el),c=Mr(s.el);i.preventDefault(),i.stopPropagation(),jr(s.el,s.classNames.dragging),s.onStopScrolling(),l.removeEventListener("mousemove",s.drag,!0),l.removeEventListener("mouseup",s.onEndDrag,!0),s.removePreventClickId=c.setTimeout(function(){l.removeEventListener("click",s.preventClick,!0),l.removeEventListener("dblclick",s.preventClick,!0),s.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=t,this.options=vo(vo({},e.defaultOptions),n),this.classNames=vo(vo({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=mM(this._onMouseMove,64),this.onWindowResize=Pl(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Pl(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Pl(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,s=n==null?void 0:n.firstElementChild;if(!s)return null;document.body.appendChild(n),n.scrollLeft=0;var i=e.getOffset(n),l=e.getOffset(s);n.scrollLeft=-999;var c=e.getOffset(s);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:i.left!==l.left,isScrollingToNegative:l.left!==c.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:F0()}catch{return F0()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),s=of(t),i=Mr(t);return{top:n.top+(i.pageYOffset||s.documentElement.scrollTop),left:n.left+(i.pageXOffset||s.documentElement.scrollLeft)}},e.prototype.init=function(){sf&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(Vt(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Vt(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Vt(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Vt(this.classNames.offset)),this.maskEl=this.el.querySelector(Vt(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Vt(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Vt(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Vt(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Vt(this.classNames.track)).concat(Vt(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Vt(this.classNames.track)).concat(Vt(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Vt(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Vt(this.classNames.scrollbar)))||null,this.options.autoHide||(Lr(this.axis.x.scrollbar.el,this.classNames.visible),Lr(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,s=Mr(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),s.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,l=s.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){i&&s.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),s.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new s.MutationObserver(function(){s.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=Mr(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,s=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||n>0,l=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var f=this.contentEl.scrollHeight,m=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=s?"auto":"100%",this.placeholderEl.style.width=i?"".concat(n||m,"px"):"auto",this.placeholderEl.style.height="".concat(f,"px");var y=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&m>n,this.axis.y.isOverflowing=f>y,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,w=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&m>l-w,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&f>y-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,s;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[t].scrollSizeAttr],l=(s=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&s!==void 0?s:0,c=l/i,d;return d=Math.max(~~(c*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(d=Math.min(d,this.options.scrollbarMaxSize)),d},e.prototype.positionScrollbar=function(t){var n,s,i;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var c=this.contentWrapperEl[this.axis[t].scrollSizeAttr],d=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,f=parseInt(this.elStyles[this.axis[t].sizeAttr],10),m=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];m=t==="x"&&this.isRtl&&(!((s=e.getRtlHelpers())===null||s===void 0)&&s.isScrollOriginAtZero)?-m:m,t==="x"&&this.isRtl&&(m=!((i=e.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?m:-m);var y=m/(c-f),v=~~((d-l.size)*y);v=t==="x"&&this.isRtl?-v+(d-l.size):v,l.el.style.transform=t==="x"?"translate3d(".concat(v,"px, 0, 0)"):"translate3d(0, ".concat(v,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,s=this.axis[t].scrollbar.el;!n||!s||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?s.style.display="block":s.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Lr(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(jr(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),Lr(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Lr(n.scrollbar.el,this.classNames.hover):jr(n.scrollbar.el,this.classNames.hover)):(jr(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),jr(this.axis[t].track.el,this.classNames.hover),jr(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var s;n===void 0&&(n="y"),this.isDragging=!0;var i=of(this.el),l=Mr(this.el),c=this.axis[n].scrollbar,d=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=d-(((s=c.rect)===null||s===void 0?void 0:s[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Lr(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var s=this,i,l,c,d;n===void 0&&(n="y");var f=this.axis[n];if(!(!this.options.clickOnTrack||!f.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var m=Mr(this.el);this.axis[n].scrollbar.rect=f.scrollbar.el.getBoundingClientRect();var y=this.axis[n].scrollbar,v=(l=(i=y.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])!==null&&l!==void 0?l:0,w=parseInt((d=(c=this.elStyles)===null||c===void 0?void 0:c[this.axis[n].sizeAttr])!==null&&d!==void 0?d:"0px",10),E=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],_=n==="y"?this.mouseY-v:this.mouseX-v,T=_<0?-1:1,k=T===-1?E-w:E+w,M=40,P=function(){s.contentWrapperEl&&(T===-1?E>k&&(E-=M,s.contentWrapperEl[s.axis[n].scrollOffsetAttr]=E,m.requestAnimationFrame(P)):E<k&&(E+=M,s.contentWrapperEl[s.axis[n].scrollOffsetAttr]=E,m.requestAnimationFrame(P)))};P()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Mr(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var s=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(i){return s.call(i,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=yM,e.helpers=gM,e}(),sn=function(){return sn=Object.assign||function(t){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},sn.apply(this,arguments)};function vM(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]]);return n}var $0=b.forwardRef(function(e,t){var n=e.children,s=e.scrollableNodeProps,i=s===void 0?{}:s,l=vM(e,["children","scrollableNodeProps"]),c=b.useRef(),d=b.useRef(),f=b.useRef(),m={},y={};Object.keys(l).forEach(function(E){Object.prototype.hasOwnProperty.call(Ei.defaultOptions,E)?m[E]=l[E]:y[E]=l[E]});var v=sn(sn({},Ei.defaultOptions.classNames),m.classNames),w=sn(sn({},i),{className:"".concat(v.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:m.tabIndex||Ei.defaultOptions.tabIndex,role:"region","aria-label":m.ariaLabel||Ei.defaultOptions.ariaLabel});return b.useEffect(function(){var E;return d.current=w.ref?w.ref.current:d.current,c.current&&(E=new Ei(c.current,sn(sn(sn({},m),d.current&&{scrollableNode:d.current}),f.current&&{contentNode:f.current})),typeof t=="function"?t(E):t&&(t.current=E)),function(){E==null||E.unMount(),E=null,typeof t=="function"&&t(null)}},[]),b.createElement("div",sn({"data-simplebar":"init",ref:c},y),b.createElement("div",{className:v.wrapper},b.createElement("div",{className:v.heightAutoObserverWrapperEl},b.createElement("div",{className:v.heightAutoObserverEl})),b.createElement("div",{className:v.mask},b.createElement("div",{className:v.offset},typeof n=="function"?n({scrollableNodeRef:d,scrollableNodeProps:sn(sn({},w),{ref:d}),contentNodeRef:f,contentNodeProps:{className:v.contentEl,ref:f}}):b.createElement("div",sn({},w),b.createElement("div",{className:v.contentEl},n)))),b.createElement("div",{className:v.placeholder})),b.createElement("div",{className:"".concat(v.track," ").concat(v.horizontal)},b.createElement("div",{className:v.scrollbar})),b.createElement("div",{className:"".concat(v.track," ").concat(v.vertical)},b.createElement("div",{className:v.scrollbar})))});$0.displayName="SimpleBar";const SM=Z("button")({name:"Container",class:"edc1q8nrja",propsAsIs:!1}),wM=Z("span")({name:"Text",class:"edt1votrxj",propsAsIs:!1}),_M=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",d:"M16 9a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1zm2 10a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3z"}),b.createElement("path",{fill:"currentColor",d:"M19 2a3 3 0 0 1 3 3v10a3 3 0 0 1-2 2.825V5a1 1 0 0 0-1-1H6.174C6.586 2.835 7.694 2 9 2z"})),EM=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",d:"M20.414 7.01 9.88 17.405l-6.293-6.21L4.99 9.771l4.888 4.824 9.132-9.01z"})),xM=({textToCopy:e})=>{const[t,n]=b.useState(!1),s=b.useRef(null),i=()=>{if(clearTimeout(s.current),t){n(!1);return}navigator.clipboard.writeText(e),n(!0),s.current=setTimeout(()=>{n(!1)},2e3)};return g.jsxs(SM,{style:{background:t?"var(--code-block-copied-button-bg)":"var(--code-block-copy-button-bg)"},onClick:i,children:[t?g.jsx(EM,{}):g.jsx(_M,{}),g.jsx(wM,{children:t?"copied":"copy"})]})},TM=({data:e})=>{const{html:t,language:n,code:s}=e,l=s.split(/\r?\n/).length>1,c=l?{width:"100%",maxHeight:"456px"}:{width:"100%",height:"auto"};return g.jsxs(DN,{children:[g.jsxs(FN,{children:[g.jsx(UN,{children:n||"code"}),g.jsx(xM,{textToCopy:s})]}),g.jsx($N,{style:c,children:g.jsx($0,{autoHide:!1,style:c,children:g.jsx(BN,{children:g.jsx(zN,{style:{paddingRight:l?"20px":"10px"},children:g.jsx("div",{dangerouslySetInnerHTML:{__html:t}})})})})})]})},kM=/\[(.*?)\]/g,B0=(e,t)=>e.replace(kM,(n,s)=>t[s]?`${t[s]}`:n),IM=e=>Object.keys(e).reduce((t,n)=>{const s=e[n],i=s.slice(1,s.length-1);return{...t,[i]:`[${n}]`}},{}),z0=e=>b.useMemo(()=>{const t=IM(e);return{convertStringToReplacement:c=>B0(c,e),convertStringToId:c=>B0(c,t),convertIdToReplacement:c=>{const d=e[c];return d||c},convertReplacementToId:c=>{const d=t[c];return d||c}}},[e]),CM={1:ON,2:NN,3:MN,4:LN,5:"h5",6:"h6"},bM=({data:e,isEdgeText:t,replacements:n})=>{const{text:s,level:i}=e,{convertStringToReplacement:l}=z0(n),c=CM[i];return g.jsx(c,{isEdgeText:t,children:l(s)})},RM=Z("li")({name:"ListItem",class:"edl18kdprd",propsAsIs:!1}),AM=Z("ol")({name:"OrderedList",class:"edoyxj7j5",propsAsIs:!1}),PM=Z("div")({name:"Row",class:"edr7e6b3z",propsAsIs:!1}),OM=Z("ul")({name:"UnorderedList",class:"eduyntbxa",propsAsIs:!1}),NM=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",d:"M18 12a6 6 0 1 1-12 0 6 6 0 0 1 12 0"})),MM=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 6a6 6 0 1 1 0 12 6 6 0 0 1 0-12m0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8",clipRule:"evenodd"})),LM=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",d:"m19 12-7 7-7-7 7-7zM7.828 12 12 16.172 16.172 12 12 7.828z"})),jM=Z("div")({name:"Container",class:"edc8c3d4h",propsAsIs:!1}),DM={0:g.jsx(NM,{}),1:g.jsx(MM,{}),2:g.jsx(LM,{})},FM=({style:e,text:t,level:n})=>{const i=e==="ordered"?t:DM[(n-1)%3];return g.jsx(jM,{children:i})},$M=({data:e,replacements:t,isAnswer:n,isPrizeInfo:s,isPrizeDesc:i,isEdgeText:l,isJourneyWidgetText:c,isNodeDescription:d})=>{const{convertStringToReplacement:f}=z0(t),{text:m}=e,y=f(m),v=U0(y);let w;return n?w=wN:s?w=xN:i?w=TN:l?w=k0:c?w=_N:d?w=EN:w=SN,g.jsx(w,{dangerouslySetInnerHTML:{__html:v}})},U0=e=>{const n=new DOMParser().parseFromString(`<div>${e}</div>`,"text/html");return n.querySelectorAll("a").forEach(i=>{i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer")}),n.body.firstChild.innerHTML},BM=({data:e})=>{const{meta:t,items:n,style:s}=e,i=(l,c,d)=>{if(!l||l.length===0)return null;const f=s==="unordered"?OM:AM;return g.jsx(f,{counterType:t==null?void 0:t.counterType,children:l.map((m,y)=>{const v=d+(y+1)+".";return g.jsx(xt.Fragment,{children:g.jsxs(RM,{style:{paddingLeft:c===1?"0px":"32px"},children:[g.jsxs(PM,{children:[g.jsx(FM,{style:s,level:c,text:v}),g.jsx("span",{dangerouslySetInnerHTML:{__html:U0(m.content)}})]}),i(m.items,c+1,v)]})},y)})})};return g.jsx(g.Fragment,{children:i(n,1,"")})},zM=Z("blockquote")({name:"Container",class:"edc1pmqebe",propsAsIs:!1}),UM=Z("span")({name:"Content",class:"edcfeuydt",propsAsIs:!1}),HM=Z("div")({name:"CaptionBlock",class:"edcqx7kpx",propsAsIs:!1}),WM=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,...e},b.createElement("path",{fill:"currentColor",d:"M19.866 12.887V19h-6.078v-4.563q0-2.959.565-5.212A14.2 14.2 0 0 1 16.182 5H20q-1.398 2-2.124 4.028-.726 2-.726 3.86zm-9.789 0V19H4v-4.563q0-2.959.565-5.212T6.42 5h3.792Q8.813 7 8.06 9.028q-.726 2.028-.726 3.86z"})),qM=({data:e})=>g.jsxs(zM,{children:[g.jsx(WM,{}),g.jsx(UM,{children:e.quote}),g.jsxs(HM,{children:[g.jsx("p",{children:e.authorName}),g.jsx("p",{children:e.profession})]})]}),VM=({data:e})=>{const{content:t,withHeadings:n}=e;if(!Array.isArray(t)||t.length===0)return;const s=n?t[0]:null,i=n?t.slice(1):t;return g.jsxs(IN,{children:[s&&g.jsx("thead",{children:g.jsx("tr",{children:s.map((l,c)=>g.jsx("th",{children:l},c))})}),g.jsx("tbody",{children:i.map((l,c)=>g.jsx("tr",{children:l.map((d,f)=>g.jsx("td",{dangerouslySetInnerHTML:{__html:d||"—"}},f))},c))})]})},GM=({data:e,isNodeDescription:t})=>{const{file:{url:n},stretched:s,withBackground:i,withBorder:l,caption:c}=e;let d;t?d=AN:d=bN;const f=s?"auto":"400px",m=s?"100%":"fit-content";return g.jsxs(RN,{style:{alignItems:s?"center":"flex-start"},children:[g.jsx(CN,{style:{width:m},children:g.jsx(d,{src:n,alt:c??"test image",style:{width:m,height:f},fetchpriority:"high"})}),c&&g.jsx(PN,{children:c})]})},QM=({data:e})=>g.jsx("div",{dangerouslySetInnerHTML:{__html:e==null?void 0:e.html}}),YM=({data:e,replacements:t,...n})=>{const s=W0(e,t,n);return g.jsx(jN,{style:{gap:n.isJourneyWidgetText?"12px":"14px"},children:s})},KM=Z("a")({name:"Border",class:"edb1n9nuyu",propsAsIs:!1}),XM=Z("div")({name:"FaviconContainer",class:"edf33eea4",propsAsIs:!1}),JM=Z("img")({name:"Favicon",class:"edf1siw68p",propsAsIs:!1}),ZM=Z("div")({name:"MetaBlock",class:"edm1u7odcx",propsAsIs:!1}),H0=Z("span")({name:"Text",class:"edt4nkw3z",propsAsIs:!1}),e4=Z(H0)({name:"BoldText",class:"edbz1s450",propsAsIs:!0}),t4=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},b.createElement("path",{fill:"currentColor",d:"M20 19h-2V7.414L5.707 19.707l-1.414-1.414L16.586 6H5V4h15z"})),n4=e=>{if(!e)return"";try{const n=e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}`;let i=new URL(n).hostname;return i=i.replace(/^www\./i,""),i.includes(".")||(i+=".com"),i}catch{let n=e.replace(/^https?:\/\//i,"").replace(/^www\./i,"");return n=n.split(/[\/?#]/)[0],n&&!n.includes(".")&&(n+=".com"),n||""}},r4=({data:e})=>g.jsxs(KM,{href:e.url,target:"_blank",children:[g.jsx(XM,{children:g.jsx(JM,{src:`https://www.google.com/s2/favicons?sz=64&domain_url=${encodeURIComponent(e.url)}`,alt:"favicon"})}),g.jsxs(ZM,{children:[g.jsx(H0,{children:n4(e.url)}),g.jsx(e4,{children:e.title})]}),g.jsx(t4,{})]}),s4=Z("div")({name:"Container",class:"edc85czkw",propsAsIs:!1}),o4=({data:e})=>g.jsxs(s4,{role:"alert",children:[g.jsx("p",{children:e.message}),g.jsx("p",{children:e.title})]}),i4=e=>{const t=[];for(let n=0;n<e.length;n++){if(e[n].type!=="header"){t.push(e[n]);continue}const s={id:e[n].id,data:[e[n]],type:"mergedHeaderAndParagraph"};let i=!1;for(let l=n+1;l<e.length&&!i;l++){if(e[l].type!=="paragraph"){i=!0;continue}s.data.push(e[l]),n++}t.push(s)}return t},a4=e=>{if(e==="paragraph")return $M;if(e==="list")return BM;if(e==="quote")return qM;if(e==="header")return bM;if(e==="mergedHeaderAndParagraph")return YM;if(e==="code")return TM;if(e==="table")return VM;if(e==="image")return GM;if(e==="linkBlock")return r4;if(e==="warning")return o4;if(e==="raw")return QM},W0=(e,t,n)=>{const s=[];return e.forEach(({id:i,data:l,type:c})=>{const d=a4(c),f=d?g.jsx(d,{data:l,replacements:t,...n},i):null;s.push(f)}),s},xi=({blocksArray:e,replacements:t={},...n})=>{if(!e||!Array.isArray(e))return;const s=i4(e),i=W0(s,t,n);return g.jsx(kN,{...n,children:i})},q0=()=>{const e=nn(i=>i.isRichTextModalOpen),t=nn(i=>i.closeModalForRichText),n=nn(i=>i.richTextBlocks),s=b.useRef(null);if(b.useEffect(()=>{const i=l=>{s.current&&!s.current.contains(l.target)&&t()};return e?document.addEventListener("mousedown",i):document.removeEventListener("mousedown",i),()=>{document.removeEventListener("mousedown",i)}},[e]),!!e)return g.jsx(gN,{children:g.jsxs(yN,{ref:s,children:[g.jsx(vN,{onClick:t,children:"✕"}),g.jsx(xi,{blocksArray:n,isPrizeDesc:!0})]})})},l4=N("div")({name:"Container",class:"edc1uixbmy",propsAsIs:!1}),c4=N("ul")({name:"List",class:"edl1h2mntg",propsAsIs:!1}),u4=N("div")({name:"Wrapper",class:"edwkqefnd",propsAsIs:!1}),d4=N("li")({name:"Participant",class:"edp1m90lkb",propsAsIs:!1}),f4=N("li")({name:"ParticipantPosition",class:"edplp9wkn",propsAsIs:!1}),p4=N("div")({name:"ParticipantWrapper",class:"edpi7ekwg",propsAsIs:!1}),h4=N("div")({name:"PointsWrapper",class:"edp8vzmbe",propsAsIs:!1}),m4=N("p")({name:"Points",class:"edpnrrx6w",propsAsIs:!1}),g4=N("div")({name:"LoaderWrapper",class:"edli7avpg",propsAsIs:!1}),y4=()=>g.jsx("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M8.85595 3.09539C9.2085 1.97699 10.7925 1.97699 11.1451 3.09539L12.2384 6.56383C12.3958 7.06308 12.8591 7.40262 13.383 7.40262L16.9987 7.40263C18.1521 7.40263 18.6413 8.86985 17.7184 9.56103L14.7296 11.7993C14.3221 12.1045 14.1517 12.6335 14.3048 13.1189L15.4311 16.692C15.7814 17.8032 14.4999 18.7103 13.5668 18.0116L10.7202 15.8798C10.2937 15.5604 9.70737 15.5604 9.28082 15.8798L6.43425 18.0116C5.5012 18.7103 4.21968 17.8032 4.56997 16.692L5.6963 13.1189C5.8493 12.6335 5.67898 12.1045 5.27143 11.7993L2.28267 9.56103C1.35974 8.86985 1.84897 7.40263 3.00238 7.40263L6.61804 7.40262C7.14191 7.40262 7.60524 7.06308 7.76262 6.56383L8.85595 3.09539Z"})}),v4=()=>g.jsxs("svg",{width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M17.4 18.6566C17.4 14.5697 14.0869 11.2566 9.99998 11.2566C5.91307 11.2566 2.59998 14.5697 2.59998 18.6566",stroke:"white",strokeLinecap:"round"}),g.jsx("path",{d:"M13.6 5.45669C13.6 7.44491 11.9882 9.05669 10 9.05669C8.0118 9.05669 6.40002 7.44491 6.40002 5.45669C6.40002 3.46846 8.0118 1.85669 10 1.85669C11.9882 1.85669 13.6 3.46846 13.6 5.45669Z",stroke:"white"})]}),S4=N("ul")({name:"Container",class:"edc65edga",propsAsIs:!1}),w4=()=>e=>e.active?"var(--accent)":"var(--popup-menu-tabs)",_4=()=>e=>(e.active,"var(--accent)"),E4=N("li")({name:"PaginationItem",class:"edp1cf5kvo",propsAsIs:!1,vars:{"p1cf5kvo-0":[w4()],"p1cf5kvo-1":[_4()]}}),x4=N("div")({name:"Dots",class:"eddw2ykav",propsAsIs:!1}),V0=N("button")({name:"ChevronButton",class:"edcjgljwh",propsAsIs:!1}),G0=()=>g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:g.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"})}),T4=({currentPage:e,handleSetCurrentPage:t,totalPages:n})=>{const s=(l,c)=>l<=7?Array.from({length:l},(d,f)=>f+1):c<=4?[1,2,3,4,5,"...",l]:c>=l-2?[1,"...",l-4,l-3,l-2,l-1,l]:[1,"...",c-1,c,c+1,"...",l];if(n<2)return;const i=s(n,e);return g.jsxs(S4,{children:[g.jsx(V0,{onClick:()=>t(e-1),disabled:e<2,children:g.jsx(G0,{})}),i.map((l,c)=>g.jsx(E4,{active:l===e,children:l==="..."?g.jsx(x4,{children:"..."}):g.jsx(i0,{title:l,onClick:()=>t(l)})},c)),g.jsx(V0,{onClick:()=>t(e+1),disabled:e>=n,children:g.jsx(G0,{})})]})},k4=N("div")({name:"Container",class:"edc1o85nbd",propsAsIs:!1}),I4=N("h1")({name:"Title",class:"edtueka45",propsAsIs:!1}),Q0=({title:e})=>g.jsxs(k4,{children:[g.jsx("svg",{width:"60px",height:"60px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M22.8 12A10.8 10.8 0 1 1 10 1.393v1.014a9.8 9.8 0 1 0 4 0V1.393A10.812 10.812 0 0 1 22.8 12z"})}),e&&g.jsx(I4,{children:e})]}),C4=()=>{const e=xe(_=>_.mapLeaderboard),t=xe(_=>_.setMapLeaderboard),[n,s]=b.useState(1),[i,l]=b.useState(0),[c,d]=b.useState(!1),f=$e(_=>_.translations.user),m=10,y=(n-1)*m,v=Math.ceil(i/m),w=()=>{var T;const _=(T=window.__widgetEdmap)==null?void 0:T.mapId;_&&(d(!0),CP(_,m,y).then(k=>{l(k.data.totalCount),t(k.data.results)}).catch(k=>{console.error(k)}).finally(()=>d(!1)))},E=_=>{d(!0),s(_)};return b.useEffect(()=>{w()},[n]),c?g.jsx(g4,{children:g.jsx(Q0,{})}):g.jsxs(l4,{children:[g.jsx(c4,{children:e==null?void 0:e.map((_,T)=>{var M;const k=y+T+1;return g.jsxs(u4,{children:[g.jsxs(p4,{children:[g.jsx(f4,{children:k}),g.jsx(v4,{}),g.jsx(d4,{children:((M=_==null?void 0:_.User)==null?void 0:M.username)??f.defaultName})]}),g.jsxs(h4,{children:[g.jsx(y4,{}),g.jsx(m4,{children:_==null?void 0:_.allPoints})]})]},_==null?void 0:_.id)})}),i&&g.jsx(T4,{currentPage:n,handleSetCurrentPage:E,totalPages:v})]})},b4=N("div")({name:"Background",class:"edb1d6ibuo",propsAsIs:!1}),R4=N("div")({name:"Container",class:"edc9edd3f",propsAsIs:!1}),A4=N("div")({name:"PrizeBlock",class:"edpzra8fb",propsAsIs:!1}),P4=N("div")({name:"ButtonBlock",class:"edb17wiemr",propsAsIs:!1}),O4=()=>{const e=nn(f=>f.prize),t=nn(f=>f.isRegistrationModalOpen),n=nn(f=>f.closeModalForRegistration),s=rn(f=>f.setIsRegistrationOpen),i=b.useRef(null),l=$e(f=>f.translations.settings.signInPopup),c=f=>{i.current&&!i.current.contains(f.target)&&n()};b.useEffect(()=>(t?document.addEventListener("mousedown",c):document.removeEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}),[t]);const d=()=>{s(!0),n()};return t?g.jsx(b4,{children:g.jsxs(R4,{ref:i,children:[g.jsxs(Qv,{children:[g.jsx(Yv,{children:l.title}),g.jsx(Kv,{children:l.subtitle})]}),g.jsx(A4,{children:g.jsxs(e0,{children:[g.jsx(t0,{children:g.jsx(l0,{iconId:e==null?void 0:e.iconId})}),g.jsx(n0,{children:e==null?void 0:e.name})]})}),g.jsxs(P4,{children:[g.jsx(mn,{title:l.buttonTitle,onClick:n}),g.jsx(mn,{"data-testid":"edmap-widget__signin-popup-btn",title:l.accentButtonTitle,isAccent:!0,onClick:d})]})]})}):null},N4=N("div")({name:"Container",class:"edc1uqjekp",propsAsIs:!1}),M4=N("div")({name:"Container",class:"edc1sokvv3",propsAsIs:!1}),L4=(e,t)=>{const n=URL.createObjectURL(e);j4(n,t),URL.revokeObjectURL(n)},Y0=e=>L4(e,e.name),j4=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,document.body.appendChild(n),n.click(),n.remove()},D4=()=>typeof navigator<"u"&&typeof navigator.share=="function",F4=e=>{try{return navigator.canShare({files:[e]})}catch{return!1}},$4=e=>e?D4()&&F4(e):!1,B4=e=>navigator.share({files:[e]}).then(()=>!0).catch(t=>(Y0(e),!1)),z4=()=>{const{share:e,downloadFallback:t}=$e(i=>i.translations.share),n=nn(i=>i.certificate.file);if(!n)return null;const s=$4(n);return g.jsx(M4,{children:s?g.jsx(mn,{title:e,onClick:()=>B4(n),isAccent:!0}):g.jsx(mn,{title:t,onClick:()=>Y0(n),isAccent:!0})})};var U4=dh();const Ti=({children:e,parentElement:t})=>{const[n,s]=b.useState(null);return b.useEffect(()=>{const i=document.createElement("div");t.appendChild(i);const l=i.attachShadow({mode:"open"}),c=f=>{l.adoptedStyleSheets=[f],s(l)},d=()=>{window.__edmapStylesheet?window.__edmapStylesheet.then(c):setTimeout(d,100)};return d(),()=>i.remove()},[]),n?U4.createPortal(e,n):null},H4=()=>{const e=nn(l=>l.isCertificateModalOpen),t=nn(l=>l.closeCertificateModal),n=nn(l=>l.certificate.url),s=b.useRef(null),i=l=>{var f;!s.current||(((f=l.composedPath)==null?void 0:f.call(l))||[]).includes(s.current)||t()};return b.useEffect(()=>(e?setTimeout(()=>document.addEventListener("click",i)):document.removeEventListener("click",i),()=>{document.removeEventListener("click",i)}),[e]),e?g.jsx(Ti,{parentElement:document.body,children:g.jsxs(N4,{ref:s,children:[g.jsx("img",{src:n}),g.jsx(z4,{})]})}):null},W4=()=>{const e=rn(k=>k.isPanelModalOpen),t=rn(k=>k.setIsPanelOpen),n=rn(k=>k.isRegistrationOpen),s=rn(k=>k.setIsRegistrationOpen),[i,l]=b.useState(0),[c,d]=b.useState(!0),f=Ct(k=>k.results),m=(f==null?void 0:f.allPoints)||0,y=$e(k=>k.translations.popup),v=m<10?1:Math.floor(m/10),w=b.useRef(null),E=Fv(),_=[g.jsx(D3,{}),g.jsx(Yd,{quests:f==null?void 0:f.quests}),g.jsx(C4,{}),g.jsx(qO,{})],T=k=>{var $;!w.current||((($=k.composedPath)==null?void 0:$.call(k))||[]).includes(w.current)||(l(0),t(!1))};if(b.useEffect(()=>(e?setTimeout(()=>document.addEventListener("click",T)):document.removeEventListener("click",T),()=>{document.removeEventListener("click",T)}),[e]),!!e)return g.jsx(qP,{ref:w,id:"edmap-widget__popup",children:g.jsxs(VP,{children:[g.jsx(aO,{userLevel:v}),!E&&c&&g.jsx(GP,{children:g.jsx(Kd,{setIsRegInfoVisible:d,openSignInModal:()=>s(!0)})}),g.jsx(n3,{data:y.menuItems,activeIndex:i,setActiveIndex:l}),g.jsx(QP,{children:_[i]}),g.jsx(T0,{isOpen:n,closeModal:()=>s(!1),setIsSocialModalVisible:()=>{},isSocialModalVisible:!0}),g.jsx(O4,{}),g.jsx(q0,{})]})})},q4=N("div")({name:"Container",class:"edc16l98jz",propsAsIs:!1}),V4=N("div")({name:"ImageWrapper",class:"edi13krnav",propsAsIs:!1}),G4=N("div")({name:"InfoWrapper",class:"edied2wr6",propsAsIs:!1}),Q4=N("div")({name:"LevelWrapper",class:"edl11c2ni8",propsAsIs:!1}),Y4=N("div")({name:"TextWrapper",class:"edt133co2j",propsAsIs:!1}),K4=N("img")({name:"Confetti",class:"edc1etko73",propsAsIs:!1}),X4=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",...e},b.createElement("path",{stroke:"#fff",strokeLinecap:"square",strokeWidth:2,d:"m2 2 14 14m0-14L2 16"})),J4=({...e})=>g.jsx(Z4,{...e,children:g.jsx(X4,{})}),Z4=Z("button")({name:"Button",class:"edb1b1pm51",propsAsIs:!1}),eL="https://widget.edmap.space/assets/confetti-edmap-widget.gif",tL=({points:e,setPointsAreReceived:t})=>{const[n,s]=b.useState(0),i=Ct(f=>f.pointsAreReceived),l=xe(f=>f.isFinished),c=b.useRef(e),d=b.useRef(null);return b.useEffect(()=>(l&&c.current!==e&&(s(f=>f+1),t(!0),d.current=setTimeout(()=>{t(!1)},8e3)),c.current=e,()=>clearTimeout(d)),[e,l]),i&&g.jsx(K4,{src:eL,alt:"Confetti"})},nL=()=>{var f,m,y,v,w,E,_;const e=rn(T=>T.isPanelModalOpen),t=rn(T=>T.setIsPanelOpen),n=Ct(T=>T.results),s=Ct(T=>T.setPointsAreReceived),i=$e(T=>T.translations.popupBar),l=((m=(f=n==null?void 0:n.prizes)==null?void 0:f.filter(T=>T==null?void 0:T.awardRichText))==null?void 0:m.length)??0,c=(n==null?void 0:n.allPoints)||0,d=()=>{t(!0),s(!1)};return g.jsx(g.Fragment,{children:e?g.jsx(J4,{onClick:()=>t(!1),id:"edmap-widget__popup-bar-btn"}):g.jsxs(q4,{onClick:d,id:"edmap-widget__popup-bar",children:[g.jsx(V4,{children:g.jsx(Gd,{src:(v=(y=n==null?void 0:n.User)==null?void 0:y.avatar)==null?void 0:v.src,style:{borderRadius:"var(--extreme-border-radius)"}})}),g.jsxs(G4,{children:[g.jsxs(Q4,{children:[g.jsx(Vd,{level:Qd(c)}),g.jsxs(Y4,{children:[g.jsx(ws,{text:i.prizesTitle,progressValue:l??0,overallValue:((w=n==null?void 0:n.prizes)==null?void 0:w.length)??0}),g.jsx(ws,{text:i.skillsTitle,progressValue:(n==null?void 0:n.allPoints)??0,overallValue:((E=n==null?void 0:n.map)==null?void 0:E.points)??0})]})]}),g.jsx(xl,{progressValue:(n==null?void 0:n.allPoints)??0,overallValue:((_=n==null?void 0:n.map)==null?void 0:_.points)??0})]}),g.jsx(tL,{points:c,setPointsAreReceived:s})]})})};It((e,t)=>({isOpen:!1,toggle:()=>e(n=>({isOpen:!n.isOpen})),closeModal:()=>e({isOpen:!1}),openModal:()=>e({isOpen:!0})}));const Ol=It(e=>({popupBarStyle:{},widgetContainerStyle:{},setPopupBarStyle:t=>e({popupBarStyle:t}),setWidgetContainerStyle:t=>e({widgetContainerStyle:t})})),rL=N("div")({name:"Container",class:"edc1vap6o9",propsAsIs:!1}),sL=()=>{const e=rn(i=>i.isPanelModalOpen),t=Ol(i=>i.popupBarStyle),n=xe(i=>i.quest);return(n==null?void 0:n.isMiniPanelVisible)||e?g.jsxs(rL,{style:t,children:[g.jsx(W4,{}),(n==null?void 0:n.isMiniPanelVisible)&&g.jsx(nL,{})]}):null},K0=e=>{if(!e)return{};if(e.startsWith("{"))try{e=e.slice(1,e.length-1)}catch(n){return Dn(n),console.error("Parse Error: something wrong with custom style string"),{}}const t={};return e.split(";").forEach(n=>{const[s,i]=n.split(":").map(l=>l.trim());if(s&&i){const l=s.replace(/-([a-z])/g,c=>c[1].toUpperCase());t[l]=i}else console.warn(`Parse Warning: faild to parse custom property style for property: ${s||"not found"}`)}),t},oL=(e,t)=>{if(e==="admin"){const n=t.match(/quests\/([^/?]+)/);return(!n||!n[1])&&console.error("Parse Error: wrong url for quest search in admin panel"),n[1]}else return t},iL=N("div")({name:"Container",class:"edcsc8z9h",propsAsIs:!1}),aL=N("div")({name:"HidingContainer",class:"edhc15unp",propsAsIs:!1}),X0=N("div")({name:"QuestionBlock",class:"edq12kw8l3",propsAsIs:!1}),lL=N("div")({name:"HeaderScrollableSpace",class:"edh1iwfgmu",propsAsIs:!1}),cL=N("div")({name:"SidePadding",class:"edsz53tfr",propsAsIs:!1}),uL=N("div")({name:"Container",class:"edc8gkhop",propsAsIs:!1}),dL=N("div")({name:"TitleSection",class:"edtp3l3kp",propsAsIs:!1}),fL=N("div")({name:"Wrapper",class:"edw11bk3uj",propsAsIs:!1}),J0=N("div")({name:"Divider",class:"edd1nx5xv8",propsAsIs:!1}),pL=N("div")({name:"UserContainer",class:"edu5m07eq",propsAsIs:!1}),hL=N("h2")({name:"Title",class:"edt1xyelki",propsAsIs:!1}),mL=N("div")({name:"AvatarContainer",class:"eda1j00vs7",propsAsIs:!1}),gL=N("button")({name:"AvatarButton",class:"edab6hzvg",propsAsIs:!1}),yL=N("div")({name:"LevelContainer",class:"edl8lxqvm",propsAsIs:!1}),vL=N("div")({name:"ButtonContainer",class:"edb1m2edat",propsAsIs:!1}),SL=N("div")({name:"Container",class:"edcitwxpq",propsAsIs:!1}),wL=N("div")({name:"QuestTypeIcon",class:"edqdo840j",propsAsIs:!1}),_L=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},b.createElement("path",{fill:"currentColor",d:"m14.505 15.138.11.006a1 1 0 0 1 .66.354l3.114 3.748c.89 1.072 2.633.442 2.633-.95v-9.43a4.656 4.656 0 0 0-4.425-4.65l-.23-.005H7.634A4.656 4.656 0 0 0 2.98 8.866v8.953c0 1.344 1.64 2 2.567 1.025l3.224-3.396c.189-.198.451-.31.726-.31zm8.517 3.158c0 3.264-4.084 4.74-6.17 2.228l-2.815-3.386H9.925L6.998 20.22C4.828 22.504.98 20.97.98 17.819V8.866a6.657 6.657 0 0 1 6.653-6.655h8.734l.33.008a6.66 6.66 0 0 1 6.325 6.645z"}),b.createElement("path",{fill:"currentColor",d:"M9 7v2h2v2H9v2H7v-2H5V9h2V7zM15.05 10.59a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5M17.434 12.973a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5"})),EL=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},b.createElement("path",{fill:"currentColor",d:"m8.6 2.799-4.694 3.52-2.613-2.613 1.414-1.414 1.387 1.387L7.4 1.199zm13.4-.3v2H11v-2zM22 10.999v2H11v-2zM22 19.499v2H11v-2zM4.5 13.999a2 2 0 1 0 0-4 2 2 0 0 0 0 4M4.5 22.499a2 2 0 1 0 0-4 2 2 0 0 0 0 4"})),xL=()=>{const t=xe(n=>n.quest).questType==="Test"?g.jsx(EL,{}):g.jsx(_L,{});return g.jsx(SL,{children:g.jsx(wL,{children:t})})},TL=({icon:e,to:t,...n})=>t?g.jsx("a",{target:"_blank",href:t,rel:"external",children:g.jsx(El,{...n,children:e})}):g.jsx(El,{...n,children:e}),kL=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 18 18",...e},b.createElement("path",{stroke:"#fff",strokeLinecap:"square",strokeWidth:2,d:"m2 2 14 14m0-14L2 16"})),IL=N("div")({name:"Container",class:"edchp8usr",propsAsIs:!1}),CL=N("span")({name:"Text",class:"edt141dyxo",propsAsIs:!1}),Z0=({minutes:e,seconds:t})=>(e=Math.max(0,e),t=Math.max(0,t),g.jsxs(CL,{children:[e.toString().padStart(2,"0"),":",t.toString().padStart(2,"0")]})),bL=e=>{const t=_P(e);if(!t)return Date.now();const[n,s]=t.split("@");return Number(s)},RL=e=>Date.now()-e,AL=(e,t)=>{const n=bL(t);return PL(e,n)},PL=(e,t)=>{const n=Math.floor(RL(t)/1e3),s=e-n,i=s%60,l=Math.floor(s/60);return{seconds:i,minutes:l}},OL=N("div")({name:"Container",class:"edc1qu2wft",propsAsIs:!1}),NL=N("div")({name:"TextBlock",class:"edtoc84xr",propsAsIs:!1}),ML=N("p")({name:"RestrictionText",class:"edr6awsvd",propsAsIs:!1}),af=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e},b.createElement("path",{fill:"currentColor",d:"M20 12a8 8 0 1 0-16 0 8 8 0 0 0 16 0m2 0c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"}),b.createElement("path",{fill:"currentColor",d:"m13 11.106 1.732-1.732 1.415 1.414-3.733 3.732L11 13.5V6h2z"})),LL=({timeValues:e})=>{const{remainingTitle:t}=$e(n=>n.translations.timer);return g.jsxs(OL,{children:[g.jsx(af,{}),g.jsxs(NL,{children:[g.jsx(ML,{children:t}),g.jsx(Z0,{...e})]})]})},jL=N("div")({name:"Container",class:"edc16uhwme",propsAsIs:!1}),DL=({timeValues:e})=>g.jsxs(jL,{children:[g.jsx(af,{}),g.jsx(Z0,{...e})]}),Nl=It(e=>({isTimerOverlapped:!1,values:{minutes:0,seconds:0},setIsTimerOverlapped:t=>e({isTimerOverlapped:t}),setValues:t=>e({values:t})})),e1=({type:e})=>{const t=xe(m=>m.quest),n=Nl(m=>m.values),s=Nl(m=>m.setValues),i=xe(m=>m.setIsFinished),l=xe(m=>m.isFinished),c=Nr(m=>m.startFadeTransition),d=()=>AL(t.timeLimitSeconds,t.id),f=()=>c([]).then(()=>{i(!0),s(d())});return b.useEffect(()=>{if(l)return;const m=()=>{const v=d();if(v.minutes<=0&&v.seconds<=0){f(),s({minutes:0,seconds:0});return}s(v)},y=setInterval(m,1e3);return m(),()=>{clearInterval(y)}},[t.id,l]),e==="horizontal"?g.jsx(LL,{timeValues:n}):g.jsx(DL,{timeValues:n})},FL=()=>{const e=xe(n=>n.quest),t=Nl(n=>n.isTimerOverlapped);return e.timeLimitSeconds===0||!t?null:g.jsxs(IL,{children:[g.jsx(J0,{}),g.jsx(e1,{type:"vertical"})]})},t1=It(e=>({height:0,width:null,setHeight:t=>e({height:t}),setWidth:t=>e({width:t}),headerShift:0,setHeaderShift:t=>e({headerShift:t})})),Ml=It((e,t)=>({ref:null,height:null,width:null,initialHeight:0,top:0,setRef:()=>e({ref}),setTop:n=>e({top:n}),setHeight:n=>e({height:n}),setWidth:n=>e({width:n}),getHeight:()=>t().height,setInitialHeight:n=>e({initialHeight:n,height:n})})),$L=Z("div")({name:"Container",class:"edcsej1qu",propsAsIs:!1}),BL=()=>({verticalDirection:e})=>e==="down"?"100%":"unset",zL=()=>({verticalDirection:e})=>e==="up"?"100%":"unset",UL=()=>({horizontalDirection:e})=>e==="left"?"unset":"0",HL=()=>({horizontalDirection:e})=>e==="left"?"0":"unset",WL=Z("div")({name:"DropdownMenu",class:"edd146lpl0",propsAsIs:!1,vars:{"d146lpl0-0":[BL()],"d146lpl0-1":[zL()],"d146lpl0-2":[UL()],"d146lpl0-3":[HL()]}}),qL=()=>({isChosen:e})=>e?"var(--dropdown-item-bg-active)":"transparent",VL=()=>({isChosen:e})=>e?"block":"none",GL=Z("div")({name:"MenuItem",class:"edmqt74d7",propsAsIs:!1,vars:{"mqt74d7-0":[qL()],"mqt74d7-1":[VL()]}}),QL=(e,t)=>{const[n,s]=b.useState("right");return b.useLayoutEffect(()=>{if(!e.current||!t.current)return;const i=e.current.getBoundingClientRect(),l=t.current.getBoundingClientRect();return i.left-l.left+i.width>l.width?s("left"):s("right"),()=>{s("right")}},[e,t]),n},YL=({items:e,chosenItem:t,dropdownButton:n,handleChooseItem:s,isDropdownOpen:i,setIsDropdownOpen:l,viewportRef:c={current:window.document.body},...d})=>{const[f,m]=b.useState("down"),y=b.useRef(null),v=b.useRef(null),[w,E]=b.useState("right"),_=()=>{const P=y.current,$=v.current;if(!P||!$)return;const q=P.getBoundingClientRect(),W=$.offsetHeight,j=window.innerHeight-q.bottom,D=q.top;j<W&&D>W?m("up"):m("down");const Y=c.current.getBoundingClientRect(),K=$.getBoundingClientRect();q.left-Y.left+K.width>Y.width?E("left"):E("right")},T=P=>{!y.current||y.current.contains(P.target)||requestAnimationFrame(()=>{l(!1)})};b.useLayoutEffect(()=>{if(i)return _(),document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[i]);const k=P=>typeof P=="object"?P.name:P,M=P=>typeof P=="object"?(P==null?void 0:P.id)===t:P===t;return g.jsxs($L,{...d,ref:y,children:[n,i&&e.length>0&&g.jsx(WL,{ref:v,verticalDirection:f,horizontalDirection:w,children:e.map(P=>g.jsx(GL,{isChosen:M(P),onClick:()=>{P!=null&&P.callback&&typeof(P==null?void 0:P.callback)=="function"?P==null||P.callback():s((P==null?void 0:P.id)??P)},children:k(P)},typeof P=="object"?P.id:P))})]})},KL=Z("button")({name:"ButtonContainer",class:"edb1lpjq8r",propsAsIs:!1}),XL=e=>{const[t,n]=b.useState(!1),s=b.useMemo(()=>e.items.map(l=>({...l,callback:()=>{l.callback(),n(!1)}})),[e.items]),i=b.useCallback(()=>{n(l=>!l)},[]);return g.jsx(YL,{...e,isDropdownOpen:t,setIsDropdownOpen:n,items:s,dropdownButton:g.jsx(KL,{onClick:i,children:e.dropdownButton})})},JL=e=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2m0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2m0 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2"})),ZL=N("div")({name:"MenuContainer",class:"edm1b26o2n",propsAsIs:!1}),ej=({parentRef:e})=>{const{restartQuest:t}=go(),{restart:n}=$e(i=>i.translations.gameMenu),s=b.useMemo(()=>[{id:"reset-session",name:n,callback:t}],[t,n]);return g.jsx(XL,{viewportRef:e,dropdownButton:g.jsx(ZL,{children:g.jsx(JL,{})}),items:s})},tj=({isSticky:e,style:t,parentRef:n})=>{var P,$,q,W,j;const s=Ct(D=>D.results),i=xe(D=>D.quest),l=rn(D=>D.isPanelModalOpen),c=rn(D=>D.setIsPanelOpen),d=b.useRef(null),f=$e(D=>D.translations.header),m=t1(D=>D.setHeight),y=Ml(D=>D.width),v=ar(D=>D.topOffset),w=ar(D=>D.marginRootTop),E=()=>{c(!l)};b.useEffect(()=>{if(!(d.current instanceof HTMLElement))return;const Y=window.getComputedStyle(d.current),K=parseFloat(Y.height),V=parseFloat(Y.paddingBottom);m(K-V/2)},[]);const _=D=>{D.preventDefault(),D.stopPropagation()},T=l?kL:f0,k=e?-v+w:-v,M=g.jsxs(uL,{id:"edmap-header",ref:d,style:{position:e?"fixed":"absolute",top:`${k}px`,...t,width:y??"100%"},children:[g.jsx(xL,{}),g.jsxs(dL,{children:[g.jsxs(fL,{children:[g.jsx(hL,{children:i==null?void 0:i.name}),g.jsx(ws,{progressValue:(s==null?void 0:s.allPoints)??0,overallValue:((P=s==null?void 0:s.map)==null?void 0:P.points)??0,text:f.progressText})]}),g.jsx(xl,{progressValue:(s==null?void 0:s.allPoints)??0,overallValue:(($=s==null?void 0:s.map)==null?void 0:$.points)??0})]}),g.jsx(vL,{children:g.jsx(TL,{onMouseDown:_,onClick:E,icon:g.jsx(T,{})})}),g.jsx(J0,{}),g.jsxs(pL,{children:[g.jsx(ej,{parentRef:n}),g.jsxs(mL,{children:[g.jsx(Gd,{style:{cursor:"pointer"},onMouseDown:_,onClick:E,src:(W=(q=s==null?void 0:s.User)==null?void 0:q.avatar)==null?void 0:W.src,alt:(j=f.image)==null?void 0:j.alt}),g.jsx(gL,{onClick:E,"aria-label":"avatar-button"}),g.jsx(yL,{children:g.jsx(Vd,{level:Qd(s==null?void 0:s.allPoints)})})]})]}),g.jsx(FL,{})]});return e&&typeof document<"u"?g.jsx(Ti,{parentElement:document.body,children:M}):M},n1=It(e=>({top:0,bottom:0,height:0,setTop:t=>e({top:t}),setBottom:t=>e({bottom:t}),setHeight:t=>e({height:t})})),nj=(e,t,n)=>t.textAnswer.length===0,rj={[Ie.test]:()=>!1,[Ie.journey]:nj,[Ie.repetitionTrainer]:()=>!1},sj=()=>{const{currentZustandHook:e,quest:t}=nf(),[n,s]=b.useState(e.getState()),i=Nr(l=>l.preloader);return b.useEffect(()=>{const l=e.subscribe(c=>{s(c)});return()=>l()},[t,e]),b.useMemo(()=>i||rj[t.questType](t,n,null),[n,t,i])},oj={[Ie.test]:e=>e.confirmAnswer,[Ie.journey]:e=>e.confirmAnswer,[Ie.repetitionTrainer]:(e,t)=>t.richTextToDisplay?e.next:t.currentQuestion&&t.answer?e.confirmAnswer:e.skip},ij=()=>{const e=$e(s=>s.translations),{currentZustandHook:t,quest:n}=nf();return oj[n.questType](e,t.getState())},aj=()=>{const e=ij(),{makeStep:t}=go(),n=sj();return g.jsx(mn,{disabled:n,id:"edmap-widget__accept-btn","data-test":"button game",title:e,isAccent:!0,onClick:t})},lj=()=>{const e=xe(E=>E.currentStep),t=xe(E=>{var _;return(_=E.quest)==null?void 0:_.details.stepCount}),n=xe(E=>E.isFinished),s=xe(E=>E.quest),i=b.useRef(null),l=n1(E=>E.setHeight),c=lr(E=>E.currentNode.type);if(b.useEffect(()=>{i.current&&l(i.current.clientHeight)},[i.current]),!(s!=null&&s.id))return;const{questType:d=""}=s,f=d===Ie.journey,m=f&&[_s.inputAnswerNode,_s.ai].includes(c),y=d===Ie.test,w=d===Ie.repetitionTrainer||y||m||d===Ie.repetitionTrainer;return g.jsxs(YO,{ref:i,children:[g.jsx(VO,{children:g.jsx(d0,{})}),!n&&w&&g.jsxs(QO,{children:[f?null:g.jsx(GO,{children:g.jsx(ws,{progressValue:e,overallValue:t})}),g.jsx(_0,{children:g.jsx(aj,{})})]})]})},cj=(e,t=!1,n=0)=>{const s=b.useRef(null),i=b.useRef(null),l=b.useRef(null);return b.useEffect(()=>{const c=s.current;if(!c)return;const d=(m,y)=>{let v=null;if(t){const w=m.top,E=l.current!==null&&l.current<n,_=w-n>0;E&&_&&(v=!0),l.current=m.top}else y?v=!1:m.top<n&&(v=!0);v===null||i.current===v||e(v)},f=new IntersectionObserver(m=>{m.forEach(y=>{d(y.boundingClientRect,y.isIntersecting)})},{root:null,threshold:0});return f.observe(c),()=>{f.disconnect()}},[e,t,n,s]),s},r1=N("div")({name:"Container",class:"edc12456a3",propsAsIs:!1}),uj=N(r1)({name:"BottomSensorContainer",class:"edbig50hz",propsAsIs:!0}),dj=xt.forwardRef(({setIsSensorTriggered:e,isBottomUpTriggered:t,rootOffset:n,topOffset:s,bottomOffset:i,className:l,color:c,isStickToBottom:d=!1,isPortal:f=!0},m)=>{const y=cj(e,t,n);b.useImperativeHandle(m,()=>y.current,[]);const v=b.useMemo(()=>({marginTop:s||"unset",marginBottom:i||"unset",backgroundColor:c??"red"}),[s,i,c]);let w=null;return d?w=g.jsx(uj,{className:l??"edmap-sensor",ref:y,style:v}):w=g.jsx(r1,{className:l??"edmap-sensor",ref:y,style:v}),f?g.jsx(Ti,{parentElement:document.body,children:w}):w}),Es=xt.memo(dj),Ll=It(e=>({error:null,setError:t=>e({error:t})})),fj=N("div")({name:"Background",class:"edb1tdpu9l",propsAsIs:!1}),pj=N("p")({name:"Title",class:"edt16l2gyb",propsAsIs:!1}),hj=N("p")({name:"Subtitle",class:"eds15nnhmy",propsAsIs:!1}),mj=N("div")({name:"Container",class:"edc1a894cv",propsAsIs:!1}),gj=N("div")({name:"TextContainer",class:"edtzp6bkd",propsAsIs:!1}),yj=N(o0)({name:"Button",class:"edbnt8p61",propsAsIs:!0}),vj=({width:e=24,height:t=24,...n})=>g.jsx("svg",{width:e,height:t,viewBox:"0.5 -0.5 17 17",xmlns:"http://www.w3.org/2000/svg",fill:"none",...n,children:g.jsxs("g",{transform:"translate(1.000000, 2.000000)",fill:"currentColor",children:[g.jsx("path",{d:"M15.796,6.908 L14.234,5.21 C14.019,4.998 13.672,4.998 13.458,5.21 L11.894,6.908 C11.679,7.122 11.679,7.467 11.894,7.68 L13.188,7.68 C12.702,9.505 11.27,10.976 9.399,11.47 C7.231,12.042 4.913,11.191 3.632,9.351 L2.541,10.102 C3.807,11.921 5.884,12.966 8.039,12.966 C8.604,12.966 9.176,12.894 9.737,12.745 C12.188,12.099 14.04,10.112 14.55,7.68 L15.795,7.68 C16.01,7.467 16.01,7.122 15.796,6.908 Z"}),g.jsx("path",{d:"M4.475,6.021 C4.69,5.808 4.69,5.462 4.475,5.249 L3.018,5.249 C3.516,3.448 4.936,2.001 6.789,1.511 C8.959,0.938 11.275,1.791 12.555,3.632 L13.647,2.88 C12.049,0.585 9.161,-0.479 6.448,0.235 C4.016,0.878 2.175,2.84 1.648,5.249 L0.196,5.249 C-0.019,5.463 -0.019,5.809 0.196,6.021 L1.834,7.658 C2.048,7.87 2.396,7.87 2.61,7.658 L4.475,6.021 Z"})]})}),s1=()=>{const e=()=>{window.location.reload()};return g.jsx(yj,{onClick:e,children:g.jsx(vj,{width:80,height:75})})};class Sj extends xt.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){setTimeout(()=>{Ll.setState({error:t})},0),Dn(t)}render(){if(this.state.hasError){const{translations:t}=this.props;return g.jsx(fj,{children:g.jsxs(mj,{children:[g.jsxs(gj,{children:[g.jsx(pj,{children:(t==null?void 0:t.title)||"An error occurred"}),g.jsx(hj,{children:(t==null?void 0:t.subtitle)||"Please refresh the page or try again later"})]}),g.jsx(s1,{})]})})}return this.props.children}}const o1=({children:e})=>{const t=$e(n=>{var s;return(s=n.translations)==null?void 0:s.globalError});return g.jsx(Sj,{translations:t,children:e})},wj=({children:e})=>{const t=xe(n=>n.quest);return t!=null&&t.id?g.jsx(g.Fragment,{children:e}):g.jsx(Q0,{})},_j=N("div")({name:"Container",class:"edctzb4h8",propsAsIs:!1}),Ej=N("p")({name:"Title",class:"edtg41o65",propsAsIs:!1}),lf=e=>{if(!e)return 60;const n=new Date(e).getTime()-Date.now();return n<0?0:Math.round(n/1e3)},xj=e=>{const t=Math.floor(e/3600),n=Math.floor(e%3600/60),s=e%60,i=String(n).padStart(2,"0"),l=String(s).padStart(2,"0");return t<1?`${i}:${l}`:`${String(t).padStart(2,"0")}:${i}:${l}`},Tj=N("div")({name:"Container",class:"edc11azq9p",propsAsIs:!1}),i1=({expiresAt:e,onTimeEnds:t})=>{const[n,s]=b.useState(lf(e)),i=$e(l=>l.translations.user.ban);return b.useEffect(()=>{s(lf(e))},[e]),b.useEffect(()=>{const l=setInterval(()=>{s(lf(e))},1e3);return()=>{clearInterval(l)}},[e]),b.useEffect(()=>{n>0||t&&t()},[n]),g.jsxs(Tj,{children:[g.jsx(af,{}),g.jsxs("span",{children:[i.wait," ",xj(n)]})]})},a1=async e=>{if(!wi())return!1;const{data:n}=await lt.get(`/banned-user/${wi()}/${e}`),{isBanned:s,expiresAt:i}=n;return{isBanned:s,expiresAt:i}},l1=()=>{const e=xe(d=>d.quest),[t,n]=b.useState(!0),[s,i]=b.useState({isBanned:!1,expiresAt:null}),l=b.useCallback(()=>{n(!0)},[]),c=b.useCallback(()=>{a1(e.id).then(({isBanned:d,expiresAt:f})=>{i({isBanned:d,expiresAt:f}),n(!d)})},[e.id]);return{isBanExpired:t,expiresAt:s.expiresAt,onTimeEnds:l,refreshBanStatus:c}},kj=({children:e})=>{const t=$e(d=>d.translations.user.ban),n=xe(d=>{var f;return(f=d.quest)==null?void 0:f.id}),{isBanExpired:s,expiresAt:i,onTimeEnds:l,refreshBanStatus:c}=l1();return b.useEffect(()=>{c()},[n]),s?e:g.jsxs(_j,{children:[g.jsx(Ej,{children:t.forbiddenQuest}),g.jsx(i1,{expiresAt:i,onTimeEnds:l})]})},Ij=(e,t)=>{b.useEffect(()=>{if(!e.current)return;const n=()=>{t(e.current.clientWidth)};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[e.current])},Cj=N("div")({name:"Background",class:"edbgw902r",propsAsIs:!1}),bj=N("div")({name:"Container",class:"edcv2zzw1",propsAsIs:!1}),Rj=N("div")({name:"MessageBlock",class:"edm2b9k2r",propsAsIs:!1}),Aj=N("div")({name:"Row",class:"edr4gsubj",propsAsIs:!1}),Pj=N("div")({name:"Divider",class:"edd3sdabk",propsAsIs:!1}),Oj=N("h1")({name:"Title",class:"edt1cvxfwm",propsAsIs:!1}),Nj=N("div")({name:"QuestsContainer",class:"edq1tclzqz",propsAsIs:!1}),c1=N("div")({name:"Section",class:"eds1ce4iti",propsAsIs:!1}),u1=N("p")({name:"SectionTitle",class:"edsqdd2kx",propsAsIs:!1}),Mj=N(Aj)({name:"PrizesContainer",class:"edpiwm40a",propsAsIs:!0}),Lj=(e,t=5)=>{const n=e==null?void 0:e.quests;return n?n.filter(l=>l.questUrlPaths.every(({path:c})=>c!==window.location.pathname)).filter(l=>!("resultQuestAnswer"in l)).slice(0,t):[]},jj=e=>{const t=e==null?void 0:e.prizes,n=e==null?void 0:e.allPoints;return t?t.filter(i=>i.awardPoints>n):[]},Dj=async e=>{if(yr.reportQuestEnded(e.mapId,e.id),e.questType===Ie.test)return IP(e);if(e.questType===Ie.journey)return LO(e);if(e.questType===Ie.repetitionTrainer)return jO(e)},Fj=(e,t)=>{const n=$j(e,t),s=Bj(n),i=zj(n);return[s,i]},$j=(e,t)=>{var n;return(n=t==null?void 0:t.quests)==null?void 0:n.find(s=>s.id===e)},Bj=e=>{var t;return((t=e==null?void 0:e.resultQuestAnswer)==null?void 0:t.points)||0},zj=e=>(e==null?void 0:e.maxPoints)||0,Uj=(e,t)=>e.replace(/{(\w+)}/g,(n,s)=>{var i;return((i=t[s])==null?void 0:i.toString())??`{${s}}`}),Hj=(e,t,n,s)=>e<t?n:s,Wj=(e,t,n,s,i)=>{const[l,c]=Fj(e,t),d=Hj(n,l,s,i);return Uj(d,{points:n,bestPoints:l,maxPoints:c})},qj=N("p")({name:"HighlightingContainer",class:"edh1r5zzja",propsAsIs:!1}),Vj=({worstScoreTemplate:e,bestScoreTemplate:t})=>{const n=Ct(c=>c.results),s=xe(c=>c.quest),i=xe(c=>c.currentTryPoints),l=Wj(s.id,n,i,e,t);return g.jsx(qj,{dangerouslySetInnerHTML:{__html:l}})},cf=({translations:e})=>{const[t,n]=b.useState(!0),{isBanExpired:s,expiresAt:i,onTimeEnds:l,refreshBanStatus:c}=l1(),d=Ct(K=>K.results),f=Ct(K=>K.refreshUserResults),m=xe(K=>K.setCurrentTryPoints),y=Lj(d),v=jj(d),w=xe(K=>K.quest),{successTitle:E,failureTitle:_}=e,T=e.buttonTitle,k=e.prizesTitle,M=e.questsTitle,P=e.bestScoreTemplate,$=e.worstScoreTemplate,q=Fv(),W=rn(K=>K.setIsPanelOpen),j=rn(K=>K.setIsRegistrationOpen),{restartQuest:D}=go(),Y=()=>{W(!0),j(!0)};return b.useEffect(()=>{Dj(w).then(({data:K})=>{var V;return c(),m(K.points),f((V=window.__widgetEdmap)==null?void 0:V.mapId)}).finally(()=>{Dv(w.id)})},[w]),b.useEffect(()=>{w!=null&&w.id&&a1(w.id).then()},[w==null?void 0:w.id]),g.jsx(Cj,{id:"edmap-widget__success",children:g.jsxs(bj,{children:[g.jsxs(Rj,{children:[g.jsx(Oj,{children:(d==null?void 0:d.allPoints)>0?E:_}),w.isAwardPointsShowned&&g.jsx(Vj,{worstScoreTemplate:$,bestScoreTemplate:P}),s?g.jsx(mn,{id:"edmap-widget__success-btn",onClick:D,title:T,isAccent:!0}):g.jsx(i1,{expiresAt:i,onTimeEnds:l})]}),!q&&t&&g.jsx(Kd,{setIsRegInfoVisible:n,openSignInModal:Y}),v.length>0&&y.length>0&&g.jsx(Pj,{}),v.length>0?g.jsxs(c1,{children:[g.jsx(u1,{children:k}),g.jsx(Mj,{children:v.map((K,V)=>g.jsx(qd,{index:V,prizeData:K,userPoints:d==null?void 0:d.allPoints},K==null?void 0:K.id))})]}):null,y.length>0?g.jsxs(c1,{children:[g.jsx(u1,{children:M}),g.jsx(Nj,{children:g.jsx(Yd,{quests:y})})]}):null]})})},Gj=Z("div")({name:"Gap",class:"edg5lnmft",propsAsIs:!1}),Qj=Z("div")({name:"ResourceWrapper",class:"edr1u056rp",propsAsIs:!1}),d1=Z("p")({name:"Text",class:"edtjt97q3",propsAsIs:!1}),Yj=Z("div")({name:"TooltipConent",class:"edt3zaxx",propsAsIs:!1}),Kj=Z("div")({name:"Container",class:"edc6pydkm",propsAsIs:!1}),Xj=[...new Intl.Segmenter("en",{granularity:"grapheme"}).segment("💪🏃‍♂️🧠❤️🔥💰🪵⛏️🍖🔮👾⭐️😒😊🌈🐋🦄😎🤢🤮🤡👺💩🤥🐷👑⌛️🛢️🪙💎🗡️🧬🎁🎉🧸🪆🪩📊❗️💖❤️‍🔥💔")].map(e=>e.segment),Jj=e=>[...e].map(t=>t.codePointAt(0)).join("-"),f1=Object.fromEntries(Xj.map(e=>[Jj(e),e])),p1=({iconId:e,text:t,...n})=>g.jsxs(Kj,{...n,children:[g.jsx("span",{children:f1[e]}),t?g.jsx("span",{children:t}):null]}),Zj=Z("div")({name:"TooltipContainer",class:"edtlfbks8",propsAsIs:!1}),e6=()=>({isStickLeft:e})=>e?"0":"102%",t6=()=>({isVisible:e})=>e?"visible":"hidden",n6=()=>({isVisible:e,isFading:t})=>e&&!t?"1":"0",r6=()=>({zIndex:e=100})=>e,s6=Z("div")({name:"TooltipContent",class:"edtlzs19l",propsAsIs:!1,vars:{"tlzs19l-0":[e6()],"tlzs19l-1":[t6()],"tlzs19l-2":[n6()],"tlzs19l-3":[r6()]}}),h1=e=>{let t;const n=new Set,s=(m,y)=>{const v=typeof m=="function"?m(t):m;if(!Object.is(v,t)){const w=t;t=y??(typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(E=>E(t,w))}},i=()=>t,d={setState:s,getState:i,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m))},f=t=e(s,i,d);return d},o6=e=>e?h1(e):h1,i6=e=>e;function a6(e,t=i6){const n=xt.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return xt.useDebugValue(n),n}const m1=e=>{const t=o6(e),n=s=>a6(t,s);return Object.assign(n,t),n},g1=(e=>e?m1(e):m1)(e=>({activeTooltip:null,setActiveTooltip:t=>e({activeTooltip:t}),currentZIndex:101,getNextZIndex:()=>(e(t=>({currentZIndex:t.currentZIndex+1})),g1.getState().currentZIndex)})),y1=({tooltipContent:e,children:t,isStickLeft:n,...s})=>{const[i,l]=b.useState(!1),[c,d]=b.useState(!1),[f,m]=b.useState(null),[y,v]=b.useState(100),{setActiveTooltip:w,getNextZIndex:E}=g1(),_=b.useRef(null),T=()=>{d(!1),f&&(clearTimeout(f),m(null));const M=E();v(M),w(_.current),l(!0)},k=()=>{d(!0);const M=setTimeout(()=>{l(!1),m(null),d(!1)},300);m(M)};return g.jsxs(Zj,{...s,onMouseEnter:T,onMouseLeave:k,children:[t,g.jsx(s6,{ref:_,className:"tooltip-content",isFading:c,isStickLeft:n,isVisible:i,onMouseEnter:T,onMouseLeave:k,style:{zIndex:y},children:e||""})]})},l6=({resource:e,animationClass:t,viewportRef:n})=>{const s=b.useRef(null),i=QL(s,n),l=i==="right"?"0":"unset",c=i==="right"?"unset":"-40px";return g.jsx(y1,{isStickLeft:!0,tooltipContent:g.jsx(Yj,{ref:s,style:{left:l,right:c},children:g.jsx(d1,{children:e.name})}),children:g.jsxs(Qj,{children:[g.jsx(p1,{style:{gap:"0"},iconId:e.iconId}),g.jsx(d1,{className:t,children:e.value})]})})},c6=({resources:e})=>{const[t,n]=b.useState(e),[s,i]=b.useState({}),l=b.useRef(null);b.useEffect(()=>{e.every(d=>t.find(f=>f.name===d.name))||(i({}),n(e))},[e]),b.useEffect(()=>{const d={};e.forEach((m,y)=>{const v=t[y],w=parseFloat(v==null?void 0:v.value.replace(/\s/g,""))||0,E=parseFloat(m==null?void 0:m.value.replace(/\s/g,""))||0;v?w<E?d[m.name]="increase":E<w?d[m.name]="decrease":d[m.name]="":d[m.name]="increase"}),i(d);const f=setTimeout(()=>{i({})},600);return n(e),()=>{clearTimeout(f),i({})}},[e]);const c=e.filter(({isVisible:d})=>d);return g.jsx(Gj,{ref:l,children:c.map((d,f)=>g.jsx(l6,{viewportRef:l,resource:d,animationClass:s[d.name]||""},f))})},u6=e=>e.reduce((t,n)=>({...t,[n.id]:`${f1[n.iconId]} ${n.name} ${n.value}`}),{}),v1=()=>{const e=lr(t=>t.currentResources);return b.useMemo(()=>u6(e),[e])},jl=e=>{const t=v1();return g.jsx(xi,{...e,replacements:t})},d6=e=>Array.from(new Set(e)),f6=(e,t)=>{const n=e.sourceEdges.filter(s=>!t.has(s.targetId));return d6(n.map(s=>s.targetId))},p6=(e,t)=>e.filter(n=>!t.has(n)),h6=()=>{const e=lr(i=>i.currentNode),t=b.useRef(new Set),n=b.useRef(new Set),s=b.useRef(0);b.useEffect(()=>{let i;return s.current=setTimeout(()=>{if(!e)return;const l=f6(e,t.current),c=p6(l,n.current);c.forEach(f=>n.current.add(f)),i=new AbortController;const d=c.map(async f=>{const m=await UO(f,i.signal);return await p0(m.imageUrls,"low"),t.current.add(f),n.current.delete(f),m});Promise.all(d)},2e3),()=>{clearTimeout(s.current),i&&i.abort()}},[e])},S1=N("div")({name:"AnswersContainer",class:"eda1nbdv32",propsAsIs:!1}),m6=N("span")({name:"SelectBelowText",class:"eds1wn0vwj",propsAsIs:!1}),g6=N("div")({name:"Divider",class:"edd1ctwus6",propsAsIs:!1}),y6=N("button")({name:"QuestAnswerCardWrapper",class:"edqfq64oi",propsAsIs:!1}),v6=N("div")({name:"Container",class:"edcbf1r91",propsAsIs:!1}),S6=({resourceIds:e})=>{const t=lr(n=>n.currentResources);return g.jsx(v6,{children:e.map(n=>{const s=t.find(i=>i.id===n);return g.jsx(p1,{iconId:s.iconId},n)})})},w6=b.forwardRef(({blocksArray:e,handleClick:t,jourenyEdgeId:n,failedResources:s,replacements:i,...l},c)=>{const d=m=>{m.preventDefault(),m.stopPropagation(),t(n)},f=s.length===0;return g.jsx(y1,{isStickLeft:!0,style:{flex:"1 1 calc(50% - 6px)"},tooltipContent:f?null:g.jsx(S6,{resourceIds:s}),children:g.jsx(y6,{"data-test":"button game",ref:c,style:{opacity:f?1:.6},isActive:!1,disabled:!f,onClick:d,...l,children:g.jsx(xi,{blocksArray:e,isJourneyWidgetText:!0,replacements:i})})})}),_6=Z("form")({name:"Form",class:"edf1c40yuf",propsAsIs:!1}),E6=Z("textarea")({name:"Container",class:"edc1gf2psj",propsAsIs:!1}),x6=(e,t)=>{b.useEffect(()=>{const n=e.current;if(!n)return;const s=()=>{n.style.height="auto",n.style.height=n.scrollHeight+"px"};return s(),n.addEventListener("input",s),()=>n.removeEventListener("input",s)},[e,t])},w1=e=>{const t=b.useRef(null),{placeholder:n}=$e(s=>s.translations.input);return x6(t),g.jsx(_6,{children:g.jsx(E6,{id:"answer",ref:t,maxLength:e.maxLength||250,placeholder:n,...e})})},T6=(e,t)=>{const n=v1(),s=lr(l=>l.setTextAnswer),i=lr(l=>l.textAnswer);return b.useEffect(()=>{s("")},[e==null?void 0:e.id]),[_s.inputAnswerNode,_s.ai].includes(e.type)?g.jsx(w1,{maxLength:e.responseLimit,value:i,onChange:l=>s(l.target.value)}):e.sourceEdges.map((l,c)=>g.jsx(w6,{isAccessable:l.isAccessable,jourenyEdgeId:l.id,failedResources:l.failedResources,replacements:n,handleClick:d=>t(d),blocksArray:l.richText.blocks,index:c},l.id))},k6=({node:e,handleAnswerClick:t})=>{const n=T6(e,t);return g.jsxs(S1,{children:[g.jsx(g6,{}),n]})},I6=N("div")({name:"Container",class:"edc5xh5du",propsAsIs:!1}),C6=N("div")({name:"HideableContent",class:"edh89x7rh",propsAsIs:!1}),b6=N("div")({name:"Container",class:"edc170a6p7",propsAsIs:!1}),R6=N("div")({name:"TimerPadding",class:"edt1jyjufh",propsAsIs:!1}),A6=()=>{const t=xe(n=>n.quest).timeLimitSeconds===0;return g.jsx(b6,{children:t?null:g.jsx(R6,{children:g.jsx(e1,{type:"horizontal"})})})},uf=({children:e})=>{const t=Nr(i=>i.isHidden),n=Nr(i=>i.setRef),s=b.useRef(null);return b.useEffect(()=>{n(s)},[]),g.jsxs(I6,{children:[g.jsx(A6,{}),g.jsx(C6,{ref:s,style:{opacity:t?0:1,transition:`all ${Cl}ms ease-out `},children:e})]})},P6=N("div")({name:"Container",class:"edc1i9husi",propsAsIs:!1}),O6=N("div")({name:"DotsContainer",class:"eddsynemh",propsAsIs:!1}),df=N("div")({name:"Dot",class:"edd1itpe37",propsAsIs:!1}),_1=({children:e})=>{const t=Nr(n=>n.preloader);return t?g.jsx(P6,{children:g.jsxs(O6,{children:[t.text,g.jsx(df,{}),g.jsx(df,{}),g.jsx(df,{})]})}):e},N6=()=>{const{makeStep:e}=go(),t=xe(l=>l.isFinished),n=lr(l=>l.currentNode),s=lr(l=>l.currentResources),i=$e(l=>l.translations.journeyCard);return h6(),g.jsx(uf,{children:g.jsxs(_1,{children:[g.jsxs(X0,{children:[g.jsx(jl,{isNodeDescription:!0,blocksArray:n.data.blocks}),n.extraData?g.jsx(jl,{isNodeDescription:!0,blocksArray:n.extraData.blocks}):null,s.length>0&&g.jsx(c6,{resources:s})]}),t?g.jsx(cf,{translations:i}):g.jsx(k6,{node:n,handleAnswerClick:l=>e({journeyEdgeId:l})})]})})},M6=N("div")({name:"RichTextPadding",class:"edr6z9biq",propsAsIs:!1}),E1=N("div")({name:"InputPadding",class:"edi1dcyqey",propsAsIs:!1}),L6=()=>{const e=xe(y=>y.isFinished),t=mo(y=>y.richTextToDisplay),n=mo(y=>y.points),s=xe(y=>{var v;return(v=y.quest)==null?void 0:v.details.stepCount}),i=xe(y=>{var v;return(v=y.quest)==null?void 0:v.maxPoints}),l=mo(y=>y.textAnswer),c=mo(y=>y.setTextAnswer),d=mo(y=>y.currentQuestion),f=$e(y=>y.translations.repetitiveTrainer),m=i/(s||1);return g.jsx(uf,{children:g.jsx(_1,{children:g.jsx(M6,{children:e?g.jsx(cf,{translations:f}):g.jsxs(g.Fragment,{children:[g.jsxs("p",{children:[f.currentScore," : ",m*n,"/",i]}),t?g.jsx(jl,{blocksArray:t.blocks,isJourneyWidgetText:!0}):d?g.jsxs(E1,{children:[g.jsx(jl,{isJourneyWidgetText:!0,blocksArray:[{type:"paragraph",data:{text:(d==null?void 0:d.text)||""}}]}),g.jsx(E1,{children:g.jsx(w1,{maxLength:250,value:l,onChange:y=>c(y.target.value)})})]}):null]})})})})},j6=N("div")({name:"AnswersWrapper",class:"eda1vi3dgi",propsAsIs:!1}),D6=Z("label")({name:"Label",class:"edlzct43p",propsAsIs:!1}),F6=Z("input")({name:"HiddenInput",class:"edhtu66xn",propsAsIs:!1}),$6=()=>e=>e.isChecked?"var(--checkbox-bg-active)":"var(--checkbox-bg-default)",B6=Z("div")({name:"CustomInput",class:"edchq6avi",propsAsIs:!1,vars:{"chq6avi-0":[$6()]}}),z6=({label:e,id:t,name:n,index:s,onChange:i,isInsideChecked:l=null})=>{const c=d=>{const f=d.target.checked;i==null||i(f)};return g.jsxs(D6,{htmlFor:t,"data-testid":`edmap-widget__test-answer-${s+1}`,children:[g.jsx(F6,{id:t,name:n,type:"checkbox",checked:l,value:!l,onChange:c}),g.jsx(B6,{isChecked:l,children:l?g.jsx("svg",{width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M1.5 7.56812L8.12121 14.1893L20.5 1.81055",stroke:"white",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"round"})}):null}),g.jsx(xi,{isAnswer:!0,blocksArray:e})]})},U6=({label:e,name:t,id:n,index:s,onChange:i,isInsideChecked:l=null})=>{const[c,d]=b.useState(!1),f=m=>{d(m),i==null||i(m)};return g.jsx(z6,{name:t,label:e,id:n,index:s,onChange:f,isInsideChecked:l||c})},H6=()=>{var d;const e=xe(f=>{var m;return(m=f.quest)==null?void 0:m.id}),t=bl(f=>f.currentQuestion),n=xe(f=>f.isFinished),s=bl(f=>f.addAnswer),i=$e(f=>f.translations.testCard),l=bl(f=>f.removeAnswer),c=(f,m,y)=>{y?s(e,f,m):l(f)};return g.jsx(uf,{children:n?g.jsx(cf,{translations:i}):g.jsxs(g.Fragment,{children:[g.jsx(X0,{children:g.jsx(xi,{id:"edmap-widget__test-question",blocksArray:(d=t==null?void 0:t.text)==null?void 0:d.blocks})}),g.jsxs(S1,{children:[g.jsx(m6,{children:i.chooseAnswer}),g.jsx(j6,{id:"edmap-widget__test-answers",children:t==null?void 0:t.answers.map((f,m)=>{var y;return g.jsx(U6,{index:m,label:(y=f==null?void 0:f.text)==null?void 0:y.blocks,id:f==null?void 0:f.id,onChange:v=>c(f==null?void 0:f.id,t==null?void 0:t.id,v)},f==null?void 0:f.id)})})]})]})})},W6=()=>{const e=xe(t=>t.quest);if(e!=null&&e.id)return e.questType==="Test"?g.jsx(H6,{}):e.questType==="Journey"?g.jsx(N6,{}):e.questType===Ie.repetitionTrainer?g.jsx(L6,{}):null},q6=xt.memo(W6),V6=({children:e})=>{const t=xe(n=>n.quest);return t!=null&&t.id?g.jsx("div",{children:e}):null},ff=350,G6=1,Q6=()=>{const e=xe(i=>i.quest),[t,n]=b.useState(!1);b.useEffect(()=>{if(!t)return;const i=setTimeout(()=>{yr.reportWidgetView()},G6*1e3);return()=>{clearTimeout(i)}},[t,e==null?void 0:e.id,e==null?void 0:e.mapId]),b.useEffect(()=>{yr.dropUserActivation()},[e==null?void 0:e.id,e==null?void 0:e.mapId]),b.useEffect(()=>{const i=()=>{yr.drainPendingAnalytics()};return window.addEventListener("pagehide",i),()=>{window.removeEventListener("pagehide",i)}},[]);const s=b.useCallback(i=>{i&&n(!i)},[]);return g.jsxs(g.Fragment,{children:[g.jsx(Es,{topOffset:-ff,setIsSensorTriggered:s,isBottomUpTriggered:!0,color:"blue",className:"view-counter-out",isPortal:!1}),g.jsx(Es,{topOffset:-ff,setIsSensorTriggered:n,color:"green",className:"view-counter-enter",isPortal:!1}),g.jsx(Es,{bottomOffset:ff,setIsSensorTriggered:n,isBottomUpTriggered:!0,color:"yellow",className:"view-counter-enter",isPortal:!1,isStickToBottom:!0}),g.jsx(Es,{topOffset:0,setIsSensorTriggered:s,color:"green",className:"view-counter-out",isPortal:!1,isStickToBottom:!0})]})},Y6=()=>{const e=xe(t=>t.quest);return b.useLayoutEffect(()=>{e!=null&&e.id&&localStorage.setItem("analytics",`${e.mapId}@${e.id}`)},[e==null?void 0:e.id]),null},K6=N("div")({name:"Container",class:"edc1auin7k",propsAsIs:!1}),X6=N("p")({name:"Message",class:"edm1eukdy8",propsAsIs:!1}),x1={OPENAI_CONNECTION_FAIL:{translationKey:"errors.gpt.connectionFail",getReplacement:()=>({})},OPENAI_INSUFFICIENT_QUOTA:{translationKey:"errors.gpt.insufficientQuota",getReplacement:()=>({domain:window.location.hostname})},OPENAI_RATE_LIMIT:{translationKey:"errors.gpt.rateLimit",getReplacement:()=>({domain:window.location.hostname})},OPENAI_INVALID_KEY:{translationKey:"errors.gpt.invalidKey",getReplacement:()=>({domain:window.location.hostname})},OPENAI_USER_TOKEN_LIMIT_EXCEEDED:{translationKey:"errors.gpt.userTokenLimitExceeded",getReplacement:e=>{const t=new Intl.RelativeTimeFormat($e.getState().localeName,{style:"long"}),n=Math.floor(e.meta.remainingMs/6e4);return{time:t.format(n,"minute")}}}},J6=({children:e})=>{const[t,n]=b.useState(null);if(b.useEffect(()=>{const l=({reason:c})=>{var v;if(!(c instanceof JE)){Ll.setState({error:c});return}if(!!!((v=c.response)!=null&&v.data)){Ll.setState({error:c});return}const m=c.response.data;if(!!!x1[m.code]){Ll.setState({error:c});return}n(m)};return window.addEventListener("unhandledrejection",l),()=>{window.removeEventListener("unhandledrejection",l)}},[]),!t)return e;const{translationKey:s,getReplacement:i}=x1[t.code];return g.jsxs(K6,{children:[g.jsx(X6,{children:O3(s,i(t))}),g.jsx(s1,{})]})},T1=()=>{const e=b.useRef(),t=Ol(P=>P.widgetContainerStyle),[n,s]=b.useState(!1),[i,l]=b.useState(!1),c=t1(P=>P.height),d=ar(P=>P.marginRootTop),f=ar(P=>P.setTopOffset),m=Ml(P=>P.setWidth),y=Ml(P=>P.top),v=n1(P=>P.height),w=Ml(P=>P.setTop),E=Nl(P=>P.setIsTimerOverlapped),_=b.useRef(),T=b.useRef(),k=30;Ij(e,m),b.useEffect(()=>{e.current&&w(e.current.getBoundingClientRect().top+window.scrollY)},[e]),b.useEffect(()=>{if(!i)return;const P=()=>{const $=T.current;if(!$)return;const W=$.getBoundingClientRect().top;f(Math.max(0,-W))};return window.addEventListener("scroll",P),P(),()=>{f(0),window.removeEventListener("scroll",P)}},[i,c]);const M=y-d;return g.jsxs("edmap-view-root",{id:"edmap-view-root",children:[g.jsxs(aL,{className:"sensor root",children:[g.jsx(Es,{className:"widget-trigger-header-stick",setIsSensorTriggered:s,topOffset:`${-d}px`,ref:_,isPortal:!1}),g.jsx(Es,{setIsSensorTriggered:E,topOffset:`${M+c-k}px`}),g.jsx(Q6,{}),g.jsxs(iL,{ref:e,style:{...t},children:[g.jsx(o1,{children:g.jsxs(V6,{children:[g.jsxs(lL,{children:[g.jsx(tj,{isSticky:n,parentRef:e}),g.jsx(cL,{children:g.jsx(J6,{children:g.jsx(wj,{children:g.jsx(kj,{children:g.jsx(q6,{})})})})})]}),g.jsx(lj,{})]})}),g.jsx(Y6,{})]}),g.jsx(Es,{isPortal:!1,isStickToBottom:!0,color:"black",className:"bottom sensor",setIsSensorTriggered:l,bottomOffset:`${v+c+d}px`,isBottomUpTriggered:!1,ref:T})]}),g.jsx(H4,{})]})},Z6=N("div")({name:"WrapperForStyles",class:"edw1ckr4k2",propsAsIs:!1}),e5=N("div")({name:"Container",class:"edc1moeqqj",propsAsIs:!1}),t5=N("div")({name:"Container",class:"edcrg0ist",propsAsIs:!1}),n5=N("p")({name:"EmptyQuestsMessage",class:"ede1tl4sfq",propsAsIs:!1}),r5=N("div")({name:"Container",class:"edcjx2ut5",propsAsIs:!1}),s5=N("p")({name:"Title",class:"edt75yszp",propsAsIs:!1}),k1=({title:e,children:t})=>g.jsxs(r5,{children:[g.jsx(s5,{children:e}),t]}),o5=({quests:e})=>{const t=$e(s=>s.translations.questList),n=!e||e.length===0;return g.jsx(k1,{title:t.title,children:g.jsx(t5,{children:n?g.jsx(n5,{children:t.emptyQuestsWarning}):g.jsx(Yd,{quests:e})})})},i5=N("div")({name:"PrizesContainer",class:"edp1163kd8",propsAsIs:!1}),a5=()=>{const e=Ct(s=>s.results),t=$e(s=>s.translations.prizeList),n=(e==null?void 0:e.prizes)||[];return!n||n.length===0?null:g.jsx(k1,{title:t.title,children:g.jsx(i5,{children:n.map((s,i)=>g.jsx(qd,{prizeData:s,userPoints:(e==null?void 0:e.allPoints)||0,index:i},s.id))})})},l5=()=>{const e=Ct(s=>s.results),t=(e==null?void 0:e.quests)||[],n=Ol(s=>s.widgetContainerStyle);return g.jsx(Z6,{style:n,children:g.jsx(e5,{children:g.jsxs(o1,{children:[g.jsx(o5,{quests:t}),g.jsx(a5,{}),g.jsx(T0,{}),g.jsx(q0,{})]})})})},c5=[zd,Ud,qv],I1={color:{[Hv]:["light"],[zd]:[],[NP]:["white","blue"]},rounded:{[Wv]:["rounded"],[Ud]:[]},text:{[MP]:["bold","text"],[qv]:[]},wordWrap:{[LP]:[],[jP]:["nowrap"]}},u5=Object.keys(I1).map(e=>Object.entries(I1[e]).sort(([t,n],[s,i])=>i.length-n.length)),d5=e=>{if(!e)return c5;const t=e.split("-");return u5.map(s=>s.find(([i,l])=>l.every(c=>t.includes(c)))).map(s=>s[0])},f5={"--main-color":["--edmap-main-color"],"--main-shadow-color":["--edmap-main-color-shadow"],"--main-dark-color":["--edmap-main-color-dark"],"--text-on-main":["--edmap-text-on-main"]},p5=e=>{const t={};return Object.keys(e).forEach(n=>{f5[n].forEach(s=>{t[s]=e[n]})}),t},h5=()=>{var t;const e=p5(((t=window==null?void 0:window.__widgetEdmap)==null?void 0:t.cssVariablesOverride)??{});Object.keys(e).forEach(n=>{document.body.style.setProperty(n,e[n],"important")})},m5=()=>{var n;const e=((n=window.__widgetEdmap)==null?void 0:n.headerOffset)||0,t=e!==null&&typeof e=="object";return t?y5(t,e):[{width:0,value:Dl(e)}]},g5=e=>Object.keys(e).sort((n,s)=>s-n).map(n=>({width:Number(n),value:e[n]})),y5=(e,t)=>{if(!e)return Dl(t);const n=Object.keys(t).reduce((s,i)=>{const l=Dl(i),c=Dl(t[i]);return{...s,[l]:c}},{});return g5(n)},Dl=e=>Number.parseFloat(e)||0,v5=()=>{const[e,t]=b.useState(window.innerWidth);S5(e),b.useEffect(()=>{const n=()=>t(window.innerWidth);n(),window.addEventListener("resize",n)},[])},S5=e=>{const t=ar(i=>i.breakPoints),n=ar(i=>i.setMarginRootTop),s=ar(i=>i.marginRootTop);b.useEffect(()=>{if(!t)return;const i=t.find(l=>e>l.width);i&&i.value!==s&&n(i.value)},[t,e,e])},w5=[Hv,zd,Wv,Ud],_5=[{id:"edmap-widget__container",Component:T1},{id:"edmap-widget-quest-picker__container",Component:l5}];console.log("Выполнен код вне корня");function E5({mode:e=null}){var P;const t=xe($=>$.setQuest),{cleanQuestInit:n}=go(),s=Ct($=>$.setUserResults),i=Ct($=>$.setPointsAreReceived),l=$e($=>$.setLocale),c=ar($=>$.setBreakPoints),{setPopupBarStyle:d,setWidgetContainerStyle:f}=Ol(),[m,y]=b.useState([]);v5();const v=oL(e,window.location.pathname),E=new URLSearchParams(window.location.search).get("temp-auth-code"),_=async($,q,W)=>{let j=null;return q==="admin"?j=await kP(W):j=await TP($,W),j},T=()=>{const $=_5.filter(({id:q})=>document.getElementById(q));y($)},k=()=>{var $;document.body.classList.remove(...w5),document.body.classList.add(...d5(($=window==null?void 0:window.__widgetEdmap)==null?void 0:$.theme)),h5()},M=()=>{T(),k()};return b.useEffect(()=>{M()},[]),b.useEffect(()=>{window.__widgetEdmap&&(window.__widgetEdmap.mode=e)},[e]),b.useEffect(()=>{(async()=>{var W;const q=(W=window==null?void 0:window.__widgetEdmap)==null?void 0:W.mapId;if(q){i(!1);try{if(!m.some(({id:Y})=>Y==="edmap-widget__container")&&e!=="admin")return;const D=await _(q,e,v);if(!D)return;t(D),await n(D)}catch(j){Dn(j),console.error("Error during initialization:",j)}}})()},[e,v,m]),b.useEffect(()=>{var q;const $=(q=window==null?void 0:window.__widgetEdmap)==null?void 0:q.mapId;$&&xP($,E).then(W=>{l(W.map.widgetUILanguage),s(W)})},[E,v]),b.useEffect(()=>{m.forEach(({id:$})=>{const q=document.getElementById($);q&&(q.dataset.popupBarStyle&&d(K0(q.dataset.popupBarStyle)),q.dataset.widgetContainerStyle&&f(K0(q.dataset.widgetContainerStyle)))})},[m]),b.useEffect(()=>{const $=m5();c($)},[]),e==="admin"?g.jsx(T1,{}):m.length===0||!((P=window==null?void 0:window.__widgetEdmap)!=null&&P.mapId)?null:g.jsxs(g.Fragment,{children:[m.map(({id:$,Component:q})=>{const W=document.getElementById($);return W?g.jsx(Ti,{parentElement:W,children:g.jsx(q,{})},$+(window.location.pathname||"")):null}),e!=="admin"&&g.jsx(Ti,{parentElement:document.body,children:g.jsx(sL,{})},window.location.pathname||"")]})}uP({dsn:"https://f54e3fc0fb41b6b943cd81aa16c927d3@o4508675319726080.ingest.de.sentry.io/4508676111138896",integrations:[iP(),GA()],tracesSampleRate:1,tracePropagationTargets:["localhost","https://api.edmap.space"],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});const x5=e=>new Promise(t=>{setTimeout(t,e)}),T5=async e=>{let t=0;for(;t<10;){for(const n of e){const s=document.getElementById(n);if(s)return console.log(`${n} was found`),s}await x5(200+100*t),t++}return null};let pf=!1;const C1=async()=>{if(!pf){pf=!0;try{await T5(["edmap-widget__container","edmap-widget-quest-picker__container"])&&k5()}finally{pf=!1}}},k5=()=>{if(typeof window>"u"){console.log("Widget loaded in node env");return}let e=document.querySelector("#invisible-edmap-container");e&&e.remove(),e=document.createElement("div"),e.setAttribute("id","invisible-edmap-container"),e.style.display="none",e.style.pointerEvents="none",document.body.appendChild(e);const t=x_.createRoot(e);window.__edmapRoot=t,t.render(g.jsx(b.StrictMode,{children:g.jsx(E5,{})}))};function b1(e,t,n=!1){let s;function i(){const l=this,c=arguments,d=function(){s=null,n||e.apply(l,c)},f=n&&!s;clearTimeout(s),s=setTimeout(d,t),f&&e.apply(l,c)}return i.cancel=function(){clearTimeout(s),s=null},i}(function(){window.__widgetEdmap=window.__widgetEdmap||{};let e=0;const t=b1(()=>{C1()},50),n=()=>{const i=window.__edmapRoot;window.__edmapRoot?Promise.resolve().then(()=>{window.__edmapRoot&&(i.unmount(),OP(),C1())}):t()},s=b1(i=>{e=i},300);window.addEventListener("edmap-routing-triggered",i=>{var c,d,f;if(document.getElementById("edmap-view-root")){console.log("routing ignored");return}const l=i.detail.type;if(l==="pushState"&&n(l,i.detail),l=="replaceState"){const m=(f=(d=(c=i.detail)==null?void 0:c.args)==null?void 0:d[0])==null?void 0:f.scrollY;if(!(typeof m=="number"&&!Number.isNaN(m)))return;e===m?n():s(m);return}if(l==="popstate"){n(),e=0;return}}),window.addEventListener(ht.unmounted,()=>{console.log("unmount triggered search for container"),n()}),n(),console.log("routing trigger loaded")})()})();
