@mevdragon/vidfarm-devcli 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/farmville-saas-ux/SKILL.md +156 -0
- package/.agents/skills/farmville-saas-ux/assets/starter.html +294 -0
- package/.agents/skills/farmville-saas-ux/references/components.md +340 -0
- package/.agents/skills/farmville-saas-ux/references/porting-guide.md +121 -0
- package/.agents/skills/farmville-saas-ux/references/tokens.md +271 -0
- package/.agents/skills/vidfarm-media/SKILL.md +2 -1
- package/.agents/skills/vidfarm-media/references/tts.md +20 -1
- package/demo/dist/app.css +1 -1
- package/demo/dist/app.js +74 -74
- package/dist/src/account-pages-legacy.js +2 -2
- package/dist/src/app.js +682 -12
- package/dist/src/config.js +13 -0
- package/dist/src/editor-chat.js +3 -2
- package/dist/src/frontend/homepage-client.js +211 -2
- package/dist/src/frontend/homepage-shared.js +197 -0
- package/dist/src/frontend/homepage-store.js +39 -1
- package/dist/src/frontend/homepage-view.js +150 -5
- package/dist/src/homepage.js +234 -18
- package/dist/src/landing-page.js +367 -0
- package/dist/src/primitive-registry.js +278 -2
- package/dist/src/reskin/agency-page.js +255 -0
- package/dist/src/reskin/calendar-page.js +252 -0
- package/dist/src/reskin/chat-page.js +414 -0
- package/dist/src/reskin/discover-page.js +380 -0
- package/dist/src/reskin/document.js +74 -0
- package/dist/src/reskin/help-page.js +318 -0
- package/dist/src/reskin/index-page.js +62 -0
- package/dist/src/reskin/job-runs-page.js +249 -0
- package/dist/src/reskin/library-page.js +515 -0
- package/dist/src/reskin/login-page.js +225 -0
- package/dist/src/reskin/pricing-page.js +359 -0
- package/dist/src/reskin/settings-page.js +353 -0
- package/dist/src/reskin/theme.js +265 -0
- package/dist/src/services/serverless-records.js +63 -0
- package/dist/src/services/swipe-customize.js +434 -0
- package/package.json +1 -1
- package/public/assets/homepage-client-app.js +23 -23
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var CI=Object.create;var Ug=Object.defineProperty;var AI=Object.getOwnPropertyDescriptor;var MI=Object.getOwnPropertyNames;var LI=Object.getPrototypeOf,OI=Object.prototype.hasOwnProperty;var Xr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var DI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of MI(t))!OI.call(e,o)&&o!==r&&Ug(e,o,{get:()=>t[o],enumerable:!(n=AI(t,o))||n.enumerable});return e};var mr=(e,t,r)=>(r=e!=null?CI(LI(e)):{},DI(t||!e||!e.__esModule?Ug(r,"default",{value:e,enumerable:!0}):r,e));var N0=Xr(V=>{"use strict";var Ca=Symbol.for("react.element"),fM=Symbol.for("react.portal"),mM=Symbol.for("react.fragment"),hM=Symbol.for("react.strict_mode"),gM=Symbol.for("react.profiler"),SM=Symbol.for("react.provider"),yM=Symbol.for("react.context"),vM=Symbol.for("react.forward_ref"),_M=Symbol.for("react.suspense"),EM=Symbol.for("react.memo"),TM=Symbol.for("react.lazy"),y0=Symbol.iterator;function bM(e){return e===null||typeof e!="object"?null:(e=y0&&e[y0]||e["@@iterator"],typeof e=="function"?e:null)}var E0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T0=Object.assign,b0={};function Fi(e,t,r){this.props=e,this.context=t,this.refs=b0,this.updater=r||E0}Fi.prototype.isReactComponent={};Fi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Fi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function I0(){}I0.prototype=Fi.prototype;function pm(e,t,r){this.props=e,this.context=t,this.refs=b0,this.updater=r||E0}var fm=pm.prototype=new I0;fm.constructor=pm;T0(fm,Fi.prototype);fm.isPureReactComponent=!0;var v0=Array.isArray,x0=Object.prototype.hasOwnProperty,mm={current:null},k0={key:!0,ref:!0,__self:!0,__source:!0};function w0(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)x0.call(t,n)&&!k0.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:Ca,type:e,key:i,ref:s,props:o,_owner:mm.current}}function IM(e,t){return{$$typeof:Ca,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ca}function xM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var _0=/\/+/g;function dm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xM(""+e.key):t.toString(36)}function uu(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ca:case fM:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+dm(s,0):n,v0(o)?(r="",e!=null&&(r=e.replace(_0,"$&/")+"/"),uu(o,t,r,"",function(c){return c})):o!=null&&(hm(o)&&(o=IM(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_0,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",v0(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+dm(i,a);s+=uu(i,t,r,l,o)}else if(l=bM(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+dm(i,a++),s+=uu(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function cu(e,t,r){if(e==null)return e;var n=[],o=0;return uu(e,n,"","",function(i){return t.call(r,i,o++)}),n}function kM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vt={current:null},du={transition:null},wM={ReactCurrentDispatcher:vt,ReactCurrentBatchConfig:du,ReactCurrentOwner:mm};function R0(){throw Error("act(...) is not supported in production builds of React.")}V.Children={map:cu,forEach:function(e,t,r){cu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return cu(e,function(){t++}),t},toArray:function(e){return cu(e,function(t){return t})||[]},only:function(e){if(!hm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};V.Component=Fi;V.Fragment=mM;V.Profiler=gM;V.PureComponent=pm;V.StrictMode=hM;V.Suspense=_M;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wM;V.act=R0;V.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=T0({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=mm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)x0.call(t,l)&&!k0.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Ca,type:e.type,key:o,ref:i,props:n,_owner:s}};V.createContext=function(e){return e={$$typeof:yM,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:SM,_context:e},e.Consumer=e};V.createElement=w0;V.createFactory=function(e){var t=w0.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:vM,render:e}};V.isValidElement=hm;V.lazy=function(e){return{$$typeof:TM,_payload:{_status:-1,_result:e},_init:kM}};V.memo=function(e,t){return{$$typeof:EM,type:e,compare:t===void 0?null:t}};V.startTransition=function(e){var t=du.transition;du.transition={};try{e()}finally{du.transition=t}};V.unstable_act=R0;V.useCallback=function(e,t){return vt.current.useCallback(e,t)};V.useContext=function(e){return vt.current.useContext(e)};V.useDebugValue=function(){};V.useDeferredValue=function(e){return vt.current.useDeferredValue(e)};V.useEffect=function(e,t){return vt.current.useEffect(e,t)};V.useId=function(){return vt.current.useId()};V.useImperativeHandle=function(e,t,r){return vt.current.useImperativeHandle(e,t,r)};V.useInsertionEffect=function(e,t){return vt.current.useInsertionEffect(e,t)};V.useLayoutEffect=function(e,t){return vt.current.useLayoutEffect(e,t)};V.useMemo=function(e,t){return vt.current.useMemo(e,t)};V.useReducer=function(e,t,r){return vt.current.useReducer(e,t,r)};V.useRef=function(e){return vt.current.useRef(e)};V.useState=function(e){return vt.current.useState(e)};V.useSyncExternalStore=function(e,t,r){return vt.current.useSyncExternalStore(e,t,r)};V.useTransition=function(){return vt.current.useTransition()};V.version="18.3.1"});var pn=Xr((M9,C0)=>{"use strict";C0.exports=N0()});var Y0=Xr(ge=>{"use strict";function Tm(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<pu(o,t))e[n]=t,e[r]=o,r=n;else break e}}function xr(e){return e.length===0?null:e[0]}function mu(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var s=2*(n+1)-1,a=e[s],l=s+1,c=e[l];if(0>pu(a,r))l<o&&0>pu(c,a)?(e[n]=c,e[l]=r,n=l):(e[n]=a,e[s]=r,n=s);else if(l<o&&0>pu(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function pu(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(B0=performance,ge.unstable_now=function(){return B0.now()}):(vm=Date,F0=vm.now(),ge.unstable_now=function(){return vm.now()-F0});var B0,vm,F0,$r=[],Fn=[],AM=1,ir=null,lt=3,hu=!1,Uo=!1,La=!1,$0=typeof setTimeout=="function"?setTimeout:null,j0=typeof clearTimeout=="function"?clearTimeout:null,H0=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bm(e){for(var t=xr(Fn);t!==null;){if(t.callback===null)mu(Fn);else if(t.startTime<=e)mu(Fn),t.sortIndex=t.expirationTime,Tm($r,t);else break;t=xr(Fn)}}function Im(e){if(La=!1,bm(e),!Uo)if(xr($r)!==null)Uo=!0,km(xm);else{var t=xr(Fn);t!==null&&wm(Im,t.startTime-e)}}function xm(e,t){Uo=!1,La&&(La=!1,j0(Oa),Oa=-1),hu=!0;var r=lt;try{for(bm(t),ir=xr($r);ir!==null&&(!(ir.expirationTime>t)||e&&!V0());){var n=ir.callback;if(typeof n=="function"){ir.callback=null,lt=ir.priorityLevel;var o=n(ir.expirationTime<=t);t=ge.unstable_now(),typeof o=="function"?ir.callback=o:ir===xr($r)&&mu($r),bm(t)}else mu($r);ir=xr($r)}if(ir!==null)var i=!0;else{var s=xr(Fn);s!==null&&wm(Im,s.startTime-t),i=!1}return i}finally{ir=null,lt=r,hu=!1}}var gu=!1,fu=null,Oa=-1,W0=5,G0=-1;function V0(){return!(ge.unstable_now()-G0<W0)}function _m(){if(fu!==null){var e=ge.unstable_now();G0=e;var t=!0;try{t=fu(!0,e)}finally{t?Ma():(gu=!1,fu=null)}}else gu=!1}var Ma;typeof H0=="function"?Ma=function(){H0(_m)}:typeof MessageChannel<"u"?(Em=new MessageChannel,z0=Em.port2,Em.port1.onmessage=_m,Ma=function(){z0.postMessage(null)}):Ma=function(){$0(_m,0)};var Em,z0;function km(e){fu=e,gu||(gu=!0,Ma())}function wm(e,t){Oa=$0(function(){e(ge.unstable_now())},t)}ge.unstable_IdlePriority=5;ge.unstable_ImmediatePriority=1;ge.unstable_LowPriority=4;ge.unstable_NormalPriority=3;ge.unstable_Profiling=null;ge.unstable_UserBlockingPriority=2;ge.unstable_cancelCallback=function(e){e.callback=null};ge.unstable_continueExecution=function(){Uo||hu||(Uo=!0,km(xm))};ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W0=0<e?Math.floor(1e3/e):5};ge.unstable_getCurrentPriorityLevel=function(){return lt};ge.unstable_getFirstCallbackNode=function(){return xr($r)};ge.unstable_next=function(e){switch(lt){case 1:case 2:case 3:var t=3;break;default:t=lt}var r=lt;lt=t;try{return e()}finally{lt=r}};ge.unstable_pauseExecution=function(){};ge.unstable_requestPaint=function(){};ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=lt;lt=e;try{return t()}finally{lt=r}};ge.unstable_scheduleCallback=function(e,t,r){var n=ge.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:AM++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,Tm(Fn,e),xr($r)===null&&e===xr(Fn)&&(La?(j0(Oa),Oa=-1):La=!0,wm(Im,r-n))):(e.sortIndex=o,Tm($r,e),Uo||hu||(Uo=!0,km(xm))),e};ge.unstable_shouldYield=V0;ge.unstable_wrapCallback=function(e){var t=lt;return function(){var r=lt;lt=t;try{return e.apply(this,arguments)}finally{lt=r}}}});var K0=Xr((Z9,q0)=>{"use strict";q0.exports=Y0()});var Zb=Xr(Yt=>{"use strict";var MM=pn(),Gt=K0();function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rT=new Set,rl={};function Xo(e,t){ss(e,t),ss(e+"Capture",t)}function ss(e,t){for(rl[e]=t,e=0;e<t.length;e++)rT.add(t[e])}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xm=Object.prototype.hasOwnProperty,LM=/^[: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]*$/,X0={},J0={};function OM(e){return Xm.call(J0,e)?!0:Xm.call(X0,e)?!1:LM.test(e)?J0[e]=!0:(X0[e]=!0,!1)}function DM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function PM(e,t,r,n){if(t===null||typeof t>"u"||DM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tt(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new Tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new Tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new Tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new Tt(e,2,!1,e,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(e){et[e]=new Tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){et[e]=new Tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){et[e]=new Tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){et[e]=new Tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){et[e]=new Tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var $h=/[\-:]([a-z])/g;function jh(e){return e[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(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($h,jh);et[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){et[e]=new Tt(e,1,!1,e.toLowerCase(),null,!1,!1)});et.xlinkHref=new Tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){et[e]=new Tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wh(e,t,r,n){var o=et.hasOwnProperty(t)?et[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PM(t,r,o,n)&&(r=null),n||o===null?OM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var bn=MM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Su=Symbol.for("react.element"),$i=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),Gh=Symbol.for("react.strict_mode"),Jm=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),Vh=Symbol.for("react.forward_ref"),Qm=Symbol.for("react.suspense"),Zm=Symbol.for("react.suspense_list"),Yh=Symbol.for("react.memo"),zn=Symbol.for("react.lazy"),iT=Symbol.for("react.offscreen"),Q0=Symbol.iterator;function Da(e){return e===null||typeof e!="object"?null:(e=Q0&&e[Q0]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,Rm;function ja(e){if(Rm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rm=t&&t[1]||""}return`
|
|
2
|
-
`+Rm+e}var
|
|
1
|
+
var Mk=Object.create;var Uh=Object.defineProperty;var Lk=Object.getOwnPropertyDescriptor;var Ok=Object.getOwnPropertyNames;var Pk=Object.getPrototypeOf,Dk=Object.prototype.hasOwnProperty;var Zr=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Uk=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ok(t))!Dk.call(e,o)&&o!==r&&Uh(e,o,{get:()=>t[o],enumerable:!(n=Lk(t,o))||n.enumerable});return e};var vr=(e,t,r)=>(r=e!=null?Mk(Pk(e)):{},Uk(t||!e||!e.__esModule?Uh(r,"default",{value:e,enumerable:!0}):r,e));var CE=Zr(X=>{"use strict";var Na=Symbol.for("react.element"),gM=Symbol.for("react.portal"),hM=Symbol.for("react.fragment"),SM=Symbol.for("react.strict_mode"),vM=Symbol.for("react.profiler"),yM=Symbol.for("react.provider"),_M=Symbol.for("react.context"),EM=Symbol.for("react.forward_ref"),TM=Symbol.for("react.suspense"),bM=Symbol.for("react.memo"),kM=Symbol.for("react.lazy"),vE=Symbol.iterator;function wM(e){return e===null||typeof e!="object"?null:(e=vE&&e[vE]||e["@@iterator"],typeof e=="function"?e:null)}var EE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},TE=Object.assign,bE={};function Hi(e,t,r){this.props=e,this.context=t,this.refs=bE,this.updater=r||EE}Hi.prototype.isReactComponent={};Hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kE(){}kE.prototype=Hi.prototype;function pm(e,t,r){this.props=e,this.context=t,this.refs=bE,this.updater=r||EE}var fm=pm.prototype=new kE;fm.constructor=pm;TE(fm,Hi.prototype);fm.isPureReactComponent=!0;var yE=Array.isArray,wE=Object.prototype.hasOwnProperty,mm={current:null},IE={key:!0,ref:!0,__self:!0,__source:!0};function xE(e,t,r){var n,o={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)wE.call(t,n)&&!IE.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:Na,type:e,key:i,ref:s,props:o,_owner:mm.current}}function IM(e,t){return{$$typeof:Na,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Na}function xM(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var _E=/\/+/g;function dm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xM(""+e.key):t.toString(36)}function uu(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Na:case gM:s=!0}}if(s)return s=e,o=o(s),e=n===""?"."+dm(s,0):n,yE(o)?(r="",e!=null&&(r=e.replace(_E,"$&/")+"/"),uu(o,t,r,"",function(c){return c})):o!=null&&(gm(o)&&(o=IM(o,r+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_E,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=n===""?".":n+":",yE(e))for(var a=0;a<e.length;a++){i=e[a];var l=n+dm(i,a);s+=uu(i,t,r,l,o)}else if(l=wM(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=n+dm(i,a++),s+=uu(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function cu(e,t,r){if(e==null)return e;var n=[],o=0;return uu(e,n,"","",function(i){return t.call(r,i,o++)}),n}function RM(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var kt={current:null},du={transition:null},CM={ReactCurrentDispatcher:kt,ReactCurrentBatchConfig:du,ReactCurrentOwner:mm};function RE(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:cu,forEach:function(e,t,r){cu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return cu(e,function(){t++}),t},toArray:function(e){return cu(e,function(t){return t})||[]},only:function(e){if(!gm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=Hi;X.Fragment=hM;X.Profiler=vM;X.PureComponent=pm;X.StrictMode=SM;X.Suspense=TM;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CM;X.act=RE;X.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=TE({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=mm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)wE.call(t,l)&&!IE.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:Na,type:e.type,key:o,ref:i,props:n,_owner:s}};X.createContext=function(e){return e={$$typeof:_M,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:yM,_context:e},e.Consumer=e};X.createElement=xE;X.createFactory=function(e){var t=xE.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:EM,render:e}};X.isValidElement=gm;X.lazy=function(e){return{$$typeof:kM,_payload:{_status:-1,_result:e},_init:RM}};X.memo=function(e,t){return{$$typeof:bM,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=du.transition;du.transition={};try{e()}finally{du.transition=t}};X.unstable_act=RE;X.useCallback=function(e,t){return kt.current.useCallback(e,t)};X.useContext=function(e){return kt.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return kt.current.useDeferredValue(e)};X.useEffect=function(e,t){return kt.current.useEffect(e,t)};X.useId=function(){return kt.current.useId()};X.useImperativeHandle=function(e,t,r){return kt.current.useImperativeHandle(e,t,r)};X.useInsertionEffect=function(e,t){return kt.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return kt.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return kt.current.useMemo(e,t)};X.useReducer=function(e,t,r){return kt.current.useReducer(e,t,r)};X.useRef=function(e){return kt.current.useRef(e)};X.useState=function(e){return kt.current.useState(e)};X.useSyncExternalStore=function(e,t,r){return kt.current.useSyncExternalStore(e,t,r)};X.useTransition=function(){return kt.current.useTransition()};X.version="18.3.1"});var mn=Zr((PW,NE)=>{"use strict";NE.exports=CE()});var YE=Zr(Se=>{"use strict";function Tm(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<pu(o,t))e[n]=t,e[r]=o,r=n;else break e}}function Cr(e){return e.length===0?null:e[0]}function mu(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var s=2*(n+1)-1,a=e[s],l=s+1,c=e[l];if(0>pu(a,r))l<o&&0>pu(c,a)?(e[n]=c,e[l]=r,n=l):(e[n]=a,e[s]=r,n=s);else if(l<o&&0>pu(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function pu(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(BE=performance,Se.unstable_now=function(){return BE.now()}):(ym=Date,FE=ym.now(),Se.unstable_now=function(){return ym.now()-FE});var BE,ym,FE,Gr=[],$n=[],LM=1,ur=null,ft=3,gu=!1,Fo=!1,La=!1,$E=typeof setTimeout=="function"?setTimeout:null,WE=typeof clearTimeout=="function"?clearTimeout:null,HE=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function bm(e){for(var t=Cr($n);t!==null;){if(t.callback===null)mu($n);else if(t.startTime<=e)mu($n),t.sortIndex=t.expirationTime,Tm(Gr,t);else break;t=Cr($n)}}function km(e){if(La=!1,bm(e),!Fo)if(Cr(Gr)!==null)Fo=!0,Im(wm);else{var t=Cr($n);t!==null&&xm(km,t.startTime-e)}}function wm(e,t){Fo=!1,La&&(La=!1,WE(Oa),Oa=-1),gu=!0;var r=ft;try{for(bm(t),ur=Cr(Gr);ur!==null&&(!(ur.expirationTime>t)||e&&!VE());){var n=ur.callback;if(typeof n=="function"){ur.callback=null,ft=ur.priorityLevel;var o=n(ur.expirationTime<=t);t=Se.unstable_now(),typeof o=="function"?ur.callback=o:ur===Cr(Gr)&&mu(Gr),bm(t)}else mu(Gr);ur=Cr(Gr)}if(ur!==null)var i=!0;else{var s=Cr($n);s!==null&&xm(km,s.startTime-t),i=!1}return i}finally{ur=null,ft=r,gu=!1}}var hu=!1,fu=null,Oa=-1,jE=5,GE=-1;function VE(){return!(Se.unstable_now()-GE<jE)}function _m(){if(fu!==null){var e=Se.unstable_now();GE=e;var t=!0;try{t=fu(!0,e)}finally{t?Ma():(hu=!1,fu=null)}}else hu=!1}var Ma;typeof HE=="function"?Ma=function(){HE(_m)}:typeof MessageChannel<"u"?(Em=new MessageChannel,zE=Em.port2,Em.port1.onmessage=_m,Ma=function(){zE.postMessage(null)}):Ma=function(){$E(_m,0)};var Em,zE;function Im(e){fu=e,hu||(hu=!0,Ma())}function xm(e,t){Oa=$E(function(){e(Se.unstable_now())},t)}Se.unstable_IdlePriority=5;Se.unstable_ImmediatePriority=1;Se.unstable_LowPriority=4;Se.unstable_NormalPriority=3;Se.unstable_Profiling=null;Se.unstable_UserBlockingPriority=2;Se.unstable_cancelCallback=function(e){e.callback=null};Se.unstable_continueExecution=function(){Fo||gu||(Fo=!0,Im(wm))};Se.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jE=0<e?Math.floor(1e3/e):5};Se.unstable_getCurrentPriorityLevel=function(){return ft};Se.unstable_getFirstCallbackNode=function(){return Cr(Gr)};Se.unstable_next=function(e){switch(ft){case 1:case 2:case 3:var t=3;break;default:t=ft}var r=ft;ft=t;try{return e()}finally{ft=r}};Se.unstable_pauseExecution=function(){};Se.unstable_requestPaint=function(){};Se.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ft;ft=e;try{return t()}finally{ft=r}};Se.unstable_scheduleCallback=function(e,t,r){var n=Se.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:LM++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,Tm($n,e),Cr(Gr)===null&&e===Cr($n)&&(La?(WE(Oa),Oa=-1):La=!0,xm(km,r-n))):(e.sortIndex=o,Tm(Gr,e),Fo||gu||(Fo=!0,Im(wm))),e};Se.unstable_shouldYield=VE;Se.unstable_wrapCallback=function(e){var t=ft;return function(){var r=ft;ft=t;try{return e.apply(this,arguments)}finally{ft=r}}}});var KE=Zr((rj,qE)=>{"use strict";qE.exports=YE()});var Qb=Zr(Xt=>{"use strict";var OM=mn(),qt=KE();function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rT=new Set,rl={};function Zo(e,t){as(e,t),as(e+"Capture",t)}function as(e,t){for(rl[e]=t,e=0;e<t.length;e++)rT.add(t[e])}var En=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xm=Object.prototype.hasOwnProperty,PM=/^[: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]*$/,XE={},JE={};function DM(e){return Xm.call(JE,e)?!0:Xm.call(XE,e)?!1:PM.test(e)?JE[e]=!0:(XE[e]=!0,!1)}function UM(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function BM(e,t,r,n){if(t===null||typeof t>"u"||UM(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xt(e,t,r,n,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nt[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nt[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nt[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nt[e]=new xt(e,2,!1,e,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(e){nt[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nt[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nt[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nt[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nt[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var $g=/[\-:]([a-z])/g;function Wg(e){return e[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(e){var t=e.replace($g,Wg);nt[t]=new xt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($g,Wg);nt[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($g,Wg);nt[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});nt.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nt[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function jg(e,t,r,n){var o=nt.hasOwnProperty(t)?nt[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(BM(t,r,o,n)&&(r=null),n||o===null?DM(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var wn=OM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Su=Symbol.for("react.element"),Wi=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),Gg=Symbol.for("react.strict_mode"),Jm=Symbol.for("react.profiler"),nT=Symbol.for("react.provider"),oT=Symbol.for("react.context"),Vg=Symbol.for("react.forward_ref"),Zm=Symbol.for("react.suspense"),Qm=Symbol.for("react.suspense_list"),Yg=Symbol.for("react.memo"),jn=Symbol.for("react.lazy"),iT=Symbol.for("react.offscreen"),ZE=Symbol.iterator;function Pa(e){return e===null||typeof e!="object"?null:(e=ZE&&e[ZE]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,Rm;function Wa(e){if(Rm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Rm=t&&t[1]||""}return`
|
|
2
|
+
`+Rm+e}var Cm=!1;function Nm(e,t){if(!e||Cm)return"";Cm=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
3
3
|
`),i=n.stack.split(`
|
|
4
4
|
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
|
|
5
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Nm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ja(e):""}function UM(e){switch(e.tag){case 5:return ja(e.type);case 16:return ja("Lazy");case 13:return ja("Suspense");case 19:return ja("SuspenseList");case 0:case 2:case 15:return e=Cm(e.type,!1),e;case 11:return e=Cm(e.type.render,!1),e;case 1:return e=Cm(e.type,!0),e;default:return""}}function eh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case $i:return"Portal";case Jm:return"Profiler";case Gh:return"StrictMode";case Qm:return"Suspense";case Zm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oT:return(e.displayName||"Context")+".Consumer";case nT:return(e._context.displayName||"Context")+".Provider";case Vh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yh:return t=e.displayName||null,t!==null?t:eh(e.type)||"Memo";case zn:t=e._payload,e=e._init;try{return eh(e(t))}catch{}}return null}function BM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eh(t);case 8:return t===Gh?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function to(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FM(e){var t=sT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yu(e){e._valueTracker||(e._valueTracker=FM(e))}function aT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=sT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function th(e,t){var r=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Z0(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=to(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lT(e,t){t=t.checked,t!=null&&Wh(e,"checked",t,!1)}function rh(e,t){lT(e,t);var r=to(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nh(e,t.type,r):t.hasOwnProperty("defaultValue")&&nh(e,t.type,to(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eE(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function nh(e,t,r){(t!=="number"||Vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wa=Array.isArray;function es(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+to(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function oh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tE(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(R(92));if(Wa(r)){if(1<r.length)throw Error(R(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:to(r)}}function cT(e,t){var r=to(t.value),n=to(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function rE(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uT(e){switch(e){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 ih(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vu,dT=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vu=vu||document.createElement("div"),vu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ya={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},HM=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){HM.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function pT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function fT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=pT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var zM=Re({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 sh(e,t){if(t){if(zM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function ah(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 lh=null;function qh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ch=null,ts=null,rs=null;function nE(e){if(e=El(e)){if(typeof ch!="function")throw Error(R(280));var t=e.stateNode;t&&(t=_d(t),ch(e.stateNode,e.type,t))}}function mT(e){ts?rs?rs.push(e):rs=[e]:ts=e}function hT(){if(ts){var e=ts,t=rs;if(rs=ts=null,nE(e),t)for(e=0;e<t.length;e++)nE(t[e])}}function gT(e,t){return e(t)}function ST(){}var Am=!1;function yT(e,t,r){if(Am)return e(t,r);Am=!0;try{return gT(e,t,r)}finally{Am=!1,(ts!==null||rs!==null)&&(ST(),hT())}}function ol(e,t){var r=e.stateNode;if(r===null)return null;var n=_d(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(R(231,t,typeof r));return r}var uh=!1;if(vn)try{Hi={},Object.defineProperty(Hi,"passive",{get:function(){uh=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{uh=!1}var Hi;function $M(e,t,r,n,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var qa=!1,Yu=null,qu=!1,dh=null,jM={onError:function(e){qa=!0,Yu=e}};function WM(e,t,r,n,o,i,s,a,l){qa=!1,Yu=null,$M.apply(jM,arguments)}function GM(e,t,r,n,o,i,s,a,l){if(WM.apply(this,arguments),qa){if(qa){var c=Yu;qa=!1,Yu=null}else throw Error(R(198));qu||(qu=!0,dh=c)}}function Jo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function vT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function oE(e){if(Jo(e)!==e)throw Error(R(188))}function VM(e){var t=e.alternate;if(!t){if(t=Jo(e),t===null)throw Error(R(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return oE(o),e;if(i===n)return oE(o),t;i=i.sibling}throw Error(R(188))}if(r.return!==n.return)r=o,n=i;else{for(var s=!1,a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s)throw Error(R(189))}}if(r.alternate!==n)throw Error(R(190))}if(r.tag!==3)throw Error(R(188));return r.stateNode.current===r?e:t}function _T(e){return e=VM(e),e!==null?ET(e):null}function ET(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ET(e);if(t!==null)return t;e=e.sibling}return null}var TT=Gt.unstable_scheduleCallback,iE=Gt.unstable_cancelCallback,YM=Gt.unstable_shouldYield,qM=Gt.unstable_requestPaint,Le=Gt.unstable_now,KM=Gt.unstable_getCurrentPriorityLevel,Kh=Gt.unstable_ImmediatePriority,bT=Gt.unstable_UserBlockingPriority,Ku=Gt.unstable_NormalPriority,XM=Gt.unstable_LowPriority,IT=Gt.unstable_IdlePriority,gd=null,Vr=null;function JM(e){if(Vr&&typeof Vr.onCommitFiberRoot=="function")try{Vr.onCommitFiberRoot(gd,e,void 0,(e.current.flags&128)===128)}catch{}}var Cr=Math.clz32?Math.clz32:e2,QM=Math.log,ZM=Math.LN2;function e2(e){return e>>>=0,e===0?32:31-(QM(e)/ZM|0)|0}var _u=64,Eu=4194304;function Ga(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Ga(a):(i&=s,i!==0&&(n=Ga(i)))}else s=r&~o,s!==0?n=Ga(s):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Cr(t),o=1<<r,n|=e[r],t&=~o;return n}function t2(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 r2(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Cr(i),a=1<<s,l=o[s];l===-1?((a&r)===0||(a&n)!==0)&&(o[s]=t2(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function ph(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xT(){var e=_u;return _u<<=1,(_u&4194240)===0&&(_u=64),e}function Mm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cr(t),e[t]=r}function n2(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Cr(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function Xh(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Cr(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var ae=0;function kT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var wT,Jh,RT,NT,CT,fh=!1,Tu=[],Yn=null,qn=null,Kn=null,il=new Map,sl=new Map,jn=[],o2="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 sE(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":qn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sl.delete(t.pointerId)}}function Pa(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=El(t),t!==null&&Jh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function i2(e,t,r,n,o){switch(t){case"focusin":return Yn=Pa(Yn,e,t,r,n,o),!0;case"dragenter":return qn=Pa(qn,e,t,r,n,o),!0;case"mouseover":return Kn=Pa(Kn,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return il.set(i,Pa(il.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,sl.set(i,Pa(sl.get(i)||null,e,t,r,n,o)),!0}return!1}function AT(e){var t=Ho(e.target);if(t!==null){var r=Jo(t);if(r!==null){if(t=r.tag,t===13){if(t=vT(r),t!==null){e.blockedOn=t,CT(e.priority,function(){RT(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lh=n,r.target.dispatchEvent(n),lh=null}else return t=El(r),t!==null&&Jh(t),e.blockedOn=r,!1;t.shift()}return!0}function aE(e,t,r){Pu(e)&&r.delete(t)}function s2(){fh=!1,Yn!==null&&Pu(Yn)&&(Yn=null),qn!==null&&Pu(qn)&&(qn=null),Kn!==null&&Pu(Kn)&&(Kn=null),il.forEach(aE),sl.forEach(aE)}function Ua(e,t){e.blockedOn===t&&(e.blockedOn=null,fh||(fh=!0,Gt.unstable_scheduleCallback(Gt.unstable_NormalPriority,s2)))}function al(e){function t(o){return Ua(o,e)}if(0<Tu.length){Ua(Tu[0],e);for(var r=1;r<Tu.length;r++){var n=Tu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Yn!==null&&Ua(Yn,e),qn!==null&&Ua(qn,e),Kn!==null&&Ua(Kn,e),il.forEach(t),sl.forEach(t),r=0;r<jn.length;r++)n=jn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<jn.length&&(r=jn[0],r.blockedOn===null);)AT(r),r.blockedOn===null&&jn.shift()}var ns=bn.ReactCurrentBatchConfig,Ju=!0;function a2(e,t,r,n){var o=ae,i=ns.transition;ns.transition=null;try{ae=1,Qh(e,t,r,n)}finally{ae=o,ns.transition=i}}function l2(e,t,r,n){var o=ae,i=ns.transition;ns.transition=null;try{ae=4,Qh(e,t,r,n)}finally{ae=o,ns.transition=i}}function Qh(e,t,r,n){if(Ju){var o=mh(e,t,r,n);if(o===null)Fm(e,t,n,Qu,r),sE(e,n);else if(i2(o,e,t,r,n))n.stopPropagation();else if(sE(e,n),t&4&&-1<o2.indexOf(e)){for(;o!==null;){var i=El(o);if(i!==null&&wT(i),i=mh(e,t,r,n),i===null&&Fm(e,t,n,Qu,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else Fm(e,t,n,null,r)}}var Qu=null;function mh(e,t,r,n){if(Qu=null,e=qh(n),e=Ho(e),e!==null)if(t=Jo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=vT(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qu=e,null}function MT(e){switch(e){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(KM()){case Kh:return 1;case bT:return 4;case Ku:case XM:return 16;case IT:return 536870912;default:return 16}default:return 16}}var Gn=null,Zh=null,Uu=null;function LT(){if(Uu)return Uu;var e,t=Zh,r=t.length,n,o="value"in Gn?Gn.value:Gn.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===o[i-n];n++);return Uu=o.slice(e,1<n?1-n:void 0)}function Bu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bu(){return!0}function lE(){return!1}function Vt(e){function t(r,n,o,i,s){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bu:lE,this.isPropagationStopped=lE,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eg=Vt(fs),_l=Re({},fs,{view:0,detail:0}),c2=Vt(_l),Lm,Om,Ba,Sd=Re({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ba&&(Ba&&e.type==="mousemove"?(Lm=e.screenX-Ba.screenX,Om=e.screenY-Ba.screenY):Om=Lm=0,Ba=e),Lm)},movementY:function(e){return"movementY"in e?e.movementY:Om}}),cE=Vt(Sd),u2=Re({},Sd,{dataTransfer:0}),d2=Vt(u2),p2=Re({},_l,{relatedTarget:0}),Dm=Vt(p2),f2=Re({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Vt(f2),h2=Re({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Vt(h2),S2=Re({},fs,{data:0}),uE=Vt(S2),y2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={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"},_2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_2[e])?!!t[e]:!1}function tg(){return E2}var T2=Re({},_l,{key:function(e){if(e.key){var t=y2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tg,charCode:function(e){return e.type==="keypress"?Bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b2=Vt(T2),I2=Re({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dE=Vt(I2),x2=Re({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tg}),k2=Vt(x2),w2=Re({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),R2=Vt(w2),N2=Re({},Sd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),C2=Vt(N2),A2=[9,13,27,32],rg=vn&&"CompositionEvent"in window,Ka=null;vn&&"documentMode"in document&&(Ka=document.documentMode);var M2=vn&&"TextEvent"in window&&!Ka,OT=vn&&(!rg||Ka&&8<Ka&&11>=Ka),pE=" ",fE=!1;function DT(e,t){switch(e){case"keyup":return A2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wi=!1;function L2(e,t){switch(e){case"compositionend":return PT(t);case"keypress":return t.which!==32?null:(fE=!0,pE);case"textInput":return e=t.data,e===pE&&fE?null:e;default:return null}}function O2(e,t){if(Wi)return e==="compositionend"||!rg&&DT(e,t)?(e=LT(),Uu=Zh=Gn=null,Wi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OT&&t.locale!=="ko"?null:t.data;default:return null}}var D2={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 mE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D2[e.type]:t==="textarea"}function UT(e,t,r,n){mT(n),t=Zu(t,"onChange"),0<t.length&&(r=new eg("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xa=null,ll=null;function P2(e){qT(e,0)}function yd(e){var t=Yi(e);if(aT(t))return e}function U2(e,t){if(e==="change")return t}var BT=!1;vn&&(vn?(xu="oninput"in document,xu||(Pm=document.createElement("div"),Pm.setAttribute("oninput","return;"),xu=typeof Pm.oninput=="function"),Iu=xu):Iu=!1,BT=Iu&&(!document.documentMode||9<document.documentMode));var Iu,xu,Pm;function hE(){Xa&&(Xa.detachEvent("onpropertychange",FT),ll=Xa=null)}function FT(e){if(e.propertyName==="value"&&yd(ll)){var t=[];UT(t,ll,e,qh(e)),yT(P2,t)}}function B2(e,t,r){e==="focusin"?(hE(),Xa=t,ll=r,Xa.attachEvent("onpropertychange",FT)):e==="focusout"&&hE()}function F2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yd(ll)}function H2(e,t){if(e==="click")return yd(t)}function z2(e,t){if(e==="input"||e==="change")return yd(t)}function $2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mr=typeof Object.is=="function"?Object.is:$2;function cl(e,t){if(Mr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Xm.call(t,o)||!Mr(e[o],t[o]))return!1}return!0}function gE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function SE(e,t){var r=gE(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gE(r)}}function HT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zT(){for(var e=window,t=Vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vu(e.document)}return t}function ng(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function j2(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HT(r.ownerDocument.documentElement,r)){if(n!==null&&ng(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=SE(r,i);var s=SE(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var W2=vn&&"documentMode"in document&&11>=document.documentMode,Gi=null,hh=null,Ja=null,gh=!1;function yE(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gh||Gi==null||Gi!==Vu(n)||(n=Gi,"selectionStart"in n&&ng(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ja&&cl(Ja,n)||(Ja=n,n=Zu(hh,"onSelect"),0<n.length&&(t=new eg("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Gi)))}function ku(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vi={animationend:ku("Animation","AnimationEnd"),animationiteration:ku("Animation","AnimationIteration"),animationstart:ku("Animation","AnimationStart"),transitionend:ku("Transition","TransitionEnd")},Um={},$T={};vn&&($T=document.createElement("div").style,"AnimationEvent"in window||(delete Vi.animationend.animation,delete Vi.animationiteration.animation,delete Vi.animationstart.animation),"TransitionEvent"in window||delete Vi.transitionend.transition);function vd(e){if(Um[e])return Um[e];if(!Vi[e])return e;var t=Vi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $T)return Um[e]=t[r];return e}var jT=vd("animationend"),WT=vd("animationiteration"),GT=vd("animationstart"),VT=vd("transitionend"),YT=new Map,vE="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 no(e,t){YT.set(e,t),Xo(t,[e])}for(wu=0;wu<vE.length;wu++)Ru=vE[wu],_E=Ru.toLowerCase(),EE=Ru[0].toUpperCase()+Ru.slice(1),no(_E,"on"+EE);var Ru,_E,EE,wu;no(jT,"onAnimationEnd");no(WT,"onAnimationIteration");no(GT,"onAnimationStart");no("dblclick","onDoubleClick");no("focusin","onFocus");no("focusout","onBlur");no(VT,"onTransitionEnd");ss("onMouseEnter",["mouseout","mouseover"]);ss("onMouseLeave",["mouseout","mouseover"]);ss("onPointerEnter",["pointerout","pointerover"]);ss("onPointerLeave",["pointerout","pointerover"]);Xo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Va="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(" "),G2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Va));function TE(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,GM(n,t,void 0,e),e.currentTarget=null}function qT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;TE(o,a,c),i=l}else for(s=0;s<n.length;s++){if(a=n[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;TE(o,a,c),i=l}}}if(qu)throw e=dh,qu=!1,dh=null,e}function Ee(e,t){var r=t[Eh];r===void 0&&(r=t[Eh]=new Set);var n=e+"__bubble";r.has(n)||(KT(t,e,2,!1),r.add(n))}function Bm(e,t,r){var n=0;t&&(n|=4),KT(r,e,n,t)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function ul(e){if(!e[Nu]){e[Nu]=!0,rT.forEach(function(r){r!=="selectionchange"&&(G2.has(r)||Bm(r,!1,e),Bm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nu]||(t[Nu]=!0,Bm("selectionchange",!1,t))}}function KT(e,t,r,n){switch(MT(t)){case 1:var o=a2;break;case 4:o=l2;break;default:o=Qh}r=o.bind(null,t,r,e),o=void 0,!uh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Fm(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Ho(a),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}a=a.parentNode}}n=n.return}yT(function(){var c=i,u=qh(r),d=[];e:{var p=YT.get(e);if(p!==void 0){var f=eg,h=e;switch(e){case"keypress":if(Bu(r)===0)break e;case"keydown":case"keyup":f=b2;break;case"focusin":h="focus",f=Dm;break;case"focusout":h="blur",f=Dm;break;case"beforeblur":case"afterblur":f=Dm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=cE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=d2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=k2;break;case jT:case WT:case GT:f=m2;break;case VT:f=R2;break;case"scroll":f=c2;break;case"wheel":f=C2;break;case"copy":case"cut":case"paste":f=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=dE}var y=(t&4)!==0,E=!y&&e==="scroll",m=y?p!==null?p+"Capture":null:p;y=[];for(var g=c,v;g!==null;){v=g;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,m!==null&&(b=ol(g,m),b!=null&&y.push(dl(g,b,v)))),E)break;g=g.return}0<y.length&&(p=new f(p,h,null,r,u),d.push({event:p,listeners:y}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==lh&&(h=r.relatedTarget||r.fromElement)&&(Ho(h)||h[_n]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(h=r.relatedTarget||r.toElement,f=c,h=h?Ho(h):null,h!==null&&(E=Jo(h),h!==E||h.tag!==5&&h.tag!==6)&&(h=null)):(f=null,h=c),f!==h)){if(y=cE,b="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=dE,b="onPointerLeave",m="onPointerEnter",g="pointer"),E=f==null?p:Yi(f),v=h==null?p:Yi(h),p=new y(b,g+"leave",f,r,u),p.target=E,p.relatedTarget=v,b=null,Ho(u)===c&&(y=new y(m,g+"enter",h,r,u),y.target=v,y.relatedTarget=E,b=y),E=b,f&&h)t:{for(y=f,m=h,g=0,v=y;v;v=zi(v))g++;for(v=0,b=m;b;b=zi(b))v++;for(;0<g-v;)y=zi(y),g--;for(;0<v-g;)m=zi(m),v--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=zi(y),m=zi(m)}y=null}else y=null;f!==null&&bE(d,p,f,y,!1),h!==null&&E!==null&&bE(d,E,h,y,!0)}}e:{if(p=c?Yi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var k=U2;else if(mE(p))if(BT)k=z2;else{k=F2;var w=B2}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=H2);if(k&&(k=k(e,c))){UT(d,k,r,u);break e}w&&w(e,p,c),e==="focusout"&&(w=p._wrapperState)&&w.controlled&&p.type==="number"&&nh(p,"number",p.value)}switch(w=c?Yi(c):window,e){case"focusin":(mE(w)||w.contentEditable==="true")&&(Gi=w,hh=c,Ja=null);break;case"focusout":Ja=hh=Gi=null;break;case"mousedown":gh=!0;break;case"contextmenu":case"mouseup":case"dragend":gh=!1,yE(d,r,u);break;case"selectionchange":if(W2)break;case"keydown":case"keyup":yE(d,r,u)}var _;if(rg)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else Wi?DT(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(OT&&r.locale!=="ko"&&(Wi||I!=="onCompositionStart"?I==="onCompositionEnd"&&Wi&&(_=LT()):(Gn=u,Zh="value"in Gn?Gn.value:Gn.textContent,Wi=!0)),w=Zu(c,I),0<w.length&&(I=new uE(I,e,null,r,u),d.push({event:I,listeners:w}),_?I.data=_:(_=PT(r),_!==null&&(I.data=_)))),(_=M2?L2(e,r):O2(e,r))&&(c=Zu(c,"onBeforeInput"),0<c.length&&(u=new uE("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=_))}qT(d,t)})}function dl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ol(e,r),i!=null&&n.unshift(dl(e,i,o)),i=ol(e,t),i!=null&&n.push(dl(e,i,o))),e=e.return}return n}function zi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bE(e,t,r,n,o){for(var i=t._reactName,s=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,o?(l=ol(r,i),l!=null&&s.unshift(dl(r,l,a))):o||(l=ol(r,i),l!=null&&s.push(dl(r,l,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var V2=/\r\n?/g,Y2=/\u0000|\uFFFD/g;function IE(e){return(typeof e=="string"?e:""+e).replace(V2,`
|
|
6
|
-
`).replace(Y2,"")}function Cu(e,t,r){if(t=IE(t),IE(e)!==t&&r)throw Error(R(425))}function ed(){}var Sh=null,yh=null;function vh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _h=typeof setTimeout=="function"?setTimeout:void 0,q2=typeof clearTimeout=="function"?clearTimeout:void 0,xE=typeof Promise=="function"?Promise:void 0,K2=typeof queueMicrotask=="function"?queueMicrotask:typeof xE<"u"?function(e){return xE.resolve(null).then(e).catch(X2)}:_h;function X2(e){setTimeout(function(){throw e})}function Hm(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);al(t)}function Xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function kE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var ms=Math.random().toString(36).slice(2),Gr="__reactFiber$"+ms,pl="__reactProps$"+ms,_n="__reactContainer$"+ms,Eh="__reactEvents$"+ms,J2="__reactListeners$"+ms,Q2="__reactHandles$"+ms;function Ho(e){var t=e[Gr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[_n]||r[Gr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=kE(e);e!==null;){if(r=e[Gr])return r;e=kE(e)}return t}e=r,r=e.parentNode}return null}function El(e){return e=e[Gr]||e[_n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function _d(e){return e[pl]||null}var Th=[],qi=-1;function oo(e){return{current:e}}function Te(e){0>qi||(e.current=Th[qi],Th[qi]=null,qi--)}function Se(e,t){qi++,Th[qi]=e.current,e.current=t}var ro={},pt=oo(ro),Mt=oo(!1),Go=ro;function as(e,t){var r=e.type.contextTypes;if(!r)return ro;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Lt(e){return e=e.childContextTypes,e!=null}function td(){Te(Mt),Te(pt)}function wE(e,t,r){if(pt.current!==ro)throw Error(R(168));Se(pt,t),Se(Mt,r)}function XT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(R(108,BM(e)||"Unknown",o));return Re({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ro,Go=pt.current,Se(pt,e),Se(Mt,Mt.current),!0}function RE(e,t,r){var n=e.stateNode;if(!n)throw Error(R(169));r?(e=XT(e,t,Go),n.__reactInternalMemoizedMergedChildContext=e,Te(Mt),Te(pt),Se(pt,e)):Te(Mt),Se(Mt,r)}var hn=null,Ed=!1,zm=!1;function JT(e){hn===null?hn=[e]:hn.push(e)}function Z2(e){Ed=!0,JT(e)}function io(){if(!zm&&hn!==null){zm=!0;var e=0,t=ae;try{var r=hn;for(ae=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}hn=null,Ed=!1}catch(o){throw hn!==null&&(hn=hn.slice(e+1)),TT(Kh,io),o}finally{ae=t,zm=!1}}return null}var Ki=[],Xi=0,nd=null,od=0,sr=[],ar=0,Vo=null,gn=1,Sn="";function Bo(e,t){Ki[Xi++]=od,Ki[Xi++]=nd,nd=e,od=t}function QT(e,t,r){sr[ar++]=gn,sr[ar++]=Sn,sr[ar++]=Vo,Vo=e;var n=gn;e=Sn;var o=32-Cr(n)-1;n&=~(1<<o),r+=1;var i=32-Cr(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,gn=1<<32-Cr(t)+o|r<<o|n,Sn=i+e}else gn=1<<i|r<<o|n,Sn=e}function og(e){e.return!==null&&(Bo(e,1),QT(e,1,0))}function ig(e){for(;e===nd;)nd=Ki[--Xi],Ki[Xi]=null,od=Ki[--Xi],Ki[Xi]=null;for(;e===Vo;)Vo=sr[--ar],sr[ar]=null,Sn=sr[--ar],sr[ar]=null,gn=sr[--ar],sr[ar]=null}var Wt=null,jt=null,Ie=!1,Nr=null;function ZT(e,t){var r=lr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function NE(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,jt=Xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Vo!==null?{id:gn,overflow:Sn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=lr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Wt=e,jt=null,!0):!1;default:return!1}}function bh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ih(e){if(Ie){var t=jt;if(t){var r=t;if(!NE(e,t)){if(bh(e))throw Error(R(418));t=Xn(r.nextSibling);var n=Wt;t&&NE(e,t)?ZT(n,r):(e.flags=e.flags&-4097|2,Ie=!1,Wt=e)}}else{if(bh(e))throw Error(R(418));e.flags=e.flags&-4097|2,Ie=!1,Wt=e}}}function CE(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Au(e){if(e!==Wt)return!1;if(!Ie)return CE(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vh(e.type,e.memoizedProps)),t&&(t=jt)){if(bh(e))throw eb(),Error(R(418));for(;t;)ZT(e,t),t=Xn(t.nextSibling)}if(CE(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){jt=Xn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=Wt?Xn(e.stateNode.nextSibling):null;return!0}function eb(){for(var e=jt;e;)e=Xn(e.nextSibling)}function ls(){jt=Wt=null,Ie=!1}function sg(e){Nr===null?Nr=[e]:Nr.push(e)}var eL=bn.ReactCurrentBatchConfig;function Fa(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(R(309));var n=r.stateNode}if(!n)throw Error(R(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(R(284));if(!r._owner)throw Error(R(290,e))}return e}function Mu(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function AE(e){var t=e._init;return t(e._payload)}function tb(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function r(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function n(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=eo(m,g),m.index=0,m.sibling=null,m}function i(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=2,g):v):(m.flags|=2,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,v,b){return g===null||g.tag!==6?(g=qm(v,m.mode,b),g.return=m,g):(g=o(g,v),g.return=m,g)}function l(m,g,v,b){var k=v.type;return k===ji?u(m,g,v.props.children,b,v.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zn&&AE(k)===g.type)?(b=o(g,v.props),b.ref=Fa(m,g,v),b.return=m,b):(b=Gu(v.type,v.key,v.props,null,m.mode,b),b.ref=Fa(m,g,v),b.return=m,b)}function c(m,g,v,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=Km(v,m.mode,b),g.return=m,g):(g=o(g,v.children||[]),g.return=m,g)}function u(m,g,v,b,k){return g===null||g.tag!==7?(g=Wo(v,m.mode,b,k),g.return=m,g):(g=o(g,v),g.return=m,g)}function d(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=qm(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Su:return v=Gu(g.type,g.key,g.props,null,m.mode,v),v.ref=Fa(m,null,g),v.return=m,v;case $i:return g=Km(g,m.mode,v),g.return=m,g;case zn:var b=g._init;return d(m,b(g._payload),v)}if(Wa(g)||Da(g))return g=Wo(g,m.mode,v,null),g.return=m,g;Mu(m,g)}return null}function p(m,g,v,b){var k=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:a(m,g,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:return v.key===k?l(m,g,v,b):null;case $i:return v.key===k?c(m,g,v,b):null;case zn:return k=v._init,p(m,g,k(v._payload),b)}if(Wa(v)||Da(v))return k!==null?null:u(m,g,v,b,null);Mu(m,v)}return null}function f(m,g,v,b,k){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(v)||null,a(g,m,""+b,k);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Su:return m=m.get(b.key===null?v:b.key)||null,l(g,m,b,k);case $i:return m=m.get(b.key===null?v:b.key)||null,c(g,m,b,k);case zn:var w=b._init;return f(m,g,v,w(b._payload),k)}if(Wa(b)||Da(b))return m=m.get(v)||null,u(g,m,b,k,null);Mu(g,b)}return null}function h(m,g,v,b){for(var k=null,w=null,_=g,I=g=0,j=null;_!==null&&I<v.length;I++){_.index>I?(j=_,_=null):j=_.sibling;var x=p(m,_,v[I],b);if(x===null){_===null&&(_=j);break}e&&_&&x.alternate===null&&t(m,_),g=i(x,g,I),w===null?k=x:w.sibling=x,w=x,_=j}if(I===v.length)return r(m,_),Ie&&Bo(m,I),k;if(_===null){for(;I<v.length;I++)_=d(m,v[I],b),_!==null&&(g=i(_,g,I),w===null?k=_:w.sibling=_,w=_);return Ie&&Bo(m,I),k}for(_=n(m,_);I<v.length;I++)j=f(_,m,I,v[I],b),j!==null&&(e&&j.alternate!==null&&_.delete(j.key===null?I:j.key),g=i(j,g,I),w===null?k=j:w.sibling=j,w=j);return e&&_.forEach(function(D){return t(m,D)}),Ie&&Bo(m,I),k}function y(m,g,v,b){var k=Da(v);if(typeof k!="function")throw Error(R(150));if(v=k.call(v),v==null)throw Error(R(151));for(var w=k=null,_=g,I=g=0,j=null,x=v.next();_!==null&&!x.done;I++,x=v.next()){_.index>I?(j=_,_=null):j=_.sibling;var D=p(m,_,x.value,b);if(D===null){_===null&&(_=j);break}e&&_&&D.alternate===null&&t(m,_),g=i(D,g,I),w===null?k=D:w.sibling=D,w=D,_=j}if(x.done)return r(m,_),Ie&&Bo(m,I),k;if(_===null){for(;!x.done;I++,x=v.next())x=d(m,x.value,b),x!==null&&(g=i(x,g,I),w===null?k=x:w.sibling=x,w=x);return Ie&&Bo(m,I),k}for(_=n(m,_);!x.done;I++,x=v.next())x=f(_,m,I,x.value,b),x!==null&&(e&&x.alternate!==null&&_.delete(x.key===null?I:x.key),g=i(x,g,I),w===null?k=x:w.sibling=x,w=x);return e&&_.forEach(function(Y){return t(m,Y)}),Ie&&Bo(m,I),k}function E(m,g,v,b){if(typeof v=="object"&&v!==null&&v.type===ji&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:e:{for(var k=v.key,w=g;w!==null;){if(w.key===k){if(k=v.type,k===ji){if(w.tag===7){r(m,w.sibling),g=o(w,v.props.children),g.return=m,m=g;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===zn&&AE(k)===w.type){r(m,w.sibling),g=o(w,v.props),g.ref=Fa(m,w,v),g.return=m,m=g;break e}r(m,w);break}else t(m,w);w=w.sibling}v.type===ji?(g=Wo(v.props.children,m.mode,b,v.key),g.return=m,m=g):(b=Gu(v.type,v.key,v.props,null,m.mode,b),b.ref=Fa(m,g,v),b.return=m,m=b)}return s(m);case $i:e:{for(w=v.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){r(m,g.sibling),g=o(g,v.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=Km(v,m.mode,b),g.return=m,m=g}return s(m);case zn:return w=v._init,E(m,g,w(v._payload),b)}if(Wa(v))return h(m,g,v,b);if(Da(v))return y(m,g,v,b);Mu(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(r(m,g.sibling),g=o(g,v),g.return=m,m=g):(r(m,g),g=qm(v,m.mode,b),g.return=m,m=g),s(m)):r(m,g)}return E}var cs=tb(!0),rb=tb(!1),id=oo(null),sd=null,Ji=null,ag=null;function lg(){ag=Ji=sd=null}function cg(e){var t=id.current;Te(id),e._currentValue=t}function xh(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function os(e,t){sd=e,ag=Ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(At=!0),e.firstContext=null)}function ur(e){var t=e._currentValue;if(ag!==e)if(e={context:e,memoizedValue:t,next:null},Ji===null){if(sd===null)throw Error(R(308));Ji=e,sd.dependencies={lanes:0,firstContext:e}}else Ji=Ji.next=e;return t}var zo=null;function ug(e){zo===null?zo=[e]:zo.push(e)}function nb(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,ug(t)):(r.next=o.next,o.next=r),t.interleaved=r,En(e,n)}function En(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $n=!1;function dg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ob(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Z&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,En(e,r)}return o=n.interleaved,o===null?(t.next=t,ug(n)):(t.next=o.next,o.next=t),n.interleaved=t,En(e,r)}function Fu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}function ME(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ad(e,t,r,n){var o=e.updateQueue;$n=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,y=a;switch(p=t,f=r,y.tag){case 1:if(h=y.payload,typeof h=="function"){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=y.payload,p=typeof h=="function"?h.call(f,d,p):h,p==null)break e;d=Re({},d,p);break e;case 2:$n=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);qo|=s,e.lanes=s,e.memoizedState=d}}function LE(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(R(191,o));o.call(n)}}}var Tl={},Yr=oo(Tl),fl=oo(Tl),ml=oo(Tl);function $o(e){if(e===Tl)throw Error(R(174));return e}function pg(e,t){switch(Se(ml,t),Se(fl,e),Se(Yr,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ih(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ih(t,e)}Te(Yr),Se(Yr,t)}function us(){Te(Yr),Te(fl),Te(ml)}function ib(e){$o(ml.current);var t=$o(Yr.current),r=ih(t,e.type);t!==r&&(Se(fl,e),Se(Yr,r))}function fg(e){fl.current===e&&(Te(Yr),Te(fl))}var ke=oo(0);function ld(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $m=[];function mg(){for(var e=0;e<$m.length;e++)$m[e]._workInProgressVersionPrimary=null;$m.length=0}var Hu=bn.ReactCurrentDispatcher,jm=bn.ReactCurrentBatchConfig,Yo=0,we=null,ze=null,Ge=null,cd=!1,Qa=!1,hl=0,tL=0;function ct(){throw Error(R(321))}function hg(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Mr(e[r],t[r]))return!1;return!0}function gg(e,t,r,n,o,i){if(Yo=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?iL:sL,e=r(n,o),Qa){i=0;do{if(Qa=!1,hl=0,25<=i)throw Error(R(301));i+=1,Ge=ze=null,t.updateQueue=null,Hu.current=aL,e=r(n,o)}while(Qa)}if(Hu.current=ud,t=ze!==null&&ze.next!==null,Yo=0,Ge=ze=we=null,cd=!1,t)throw Error(R(300));return e}function Sg(){var e=hl!==0;return hl=0,e}function Wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?we.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function dr(){if(ze===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ge===null?we.memoizedState:Ge.next;if(t!==null)Ge=t,ze=e;else{if(e===null)throw Error(R(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ge===null?we.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function gl(e,t){return typeof t=="function"?t(e):t}function Wm(e){var t=dr(),r=t.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=e;var n=ze,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Yo&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=n):l=l.next=d,we.lanes|=u,qo|=u}c=c.next}while(c!==null&&c!==i);l===null?s=n:l.next=a,Mr(n,t.memoizedState)||(At=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,we.lanes|=i,qo|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Gm(e){var t=dr(),r=t.queue;if(r===null)throw Error(R(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Mr(i,t.memoizedState)||(At=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function sb(){}function ab(e,t){var r=we,n=dr(),o=t(),i=!Mr(n.memoizedState,o);if(i&&(n.memoizedState=o,At=!0),n=n.queue,yg(ub.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ge!==null&&Ge.memoizedState.tag&1){if(r.flags|=2048,Sl(9,cb.bind(null,r,n,o,t),void 0,null),Ve===null)throw Error(R(349));(Yo&30)!==0||lb(r,t,o)}return o}function lb(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function cb(e,t,r,n){t.value=r,t.getSnapshot=n,db(t)&&pb(e)}function ub(e,t,r){return r(function(){db(t)&&pb(e)})}function db(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Mr(e,r)}catch{return!0}}function pb(e){var t=En(e,1);t!==null&&Ar(t,e,1,-1)}function OE(e){var t=Wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},t.queue=e,e=e.dispatch=oL.bind(null,we,e),[t.memoizedState,e]}function Sl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function fb(){return dr().memoizedState}function zu(e,t,r,n){var o=Wr();we.flags|=e,o.memoizedState=Sl(1|t,r,void 0,n===void 0?null:n)}function Td(e,t,r,n){var o=dr();n=n===void 0?null:n;var i=void 0;if(ze!==null){var s=ze.memoizedState;if(i=s.destroy,n!==null&&hg(n,s.deps)){o.memoizedState=Sl(t,r,i,n);return}}we.flags|=e,o.memoizedState=Sl(1|t,r,i,n)}function DE(e,t){return zu(8390656,8,e,t)}function yg(e,t){return Td(2048,8,e,t)}function mb(e,t){return Td(4,2,e,t)}function hb(e,t){return Td(4,4,e,t)}function gb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sb(e,t,r){return r=r!=null?r.concat([e]):null,Td(4,4,gb.bind(null,t,e),r)}function vg(){}function yb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function vb(e,t){var r=dr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&hg(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function _b(e,t,r){return(Yo&21)===0?(e.baseState&&(e.baseState=!1,At=!0),e.memoizedState=r):(Mr(r,t)||(r=xT(),we.lanes|=r,qo|=r,e.baseState=!0),t)}function rL(e,t){var r=ae;ae=r!==0&&4>r?r:4,e(!0);var n=jm.transition;jm.transition={};try{e(!1),t()}finally{ae=r,jm.transition=n}}function Eb(){return dr().memoizedState}function nL(e,t,r){var n=Zn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Tb(e))bb(t,r);else if(r=nb(e,t,r,n),r!==null){var o=Et();Ar(r,e,n,o),Ib(r,t,n)}}function oL(e,t,r){var n=Zn(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Tb(e))bb(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,Mr(a,s)){var l=t.interleaved;l===null?(o.next=o,ug(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=nb(e,t,o,n),r!==null&&(o=Et(),Ar(r,e,n,o),Ib(r,t,n))}}function Tb(e){var t=e.alternate;return e===we||t!==null&&t===we}function bb(e,t){Qa=cd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ib(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xh(e,r)}}var ud={readContext:ur,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},iL={readContext:ur,useCallback:function(e,t){return Wr().memoizedState=[e,t===void 0?null:t],e},useContext:ur,useEffect:DE,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zu(4194308,4,gb.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return zu(4,2,e,t)},useMemo:function(e,t){var r=Wr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Wr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=nL.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=Wr();return e={current:e},t.memoizedState=e},useState:OE,useDebugValue:vg,useDeferredValue:function(e){return Wr().memoizedState=e},useTransition:function(){var e=OE(!1),t=e[0];return e=rL.bind(null,e[1]),Wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=we,o=Wr();if(Ie){if(r===void 0)throw Error(R(407));r=r()}else{if(r=t(),Ve===null)throw Error(R(349));(Yo&30)!==0||lb(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,DE(ub.bind(null,n,i,e),[e]),n.flags|=2048,Sl(9,cb.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Wr(),t=Ve.identifierPrefix;if(Ie){var r=Sn,n=gn;r=(n&~(1<<32-Cr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=hl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=tL++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:Wm,useRef:fb,useState:function(){return Wm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return _b(t,ze.memoizedState,e)},useTransition:function(){var e=Wm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1},aL={readContext:ur,useCallback:yb,useContext:ur,useEffect:yg,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:hb,useMemo:vb,useReducer:Gm,useRef:fb,useState:function(){return Gm(gl)},useDebugValue:vg,useDeferredValue:function(e){var t=dr();return ze===null?t.memoizedState=e:_b(t,ze.memoizedState,e)},useTransition:function(){var e=Gm(gl)[0],t=dr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1};function wr(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function kh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Re({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bd={isMounted:function(e){return(e=e._reactInternals)?Jo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Et(),o=Zn(e),i=yn(n,o);i.payload=t,r!=null&&(i.callback=r),t=Jn(e,i,o),t!==null&&(Ar(t,e,o,n),Fu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Et(),o=Zn(e),i=yn(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Jn(e,i,o),t!==null&&(Ar(t,e,o,n),Fu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Et(),n=Zn(e),o=yn(r,n);o.tag=2,t!=null&&(o.callback=t),t=Jn(e,o,n),t!==null&&(Ar(t,e,n,r),Fu(t,e,n))}};function PE(e,t,r,n,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!cl(r,n)||!cl(o,i):!0}function xb(e,t,r){var n=!1,o=ro,i=t.contextType;return typeof i=="object"&&i!==null?i=ur(i):(o=Lt(t)?Go:pt.current,n=t.contextTypes,i=(n=n!=null)?as(e,o):ro),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function UE(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&bd.enqueueReplaceState(t,t.state,null)}function wh(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},dg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ur(i):(i=Lt(t)?Go:pt.current,o.context=as(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(kh(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bd.enqueueReplaceState(o,o.state,null),ad(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ds(e,t){try{var r="",n=t;do r+=UM(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
5
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Cm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Wa(e):""}function FM(e){switch(e.tag){case 5:return Wa(e.type);case 16:return Wa("Lazy");case 13:return Wa("Suspense");case 19:return Wa("SuspenseList");case 0:case 2:case 15:return e=Nm(e.type,!1),e;case 11:return e=Nm(e.type.render,!1),e;case 1:return e=Nm(e.type,!0),e;default:return""}}function eg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case Wi:return"Portal";case Jm:return"Profiler";case Gg:return"StrictMode";case Zm:return"Suspense";case Qm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oT:return(e.displayName||"Context")+".Consumer";case nT:return(e._context.displayName||"Context")+".Provider";case Vg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yg:return t=e.displayName||null,t!==null?t:eg(e.type)||"Memo";case jn:t=e._payload,e=e._init;try{return eg(e(t))}catch{}}return null}function HM(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eg(t);case 8:return t===Gg?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sT(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zM(e){var t=sT(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vu(e){e._valueTracker||(e._valueTracker=zM(e))}function aT(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=sT(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function tg(e,t){var r=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function QE(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=oo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lT(e,t){t=t.checked,t!=null&&jg(e,"checked",t,!1)}function rg(e,t){lT(e,t);var r=oo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ng(e,t.type,r):t.hasOwnProperty("defaultValue")&&ng(e,t.type,oo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function e0(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ng(e,t,r){(t!=="number"||Vu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ja=Array.isArray;function ts(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+oo(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function og(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function t0(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(N(92));if(ja(r)){if(1<r.length)throw Error(N(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:oo(r)}}function cT(e,t){var r=oo(t.value),n=oo(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function r0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uT(e){switch(e){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 ig(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uT(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yu,dT=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(yu=yu||document.createElement("div"),yu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ya={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},$M=["Webkit","ms","Moz","O"];Object.keys(Ya).forEach(function(e){$M.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ya[t]=Ya[e]})});function pT(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ya.hasOwnProperty(e)&&Ya[e]?(""+t).trim():t+"px"}function fT(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=pT(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var WM=Ne({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 sg(e,t){if(t){if(WM[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ag(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 lg=null;function qg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cg=null,rs=null,ns=null;function n0(e){if(e=El(e)){if(typeof cg!="function")throw Error(N(280));var t=e.stateNode;t&&(t=_d(t),cg(e.stateNode,e.type,t))}}function mT(e){rs?ns?ns.push(e):ns=[e]:rs=e}function gT(){if(rs){var e=rs,t=ns;if(ns=rs=null,n0(e),t)for(e=0;e<t.length;e++)n0(t[e])}}function hT(e,t){return e(t)}function ST(){}var Am=!1;function vT(e,t,r){if(Am)return e(t,r);Am=!0;try{return hT(e,t,r)}finally{Am=!1,(rs!==null||ns!==null)&&(ST(),gT())}}function ol(e,t){var r=e.stateNode;if(r===null)return null;var n=_d(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(N(231,t,typeof r));return r}var ug=!1;if(En)try{zi={},Object.defineProperty(zi,"passive",{get:function(){ug=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{ug=!1}var zi;function jM(e,t,r,n,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var qa=!1,Yu=null,qu=!1,dg=null,GM={onError:function(e){qa=!0,Yu=e}};function VM(e,t,r,n,o,i,s,a,l){qa=!1,Yu=null,jM.apply(GM,arguments)}function YM(e,t,r,n,o,i,s,a,l){if(VM.apply(this,arguments),qa){if(qa){var c=Yu;qa=!1,Yu=null}else throw Error(N(198));qu||(qu=!0,dg=c)}}function Qo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function yT(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o0(e){if(Qo(e)!==e)throw Error(N(188))}function qM(e){var t=e.alternate;if(!t){if(t=Qo(e),t===null)throw Error(N(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return o0(o),e;if(i===n)return o0(o),t;i=i.sibling}throw Error(N(188))}if(r.return!==n.return)r=o,n=i;else{for(var s=!1,a=o.child;a;){if(a===r){s=!0,r=o,n=i;break}if(a===n){s=!0,n=o,r=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===r){s=!0,r=i,n=o;break}if(a===n){s=!0,n=i,r=o;break}a=a.sibling}if(!s)throw Error(N(189))}}if(r.alternate!==n)throw Error(N(190))}if(r.tag!==3)throw Error(N(188));return r.stateNode.current===r?e:t}function _T(e){return e=qM(e),e!==null?ET(e):null}function ET(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ET(e);if(t!==null)return t;e=e.sibling}return null}var TT=qt.unstable_scheduleCallback,i0=qt.unstable_cancelCallback,KM=qt.unstable_shouldYield,XM=qt.unstable_requestPaint,De=qt.unstable_now,JM=qt.unstable_getCurrentPriorityLevel,Kg=qt.unstable_ImmediatePriority,bT=qt.unstable_UserBlockingPriority,Ku=qt.unstable_NormalPriority,ZM=qt.unstable_LowPriority,kT=qt.unstable_IdlePriority,hd=null,Kr=null;function QM(e){if(Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(hd,e,void 0,(e.current.flags&128)===128)}catch{}}var Or=Math.clz32?Math.clz32:rL,eL=Math.log,tL=Math.LN2;function rL(e){return e>>>=0,e===0?32:31-(eL(e)/tL|0)|0}var _u=64,Eu=4194304;function Ga(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var a=s&~o;a!==0?n=Ga(a):(i&=s,i!==0&&(n=Ga(i)))}else s=r&~o,s!==0?n=Ga(s):i!==0&&(n=Ga(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Or(t),o=1<<r,n|=e[r],t&=~o;return n}function nL(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 oL(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Or(i),a=1<<s,l=o[s];l===-1?((a&r)===0||(a&n)!==0)&&(o[s]=nL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function pg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wT(){var e=_u;return _u<<=1,(_u&4194240)===0&&(_u=64),e}function Mm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yl(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Or(t),e[t]=r}function iL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Or(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function Xg(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Or(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var de=0;function IT(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xT,Jg,RT,CT,NT,fg=!1,Tu=[],Xn=null,Jn=null,Zn=null,il=new Map,sl=new Map,Vn=[],sL="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 s0(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":il.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sl.delete(t.pointerId)}}function Da(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=El(t),t!==null&&Jg(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function aL(e,t,r,n,o){switch(t){case"focusin":return Xn=Da(Xn,e,t,r,n,o),!0;case"dragenter":return Jn=Da(Jn,e,t,r,n,o),!0;case"mouseover":return Zn=Da(Zn,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return il.set(i,Da(il.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,sl.set(i,Da(sl.get(i)||null,e,t,r,n,o)),!0}return!1}function AT(e){var t=$o(e.target);if(t!==null){var r=Qo(t);if(r!==null){if(t=r.tag,t===13){if(t=yT(r),t!==null){e.blockedOn=t,NT(e.priority,function(){RT(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Du(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=mg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lg=n,r.target.dispatchEvent(n),lg=null}else return t=El(r),t!==null&&Jg(t),e.blockedOn=r,!1;t.shift()}return!0}function a0(e,t,r){Du(e)&&r.delete(t)}function lL(){fg=!1,Xn!==null&&Du(Xn)&&(Xn=null),Jn!==null&&Du(Jn)&&(Jn=null),Zn!==null&&Du(Zn)&&(Zn=null),il.forEach(a0),sl.forEach(a0)}function Ua(e,t){e.blockedOn===t&&(e.blockedOn=null,fg||(fg=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,lL)))}function al(e){function t(o){return Ua(o,e)}if(0<Tu.length){Ua(Tu[0],e);for(var r=1;r<Tu.length;r++){var n=Tu[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Xn!==null&&Ua(Xn,e),Jn!==null&&Ua(Jn,e),Zn!==null&&Ua(Zn,e),il.forEach(t),sl.forEach(t),r=0;r<Vn.length;r++)n=Vn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vn.length&&(r=Vn[0],r.blockedOn===null);)AT(r),r.blockedOn===null&&Vn.shift()}var os=wn.ReactCurrentBatchConfig,Ju=!0;function cL(e,t,r,n){var o=de,i=os.transition;os.transition=null;try{de=1,Zg(e,t,r,n)}finally{de=o,os.transition=i}}function uL(e,t,r,n){var o=de,i=os.transition;os.transition=null;try{de=4,Zg(e,t,r,n)}finally{de=o,os.transition=i}}function Zg(e,t,r,n){if(Ju){var o=mg(e,t,r,n);if(o===null)Fm(e,t,n,Zu,r),s0(e,n);else if(aL(o,e,t,r,n))n.stopPropagation();else if(s0(e,n),t&4&&-1<sL.indexOf(e)){for(;o!==null;){var i=El(o);if(i!==null&&xT(i),i=mg(e,t,r,n),i===null&&Fm(e,t,n,Zu,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else Fm(e,t,n,null,r)}}var Zu=null;function mg(e,t,r,n){if(Zu=null,e=qg(n),e=$o(e),e!==null)if(t=Qo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=yT(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zu=e,null}function MT(e){switch(e){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(JM()){case Kg:return 1;case bT:return 4;case Ku:case ZM:return 16;case kT:return 536870912;default:return 16}default:return 16}}var qn=null,Qg=null,Uu=null;function LT(){if(Uu)return Uu;var e,t=Qg,r=t.length,n,o="value"in qn?qn.value:qn.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===o[i-n];n++);return Uu=o.slice(e,1<n?1-n:void 0)}function Bu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bu(){return!0}function l0(){return!1}function Kt(e){function t(r,n,o,i,s){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bu:l0,this.isPropagationStopped=l0,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=bu)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=bu)},persist:function(){},isPersistent:bu}),t}var ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eh=Kt(ms),_l=Ne({},ms,{view:0,detail:0}),dL=Kt(_l),Lm,Om,Ba,Sd=Ne({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:th,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ba&&(Ba&&e.type==="mousemove"?(Lm=e.screenX-Ba.screenX,Om=e.screenY-Ba.screenY):Om=Lm=0,Ba=e),Lm)},movementY:function(e){return"movementY"in e?e.movementY:Om}}),c0=Kt(Sd),pL=Ne({},Sd,{dataTransfer:0}),fL=Kt(pL),mL=Ne({},_l,{relatedTarget:0}),Pm=Kt(mL),gL=Ne({},ms,{animationName:0,elapsedTime:0,pseudoElement:0}),hL=Kt(gL),SL=Ne({},ms,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vL=Kt(SL),yL=Ne({},ms,{data:0}),u0=Kt(yL),_L={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EL={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"},TL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=TL[e])?!!t[e]:!1}function th(){return bL}var kL=Ne({},_l,{key:function(e){if(e.key){var t=_L[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?EL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:th,charCode:function(e){return e.type==="keypress"?Bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wL=Kt(kL),IL=Ne({},Sd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),d0=Kt(IL),xL=Ne({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:th}),RL=Kt(xL),CL=Ne({},ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),NL=Kt(CL),AL=Ne({},Sd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ML=Kt(AL),LL=[9,13,27,32],rh=En&&"CompositionEvent"in window,Ka=null;En&&"documentMode"in document&&(Ka=document.documentMode);var OL=En&&"TextEvent"in window&&!Ka,OT=En&&(!rh||Ka&&8<Ka&&11>=Ka),p0=" ",f0=!1;function PT(e,t){switch(e){case"keyup":return LL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DT(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gi=!1;function PL(e,t){switch(e){case"compositionend":return DT(t);case"keypress":return t.which!==32?null:(f0=!0,p0);case"textInput":return e=t.data,e===p0&&f0?null:e;default:return null}}function DL(e,t){if(Gi)return e==="compositionend"||!rh&&PT(e,t)?(e=LT(),Uu=Qg=qn=null,Gi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return OT&&t.locale!=="ko"?null:t.data;default:return null}}var UL={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 m0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!UL[e.type]:t==="textarea"}function UT(e,t,r,n){mT(n),t=Qu(t,"onChange"),0<t.length&&(r=new eh("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Xa=null,ll=null;function BL(e){qT(e,0)}function vd(e){var t=qi(e);if(aT(t))return e}function FL(e,t){if(e==="change")return t}var BT=!1;En&&(En?(wu="oninput"in document,wu||(Dm=document.createElement("div"),Dm.setAttribute("oninput","return;"),wu=typeof Dm.oninput=="function"),ku=wu):ku=!1,BT=ku&&(!document.documentMode||9<document.documentMode));var ku,wu,Dm;function g0(){Xa&&(Xa.detachEvent("onpropertychange",FT),ll=Xa=null)}function FT(e){if(e.propertyName==="value"&&vd(ll)){var t=[];UT(t,ll,e,qg(e)),vT(BL,t)}}function HL(e,t,r){e==="focusin"?(g0(),Xa=t,ll=r,Xa.attachEvent("onpropertychange",FT)):e==="focusout"&&g0()}function zL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vd(ll)}function $L(e,t){if(e==="click")return vd(t)}function WL(e,t){if(e==="input"||e==="change")return vd(t)}function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dr=typeof Object.is=="function"?Object.is:jL;function cl(e,t){if(Dr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Xm.call(t,o)||!Dr(e[o],t[o]))return!1}return!0}function h0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function S0(e,t){var r=h0(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=h0(r)}}function HT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zT(){for(var e=window,t=Vu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vu(e.document)}return t}function nh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function GL(e){var t=zT(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HT(r.ownerDocument.documentElement,r)){if(n!==null&&nh(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=S0(r,i);var s=S0(r,n);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var VL=En&&"documentMode"in document&&11>=document.documentMode,Vi=null,gg=null,Ja=null,hg=!1;function v0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;hg||Vi==null||Vi!==Vu(n)||(n=Vi,"selectionStart"in n&&nh(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ja&&cl(Ja,n)||(Ja=n,n=Qu(gg,"onSelect"),0<n.length&&(t=new eh("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vi)))}function Iu(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Yi={animationend:Iu("Animation","AnimationEnd"),animationiteration:Iu("Animation","AnimationIteration"),animationstart:Iu("Animation","AnimationStart"),transitionend:Iu("Transition","TransitionEnd")},Um={},$T={};En&&($T=document.createElement("div").style,"AnimationEvent"in window||(delete Yi.animationend.animation,delete Yi.animationiteration.animation,delete Yi.animationstart.animation),"TransitionEvent"in window||delete Yi.transitionend.transition);function yd(e){if(Um[e])return Um[e];if(!Yi[e])return e;var t=Yi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $T)return Um[e]=t[r];return e}var WT=yd("animationend"),jT=yd("animationiteration"),GT=yd("animationstart"),VT=yd("transitionend"),YT=new Map,y0="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 so(e,t){YT.set(e,t),Zo(t,[e])}for(xu=0;xu<y0.length;xu++)Ru=y0[xu],_0=Ru.toLowerCase(),E0=Ru[0].toUpperCase()+Ru.slice(1),so(_0,"on"+E0);var Ru,_0,E0,xu;so(WT,"onAnimationEnd");so(jT,"onAnimationIteration");so(GT,"onAnimationStart");so("dblclick","onDoubleClick");so("focusin","onFocus");so("focusout","onBlur");so(VT,"onTransitionEnd");as("onMouseEnter",["mouseout","mouseover"]);as("onMouseLeave",["mouseout","mouseover"]);as("onPointerEnter",["pointerout","pointerover"]);as("onPointerLeave",["pointerout","pointerover"]);Zo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Va="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(" "),YL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Va));function T0(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,YM(n,t,void 0,e),e.currentTarget=null}function qT(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var a=n[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;T0(o,a,c),i=l}else for(s=0;s<n.length;s++){if(a=n[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;T0(o,a,c),i=l}}}if(qu)throw e=dg,qu=!1,dg=null,e}function Ee(e,t){var r=t[Eg];r===void 0&&(r=t[Eg]=new Set);var n=e+"__bubble";r.has(n)||(KT(t,e,2,!1),r.add(n))}function Bm(e,t,r){var n=0;t&&(n|=4),KT(r,e,n,t)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function ul(e){if(!e[Cu]){e[Cu]=!0,rT.forEach(function(r){r!=="selectionchange"&&(YL.has(r)||Bm(r,!1,e),Bm(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cu]||(t[Cu]=!0,Bm("selectionchange",!1,t))}}function KT(e,t,r,n){switch(MT(t)){case 1:var o=cL;break;case 4:o=uL;break;default:o=Zg}r=o.bind(null,t,r,e),o=void 0,!ug||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Fm(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=$o(a),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}a=a.parentNode}}n=n.return}vT(function(){var c=i,u=qg(r),d=[];e:{var p=YT.get(e);if(p!==void 0){var f=eh,h=e;switch(e){case"keypress":if(Bu(r)===0)break e;case"keydown":case"keyup":f=wL;break;case"focusin":h="focus",f=Pm;break;case"focusout":h="blur",f=Pm;break;case"beforeblur":case"afterblur":f=Pm;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=c0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=fL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=RL;break;case WT:case jT:case GT:f=hL;break;case VT:f=NL;break;case"scroll":f=dL;break;case"wheel":f=ML;break;case"copy":case"cut":case"paste":f=vL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=d0}var y=(t&4)!==0,k=!y&&e==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var S=c,v;S!==null;){v=S;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,g!==null&&(E=ol(S,g),E!=null&&y.push(dl(S,E,v)))),k)break;S=S.return}0<y.length&&(p=new f(p,h,null,r,u),d.push({event:p,listeners:y}))}}if((t&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&r!==lg&&(h=r.relatedTarget||r.fromElement)&&($o(h)||h[Tn]))break e;if((f||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,f?(h=r.relatedTarget||r.toElement,f=c,h=h?$o(h):null,h!==null&&(k=Qo(h),h!==k||h.tag!==5&&h.tag!==6)&&(h=null)):(f=null,h=c),f!==h)){if(y=c0,E="onMouseLeave",g="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(y=d0,E="onPointerLeave",g="onPointerEnter",S="pointer"),k=f==null?p:qi(f),v=h==null?p:qi(h),p=new y(E,S+"leave",f,r,u),p.target=k,p.relatedTarget=v,E=null,$o(u)===c&&(y=new y(g,S+"enter",h,r,u),y.target=v,y.relatedTarget=k,E=y),k=E,f&&h)t:{for(y=f,g=h,S=0,v=y;v;v=$i(v))S++;for(v=0,E=g;E;E=$i(E))v++;for(;0<S-v;)y=$i(y),S--;for(;0<v-S;)g=$i(g),v--;for(;S--;){if(y===g||g!==null&&y===g.alternate)break t;y=$i(y),g=$i(g)}y=null}else y=null;f!==null&&b0(d,p,f,y,!1),h!==null&&k!==null&&b0(d,k,h,y,!0)}}e:{if(p=c?qi(c):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var C=FL;else if(m0(p))if(BT)C=WL;else{C=zL;var R=HL}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=$L);if(C&&(C=C(e,c))){UT(d,C,r,u);break e}R&&R(e,p,c),e==="focusout"&&(R=p._wrapperState)&&R.controlled&&p.type==="number"&&ng(p,"number",p.value)}switch(R=c?qi(c):window,e){case"focusin":(m0(R)||R.contentEditable==="true")&&(Vi=R,gg=c,Ja=null);break;case"focusout":Ja=gg=Vi=null;break;case"mousedown":hg=!0;break;case"contextmenu":case"mouseup":case"dragend":hg=!1,v0(d,r,u);break;case"selectionchange":if(VL)break;case"keydown":case"keyup":v0(d,r,u)}var _;if(rh)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Gi?PT(e,r)&&(w="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(w="onCompositionStart");w&&(OT&&r.locale!=="ko"&&(Gi||w!=="onCompositionStart"?w==="onCompositionEnd"&&Gi&&(_=LT()):(qn=u,Qg="value"in qn?qn.value:qn.textContent,Gi=!0)),R=Qu(c,w),0<R.length&&(w=new u0(w,e,null,r,u),d.push({event:w,listeners:R}),_?w.data=_:(_=DT(r),_!==null&&(w.data=_)))),(_=OL?PL(e,r):DL(e,r))&&(c=Qu(c,"onBeforeInput"),0<c.length&&(u=new u0("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=_))}qT(d,t)})}function dl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Qu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ol(e,r),i!=null&&n.unshift(dl(e,i,o)),i=ol(e,t),i!=null&&n.push(dl(e,i,o))),e=e.return}return n}function $i(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function b0(e,t,r,n,o){for(var i=t._reactName,s=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,o?(l=ol(r,i),l!=null&&s.unshift(dl(r,l,a))):o||(l=ol(r,i),l!=null&&s.push(dl(r,l,a)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var qL=/\r\n?/g,KL=/\u0000|\uFFFD/g;function k0(e){return(typeof e=="string"?e:""+e).replace(qL,`
|
|
6
|
+
`).replace(KL,"")}function Nu(e,t,r){if(t=k0(t),k0(e)!==t&&r)throw Error(N(425))}function ed(){}var Sg=null,vg=null;function yg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _g=typeof setTimeout=="function"?setTimeout:void 0,XL=typeof clearTimeout=="function"?clearTimeout:void 0,w0=typeof Promise=="function"?Promise:void 0,JL=typeof queueMicrotask=="function"?queueMicrotask:typeof w0<"u"?function(e){return w0.resolve(null).then(e).catch(ZL)}:_g;function ZL(e){setTimeout(function(){throw e})}function Hm(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),al(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);al(t)}function Qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function I0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var gs=Math.random().toString(36).slice(2),qr="__reactFiber$"+gs,pl="__reactProps$"+gs,Tn="__reactContainer$"+gs,Eg="__reactEvents$"+gs,QL="__reactListeners$"+gs,e2="__reactHandles$"+gs;function $o(e){var t=e[qr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Tn]||r[qr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=I0(e);e!==null;){if(r=e[qr])return r;e=I0(e)}return t}e=r,r=e.parentNode}return null}function El(e){return e=e[qr]||e[Tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function _d(e){return e[pl]||null}var Tg=[],Ki=-1;function ao(e){return{current:e}}function Te(e){0>Ki||(e.current=Tg[Ki],Tg[Ki]=null,Ki--)}function ve(e,t){Ki++,Tg[Ki]=e.current,e.current=t}var io={},St=ao(io),Ut=ao(!1),Yo=io;function ls(e,t){var r=e.type.contextTypes;if(!r)return io;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Bt(e){return e=e.childContextTypes,e!=null}function td(){Te(Ut),Te(St)}function x0(e,t,r){if(St.current!==io)throw Error(N(168));ve(St,t),ve(Ut,r)}function XT(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(N(108,HM(e)||"Unknown",o));return Ne({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||io,Yo=St.current,ve(St,e),ve(Ut,Ut.current),!0}function R0(e,t,r){var n=e.stateNode;if(!n)throw Error(N(169));r?(e=XT(e,t,Yo),n.__reactInternalMemoizedMergedChildContext=e,Te(Ut),Te(St),ve(St,e)):Te(Ut),ve(Ut,r)}var Sn=null,Ed=!1,zm=!1;function JT(e){Sn===null?Sn=[e]:Sn.push(e)}function t2(e){Ed=!0,JT(e)}function lo(){if(!zm&&Sn!==null){zm=!0;var e=0,t=de;try{var r=Sn;for(de=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Sn=null,Ed=!1}catch(o){throw Sn!==null&&(Sn=Sn.slice(e+1)),TT(Kg,lo),o}finally{de=t,zm=!1}}return null}var Xi=[],Ji=0,nd=null,od=0,dr=[],pr=0,qo=null,vn=1,yn="";function Ho(e,t){Xi[Ji++]=od,Xi[Ji++]=nd,nd=e,od=t}function ZT(e,t,r){dr[pr++]=vn,dr[pr++]=yn,dr[pr++]=qo,qo=e;var n=vn;e=yn;var o=32-Or(n)-1;n&=~(1<<o),r+=1;var i=32-Or(t)+o;if(30<i){var s=o-o%5;i=(n&(1<<s)-1).toString(32),n>>=s,o-=s,vn=1<<32-Or(t)+o|r<<o|n,yn=i+e}else vn=1<<i|r<<o|n,yn=e}function oh(e){e.return!==null&&(Ho(e,1),ZT(e,1,0))}function ih(e){for(;e===nd;)nd=Xi[--Ji],Xi[Ji]=null,od=Xi[--Ji],Xi[Ji]=null;for(;e===qo;)qo=dr[--pr],dr[pr]=null,yn=dr[--pr],dr[pr]=null,vn=dr[--pr],dr[pr]=null}var Yt=null,Vt=null,ke=!1,Lr=null;function QT(e,t){var r=fr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function C0(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Yt=e,Vt=Qn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Yt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=qo!==null?{id:vn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=fr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Yt=e,Vt=null,!0):!1;default:return!1}}function bg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kg(e){if(ke){var t=Vt;if(t){var r=t;if(!C0(e,t)){if(bg(e))throw Error(N(418));t=Qn(r.nextSibling);var n=Yt;t&&C0(e,t)?QT(n,r):(e.flags=e.flags&-4097|2,ke=!1,Yt=e)}}else{if(bg(e))throw Error(N(418));e.flags=e.flags&-4097|2,ke=!1,Yt=e}}}function N0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Yt=e}function Au(e){if(e!==Yt)return!1;if(!ke)return N0(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yg(e.type,e.memoizedProps)),t&&(t=Vt)){if(bg(e))throw eb(),Error(N(418));for(;t;)QT(e,t),t=Qn(t.nextSibling)}if(N0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Vt=Qn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Yt?Qn(e.stateNode.nextSibling):null;return!0}function eb(){for(var e=Vt;e;)e=Qn(e.nextSibling)}function cs(){Vt=Yt=null,ke=!1}function sh(e){Lr===null?Lr=[e]:Lr.push(e)}var r2=wn.ReactCurrentBatchConfig;function Fa(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(N(309));var n=r.stateNode}if(!n)throw Error(N(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(N(284));if(!r._owner)throw Error(N(290,e))}return e}function Mu(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function A0(e){var t=e._init;return t(e._payload)}function tb(e){function t(g,S){if(e){var v=g.deletions;v===null?(g.deletions=[S],g.flags|=16):v.push(S)}}function r(g,S){if(!e)return null;for(;S!==null;)t(g,S),S=S.sibling;return null}function n(g,S){for(g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function o(g,S){return g=no(g,S),g.index=0,g.sibling=null,g}function i(g,S,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<S?(g.flags|=2,S):v):(g.flags|=2,S)):(g.flags|=1048576,S)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,S,v,E){return S===null||S.tag!==6?(S=qm(v,g.mode,E),S.return=g,S):(S=o(S,v),S.return=g,S)}function l(g,S,v,E){var C=v.type;return C===ji?u(g,S,v.props.children,E,v.key):S!==null&&(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jn&&A0(C)===S.type)?(E=o(S,v.props),E.ref=Fa(g,S,v),E.return=g,E):(E=Gu(v.type,v.key,v.props,null,g.mode,E),E.ref=Fa(g,S,v),E.return=g,E)}function c(g,S,v,E){return S===null||S.tag!==4||S.stateNode.containerInfo!==v.containerInfo||S.stateNode.implementation!==v.implementation?(S=Km(v,g.mode,E),S.return=g,S):(S=o(S,v.children||[]),S.return=g,S)}function u(g,S,v,E,C){return S===null||S.tag!==7?(S=Vo(v,g.mode,E,C),S.return=g,S):(S=o(S,v),S.return=g,S)}function d(g,S,v){if(typeof S=="string"&&S!==""||typeof S=="number")return S=qm(""+S,g.mode,v),S.return=g,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Su:return v=Gu(S.type,S.key,S.props,null,g.mode,v),v.ref=Fa(g,null,S),v.return=g,v;case Wi:return S=Km(S,g.mode,v),S.return=g,S;case jn:var E=S._init;return d(g,E(S._payload),v)}if(ja(S)||Pa(S))return S=Vo(S,g.mode,v,null),S.return=g,S;Mu(g,S)}return null}function p(g,S,v,E){var C=S!==null?S.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return C!==null?null:a(g,S,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:return v.key===C?l(g,S,v,E):null;case Wi:return v.key===C?c(g,S,v,E):null;case jn:return C=v._init,p(g,S,C(v._payload),E)}if(ja(v)||Pa(v))return C!==null?null:u(g,S,v,E,null);Mu(g,v)}return null}function f(g,S,v,E,C){if(typeof E=="string"&&E!==""||typeof E=="number")return g=g.get(v)||null,a(S,g,""+E,C);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Su:return g=g.get(E.key===null?v:E.key)||null,l(S,g,E,C);case Wi:return g=g.get(E.key===null?v:E.key)||null,c(S,g,E,C);case jn:var R=E._init;return f(g,S,v,R(E._payload),C)}if(ja(E)||Pa(E))return g=g.get(v)||null,u(S,g,E,C,null);Mu(S,E)}return null}function h(g,S,v,E){for(var C=null,R=null,_=S,w=S=0,z=null;_!==null&&w<v.length;w++){_.index>w?(z=_,_=null):z=_.sibling;var I=p(g,_,v[w],E);if(I===null){_===null&&(_=z);break}e&&_&&I.alternate===null&&t(g,_),S=i(I,S,w),R===null?C=I:R.sibling=I,R=I,_=z}if(w===v.length)return r(g,_),ke&&Ho(g,w),C;if(_===null){for(;w<v.length;w++)_=d(g,v[w],E),_!==null&&(S=i(_,S,w),R===null?C=_:R.sibling=_,R=_);return ke&&Ho(g,w),C}for(_=n(g,_);w<v.length;w++)z=f(_,g,w,v[w],E),z!==null&&(e&&z.alternate!==null&&_.delete(z.key===null?w:z.key),S=i(z,S,w),R===null?C=z:R.sibling=z,R=z);return e&&_.forEach(function(P){return t(g,P)}),ke&&Ho(g,w),C}function y(g,S,v,E){var C=Pa(v);if(typeof C!="function")throw Error(N(150));if(v=C.call(v),v==null)throw Error(N(151));for(var R=C=null,_=S,w=S=0,z=null,I=v.next();_!==null&&!I.done;w++,I=v.next()){_.index>w?(z=_,_=null):z=_.sibling;var P=p(g,_,I.value,E);if(P===null){_===null&&(_=z);break}e&&_&&P.alternate===null&&t(g,_),S=i(P,S,w),R===null?C=P:R.sibling=P,R=P,_=z}if(I.done)return r(g,_),ke&&Ho(g,w),C;if(_===null){for(;!I.done;w++,I=v.next())I=d(g,I.value,E),I!==null&&(S=i(I,S,w),R===null?C=I:R.sibling=I,R=I);return ke&&Ho(g,w),C}for(_=n(g,_);!I.done;w++,I=v.next())I=f(_,g,w,I.value,E),I!==null&&(e&&I.alternate!==null&&_.delete(I.key===null?w:I.key),S=i(I,S,w),R===null?C=I:R.sibling=I,R=I);return e&&_.forEach(function(W){return t(g,W)}),ke&&Ho(g,w),C}function k(g,S,v,E){if(typeof v=="object"&&v!==null&&v.type===ji&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:e:{for(var C=v.key,R=S;R!==null;){if(R.key===C){if(C=v.type,C===ji){if(R.tag===7){r(g,R.sibling),S=o(R,v.props.children),S.return=g,g=S;break e}}else if(R.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===jn&&A0(C)===R.type){r(g,R.sibling),S=o(R,v.props),S.ref=Fa(g,R,v),S.return=g,g=S;break e}r(g,R);break}else t(g,R);R=R.sibling}v.type===ji?(S=Vo(v.props.children,g.mode,E,v.key),S.return=g,g=S):(E=Gu(v.type,v.key,v.props,null,g.mode,E),E.ref=Fa(g,S,v),E.return=g,g=E)}return s(g);case Wi:e:{for(R=v.key;S!==null;){if(S.key===R)if(S.tag===4&&S.stateNode.containerInfo===v.containerInfo&&S.stateNode.implementation===v.implementation){r(g,S.sibling),S=o(S,v.children||[]),S.return=g,g=S;break e}else{r(g,S);break}else t(g,S);S=S.sibling}S=Km(v,g.mode,E),S.return=g,g=S}return s(g);case jn:return R=v._init,k(g,S,R(v._payload),E)}if(ja(v))return h(g,S,v,E);if(Pa(v))return y(g,S,v,E);Mu(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,S!==null&&S.tag===6?(r(g,S.sibling),S=o(S,v),S.return=g,g=S):(r(g,S),S=qm(v,g.mode,E),S.return=g,g=S),s(g)):r(g,S)}return k}var us=tb(!0),rb=tb(!1),id=ao(null),sd=null,Zi=null,ah=null;function lh(){ah=Zi=sd=null}function ch(e){var t=id.current;Te(id),e._currentValue=t}function wg(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function is(e,t){sd=e,ah=Zi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Dt=!0),e.firstContext=null)}function gr(e){var t=e._currentValue;if(ah!==e)if(e={context:e,memoizedValue:t,next:null},Zi===null){if(sd===null)throw Error(N(308));Zi=e,sd.dependencies={lanes:0,firstContext:e}}else Zi=Zi.next=e;return t}var Wo=null;function uh(e){Wo===null?Wo=[e]:Wo.push(e)}function nb(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,uh(t)):(r.next=o.next,o.next=r),t.interleaved=r,bn(e,n)}function bn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Gn=!1;function dh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ob(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function eo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ne&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,bn(e,r)}return o=n.interleaved,o===null?(t.next=t,uh(n)):(t.next=o.next,o.next=t),n.interleaved=t,bn(e,r)}function Fu(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xg(e,r)}}function M0(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ad(e,t,r,n){var o=e.updateQueue;Gn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var p=a.lane,f=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,y=a;switch(p=t,f=r,y.tag){case 1:if(h=y.payload,typeof h=="function"){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=y.payload,p=typeof h=="function"?h.call(f,d,p):h,p==null)break e;d=Ne({},d,p);break e;case 2:Gn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else f={eventTime:f,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,s|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Xo|=s,e.lanes=s,e.memoizedState=d}}function L0(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(N(191,o));o.call(n)}}}var Tl={},Xr=ao(Tl),fl=ao(Tl),ml=ao(Tl);function jo(e){if(e===Tl)throw Error(N(174));return e}function ph(e,t){switch(ve(ml,t),ve(fl,e),ve(Xr,Tl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ig(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ig(t,e)}Te(Xr),ve(Xr,t)}function ds(){Te(Xr),Te(fl),Te(ml)}function ib(e){jo(ml.current);var t=jo(Xr.current),r=ig(t,e.type);t!==r&&(ve(fl,e),ve(Xr,r))}function fh(e){fl.current===e&&(Te(Xr),Te(fl))}var Re=ao(0);function ld(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $m=[];function mh(){for(var e=0;e<$m.length;e++)$m[e]._workInProgressVersionPrimary=null;$m.length=0}var Hu=wn.ReactCurrentDispatcher,Wm=wn.ReactCurrentBatchConfig,Ko=0,Ce=null,je=null,qe=null,cd=!1,Za=!1,gl=0,n2=0;function mt(){throw Error(N(321))}function gh(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Dr(e[r],t[r]))return!1;return!0}function hh(e,t,r,n,o,i){if(Ko=i,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hu.current=e===null||e.memoizedState===null?a2:l2,e=r(n,o),Za){i=0;do{if(Za=!1,gl=0,25<=i)throw Error(N(301));i+=1,qe=je=null,t.updateQueue=null,Hu.current=c2,e=r(n,o)}while(Za)}if(Hu.current=ud,t=je!==null&&je.next!==null,Ko=0,qe=je=Ce=null,cd=!1,t)throw Error(N(300));return e}function Sh(){var e=gl!==0;return gl=0,e}function Yr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Ce.memoizedState=qe=e:qe=qe.next=e,qe}function hr(){if(je===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=qe===null?Ce.memoizedState:qe.next;if(t!==null)qe=t,je=e;else{if(e===null)throw Error(N(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},qe===null?Ce.memoizedState=qe=e:qe=qe.next=e}return qe}function hl(e,t){return typeof t=="function"?t(e):t}function jm(e){var t=hr(),r=t.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=e;var n=je,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Ko&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=n):l=l.next=d,Ce.lanes|=u,Xo|=u}c=c.next}while(c!==null&&c!==i);l===null?s=n:l.next=a,Dr(n,t.memoizedState)||(Dt=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,Ce.lanes|=i,Xo|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Gm(e){var t=hr(),r=t.queue;if(r===null)throw Error(N(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Dr(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function sb(){}function ab(e,t){var r=Ce,n=hr(),o=t(),i=!Dr(n.memoizedState,o);if(i&&(n.memoizedState=o,Dt=!0),n=n.queue,vh(ub.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||qe!==null&&qe.memoizedState.tag&1){if(r.flags|=2048,Sl(9,cb.bind(null,r,n,o,t),void 0,null),Ke===null)throw Error(N(349));(Ko&30)!==0||lb(r,t,o)}return o}function lb(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function cb(e,t,r,n){t.value=r,t.getSnapshot=n,db(t)&&pb(e)}function ub(e,t,r){return r(function(){db(t)&&pb(e)})}function db(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Dr(e,r)}catch{return!0}}function pb(e){var t=bn(e,1);t!==null&&Pr(t,e,1,-1)}function O0(e){var t=Yr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:e},t.queue=e,e=e.dispatch=s2.bind(null,Ce,e),[t.memoizedState,e]}function Sl(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function fb(){return hr().memoizedState}function zu(e,t,r,n){var o=Yr();Ce.flags|=e,o.memoizedState=Sl(1|t,r,void 0,n===void 0?null:n)}function Td(e,t,r,n){var o=hr();n=n===void 0?null:n;var i=void 0;if(je!==null){var s=je.memoizedState;if(i=s.destroy,n!==null&&gh(n,s.deps)){o.memoizedState=Sl(t,r,i,n);return}}Ce.flags|=e,o.memoizedState=Sl(1|t,r,i,n)}function P0(e,t){return zu(8390656,8,e,t)}function vh(e,t){return Td(2048,8,e,t)}function mb(e,t){return Td(4,2,e,t)}function gb(e,t){return Td(4,4,e,t)}function hb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sb(e,t,r){return r=r!=null?r.concat([e]):null,Td(4,4,hb.bind(null,t,e),r)}function yh(){}function vb(e,t){var r=hr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function yb(e,t){var r=hr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gh(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function _b(e,t,r){return(Ko&21)===0?(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=r):(Dr(r,t)||(r=wT(),Ce.lanes|=r,Xo|=r,e.baseState=!0),t)}function o2(e,t){var r=de;de=r!==0&&4>r?r:4,e(!0);var n=Wm.transition;Wm.transition={};try{e(!1),t()}finally{de=r,Wm.transition=n}}function Eb(){return hr().memoizedState}function i2(e,t,r){var n=ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Tb(e))bb(t,r);else if(r=nb(e,t,r,n),r!==null){var o=It();Pr(r,e,n,o),kb(r,t,n)}}function s2(e,t,r){var n=ro(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Tb(e))bb(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,r);if(o.hasEagerState=!0,o.eagerState=a,Dr(a,s)){var l=t.interleaved;l===null?(o.next=o,uh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=nb(e,t,o,n),r!==null&&(o=It(),Pr(r,e,n,o),kb(r,t,n))}}function Tb(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function bb(e,t){Za=cd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function kb(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xg(e,r)}}var ud={readContext:gr,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},a2={readContext:gr,useCallback:function(e,t){return Yr().memoizedState=[e,t===void 0?null:t],e},useContext:gr,useEffect:P0,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zu(4194308,4,hb.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return zu(4,2,e,t)},useMemo:function(e,t){var r=Yr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Yr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=i2.bind(null,Ce,e),[n.memoizedState,e]},useRef:function(e){var t=Yr();return e={current:e},t.memoizedState=e},useState:O0,useDebugValue:yh,useDeferredValue:function(e){return Yr().memoizedState=e},useTransition:function(){var e=O0(!1),t=e[0];return e=o2.bind(null,e[1]),Yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ce,o=Yr();if(ke){if(r===void 0)throw Error(N(407));r=r()}else{if(r=t(),Ke===null)throw Error(N(349));(Ko&30)!==0||lb(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,P0(ub.bind(null,n,i,e),[e]),n.flags|=2048,Sl(9,cb.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Yr(),t=Ke.identifierPrefix;if(ke){var r=yn,n=vn;r=(n&~(1<<32-Or(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=gl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=n2++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},l2={readContext:gr,useCallback:vb,useContext:gr,useEffect:vh,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:yb,useReducer:jm,useRef:fb,useState:function(){return jm(hl)},useDebugValue:yh,useDeferredValue:function(e){var t=hr();return _b(t,je.memoizedState,e)},useTransition:function(){var e=jm(hl)[0],t=hr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1},c2={readContext:gr,useCallback:vb,useContext:gr,useEffect:vh,useImperativeHandle:Sb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:yb,useReducer:Gm,useRef:fb,useState:function(){return Gm(hl)},useDebugValue:yh,useDeferredValue:function(e){var t=hr();return je===null?t.memoizedState=e:_b(t,je.memoizedState,e)},useTransition:function(){var e=Gm(hl)[0],t=hr().memoizedState;return[e,t]},useMutableSource:sb,useSyncExternalStore:ab,useId:Eb,unstable_isNewReconciler:!1};function Ar(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ig(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ne({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bd={isMounted:function(e){return(e=e._reactInternals)?Qo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=It(),o=ro(e),i=_n(n,o);i.payload=t,r!=null&&(i.callback=r),t=eo(e,i,o),t!==null&&(Pr(t,e,o,n),Fu(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=It(),o=ro(e),i=_n(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=eo(e,i,o),t!==null&&(Pr(t,e,o,n),Fu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=It(),n=ro(e),o=_n(r,n);o.tag=2,t!=null&&(o.callback=t),t=eo(e,o,n),t!==null&&(Pr(t,e,n,r),Fu(t,e,n))}};function D0(e,t,r,n,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!cl(r,n)||!cl(o,i):!0}function wb(e,t,r){var n=!1,o=io,i=t.contextType;return typeof i=="object"&&i!==null?i=gr(i):(o=Bt(t)?Yo:St.current,n=t.contextTypes,i=(n=n!=null)?ls(e,o):io),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bd,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function U0(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&bd.enqueueReplaceState(t,t.state,null)}function xg(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},dh(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=gr(i):(i=Bt(t)?Yo:St.current,o.context=ls(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ig(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&bd.enqueueReplaceState(o,o.state,null),ad(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ps(e,t){try{var r="",n=t;do r+=FM(n),n=n.return;while(n);var o=r}catch(i){o=`
|
|
7
7
|
Error generating stack: `+i.message+`
|
|
8
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vm(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Rh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var lL=typeof WeakMap=="function"?WeakMap:Map;function kb(e,t,r){r=yn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){pd||(pd=!0,Bh=n),Rh(e,t)},r}function wb(e,t,r){r=yn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){Rh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Rh(e,t),typeof n!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function BE(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new lL;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=TL.bind(null,e,t,r),t.then(e,e))}function FE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function HE(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=yn(-1,1),t.tag=2,Jn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var cL=bn.ReactCurrentOwner,At=!1;function _t(e,t,r,n){t.child=e===null?rb(t,null,r,n):cs(t,e.child,r,n)}function zE(e,t,r,n,o){r=r.render;var i=t.ref;return os(t,o),n=gg(e,t,r,n,i,o),r=Sg(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):(Ie&&r&&og(t),t.flags|=1,_t(e,t,n,o),t.child)}function $E(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!wg(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Rb(e,t,i,n,o)):(e=Gu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:cl,r(s,n)&&e.ref===t.ref)return Tn(e,t,o)}return t.flags|=1,e=eo(i,n),e.ref=t.ref,e.return=t,t.child=e}function Rb(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(cl(i,n)&&e.ref===t.ref)if(At=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,Tn(e,t,o)}return Nh(e,t,r,n,o)}function Nb(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(Zi,$t),$t|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(Zi,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Se(Zi,$t),$t|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Se(Zi,$t),$t|=n;return _t(e,t,o,r),t.child}function Cb(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Nh(e,t,r,n,o){var i=Lt(r)?Go:pt.current;return i=as(t,i),os(t,o),r=gg(e,t,r,n,i,o),n=Sg(),e!==null&&!At?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):(Ie&&n&&og(t),t.flags|=1,_t(e,t,r,o),t.child)}function jE(e,t,r,n,o){if(Lt(r)){var i=!0;rd(t)}else i=!1;if(os(t,o),t.stateNode===null)$u(e,t),xb(t,r,n),wh(t,r,n,o),n=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=ur(c):(c=Lt(r)?Go:pt.current,c=as(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&UE(t,s,n,c),$n=!1;var p=t.memoizedState;s.state=p,ad(t,n,s,o),l=t.memoizedState,a!==n||p!==l||Mt.current||$n?(typeof u=="function"&&(kh(t,r,u,n),l=t.memoizedState),(a=$n||PE(t,r,a,n,p,l,c))?(d||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"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,ob(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:wr(t.type,a),s.props=c,d=t.pendingProps,p=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=ur(l):(l=Lt(r)?Go:pt.current,l=as(t,l));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||p!==l)&&UE(t,s,n,l),$n=!1,p=t.memoizedState,s.state=p,ad(t,n,s,o);var h=t.memoizedState;a!==d||p!==h||Mt.current||$n?(typeof f=="function"&&(kh(t,r,f,n),h=t.memoizedState),(c=$n||PE(t,r,c,n,p,h,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=h),s.props=n,s.state=h,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ch(e,t,r,n,i,o)}function Ch(e,t,r,n,o,i){Cb(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&RE(t,r,!1),Tn(e,t,i);n=t.stateNode,cL.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=cs(t,e.child,null,i),t.child=cs(t,null,a,i)):_t(e,t,a,i),t.memoizedState=n.state,o&&RE(t,r,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?wE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wE(e,t.context,!1),pg(e,t.containerInfo)}function WE(e,t,r,n,o){return ls(),sg(o),t.flags|=256,_t(e,t,r,n),t.child}var Ah={dehydrated:null,treeContext:null,retryLane:0};function Mh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mb(e,t,r){var n=t.pendingProps,o=ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Se(ke,o&1),e===null)return Ih(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=kd(s,n,0,null),e=Wo(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mh(r),t.memoizedState=Ah,e):_g(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return uL(e,t,s,n,a,o,r);if(i){i=n.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:n.children};return(s&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=eo(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=eo(a,i):(i=Wo(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?Mh(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=Ah,n}return i=e.child,e=i.sibling,n=eo(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _g(e,t){return t=kd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&sg(n),cs(t,e.child,null,r),e=_g(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uL(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Vm(Error(R(422))),Lu(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=kd({mode:"visible",children:n.children},o,0,null),i=Wo(i,o,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&cs(t,e.child,null,s),t.child.memoizedState=Mh(s),t.memoizedState=Ah,i);if((t.mode&1)===0)return Lu(e,t,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(R(419)),n=Vm(i,n,void 0),Lu(e,t,s,n)}if(a=(s&e.childLanes)!==0,At||a){if(n=Ve,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,En(e,o),Ar(n,e,o,-1))}return kg(),n=Vm(Error(R(421))),Lu(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=bL.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,jt=Xn(o.nextSibling),Wt=t,Ie=!0,Nr=null,e!==null&&(sr[ar++]=gn,sr[ar++]=Sn,sr[ar++]=Vo,gn=e.id,Sn=e.overflow,Vo=t),t=_g(t,n.children),t.flags|=4096,t)}function GE(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),xh(e.return,t,r)}function Ym(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function Lb(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(_t(e,t,n.children,r),n=ke.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&GE(e,r,t);else if(e.tag===19)GE(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Se(ke,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&ld(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ym(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ld(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ym(t,!0,r,null,i);break;case"together":Ym(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $u(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),qo|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,r=eo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=eo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dL(e,t,r){switch(t.tag){case 3:Ab(t),ls();break;case 5:ib(t);break;case 1:Lt(t.type)&&rd(t);break;case 4:pg(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Se(id,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Se(ke,ke.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mb(e,t,r):(Se(ke,ke.current&1),e=Tn(e,t,r),e!==null?e.sibling:null);Se(ke,ke.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Lb(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Se(ke,ke.current),n)break;return null;case 22:case 23:return t.lanes=0,Nb(e,t,r)}return Tn(e,t,r)}var Ob,Lh,Db,Pb;Ob=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Lh=function(){};Db=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,$o(Yr.current);var i=null;switch(r){case"input":o=th(e,o),n=th(e,n),i=[];break;case"select":o=Re({},o,{value:void 0}),n=Re({},n,{value:void 0}),i=[];break;case"textarea":o=oh(e,o),n=oh(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}sh(r,n);var s;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(rl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=o?.[c],n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(rl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Pb=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ha(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function pL(e,t,r){var n=t.pendingProps;switch(ig(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return Lt(t.type)&&td(),ut(t),null;case 3:return n=t.stateNode,us(),Te(Mt),Te(pt),mg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nr!==null&&(zh(Nr),Nr=null))),Lh(e,t),ut(t),null;case 5:fg(t);var o=$o(ml.current);if(r=t.type,e!==null&&t.stateNode!=null)Db(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(R(166));return ut(t),null}if(e=$o(Yr.current),Au(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Gr]=t,n[pl]=i,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":Z0(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":tE(n,i),Ee("invalid",n)}sh(r,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Cu(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Cu(n.textContent,a,e),o=["children",""+a]):rl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ee("scroll",n)}switch(r){case"input":yu(n),eE(n,i,!0);break;case"textarea":yu(n),rE(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ed)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[Gr]=t,e[pl]=n,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(s=ah(r,n),r){case"dialog":Ee("cancel",e),Ee("close",e),o=n;break;case"iframe":case"object":case"embed":Ee("load",e),o=n;break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],e);o=n;break;case"source":Ee("error",e),o=n;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),o=n;break;case"details":Ee("toggle",e),o=n;break;case"input":Z0(e,n),o=th(e,n),Ee("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Re({},n,{value:void 0}),Ee("invalid",e);break;case"textarea":tE(e,n),o=oh(e,n),Ee("invalid",e);break;default:o=n}sh(r,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?fT(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&dT(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nl(e,l):typeof l=="number"&&nl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",e):l!=null&&Wh(e,i,l,s))}switch(r){case"input":yu(e),eE(e,n,!1);break;case"textarea":yu(e),rE(e);break;case"option":n.value!=null&&e.setAttribute("value",""+to(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?es(e,!!n.multiple,i,!1):n.defaultValue!=null&&es(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ed)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ut(t),null;case 6:if(e&&t.stateNode!=null)Pb(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(R(166));if(r=$o(ml.current),$o(Yr.current),Au(t)){if(n=t.stateNode,r=t.memoizedProps,n[Gr]=t,(i=n.nodeValue!==r)&&(e=Wt,e!==null))switch(e.tag){case 3:Cu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cu(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Gr]=t,t.stateNode=n}return ut(t),null;case 13:if(Te(ke),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&jt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)eb(),ls(),t.flags|=98560,i=!1;else if(i=Au(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(R(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(R(317));i[Gr]=t}else ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),i=!1}else Nr!==null&&(zh(Nr),Nr=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ke.current&1)!==0?$e===0&&($e=3):kg())),t.updateQueue!==null&&(t.flags|=4),ut(t),null);case 4:return us(),Lh(e,t),e===null&&ul(t.stateNode.containerInfo),ut(t),null;case 10:return cg(t.type._context),ut(t),null;case 17:return Lt(t.type)&&td(),ut(t),null;case 19:if(Te(ke),i=t.memoizedState,i===null)return ut(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Ha(i,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ld(e),s!==null){for(t.flags|=128,Ha(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Se(ke,ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Le()>ps&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304)}else{if(!n)if(e=ld(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ie)return ut(t),null}else 2*Le()-i.renderingStartTime>ps&&r!==1073741824&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Le(),t.sibling=null,r=ke.current,Se(ke,n?r&1|2:r&1),t):(ut(t),null);case 22:case 23:return xg(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?($t&1073741824)!==0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function fL(e,t){switch(ig(t),t.tag){case 1:return Lt(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return us(),Te(Mt),Te(pt),mg(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fg(t),null;case 13:if(Te(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(ke),null;case 4:return us(),null;case 10:return cg(t.type._context),null;case 22:case 23:return xg(),null;case 24:return null;default:return null}}var Ou=!1,dt=!1,mL=typeof WeakSet=="function"?WeakSet:Set,A=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Me(e,t,n)}else r.current=null}function Oh(e,t,r){try{r()}catch(n){Me(e,t,n)}}var VE=!1;function hL(e,t){if(Sh=Ju,e=zT(),ng(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===r&&++c===o&&(a=s),p===i&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(yh={focusedElem:e,selectionRange:r},Ju=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var y=h.memoizedProps,E=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:wr(t.type,y),E);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(b){Me(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return h=VE,VE=!1,h}function Za(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Oh(t,r,i)}o=o.next}while(o!==n)}}function Id(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Dh(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Ub(e){var t=e.alternate;t!==null&&(e.alternate=null,Ub(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gr],delete t[pl],delete t[Eh],delete t[J2],delete t[Q2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bb(e){return e.tag===5||e.tag===3||e.tag===4}function YE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ph(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ed));else if(n!==4&&(e=e.child,e!==null))for(Ph(e,t,r),e=e.sibling;e!==null;)Ph(e,t,r),e=e.sibling}function Uh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Uh(e,t,r),e=e.sibling;e!==null;)Uh(e,t,r),e=e.sibling}var Qe=null,Rr=!1;function Hn(e,t,r){for(r=r.child;r!==null;)Fb(e,t,r),r=r.sibling}function Fb(e,t,r){if(Vr&&typeof Vr.onCommitFiberUnmount=="function")try{Vr.onCommitFiberUnmount(gd,r)}catch{}switch(r.tag){case 5:dt||Qi(r,t);case 6:var n=Qe,o=Rr;Qe=null,Hn(e,t,r),Qe=n,Rr=o,Qe!==null&&(Rr?(e=Qe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qe.removeChild(r.stateNode));break;case 18:Qe!==null&&(Rr?(e=Qe,r=r.stateNode,e.nodeType===8?Hm(e.parentNode,r):e.nodeType===1&&Hm(e,r),al(e)):Hm(Qe,r.stateNode));break;case 4:n=Qe,o=Rr,Qe=r.stateNode.containerInfo,Rr=!0,Hn(e,t,r),Qe=n,Rr=o;break;case 0:case 11:case 14:case 15:if(!dt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Oh(r,t,s),o=o.next}while(o!==n)}Hn(e,t,r);break;case 1:if(!dt&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Me(r,t,a)}Hn(e,t,r);break;case 21:Hn(e,t,r);break;case 22:r.mode&1?(dt=(n=dt)||r.memoizedState!==null,Hn(e,t,r),dt=n):Hn(e,t,r);break;default:Hn(e,t,r)}}function qE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new mL),t.forEach(function(n){var o=IL.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function kr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Qe=a.stateNode,Rr=!1;break e;case 3:Qe=a.stateNode.containerInfo,Rr=!0;break e;case 4:Qe=a.stateNode.containerInfo,Rr=!0;break e}a=a.return}if(Qe===null)throw Error(R(160));Fb(i,s,o),Qe=null,Rr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Me(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kr(t,e),jr(e),n&4){try{Za(3,e,e.return),Id(3,e)}catch(y){Me(e,e.return,y)}try{Za(5,e,e.return)}catch(y){Me(e,e.return,y)}}break;case 1:kr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(kr(t,e),jr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var o=e.stateNode;try{nl(o,"")}catch(y){Me(e,e.return,y)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&lT(o,i),ah(a,s);var c=ah(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?fT(o,d):u==="dangerouslySetInnerHTML"?dT(o,d):u==="children"?nl(o,d):Wh(o,u,d,c)}switch(a){case"input":rh(o,i);break;case"textarea":cT(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?es(o,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?es(o,!!i.multiple,i.defaultValue,!0):es(o,!!i.multiple,i.multiple?[]:"",!1))}o[pl]=i}catch(y){Me(e,e.return,y)}}break;case 6:if(kr(t,e),jr(e),n&4){if(e.stateNode===null)throw Error(R(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(y){Me(e,e.return,y)}}break;case 3:if(kr(t,e),jr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(y){Me(e,e.return,y)}break;case 4:kr(t,e),jr(e);break;case 13:kr(t,e),jr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(bg=Le())),n&4&&qE(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(dt=(c=dt)||u,kr(t,e),dt=c):kr(t,e),jr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(A=e,u=e.child;u!==null;){for(d=A=u;A!==null;){switch(p=A,f=p.child,p.tag){case 0:case 11:case 14:case 15:Za(4,p,p.return);break;case 1:Qi(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(y){Me(n,r,y)}}break;case 5:Qi(p,p.return);break;case 22:if(p.memoizedState!==null){XE(d);continue}}f!==null?(f.return=p,A=f):XE(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pT("display",s))}catch(y){Me(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Me(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:kr(t,e),jr(e),n&4&&qE(e);break;case 21:break;default:kr(t,e),jr(e)}}function jr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Bb(r)){var n=r;break e}r=r.return}throw Error(R(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(nl(o,""),n.flags&=-33);var i=YE(e);Uh(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=YE(e);Ph(e,a,s);break;default:throw Error(R(161))}}catch(l){Me(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gL(e,t,r){A=e,zb(e,t,r)}function zb(e,t,r){for(var n=(e.mode&1)!==0;A!==null;){var o=A,i=o.child;if(o.tag===22&&n){var s=o.memoizedState!==null||Ou;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||dt;a=Ou;var c=dt;if(Ou=s,(dt=l)&&!c)for(A=o;A!==null;)s=A,l=s.child,s.tag===22&&s.memoizedState!==null?JE(o):l!==null?(l.return=s,A=l):JE(o);for(;i!==null;)A=i,zb(i,t,r),i=i.sibling;A=o,Ou=a,dt=c}KE(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,A=i):KE(e,t,r)}}function KE(e){for(;A!==null;){var t=A;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:dt||Id(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!dt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:wr(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&LE(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}LE(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&al(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}dt||t.flags&512&&Dh(t)}catch(p){Me(t,t.return,p)}}if(t===e){A=null;break}if(r=t.sibling,r!==null){r.return=t.return,A=r;break}A=t.return}}function XE(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var r=t.sibling;if(r!==null){r.return=t.return,A=r;break}A=t.return}}function JE(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Id(4,t)}catch(l){Me(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Me(t,o,l)}}var i=t.return;try{Dh(t)}catch(l){Me(t,i,l)}break;case 5:var s=t.return;try{Dh(t)}catch(l){Me(t,s,l)}}}catch(l){Me(t,t.return,l)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var SL=Math.ceil,dd=bn.ReactCurrentDispatcher,Eg=bn.ReactCurrentOwner,cr=bn.ReactCurrentBatchConfig,Z=0,Ve=null,Ue=null,Ze=0,$t=0,Zi=oo(0),$e=0,yl=null,qo=0,xd=0,Tg=0,el=null,Ct=null,bg=0,ps=1/0,mn=null,pd=!1,Bh=null,Qn=null,Du=!1,Vn=null,fd=0,tl=0,Fh=null,ju=-1,Wu=0;function Et(){return(Z&6)!==0?Le():ju!==-1?ju:ju=Le()}function Zn(e){return(e.mode&1)===0?1:(Z&2)!==0&&Ze!==0?Ze&-Ze:eL.transition!==null?(Wu===0&&(Wu=xT()),Wu):(e=ae,e!==0||(e=window.event,e=e===void 0?16:MT(e.type)),e)}function Ar(e,t,r,n){if(50<tl)throw tl=0,Fh=null,Error(R(185));vl(e,r,n),((Z&2)===0||e!==Ve)&&(e===Ve&&((Z&2)===0&&(xd|=r),$e===4&&Wn(e,Ze)),Ot(e,n),r===1&&Z===0&&(t.mode&1)===0&&(ps=Le()+500,Ed&&io()))}function Ot(e,t){var r=e.callbackNode;r2(e,t);var n=Xu(e,e===Ve?Ze:0);if(n===0)r!==null&&iE(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&iE(r),t===1)e.tag===0?Z2(QE.bind(null,e)):JT(QE.bind(null,e)),K2(function(){(Z&6)===0&&io()}),r=null;else{switch(kT(n)){case 1:r=Kh;break;case 4:r=bT;break;case 16:r=Ku;break;case 536870912:r=IT;break;default:r=Ku}r=Kb(r,$b.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $b(e,t){if(ju=-1,Wu=0,(Z&6)!==0)throw Error(R(327));var r=e.callbackNode;if(is()&&e.callbackNode!==r)return null;var n=Xu(e,e===Ve?Ze:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=md(e,n);else{t=n;var o=Z;Z|=2;var i=Wb();(Ve!==e||Ze!==t)&&(mn=null,ps=Le()+500,jo(e,t));do try{_L();break}catch(a){jb(e,a)}while(!0);lg(),dd.current=i,Z=o,Ue!==null?t=0:(Ve=null,Ze=0,t=$e)}if(t!==0){if(t===2&&(o=ph(e),o!==0&&(n=o,t=Hh(e,o))),t===1)throw r=yl,jo(e,0),Wn(e,n),Ot(e,Le()),r;if(t===6)Wn(e,n);else{if(o=e.current.alternate,(n&30)===0&&!yL(o)&&(t=md(e,n),t===2&&(i=ph(e),i!==0&&(n=i,t=Hh(e,i))),t===1))throw r=yl,jo(e,0),Wn(e,n),Ot(e,Le()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(R(345));case 2:Fo(e,Ct,mn);break;case 3:if(Wn(e,n),(n&130023424)===n&&(t=bg+500-Le(),10<t)){if(Xu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_h(Fo.bind(null,e,Ct,mn),t);break}Fo(e,Ct,mn);break;case 4:if(Wn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Cr(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*SL(n/1960))-n,10<n){e.timeoutHandle=_h(Fo.bind(null,e,Ct,mn),n);break}Fo(e,Ct,mn);break;case 5:Fo(e,Ct,mn);break;default:throw Error(R(329))}}}return Ot(e,Le()),e.callbackNode===r?$b.bind(null,e):null}function Hh(e,t){var r=el;return e.current.memoizedState.isDehydrated&&(jo(e,t).flags|=256),e=md(e,t),e!==2&&(t=Ct,Ct=r,t!==null&&zh(t)),e}function zh(e){Ct===null?Ct=e:Ct.push.apply(Ct,e)}function yL(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Mr(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wn(e,t){for(t&=~Tg,t&=~xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Cr(t),n=1<<r;e[r]=-1,t&=~n}}function QE(e){if((Z&6)!==0)throw Error(R(327));is();var t=Xu(e,0);if((t&1)===0)return Ot(e,Le()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=ph(e);n!==0&&(t=n,r=Hh(e,n))}if(r===1)throw r=yl,jo(e,0),Wn(e,t),Ot(e,Le()),r;if(r===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fo(e,Ct,mn),Ot(e,Le()),null}function Ig(e,t){var r=Z;Z|=1;try{return e(t)}finally{Z=r,Z===0&&(ps=Le()+500,Ed&&io())}}function Ko(e){Vn!==null&&Vn.tag===0&&(Z&6)===0&&is();var t=Z;Z|=1;var r=cr.transition,n=ae;try{if(cr.transition=null,ae=1,e)return e()}finally{ae=n,cr.transition=r,Z=t,(Z&6)===0&&io()}}function xg(){$t=Zi.current,Te(Zi)}function jo(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,q2(r)),Ue!==null)for(r=Ue.return;r!==null;){var n=r;switch(ig(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:us(),Te(Mt),Te(pt),mg();break;case 5:fg(n);break;case 4:us();break;case 13:Te(ke);break;case 19:Te(ke);break;case 10:cg(n.type._context);break;case 22:case 23:xg()}r=r.return}if(Ve=e,Ue=e=eo(e.current,null),Ze=$t=t,$e=0,yl=null,Tg=xd=qo=0,Ct=el=null,zo!==null){for(t=0;t<zo.length;t++)if(r=zo[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=o,n.next=s}r.pending=n}zo=null}return e}function jb(e,t){do{var r=Ue;try{if(lg(),Hu.current=ud,cd){for(var n=we.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(Yo=0,Ge=ze=we=null,Qa=!1,hl=0,Eg.current=null,r===null||r.return===null){$e=1,yl=t,Ue=null;break}e:{var i=e,s=r.return,a=r,l=t;if(t=Ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=FE(s);if(f!==null){f.flags&=-257,HE(f,s,a,i,t),f.mode&1&&BE(i,c,t),t=f,l=c;var h=t.updateQueue;if(h===null){var y=new Set;y.add(l),t.updateQueue=y}else h.add(l);break e}else{if((t&1)===0){BE(i,c,t),kg();break e}l=Error(R(426))}}else if(Ie&&a.mode&1){var E=FE(s);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),HE(E,s,a,i,t),sg(ds(l,a));break e}}i=l=ds(l,a),$e!==4&&($e=2),el===null?el=[i]:el.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=kb(i,l,t);ME(i,m);break e;case 1:a=l;var g=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Qn===null||!Qn.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=wb(i,a,t);ME(i,b);break e}}i=i.return}while(i!==null)}Vb(r)}catch(k){t=k,Ue===r&&r!==null&&(Ue=r=r.return);continue}break}while(!0)}function Wb(){var e=dd.current;return dd.current=ud,e===null?ud:e}function kg(){($e===0||$e===3||$e===2)&&($e=4),Ve===null||(qo&268435455)===0&&(xd&268435455)===0||Wn(Ve,Ze)}function md(e,t){var r=Z;Z|=2;var n=Wb();(Ve!==e||Ze!==t)&&(mn=null,jo(e,t));do try{vL();break}catch(o){jb(e,o)}while(!0);if(lg(),Z=r,dd.current=n,Ue!==null)throw Error(R(261));return Ve=null,Ze=0,$e}function vL(){for(;Ue!==null;)Gb(Ue)}function _L(){for(;Ue!==null&&!YM();)Gb(Ue)}function Gb(e){var t=qb(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Vb(e):Ue=t,Eg.current=null}function Vb(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=pL(r,t,$t),r!==null){Ue=r;return}}else{if(r=fL(r,t),r!==null){r.flags&=32767,Ue=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{$e=6,Ue=null;return}}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);$e===0&&($e=5)}function Fo(e,t,r){var n=ae,o=cr.transition;try{cr.transition=null,ae=1,EL(e,t,r,n)}finally{cr.transition=o,ae=n}return null}function EL(e,t,r,n){do is();while(Vn!==null);if((Z&6)!==0)throw Error(R(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(R(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(n2(e,i),e===Ve&&(Ue=Ve=null,Ze=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Du||(Du=!0,Kb(Ku,function(){return is(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=cr.transition,cr.transition=null;var s=ae;ae=1;var a=Z;Z|=4,Eg.current=null,hL(e,r),Hb(r,e),j2(yh),Ju=!!Sh,yh=Sh=null,e.current=r,gL(r,e,o),qM(),Z=a,ae=s,cr.transition=i}else e.current=r;if(Du&&(Du=!1,Vn=e,fd=o),i=e.pendingLanes,i===0&&(Qn=null),JM(r.stateNode,n),Ot(e,Le()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(pd)throw pd=!1,e=Bh,Bh=null,e;return(fd&1)!==0&&e.tag!==0&&is(),i=e.pendingLanes,(i&1)!==0?e===Fh?tl++:(tl=0,Fh=e):tl=0,io(),null}function is(){if(Vn!==null){var e=kT(fd),t=cr.transition,r=ae;try{if(cr.transition=null,ae=16>e?16:e,Vn===null)var n=!1;else{if(e=Vn,Vn=null,fd=0,(Z&6)!==0)throw Error(R(331));var o=Z;for(Z|=4,A=e.current;A!==null;){var i=A,s=i.child;if((A.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(A=c;A!==null;){var u=A;switch(u.tag){case 0:case 11:case 15:Za(8,u,i)}var d=u.child;if(d!==null)d.return=u,A=d;else for(;A!==null;){u=A;var p=u.sibling,f=u.return;if(Ub(u),u===c){A=null;break}if(p!==null){p.return=f,A=p;break}A=f}}}var h=i.alternate;if(h!==null){var y=h.child;if(y!==null){h.child=null;do{var E=y.sibling;y.sibling=null,y=E}while(y!==null)}}A=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,A=s;else e:for(;A!==null;){if(i=A,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Za(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,A=m;break e}A=i.return}}var g=e.current;for(A=g;A!==null;){s=A;var v=s.child;if((s.subtreeFlags&2064)!==0&&v!==null)v.return=s,A=v;else e:for(s=g;A!==null;){if(a=A,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Id(9,a)}}catch(k){Me(a,a.return,k)}if(a===s){A=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,A=b;break e}A=a.return}}if(Z=o,io(),Vr&&typeof Vr.onPostCommitFiberRoot=="function")try{Vr.onPostCommitFiberRoot(gd,e)}catch{}n=!0}return n}finally{ae=r,cr.transition=t}}return!1}function ZE(e,t,r){t=ds(r,t),t=kb(e,t,1),e=Jn(e,t,1),t=Et(),e!==null&&(vl(e,1,t),Ot(e,t))}function Me(e,t,r){if(e.tag===3)ZE(e,e,r);else for(;t!==null;){if(t.tag===3){ZE(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qn===null||!Qn.has(n))){e=ds(r,e),e=wb(t,e,1),t=Jn(t,e,1),e=Et(),t!==null&&(vl(t,1,e),Ot(t,e));break}}t=t.return}}function TL(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&r,Ve===e&&(Ze&r)===r&&($e===4||$e===3&&(Ze&130023424)===Ze&&500>Le()-bg?jo(e,0):Tg|=r),Ot(e,t)}function Yb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var r=Et();e=En(e,t),e!==null&&(vl(e,t,r),Ot(e,r))}function bL(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yb(e,r)}function IL(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(R(314))}n!==null&&n.delete(t),Yb(e,r)}var qb;qb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Mt.current)At=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return At=!1,dL(e,t,r);At=(e.flags&131072)!==0}else At=!1,Ie&&(t.flags&1048576)!==0&&QT(t,od,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$u(e,t),e=t.pendingProps;var o=as(t,pt.current);os(t,r),o=gg(null,t,n,e,o,r);var i=Sg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(n)?(i=!0,rd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dg(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,wh(t,n,e,r),t=Ch(null,t,n,!0,i,r)):(t.tag=0,Ie&&i&&og(t),_t(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($u(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=kL(n),e=wr(n,e),o){case 0:t=Nh(null,t,n,e,r);break e;case 1:t=jE(null,t,n,e,r);break e;case 11:t=zE(null,t,n,e,r);break e;case 14:t=$E(null,t,n,wr(n.type,e),r);break e}throw Error(R(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),Nh(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),jE(e,t,n,o,r);case 3:e:{if(Ab(t),e===null)throw Error(R(387));n=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),ad(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ds(Error(R(423)),t),t=WE(e,t,n,r,o);break e}else if(n!==o){o=ds(Error(R(424)),t),t=WE(e,t,n,r,o);break e}else for(jt=Xn(t.stateNode.containerInfo.firstChild),Wt=t,Ie=!0,Nr=null,r=rb(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ls(),n===o){t=Tn(e,t,r);break e}_t(e,t,n,r)}t=t.child}return t;case 5:return ib(t),e===null&&Ih(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,vh(n,o)?s=null:i!==null&&vh(n,i)&&(t.flags|=32),Cb(e,t),_t(e,t,s,r),t.child;case 6:return e===null&&Ih(t),null;case 13:return Mb(e,t,r);case 4:return pg(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=cs(t,null,n,r):_t(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),zE(e,t,n,o,r);case 7:return _t(e,t,t.pendingProps,r),t.child;case 8:return _t(e,t,t.pendingProps.children,r),t.child;case 12:return _t(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Se(id,n._currentValue),n._currentValue=s,i!==null)if(Mr(i.value,s)){if(i.children===o.children&&!Mt.current){t=Tn(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=yn(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),xh(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(R(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),xh(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}_t(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,os(t,r),o=ur(o),n=n(o),t.flags|=1,_t(e,t,n,r),t.child;case 14:return n=t.type,o=wr(n,t.pendingProps),o=wr(n.type,o),$E(e,t,n,o,r);case 15:return Rb(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:wr(n,o),$u(e,t),t.tag=1,Lt(n)?(e=!0,rd(t)):e=!1,os(t,r),xb(t,n,o),wh(t,n,o,r),Ch(null,t,n,!0,e,r);case 19:return Lb(e,t,r);case 22:return Nb(e,t,r)}throw Error(R(156,t.tag))};function Kb(e,t){return TT(e,t)}function xL(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(e,t,r,n){return new xL(e,t,r,n)}function wg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kL(e){if(typeof e=="function")return wg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vh)return 11;if(e===Yh)return 14}return 2}function eo(e,t){var r=e.alternate;return r===null?(r=lr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gu(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")wg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ji:return Wo(r.children,o,i,t);case Gh:s=8,o|=8;break;case Jm:return e=lr(12,r,t,o|2),e.elementType=Jm,e.lanes=i,e;case Qm:return e=lr(13,r,t,o),e.elementType=Qm,e.lanes=i,e;case Zm:return e=lr(19,r,t,o),e.elementType=Zm,e.lanes=i,e;case iT:return kd(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nT:s=10;break e;case oT:s=9;break e;case Vh:s=11;break e;case Yh:s=14;break e;case zn:s=16,n=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=lr(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Wo(e,t,r,n){return e=lr(7,e,n,t),e.lanes=r,e}function kd(e,t,r,n){return e=lr(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function qm(e,t,r){return e=lr(6,e,null,t),e.lanes=r,e}function Km(e,t,r){return t=lr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wL(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mm(0),this.expirationTimes=Mm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rg(e,t,r,n,o,i,s,a,l){return e=new wL(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=lr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dg(i),e}function RL(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$i,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xb(e){if(!e)return ro;e=e._reactInternals;e:{if(Jo(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var r=e.type;if(Lt(r))return XT(e,r,t)}return t}function Jb(e,t,r,n,o,i,s,a,l){return e=Rg(r,n,!0,e,o,i,s,a,l),e.context=Xb(null),r=e.current,n=Et(),o=Zn(r),i=yn(n,o),i.callback=t??null,Jn(r,i,o),e.current.lanes=o,vl(e,o,n),Ot(e,n),e}function wd(e,t,r,n){var o=t.current,i=Et(),s=Zn(o);return r=Xb(r),t.context===null?t.context=r:t.pendingContext=r,t=yn(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Jn(o,t,s),e!==null&&(Ar(e,o,s,i),Fu(e,o,s)),s}function hd(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function eT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ng(e,t){eT(e,t),(e=e.alternate)&&eT(e,t)}function NL(){return null}var Qb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cg(e){this._internalRoot=e}Rd.prototype.render=Cg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));wd(e,t,null,null)};Rd.prototype.unmount=Cg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ko(function(){wd(null,e,null,null)}),t[_n]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=NT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<jn.length&&t!==0&&t<jn[r].priority;r++);jn.splice(r,0,e),r===0&&AT(e)}};function Ag(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tT(){}function CL(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=hd(s);i.call(c)}}var s=Jb(t,n,e,0,null,!1,!1,"",tT);return e._reactRootContainer=s,e[_n]=s.current,ul(e.nodeType===8?e.parentNode:e),Ko(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=hd(l);a.call(c)}}var l=Rg(e,0,!1,null,null,!1,!1,"",tT);return e._reactRootContainer=l,e[_n]=l.current,ul(e.nodeType===8?e.parentNode:e),Ko(function(){wd(t,l,r,n)}),l}function Cd(e,t,r,n,o){var i=r._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=hd(s);a.call(l)}}wd(t,s,e,o)}else s=CL(r,t,e,o,n);return hd(s)}wT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ga(t.pendingLanes);r!==0&&(Xh(t,r|1),Ot(t,Le()),(Z&6)===0&&(ps=Le()+500,io()))}break;case 13:Ko(function(){var n=En(e,1);if(n!==null){var o=Et();Ar(n,e,1,o)}}),Ng(e,1)}};Jh=function(e){if(e.tag===13){var t=En(e,134217728);if(t!==null){var r=Et();Ar(t,e,134217728,r)}Ng(e,134217728)}};RT=function(e){if(e.tag===13){var t=Zn(e),r=En(e,t);if(r!==null){var n=Et();Ar(r,e,t,n)}Ng(e,t)}};NT=function(){return ae};CT=function(e,t){var r=ae;try{return ae=e,t()}finally{ae=r}};ch=function(e,t,r){switch(t){case"input":if(rh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=_d(n);if(!o)throw Error(R(90));aT(n),rh(n,o)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&es(e,!!r.multiple,t,!1)}};gT=Ig;ST=Ko;var AL={usingClientEntryPoint:!1,Events:[El,Yi,_d,mT,hT,Ig]},za={findFiberByHostInstance:Ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ML={bundleType:za.bundleType,version:za.version,rendererPackageName:za.rendererPackageName,rendererConfig:za.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:bn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_T(e),e===null?null:e.stateNode},findFiberByHostInstance:za.findFiberByHostInstance||NL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&($a=__REACT_DEVTOOLS_GLOBAL_HOOK__,!$a.isDisabled&&$a.supportsFiber))try{gd=$a.inject(ML),Vr=$a}catch{}var $a;Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AL;Yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(t))throw Error(R(200));return RL(e,t,null,r)};Yt.createRoot=function(e,t){if(!Ag(e))throw Error(R(299));var r=!1,n="",o=Qb;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Rg(e,1,!1,null,null,r,!1,n,o),e[_n]=t.current,ul(e.nodeType===8?e.parentNode:e),new Cg(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=_T(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return Ko(e)};Yt.hydrate=function(e,t,r){if(!Nd(t))throw Error(R(200));return Cd(null,e,t,!0,r)};Yt.hydrateRoot=function(e,t,r){if(!Ag(e))throw Error(R(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",s=Qb;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Jb(t,null,e,1,r??null,o,!1,i,s),e[_n]=t.current,ul(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rd(t)};Yt.render=function(e,t,r){if(!Nd(t))throw Error(R(200));return Cd(null,e,t,!1,r)};Yt.unmountComponentAtNode=function(e){if(!Nd(e))throw Error(R(40));return e._reactRootContainer?(Ko(function(){Cd(null,null,e,!1,function(){e._reactRootContainer=null,e[_n]=null})}),!0):!1};Yt.unstable_batchedUpdates=Ig;Yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Nd(r))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return Cd(e,t,r,!1,n)};Yt.version="18.3.1-next-f1338f8080-20240426"});var rI=Xr((tW,tI)=>{"use strict";function eI(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eI)}catch(e){console.error(e)}}eI(),tI.exports=Zb()});var oI=Xr(Mg=>{"use strict";var nI=rI();Mg.createRoot=nI.createRoot,Mg.hydrateRoot=nI.hydrateRoot;var rW});var dI=Xr(Md=>{"use strict";var PL=pn(),UL=Symbol.for("react.element"),BL=Symbol.for("react.fragment"),FL=Object.prototype.hasOwnProperty,HL=PL.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zL={key:!0,ref:!0,__self:!0,__source:!0};function uI(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)FL.call(t,n)&&!zL.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:UL,type:e,key:i,ref:s,props:o,_owner:HL.current}}Md.Fragment=BL;Md.jsx=uI;Md.jsxs=uI});var xl=Xr((fW,pI)=>{"use strict";pI.exports=dI()});var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var L=globalThis;var Or="10.56.0";function Ut(){return uo(L),L}function uo(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Or,t[Or]=t[Or]||{}}function hr(e,t,r=L){let n=r.__SENTRY__=r.__SENTRY__||{},o=n[Or]=n[Or]||{};return o[e]||(o[e]=t())}var wl=["debug","info","warn","error","log","assert","trace"],PI="Sentry Logger ",po={};function qe(e){if(!("console"in L))return e();let t=L.console,r={},n=Object.keys(po);n.forEach(o=>{let i=po[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function UI(){Bd().enabled=!0}function BI(){Bd().enabled=!1}function Bg(){return Bd().enabled}function FI(...e){Ud("log",...e)}function HI(...e){Ud("warn",...e)}function zI(...e){Ud("error",...e)}function Ud(e,...t){N&&Bg()&&qe(()=>{L.console[e](`${PI}[${e}]:`,...t)})}function Bd(){return N?hr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var T={enable:UI,disable:BI,isEnabled:Bg,log:FI,warn:HI,error:zI};var Fg=/\(error: (.*)\)/,Hg=/captureMessage|captureException/;function vs(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{let i=[],s=r.split(`
|
|
9
|
-
`);for(let a=n;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));let c=
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vm(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Rg(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var u2=typeof WeakMap=="function"?WeakMap:Map;function Ib(e,t,r){r=_n(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){pd||(pd=!0,Bg=n),Rg(e,t)},r}function xb(e,t,r){r=_n(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){Rg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Rg(e,t),typeof n!="function"&&(to===null?to=new Set([this]):to.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function B0(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new u2;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=k2.bind(null,e,t,r),t.then(e,e))}function F0(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function H0(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_n(-1,1),t.tag=2,eo(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var d2=wn.ReactCurrentOwner,Dt=!1;function wt(e,t,r,n){t.child=e===null?rb(t,null,r,n):us(t,e.child,r,n)}function z0(e,t,r,n,o){r=r.render;var i=t.ref;return is(t,o),n=hh(e,t,r,n,i,o),r=Sh(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kn(e,t,o)):(ke&&r&&oh(t),t.flags|=1,wt(e,t,n,o),t.child)}function $0(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!xh(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Rb(e,t,i,n,o)):(e=Gu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:cl,r(s,n)&&e.ref===t.ref)return kn(e,t,o)}return t.flags|=1,e=no(i,n),e.ref=t.ref,e.return=t,t.child=e}function Rb(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(cl(i,n)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,kn(e,t,o)}return Cg(e,t,r,n,o)}function Cb(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ve(es,Gt),Gt|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ve(es,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ve(es,Gt),Gt|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,ve(es,Gt),Gt|=n;return wt(e,t,o,r),t.child}function Nb(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Cg(e,t,r,n,o){var i=Bt(r)?Yo:St.current;return i=ls(t,i),is(t,o),r=hh(e,t,r,n,i,o),n=Sh(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,kn(e,t,o)):(ke&&n&&oh(t),t.flags|=1,wt(e,t,r,o),t.child)}function W0(e,t,r,n,o){if(Bt(r)){var i=!0;rd(t)}else i=!1;if(is(t,o),t.stateNode===null)$u(e,t),wb(t,r,n),xg(t,r,n,o),n=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=r.contextType;typeof c=="object"&&c!==null?c=gr(c):(c=Bt(r)?Yo:St.current,c=ls(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==n||l!==c)&&U0(t,s,n,c),Gn=!1;var p=t.memoizedState;s.state=p,ad(t,n,s,o),l=t.memoizedState,a!==n||p!==l||Ut.current||Gn?(typeof u=="function"&&(Ig(t,r,u,n),l=t.memoizedState),(a=Gn||D0(t,r,a,n,p,l,c))?(d||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"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=c,n=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,ob(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ar(t.type,a),s.props=c,d=t.pendingProps,p=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=gr(l):(l=Bt(r)?Yo:St.current,l=ls(t,l));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||p!==l)&&U0(t,s,n,l),Gn=!1,p=t.memoizedState,s.state=p,ad(t,n,s,o);var h=t.memoizedState;a!==d||p!==h||Ut.current||Gn?(typeof f=="function"&&(Ig(t,r,f,n),h=t.memoizedState),(c=Gn||D0(t,r,c,n,p,h,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=h),s.props=n,s.state=h,s.context=l,n=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ng(e,t,r,n,i,o)}function Ng(e,t,r,n,o,i){Nb(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return o&&R0(t,r,!1),kn(e,t,i);n=t.stateNode,d2.current=t;var a=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=us(t,e.child,null,i),t.child=us(t,null,a,i)):wt(e,t,a,i),t.memoizedState=n.state,o&&R0(t,r,!0),t.child}function Ab(e){var t=e.stateNode;t.pendingContext?x0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&x0(e,t.context,!1),ph(e,t.containerInfo)}function j0(e,t,r,n,o){return cs(),sh(o),t.flags|=256,wt(e,t,r,n),t.child}var Ag={dehydrated:null,treeContext:null,retryLane:0};function Mg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mb(e,t,r){var n=t.pendingProps,o=Re.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ve(Re,o&1),e===null)return kg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Id(s,n,0,null),e=Vo(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mg(r),t.memoizedState=Ag,e):_h(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return p2(e,t,s,n,a,o,r);if(i){i=n.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:n.children};return(s&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=no(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=no(a,i):(i=Vo(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?Mg(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=Ag,n}return i=e.child,e=i.sibling,n=no(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _h(e,t){return t=Id({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lu(e,t,r,n){return n!==null&&sh(n),us(t,e.child,null,r),e=_h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function p2(e,t,r,n,o,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Vm(Error(N(422))),Lu(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=Id({mode:"visible",children:n.children},o,0,null),i=Vo(i,o,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&us(t,e.child,null,s),t.child.memoizedState=Mg(s),t.memoizedState=Ag,i);if((t.mode&1)===0)return Lu(e,t,s,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(N(419)),n=Vm(i,n,void 0),Lu(e,t,s,n)}if(a=(s&e.childLanes)!==0,Dt||a){if(n=Ke,n!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,bn(e,o),Pr(n,e,o,-1))}return Ih(),n=Vm(Error(N(421))),Lu(e,t,s,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=w2.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Vt=Qn(o.nextSibling),Yt=t,ke=!0,Lr=null,e!==null&&(dr[pr++]=vn,dr[pr++]=yn,dr[pr++]=qo,vn=e.id,yn=e.overflow,qo=t),t=_h(t,n.children),t.flags|=4096,t)}function G0(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),wg(e.return,t,r)}function Ym(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function Lb(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(wt(e,t,n.children,r),n=Re.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&G0(e,r,t);else if(e.tag===19)G0(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ve(Re,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&ld(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Ym(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ld(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Ym(t,!0,r,null,i);break;case"together":Ym(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $u(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Xo|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,r=no(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=no(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function f2(e,t,r){switch(t.tag){case 3:Ab(t),cs();break;case 5:ib(t);break;case 1:Bt(t.type)&&rd(t);break;case 4:ph(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;ve(id,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ve(Re,Re.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mb(e,t,r):(ve(Re,Re.current&1),e=kn(e,t,r),e!==null?e.sibling:null);ve(Re,Re.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Lb(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ve(Re,Re.current),n)break;return null;case 22:case 23:return t.lanes=0,Cb(e,t,r)}return kn(e,t,r)}var Ob,Lg,Pb,Db;Ob=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Lg=function(){};Pb=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,jo(Xr.current);var i=null;switch(r){case"input":o=tg(e,o),n=tg(e,n),i=[];break;case"select":o=Ne({},o,{value:void 0}),n=Ne({},n,{value:void 0}),i=[];break;case"textarea":o=og(e,o),n=og(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}sg(r,n);var s;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(rl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=o?.[c],n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(rl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Db=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ha(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function gt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function m2(e,t,r){var n=t.pendingProps;switch(ih(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return Bt(t.type)&&td(),gt(t),null;case 3:return n=t.stateNode,ds(),Te(Ut),Te(St),mh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Au(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lr!==null&&(zg(Lr),Lr=null))),Lg(e,t),gt(t),null;case 5:fh(t);var o=jo(ml.current);if(r=t.type,e!==null&&t.stateNode!=null)Pb(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(N(166));return gt(t),null}if(e=jo(Xr.current),Au(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[qr]=t,n[pl]=i,e=(t.mode&1)!==0,r){case"dialog":Ee("cancel",n),Ee("close",n);break;case"iframe":case"object":case"embed":Ee("load",n);break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],n);break;case"source":Ee("error",n);break;case"img":case"image":case"link":Ee("error",n),Ee("load",n);break;case"details":Ee("toggle",n);break;case"input":QE(n,i),Ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",n);break;case"textarea":t0(n,i),Ee("invalid",n)}sg(r,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&Nu(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Nu(n.textContent,a,e),o=["children",""+a]):rl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ee("scroll",n)}switch(r){case"input":vu(n),e0(n,i,!0);break;case"textarea":vu(n),r0(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ed)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uT(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[qr]=t,e[pl]=n,Ob(e,t,!1,!1),t.stateNode=e;e:{switch(s=ag(r,n),r){case"dialog":Ee("cancel",e),Ee("close",e),o=n;break;case"iframe":case"object":case"embed":Ee("load",e),o=n;break;case"video":case"audio":for(o=0;o<Va.length;o++)Ee(Va[o],e);o=n;break;case"source":Ee("error",e),o=n;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),o=n;break;case"details":Ee("toggle",e),o=n;break;case"input":QE(e,n),o=tg(e,n),Ee("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Ne({},n,{value:void 0}),Ee("invalid",e);break;case"textarea":t0(e,n),o=og(e,n),Ee("invalid",e);break;default:o=n}sg(r,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?fT(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&dT(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&nl(e,l):typeof l=="number"&&nl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",e):l!=null&&jg(e,i,l,s))}switch(r){case"input":vu(e),e0(e,n,!1);break;case"textarea":vu(e),r0(e);break;case"option":n.value!=null&&e.setAttribute("value",""+oo(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?ts(e,!!n.multiple,i,!1):n.defaultValue!=null&&ts(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ed)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return gt(t),null;case 6:if(e&&t.stateNode!=null)Db(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(N(166));if(r=jo(ml.current),jo(Xr.current),Au(t)){if(n=t.stateNode,r=t.memoizedProps,n[qr]=t,(i=n.nodeValue!==r)&&(e=Yt,e!==null))switch(e.tag){case 3:Nu(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Nu(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[qr]=t,t.stateNode=n}return gt(t),null;case 13:if(Te(Re),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&Vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)eb(),cs(),t.flags|=98560,i=!1;else if(i=Au(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(N(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(N(317));i[qr]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gt(t),i=!1}else Lr!==null&&(zg(Lr),Lr=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Re.current&1)!==0?Ge===0&&(Ge=3):Ih())),t.updateQueue!==null&&(t.flags|=4),gt(t),null);case 4:return ds(),Lg(e,t),e===null&&ul(t.stateNode.containerInfo),gt(t),null;case 10:return ch(t.type._context),gt(t),null;case 17:return Bt(t.type)&&td(),gt(t),null;case 19:if(Te(Re),i=t.memoizedState,i===null)return gt(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Ha(i,!1);else{if(Ge!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=ld(e),s!==null){for(t.flags|=128,Ha(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ve(Re,Re.current&1|2),t.child}e=e.sibling}i.tail!==null&&De()>fs&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304)}else{if(!n)if(e=ld(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ke)return gt(t),null}else 2*De()-i.renderingStartTime>fs&&r!==1073741824&&(t.flags|=128,n=!0,Ha(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=De(),t.sibling=null,r=Re.current,ve(Re,n?r&1|2:r&1),t):(gt(t),null);case 22:case 23:return wh(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(Gt&1073741824)!==0&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function g2(e,t){switch(ih(t),t.tag){case 1:return Bt(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ds(),Te(Ut),Te(St),mh(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return fh(t),null;case 13:if(Te(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te(Re),null;case 4:return ds(),null;case 10:return ch(t.type._context),null;case 22:case 23:return wh(),null;case 24:return null;default:return null}}var Ou=!1,ht=!1,h2=typeof WeakSet=="function"?WeakSet:Set,O=null;function Qi(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Oe(e,t,n)}else r.current=null}function Og(e,t,r){try{r()}catch(n){Oe(e,t,n)}}var V0=!1;function S2(e,t){if(Sg=Ju,e=zT(),nh(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==r||o!==0&&d.nodeType!==3||(a=s+o),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(f=d.firstChild)!==null;)p=d,d=f;for(;;){if(d===e)break t;if(p===r&&++c===o&&(a=s),p===i&&++u===n&&(l=s),(f=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(vg={focusedElem:e,selectionRange:r},Ju=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var y=h.memoizedProps,k=h.memoizedState,g=t.stateNode,S=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ar(t.type,y),k);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(E){Oe(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return h=V0,V0=!1,h}function Qa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Og(t,r,i)}o=o.next}while(o!==n)}}function kd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Pg(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function Ub(e){var t=e.alternate;t!==null&&(e.alternate=null,Ub(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qr],delete t[pl],delete t[Eg],delete t[QL],delete t[e2])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bb(e){return e.tag===5||e.tag===3||e.tag===4}function Y0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ed));else if(n!==4&&(e=e.child,e!==null))for(Dg(e,t,r),e=e.sibling;e!==null;)Dg(e,t,r),e=e.sibling}function Ug(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Ug(e,t,r),e=e.sibling;e!==null;)Ug(e,t,r),e=e.sibling}var tt=null,Mr=!1;function Wn(e,t,r){for(r=r.child;r!==null;)Fb(e,t,r),r=r.sibling}function Fb(e,t,r){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(hd,r)}catch{}switch(r.tag){case 5:ht||Qi(r,t);case 6:var n=tt,o=Mr;tt=null,Wn(e,t,r),tt=n,Mr=o,tt!==null&&(Mr?(e=tt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):tt.removeChild(r.stateNode));break;case 18:tt!==null&&(Mr?(e=tt,r=r.stateNode,e.nodeType===8?Hm(e.parentNode,r):e.nodeType===1&&Hm(e,r),al(e)):Hm(tt,r.stateNode));break;case 4:n=tt,o=Mr,tt=r.stateNode.containerInfo,Mr=!0,Wn(e,t,r),tt=n,Mr=o;break;case 0:case 11:case 14:case 15:if(!ht&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Og(r,t,s),o=o.next}while(o!==n)}Wn(e,t,r);break;case 1:if(!ht&&(Qi(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Oe(r,t,a)}Wn(e,t,r);break;case 21:Wn(e,t,r);break;case 22:r.mode&1?(ht=(n=ht)||r.memoizedState!==null,Wn(e,t,r),ht=n):Wn(e,t,r);break;default:Wn(e,t,r)}}function q0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new h2),t.forEach(function(n){var o=I2.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Nr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:tt=a.stateNode,Mr=!1;break e;case 3:tt=a.stateNode.containerInfo,Mr=!0;break e;case 4:tt=a.stateNode.containerInfo,Mr=!0;break e}a=a.return}if(tt===null)throw Error(N(160));Fb(i,s,o),tt=null,Mr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Oe(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Hb(t,e),t=t.sibling}function Hb(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Nr(t,e),Vr(e),n&4){try{Qa(3,e,e.return),kd(3,e)}catch(y){Oe(e,e.return,y)}try{Qa(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:Nr(t,e),Vr(e),n&512&&r!==null&&Qi(r,r.return);break;case 5:if(Nr(t,e),Vr(e),n&512&&r!==null&&Qi(r,r.return),e.flags&32){var o=e.stateNode;try{nl(o,"")}catch(y){Oe(e,e.return,y)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&lT(o,i),ag(a,s);var c=ag(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?fT(o,d):u==="dangerouslySetInnerHTML"?dT(o,d):u==="children"?nl(o,d):jg(o,u,d,c)}switch(a){case"input":rg(o,i);break;case"textarea":cT(o,i);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?ts(o,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?ts(o,!!i.multiple,i.defaultValue,!0):ts(o,!!i.multiple,i.multiple?[]:"",!1))}o[pl]=i}catch(y){Oe(e,e.return,y)}}break;case 6:if(Nr(t,e),Vr(e),n&4){if(e.stateNode===null)throw Error(N(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(y){Oe(e,e.return,y)}}break;case 3:if(Nr(t,e),Vr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:Nr(t,e),Vr(e);break;case 13:Nr(t,e),Vr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(bh=De())),n&4&&q0(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(ht=(c=ht)||u,Nr(t,e),ht=c):Nr(t,e),Vr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(O=e,u=e.child;u!==null;){for(d=O=u;O!==null;){switch(p=O,f=p.child,p.tag){case 0:case 11:case 14:case 15:Qa(4,p,p.return);break;case 1:Qi(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(y){Oe(n,r,y)}}break;case 5:Qi(p,p.return);break;case 22:if(p.memoizedState!==null){X0(d);continue}}f!==null?(f.return=p,O=f):X0(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=pT("display",s))}catch(y){Oe(e,e.return,y)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(y){Oe(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Nr(t,e),Vr(e),n&4&&q0(e);break;case 21:break;default:Nr(t,e),Vr(e)}}function Vr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Bb(r)){var n=r;break e}r=r.return}throw Error(N(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(nl(o,""),n.flags&=-33);var i=Y0(e);Ug(e,i,o);break;case 3:case 4:var s=n.stateNode.containerInfo,a=Y0(e);Dg(e,a,s);break;default:throw Error(N(161))}}catch(l){Oe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v2(e,t,r){O=e,zb(e,t,r)}function zb(e,t,r){for(var n=(e.mode&1)!==0;O!==null;){var o=O,i=o.child;if(o.tag===22&&n){var s=o.memoizedState!==null||Ou;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||ht;a=Ou;var c=ht;if(Ou=s,(ht=l)&&!c)for(O=o;O!==null;)s=O,l=s.child,s.tag===22&&s.memoizedState!==null?J0(o):l!==null?(l.return=s,O=l):J0(o);for(;i!==null;)O=i,zb(i,t,r),i=i.sibling;O=o,Ou=a,ht=c}K0(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,O=i):K0(e,t,r)}}function K0(e){for(;O!==null;){var t=O;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ht||kd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!ht)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ar(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&L0(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}L0(t,s,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&al(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}ht||t.flags&512&&Pg(t)}catch(p){Oe(t,t.return,p)}}if(t===e){O=null;break}if(r=t.sibling,r!==null){r.return=t.return,O=r;break}O=t.return}}function X0(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var r=t.sibling;if(r!==null){r.return=t.return,O=r;break}O=t.return}}function J0(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{kd(4,t)}catch(l){Oe(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Oe(t,o,l)}}var i=t.return;try{Pg(t)}catch(l){Oe(t,i,l)}break;case 5:var s=t.return;try{Pg(t)}catch(l){Oe(t,s,l)}}}catch(l){Oe(t,t.return,l)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var y2=Math.ceil,dd=wn.ReactCurrentDispatcher,Eh=wn.ReactCurrentOwner,mr=wn.ReactCurrentBatchConfig,ne=0,Ke=null,He=null,rt=0,Gt=0,es=ao(0),Ge=0,vl=null,Xo=0,wd=0,Th=0,el=null,Pt=null,bh=0,fs=1/0,hn=null,pd=!1,Bg=null,to=null,Pu=!1,Kn=null,fd=0,tl=0,Fg=null,Wu=-1,ju=0;function It(){return(ne&6)!==0?De():Wu!==-1?Wu:Wu=De()}function ro(e){return(e.mode&1)===0?1:(ne&2)!==0&&rt!==0?rt&-rt:r2.transition!==null?(ju===0&&(ju=wT()),ju):(e=de,e!==0||(e=window.event,e=e===void 0?16:MT(e.type)),e)}function Pr(e,t,r,n){if(50<tl)throw tl=0,Fg=null,Error(N(185));yl(e,r,n),((ne&2)===0||e!==Ke)&&(e===Ke&&((ne&2)===0&&(wd|=r),Ge===4&&Yn(e,rt)),Ft(e,n),r===1&&ne===0&&(t.mode&1)===0&&(fs=De()+500,Ed&&lo()))}function Ft(e,t){var r=e.callbackNode;oL(e,t);var n=Xu(e,e===Ke?rt:0);if(n===0)r!==null&&i0(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&i0(r),t===1)e.tag===0?t2(Z0.bind(null,e)):JT(Z0.bind(null,e)),JL(function(){(ne&6)===0&&lo()}),r=null;else{switch(IT(n)){case 1:r=Kg;break;case 4:r=bT;break;case 16:r=Ku;break;case 536870912:r=kT;break;default:r=Ku}r=Kb(r,$b.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $b(e,t){if(Wu=-1,ju=0,(ne&6)!==0)throw Error(N(327));var r=e.callbackNode;if(ss()&&e.callbackNode!==r)return null;var n=Xu(e,e===Ke?rt:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=md(e,n);else{t=n;var o=ne;ne|=2;var i=jb();(Ke!==e||rt!==t)&&(hn=null,fs=De()+500,Go(e,t));do try{T2();break}catch(a){Wb(e,a)}while(!0);lh(),dd.current=i,ne=o,He!==null?t=0:(Ke=null,rt=0,t=Ge)}if(t!==0){if(t===2&&(o=pg(e),o!==0&&(n=o,t=Hg(e,o))),t===1)throw r=vl,Go(e,0),Yn(e,n),Ft(e,De()),r;if(t===6)Yn(e,n);else{if(o=e.current.alternate,(n&30)===0&&!_2(o)&&(t=md(e,n),t===2&&(i=pg(e),i!==0&&(n=i,t=Hg(e,i))),t===1))throw r=vl,Go(e,0),Yn(e,n),Ft(e,De()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(N(345));case 2:zo(e,Pt,hn);break;case 3:if(Yn(e,n),(n&130023424)===n&&(t=bh+500-De(),10<t)){if(Xu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){It(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_g(zo.bind(null,e,Pt,hn),t);break}zo(e,Pt,hn);break;case 4:if(Yn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-Or(n);i=1<<s,s=t[s],s>o&&(o=s),n&=~i}if(n=o,n=De()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*y2(n/1960))-n,10<n){e.timeoutHandle=_g(zo.bind(null,e,Pt,hn),n);break}zo(e,Pt,hn);break;case 5:zo(e,Pt,hn);break;default:throw Error(N(329))}}}return Ft(e,De()),e.callbackNode===r?$b.bind(null,e):null}function Hg(e,t){var r=el;return e.current.memoizedState.isDehydrated&&(Go(e,t).flags|=256),e=md(e,t),e!==2&&(t=Pt,Pt=r,t!==null&&zg(t)),e}function zg(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function _2(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!Dr(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yn(e,t){for(t&=~Th,t&=~wd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Or(t),n=1<<r;e[r]=-1,t&=~n}}function Z0(e){if((ne&6)!==0)throw Error(N(327));ss();var t=Xu(e,0);if((t&1)===0)return Ft(e,De()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=pg(e);n!==0&&(t=n,r=Hg(e,n))}if(r===1)throw r=vl,Go(e,0),Yn(e,t),Ft(e,De()),r;if(r===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zo(e,Pt,hn),Ft(e,De()),null}function kh(e,t){var r=ne;ne|=1;try{return e(t)}finally{ne=r,ne===0&&(fs=De()+500,Ed&&lo())}}function Jo(e){Kn!==null&&Kn.tag===0&&(ne&6)===0&&ss();var t=ne;ne|=1;var r=mr.transition,n=de;try{if(mr.transition=null,de=1,e)return e()}finally{de=n,mr.transition=r,ne=t,(ne&6)===0&&lo()}}function wh(){Gt=es.current,Te(es)}function Go(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,XL(r)),He!==null)for(r=He.return;r!==null;){var n=r;switch(ih(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:ds(),Te(Ut),Te(St),mh();break;case 5:fh(n);break;case 4:ds();break;case 13:Te(Re);break;case 19:Te(Re);break;case 10:ch(n.type._context);break;case 22:case 23:wh()}r=r.return}if(Ke=e,He=e=no(e.current,null),rt=Gt=t,Ge=0,vl=null,Th=wd=Xo=0,Pt=el=null,Wo!==null){for(t=0;t<Wo.length;t++)if(r=Wo[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=o,n.next=s}r.pending=n}Wo=null}return e}function Wb(e,t){do{var r=He;try{if(lh(),Hu.current=ud,cd){for(var n=Ce.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(Ko=0,qe=je=Ce=null,Za=!1,gl=0,Eh.current=null,r===null||r.return===null){Ge=1,vl=t,He=null;break}e:{var i=e,s=r.return,a=r,l=t;if(t=rt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=F0(s);if(f!==null){f.flags&=-257,H0(f,s,a,i,t),f.mode&1&&B0(i,c,t),t=f,l=c;var h=t.updateQueue;if(h===null){var y=new Set;y.add(l),t.updateQueue=y}else h.add(l);break e}else{if((t&1)===0){B0(i,c,t),Ih();break e}l=Error(N(426))}}else if(ke&&a.mode&1){var k=F0(s);if(k!==null){(k.flags&65536)===0&&(k.flags|=256),H0(k,s,a,i,t),sh(ps(l,a));break e}}i=l=ps(l,a),Ge!==4&&(Ge=2),el===null?el=[i]:el.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=Ib(i,l,t);M0(i,g);break e;case 1:a=l;var S=i.type,v=i.stateNode;if((i.flags&128)===0&&(typeof S.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(to===null||!to.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=xb(i,a,t);M0(i,E);break e}}i=i.return}while(i!==null)}Vb(r)}catch(C){t=C,He===r&&r!==null&&(He=r=r.return);continue}break}while(!0)}function jb(){var e=dd.current;return dd.current=ud,e===null?ud:e}function Ih(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Ke===null||(Xo&268435455)===0&&(wd&268435455)===0||Yn(Ke,rt)}function md(e,t){var r=ne;ne|=2;var n=jb();(Ke!==e||rt!==t)&&(hn=null,Go(e,t));do try{E2();break}catch(o){Wb(e,o)}while(!0);if(lh(),ne=r,dd.current=n,He!==null)throw Error(N(261));return Ke=null,rt=0,Ge}function E2(){for(;He!==null;)Gb(He)}function T2(){for(;He!==null&&!KM();)Gb(He)}function Gb(e){var t=qb(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Vb(e):He=t,Eh.current=null}function Vb(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=m2(r,t,Gt),r!==null){He=r;return}}else{if(r=g2(r,t),r!==null){r.flags&=32767,He=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,He=null;return}}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ge===0&&(Ge=5)}function zo(e,t,r){var n=de,o=mr.transition;try{mr.transition=null,de=1,b2(e,t,r,n)}finally{mr.transition=o,de=n}return null}function b2(e,t,r,n){do ss();while(Kn!==null);if((ne&6)!==0)throw Error(N(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(iL(e,i),e===Ke&&(He=Ke=null,rt=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Pu||(Pu=!0,Kb(Ku,function(){return ss(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=mr.transition,mr.transition=null;var s=de;de=1;var a=ne;ne|=4,Eh.current=null,S2(e,r),Hb(r,e),GL(vg),Ju=!!Sg,vg=Sg=null,e.current=r,v2(r,e,o),XM(),ne=a,de=s,mr.transition=i}else e.current=r;if(Pu&&(Pu=!1,Kn=e,fd=o),i=e.pendingLanes,i===0&&(to=null),QM(r.stateNode,n),Ft(e,De()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(pd)throw pd=!1,e=Bg,Bg=null,e;return(fd&1)!==0&&e.tag!==0&&ss(),i=e.pendingLanes,(i&1)!==0?e===Fg?tl++:(tl=0,Fg=e):tl=0,lo(),null}function ss(){if(Kn!==null){var e=IT(fd),t=mr.transition,r=de;try{if(mr.transition=null,de=16>e?16:e,Kn===null)var n=!1;else{if(e=Kn,Kn=null,fd=0,(ne&6)!==0)throw Error(N(331));var o=ne;for(ne|=4,O=e.current;O!==null;){var i=O,s=i.child;if((O.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(O=c;O!==null;){var u=O;switch(u.tag){case 0:case 11:case 15:Qa(8,u,i)}var d=u.child;if(d!==null)d.return=u,O=d;else for(;O!==null;){u=O;var p=u.sibling,f=u.return;if(Ub(u),u===c){O=null;break}if(p!==null){p.return=f,O=p;break}O=f}}}var h=i.alternate;if(h!==null){var y=h.child;if(y!==null){h.child=null;do{var k=y.sibling;y.sibling=null,y=k}while(y!==null)}}O=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,O=s;else e:for(;O!==null;){if(i=O,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Qa(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,O=g;break e}O=i.return}}var S=e.current;for(O=S;O!==null;){s=O;var v=s.child;if((s.subtreeFlags&2064)!==0&&v!==null)v.return=s,O=v;else e:for(s=S;O!==null;){if(a=O,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:kd(9,a)}}catch(C){Oe(a,a.return,C)}if(a===s){O=null;break e}var E=a.sibling;if(E!==null){E.return=a.return,O=E;break e}O=a.return}}if(ne=o,lo(),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(hd,e)}catch{}n=!0}return n}finally{de=r,mr.transition=t}}return!1}function Q0(e,t,r){t=ps(r,t),t=Ib(e,t,1),e=eo(e,t,1),t=It(),e!==null&&(yl(e,1,t),Ft(e,t))}function Oe(e,t,r){if(e.tag===3)Q0(e,e,r);else for(;t!==null;){if(t.tag===3){Q0(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(to===null||!to.has(n))){e=ps(r,e),e=xb(t,e,1),t=eo(t,e,1),e=It(),t!==null&&(yl(t,1,e),Ft(t,e));break}}t=t.return}}function k2(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(rt&r)===r&&(Ge===4||Ge===3&&(rt&130023424)===rt&&500>De()-bh?Go(e,0):Th|=r),Ft(e,t)}function Yb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Eu,Eu<<=1,(Eu&130023424)===0&&(Eu=4194304)));var r=It();e=bn(e,t),e!==null&&(yl(e,t,r),Ft(e,r))}function w2(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Yb(e,r)}function I2(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(N(314))}n!==null&&n.delete(t),Yb(e,r)}var qb;qb=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)Dt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Dt=!1,f2(e,t,r);Dt=(e.flags&131072)!==0}else Dt=!1,ke&&(t.flags&1048576)!==0&&ZT(t,od,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$u(e,t),e=t.pendingProps;var o=ls(t,St.current);is(t,r),o=hh(null,t,n,e,o,r);var i=Sh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(n)?(i=!0,rd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,dh(t),o.updater=bd,t.stateNode=o,o._reactInternals=t,xg(t,n,e,r),t=Ng(null,t,n,!0,i,r)):(t.tag=0,ke&&i&&oh(t),wt(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($u(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=R2(n),e=Ar(n,e),o){case 0:t=Cg(null,t,n,e,r);break e;case 1:t=W0(null,t,n,e,r);break e;case 11:t=z0(null,t,n,e,r);break e;case 14:t=$0(null,t,n,Ar(n.type,e),r);break e}throw Error(N(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),Cg(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),W0(e,t,n,o,r);case 3:e:{if(Ab(t),e===null)throw Error(N(387));n=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),ad(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ps(Error(N(423)),t),t=j0(e,t,n,r,o);break e}else if(n!==o){o=ps(Error(N(424)),t),t=j0(e,t,n,r,o);break e}else for(Vt=Qn(t.stateNode.containerInfo.firstChild),Yt=t,ke=!0,Lr=null,r=rb(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(cs(),n===o){t=kn(e,t,r);break e}wt(e,t,n,r)}t=t.child}return t;case 5:return ib(t),e===null&&kg(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,yg(n,o)?s=null:i!==null&&yg(n,i)&&(t.flags|=32),Nb(e,t),wt(e,t,s,r),t.child;case 6:return e===null&&kg(t),null;case 13:return Mb(e,t,r);case 4:return ph(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=us(t,null,n,r):wt(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),z0(e,t,n,o,r);case 7:return wt(e,t,t.pendingProps,r),t.child;case 8:return wt(e,t,t.pendingProps.children,r),t.child;case 12:return wt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ve(id,n._currentValue),n._currentValue=s,i!==null)if(Dr(i.value,s)){if(i.children===o.children&&!Ut.current){t=kn(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=_n(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),wg(i.return,r,t),a.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(N(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),wg(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}wt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,is(t,r),o=gr(o),n=n(o),t.flags|=1,wt(e,t,n,r),t.child;case 14:return n=t.type,o=Ar(n,t.pendingProps),o=Ar(n.type,o),$0(e,t,n,o,r);case 15:return Rb(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ar(n,o),$u(e,t),t.tag=1,Bt(n)?(e=!0,rd(t)):e=!1,is(t,r),wb(t,n,o),xg(t,n,o,r),Ng(null,t,n,!0,e,r);case 19:return Lb(e,t,r);case 22:return Cb(e,t,r)}throw Error(N(156,t.tag))};function Kb(e,t){return TT(e,t)}function x2(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(e,t,r,n){return new x2(e,t,r,n)}function xh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R2(e){if(typeof e=="function")return xh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vg)return 11;if(e===Yg)return 14}return 2}function no(e,t){var r=e.alternate;return r===null?(r=fr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gu(e,t,r,n,o,i){var s=2;if(n=e,typeof e=="function")xh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ji:return Vo(r.children,o,i,t);case Gg:s=8,o|=8;break;case Jm:return e=fr(12,r,t,o|2),e.elementType=Jm,e.lanes=i,e;case Zm:return e=fr(13,r,t,o),e.elementType=Zm,e.lanes=i,e;case Qm:return e=fr(19,r,t,o),e.elementType=Qm,e.lanes=i,e;case iT:return Id(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nT:s=10;break e;case oT:s=9;break e;case Vg:s=11;break e;case Yg:s=14;break e;case jn:s=16,n=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=fr(s,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Vo(e,t,r,n){return e=fr(7,e,n,t),e.lanes=r,e}function Id(e,t,r,n){return e=fr(22,e,n,t),e.elementType=iT,e.lanes=r,e.stateNode={isHidden:!1},e}function qm(e,t,r){return e=fr(6,e,null,t),e.lanes=r,e}function Km(e,t,r){return t=fr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function C2(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mm(0),this.expirationTimes=Mm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rh(e,t,r,n,o,i,s,a,l){return e=new C2(e,t,r,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=fr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(i),e}function N2(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Wi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Xb(e){if(!e)return io;e=e._reactInternals;e:{if(Qo(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var r=e.type;if(Bt(r))return XT(e,r,t)}return t}function Jb(e,t,r,n,o,i,s,a,l){return e=Rh(r,n,!0,e,o,i,s,a,l),e.context=Xb(null),r=e.current,n=It(),o=ro(r),i=_n(n,o),i.callback=t??null,eo(r,i,o),e.current.lanes=o,yl(e,o,n),Ft(e,n),e}function xd(e,t,r,n){var o=t.current,i=It(),s=ro(o);return r=Xb(r),t.context===null?t.context=r:t.pendingContext=r,t=_n(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=eo(o,t,s),e!==null&&(Pr(e,o,s,i),Fu(e,o,s)),s}function gd(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function eT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ch(e,t){eT(e,t),(e=e.alternate)&&eT(e,t)}function A2(){return null}var Zb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nh(e){this._internalRoot=e}Rd.prototype.render=Nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));xd(e,t,null,null)};Rd.prototype.unmount=Nh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jo(function(){xd(null,e,null,null)}),t[Tn]=null}};function Rd(e){this._internalRoot=e}Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=CT();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vn.length&&t!==0&&t<Vn[r].priority;r++);Vn.splice(r,0,e),r===0&&AT(e)}};function Ah(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function tT(){}function M2(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=gd(s);i.call(c)}}var s=Jb(t,n,e,0,null,!1,!1,"",tT);return e._reactRootContainer=s,e[Tn]=s.current,ul(e.nodeType===8?e.parentNode:e),Jo(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=gd(l);a.call(c)}}var l=Rh(e,0,!1,null,null,!1,!1,"",tT);return e._reactRootContainer=l,e[Tn]=l.current,ul(e.nodeType===8?e.parentNode:e),Jo(function(){xd(t,l,r,n)}),l}function Nd(e,t,r,n,o){var i=r._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=gd(s);a.call(l)}}xd(t,s,e,o)}else s=M2(r,t,e,o,n);return gd(s)}xT=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ga(t.pendingLanes);r!==0&&(Xg(t,r|1),Ft(t,De()),(ne&6)===0&&(fs=De()+500,lo()))}break;case 13:Jo(function(){var n=bn(e,1);if(n!==null){var o=It();Pr(n,e,1,o)}}),Ch(e,1)}};Jg=function(e){if(e.tag===13){var t=bn(e,134217728);if(t!==null){var r=It();Pr(t,e,134217728,r)}Ch(e,134217728)}};RT=function(e){if(e.tag===13){var t=ro(e),r=bn(e,t);if(r!==null){var n=It();Pr(r,e,t,n)}Ch(e,t)}};CT=function(){return de};NT=function(e,t){var r=de;try{return de=e,t()}finally{de=r}};cg=function(e,t,r){switch(t){case"input":if(rg(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=_d(n);if(!o)throw Error(N(90));aT(n),rg(n,o)}}}break;case"textarea":cT(e,r);break;case"select":t=r.value,t!=null&&ts(e,!!r.multiple,t,!1)}};hT=kh;ST=Jo;var L2={usingClientEntryPoint:!1,Events:[El,qi,_d,mT,gT,kh]},za={findFiberByHostInstance:$o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},O2={bundleType:za.bundleType,version:za.version,rendererPackageName:za.rendererPackageName,rendererConfig:za.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_T(e),e===null?null:e.stateNode},findFiberByHostInstance:za.findFiberByHostInstance||A2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&($a=__REACT_DEVTOOLS_GLOBAL_HOOK__,!$a.isDisabled&&$a.supportsFiber))try{hd=$a.inject(O2),Kr=$a}catch{}var $a;Xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L2;Xt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ah(t))throw Error(N(200));return N2(e,t,null,r)};Xt.createRoot=function(e,t){if(!Ah(e))throw Error(N(299));var r=!1,n="",o=Zb;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Rh(e,1,!1,null,null,r,!1,n,o),e[Tn]=t.current,ul(e.nodeType===8?e.parentNode:e),new Nh(t)};Xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=_T(t),e=e===null?null:e.stateNode,e};Xt.flushSync=function(e){return Jo(e)};Xt.hydrate=function(e,t,r){if(!Cd(t))throw Error(N(200));return Nd(null,e,t,!0,r)};Xt.hydrateRoot=function(e,t,r){if(!Ah(e))throw Error(N(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",s=Zb;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=Jb(t,null,e,1,r??null,o,!1,i,s),e[Tn]=t.current,ul(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Rd(t)};Xt.render=function(e,t,r){if(!Cd(t))throw Error(N(200));return Nd(null,e,t,!1,r)};Xt.unmountComponentAtNode=function(e){if(!Cd(e))throw Error(N(40));return e._reactRootContainer?(Jo(function(){Nd(null,null,e,!1,function(){e._reactRootContainer=null,e[Tn]=null})}),!0):!1};Xt.unstable_batchedUpdates=kh;Xt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Cd(r))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Nd(e,t,r,!1,n)};Xt.version="18.3.1-next-f1338f8080-20240426"});var rk=Zr((oj,tk)=>{"use strict";function ek(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ek)}catch(e){console.error(e)}}ek(),tk.exports=Qb()});var ok=Zr(Mh=>{"use strict";var nk=rk();Mh.createRoot=nk.createRoot,Mh.hydrateRoot=nk.hydrateRoot;var ij});var dk=Zr(Md=>{"use strict";var B2=mn(),F2=Symbol.for("react.element"),H2=Symbol.for("react.fragment"),z2=Object.prototype.hasOwnProperty,$2=B2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,W2={key:!0,ref:!0,__self:!0,__source:!0};function uk(e,t,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)z2.call(t,n)&&!W2.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:F2,type:e,key:i,ref:s,props:o,_owner:$2.current}}Md.Fragment=H2;Md.jsx=uk;Md.jsxs=uk});var wl=Zr((hj,pk)=>{"use strict";pk.exports=dk()});var M=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U=globalThis;var Ur="10.56.0";function Ht(){return fo(U),U}function fo(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ur,t[Ur]=t[Ur]||{}}function yr(e,t,r=U){let n=r.__SENTRY__=r.__SENTRY__||{},o=n[Ur]=n[Ur]||{};return o[e]||(o[e]=t())}var xl=["debug","info","warn","error","log","assert","trace"],Bk="Sentry Logger ",mo={};function Je(e){if(!("console"in U))return e();let t=U.console,r={},n=Object.keys(mo);n.forEach(o=>{let i=mo[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Fk(){Bd().enabled=!0}function Hk(){Bd().enabled=!1}function Bh(){return Bd().enabled}function zk(...e){Ud("log",...e)}function $k(...e){Ud("warn",...e)}function Wk(...e){Ud("error",...e)}function Ud(e,...t){M&&Bh()&&Je(()=>{U.console[e](`${Bk}[${e}]:`,...t)})}function Bd(){return M?yr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var T={enable:Fk,disable:Hk,isEnabled:Bh,log:zk,warn:$k,error:Wk};var Fh=/\(error: (.*)\)/,Hh=/captureMessage|captureException/;function ys(...e){let t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{let i=[],s=r.split(`
|
|
9
|
+
`);for(let a=n;a<s.length;a++){let l=s[a];l.length>1024&&(l=l.slice(0,1024));let c=Fh.test(l)?l.replace(Fh,"$1"):l;if(!c.includes("Error: ")){for(let u of t){let d=u(c);if(d){i.push(d);break}}if(i.length>=50+o)break}}return Hd(i.slice(o))}}function Cl(e){return Array.isArray(e)?ys(...e):e}function Hd(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Rl(t).function||"")&&t.pop(),t.reverse(),Hh.test(Rl(t).function||"")&&(t.pop(),Hh.test(Rl(t).function||"")&&t.pop()),t.slice(0,50).map(r=>({...r,filename:r.filename||Rl(t).filename,function:r.function||"?"}))}function Rl(e){return e[e.length-1]||{}}var Fd="<anonymous>";function vt(e){try{return!e||typeof e!="function"?Fd:e.name||Fd}catch{return Fd}}function _s(e){let t=e.exception;if(t){let r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var Es={},zh={};function st(e,t){return Es[e]=Es[e]||[],Es[e].push(t),()=>{let r=Es[e];if(r){let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}function at(e,t){if(!zh[e]){zh[e]=!0;try{t()}catch(r){M&&T.error(`Error while instrumenting ${e}`,r)}}}function Ue(e,t){let r=e&&Es[e];if(r)for(let n of r)try{n(t)}catch(o){M&&T.error(`Error while triggering instrumentation handler.
|
|
10
10
|
Type: ${e}
|
|
11
|
-
Name: ${
|
|
12
|
-
Error:`,o)}}var zd=null;function Ts(e){let t="error";tt(t,e),rt(t,$I)}function $I(){zd=L.onerror,L.onerror=function(e,t,r,n,o){return Oe("error",{column:n,error:o,line:r,msg:e,url:t}),zd?zd.apply(this,arguments):!1},L.onerror.__SENTRY_INSTRUMENTED__=!0}var $d=null;function bs(e){let t="unhandledrejection";tt(t,e),rt(t,jI)}function jI(){$d=L.onunhandledrejection,L.onunhandledrejection=function(e){return Oe("unhandledrejection",e),$d?$d.apply(this,arguments):!0},L.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $g=Object.prototype.toString;function qt(e){switch($g.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Sr(e,Error)}}function ei(e,t){return $g.call(e)===`[object ${t}]`}function ti(e){return ei(e,"ErrorEvent")}function Is(e){return ei(e,"DOMError")}function Cl(e){return ei(e,"DOMException")}function nt(e){return ei(e,"String")}function In(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function bt(e){return e===null||In(e)||typeof e!="object"&&typeof e!="function"}function Kt(e){return ei(e,"Object")}function xn(e){return typeof Event<"u"&&Sr(e,Event)}function Al(e){return ei(e,"RegExp")}function gr(e){return!!(e?.then&&typeof e.then=="function")}function Sr(e,t){try{return e instanceof t}catch{return!1}}function xs(e){return typeof Request<"u"&&Sr(e,Request)}function Ne(e,t,r){if(!(t in e))return;let n=e[t];if(typeof n!="function")return;let o=r(n);typeof o=="function"&&ks(o,n);try{e[t]=o}catch{N&&T.log(`Failed to replace method "${t}" in object`,e)}}function ve(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{N&&T.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function ks(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,ve(e,"__sentry_original__",t)}catch{}}function kn(e){return e.__sentry_original__}function ws(e){if(qt(e))return{message:e.message,name:e.name,stack:e.stack,...jg(e)};if(xn(e)){let{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...jg(e)}}return e}function jg(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Ml(e){let t=Object.keys(ws(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ri;function fo(e){if(ri!==void 0)return ri?ri(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=L;return t in r&&typeof r[t]=="function"?(ri=r[t],ri(e)):(ri=null,e())}function Xt(){return fo(()=>Math.random())}function mo(){return fo(()=>Date.now())}var WI=Symbol.for("sentry.skipNormalization"),GI=Symbol.for("sentry.overrideNormalizationDepth");function Wg(e){return!!e[WI]}function Gg(e){let t=e[GI];return typeof t=="number"?t:void 0}var jd;function ni(e){jd=e}function ot(e,t=100,r=1/0){try{return Wd("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Rs(e,t=3,r=100*1024){let n=ot(e,t);return qI(n)>r?Rs(e,t-1,r):n}function Wd(e,t,r=1/0,n=1/0,o=KI()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Gd(e,t);if(!a.startsWith("[object "))return a;if(Wg(t))return t;let l=Gg(t),c=l!==void 0?l:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let h=u.toJSON();return Wd("",h,c-1,n,o)}catch{}let d=Array.isArray(t)?[]:{},p=0,f=ws(t);for(let h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=n){d[h]="[MaxProperties ~]";break}let y=f[h];d[h]=Wd(h,y,c-1,n,o),p++}return s(t),d}function Gd(e,t){try{if(jd){let n=jd(t);if(n)return n}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${ft(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${VI(t)}]`}catch(r){return`**non-serializable** (${r})`}}function VI(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function YI(e){return~-encodeURI(e).split(/%..|./).length}function qI(e){return YI(JSON.stringify(e))}function KI(){let e=new WeakSet;function t(n){return e.has(n)?!0:(e.add(n),!1)}function r(n){e.delete(n)}return[t,r]}function ho(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ns(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let o=e[n];bt(o)?r.push(String(o)):o instanceof Error?r.push(o.message?`${o.name}: ${o.message}`:o.name):r.push(Gd(void 0,o))}return r.join(t)}function wn(e,t,r=!1){return nt(e)?Al(t)?t.test(e):nt(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ke(e,t=[],r=!1){for(let n of t)if(wn(e,n,r))return!0;return!1}function XI(){let e=L;return e.crypto||e.msCrypto}var Vd;function JI(){return Xt()*16}function Ce(e=XI()){try{if(e?.randomUUID)return fo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Vd||(Vd="10000000100040008000"+1e11),Vd.replace(/[018]/g,t=>(t^(JI()&15)>>t/4).toString(16))}function Vg(e){return e.exception?.values?.[0]}function yr(e){let{message:t,event_id:r}=e;if(t)return t;let n=Vg(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function go(e,t,r){let n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=r||"Error")}function Jt(e,t){let r=Vg(e);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){let i={...o?.data,...t.data};r.mechanism.data=i}}function Cs(e){if(Yd(e))return!0;try{ve(e,"__sentry_captured__",!0)}catch{}return!1}function Yd(e){try{return e.__sentry_captured__}catch{}}var qg=1e3;function It(){return mo()/qg}function QI(){let{performance:e}=L;if(!e?.now||!e.timeOrigin)return It;let t=e.timeOrigin;return()=>(t+fo(()=>e.now()))/qg}var Yg;function ne(){return(Yg??(Yg=QI()))()}var qd=null;function ZI(){let{performance:e}=L;if(!e?.now)return;let t=3e5,r=fo(()=>e.now()),n=mo(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+r-n)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+r-n)<t?i:n-r}function ue(){return qd===null&&(qd=ZI()),qd}function Kg(e){let t=ne(),r={sid:Ce(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>ex(r)};return e&&Jr(r,e),r}function Jr(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||ne(),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:Ce()),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{let r=e.timestamp-e.started;e.duration=r>=0?r: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 Xg(e,t){let r={};t?r={status:t}:e.status==="ok"&&(r={status:"exited"}),Jr(e,r)}function ex(e){return{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 Rn(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;let n={...e};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=Rn(n[o],t[o],r-1));return n}function mt(){return Ce()}function it(){return Ce().substring(16)}function Ll(e){try{let t=L.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Ol(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var Kd="_sentrySpan";function Nn(e,t){t?ve(e,Kd,Ll(t)):delete e[Kd]}function So(e){return Ol(e[Kd])}var tx=100,xt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mt(),sampleRand:Xt()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},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._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Nn(t,So(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&&Jr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},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,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,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;let r=typeof t=="function"?t(this):t,n=r instanceof e?r.getScopeData():Kt(r)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d,conversationId:p}=n||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Nn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Xt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:tx;if(n<=0)return this;let o={timestamp:It(),...t,message:t.message?ho(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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,attributes:this._attributes,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:So(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Rn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){let n=r?.event_id||Ce();if(!this._client)return N&&T.warn("No client configured on scope - will not capture exception!"),n;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){let o=n?.event_id||Ce();if(!this._client)return N&&T.warn("No client configured on scope - will not capture message!"),o;let i=n?.syntheticException??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){let n=t.event_id||r?.event_id||Ce();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(N&&T.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Jg(){return hr("defaultCurrentScope",()=>new xt)}function Qg(){return hr("defaultIsolationScope",()=>new xt)}var Zg=e=>e instanceof Promise&&!e[eS],eS=Symbol("chained PromiseLike"),tS=(e,t,r)=>{let n=e.then(o=>(t(o),o),o=>{throw r(o),o});return Zg(n)&&Zg(e)?n:rx(e,n)},rx=(e,t)=>{if(!t)return e;let r=!1;for(let n in e){if(n in t)continue;r=!0;let o=e[n];typeof o=="function"?Object.defineProperty(t,n,{value:(...i)=>o.apply(e,i),enumerable:!0,configurable:!0,writable:!0}):t[n]=o}return r&&Object.assign(t,{[eS]:!0}),t};var Xd=class{constructor(t,r){let n;t?n=t:n=new xt;let o;r?o=r:o=new xt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){let r=this._pushScope(),n;try{n=t(r)}catch(o){throw this._popScope(),o}return gr(n)?tS(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let 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 oi(){let e=Ut(),t=uo(e);return t.stack=t.stack||new Xd(Jg(),Qg())}function nx(e){return oi().withScope(e)}function ox(e,t){let r=oi();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function rS(e){return oi().withScope(()=>e(oi().getIsolationScope()))}function nS(){return{withIsolationScope:rS,withScope:nx,withSetScope:ox,withSetIsolationScope:(e,t)=>rS(t),getCurrentScope:()=>oi().getScope(),getIsolationScope:()=>oi().getIsolationScope()}}function Dr(e){let t=uo(e);return t.acs?t.acs:nS()}function ix(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function sx(e,t){let{value:r,unit:n}=ix(e)?e:{value:e,unit:void 0},o=ax(r),i=n&&typeof n=="string"?{unit:n}:{};if(o)return{...o,...i};if(!t||t==="skip-undefined"&&r===void 0)return;let s="";try{s=JSON.stringify(r)??""}catch{}return{value:s,type:"string",...i}}function Jd(e,t=!1){let r={};for(let[n,o]of Object.entries(e??{})){let i=sx(o,t);i&&(r[n]=i)}return r}function ax(e){if(Array.isArray(e))return{value:e,type:"array"};let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var oS;function Qd(){return oS?.()}function Dl(){return oS!==void 0}function U(){let e=Ut();return Dr(e).getCurrentScope()}function be(){let e=Ut();return Dr(e).getIsolationScope()}function As(){return hr("globalScope",()=>new xt)}function Qt(...e){let t=Ut(),r=Dr(t);if(e.length===2){let[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function M(){return U().getClient()}function Pl(e){let t=Qd();if(t)return{trace_id:t.traceId,span_id:t.spanId};let r=e.getPropagationContext(),{traceId:n,parentSpanId:o,propagationSpanId:i}=r,s={trace_id:n,span_id:i||it()};return o&&(s.parent_span_id=o),s}var Fe="sentry.source",Qr="sentry.sample_rate",ii="sentry.previous_trace_sample_rate",_e="sentry.op",J="sentry.origin",Zr="sentry.idle_span_finish_reason",vr="sentry.measurement_unit",_r="sentry.measurement_value";var si="sentry.custom_span_name",yo="sentry.profile_id",st="sentry.exclusive_time";var Ul="sentry.link.type",Bl="gen_ai.conversation.id";function Zd(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function ai(e,t){e.setAttribute("http.response.status_code",t);let r=Zd(t);r.message!=="unknown_error"&&e.setStatus(r)}var iS="_sentryScope",sS="_sentryIsolationScope";function aS(e,t,r){e&&(ve(e,sS,Ll(r)),ve(e,iS,t))}function vo(e){let t=e;return{scope:t[iS],isolationScope:Ol(t[sS])}}var Ms="sentry-";var lx=8192;function Fl(e){let t=cx(e);if(!t)return;let r=Object.entries(t).reduce((n,[o,i])=>{if(o.startsWith(Ms)){let s=o.slice(Ms.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function ep(e){if(!e)return;let t=Object.entries(e).reduce((r,[n,o])=>(o&&(r[`${Ms}${n}`]=o),r),{});return ux(t)}function cx(e){if(!(!e||!nt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=lS(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):lS(e)}function lS(e){return e.split(",").map(t=>{let r=t.indexOf("=");if(r===-1)return[];let n=t.slice(0,r),o=t.slice(r+1);return[n,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function ux(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=o===0?i:`${t},${i}`;return s.length>lx?(N&&T.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}var dx=/^o(\d+)\./,px=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function fx(e){return e==="http"||e==="https"}function Bt(e,t=!1){let{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function mx(e){let t=px.exec(e);if(!t){qe(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,o="",i="",s="",a=""]=t.slice(1),l="",c=a,u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return cS({host:i,pass:o,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function cS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function hx(e){if(!N)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(T.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?fx(n)?t&&isNaN(parseInt(t,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function gx(e){return e.match(dx)?.[1]}function uS(e){let t=e.getOptions(),{host:r}=e.getDsn()||{},n;return t.orgId?n=String(t.orgId):r&&(n=gx(r)),n}function Hl(e){let t=typeof e=="string"?mx(e):cS(e);if(!(!t||!hx(t)))return t}function Ft(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var zl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function dS(e){if(!e)return;let t=e.match(zl);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function tp(e,t){let r=dS(e),n=Fl(t);if(!r?.traceId)return{traceId:mt(),sampleRand:Xt()};let o=Sx(r,n);n&&(n.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=r;return{traceId:i,parentSpanId:s,sampled:a,dsc:n||{},sampleRand:o}}function Ls(e=mt(),t=it(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Os(e=mt(),t=it(),r){return`00-${e}-${t}-${r?"01":"00"}`}function Sx(e,t){let r=Ft(t?.sample_rand);if(r!==void 0)return r;let n=Ft(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?Xt()*n:n+Xt()*(1-n):Xt()}var $l=0,Ps=1,pS=!1;function hS(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:o,parent_span_id:i,status:s,origin:a,links:l}=B(e);return{parent_span_id:i,span_id:t,trace_id:r,data:n,op:o,status:s,origin:a,links:l}}function jl(e){let{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:B(e).parent_span_id,i=vo(e).scope,s=n?i?.getPropagationContext().propagationSpanId||it():t;return{parent_span_id:o,span_id:s,trace_id:r}}function Us(e){let{traceId:t,spanId:r}=e.spanContext(),n=wt(e);return Ls(t,r,n)}function gS(e){let{traceId:t,spanId:r}=e.spanContext(),n=wt(e);return Os(t,r,n)}function Bs(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:n,...o},attributes:i})=>({span_id:t,trace_id:r,sampled:n===Ps,attributes:i,...o}))}function op(e){if(e?.length)return e.map(({context:{spanId:t,traceId:r,traceFlags:n},attributes:o})=>({span_id:t,trace_id:r,sampled:n===Ps,attributes:o}))}function kt(e){return typeof e=="number"?fS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fS(e.getTime()):ne()}function fS(e){return e>9999999999?e/1e3:e}function B(e){if(_S(e))return e.getSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:SS(e),start_timestamp:kt(o),timestamp:kt(s)||void 0,status:Hs(a),op:n[_e],origin:n[J],links:Bs(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function Fs(e){if(_S(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(vS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{name:i,span_id:t,trace_id:r,parent_span_id:SS(e),start_timestamp:kt(o),end_timestamp:kt(s),is_segment:e===Ds(e),status:ip(a),attributes:n,links:op(l)}}return{span_id:t,trace_id:r,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Ds(e)}}function SS(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function yS(e){return{...e,attributes:Jd(e.attributes),links:e.links?.map(t=>({...t,attributes:Jd(t.attributes)}))}}function vS(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _S(e){return typeof e.getSpanJSON=="function"}function wt(e){let{traceFlags:t}=e.spanContext();return t===Ps}function Hs(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function ip(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var _o="_sentryChildSpans",rp="_sentryRootSpan";function zs(e,t){let r=e[rp]||e;ve(t,rp,r),e[_o]?e[_o].add(t):ve(e,_o,new Set([t]))}function ES(e,t){e[_o]&&e[_o].delete(t)}function en(e){let t=new Set;function r(n){if(!t.has(n)&&wt(n)){t.add(n);let o=n[_o]?Array.from(n[_o]):[];for(let i of o)r(i)}}return r(e),Array.from(t)}var te=Ds;function Ds(e){return e[rp]||e}function ie(){let e=Ut(),t=Dr(e);return t.getActiveSpan?t.getActiveSpan():So(U())}function $s(){pS||(qe(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),pS=!0)}var TS=!1;function Wl(){if(TS)return;function e(){let t=ie(),r=t&&te(t);if(r){let n="internal_error";N&&T.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:2,message:n})}}TS=!0,Ts(e),bs(e)}function He(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||M()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function bS(e){T.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function tn(e,t){if(!t?.length)return!1;for(let r of t){if(vx(r)){if(e.description&&wn(e.description,r))return N&&bS(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let o=r.name?e.description&&wn(e.description,r.name):!0,i=r.op?e.op&&wn(e.op,r.op):!0,s=r.attributes?Object.entries(r.attributes).every(([a,l])=>yx(e.attributes?.[a],l)):!0;if(o&&i&&s)return N&&bS(e),!0}return!1}function yx(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?wn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e===t}function IS(e,t){let r=t.parent_span_id,n=t.span_id;if(r)for(let o of e)o.parent_span_id===n&&(o.parent_span_id=r)}function vx(e){return typeof e=="string"||e instanceof RegExp}var li="production";var xS="_frozenDsc";function ci(e,t){ve(e,xS,t)}function Gl(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o={environment:r.environment||li,release:r.release,public_key:n,trace_id:e,org_id:uS(t)};return t.emit("createDsc",o),o}function ui(e,t){let r=t.getPropagationContext();return r.dsc||Gl(r.traceId,e)}function De(e){let t=M();if(!t)return{};let r=te(e),n=B(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[Qr]??o[ii];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let l=r[xS];if(l)return a(l);let c=i?.get("sentry.dsc"),u=c&&Fl(c);if(u)return a(u);let d=Gl(e.spanContext().traceId,t),p=o[Fe]??o["sentry.span.source"],f=n.description;return p!=="url"&&f&&(d.transaction=f),He()&&(d.sampled=String(wt(r)),d.sample_rand=i?.get("sentry.sample_rand")??vo(r).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,r),d}var Xe=class{constructor(t={}){this._traceId=t.traceId||mt(),this._spanId=t.spanId||it(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$l}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}};function Vl(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function ht(e,t=[]){return[e,t]}function Yl(e,t){let[r,n]=e;return[r,[...n,t]]}function js(e,t){let r=e[1];for(let n of r){let o=n[0].type;if(t(n,o))return!0}return!1}function ap(e,t){return js(e,(r,n)=>t.includes(n))}function sp(e){let t=uo(L);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function lp(e){let[t,r]=e,n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[sp(n),i]:n.push(typeof i=="string"?sp(i):i)}for(let i of r){let[s,a]=i;if(o(`
|
|
11
|
+
Name: ${vt(n)}
|
|
12
|
+
Error:`,o)}}var zd=null;function Ts(e){let t="error";st(t,e),at(t,jk)}function jk(){zd=U.onerror,U.onerror=function(e,t,r,n,o){return Ue("error",{column:n,error:o,line:r,msg:e,url:t}),zd?zd.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}var $d=null;function bs(e){let t="unhandledrejection";st(t,e),at(t,Gk)}function Gk(){$d=U.onunhandledrejection,U.onunhandledrejection=function(e){return Ue("unhandledrejection",e),$d?$d.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var $h=Object.prototype.toString;function Qt(e){switch($h.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Er(e,Error)}}function ti(e,t){return $h.call(e)===`[object ${t}]`}function ri(e){return ti(e,"ErrorEvent")}function ks(e){return ti(e,"DOMError")}function Nl(e){return ti(e,"DOMException")}function lt(e){return ti(e,"String")}function xn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Rt(e){return e===null||xn(e)||typeof e!="object"&&typeof e!="function"}function er(e){return ti(e,"Object")}function Rn(e){return typeof Event<"u"&&Er(e,Event)}function Al(e){return ti(e,"RegExp")}function _r(e){return!!(e?.then&&typeof e.then=="function")}function Er(e,t){try{return e instanceof t}catch{return!1}}function ws(e){return typeof Request<"u"&&Er(e,Request)}function Ae(e,t,r){if(!(t in e))return;let n=e[t];if(typeof n!="function")return;let o=r(n);typeof o=="function"&&Is(o,n);try{e[t]=o}catch{M&&T.log(`Failed to replace method "${t}" in object`,e)}}function ye(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{M&&T.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Is(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,ye(e,"__sentry_original__",t)}catch{}}function Cn(e){return e.__sentry_original__}function xs(e){if(Qt(e))return{message:e.message,name:e.name,stack:e.stack,...Wh(e)};if(Rn(e)){let{type:t,target:r,currentTarget:n,detail:o}=e;return{type:t,target:r,currentTarget:n,...o?{detail:o}:{},...Wh(e)}}return e}function Wh(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function Ml(e){let t=Object.keys(xs(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ni;function go(e){if(ni!==void 0)return ni?ni(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=U;return t in r&&typeof r[t]=="function"?(ni=r[t],ni(e)):(ni=null,e())}function tr(){return go(()=>Math.random())}function ho(){return go(()=>Date.now())}var Vk=Symbol.for("sentry.skipNormalization"),Yk=Symbol.for("sentry.overrideNormalizationDepth");function jh(e){return!!e[Vk]}function Gh(e){let t=e[Yk];return typeof t=="number"?t:void 0}var Wd;function oi(e){Wd=e}function ct(e,t=100,r=1/0){try{return jd("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Rs(e,t=3,r=100*1024){let n=ct(e,t);return Xk(n)>r?Rs(e,t-1,r):n}function jd(e,t,r=1/0,n=1/0,o=Jk()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Gd(e,t);if(!a.startsWith("[object "))return a;if(jh(t))return t;let l=Gh(t),c=l!==void 0?l:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let h=u.toJSON();return jd("",h,c-1,n,o)}catch{}let d=Array.isArray(t)?[]:{},p=0,f=xs(t);for(let h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=n){d[h]="[MaxProperties ~]";break}let y=f[h];d[h]=jd(h,y,c-1,n,o),p++}return s(t),d}function Gd(e,t){try{if(Wd){let n=Wd(t);if(n)return n}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${vt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${qk(t)}]`}catch(r){return`**non-serializable** (${r})`}}function qk(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Kk(e){return~-encodeURI(e).split(/%..|./).length}function Xk(e){return Kk(JSON.stringify(e))}function Jk(){let e=new WeakSet;function t(n){return e.has(n)?!0:(e.add(n),!1)}function r(n){e.delete(n)}return[t,r]}function So(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Cs(e,t){if(!Array.isArray(e))return"";let r=[];for(let n=0;n<e.length;n++){let o=e[n];Rt(o)?r.push(String(o)):o instanceof Error?r.push(o.message?`${o.name}: ${o.message}`:o.name):r.push(Gd(void 0,o))}return r.join(t)}function Nn(e,t,r=!1){return lt(e)?Al(t)?t.test(e):lt(t)?r?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ze(e,t=[],r=!1){for(let n of t)if(Nn(e,n,r))return!0;return!1}function Zk(){let e=U;return e.crypto||e.msCrypto}var Vd;function Qk(){return tr()*16}function Me(e=Zk()){try{if(e?.randomUUID)return go(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Vd||(Vd="10000000100040008000"+1e11),Vd.replace(/[018]/g,t=>(t^(Qk()&15)>>t/4).toString(16))}function Vh(e){return e.exception?.values?.[0]}function Tr(e){let{message:t,event_id:r}=e;if(t)return t;let n=Vh(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function vo(e,t,r){let n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=r||"Error")}function rr(e,t){let r=Vh(e);if(!r)return;let n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){let i={...o?.data,...t.data};r.mechanism.data=i}}function Ns(e){if(Yd(e))return!0;try{ye(e,"__sentry_captured__",!0)}catch{}return!1}function Yd(e){try{return e.__sentry_captured__}catch{}}var qh=1e3;function Ct(){return ho()/qh}function ew(){let{performance:e}=U;if(!e?.now||!e.timeOrigin)return Ct;let t=e.timeOrigin;return()=>(t+go(()=>e.now()))/qh}var Yh;function ae(){return(Yh??(Yh=ew()))()}var qd=null;function tw(){let{performance:e}=U;if(!e?.now)return;let t=3e5,r=go(()=>e.now()),n=ho(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+r-n)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+r-n)<t?i:n-r}function me(){return qd===null&&(qd=tw()),qd}function Kh(e){let t=ae(),r={sid:Me(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>rw(r)};return e&&Qr(r,e),r}function Qr(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||ae(),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:Me()),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{let r=e.timestamp-e.started;e.duration=r>=0?r: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 Xh(e,t){let r={};t?r={status:t}:e.status==="ok"&&(r={status:"exited"}),Qr(e,r)}function rw(e){return{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 An(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;let n={...e};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=An(n[o],t[o],r-1));return n}function yt(){return Me()}function ut(){return Me().substring(16)}function Ll(e){try{let t=U.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Ol(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var Kd="_sentrySpan";function Mn(e,t){t?ye(e,Kd,Ll(t)):delete e[Kd]}function yo(e){return Ol(e[Kd])}var nw=100,Nt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:yt(),sampleRand:tr()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},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._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Mn(t,yo(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&&Qr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},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,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,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;let r=typeof t=="function"?t(this):t,n=r instanceof e?r.getScopeData():er(r)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:l,level:c,fingerprint:u=[],propagationContext:d,conversationId:p}=n||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Mn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:yt(),sampleRand:tr()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){let n=typeof r=="number"?r:nw;if(n<=0)return this;let o={timestamp:Ct(),...t,message:t.message?So(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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,attributes:this._attributes,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:yo(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=An(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){let n=r?.event_id||Me();if(!this._client)return M&&T.warn("No client configured on scope - will not capture exception!"),n;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){let o=n?.event_id||Me();if(!this._client)return M&&T.warn("No client configured on scope - will not capture message!"),o;let i=n?.syntheticException??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){let n=t.event_id||r?.event_id||Me();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(M&&T.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Jh(){return yr("defaultCurrentScope",()=>new Nt)}function Zh(){return yr("defaultIsolationScope",()=>new Nt)}var Qh=e=>e instanceof Promise&&!e[eS],eS=Symbol("chained PromiseLike"),tS=(e,t,r)=>{let n=e.then(o=>(t(o),o),o=>{throw r(o),o});return Qh(n)&&Qh(e)?n:ow(e,n)},ow=(e,t)=>{if(!t)return e;let r=!1;for(let n in e){if(n in t)continue;r=!0;let o=e[n];typeof o=="function"?Object.defineProperty(t,n,{value:(...i)=>o.apply(e,i),enumerable:!0,configurable:!0,writable:!0}):t[n]=o}return r&&Object.assign(t,{[eS]:!0}),t};var Xd=class{constructor(t,r){let n;t?n=t:n=new Nt;let o;r?o=r:o=new Nt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){let r=this._pushScope(),n;try{n=t(r)}catch(o){throw this._popScope(),o}return _r(n)?tS(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let 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 ii(){let e=Ht(),t=fo(e);return t.stack=t.stack||new Xd(Jh(),Zh())}function iw(e){return ii().withScope(e)}function sw(e,t){let r=ii();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function rS(e){return ii().withScope(()=>e(ii().getIsolationScope()))}function nS(){return{withIsolationScope:rS,withScope:iw,withSetScope:sw,withSetIsolationScope:(e,t)=>rS(t),getCurrentScope:()=>ii().getScope(),getIsolationScope:()=>ii().getIsolationScope()}}function Br(e){let t=fo(e);return t.acs?t.acs:nS()}function aw(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function lw(e,t){let{value:r,unit:n}=aw(e)?e:{value:e,unit:void 0},o=cw(r),i=n&&typeof n=="string"?{unit:n}:{};if(o)return{...o,...i};if(!t||t==="skip-undefined"&&r===void 0)return;let s="";try{s=JSON.stringify(r)??""}catch{}return{value:s,type:"string",...i}}function Jd(e,t=!1){let r={};for(let[n,o]of Object.entries(e??{})){let i=lw(o,t);i&&(r[n]=i)}return r}function cw(e){if(Array.isArray(e))return{value:e,type:"array"};let t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}var oS;function Zd(){return oS?.()}function Pl(){return oS!==void 0}function H(){let e=Ht();return Br(e).getCurrentScope()}function be(){let e=Ht();return Br(e).getIsolationScope()}function As(){return yr("globalScope",()=>new Nt)}function nr(...e){let t=Ht(),r=Br(t);if(e.length===2){let[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function D(){return H().getClient()}function Dl(e){let t=Zd();if(t)return{trace_id:t.traceId,span_id:t.spanId};let r=e.getPropagationContext(),{traceId:n,parentSpanId:o,propagationSpanId:i}=r,s={trace_id:n,span_id:i||ut()};return o&&(s.parent_span_id=o),s}var $e="sentry.source",en="sentry.sample_rate",si="sentry.previous_trace_sample_rate",_e="sentry.op",ee="sentry.origin",tn="sentry.idle_span_finish_reason",br="sentry.measurement_unit",kr="sentry.measurement_value";var ai="sentry.custom_span_name",_o="sentry.profile_id",dt="sentry.exclusive_time";var Ul="sentry.link.type",Bl="gen_ai.conversation.id";function Qd(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function li(e,t){e.setAttribute("http.response.status_code",t);let r=Qd(t);r.message!=="unknown_error"&&e.setStatus(r)}var iS="_sentryScope",sS="_sentryIsolationScope";function aS(e,t,r){e&&(ye(e,sS,Ll(r)),ye(e,iS,t))}function Eo(e){let t=e;return{scope:t[iS],isolationScope:Ol(t[sS])}}var Ms="sentry-";var uw=8192;function Fl(e){let t=dw(e);if(!t)return;let r=Object.entries(t).reduce((n,[o,i])=>{if(o.startsWith(Ms)){let s=o.slice(Ms.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function ep(e){if(!e)return;let t=Object.entries(e).reduce((r,[n,o])=>(o&&(r[`${Ms}${n}`]=o),r),{});return pw(t)}function dw(e){if(!(!e||!lt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{let n=lS(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):lS(e)}function lS(e){return e.split(",").map(t=>{let r=t.indexOf("=");if(r===-1)return[];let n=t.slice(0,r),o=t.slice(r+1);return[n,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}function pw(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[r,n],o)=>{let i=`${encodeURIComponent(r)}=${encodeURIComponent(n)}`,s=o===0?i:`${t},${i}`;return s.length>uw?(M&&T.warn(`Not adding key: ${r} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}var fw=/^o(\d+)\./,mw=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function gw(e){return e==="http"||e==="https"}function zt(e,t=!1){let{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function hw(e){let t=mw.exec(e);if(!t){Je(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[r,n,o="",i="",s="",a=""]=t.slice(1),l="",c=a,u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){let d=c.match(/^\d+/);d&&(c=d[0])}return cS({host:i,pass:o,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function cS(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Sw(e){if(!M)return!0;let{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(T.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?gw(n)?t&&isNaN(parseInt(t,10))?(T.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(T.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(T.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function vw(e){return e.match(fw)?.[1]}function uS(e){let t=e.getOptions(),{host:r}=e.getDsn()||{},n;return t.orgId?n=String(t.orgId):r&&(n=vw(r)),n}function Hl(e){let t=typeof e=="string"?hw(e):cS(e);if(!(!t||!Sw(t)))return t}function $t(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var zl=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function dS(e){if(!e)return;let t=e.match(zl);if(!t)return;let r;return t[3]==="1"?r=!0:t[3]==="0"&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}function tp(e,t){let r=dS(e),n=Fl(t);if(!r?.traceId)return{traceId:yt(),sampleRand:tr()};let o=yw(r,n);n&&(n.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=r;return{traceId:i,parentSpanId:s,sampled:a,dsc:n||{},sampleRand:o}}function Ls(e=yt(),t=ut(),r){let n="";return r!==void 0&&(n=r?"-1":"-0"),`${e}-${t}${n}`}function Os(e=yt(),t=ut(),r){return`00-${e}-${t}-${r?"01":"00"}`}function yw(e,t){let r=$t(t?.sample_rand);if(r!==void 0)return r;let n=$t(t?.sample_rate);return n&&e?.parentSampled!==void 0?e.parentSampled?tr()*n:n+tr()*(1-n):tr()}var $l=0,Ds=1,pS=!1;function gS(e){let{spanId:t,traceId:r}=e.spanContext(),{data:n,op:o,parent_span_id:i,status:s,origin:a,links:l}=$(e);return{parent_span_id:i,span_id:t,trace_id:r,data:n,op:o,status:s,origin:a,links:l}}function Wl(e){let{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:$(e).parent_span_id,i=Eo(e).scope,s=n?i?.getPropagationContext().propagationSpanId||ut():t;return{parent_span_id:o,span_id:s,trace_id:r}}function Us(e){let{traceId:t,spanId:r}=e.spanContext(),n=Mt(e);return Ls(t,r,n)}function hS(e){let{traceId:t,spanId:r}=e.spanContext(),n=Mt(e);return Os(t,r,n)}function Bs(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:r,traceFlags:n,...o},attributes:i})=>({span_id:t,trace_id:r,sampled:n===Ds,attributes:i,...o}))}function op(e){if(e?.length)return e.map(({context:{spanId:t,traceId:r,traceFlags:n},attributes:o})=>({span_id:t,trace_id:r,sampled:n===Ds,attributes:o}))}function At(e){return typeof e=="number"?fS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?fS(e.getTime()):ae()}function fS(e){return e>9999999999?e/1e3:e}function $(e){if(_S(e))return e.getSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(yS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{span_id:t,trace_id:r,data:n,description:i,parent_span_id:SS(e),start_timestamp:At(o),timestamp:At(s)||void 0,status:Hs(a),op:n[_e],origin:n[ee],links:Bs(l)}}return{span_id:t,trace_id:r,start_timestamp:0,data:{}}}function Fs(e){if(_S(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:r}=e.spanContext();if(yS(e)){let{attributes:n,startTime:o,name:i,endTime:s,status:a,links:l}=e;return{name:i,span_id:t,trace_id:r,parent_span_id:SS(e),start_timestamp:At(o),end_timestamp:At(s),is_segment:e===Ps(e),status:ip(a),attributes:n,links:op(l)}}return{span_id:t,trace_id:r,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Ps(e)}}function SS(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function vS(e){return{...e,attributes:Jd(e.attributes),links:e.links?.map(t=>({...t,attributes:Jd(t.attributes)}))}}function yS(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _S(e){return typeof e.getSpanJSON=="function"}function Mt(e){let{traceFlags:t}=e.spanContext();return t===Ds}function Hs(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function ip(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var To="_sentryChildSpans",rp="_sentryRootSpan";function zs(e,t){let r=e[rp]||e;ye(t,rp,r),e[To]?e[To].add(t):ye(e,To,new Set([t]))}function ES(e,t){e[To]&&e[To].delete(t)}function rn(e){let t=new Set;function r(n){if(!t.has(n)&&Mt(n)){t.add(n);let o=n[To]?Array.from(n[To]):[];for(let i of o)r(i)}}return r(e),Array.from(t)}var ie=Ps;function Ps(e){return e[rp]||e}function le(){let e=Ht(),t=Br(e);return t.getActiveSpan?t.getActiveSpan():yo(H())}function $s(){pS||(Je(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),pS=!0)}var TS=!1;function jl(){if(TS)return;function e(){let t=le(),r=t&&ie(t);if(r){let n="internal_error";M&&T.log(`[Tracing] Root span: ${n} -> Global error occurred`),r.setStatus({code:2,message:n})}}TS=!0,Ts(e),bs(e)}function We(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||D()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function bS(e){T.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function nn(e,t){if(!t?.length)return!1;for(let r of t){if(Ew(r)){if(e.description&&Nn(e.description,r))return M&&bS(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let o=r.name?e.description&&Nn(e.description,r.name):!0,i=r.op?e.op&&Nn(e.op,r.op):!0,s=r.attributes?Object.entries(r.attributes).every(([a,l])=>_w(e.attributes?.[a],l)):!0;if(o&&i&&s)return M&&bS(e),!0}return!1}function _w(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Nn(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e===t}function kS(e,t){let r=t.parent_span_id,n=t.span_id;if(r)for(let o of e)o.parent_span_id===n&&(o.parent_span_id=r)}function Ew(e){return typeof e=="string"||e instanceof RegExp}var ci="production";var wS="_frozenDsc";function ui(e,t){ye(e,wS,t)}function Gl(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o={environment:r.environment||ci,release:r.release,public_key:n,trace_id:e,org_id:uS(t)};return t.emit("createDsc",o),o}function di(e,t){let r=t.getPropagationContext();return r.dsc||Gl(r.traceId,e)}function Be(e){let t=D();if(!t)return{};let r=ie(e),n=$(r),o=n.data,i=r.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[en]??o[si];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let l=r[wS];if(l)return a(l);let c=i?.get("sentry.dsc"),u=c&&Fl(c);if(u)return a(u);let d=Gl(e.spanContext().traceId,t),p=o[$e]??o["sentry.span.source"],f=n.description;return p!=="url"&&f&&(d.transaction=f),We()&&(d.sampled=String(Mt(r)),d.sample_rand=i?.get("sentry.sample_rand")??Eo(r).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,r),d}var Qe=class{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||ut(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:$l}}end(t){}setAttribute(t,r){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,r,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,r){}};function Vl(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function _t(e,t=[]){return[e,t]}function Yl(e,t){let[r,n]=e;return[r,[...n,t]]}function Ws(e,t){let r=e[1];for(let n of r){let o=n[0].type;if(t(n,o))return!0}return!1}function ap(e,t){return Ws(e,(r,n)=>t.includes(n))}function sp(e){let t=fo(U);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function lp(e){let[t,r]=e,n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[sp(n),i]:n.push(typeof i=="string"?sp(i):i)}for(let i of r){let[s,a]=i;if(o(`
|
|
13
13
|
${JSON.stringify(s)}
|
|
14
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(
|
|
14
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(ct(a))}o(l)}}return typeof n=="string"?n:Tw(n)}function Tw(e){let t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}function cp(e){return[{type:"span"},e]}function up(e){let t=typeof e.data=="string"?sp(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var IS={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function bw(e){return e in IS}function ql(e){return bw(e)?IS[e]:e}function pi(e){if(!e?.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}}function js(e,t,r,n){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:zt(n)},...o&&{trace:o}}}function kw(e,t){if(!t)return e;let r=e.sdk||{};return e.sdk={...r,name:r.name||t.name,version:r.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function xS(e,t,r,n){let o=pi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:zt(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return _t(i,[s])}function RS(e,t,r,n){let o=pi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";kw(e,r?.sdk);let s=js(e,o,n,t);return delete e.sdkProcessingMetadata,_t(s,[[{type:i},e]])}function CS(e,t){function r(f){return!!f.trace_id&&!!f.public_key}let n=Be(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...r(n)&&{trace:n},...!!i&&o&&{dsn:zt(o)}},{beforeSendSpan:a,ignoreSpans:l}=t?.getOptions()||{},c=l?.length?e.filter(f=>{let h=$(f);return!nn({description:h.description,op:h.op,attributes:h.data},l)}):e,u=e.length-c.length;u&&t?.recordDroppedEvent("before_send","span",u);let d=a?f=>{let h=$(f),y=Vl(a)?h:a(h);return y||($s(),h)}:$,p=[];for(let f of c){let h=d(f);h&&p.push(cp(h))}return _t(s,p)}function NS(e){if(!M)return;let{description:t="< unknown name >",op:r="< unknown op >",parent_span_id:n}=$(e),{spanId:o}=e.spanContext(),i=Mt(e),s=ie(e),a=s===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,c=[`op: ${r}`,`name: ${t}`,`ID: ${o}`];if(n&&c.push(`parent ID: ${n}`),!a){let{op:u,description:d}=$(s);c.push(`root ID: ${s.spanContext().spanId}`),u&&c.push(`root op: ${u}`),d&&c.push(`root description: ${d}`)}T.log(`${l}
|
|
15
15
|
${c.join(`
|
|
16
|
-
`)}`)}function AS(e){if(!N)return;let{description:t="< unknown name >",op:r="< unknown op >"}=B(e),{spanId:n}=e.spanContext(),i=te(e)===e,s=`[Tracing] Finishing "${r}" ${i?"root ":""}span "${t}" with ID ${n}`;T.log(s)}function Kl(e,t,r,n=ie()){let o=n&&te(n);o&&(N&&T.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),o.addEvent(e,{[_r]:t,[vr]:r}))}function Xl(e){if(!e||e.length===0)return;let t={};return e.forEach(r=>{let n=r.attributes||{},o=n[vr],i=n[_r];typeof o=="string"&&typeof i=="number"&&(t[r.name]={value:i,unit:o})}),t}function Je(e){return e.getOptions().traceLifecycle==="stream"}var MS=1e3,Cn=class{constructor(t={}){this._traceId=t.traceId||mt(),this._spanId=t.spanId||it(),this._startTime=t.startTimestamp||ne(),this._links=t.links,this._attributes={},this.setAttributes({[J]:"manual",[_e]: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._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){let{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Ps:$l}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=kt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Fe,"custom"),this}end(t){this._endTime||(this._endTime=kt(t),AS(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[_e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Hs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[J],profile_id:this._attributes[yo],exclusive_time:this._attributes[st],measurements:Xl(this._events),is_segment:this._isStandaloneSpan&&te(this)===this||void 0,segment_id:this._isStandaloneSpan?te(this).spanContext().spanId:void 0,links:Bs(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===te(this),status:ip(this._status),attributes:this._attributes,links:op(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){N&&T.log("[Tracing] Adding an event to span:",t);let o=LS(r)?r:n||ne(),i=LS(r)?{}:r||{},s={name:t,time:kt(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=M();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===te(this)))return;if(this._isStandaloneSpan){this._sampled?Ix(NS([this],t)):(N&&T.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&Je(t)){t.emit("afterSegmentSpanEnd",this);return}let n=this._convertSpanToTransaction();n&&(vo(this).scope||U()).captureEvent(n)}_convertSpanToTransaction(){if(!OS(B(this)))return;this._name||(N&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:r}=vo(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=en(this).filter(d=>d!==this&&!bx(d)).map(d=>B(d)).filter(OS),s=this._attributes[Fe];delete this._attributes[si];let a=!1;i.forEach(d=>{delete d.data[si],d.op?.startsWith("gen_ai.")&&(a=!0)});let l={contexts:{trace:hS(this)},spans:i.length>MS?i.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,MS):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:De(this),hasGenAiSpans:a},request:n,...s&&{transaction_info:{source:s}}},c=Xl(this._events);return c&&Object.keys(c).length&&(N&&T.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}};function LS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function OS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function bx(e){return e instanceof Cn&&e.isStandaloneSpan()}function Ix(e){let t=M();if(!t)return;let r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function DS(e,t,r){if(!He(e))return[!1];let n,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),n=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,n=!0);let i=Ft(o);if(i===void 0)return N&&T.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return N&&T.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,i,n];let s=r<i;return s||N&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,n]}var dp="__SENTRY_SUPPRESS_TRACING__";function je(e){let t=US();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=kx(e),{forceTransaction:n,parentSpan:o}=e;return(e.scope?s=>Qt(e.scope,s):o!==void 0?s=>pi(o,s):s=>s())(()=>{let s=U(),a=Rx(s,o),l=M();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new Xe):xx({parentSpan:a,spanArguments:r,forceTransaction:n,scope:s})})}function pi(e,t){let r=US();return r.withActiveSpan?r.withActiveSpan(e,t):Qt(n=>(Nn(n,e||void 0),t(n)))}function xx({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!He()){let a=new Xe;if(r||!e){let l={sampled:"false",sample_rate:"0",transaction:t.name,...De(a)};ci(a,l)}return a}let o=M();if(Nx(o,t))return pp(n)||o?.recordDroppedEvent("ignored","span"),new Xe({dropReason:"ignored",traceId:e?.spanContext().traceId??n.getPropagationContext().traceId});let i=be(),s;if(e&&!r)s=wx(e,n,t),zs(e,s);else if(e){let a=De(e),{traceId:l,spanId:c}=e.spanContext(),u=wt(e);s=PS({traceId:l,parentSpanId:c,...t},n,u),ci(s,a)}else{let{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...n.getPropagationContext()};s=PS({traceId:a,parentSpanId:c,...t},n,u),l&&ci(s,l)}return CS(s),aS(s,n,i),s}function kx(e){let r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...r};return n.startTimestamp=kt(e.startTime),delete n.startTime,n}return r}function US(){let e=Ut();return Dr(e)}function PS(e,t,r){let n=M(),o=n?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};n?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??r,l=s.spanAttributes,c=t.getPropagationContext(),u=pp(t),[d,p,f]=u?[!1]:DS(o,{name:i,parentSampled:a,attributes:l,parentSampleRate:Ft(c.dsc?.sample_rate)},c.sampleRand),h=new Cn({...e,attributes:{[Fe]:"custom",[Qr]:p!==void 0&&f?p:void 0,...l},sampled:d});return!d&&n&&!u&&(N&&T.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate",Je(n)?"span":"transaction")),n&&n.emit("spanStart",h),h}function wx(e,t,r){let{spanId:n,traceId:o}=e.spanContext(),i=pp(t),s=i?!1:wt(e),a=s?new Cn({...r,parentSpanId:n,traceId:o,sampled:s}):new Xe({traceId:o});zs(e,a);let l=M();return l&&(Je(l)&&a instanceof Xe&&(e instanceof Xe&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),r.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function Rx(e,t){if(t)return t;if(t===null)return;let r=So(e);if(!r)return;let n=M();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?te(r):r}function Nx(e,t){let r=e?.getOptions().ignoreSpans;return!e||!Je(e)||!r?.length?!1:tn({description:t.name||"",op:t.attributes?.[_e]||t.op,attributes:t.attributes},r)}function pp(e){return e.getScopeData().sdkProcessingMetadata[dp]===!0}var fi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Cx="heartbeatFailed",Ax="idleTimeout",Mx="finalTimeout",Lx="externalFinish";function Jl(e,t={}){let r=new Map,n=!1,o,i=Lx,s=!t.disableAutoFinish,a=[],{idleTimeout:l=fi.idleTimeout,finalTimeout:c=fi.finalTimeout,childSpanTimeout:u=fi.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,f=M();if(!f||!He()){let _=new Xe,I={sample_rate:"0",sampled:"false",...De(_)};return ci(_,I),_}let h=U(),y=ie(),E=Ox(e);E.end=new Proxy(E.end,{apply(_,I,j){if(d&&d(E),I instanceof Xe)return;let[x,...D]=j,Y=x||ne(),ee=kt(Y),G=en(E).filter($=>$!==E),Be=B(E);if(!G.length||!p)return w(ee),Reflect.apply(_,I,[ee,...D]);let ce=f.getOptions().ignoreSpans,ye=G?.reduce(($,q)=>{let pe=B(q);return!pe.timestamp||ce&&tn({description:pe.description,op:pe.op,attributes:pe.data},ce)?$:$?Math.max($,pe.timestamp):pe.timestamp},void 0),C=Be.start_timestamp,oe=Math.min(C?C+c/1e3:1/0,Math.max(C||-1/0,Math.min(ee,ye||1/0)));return w(oe),Reflect.apply(_,I,[oe,...D])}});function m(){o&&(clearTimeout(o),o=void 0)}function g(_){m(),o=setTimeout(()=>{!n&&r.size===0&&s&&(i=Ax,E.end(_))},l)}function v(_){o=setTimeout(()=>{!n&&s&&(i=Cx,E.end(_))},u)}function b(_){m(),r.set(_,!0);let I=ne();v(I+u/1e3)}function k(_){if(r.has(_)&&r.delete(_),r.size===0){let I=ne();g(I+l/1e3)}}function w(_){n=!0,r.clear(),a.forEach(G=>G()),Nn(h,y);let I=B(E),{start_timestamp:j}=I;if(!j)return;I.data[Zr]||E.setAttribute(Zr,i);let D=I.status;(!D||D==="unknown")&&E.setStatus({code:1}),T.log(`[Tracing] Idle span "${I.op}" finished`);let Y=en(E).filter(G=>G!==E),ee=0;Y.forEach(G=>{G.isRecording()&&(G.setStatus({code:2,message:"cancelled"}),G.end(_),N&&T.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));let Be=B(G),{timestamp:ce=0,start_timestamp:ye=0}=Be,C=ye<=_,oe=(c+l)/1e3,$=ce-ye<=oe;if(N){let q=JSON.stringify(G,void 0,2);C?$||T.log("[Tracing] Discarding span since it finished after idle span final timeout",q):T.log("[Tracing] Discarding span since it happened after idle span was finished",q)}(!$||!C)&&(ES(E,G),ee++)}),ee>0&&E.setAttribute("sentry.idle_span_discarded_spans",ee)}return a.push(f.on("spanStart",_=>{if(n||_===E||B(_).timestamp||_ instanceof Cn&&_.isStandaloneSpan())return;en(E).includes(_)&&b(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{n||k(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===E&&(s=!0,g(),r.size&&v())})),t.disableAutoFinish||g(),setTimeout(()=>{n||(E.setStatus({code:2,message:"deadline_exceeded"}),i=Mx,E.end())},c),E}function Ox(e){let t=je(e);return Nn(U(),t),N&&T.log("[Tracing] Started span is an idle span"),t}function FS(e,t){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;Dx(e,t),n&&Bx(e,n),Fx(e,r),Px(e,o),Ux(e,i)}function BS(e,t){let{extra:r,tags:n,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h,span:y}=t;Gs(e,"extra",r),Gs(e,"tags",n),Gs(e,"attributes",o),Gs(e,"user",i),Gs(e,"contexts",s),e.sdkProcessingMetadata=Rn(e.sdkProcessingMetadata,l,2),a&&(e.level=a),h&&(e.transactionName=h),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function Gs(e,t,r){e[t]=Rn(e[t],r,1)}function Ql(e,t){let r=As().getScopeData();return e&&BS(r,e.getScopeData()),t&&BS(r,t.getScopeData()),r}function Dx(e,t){let{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Px(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Ux(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Bx(e,t){e.contexts={trace:jl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:De(t),...e.sdkProcessingMetadata};let r=te(t),n=B(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function Fx(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var Hx="thismessage:/";function To(e){return"isRelative"in e}function Pr(e,t){let r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=t??(r?Hx:void 0);try{if("canParse"in URL&&!URL.canParse(e,n))return;let o=new URL(e,n);return r?{isRelative:r,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function mi(e){if(To(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Zt(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function Zl(e){return e.split(/[?#]/,1)[0]}function at(e,t=!0){if(e.startsWith("data:")){let r=e.match(/^data:([^;,]+)/),n=r?r[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${n}${o?",base64":""}${s?`,${s}`:""}`}return e}function An(e,t){let r=e.attributes??(e.attributes={});Object.entries(t).forEach(([n,o])=>{o!=null&&!(n in r)&&(r[n]=o)})}var fp=0,HS=1,zS=2;function Ur(e){return new Vs(t=>{t(e)})}function bo(e){return new Vs((t,r)=>{r(e)})}var Vs=class e{constructor(t){this._state=fp,this._handlers=[],this._runExecutor(t)}then(t,r){return new e((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new e((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}_executeHandlers(){if(this._state===fp)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===HS&&r[1](this._value),this._state===zS&&r[2](this._value),r[0]=!0)})}_runExecutor(t){let r=(i,s)=>{if(this._state===fp){if(gr(s)){s.then(n,o);return}this._state=i,this._value=s,this._executeHandlers()}},n=i=>{r(HS,i)},o=i=>{r(zS,i)};try{t(n,o)}catch(i){o(i)}}};function $S(e,t,r,n=0){try{let o=mp(t,r,e,n);return gr(o)?o:Ur(o)}catch(o){return bo(o)}}function mp(e,t,r,n){let o=r[n];if(!e||!o)return e;let i=o({...e},t);return N&&i===null&&T.log(`Event processor "${o.id||"?"}" dropped event`),gr(i)?i.then(s=>mp(s,t,r,n+1)):mp(i,t,r,n+1)}var Io,jS,WS,Mn;function GS(e){let t=L._sentryDebugIds,r=L._debugIds;if(!t&&!r)return{};let n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(Mn&&n.length===jS&&o.length===WS)return Mn;jS=n.length,WS=o.length,Mn={},Io||(Io={});let i=(s,a)=>{for(let l of s){let c=a[l],u=Io?.[l];if(u&&Mn&&c)Mn[u[0]]=c,Io&&(Io[l]=[u[0],c]);else if(c){let d=e(l);for(let p=d.length-1;p>=0;p--){let h=d[p]?.filename;if(h&&Mn&&Io){Mn[h]=c,Io[l]=[h,c];break}}}}};return t&&i(n,t),r&&i(o,r),Mn}function Ys(e,t,r,n,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||r.event_id||Ce(),timestamp:t.timestamp||It()},c=r.integrations||e.integrations.map(m=>m.name);zx(l,e),Wx(l,c),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&$x(l,e.stackParser);let u=Vx(n,r.captureContext);r.mechanism&&Jt(l,r.mechanism);let d=o?o.getEventProcessors():[],p=Ql(i,u),f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),FS(l,p);let h=[...d,...p.eventProcessors];return(r.data&&r.data.__sentry__===!0?Ur(l):$S(h,l,r)).then(m=>(m&&jx(m),typeof s=="number"&&s>0?Gx(m,s,a):m))}function zx(e,t){let{environment:r,release:n,dist:o,maxValueLength:i}=t;e.environment=e.environment||r||li,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=ho(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=ho(a.value,i))})}function $x(e,t){let r=GS(t);e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=r[o.filename])})})}function jx(e){let t={};if(e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function Wx(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Gx(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ot(o.data,t,r)}}))},...e.user&&{user:ot(e.user,t,r)},...e.contexts&&{contexts:ot(e.contexts,t,r)},...e.extra&&{extra:ot(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ot(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ot(o.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=ot(e.contexts.flags,3,r)),n}function Vx(e,t){if(!t)return e;let r=e?e.clone():new xt;return r.update(t),r}function VS(e){if(e)return Yx(e)?{captureContext:e}:Kx(e)?{captureContext:e}:e}function Yx(e){return e instanceof xt||typeof e=="function"}var qx=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Kx(e){return Object.keys(e).some(t=>qx.includes(t))}function rn(e,t){return U().captureException(e,VS(t))}function hi(e,t){return U().captureEvent(e,t)}function xo(e,t){be().setContext(e,t)}function qs(){return be().lastEventId()}function Ks(){let e=M();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xs(e){be().addEventProcessor(e)}function gi(e){let t=be(),{user:r}=Ql(t,U()),{userAgent:n}=L.navigator||{},o=Kg({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return i?.status==="ok"&&Jr(i,{status:"exited"}),Js(),t.setSession(o),o}function Js(){let e=be(),r=U().getSession()||e.getSession();r&&Xg(r),YS(),e.setSession()}function YS(){let e=be(),t=M(),r=e.getSession();r&&t&&t.captureSession(r)}function ko(e=!1){if(e){Js();return}YS()}var qS="7";function KS(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function Xx(e){return`${KS(e)}${e.projectId}/envelope/`}function Jx(e,t){let r={sentry_version:qS};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function gp(e,t,r){return t||`${Xx(e)}?${Jx(e,r)}`}function Sp(e,t){let r=Hl(e);if(!r)return"";let n=`${KS(r)}embed/error-page/`,o=`dsn=${Bt(r)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}var yp=[];function Qx(e){let t={};return e.forEach(r=>{let{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function vp(e){let t=e.defaultIntegrations||[],r=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){let o=r(t);n=Array.isArray(o)?o:[o]}else n=t;return Qx(n)}function XS(e,t){let r={};return t.forEach(n=>{n?.beforeSetup&&n.beforeSetup(e)}),t.forEach(n=>{n&&Ep(e,n,r)}),r}function _p(e,t){for(let r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function Ep(e,t,r){if(r[t.name]){N&&T.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!yp.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),yp.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(n=>{let o=t[n];typeof o=="function"&&e.on(n,i=>o.call(t,i,e))}),N&&T.log(`Integration installed: ${t.name}`)}function Tp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bp(){return"npm"}function JS(){return!Tp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function er(){return typeof window<"u"&&(!JS()||Zx())}function Zx(){return L.process?.type==="renderer"}function e1(e,t){let r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function QS(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),ht(i,[e1(e,o)])}function Si(e,t){let r=t??t1(e)??[];if(r.length===0)return;let n=e.getOptions(),o=QS(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ZS().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function t1(e){return ZS().get(e)}function ZS(){return hr("clientToLogBufferMap",()=>new WeakMap)}function r1(e,t){let r=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...er()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ey(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=Bt(n)),ht(i,[r1(e,o)])}function Qs(e,t){let r=t??n1(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ey(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ty().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function n1(e){return ty().get(e)}function ty(){return hr("clientToMetricBufferMap",()=>new WeakMap)}function ry(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return yS(t)}function ny(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Je(t))return;let r=[],n=[];for(let i of e.spans)i.op?.startsWith("gen_ai.")?r.push(ry(i)):n.push(i);if(r.length===0)return;e.spans=n;let o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:r.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...er()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:r}]}function ec(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var yi=Symbol.for("SentryBufferFullError");function wo(e=100){let t=new Set;function r(){return t.size<e}function n(s){t.delete(s)}function o(s){if(!r())return bo(yi);let a=s();return t.add(a),a.then(()=>n(a),()=>n(a)),a}function i(s){if(!t.size)return Ur(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let l=[a,new Promise(c=>ec(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:o,drain:i}}var oy=60*1e3;function iy(e,t=mo()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?oy:n-t}function sy(e,t){return e[t]||e.all||0}function Zs(e,t,r=mo()){return sy(e,t)>r}function ea(e,{statusCode:t,headers:r},n=mo()){let o={...e},i=r?.["x-sentry-rate-limits"],s=r?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[l,c,,,u]=a.split(":",5),d=parseInt(l,10),p=(isNaN(d)?60:d)*1e3;if(!c)o.all=n+p;else for(let f of c.split(";"))f==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(o[f]=n+p):o[f]=n+p}else s?o.all=n+iy(s,n):t===429&&(o.all=n+60*1e3);return o}var Ip=64;function tc(e,t,r=wo(e.bufferSize||Ip)){let n={},o=s=>r.drain(s);function i(s){let a=[];if(js(s,(d,p)=>{let f=ql(p);Zs(n,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(d)}),a.length===0)return Promise.resolve({});let l=ht(s[0],a),c=d=>{if(ap(l,["client_report"])){N&&T.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}js(l,(p,f)=>{e.recordDroppedEvent(d,ql(f))})},u=()=>t({body:lp(l)}).then(d=>d.statusCode===413?(N&&T.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(N&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&T.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=ea(n,d),d),d=>{throw c("network_error"),N&&T.error("Encountered error running transport request:",d),d});return r.add(u).then(d=>d,d=>{if(d===yi)return N&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function ay(e,t,r){let n=[{type:"client_report"},{timestamp:r||It(),discarded_events:e}];return ht(t?{dsn:t}:{},[n])}function rc(e){let t=[];e.message&&t.push(e.message);try{let r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function ly(e){let{trace_id:t,parent_span_id:r,span_id:n,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[yo],exclusive_time:s?.[st],measurements:e.measurements,is_segment:!0}}function cy(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[yo]:e.profile_id},...e.exclusive_time&&{[st]:e.exclusive_time}}}},measurements:e.measurements}}var ta=["forwarded","-ip","remote-","via","-user"];function uy(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:ta},httpHeaders:{request:{deny:ta},response:{deny:ta}},httpBodies:[],queryParams:{deny:ta},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}var o1={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function dy(e){let t=e.dataCollection!=null?o1:uy(e.sendDefaultPii),r=e.dataCollection??{};return{userInfo:r.userInfo??t.userInfo,cookies:r.cookies??t.cookies,httpHeaders:{request:r.httpHeaders?.request??t.httpHeaders.request,response:r.httpHeaders?.response??t.httpHeaders.response},httpBodies:r.httpBodies??t.httpBodies,queryParams:r.queryParams??t.queryParams,genAI:{inputs:r.genAI?.inputs??t.genAI.inputs,outputs:r.genAI?.outputs??t.genAI.outputs},stackFrameVariables:r.stackFrameVariables??t.stackFrameVariables,frameContextLines:r.frameContextLines??t.frameContextLines}}var py="Not capturing exception because it's already been captured.",fy="Discarded session because of missing or non-string release",vy=Symbol.for("SentryInternalError"),_y=Symbol.for("SentryDoNotSendEventError"),i1=5e3;function nc(e){return{message:e,[vy]:!0}}function xp(e){return{message:e,[_y]:!0}}function my(e){return!!e&&typeof e=="object"&&vy in e}function hy(e){return!!e&&typeof e=="object"&&_y in e}function gy(e,t,r,n,o){let i=0,s,a=!1;e.on(r,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,l=>{if(i+=n(l),i>=8e5)o(e);else if(!a){let c=e.getOptions()._flushInterval??i1;c>0&&(a=!0,s=ec(setTimeout(()=>{o(e)},c)))}}),e.on("flush",()=>{o(e)})}var ra=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=wo(t.transportOptions?.bufferSize??Ip),this._dataCollection=dy(t),t.dsn?this._dsn=Hl(t.dsn):N&&T.warn("No DSN provided, client will not send events."),this._dsn){let n=gp(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:n})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&gy(this,"afterCaptureLog","flushLogs",c1,Si),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&gy(this,"afterCaptureMetric","flushMetrics",l1,Qs)}captureException(t,r,n){let o=Ce();if(Cs(t))return N&&T.log(py),o;let i={event_id:o,...r};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n)).then(s=>s),"error"),i.event_id}captureMessage(t,r,n,o){let i={event_id:Ce(),...n},s=In(t)?t:String(t),a=bt(t),l=a?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(()=>l.then(c=>this._captureEvent(c,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,r,n){let o=Ce();if(r?.originalException&&Cs(r.originalException))return N&&T.log(py),o;let i={event_id:o,...r},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=Sy(t.type);return this._process(()=>this._captureEvent(t,i,a||n,l),c),i.event_id}captureSession(t){this.sendSession(t),Jr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let r=this._transport;if(this.emit("flush"),!r)return!0;let n=await this._isClientDoneProcessing(t),o=await r.flush(t);return n&&o}async close(t){Si(this);let r=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),r}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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){let r=this._integrations[t.name];!r&&t.beforeSetup&&t.beforeSetup(this),Ep(this,t,this._integrations),r||_p(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=ny(t,this),o=RS(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])o=Yl(o,up(i));n&&(o=Yl(o,n)),this.sendEnvelope(o).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){let{release:r,environment:n=li}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!r){N&&T.warn(fy);return}i.release=i.release||r,i.environment=i.environment||n,t.attrs=i}else{if(!t.release&&!r){N&&T.warn(fy);return}t.release=t.release||r,t.environment=t.environment||n}this.emit("beforeSendSession",t);let o=wS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,r,n=1){if(this._options.sendClientReports){let o=`${t}:${r}`;N&&T.log(`Recording outcome: "${o}"${n>1?` (${n} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+n}}on(t,r){let n=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>r(...i);return n.add(o),()=>{n.delete(o)}}emit(t,...r){let n=this._hooks[t];n&&n.forEach(o=>o(...r))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(r){return N&&T.error("Error while sending envelope:",r),{}}return N&&T.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=XS(this,t),_p(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1,i=r.exception?.values;if(i){o=!0,n=!1;for(let l of i)if(l.mechanism?.handled===!1){n=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Jr(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}async _isClientDoneProcessing(t){let r=0;for(;!t||r<t;){if(await new Promise(n=>setTimeout(n,1)),!this._numProcessing)return!0;r++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,o){let i=this.getOptions(),s=this.getIntegrationNames();return!r.integrations&&s.length&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),Ys(i,t,r,n,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,r),a.contexts={trace:{...a.contexts?.trace,...Pl(n)},...a.contexts};let l=ui(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n=U(),o=be()){return N&&kp(t)&&T.log(`Captured error event \`${rc(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,o).then(i=>i.event_id,i=>{N&&(hy(i)?T.log(i.message):my(i)?T.warn(i.message):T.warn(i))})}_processEvent(t,r,n,o){let i=this.getOptions(),{sampleRate:s}=i,a=Ey(t),l=kp(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:Ft(s);if(l&&typeof d=="number"&&Xt()>d)return this.recordDroppedEvent("sample_rate","error"),bo(xp(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Sy(t.type);return this._prepareEvent(t,r,n,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),xp("An event processor returned `null`, will not send event.");if(r.data?.__sentry__===!0)return f;let y=a1(this,i,f,r);return s1(y,u)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){let m=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",m)}throw xp(`${u} returned \`null\`, will not send event.`)}let h=n.getSession()||o.getSession();if(l&&h&&this._updateSessionFromEvent(h,f),a){let E=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,m=f.spans?f.spans.length:0,g=E-m;g>0&&this.recordDroppedEvent("before_send","span",g)}let y=f.transaction_info;if(a&&y&&f.transaction!==t.transaction){let E="custom";f.transaction_info={...y,source:E}}return this.sendEvent(f,r),f}).then(null,f=>{throw hy(f)||my(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),nc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
17
|
-
Reason: ${f}`))})}_process(t,r){this._numProcessing++,this._promiseBuffer.add(t).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===yi&&this.recordDroppedEvent("queue_overflow",r),n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{let[o,i]=r.split(":");return{reason:o,category:i,quantity:n}})}_flushOutcomes(){
|
|
18
|
-
Event: ${
|
|
19
|
-
Event: ${
|
|
20
|
-
Event: ${
|
|
21
|
-
Event: ${
|
|
22
|
-
Url: ${ic(e)}`),!0;if(!
|
|
23
|
-
Event: ${
|
|
24
|
-
Url: ${ic(e)}`),!0}return!1}function E1(e,t){return t?.length?rc(e).some(r=>Ke(r,t)):!1}function T1(e,t){if(!t?.length)return!1;let r=e.transaction;return r?Ke(r,t):!1}function b1(e,t){if(!t?.length)return!1;let r=ic(e);return r?Ke(r,t):!1}function I1(e,t){if(!t?.length)return!0;let r=ic(e);return r?Ke(r,t):!0}function x1(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ic(e){try{let r=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?x1(r):null}catch{return N&&T.error(`Cannot extract url for event ${yr(e)}`),null}}function k1(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Op(e,t,r,n,o,i){if(!o.exception?.values||!i||!Sr(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Lp(e,t,n,i.originalException,r,o.exception.values,s,0))}function Lp(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(Sr(n[o],Error)){wy(s,a,n);let c=e(t,n[o]),u=l.length;Ry(c,o,u,a),l=Lp(e,t,r,n[o],o,[c,...l],c,u)}return Ny(n)&&n.errors.forEach((c,u)=>{if(Sr(c,Error)){wy(s,a,n);let d=e(t,c),p=l.length;Ry(d,`errors[${u}]`,p,a),l=Lp(e,t,r,c,o,[d,...l],d,p)}}),l}function Ny(e){return Array.isArray(e.errors)}function wy(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Ny(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ry(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function w1(e){return qt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ac(e){return w1(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Cy=new Set([]);function Dp(e){let t="console",r=tt(t,e);return rt(t,R1),r}function R1(){"console"in L&&wl.forEach(function(e){e in L.console&&Ne(L.console,e,function(t){return po[e]=t,function(...r){let n=r[0],o=po[e],i=Cy.size&&typeof n=="string"&&Ke(n,Cy);i||Oe("console",{args:r,level:e}),(!i||N&&T.isEnabled())&&o?.apply(L.console,r)}})})}function _i(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var N1="Dedupe",C1=(()=>{let e;return{name:N1,processEvent(t){if(t.type)return t;try{if(A1(t,e))return N&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),lc=C1;function A1(e,t){return t?!!(M1(e,t)||L1(e,t)):!1}function M1(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Ly(e,t)||!My(e,t))}function L1(e,t){let r=Ay(t),n=Ay(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Ly(e,t)||!My(e,t))}function My(e,t){let r=_s(e),n=_s(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Ly(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Ay(e){return e.exception?.values?.[0]}var O1="ConversationId",D1=(()=>({name:O1,setup(e){e.on("spanStart",t=>{let r=U().getScopeData(),n=be().getScopeData(),o=r.conversationId||n.conversationId;if(o){let{op:i,data:s,description:a}=B(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Bl,o)}})}})),Pp=D1;function Up(e,t,r,n,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=He()&&t(s);if(e.endTimestamp){let h=e.fetchData.__span;if(!h)return;let y=n[h];y&&(a&&(U1(y,e),P1(y,e,o)),delete n[h]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof o=="object"?o:{spanOrigin:o},u=M(),p=!!ie()||!!u&&Je(u),f=a&&p?je(H1(s,i,l)):new Xe;if(a&&!p&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,n[f.spanContext().spanId]=f,r(e.fetchData.url)){let h=e.args[0],y={...e.args[1]||{}},E=Dy(h,y,He()&&p?f:void 0,c);E&&(e.args[1]=y,y.headers=E)}if(u){let h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,h)}return f}function P1(e,t,r){(typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Dy(e,t,r,n){let o=vi({span:r,propagateTraceparent:n}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let l=t.headers||(xs(e)?e.headers:void 0);if(l)if(B1(l)){let c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",i),n&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){let u=c.get("baggage");u?cc(u)||c.set("baggage",`${u},${s}`):c.set("baggage",s)}return c}else if(F1(l)){let c=[...l];c.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",i]),n&&a&&!c.find(d=>d[0]==="traceparent")&&c.push(["traceparent",a]);let u=l.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&cc(d[1]));return s&&!u&&c.push(["baggage",s]),c}else{let c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],f=d&&(Array.isArray(d)?d.find(y=>cc(y)):cc(d));s&&!f&&p.push(s);let h=Object.assign({},l,{"sentry-trace":c??i,baggage:p.length>0?p.join(","):void 0});return n&&a&&!u&&(h.traceparent=a),h}else return{...o}}function U1(e,t){if(t.response){ai(e,t.response.status);let r=t.response?.headers?.get("content-length");if(r){let n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function cc(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ms))}function B1(e){return typeof Headers<"u"&&Sr(e,Headers)}function F1(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function H1(e,t,r){if(e.startsWith("data:")){let i=at(e);return{name:`${t} ${i}`,attributes:Oy(e,void 0,t,r)}}let n=Pr(e),o=n?mi(n):e;return{name:`${t} ${o}`,attributes:Oy(e,n,t,r)}}function Oy(e,t,r,n){let o={url:at(e),type:"fetch","http.method":r,[J]:n,[_e]:"http.client"};return t&&(To(t)||(o["http.url"]=at(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function uc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var oa=L;function Bp(){return"history"in oa&&!!oa.history}function z1(){if(!("fetch"in oa))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ia(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime=="string")return!0;if(!z1())return!1;if(ia(oa.fetch))return!0;let e=!1,t=oa.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=ia(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){N&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Ln(e,t){let r="fetch",n=tt(r,e);return rt(r,()=>Uy(void 0,t)),n}function pc(e){let t="fetch-body-resolved",r=tt(t,e);return rt(t,()=>Uy(j1)),r}function Uy(e,t=!1){t&&!Fp()||Ne(L,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=W1(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ne()*1e3,virtualError:o,headers:G1(n)};return e||Oe("fetch",{...a}),r.apply(L,n).then(async l=>(e?e(l):Oe("fetch",{...a,endTimestamp:ne()*1e3,response:l}),l),l=>{Oe("fetch",{...a,endTimestamp:ne()*1e3,error:l}),qt(l)&&l.stack===void 0&&(l.stack=o.stack,ve(l,"framesToPop",1));let u=M()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let f=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${f})`:ve(l,"__sentry_fetch_url_host__",f)}catch{}throw l})}})}async function $1(e,t){if(e?.body){let r=e.body,n=r.getReader(),o=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);let{done:a}=await n.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),n.releaseLock(),r.cancel().then(null,()=>{})}}function j1(e){let t;try{t=e.clone()}catch{return}$1(t,()=>{Oe("fetch-body-resolved",{endTimestamp:ne()*1e3,response:e})})}function dc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Py(e){return typeof e=="string"?e:e?dc(e,"url")?e.url:e.toString?e.toString():"":""}function W1(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:Py(r),method:dc(n,"method")?String(n.method).toUpperCase():xs(r)&&dc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Py(t),method:dc(t,"method")?String(t.method).toUpperCase():"GET"}}function G1(e){let[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(xs(t))return new Headers(t.headers)}catch{}}var By=L;function Rt(){try{return By.document.location.href}catch{return""}}function Ei(e,t=5){if(!By.HTMLElement)return null;let r=e;for(let n=0;n<t;n++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}var P=L,Hp=0;function zp(){return Hp>0}function xk(){Hp++,setTimeout(()=>{Hp--})}function Ro(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(kn(e))return e}catch{return e}let n=function(...o){L._sentryWrappedDepth=(L._sentryWrappedDepth||0)+1;try{let i=o.map(s=>Ro(s,t));return e.apply(this,i)}catch(i){throw xk(),Qt(s=>{s.addEventProcessor(a=>(t.mechanism&&(go(a,void 0,void 0),Jt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),rn(i)}),i}finally{L._sentryWrappedDepth=(L._sentryWrappedDepth||0)-1}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}ks(n,e),ve(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function Ti(){let e=Rt(),{referrer:t}=P.document||{},{userAgent:r}=P.navigator||{},n={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:n}}function fc(e,t){let r=mc(e,t),n={type:Ck(t),value:Ak(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function kk(e,t,r,n){let i=M()?.getOptions().normalizeDepth,s=Ok(t),a={__serialized__:Rs(t,i)};if(s)return{exception:{values:[fc(e,s)]},extra:a};let l={exception:{values:[{type:xn(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Mk(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=mc(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function $p(e,t){return{exception:{values:[fc(e,t)]}}}function mc(e,t){let r=t.stacktrace||t.stack||"",n=Rk(t),o=Nk(t);try{return e(r,n,o)}catch{}return[]}var wk=/Minified React error #\d+;/i;function Rk(e){return e&&wk.test(e.message)?1:0}function Nk(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function rv(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ck(e){let t=e?.name;return!t&&rv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ak(e){let t=e?.message;return rv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ac(t.error):ac(e):"No error message"}function nv(e,t,r,n){let o=r?.syntheticException||void 0,i=hc(e,t,o,n);return Jt(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),Ur(i)}function ov(e,t,r="info",n,o){let i=n?.syntheticException||void 0,s=jp(e,t,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),Ur(s)}function hc(e,t,r,n,o){let i;if(ti(t)&&t.error)return $p(e,t.error);if(Is(t)||Cl(t)){let s=t;if("stack"in t){i=$p(e,t);let a=i.exception?.values?.[0];if(n&&r&&a&&!a.stacktrace){let l=mc(e,r);l.length&&(a.stacktrace={frames:l},Jt(i,{synthetic:!0}))}}else{let a=s.name||(Is(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=jp(e,l,r,n),go(i,l)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return qt(t)?$p(e,t):Kt(t)||xn(t)?(i=kk(e,t,r,o),Jt(i,{synthetic:!0}),i):(i=jp(e,t,r,n),go(i,`${t}`,void 0),Jt(i,{synthetic:!0}),i)}function jp(e,t,r,n){let o={};if(n&&r){let i=mc(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Jt(o,{synthetic:!0})}if(In(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Mk(e,{isUnhandledRejection:t}){let r=Ml(e),n=t?"promise rejection":"exception";return ti(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:xn(e)?`Event \`${Lk(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Lk(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ok(e){return Object.values(e).find(t=>t instanceof Error)}var gc=class extends ra{constructor(t){let r=Dk(t),n=P.SENTRY_SDK_SOURCE||bp();na(r,"browser",["browser"],n),super(r);let{userInfo:o}=this.getDataCollectionOptions();r._metadata?.sdk&&(r._metadata.sdk.settings={infer_ip:o?"auto":"never",...r._metadata.sdk.settings});let{sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;P.document&&(i||s||c)&&P.document.addEventListener("visibilitychange",()=>{P.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&Si(this),c&&Qs(this))}),o&&this.on("beforeSendSession",Cp)}eventFromException(t,r){return nv(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return ov(this._options.stackParser,t,r,n,this._options.attachStacktrace)}_prepareEvent(t,r,n,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n,o)}};function Dk(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:P.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var We=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var O=L;var Pk=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Br=(e,t,r,n)=>{let o,i;return s=>{t.value>=0&&(s||n)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=Pk(t.value,r),e(t)))}};var on=(e=!0)=>{let t=O.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var tr=()=>on()?.activationStart??0;function rr(e,t,r){O.document&&O.addEventListener(e,t,r)}function No(e,t,r){O.document&&O.removeEventListener(e,t,r)}var bi=-1,iv=new Set,Uk=()=>O.document?.visibilityState==="hidden"&&!O.document?.prerendering?0:1/0,Sc=e=>{if(Bk(e)&&bi>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iv)t();isFinite(bi)||(bi=e.type==="visibilitychange"?e.timeStamp:0,No("prerenderingchange",Sc,!0))}},Fr=()=>{if(O.document&&bi<0){let e=tr();bi=(O.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0]?.startTime)??Uk(),rr("visibilitychange",Sc,!0),rr("pagehide",Sc,!0),rr("prerenderingchange",Sc,!0)}return{get firstHiddenTime(){return bi},onHidden(e){iv.add(e)}}};function Bk(e){return e.type==="pagehide"||O.document?.visibilityState==="hidden"}var sv=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Hr=(e,t=-1)=>{let r=on(),n="navigate";return r&&(O.document?.prerendering||tr()>0?n="prerender":O.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:sv(),navigationType:n}};var Wp=new WeakMap;function Ii(e,t){try{return Wp.get(e)||Wp.set(e,new t),Wp.get(e)}catch{return new t}}var yc=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let r=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var nr=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}};var xi=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Dn=e=>{O.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var Fk=[1800,3e3],av=(e,t={})=>{Dn(()=>{let r=Fr(),n=Hr("FCP"),o,s=nr("paint",a=>{for(let l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-tr(),0),n.entries.push(l),o(!0)))});s&&(o=Br(e,n,Fk,t.reportAllChanges))})};var Hk=[.1,.25],lv=(e,t={})=>{av(xi(()=>{let r=Hr("CLS",0),n,o=Fr(),i=Ii(t,yc),s=l=>{for(let c of l)i._processEntry(c);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},a=nr("layout-shift",s);a&&(n=Br(e,r,Hk,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),n(!0)}),O?.setTimeout?.(n))}))};var cv=0,Gp=1/0,vc=0,zk=e=>{e.forEach(t=>{t.interactionId&&(Gp=Math.min(Gp,t.interactionId),vc=Math.max(vc,t.interactionId),cv=vc?(vc-Gp)/7+1:0)})},Vp,Yp=()=>Vp?cv:performance.interactionCount||0,uv=()=>{"interactionCount"in performance||Vp||(Vp=nr("event",zk,{type:"event",buffered:!0,durationThreshold:0}))};var qp=10,dv=0,$k=()=>Yp()-dv,_c=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dv=Yp(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor($k()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let r=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(t.interactionId);if(n||this._longestInteractionList.length<qp||t.duration>r._latency){if(n?t.duration>n._latency?(n.entries=[t],n._latency=t.duration):t.duration===n._latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>qp){let o=this._longestInteractionList.splice(qp);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(n)}}};var Ec=e=>{let t=O.requestIdleCallback||O.setTimeout;O.document?.visibilityState==="hidden"?e():(e=xi(e),rr("visibilitychange",e,{once:!0,capture:!0}),rr("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),No("visibilitychange",e,{capture:!0}),No("pagehide",e,{capture:!0})}))};var jk=[200,500],Wk=40,pv=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let r=Fr();Dn(()=>{uv();let n=Hr("INP"),o,i=Ii(t,_c),s=l=>{Ec(()=>{for(let u of l)i._processEntry(u);let c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,o())})},a=nr("event",s,{durationThreshold:t.durationThreshold??Wk});o=Br(e,n,jk,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var Tc=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var Gk=[2500,4e3],fv=(e,t={})=>{Dn(()=>{let r=Fr(),n=Hr("LCP"),o,i=Ii(t,Tc),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(let c of l)i._processEntry(c),c.startTime<r.firstHiddenTime&&(n.value=Math.max(c.startTime-tr(),0),n.entries=[c],o())},a=nr("largest-contentful-paint",s);if(a){o=Br(e,n,Gk,t.reportAllChanges);let l=xi(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),c=u=>{u.isTrusted&&(Ec(l),No(u.type,c,{capture:!0}))};for(let u of["keydown","click","visibilitychange"])rr(u,c,{capture:!0})}})};var Vk=[800,1800],Kp=e=>{O.document?.prerendering?Dn(()=>Kp(e)):O.document?.readyState!=="complete"?addEventListener("load",()=>Kp(e),!0):setTimeout(e)},mv=(e,t={})=>{let r=Hr("TTFB"),n=Br(e,r,Vk,t.reportAllChanges);Kp(()=>{let o=on();o&&(r.value=Math.max(o.responseStart-tr(),0),r.entries=[o],n(!0))})};var sa={},bc={},hv,gv,Sv,yv;function sn(e,t=!1){return Ic("cls",e,Yk,hv,t)}function an(e,t=!1){return Ic("lcp",e,qk,gv,t)}function Xp(e){return Ic("ttfb",e,Kk,Sv)}function Co(e){return Ic("inp",e,Xk,yv)}function Er(e,t){return vv(e,t),bc[e]||(Jk(e),bc[e]=!0),_v(e,t)}function aa(e,t){let r=sa[e];if(r?.length)for(let n of r)try{n(t)}catch(o){We&&T.error(`Error while triggering instrumentation handler.
|
|
16
|
+
`)}`)}function AS(e){if(!M)return;let{description:t="< unknown name >",op:r="< unknown op >"}=$(e),{spanId:n}=e.spanContext(),i=ie(e)===e,s=`[Tracing] Finishing "${r}" ${i?"root ":""}span "${t}" with ID ${n}`;T.log(s)}function Kl(e,t,r,n=le()){let o=n&&ie(n);o&&(M&&T.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),o.addEvent(e,{[kr]:t,[br]:r}))}function Xl(e){if(!e||e.length===0)return;let t={};return e.forEach(r=>{let n=r.attributes||{},o=n[br],i=n[kr];typeof o=="string"&&typeof i=="number"&&(t[r.name]={value:i,unit:o})}),t}function et(e){return e.getOptions().traceLifecycle==="stream"}var MS=1e3,Ln=class{constructor(t={}){this._traceId=t.traceId||yt(),this._spanId=t.spanId||ut(),this._startTime=t.startTimestamp||ae(),this._links=t.links,this._attributes={},this.setAttributes({[ee]:"manual",[_e]: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._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,r){}spanContext(){let{_spanId:t,_traceId:r,_sampled:n}=this;return{spanId:t,traceId:r,traceFlags:n?Ds:$l}}setAttribute(t,r){return r===void 0?delete this._attributes[t]:this._attributes[t]=r,this}setAttributes(t){return Object.keys(t).forEach(r=>this.setAttribute(r,t[r])),this}updateStartTime(t){this._startTime=At(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute($e,"custom"),this}end(t){this._endTime||(this._endTime=At(t),AS(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[_e],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Hs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ee],profile_id:this._attributes[_o],exclusive_time:this._attributes[dt],measurements:Xl(this._events),is_segment:this._isStandaloneSpan&&ie(this)===this||void 0,segment_id:this._isStandaloneSpan?ie(this).spanContext().spanId:void 0,links:Bs(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===ie(this),status:ip(this._status),attributes:this._attributes,links:op(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,r,n){M&&T.log("[Tracing] Adding an event to span:",t);let o=LS(r)?r:n||ae(),i=LS(r)?{}:r||{},s={name:t,time:At(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=D();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!(this._isStandaloneSpan||this===ie(this)))return;if(this._isStandaloneSpan){this._sampled?Iw(CS([this],t)):(M&&T.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}else if(t&&et(t)){t.emit("afterSegmentSpanEnd",this);return}let n=this._convertSpanToTransaction();n&&(Eo(this).scope||H()).captureEvent(n)}_convertSpanToTransaction(){if(!OS($(this)))return;this._name||(M&&T.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:r}=Eo(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=rn(this).filter(d=>d!==this&&!ww(d)).map(d=>$(d)).filter(OS),s=this._attributes[$e];delete this._attributes[ai];let a=!1;i.forEach(d=>{delete d.data[ai],d.op?.startsWith("gen_ai.")&&(a=!0)});let l={contexts:{trace:gS(this)},spans:i.length>MS?i.sort((d,p)=>d.start_timestamp-p.start_timestamp).slice(0,MS):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:Be(this),hasGenAiSpans:a},request:n,...s&&{transaction_info:{source:s}}},c=Xl(this._events);return c&&Object.keys(c).length&&(M&&T.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),l.measurements=c),l}};function LS(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function OS(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ww(e){return e instanceof Ln&&e.isStandaloneSpan()}function Iw(e){let t=D();if(!t)return;let r=e[1];if(!r||r.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function PS(e,t,r){if(!We(e))return[!1];let n,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),n=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,n=!0);let i=$t(o);if(i===void 0)return M&&T.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return M&&T.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,i,n];let s=r<i;return s||M&&T.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,n]}var dp="__SENTRY_SUPPRESS_TRACING__";function Ve(e){let t=US();if(t.startInactiveSpan)return t.startInactiveSpan(e);let r=Rw(e),{forceTransaction:n,parentSpan:o}=e;return(e.scope?s=>nr(e.scope,s):o!==void 0?s=>fi(o,s):s=>s())(()=>{let s=H(),a=Nw(s,o),l=D();return e.onlyIfParent&&!a?(l?.recordDroppedEvent("no_parent_span","span"),new Qe):xw({parentSpan:a,spanArguments:r,forceTransaction:n,scope:s})})}function fi(e,t){let r=US();return r.withActiveSpan?r.withActiveSpan(e,t):nr(n=>(Mn(n,e||void 0),t(n)))}function xw({parentSpan:e,spanArguments:t,forceTransaction:r,scope:n}){if(!We()){let a=new Qe;if(r||!e){let l={sampled:"false",sample_rate:"0",transaction:t.name,...Be(a)};ui(a,l)}return a}let o=D();if(Aw(o,t))return pp(n)||o?.recordDroppedEvent("ignored","span"),new Qe({dropReason:"ignored",traceId:e?.spanContext().traceId??n.getPropagationContext().traceId});let i=be(),s;if(e&&!r)s=Cw(e,n,t),zs(e,s);else if(e){let a=Be(e),{traceId:l,spanId:c}=e.spanContext(),u=Mt(e);s=DS({traceId:l,parentSpanId:c,...t},n,u),ui(s,a)}else{let{traceId:a,dsc:l,parentSpanId:c,sampled:u}={...i.getPropagationContext(),...n.getPropagationContext()};s=DS({traceId:a,parentSpanId:c,...t},n,u),l&&ui(s,l)}return NS(s),aS(s,n,i),s}function Rw(e){let r={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...r};return n.startTimestamp=At(e.startTime),delete n.startTime,n}return r}function US(){let e=Ht();return Br(e)}function DS(e,t,r){let n=D(),o=n?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};n?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??r,l=s.spanAttributes,c=t.getPropagationContext(),u=pp(t),[d,p,f]=u?[!1]:PS(o,{name:i,parentSampled:a,attributes:l,parentSampleRate:$t(c.dsc?.sample_rate)},c.sampleRand),h=new Ln({...e,attributes:{[$e]:"custom",[en]:p!==void 0&&f?p:void 0,...l},sampled:d});return!d&&n&&!u&&(M&&T.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate",et(n)?"span":"transaction")),n&&n.emit("spanStart",h),h}function Cw(e,t,r){let{spanId:n,traceId:o}=e.spanContext(),i=pp(t),s=i?!1:Mt(e),a=s?new Ln({...r,parentSpanId:n,traceId:o,sampled:s}):new Qe({traceId:o});zs(e,a);let l=D();return l&&(et(l)&&a instanceof Qe&&(e instanceof Qe&&e.dropReason?(a.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",a),r.endTimestamp&&(l.emit("spanEnd",a),l.emit("afterSpanEnd",a))),a}function Nw(e,t){if(t)return t;if(t===null)return;let r=yo(e);if(!r)return;let n=D();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ie(r):r}function Aw(e,t){let r=e?.getOptions().ignoreSpans;return!e||!et(e)||!r?.length?!1:nn({description:t.name||"",op:t.attributes?.[_e]||t.op,attributes:t.attributes},r)}function pp(e){return e.getScopeData().sdkProcessingMetadata[dp]===!0}var mi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Mw="heartbeatFailed",Lw="idleTimeout",Ow="finalTimeout",Pw="externalFinish";function Jl(e,t={}){let r=new Map,n=!1,o,i=Pw,s=!t.disableAutoFinish,a=[],{idleTimeout:l=mi.idleTimeout,finalTimeout:c=mi.finalTimeout,childSpanTimeout:u=mi.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,f=D();if(!f||!We()){let _=new Qe,w={sample_rate:"0",sampled:"false",...Be(_)};return ui(_,w),_}let h=H(),y=le(),k=Dw(e);k.end=new Proxy(k.end,{apply(_,w,z){if(d&&d(k),w instanceof Qe)return;let[I,...P]=z,W=I||ae(),K=At(W),V=rn(k).filter(x=>x!==k),Pe=$(k);if(!V.length||!p)return R(K),Reflect.apply(_,w,[K,...P]);let ue=f.getOptions().ignoreSpans,fe=V?.reduce((x,A)=>{let oe=$(A);return!oe.timestamp||ue&&nn({description:oe.description,op:oe.op,attributes:oe.data},ue)?x:x?Math.max(x,oe.timestamp):oe.timestamp},void 0),L=Pe.start_timestamp,b=Math.min(L?L+c/1e3:1/0,Math.max(L||-1/0,Math.min(K,fe||1/0)));return R(b),Reflect.apply(_,w,[b,...P])}});function g(){o&&(clearTimeout(o),o=void 0)}function S(_){g(),o=setTimeout(()=>{!n&&r.size===0&&s&&(i=Lw,k.end(_))},l)}function v(_){o=setTimeout(()=>{!n&&s&&(i=Mw,k.end(_))},u)}function E(_){g(),r.set(_,!0);let w=ae();v(w+u/1e3)}function C(_){if(r.has(_)&&r.delete(_),r.size===0){let w=ae();S(w+l/1e3)}}function R(_){n=!0,r.clear(),a.forEach(V=>V()),Mn(h,y);let w=$(k),{start_timestamp:z}=w;if(!z)return;w.data[tn]||k.setAttribute(tn,i);let P=w.status;(!P||P==="unknown")&&k.setStatus({code:1}),T.log(`[Tracing] Idle span "${w.op}" finished`);let W=rn(k).filter(V=>V!==k),K=0;W.forEach(V=>{V.isRecording()&&(V.setStatus({code:2,message:"cancelled"}),V.end(_),M&&T.log("[Tracing] Cancelling span since span ended early",JSON.stringify(V,void 0,2)));let Pe=$(V),{timestamp:ue=0,start_timestamp:fe=0}=Pe,L=fe<=_,b=(c+l)/1e3,x=ue-fe<=b;if(M){let A=JSON.stringify(V,void 0,2);L?x||T.log("[Tracing] Discarding span since it finished after idle span final timeout",A):T.log("[Tracing] Discarding span since it happened after idle span was finished",A)}(!x||!L)&&(ES(k,V),K++)}),K>0&&k.setAttribute("sentry.idle_span_discarded_spans",K)}return a.push(f.on("spanStart",_=>{if(n||_===k||$(_).timestamp||_ instanceof Ln&&_.isStandaloneSpan())return;rn(k).includes(_)&&E(_.spanContext().spanId)})),a.push(f.on("spanEnd",_=>{n||C(_.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",_=>{_===k&&(s=!0,S(),r.size&&v())})),t.disableAutoFinish||S(),setTimeout(()=>{n||(k.setStatus({code:2,message:"deadline_exceeded"}),i=Ow,k.end())},c),k}function Dw(e){let t=Ve(e);return Mn(H(),t),M&&T.log("[Tracing] Started span is an idle span"),t}function FS(e,t){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;Uw(e,t),n&&Hw(e,n),zw(e,r),Bw(e,o),Fw(e,i)}function BS(e,t){let{extra:r,tags:n,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h,span:y}=t;Gs(e,"extra",r),Gs(e,"tags",n),Gs(e,"attributes",o),Gs(e,"user",i),Gs(e,"contexts",s),e.sdkProcessingMetadata=An(e.sdkProcessingMetadata,l,2),a&&(e.level=a),h&&(e.transactionName=h),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function Gs(e,t,r){e[t]=An(e[t],r,1)}function Zl(e,t){let r=As().getScopeData();return e&&BS(r,e.getScopeData()),t&&BS(r,t.getScopeData()),r}function Uw(e,t){let{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(r).length&&(e.extra={...r,...e.extra}),Object.keys(n).length&&(e.tags={...n,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Bw(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function Fw(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Hw(e,t){e.contexts={trace:Wl(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Be(t),...e.sdkProcessingMetadata};let r=ie(t),n=$(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function zw(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var $w="thismessage:/";function ko(e){return"isRelative"in e}function Fr(e,t){let r=e.indexOf("://")<=0&&e.indexOf("//")!==0,n=t??(r?$w:void 0);try{if("canParse"in URL&&!URL.canParse(e,n))return;let o=new URL(e,n);return r?{isRelative:r,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function gi(e){if(ko(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function or(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function Ql(e){return e.split(/[?#]/,1)[0]}function pt(e,t=!0){if(e.startsWith("data:")){let r=e.match(/^data:([^;,]+)/),n=r?r[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${n}${o?",base64":""}${s?`,${s}`:""}`}return e}function On(e,t){let r=e.attributes??(e.attributes={});Object.entries(t).forEach(([n,o])=>{o!=null&&!(n in r)&&(r[n]=o)})}var fp=0,HS=1,zS=2;function Hr(e){return new Vs(t=>{t(e)})}function wo(e){return new Vs((t,r)=>{r(e)})}var Vs=class e{constructor(t){this._state=fp,this._handlers=[],this._runExecutor(t)}then(t,r){return new e((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new e((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}_executeHandlers(){if(this._state===fp)return;let t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===HS&&r[1](this._value),this._state===zS&&r[2](this._value),r[0]=!0)})}_runExecutor(t){let r=(i,s)=>{if(this._state===fp){if(_r(s)){s.then(n,o);return}this._state=i,this._value=s,this._executeHandlers()}},n=i=>{r(HS,i)},o=i=>{r(zS,i)};try{t(n,o)}catch(i){o(i)}}};function $S(e,t,r,n=0){try{let o=mp(t,r,e,n);return _r(o)?o:Hr(o)}catch(o){return wo(o)}}function mp(e,t,r,n){let o=r[n];if(!e||!o)return e;let i=o({...e},t);return M&&i===null&&T.log(`Event processor "${o.id||"?"}" dropped event`),_r(i)?i.then(s=>mp(s,t,r,n+1)):mp(i,t,r,n+1)}var Io,WS,jS,Pn;function GS(e){let t=U._sentryDebugIds,r=U._debugIds;if(!t&&!r)return{};let n=t?Object.keys(t):[],o=r?Object.keys(r):[];if(Pn&&n.length===WS&&o.length===jS)return Pn;WS=n.length,jS=o.length,Pn={},Io||(Io={});let i=(s,a)=>{for(let l of s){let c=a[l],u=Io?.[l];if(u&&Pn&&c)Pn[u[0]]=c,Io&&(Io[l]=[u[0],c]);else if(c){let d=e(l);for(let p=d.length-1;p>=0;p--){let h=d[p]?.filename;if(h&&Pn&&Io){Pn[h]=c,Io[l]=[h,c];break}}}}};return t&&i(n,t),r&&i(o,r),Pn}function Ys(e,t,r,n,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||r.event_id||Me(),timestamp:t.timestamp||Ct()},c=r.integrations||e.integrations.map(g=>g.name);Ww(l,e),Vw(l,c),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&jw(l,e.stackParser);let u=qw(n,r.captureContext);r.mechanism&&rr(l,r.mechanism);let d=o?o.getEventProcessors():[],p=Zl(i,u),f=[...r.attachments||[],...p.attachments];f.length&&(r.attachments=f),FS(l,p);let h=[...d,...p.eventProcessors];return(r.data&&r.data.__sentry__===!0?Hr(l):$S(h,l,r)).then(g=>(g&&Gw(g),typeof s=="number"&&s>0?Yw(g,s,a):g))}function Ww(e,t){let{environment:r,release:n,dist:o,maxValueLength:i}=t;e.environment=e.environment||r||ci,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=So(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=So(a.value,i))})}function jw(e,t){let r=GS(t);e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=r[o.filename])})})}function Gw(e){let t={};if(e.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function Vw(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Yw(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))},...e.user&&{user:ct(e.user,t,r)},...e.contexts&&{contexts:ct(e.contexts,t,r)},...e.extra&&{extra:ct(e.extra,t,r)}};return e.contexts?.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ct(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ct(o.data,t,r)}}))),e.contexts?.flags&&n.contexts&&(n.contexts.flags=ct(e.contexts.flags,3,r)),n}function qw(e,t){if(!t)return e;let r=e?e.clone():new Nt;return r.update(t),r}function VS(e){if(e)return Kw(e)?{captureContext:e}:Jw(e)?{captureContext:e}:e}function Kw(e){return e instanceof Nt||typeof e=="function"}var Xw=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jw(e){return Object.keys(e).some(t=>Xw.includes(t))}function on(e,t){return H().captureException(e,VS(t))}function hi(e,t){return H().captureEvent(e,t)}function xo(e,t){be().setContext(e,t)}function qs(){return be().lastEventId()}function Ks(){let e=D();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Xs(e){be().addEventProcessor(e)}function Si(e){let t=be(),{user:r}=Zl(t,H()),{userAgent:n}=U.navigator||{},o=Kh({user:r,...n&&{userAgent:n},...e}),i=t.getSession();return i?.status==="ok"&&Qr(i,{status:"exited"}),Js(),t.setSession(o),o}function Js(){let e=be(),r=H().getSession()||e.getSession();r&&Xh(r),YS(),e.setSession()}function YS(){let e=be(),t=D(),r=e.getSession();r&&t&&t.captureSession(r)}function Ro(e=!1){if(e){Js();return}YS()}var qS="7";function KS(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function Zw(e){return`${KS(e)}${e.projectId}/envelope/`}function Qw(e,t){let r={sentry_version:qS};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function hp(e,t,r){return t||`${Zw(e)}?${Qw(e,r)}`}function Sp(e,t){let r=Hl(e);if(!r)return"";let n=`${KS(r)}embed/error-page/`,o=`dsn=${zt(r)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}var vp=[];function eI(e){let t={};return e.forEach(r=>{let{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function yp(e){let t=e.defaultIntegrations||[],r=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){let o=r(t);n=Array.isArray(o)?o:[o]}else n=t;return eI(n)}function XS(e,t){let r={};return t.forEach(n=>{n?.beforeSetup&&n.beforeSetup(e)}),t.forEach(n=>{n&&Ep(e,n,r)}),r}function _p(e,t){for(let r of t)r?.afterAllSetup&&r.afterAllSetup(e)}function Ep(e,t,r){if(r[t.name]){M&&T.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!vp.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),vp.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){let n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(n=>{let o=t[n];typeof o=="function"&&e.on(n,i=>o.call(t,i,e))}),M&&T.log(`Integration installed: ${t.name}`)}function Tp(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function bp(){return"npm"}function JS(){return!Tp()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ir(){return typeof window<"u"&&(!JS()||tI())}function tI(){return U.process?.type==="renderer"}function rI(e,t){let r=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ir()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ZS(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=zt(n)),_t(i,[rI(e,o)])}function vi(e,t){let r=t??nI(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ZS(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);QS().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function nI(e){return QS().get(e)}function QS(){return yr("clientToLogBufferMap",()=>new WeakMap)}function oI(e,t){let r=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...ir()&&{ingest_settings:{infer_ip:r,infer_user_agent:r}},items:e}]}function ev(e,t,r,n,o){let i={};return t?.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),r&&n&&(i.dsn=zt(n)),_t(i,[oI(e,o)])}function Zs(e,t){let r=t??iI(e)??[];if(r.length===0)return;let n=e.getOptions(),o=ev(r,n._metadata,n.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);tv().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function iI(e){return tv().get(e)}function tv(){return yr("clientToMetricBufferMap",()=>new WeakMap)}function rv(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return vS(t)}function nv(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||et(t))return;let r=[],n=[];for(let i of e.spans)i.op?.startsWith("gen_ai.")?r.push(rv(i)):n.push(i);if(r.length===0)return;e.spans=n;let o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:r.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ir()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:r}]}function ec(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var yi=Symbol.for("SentryBufferFullError");function Co(e=100){let t=new Set;function r(){return t.size<e}function n(s){t.delete(s)}function o(s){if(!r())return wo(yi);let a=s();return t.add(a),a.then(()=>n(a),()=>n(a)),a}function i(s){if(!t.size)return Hr(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let l=[a,new Promise(c=>ec(setTimeout(()=>c(!1),s)))];return Promise.race(l)}return{get $(){return Array.from(t)},add:o,drain:i}}var ov=60*1e3;function iv(e,t=ho()){let r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${e}`);return isNaN(n)?ov:n-t}function sv(e,t){return e[t]||e.all||0}function Qs(e,t,r=ho()){return sv(e,t)>r}function ea(e,{statusCode:t,headers:r},n=ho()){let o={...e},i=r?.["x-sentry-rate-limits"],s=r?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[l,c,,,u]=a.split(":",5),d=parseInt(l,10),p=(isNaN(d)?60:d)*1e3;if(!c)o.all=n+p;else for(let f of c.split(";"))f==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(o[f]=n+p):o[f]=n+p}else s?o.all=n+iv(s,n):t===429&&(o.all=n+60*1e3);return o}var kp=64;function tc(e,t,r=Co(e.bufferSize||kp)){let n={},o=s=>r.drain(s);function i(s){let a=[];if(Ws(s,(d,p)=>{let f=ql(p);Qs(n,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(d)}),a.length===0)return Promise.resolve({});let l=_t(s[0],a),c=d=>{if(ap(l,["client_report"])){M&&T.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Ws(l,(p,f)=>{e.recordDroppedEvent(d,ql(f))})},u=()=>t({body:lp(l)}).then(d=>d.statusCode===413?(M&&T.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),d):(M&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&T.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=ea(n,d),d),d=>{throw c("network_error"),M&&T.error("Encountered error running transport request:",d),d});return r.add(u).then(d=>d,d=>{if(d===yi)return M&&T.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function av(e,t,r){let n=[{type:"client_report"},{timestamp:r||Ct(),discarded_events:e}];return _t(t?{dsn:t}:{},[n])}function rc(e){let t=[];e.message&&t.push(e.message);try{let r=e.exception.values[e.exception.values.length-1];r?.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`))}catch{}return t}function lv(e){let{trace_id:t,parent_span_id:r,span_id:n,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[_o],exclusive_time:s?.[dt],measurements:e.measurements,is_segment:!0}}function cv(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[_o]:e.profile_id},...e.exclusive_time&&{[dt]:e.exclusive_time}}}},measurements:e.measurements}}var ta=["forwarded","-ip","remote-","via","-user"];function uv(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:ta},httpHeaders:{request:{deny:ta},response:{deny:ta}},httpBodies:[],queryParams:{deny:ta},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}var sI={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function dv(e){let t=e.dataCollection!=null?sI:uv(e.sendDefaultPii),r=e.dataCollection??{};return{userInfo:r.userInfo??t.userInfo,cookies:r.cookies??t.cookies,httpHeaders:{request:r.httpHeaders?.request??t.httpHeaders.request,response:r.httpHeaders?.response??t.httpHeaders.response},httpBodies:r.httpBodies??t.httpBodies,queryParams:r.queryParams??t.queryParams,genAI:{inputs:r.genAI?.inputs??t.genAI.inputs,outputs:r.genAI?.outputs??t.genAI.outputs},stackFrameVariables:r.stackFrameVariables??t.stackFrameVariables,frameContextLines:r.frameContextLines??t.frameContextLines}}var pv="Not capturing exception because it's already been captured.",fv="Discarded session because of missing or non-string release",yv=Symbol.for("SentryInternalError"),_v=Symbol.for("SentryDoNotSendEventError"),aI=5e3;function nc(e){return{message:e,[yv]:!0}}function wp(e){return{message:e,[_v]:!0}}function mv(e){return!!e&&typeof e=="object"&&yv in e}function gv(e){return!!e&&typeof e=="object"&&_v in e}function hv(e,t,r,n,o){let i=0,s,a=!1;e.on(r,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,l=>{if(i+=n(l),i>=8e5)o(e);else if(!a){let c=e.getOptions()._flushInterval??aI;c>0&&(a=!0,s=ec(setTimeout(()=>{o(e)},c)))}}),e.on("flush",()=>{o(e)})}var ra=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Co(t.transportOptions?.bufferSize??kp),this._dataCollection=dv(t),t.dsn?this._dsn=Hl(t.dsn):M&&T.warn("No DSN provided, client will not send events."),this._dsn){let n=hp(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:n})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&hv(this,"afterCaptureLog","flushLogs",dI,vi),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&hv(this,"afterCaptureMetric","flushMetrics",uI,Zs)}captureException(t,r,n){let o=Me();if(Ns(t))return M&&T.log(pv),o;let i={event_id:o,...r};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n)).then(s=>s),"error"),i.event_id}captureMessage(t,r,n,o){let i={event_id:Me(),...n},s=xn(t)?t:String(t),a=Rt(t),l=a?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(()=>l.then(c=>this._captureEvent(c,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,r,n){let o=Me();if(r?.originalException&&Ns(r.originalException))return M&&T.log(pv),o;let i={event_id:o,...r},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,l=s.capturedSpanIsolationScope,c=Sv(t.type);return this._process(()=>this._captureEvent(t,i,a||n,l),c),i.event_id}captureSession(t){this.sendSession(t),Qr(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let r=this._transport;if(this.emit("flush"),!r)return!0;let n=await this._isClientDoneProcessing(t),o=await r.flush(t);return n&&o}async close(t){vi(this);let r=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),r}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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){let r=this._integrations[t.name];!r&&t.beforeSetup&&t.beforeSetup(this),Ep(this,t,this._integrations),r||_p(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=nv(t,this),o=RS(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of r.attachments||[])o=Yl(o,up(i));n&&(o=Yl(o,n)),this.sendEnvelope(o).then(i=>this.emit("afterSendEvent",t,i))}sendSession(t){let{release:r,environment:n=ci}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!r){M&&T.warn(fv);return}i.release=i.release||r,i.environment=i.environment||n,t.attrs=i}else{if(!t.release&&!r){M&&T.warn(fv);return}t.release=t.release||r,t.environment=t.environment||n}this.emit("beforeSendSession",t);let o=xS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,r,n=1){if(this._options.sendClientReports){let o=`${t}:${r}`;M&&T.log(`Recording outcome: "${o}"${n>1?` (${n} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+n}}on(t,r){let n=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>r(...i);return n.add(o),()=>{n.delete(o)}}emit(t,...r){let n=this._hooks[t];n&&n.forEach(o=>o(...r))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(r){return M&&T.error("Error while sending envelope:",r),{}}return M&&T.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=XS(this,t),_p(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1,i=r.exception?.values;if(i){o=!0,n=!1;for(let l of i)if(l.mechanism?.handled===!1){n=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Qr(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}async _isClientDoneProcessing(t){let r=0;for(;!t||r<t;){if(await new Promise(n=>setTimeout(n,1)),!this._numProcessing)return!0;r++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n,o){let i=this.getOptions(),s=this.getIntegrationNames();return!r.integrations&&s.length&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),Ys(i,t,r,n,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,r),a.contexts={trace:{...a.contexts?.trace,...Dl(n)},...a.contexts};let l=di(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n=H(),o=be()){return M&&Ip(t)&&T.log(`Captured error event \`${rc(t)[0]||"<unknown>"}\``),this._processEvent(t,r,n,o).then(i=>i.event_id,i=>{M&&(gv(i)?T.log(i.message):mv(i)?T.warn(i.message):T.warn(i))})}_processEvent(t,r,n,o){let i=this.getOptions(),{sampleRate:s}=i,a=Ev(t),l=Ip(t),u=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:$t(s);if(l&&typeof d=="number"&&tr()>d)return this.recordDroppedEvent("sample_rate","error"),wo(wp(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let p=Sv(t.type);return this._prepareEvent(t,r,n,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),wp("An event processor returned `null`, will not send event.");if(r.data?.__sentry__===!0)return f;let y=cI(this,i,f,r);return lI(y,u)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){let g=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",g)}throw wp(`${u} returned \`null\`, will not send event.`)}let h=n.getSession()||o.getSession();if(l&&h&&this._updateSessionFromEvent(h,f),a){let k=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,g=f.spans?f.spans.length:0,S=k-g;S>0&&this.recordDroppedEvent("before_send","span",S)}let y=f.transaction_info;if(a&&y&&f.transaction!==t.transaction){let k="custom";f.transaction_info={...y,source:k}}return this.sendEvent(f,r),f}).then(null,f=>{throw gv(f)||mv(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),nc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
17
|
+
Reason: ${f}`))})}_process(t,r){this._numProcessing++,this._promiseBuffer.add(t).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===yi&&this.recordDroppedEvent("queue_overflow",r),n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{let[o,i]=r.split(":");return{reason:o,category:i,quantity:n}})}_flushOutcomes(){M&&T.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){M&&T.log("No outcomes to send");return}if(!this._dsn){M&&T.log("No dsn provided, will not send outcomes");return}M&&T.log("Sending outcomes:",t);let r=av(t,this._options.tunnel&&zt(this._dsn));this.sendEnvelope(r)}};function Sv(e){return e==="replay_event"?"replay":e||"error"}function lI(e,t){let r=`${t} must return \`null\` or a valid event.`;if(_r(e))return e.then(n=>{if(!er(n)&&n!==null)throw nc(r);return n},n=>{throw nc(`${t} rejected with ${n}`)});if(!er(e)&&e!==null)throw nc(r);return e}function cI(e,t,r,n){let{beforeSend:o,beforeSendTransaction:i,ignoreSpans:s}=t,a=!Vl(t.beforeSendSpan)&&t.beforeSendSpan,l=r;if(Ip(l)&&o)return o(l,n);if(Ev(l)){if(a||s){let c=lv(l);if(s?.length&&nn({description:c.description,op:c.op,attributes:c.data},s))return null;if(a){let u=a(c);u?l=An(r,cv(u)):$s()}if(l.spans){let u=[],d=l.spans;for(let f of d){if(s?.length&&nn({description:f.description,op:f.op,attributes:f.data},s)){kS(d,f);continue}if(a){let h=a(f);h?u.push(h):($s(),u.push(f))}else u.push(f)}let p=l.spans.length-u.length;p&&e.recordDroppedEvent("before_send","span",p),l.spans=u}}if(i){if(l.spans){let c=l.spans.length;l.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return i(l,n)}}return l}function Ip(e){return e.type===void 0}function Ev(e){return e.type==="transaction"}function uI(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Tv(e.attributes)}function dI(e){let t=0;return e.message&&(t+=e.message.length*2),t+Tv(e.attributes)}function Tv(e){if(!e)return 0;let t=0;return Object.values(e).forEach(r=>{Array.isArray(r)?t+=r.length*vv(r[0]):Rt(r)?t+=vv(r):t+=100}),t}function vv(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function xp(e,t){t.debug===!0&&(M?T.enable():Je(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),H().update(t.initialScope);let n=new e(t);return Rp(n),n.init(),n}function Rp(e){H().setClient(e)}function Cp(e,t){let r=t?.getDsn(),n=t?.getOptions().tunnel;return fI(e,r)||pI(e,n)}function pI(e,t){return t?bv(e)===bv(t):!1}function fI(e,t){let r=Fr(e);return!r||ko(r)||!t?!1:mI(r.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(r.search)}function mI(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function bv(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Np(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function na(e,t,r=[t],n="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=r.map(i=>({name:`${n}:@sentry/${i}`,version:Ur})),o.version=Ur)}function _i(e={}){let t=e.client||D();if(!Ks()||!t)return{};let r=Ht(),n=Br(r);if(n.getTraceData)return n.getTraceData(e);let o=e.scope||H(),i=e.span||le();if(!i&&Pl())return{};let s=i?Us(i):gI(o),a=i?Be(i):di(t,o),l=ep(a);if(!zl.test(s))return T.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let u={"sentry-trace":s,baggage:l};return e.propagateTraceparent&&(u.traceparent=i?hS(i):hI(o)),u}function gI(e){let{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return Ls(t,n,r)}function hI(e){let{traceId:t,sampled:r,propagationSpanId:n}=e.getPropagationContext();return Os(t,n,r)}function Ap(e,t,r){let n,o,i,s=r?.maxWait?Math.max(r.maxWait,t):0,a=r?.setTimeoutImpl||setTimeout;function l(){return c(),n=e(),n}function c(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function u(){return o!==void 0||i!==void 0?l():n}function d(){return o&&clearTimeout(o),o=a(l,t),s&&i===void 0&&(i=a(l,s)),n}return d.cancel=c,d.flush=u,d}var SI=100;function Wt(e,t){let r=D(),n=be();if(!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=SI}=r.getOptions();if(i<=0)return;let a={timestamp:Ct(),...e},l=o?Je(()=>o(a,t)):a;l!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,i))}var kv,vI="FunctionToString",wv=new WeakMap,yI=(()=>({name:vI,setupOnce(){kv=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Cn(this),r=wv.has(D())&&t!==void 0?t:this;return kv.apply(r,e)}}catch{}},setup(e){wv.set(e,!0)}})),oc=yI;var _I=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],EI="EventFilters",Mp=(e={})=>{let t;return{name:EI,setup(r){let n=r.getOptions();t=Iv(e,n)},processEvent(r,n,o){if(!t){let i=o.getOptions();t=Iv(e,i)}return TI(r,t)?null:r}}},sc=((e={})=>({...Mp(e),name:"InboundFilters"}));function Iv(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:_I],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function TI(e,t){if(e.type){if(e.type==="transaction"&&kI(e,t.ignoreTransactions))return M&&T.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
18
|
+
Event: ${Tr(e)}`),!0}else{if(bI(e,t.ignoreErrors))return M&&T.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
19
|
+
Event: ${Tr(e)}`),!0;if(RI(e))return M&&T.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
20
|
+
Event: ${Tr(e)}`),!0;if(wI(e,t.denyUrls))return M&&T.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
21
|
+
Event: ${Tr(e)}.
|
|
22
|
+
Url: ${ic(e)}`),!0;if(!II(e,t.allowUrls))return M&&T.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
23
|
+
Event: ${Tr(e)}.
|
|
24
|
+
Url: ${ic(e)}`),!0}return!1}function bI(e,t){return t?.length?rc(e).some(r=>Ze(r,t)):!1}function kI(e,t){if(!t?.length)return!1;let r=e.transaction;return r?Ze(r,t):!1}function wI(e,t){if(!t?.length)return!1;let r=ic(e);return r?Ze(r,t):!1}function II(e,t){if(!t?.length)return!0;let r=ic(e);return r?Ze(r,t):!0}function xI(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function ic(e){try{let r=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?xI(r):null}catch{return M&&T.error(`Cannot extract url for event ${Tr(e)}`),null}}function RI(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Op(e,t,r,n,o,i){if(!o.exception?.values||!i||!Er(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Lp(e,t,n,i.originalException,r,o.exception.values,s,0))}function Lp(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let l=[...i];if(Er(n[o],Error)){xv(s,a,n);let c=e(t,n[o]),u=l.length;Rv(c,o,u,a),l=Lp(e,t,r,n[o],o,[c,...l],c,u)}return Cv(n)&&n.errors.forEach((c,u)=>{if(Er(c,Error)){xv(s,a,n);let d=e(t,c),p=l.length;Rv(d,`errors[${u}]`,p,a),l=Lp(e,t,r,c,o,[d,...l],d,p)}}),l}function Cv(e){return Array.isArray(e.errors)}function xv(e,t,r){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Cv(r)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Rv(e,t,r,n){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function CI(e){return Qt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ac(e){return CI(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Nv=new Set([]);function Pp(e){let t="console",r=st(t,e);return at(t,NI),r}function NI(){"console"in U&&xl.forEach(function(e){e in U.console&&Ae(U.console,e,function(t){return mo[e]=t,function(...r){let n=r[0],o=mo[e],i=Nv.size&&typeof n=="string"&&Ze(n,Nv);i||Ue("console",{args:r,level:e}),(!i||M&&T.isEnabled())&&o?.apply(U.console,r)}})})}function Ei(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var AI="Dedupe",MI=(()=>{let e;return{name:AI,processEvent(t){if(t.type)return t;try{if(LI(t,e))return M&&T.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),lc=MI;function LI(e,t){return t?!!(OI(e,t)||PI(e,t)):!1}function OI(e,t){let r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!Lv(e,t)||!Mv(e,t))}function PI(e,t){let r=Av(t),n=Av(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!Lv(e,t)||!Mv(e,t))}function Mv(e,t){let r=_s(e),n=_s(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){let i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Lv(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Av(e){return e.exception?.values?.[0]}var DI="ConversationId",UI=(()=>({name:DI,setup(e){e.on("spanStart",t=>{let r=H().getScopeData(),n=be().getScopeData(),o=r.conversationId||n.conversationId;if(o){let{op:i,data:s,description:a}=$(t);if(!i?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Bl,o)}})}})),Dp=UI;function Up(e,t,r,n,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=We()&&t(s);if(e.endTimestamp){let h=e.fetchData.__span;if(!h)return;let y=n[h];y&&(a&&(FI(y,e),BI(y,e,o)),delete n[h]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:c=!1}=typeof o=="object"?o:{spanOrigin:o},u=D(),p=!!le()||!!u&&et(u),f=a&&p?Ve($I(s,i,l)):new Qe;if(a&&!p&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,n[f.spanContext().spanId]=f,r(e.fetchData.url)){let h=e.args[0],y={...e.args[1]||{}},k=Pv(h,y,We()&&p?f:void 0,c);k&&(e.args[1]=y,y.headers=k)}if(u){let h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",f,h)}return f}function BI(e,t,r){(typeof r=="object"&&r!==null?r.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Pv(e,t,r,n){let o=_i({span:r,propagateTraceparent:n}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let l=t.headers||(ws(e)?e.headers:void 0);if(l)if(HI(l)){let c=new Headers(l);if(c.get("sentry-trace")||c.set("sentry-trace",i),n&&a&&!c.get("traceparent")&&c.set("traceparent",a),s){let u=c.get("baggage");u?cc(u)||c.set("baggage",`${u},${s}`):c.set("baggage",s)}return c}else if(zI(l)){let c=[...l];c.find(d=>d[0]==="sentry-trace")||c.push(["sentry-trace",i]),n&&a&&!c.find(d=>d[0]==="traceparent")&&c.push(["traceparent",a]);let u=l.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&cc(d[1]));return s&&!u&&c.push(["baggage",s]),c}else{let c="sentry-trace"in l?l["sentry-trace"]:void 0,u="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],f=d&&(Array.isArray(d)?d.find(y=>cc(y)):cc(d));s&&!f&&p.push(s);let h=Object.assign({},l,{"sentry-trace":c??i,baggage:p.length>0?p.join(","):void 0});return n&&a&&!u&&(h.traceparent=a),h}else return{...o}}function FI(e,t){if(t.response){li(e,t.response.status);let r=t.response?.headers?.get("content-length");if(r){let n=parseInt(r);n>0&&e.setAttribute("http.response_content_length",n)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function cc(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ms))}function HI(e){return typeof Headers<"u"&&Er(e,Headers)}function zI(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function $I(e,t,r){if(e.startsWith("data:")){let i=pt(e);return{name:`${t} ${i}`,attributes:Ov(e,void 0,t,r)}}let n=Fr(e),o=n?gi(n):e;return{name:`${t} ${o}`,attributes:Ov(e,n,t,r)}}function Ov(e,t,r,n){let o={url:pt(e),type:"fetch","http.method":r,[ee]:n,[_e]:"http.client"};return t&&(ko(t)||(o["http.url"]=pt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function uc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var oa=U;function Bp(){return"history"in oa&&!!oa.history}function WI(){if(!("fetch"in oa))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function ia(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime=="string")return!0;if(!WI())return!1;if(ia(oa.fetch))return!0;let e=!1,t=oa.document;if(t&&typeof t.createElement=="function")try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow?.fetch&&(e=ia(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){M&&T.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Dn(e,t){let r="fetch",n=st(r,e);return at(r,()=>Uv(void 0,t)),n}function pc(e){let t="fetch-body-resolved",r=st(t,e);return at(t,()=>Uv(GI)),r}function Uv(e,t=!1){t&&!Fp()||Ae(U,"fetch",function(r){return function(...n){let o=new Error,{method:i,url:s}=VI(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ae()*1e3,virtualError:o,headers:YI(n)};return e||Ue("fetch",{...a}),r.apply(U,n).then(async l=>(e?e(l):Ue("fetch",{...a,endTimestamp:ae()*1e3,response:l}),l),l=>{Ue("fetch",{...a,endTimestamp:ae()*1e3,error:l}),Qt(l)&&l.stack===void 0&&(l.stack=o.stack,ye(l,"framesToPop",1));let u=D()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{let f=new URL(a.fetchData.url).host;u==="always"?l.message=`${l.message} (${f})`:ye(l,"__sentry_fetch_url_host__",f)}catch{}throw l})}})}async function jI(e,t){if(e?.body){let r=e.body,n=r.getReader(),o=setTimeout(()=>{r.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);let{done:a}=await n.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),n.releaseLock(),r.cancel().then(null,()=>{})}}function GI(e){let t;try{t=e.clone()}catch{return}jI(t,()=>{Ue("fetch-body-resolved",{endTimestamp:ae()*1e3,response:e})})}function dc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Dv(e){return typeof e=="string"?e:e?dc(e,"url")?e.url:e.toString?e.toString():"":""}function VI(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[r,n]=e;return{url:Dv(r),method:dc(n,"method")?String(n.method).toUpperCase():ws(r)&&dc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:Dv(t),method:dc(t,"method")?String(t.method).toUpperCase():"GET"}}function YI(e){let[t,r]=e;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(ws(t))return new Headers(t.headers)}catch{}}var Bv=U;function Lt(){try{return Bv.document.location.href}catch{return""}}function Ti(e,t=5){if(!Bv.HTMLElement)return null;let r=e;for(let n=0;n<t;n++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}var F=U,Hp=0;function zp(){return Hp>0}function xx(){Hp++,setTimeout(()=>{Hp--})}function No(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Cn(e))return e}catch{return e}let n=function(...o){U._sentryWrappedDepth=(U._sentryWrappedDepth||0)+1;try{let i=o.map(s=>No(s,t));return e.apply(this,i)}catch(i){throw xx(),nr(s=>{s.addEventProcessor(a=>(t.mechanism&&(vo(a,void 0,void 0),rr(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),on(i)}),i}finally{U._sentryWrappedDepth=(U._sentryWrappedDepth||0)-1}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}Is(n,e),ye(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}function bi(){let e=Lt(),{referrer:t}=F.document||{},{userAgent:r}=F.navigator||{},n={...t&&{Referer:t},...r&&{"User-Agent":r}};return{url:e,headers:n}}function fc(e,t){let r=mc(e,t),n={type:Mx(t),value:Lx(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Rx(e,t,r,n){let i=D()?.getOptions().normalizeDepth,s=Dx(t),a={__serialized__:Rs(t,i)};if(s)return{exception:{values:[fc(e,s)]},extra:a};let l={exception:{values:[{type:Rn(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Ox(t,{isUnhandledRejection:n})}]},extra:a};if(r){let c=mc(e,r);c.length&&(l.exception.values[0].stacktrace={frames:c})}return l}function $p(e,t){return{exception:{values:[fc(e,t)]}}}function mc(e,t){let r=t.stacktrace||t.stack||"",n=Nx(t),o=Ax(t);try{return e(r,n,o)}catch{}return[]}var Cx=/Minified React error #\d+;/i;function Nx(e){return e&&Cx.test(e.message)?1:0}function Ax(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ry(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Mx(e){let t=e?.name;return!t&&ry(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Lx(e){let t=e?.message;return ry(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ac(t.error):ac(e):"No error message"}function ny(e,t,r,n){let o=r?.syntheticException||void 0,i=gc(e,t,o,n);return rr(i),i.level="error",r?.event_id&&(i.event_id=r.event_id),Hr(i)}function oy(e,t,r="info",n,o){let i=n?.syntheticException||void 0,s=Wp(e,t,i,o);return s.level=r,n?.event_id&&(s.event_id=n.event_id),Hr(s)}function gc(e,t,r,n,o){let i;if(ri(t)&&t.error)return $p(e,t.error);if(ks(t)||Nl(t)){let s=t;if("stack"in t){i=$p(e,t);let a=i.exception?.values?.[0];if(n&&r&&a&&!a.stacktrace){let l=mc(e,r);l.length&&(a.stacktrace={frames:l},rr(i,{synthetic:!0}))}}else{let a=s.name||(ks(s)?"DOMError":"DOMException"),l=s.message?`${a}: ${s.message}`:a;i=Wp(e,l,r,n),vo(i,l)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Qt(t)?$p(e,t):er(t)||Rn(t)?(i=Rx(e,t,r,o),rr(i,{synthetic:!0}),i):(i=Wp(e,t,r,n),vo(i,`${t}`,void 0),rr(i,{synthetic:!0}),i)}function Wp(e,t,r,n){let o={};if(n&&r){let i=mc(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),rr(o,{synthetic:!0})}if(xn(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Ox(e,{isUnhandledRejection:t}){let r=Ml(e),n=t?"promise rejection":"exception";return ri(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Rn(e)?`Event \`${Px(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Px(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Dx(e){return Object.values(e).find(t=>t instanceof Error)}var hc=class extends ra{constructor(t){let r=Ux(t),n=F.SENTRY_SDK_SOURCE||bp();na(r,"browser",["browser"],n),super(r);let{userInfo:o}=this.getDataCollectionOptions();r._metadata?.sdk&&(r._metadata.sdk.settings={infer_ip:o?"auto":"never",...r._metadata.sdk.settings});let{sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,c=l??a?.enableMetrics??!0;F.document&&(i||s||c)&&F.document.addEventListener("visibilitychange",()=>{F.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&vi(this),c&&Zs(this))}),o&&this.on("beforeSendSession",Np)}eventFromException(t,r){return ny(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return oy(this._options.stackParser,t,r,n,this._options.attachStacktrace)}_prepareEvent(t,r,n,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n,o)}};function Ux(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:F.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Ye=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var B=U;var Bx=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",zr=(e,t,r,n)=>{let o,i;return s=>{t.value>=0&&(s||n)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=Bx(t.value,r),e(t)))}};var an=(e=!0)=>{let t=B.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var sr=()=>an()?.activationStart??0;function ar(e,t,r){B.document&&B.addEventListener(e,t,r)}function Ao(e,t,r){B.document&&B.removeEventListener(e,t,r)}var ki=-1,iy=new Set,Fx=()=>B.document?.visibilityState==="hidden"&&!B.document?.prerendering?0:1/0,Sc=e=>{if(Hx(e)&&ki>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iy)t();isFinite(ki)||(ki=e.type==="visibilitychange"?e.timeStamp:0,Ao("prerenderingchange",Sc,!0))}},$r=()=>{if(B.document&&ki<0){let e=sr();ki=(B.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0]?.startTime)??Fx(),ar("visibilitychange",Sc,!0),ar("pagehide",Sc,!0),ar("prerenderingchange",Sc,!0)}return{get firstHiddenTime(){return ki},onHidden(e){iy.add(e)}}};function Hx(e){return e.type==="pagehide"||B.document?.visibilityState==="hidden"}var sy=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Wr=(e,t=-1)=>{let r=an(),n="navigate";return r&&(B.document?.prerendering||sr()>0?n="prerender":B.document?.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:sy(),navigationType:n}};var jp=new WeakMap;function wi(e,t){try{return jp.get(e)||jp.set(e,new t),jp.get(e)}catch{return new t}}var vc=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let r=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var lr=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}};var Ii=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Bn=e=>{B.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var zx=[1800,3e3],ay=(e,t={})=>{Bn(()=>{let r=$r(),n=Wr("FCP"),o,s=lr("paint",a=>{for(let l of a)l.name==="first-contentful-paint"&&(s.disconnect(),l.startTime<r.firstHiddenTime&&(n.value=Math.max(l.startTime-sr(),0),n.entries.push(l),o(!0)))});s&&(o=zr(e,n,zx,t.reportAllChanges))})};var $x=[.1,.25],ly=(e,t={})=>{ay(Ii(()=>{let r=Wr("CLS",0),n,o=$r(),i=wi(t,vc),s=l=>{for(let c of l)i._processEntry(c);i._sessionValue>r.value&&(r.value=i._sessionValue,r.entries=i._sessionEntries,n())},a=lr("layout-shift",s);a&&(n=zr(e,r,$x,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),n(!0)}),B?.setTimeout?.(n))}))};var cy=0,Gp=1/0,yc=0,Wx=e=>{e.forEach(t=>{t.interactionId&&(Gp=Math.min(Gp,t.interactionId),yc=Math.max(yc,t.interactionId),cy=yc?(yc-Gp)/7+1:0)})},Vp,Yp=()=>Vp?cy:performance.interactionCount||0,uy=()=>{"interactionCount"in performance||Vp||(Vp=lr("event",Wx,{type:"event",buffered:!0,durationThreshold:0}))};var qp=10,dy=0,jx=()=>Yp()-dy,_c=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dy=Yp(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(jx()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let r=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(t.interactionId);if(n||this._longestInteractionList.length<qp||t.duration>r._latency){if(n?t.duration>n._latency?(n.entries=[t],n._latency=t.duration):t.duration===n._latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>qp){let o=this._longestInteractionList.splice(qp);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(n)}}};var Ec=e=>{let t=B.requestIdleCallback||B.setTimeout;B.document?.visibilityState==="hidden"?e():(e=Ii(e),ar("visibilitychange",e,{once:!0,capture:!0}),ar("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Ao("visibilitychange",e,{capture:!0}),Ao("pagehide",e,{capture:!0})}))};var Gx=[200,500],Vx=40,py=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let r=$r();Bn(()=>{uy();let n=Wr("INP"),o,i=wi(t,_c),s=l=>{Ec(()=>{for(let u of l)i._processEntry(u);let c=i._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,o())})},a=lr("event",s,{durationThreshold:t.durationThreshold??Vx});o=zr(e,n,Gx,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),r.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var Tc=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var Yx=[2500,4e3],fy=(e,t={})=>{Bn(()=>{let r=$r(),n=Wr("LCP"),o,i=wi(t,Tc),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(let c of l)i._processEntry(c),c.startTime<r.firstHiddenTime&&(n.value=Math.max(c.startTime-sr(),0),n.entries=[c],o())},a=lr("largest-contentful-paint",s);if(a){o=zr(e,n,Yx,t.reportAllChanges);let l=Ii(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),c=u=>{u.isTrusted&&(Ec(l),Ao(u.type,c,{capture:!0}))};for(let u of["keydown","click","visibilitychange"])ar(u,c,{capture:!0})}})};var qx=[800,1800],Kp=e=>{B.document?.prerendering?Bn(()=>Kp(e)):B.document?.readyState!=="complete"?addEventListener("load",()=>Kp(e),!0):setTimeout(e)},my=(e,t={})=>{let r=Wr("TTFB"),n=zr(e,r,qx,t.reportAllChanges);Kp(()=>{let o=an();o&&(r.value=Math.max(o.responseStart-sr(),0),r.entries=[o],n(!0))})};var sa={},bc={},gy,hy,Sy,vy;function ln(e,t=!1){return kc("cls",e,Kx,gy,t)}function cn(e,t=!1){return kc("lcp",e,Xx,hy,t)}function Xp(e){return kc("ttfb",e,Jx,Sy)}function Mo(e){return kc("inp",e,Zx,vy)}function wr(e,t){return yy(e,t),bc[e]||(Qx(e),bc[e]=!0),_y(e,t)}function aa(e,t){let r=sa[e];if(r?.length)for(let n of r)try{n(t)}catch(o){Ye&&T.error(`Error while triggering instrumentation handler.
|
|
25
25
|
Type: ${e}
|
|
26
|
-
Name: ${
|
|
27
|
-
Error:`,o)}}function Yk(){return lv(e=>{aa("cls",{metric:e}),hv=e},{reportAllChanges:!0})}function qk(){return fv(e=>{aa("lcp",{metric:e}),gv=e},{reportAllChanges:!0})}function Kk(){return mv(e=>{aa("ttfb",{metric:e}),Sv=e})}function Xk(){return pv(e=>{aa("inp",{metric:e}),yv=e})}function Ic(e,t,r,n,o=!1){vv(e,t);let i;return bc[e]||(i=r(),bc[e]=!0),n&&t({metric:n}),_v(e,t,o?i:void 0)}function Jk(e){let t={};e==="event"&&(t.durationThreshold=0),nr(e,r=>{aa(e,{entries:r})},t)}function vv(e,t){sa[e]=sa[e]||[],sa[e].push(t)}function _v(e,t,r){return()=>{r&&r();let n=sa[e];if(!n)return;let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}function Ev(e){return"duration"in e}var Qk=80;function le(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,o=[],i=0,s=0,a=" > ",l=a.length,c,u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Qk;for(;r&&i++<n&&(c=Zk(r,u),!(c==="html"||i>1&&s+o.length*l+c.length>=d));)o.push(c),s+=c.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Zk(e,t){let r=e,n=[];if(!r?.tagName)return"";if(typeof HTMLElement<"u"&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let o=t?.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let i=r.className;if(i&&nt(i)){let s=i.split(/\s+/);for(let a of s)n.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}var Tv=e=>{let t=r=>{(r.type==="pagehide"||O.document?.visibilityState==="hidden")&&e(r)};rr("visibilitychange",t,{capture:!0,once:!0}),rr("pagehide",t,{capture:!0,once:!0})};function xc(e){return typeof e=="number"&&isFinite(e)}function ln(e,t,r,{...n}){let o=B(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),pi(e,()=>{let i=je({startTime:t,...n});return i&&i.end(r),i})}function ki(e){let t=M();if(!t)return;let{name:r,transaction:n,attributes:o,startTime:i}=e,{release:s,environment:a}=t.getOptions(),{userInfo:l}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=U(),p=d.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0,h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}let y={release:s,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:u||void 0,transaction:n,"user_agent.original":O.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...o};return je({name:r,attributes:y,startTime:i,experimental:{standalone:!0}})}function cn(){return O.addEventListener&&O.performance}function se(e){return e/1e3}function bv(e){let t="unknown",r="unknown",n="";for(let o of e){if(o==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(o))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=o}return n===e&&(t=n),{name:t,version:r}}function Ao(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Mo(e,t){let r,n=!1;function o(a){!n&&r&&t(a,r.spanContext().spanId,r),n=!0}Tv(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{r=a,s()})}function Iv(e){let t=0,r;if(!Ao("layout-shift"))return;let n=sn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Mo(e,(o,i)=>{ew(t,r,i,o),n()})}function ew(e,t,r,n){We&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=U().getScopeData().transactionName,s=t?le(t.sources[0]?.node):"Layout shift",a={[J]:"auto.http.browser.cls",[_e]:"ui.webvital.cls",[st]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=le(c.node)});let l=ki({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("cls",{[vr]:"",[_r]:e}),l.end(o))}var tw=6e4;function Lo(e){return e!=null&&e>0&&e<=tw}function xv(e){let t=0,r;if(!Ao("largest-contentful-paint"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Lo(o.value)||(t=o.value,r=i)},!0);Mo(e,(o,i)=>{rw(t,r,i,o),n()})}function rw(e,t,r,n){if(!Lo(e))return;We&&T.log(`Sending LCP span (${e})`);let o=se((ue()||0)+(t?.startTime||0)),i=U().getScopeData().transactionName,s=t?le(t.element):"Largest contentful paint",a={[J]:"auto.http.browser.lcp",[_e]:"ui.webvital.lcp",[st]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(a["lcp.element"]=le(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let l=ki({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("lcp",{[vr]:"millisecond",[_r]:e}),l.end(o))}function or(e){return e&&((ue()||performance.timeOrigin)+e)/1e3}function la(e){let t={};if(e.nextHopProtocol!=null){let{name:r,version:n}=bv(e.nextHopProtocol);t["network.protocol.version"]=n,t["network.protocol.name"]=r}return ue()||cn()?.timeOrigin?nw({...t,"http.request.redirect_start":or(e.redirectStart),"http.request.redirect_end":or(e.redirectEnd),"http.request.worker_start":or(e.workerStart),"http.request.fetch_start":or(e.fetchStart),"http.request.domain_lookup_start":or(e.domainLookupStart),"http.request.domain_lookup_end":or(e.domainLookupEnd),"http.request.connect_start":or(e.connectStart),"http.request.secure_connection_start":or(e.secureConnectionStart),"http.request.connection_end":or(e.connectEnd),"http.request.request_start":or(e.requestStart),"http.request.response_start":or(e.responseStart),"http.request.response_end":or(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function nw(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var ow=2147483647,kv=0,gt={},Nt,wc;function Jp({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){let n=cn();if(n&&ue()){n.mark&&O.performance.mark("sentry-tracing-init");let o=t?xv(r):t===!1?sw():void 0,i=e?Iv(r):e===!1?iw():void 0,s=aw();return()=>{s(),o?.(),i?.()}}return()=>{}}function Qp(){Er("longtask",({entries:e})=>{let t=ie();if(!t)return;let{op:r,start_timestamp:n}=B(t);for(let o of e){let i=se(ue()+o.startTime),s=se(o.duration);r==="navigation"&&n&&i<n||ln(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[J]:"auto.ui.browser.metrics"}})}})}function Zp(){new PerformanceObserver(t=>{let r=ie();if(r)for(let n of t.getEntries()){if(!n.scripts[0])continue;let o=se(ue()+n.startTime),{start_timestamp:i,op:s}=B(r);if(s==="navigation"&&i&&o<i)continue;let a=se(n.duration),l={[J]:"auto.ui.browser.metrics"},c=n.scripts[0],{invoker:u,invokerType:d,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,p&&(l["code.filepath"]=p),f&&(l["code.function"]=f),h!==-1&&(l["browser.script.source_char_position"]=h),ln(r,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ef(){Er("event",({entries:e})=>{let t=ie();if(t){for(let r of e)if(r.name==="click"){let n=se(ue()+r.startTime),o=se(r.duration),i={name:le(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[J]:"auto.ui.browser.metrics"}},s=Ei(r.target);s&&(i.attributes["ui.component_name"]=s),ln(t,n,n+o,i)}}})}function iw(){return sn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(gt.cls={value:e.value,unit:""},wc=t)},!0)}function sw(){return an(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Lo(e.value)||(gt.lcp={value:e.value,unit:"millisecond"},Nt=t)},!0)}function aw(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(gt.ttfb={value:e.value,unit:"millisecond"})})}function tf(e,t){let r=cn(),n=ue();if(!r?.getEntries||!n)return;let{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=se(n),u=r.getEntries(),{op:d,start_timestamp:p}=B(e);if(u.slice(kv).forEach(f=>{let h=se(f.startTime),y=se(Math.max(0,f.duration));if(!(d==="navigation"&&p&&c+h<p))switch(f.entryType){case"navigation":{dw(e,f,c);break}case"mark":case"paint":case"measure":{cw(e,f,h,y,c,i);let E=Fr(),m=f.startTime<E.firstHiddenTime;f.name==="first-paint"&&m&&(gt.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&m&&(gt.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{mw(e,f,f.name,h,y,c,s);break}}}),kv=Math.max(u.length-1,0),hw(e,o),d==="pageload"){if(yw(gt),o){let f=(h,y,E)=>{let m=E??`browser.web_vital.${h}.value`;e.setAttribute(m,y),We&&T.log("Setting web vital attribute",{[m]:y},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{gt[h]&&f(h,gt[h].value)}),gt["ttfb.requestTime"]&&f("ttfb.requestTime",gt["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete gt.cls,l||delete gt.lcp,Object.entries(gt).forEach(([f,h])=>{Kl(f,h.value,h.unit)}),gw(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",tr())}Nt=void 0,wc=void 0,gt={}}function lw(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function cw(e,t,r,n,o,i){if(lw(t)||["mark","measure"].includes(t.entryType)&&Ke(t.name,i))return;let s=on(!1),a=se(s?s.requestStart:0),l=o+Math.max(r,a),c=o+r,u=c+n,d={[J]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),uw(d,t),l<=u&&ln(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function uw(e,t){try{let r=t.detail;if(!r)return;if(typeof r=="object"){for(let[n,o]of Object.entries(r))if(o&&bt(o))e[`sentry.browser.measure.detail.${n}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${n}`]=JSON.stringify(o)}catch{}return}if(bt(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function dw(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{kc(e,t,n,r)}),kc(e,t,"secureConnection",r,"TLS/SSL"),kc(e,t,"fetch",r,"cache"),kc(e,t,"domainLookup",r,"DNS"),fw(e,t,r)}function kc(e,t,r,n,o=r){let i=pw(r),s=t[i],a=t[`${r}Start`];!a||!s||ln(e,n+se(a),n+se(s),{op:`browser.${o}`,name:t.name,attributes:{[J]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function pw(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function fw(e,t,r){let n=r+se(t.requestStart),o=r+se(t.responseEnd),i=r+se(t.responseStart);t.responseEnd&&(ln(e,n,o,{op:"browser.request",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}),ln(e,i,o,{op:"browser.response",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}))}function mw(e,t,r,n,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let l={[J]:"auto.resource.browser.metrics"},c=Zt(r);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=r.includes(O.location.origin),Sw(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let u={...l,...la(t)},d=i+n,p=d+o;ln(e,d,p,{name:r.replace(O.location.origin,""),op:a,attributes:u})}function hw(e,t){let r=O.navigator;if(!r)return;let n=r.connection;n&&(n.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute(t?"network.connection.type":"connectionType",n.type),xc(n.rtt)&&(gt["connection.rtt"]={value:n.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",n.rtt))),xc(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),xc(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function gw(e,t){Nt&&t.recordLcpOnPageloadSpan&&(Nt.element&&e.setAttribute("lcp.element",le(Nt.element)),Nt.id&&e.setAttribute("lcp.id",Nt.id),Nt.url&&e.setAttribute("lcp.url",Nt.url.trim().slice(0,200)),Nt.loadTime!=null&&e.setAttribute("lcp.loadTime",Nt.loadTime),Nt.renderTime!=null&&e.setAttribute("lcp.renderTime",Nt.renderTime),e.setAttribute("lcp.size",Nt.size)),wc?.sources&&t.recordClsOnPageloadSpan&&wc.sources.forEach((r,n)=>e.setAttribute(`cls.source.${n+1}`,le(r.node)))}function Sw(e,t,r){r.forEach(([n,o])=>{let i=e[n];i!=null&&(typeof i=="number"&&i<ow||typeof i=="string")&&(t[o]=i)})}function yw(e){let t=on(!1);if(!t)return;let{responseStart:r,requestStart:n}=t;n<=r&&(e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}var rf=[],ca=new Map,wi=new Map,nf=60;function of(){if(cn()&&ue()){let t=vw();return()=>{t()}}return()=>{}}var Ri={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 vw(){return Co(_w)}var _w=({metric:e})=>{if(e.value==null)return;let t=se(e.value);if(t>nf)return;let r=e.entries.find(h=>h.duration===e.value&&Ri[h.name]);if(!r)return;let{interactionId:n}=r,o=Ri[r.name],i=se(ue()+r.startTime),s=ie(),a=s?te(s):void 0,l=n!=null?ca.get(n):void 0,c=l?.span||a,u=c?B(c).description:U().getScopeData().transactionName,d=l?.elementName||le(r.target),p={[J]:"auto.http.browser.inp",[_e]:`ui.interaction.${o}`,[st]:r.duration},f=ki({name:d,transaction:u,attributes:p,startTime:i});f&&(f.addEvent("inp",{[vr]:"millisecond",[_r]:e.value}),f.end(i+t))};function wv(e){return e!=null?ca.get(e):void 0}function sf(){let e=Object.keys(Ri);er()&&e.forEach(o=>{O.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=le(i),a=Math.round(o.timeStamp);if(wi.set(a,s),wi.size>50){let l=wi.keys().next().value;l!==void 0&&wi.delete(l)}}function r(o){let i=Math.round(o.startTime),s=wi.get(i);if(!s)for(let a=-5;a<=5;a++){let l=wi.get(i+a);if(l){s=l;break}}return s||"<unknown>"}let n=({entries:o})=>{let i=ie(),s=i&&te(i);o.forEach(a=>{if(!Ev(a))return;let l=a.interactionId;if(l==null||ca.has(l))return;let c=a.target?le(a.target):r(a);if(rf.length>10){let u=rf.shift();ca.delete(u)}rf.push(l),ca.set(l,{span:s,elementName:c})})};Er("event",n),Er("first-input",n)}function af(e){let{name:t,op:r,origin:n,metricName:o,value:i,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:u}=e,d=U().getScopeData().transactionName,p={[J]:n,[_e]:r,[st]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":d,"user_agent.original":O.navigator?.userAgent,...s};a&&Fs(a).attributes?.[_e]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(p[`browser.web_vital.${o}.report_event`]=l);let f=je({name:t,attributes:p,startTime:c,parentSpan:a});f&&f.end(u??c)}function lf(e){let t=0,r;if(!Ao("largest-contentful-paint"))return;let n=an(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Lo(o.value)||(t=o.value,r=i)},!0);Mo(e,(o,i,s)=>{Ew(t,r,s,o),n()})}function Ew(e,t,r,n){if(!Lo(e))return;We&&T.log(`Sending LCP span (${e})`);let o=ue()||0,i=se(o),s=se(o+(t?.startTime||0)),a=t?le(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=le(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),af({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:r,reportEvent:n,startTime:i,endTime:s})}function cf(e){let t=0,r;if(!Ao("layout-shift"))return;let n=sn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Mo(e,(o,i,s)=>{Tw(t,r,s,o),n()})}function Tw(e,t,r,n){We&&T.log(`Sending CLS span (${e})`);let o=t?se((ue()||0)+t.startTime):ne(),i=t?le(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=le(a.node)}),af({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:r,reportEvent:n,startTime:o})}function uf(){if(!cn()||!ue())return;Co(({metric:r})=>{if(r.value==null||se(r.value)>nf)return;let o=r.entries.find(i=>i.duration===r.value&&Ri[i.name]);o&&bw(r.value,o)})}function bw(e,t){We&&T.log(`Sending INP span (${e})`);let r=se(ue()+t.startTime),n=se(e),o=Ri[t.name],i=wv(t.interactionId),s=ie(),a=s?te(s):void 0,l=i?.span||a,c=l?Fs(l).name:U().getScopeData().transactionName,u=i?.elementName||le(t.target);af({name:u,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[st]:t.duration,"sentry.transaction":c},startTime:r,endTime:r+n,parentSpan:l})}var Iw=1e3,Rv,df,pf;function ua(e){tt("dom",e),rt("dom",xw)}function xw(){if(!O.document)return;let e=Oe.bind(null,"dom"),t=Nv(e,!0);O.document.addEventListener("click",t,!1),O.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let o=O[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ne(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[s]=c[s]||{refCount:0};if(!u.handler){let d=Nv(e);u.handler=d,i.call(this,s,d,l)}u.refCount++}catch{}return i.call(this,s,a,l)}}),Ne(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__||{},u=c[s];u&&(u.refCount--,u.refCount<=0&&(i.call(this,s,u.handler,l),u.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function kw(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==pf)return!1}catch{}return!0}function ww(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Nv(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=Rw(r);if(ww(r.type,n))return;ve(r,"_sentryCaptured",!0),n&&!n._sentryId&&ve(n,"_sentryId",Ce());let o=r.type==="keypress"?"input":r.type;kw(r)||(e({event:r,name:o,global:t}),df=r.type,pf=n?n._sentryId:void 0),clearTimeout(Rv),Rv=O.setTimeout(()=>{pf=void 0,df=void 0},Iw)}}function Rw(e){try{return e.target}catch{return null}}var Rc;function un(e){let t="history";tt(t,e),rt(t,Nw)}function Nw(){if(O.addEventListener("popstate",()=>{let t=O.location.href,r=Rc;if(Rc=t,r===t)return;Oe("history",{from:r,to:t})}),!Bp())return;function e(t){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Rc,i=Cw(String(n));if(Rc=i,o===i)return t.apply(this,r);Oe("history",{from:o,to:i})}return t.apply(this,r)}}Ne(O.history,"pushState",e),Ne(O.history,"replaceState",e)}function Cw(e){try{return new URL(e,O.location.origin).toString()}catch{return e}}var Nc={};function Cc(e){let t=Nc[e];if(t)return t;let r=O[e];if(ia(r))return Nc[e]=r.bind(O);let n=O.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){We&&T.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Nc[e]=r.bind(O))}function ff(e){Nc[e]=void 0}function Oo(...e){return Cc("setTimeout")(...e)}var Tr="__sentry_xhr_v3__";function da(e){tt("xhr",e),rt("xhr",Aw)}function Aw(){if(!O.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){let o=new Error,i=ne()*1e3,s=nt(n[0])?n[0].toUpperCase():void 0,a=Mw(n[1]);if(!s||!a)return t.apply(r,n);r[Tr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let c=r[Tr];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}let u={endTimestamp:ne()*1e3,startTimestamp:i,xhr:r,virtualError:o};Oe("xhr",u)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(c,u,d){let[p,f]=d,h=u[Tr];return h&&nt(p)&&nt(f)&&(h.request_headers[p.toLowerCase()]=f),c.apply(u,d)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){let o=r[Tr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:ne()*1e3,xhr:r};return Oe("xhr",i),t.apply(r,n)}})}function Mw(e){if(nt(e))return e;try{return e.toString()}catch{}}var Lw=Symbol.for("sentry__originalRequestBody");function Ac(e){return new URLSearchParams(e).toString()}function Mc(e,t=T){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ac(e)];if(!e)return[void 0]}catch(r){return We&&t.error(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return We&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let r=e[0][Lw];return r!==void 0?r:void 0}}function pa(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return We&&T.error(r,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
28
|
-
`).reduce((r,n)=>{let[o,i]=n.split(": ");return i&&(r[o.toLowerCase()]=i),r},{}):{}}function mf(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}var Ow=40;function Cv(e,t=Cc("fetch")){let r=0,n=0;async function o(i){let s=i.body.length;r+=s,n++;let a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{let l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw ff("fetch"),l}finally{r-=s,n--}}return tc(e,o,wo(e.bufferSize||Ow))}var xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Dw=30;var Pw=50;function hf(e,t,r,n){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var Uw=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Bw=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fw=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hw=/at (.+?) ?\(data:(.+?),/,zw=e=>{let t=e.match(Hw);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let r=Uw.exec(e);if(r){let[,o,i,s]=r;return hf(o,"?",+i,+s)}let n=Bw.exec(e);if(n){if(n[2]?.indexOf("eval")===0){let a=Fw.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[i,s]=Mv(n[1]||"?",n[2]);return hf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},$w=[Dw,zw],jw=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ww=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Gw=e=>{let t=jw.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=Ww.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||"?";return[o,n]=Mv(o,n),hf(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Vw=[Pw,Gw];var Yw=[$w,Vw],Av=vs(...Yw),Mv=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Oc=1024,qw="Breadcrumbs",Kw=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:qw,setup(r){t.console&&Dp(Qw(r)),t.dom&&ua(Jw(r,t.dom)),t.xhr&&da(Zw(r)),t.fetch&&Ln(eR(r)),t.history&&un(tR(r)),t.sentry&&r.on("beforeSendEvent",Xw(r))}}}),Lv=Kw;function Xw(e){return function(r){M()===e&&Ht({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:yr(r)},{event:r})}}function Jw(e,t){return function(n){if(M()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Oc&&(xe&&T.warn(`\`dom.maxStringLength\` cannot exceed ${Oc}, but a value of ${a} was configured. Sentry will use ${Oc} instead.`),a=Oc),typeof s=="string"&&(s=[s]);try{let c=n.event,u=rR(c)?c.target:c;o=le(u,{keyAttrs:s,maxStringLength:a}),i=Ei(u)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Ht(l,{event:n.event,name:n.name,global:n.global})}}function Qw(e){return function(r){if(M()!==e)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:_i(r.level),message:Ns(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Ns(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Ht(n,{input:r.args,level:r.level})}}function Zw(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Tr];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:c}=i,u={method:s,url:a,status_code:l},d={xhr:r.xhr,input:c,startTimestamp:n,endTimestamp:o},p={category:"xhr",data:u,type:"http",level:uc(l)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),Ht(p,d)}}function eR(e){return function(r){if(M()!==e)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){let i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},s={category:"fetch",data:r.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),Ht(s,i)}else{let i=r.response,s={...r.fetchData,status_code:i?.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:uc(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Ht(l,a)}}}function tR(e){return function(r){if(M()!==e)return;let n=r.from,o=r.to,i=Zt(P.location.href),s=n?Zt(n):void 0,a=Zt(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Ht({category:"navigation",data:{from:n,to:o}})}}function rR(e){return!!e&&!!e.target}var nR="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".split(","),oR="BrowserApiErrors",iR=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:oR,setupOnce(){t.setTimeout&&Ne(P,"setTimeout",Ov),t.setInterval&&Ne(P,"setInterval",Ov),t.requestAnimationFrame&&Ne(P,"requestAnimationFrame",sR),t.XMLHttpRequest&&"XMLHttpRequest"in P&&Ne(XMLHttpRequest.prototype,"send",aR);let r=t.eventTarget;r&&(Array.isArray(r)?r:nR).forEach(o=>lR(o,t))}}}),Dv=iR;function Ov(e){return function(...t){let r=t[0];return t[0]=Ro(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ft(e)}`}}),e.apply(this,t)}}function sR(e){return function(t){return e.apply(this,[Ro(t,{mechanism:{data:{handler:ft(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function aR(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Ne(r,o,function(i){let s={mechanism:{data:{handler:ft(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=kn(i);return a&&(s.mechanism.data.handler=ft(a)),Ro(i,s)})}),e.apply(this,t)}}function lR(e,t){let n=P[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ne(n,"addEventListener",function(o){return function(i,s,a){try{cR(s)&&(s.handleEvent=Ro(s.handleEvent,{mechanism:{data:{handler:ft(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&uR(this,i,s),o.apply(this,[i,Ro(s,{mechanism:{data:{handler:ft(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ne(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function cR(e){return typeof e.handleEvent=="function"}function uR(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}var Pv=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof P.document>"u"){xe&&T.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}gi({ignoreDuration:!0}),ko();let r=be(),n=r.getUser();r.addScopeListener(o=>{let i=o.getUser();(n?.id!==i?.id||n?.ip_address!==i?.ip_address)&&(ko(),n=i)}),t==="route"&&un(({from:o,to:i})=>{o!==i&&(gi({ignoreDuration:!0}),ko())})}}};var dR="CultureContext",pR=(()=>({name:dR,preprocessEvent(e){let t=Uv();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Uv();t&&An(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),Bv=pR;function Uv(){try{let e=P.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var fR="GlobalHandlers",mR=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:fR,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(hR(r),Fv("onerror")),t.onunhandledrejection&&(gR(r),Fv("onunhandledrejection"))}}}),Hv=mR;function hR(e){Ts(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let{msg:o,url:i,line:s,column:a,error:l}=t,c=vR(hc(r,l||o,void 0,n,!1),i,s,a);c.level="error",hi(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function gR(e){bs(t=>{let{stackParser:r,attachStacktrace:n}=zv();if(M()!==e||zp())return;let o=SR(t),i=bt(o)?yR(o):hc(r,o,void 0,n,!0);i.level="error",hi(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function SR(e){if(bt(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 yR(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vR(e,t,r,n){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:n,lineno:r,filename:_R(t)??Rt(),function:"?",in_app:!0}),e}function Fv(e){xe&&T.log(`Global Handler attached: ${e}`)}function zv(){return M()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function _R(e){if(!(!nt(e)||e.length===0))return e.startsWith("data:")?`<${at(e,!1)}>`:e}var $v=()=>({name:"HttpContext",preprocessEvent(e){if(!P.navigator&&!P.location&&!P.document)return;let t=Ti(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!P.navigator&&!P.location&&!P.document)return;let t=Ti();An(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}});var ER="cause",TR=5,bR="LinkedErrors",IR=((e={})=>{let t=e.limit||TR,r=e.key||ER;return{name:bR,preprocessEvent(n,o,i){let s=i.getOptions();Op(fc,s.stackParser,r,t,n,o)}}}),jv=IR;var xR=/^HTML(\w*)Element$/;function fa(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(mf(e)){let t=kR(e);if(xR.test(t))return`[HTMLElement: ${le(e)}]`}}function kR(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Wv(){return wR()?(xe&&qe(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function wR(){if(typeof P.window>"u")return!1;let e=P;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let r=Rt();return!(P===P.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function Gv(e){return[sc(),oc(),Pp(),Dv(),Lv(),Hv(),jv(),lc(),$v(),Bv(),Pv()]}function gf(e={}){let t=!e.skipBrowserExtensionCheck&&Wv(),r=e.defaultIntegrations==null?Gv():e.defaultIntegrations,n={...e,enabled:t?!1:e.enabled,stackParser:Nl(e.stackParser||Av),integrations:vp({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||Cv};return ni(fa),wp(gc,n)}function Dc(e={}){let t=P.document,r=t?.head||t?.body;if(!r){xe&&T.error("[showReportDialog] Global document not defined");return}let n=U(),i=M()?.getDsn();if(!i){xe&&T.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||qs()},a=P.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Sp(i,s);let{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){let u=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{P.removeEventListener("message",u)}};P.addEventListener("message",u)}r.appendChild(a)}var he=L,Vf="sentryReplaySession",RR="replay_event",Yf="Unable to send Replay",NR=3e5,CR=9e5,AR=5e3,MR=5500,LR=6e4,OR=5e3,DR=3,Vv=15e4,Pc=5e3,PR=3e3,UR=300,qf=2e7,BR=4999,FR=5e4,Yv=36e5,HR=Object.defineProperty,zR=(e,t,r)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qv=(e,t,r)=>zR(e,typeof t!="symbol"?t+"":t,r),Pe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Pe||{});function $R(e){return e.nodeType===e.ELEMENT_NODE}function ga(e){return e?.host?.shadowRoot===e}function Sa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jR(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 WR(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function zc(e){try{let t=e.rules||e.cssRules;return t?jR(Array.from(t,y_).join("")):null}catch{return null}}function GR(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,o=n[r],i=n.getPropertyPriority(o);t+=`${o}:${n.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function y_(e){let t;if(YR(e))try{t=zc(e.styleSheet)||WR(e)}catch{}else if(qR(e)){let r=e.cssText,n=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(r=GR(e)),n&&(r=VR(r)),n||o)return r}return t||e.cssText}function VR(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function YR(e){return"styleSheet"in e}function qR(e){return"selectorText"in e}var $c=class{constructor(){qv(this,"idNodeMap",new Map),qv(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function KR(){return new $c}function ru({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function va({isMasked:e,element:t,value:r,maskInputFn:n}){let o=r||"";return e?(n&&(o=n(o,t)),"*".repeat(o.length)):o}function Pi(e){return e.toLowerCase()}function Tf(e){return e.toUpperCase()}var Kv="__rrweb_original__";function XR(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){let i=t.getImageData,s=Kv in i?i[Kv]:i;if(new Uint32Array(s.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Kf(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Pi(t):null}function jc(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}function v_(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i;return r.pathname.match(n)?.[1]??null}var Xv={};function __(e){let t=Xv[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return Xv[e]=n.bind(window)}function bf(...e){return __("setTimeout")(...e)}function E_(...e){return __("clearTimeout")(...e)}function T_(e){try{return e.contentDocument}catch{}}function JR(e){try{return e.contentWindow}catch{}}var QR=1,ZR=new RegExp("[^a-z0-9-_:]"),_a=-2;function Xf(){return QR++}function eN(e){if(e instanceof HTMLFormElement)return"form";let t=Pi(e.tagName);return ZR.test(t)?"div":t}function tN(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ni,Jv,rN=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,nN=/^(?:[a-z+]+:)?\/\//i,oN=/^www\..*/i,iN=/^(data:)([^,]*),(.*)/i;function sN(e,t){if(!e||t.size===0)return e;try{let r=e.split(";"),n=[];for(let o of r){if(o=o.trim(),!o)continue;let i=o.indexOf(":");if(i===-1){n.push(o);continue}let s=o.slice(0,i).trim();t.has(s)||n.push(o)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(r){return console.warn("Error filtering CSS properties:",r),e}}function Wc(e,t){return(e||"").replace(rN,(r,n,o,i,s,a)=>{let l=o||s||a,c=n||i||"";if(!l)return r;if(nN.test(l)||oN.test(l))return`url(${c}${l}${c})`;if(iN.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${tN(t)+l}${c})`;let u=t.split("/"),d=l.split("/");u.pop();for(let p of d)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}var aN=/^[^ \t\n\r\u000c]+/,lN=/^[, \t\n\r\u000c]+/;function cN(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,a=i.exec(t.substring(r));return a?(s=a[0],r+=s.length,s):""}let o=[];for(;n(lN),!(r>=t.length);){let i=n(aN);if(i.slice(-1)===",")i=Mi(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Mi(e,i);let a=!1;for(;;){let l=t.charAt(r);if(l===""){o.push((i+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,o.push((i+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return o.join(", ")}var Qv=new WeakMap;function Mi(e,t){return!t||t.trim()===""?t:nu(e,t)}function uN(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function nu(e,t){let r=Qv.get(e);if(r||(r=e.createElement("a"),Qv.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function b_(e,t,r,n,o,i,s){if(!n)return n;if(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#"))return Mi(e,n);if(r==="xlink:href"&&n[0]!=="#")return Mi(e,n);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Mi(e,n);if(r==="srcset")return cN(e,n);if(r==="style"){let a=Wc(n,nu(e));return s&&s.size>0&&(a=sN(a,s)),a}else if(t==="object"&&r==="data")return Mi(e,n);return typeof i=="function"?i(r,n,o):n}function I_(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function dN(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function pN(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}function Do(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Do(e.parentNode,t,r,n+1)}function Li(e,t){return r=>{let n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(pN(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Ui(e,t,r,n,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(i){if(l=Do(s,Li(n,o)),l<0)return!0;a=Do(s,Li(t,r),l>=0?l:1/0)}else{if(a=Do(s,Li(t,r)),a<0)return!1;l=Do(s,Li(n,o),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function fN(e,t,r){let n=JR(e);if(!n)return;let o=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let a=bf(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{E_(a),o=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function mN(e,t,r){let n=!1,o;try{o=e.sheet}catch{o=null}if(o)return;let i=bf(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{E_(i),n=!0,t()})}function hN(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:y,maskInputFn:E,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:k=!1,ignoreCSSAttributes:w}=t,_=gN(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Pe.Document,childNodes:[],compatMode:e.compatMode}:{type:Pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return yN(e,{doc:r,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:E,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:b,newlyAddedElement:k,rootId:_,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:w});case e.TEXT_NODE:return SN(e,{doc:r,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:h,maskInputFn:E,rootId:_});case e.CDATA_SECTION_NODE:return{type:Pe.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Pe.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function gN(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function SN(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,f=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,y=d==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=zc(e.parentNode.sheet))}catch(m){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${m}`,e)}p=Wc(p,nu(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let E=Ui(e,n,i,o,s,r);if(!f&&!h&&!y&&p&&E&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(l.textarea||E)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let m=ru({type:null,tagName:d,maskInputOptions:l});p=va({isMasked:Ui(e,n,i,o,s,m),element:e,value:p,maskInputFn:c})}return{type:Pe.Text,textContent:p||"",isStyle:f,rootId:u}}function yN(e,t){let{doc:r,blockClass:n,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:y,maskTextClass:E,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:v,ignoreCSSAttributes:b}=t,k=dN(e,n,o,i),w=eN(e),_={},I=e.attributes.length;for(let x=0;x<I;x++){let D=e.attributes[x];D.name&&!I_(w,D.name,D.value)&&(_[D.name]=b_(r,w,Pi(D.name),D.value,e,l,b))}if(w==="link"&&s){let x=Array.from(r.styleSheets).find(Y=>Y.href===e.href),D=null;x&&(D=zc(x)),D&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=Wc(D,x.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let x=zc(e.sheet);x&&(_._cssText=Wc(x,nu(r)))}if(w==="input"||w==="textarea"||w==="select"||w==="option"){let x=e,D=Kf(x),Y=jc(x,Tf(w),D),ee=x.checked;if(D!=="submit"&&D!=="button"&&Y){let G=Ui(x,E,g,m,v,ru({type:D,tagName:Tf(w),maskInputOptions:a}));_.value=va({isMasked:G,element:x,value:Y,maskInputFn:c})}ee&&(_.checked=ee)}if(w==="option"&&(e.selected&&!a.select?_.selected=!0:delete _.selected),w==="canvas"&&p){if(e.__context==="2d")XR(e)||(_.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let x=e.toDataURL(u.type,u.quality),D=r.createElement("canvas");D.width=e.width,D.height=e.height;let Y=D.toDataURL(u.type,u.quality);x!==Y&&(_.rr_dataURL=x)}}if(w==="img"&&d){Ni||(Ni=r.createElement("canvas"),Jv=Ni.getContext("2d"));let x=e,D=x.currentSrc||x.getAttribute("src")||"<unknown-src>",Y=x.crossOrigin,ee=()=>{x.removeEventListener("load",ee);try{Ni.width=x.naturalWidth,Ni.height=x.naturalHeight,Jv.drawImage(x,0,0),_.rr_dataURL=Ni.toDataURL(u.type,u.quality)}catch(G){if(x.crossOrigin!=="anonymous"){x.crossOrigin="anonymous",x.complete&&x.naturalWidth!==0?ee():x.addEventListener("load",ee);return}else console.warn(`Cannot inline img src=${D}! Error: ${G}`)}x.crossOrigin==="anonymous"&&(Y?_.crossOrigin=Y:x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?ee():x.addEventListener("load",ee)}if((w==="audio"||w==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),k){let{width:x,height:D}=e.getBoundingClientRect();_={class:_.class,rr_width:`${x}px`,rr_height:`${D}px`}}w==="iframe"&&!f(_.src)&&(!k&&!T_(e)&&(_.rr_src=_.src),delete _.src);let j;try{customElements.get(w)&&(j=!0)}catch{}return{type:Pe.Element,tagName:w,attributes:_,childNodes:[],isSVG:uN(e)||void 0,needBlock:k,rootId:y,isCustom:j}}function me(e){return e==null?"":e.toLowerCase()}function vN(e,t){if(t.comment&&e.type===Pe.Comment)return!0;if(e.type===Pe.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"&&v_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(me(e.attributes.name).match(/^msapplication-tile(image|color)$/)||me(e.attributes.name)==="application-name"||me(e.attributes.rel)==="icon"||me(e.attributes.rel)==="apple-touch-icon"||me(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&me(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(me(e.attributes.property).match(/^(og|twitter|fb):/)||me(e.attributes.name).match(/^(og|twitter):/)||me(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(me(e.attributes.name)==="robots"||me(e.attributes.name)==="googlebot"||me(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(me(e.attributes.name)==="author"||me(e.attributes.name)==="generator"||me(e.attributes.name)==="framework"||me(e.attributes.name)==="publisher"||me(e.attributes.name)==="progid"||me(e.attributes.property).match(/^article:/)||me(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(me(e.attributes.name)==="google-site-verification"||me(e.attributes.name)==="yandex-verification"||me(e.attributes.name)==="csrf-token"||me(e.attributes.name)==="p:domain_verify"||me(e.attributes.name)==="verify-v1"||me(e.attributes.name)==="verification"||me(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Oi(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:k=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I=5e3,onBlockedImageLoad:j,onStylesheetLoad:x,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:Y=()=>!1,newlyAddedElement:ee=!1,ignoreCSSAttributes:G}=t,{preserveWhiteSpace:Be=!0}=t,ce=hN(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,dataURLOptions:v,inlineImages:b,recordCanvas:k,keepIframeSrcFn:Y,newlyAddedElement:ee,ignoreCSSAttributes:G});if(!ce)return console.warn(e,"not serialized"),null;let ye;n.hasNode(e)?ye=n.getId(e):vN(ce,g)||!Be&&ce.type===Pe.Text&&!ce.isStyle&&!ce.textContent.trim().length?ye=_a:ye=Xf();let C=Object.assign(ce,{id:ye});if(n.add(e,C),ye===_a)return null;w&&w(e);let oe=!p;if(C.type===Pe.Element){oe=oe&&!C.needBlock;let $=e.shadowRoot;$&&Sa($)&&(C.isShadowHost=!0)}if((C.type===Pe.Document||C.type===Pe.Element)&&oe){g.headWhitespace&&C.type===Pe.Element&&C.tagName==="head"&&(Be=!1);let $={doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onBlockedImageLoad:j,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G},q=e.childNodes?Array.from(e.childNodes):[];for(let pe of q){let fe=Oi(pe,$);fe&&C.childNodes.push(fe)}if($R(e)&&e.shadowRoot)for(let pe of Array.from(e.shadowRoot.childNodes)){let fe=Oi(pe,$);fe&&(Sa(e.shadowRoot)&&(fe.isShadow=!0),C.childNodes.push(fe))}}if(e.parentNode&&ga(e.parentNode)&&Sa(e.parentNode)&&(C.isShadow=!0),C.type===Pe.Element&&C.tagName==="iframe"&&!C.needBlock&&fN(e,()=>{let $=T_(e);if($&&_){let q=Oi($,{doc:$,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G});q&&_(e,q)}},I),C.type===Pe.Element&&C.tagName==="img"&&!e.complete&&C.needBlock){let $=e,q=()=>{if($.isConnected&&!$.complete&&j)try{let pe=$.getBoundingClientRect();pe.width>0&&pe.height>0&&j($,C,pe)}catch{}$.removeEventListener("load",q)};$.isConnected&&$.addEventListener("load",q)}return C.type===Pe.Element&&C.tagName==="link"&&typeof C.attributes.rel=="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href=="string"&&v_(C.attributes.href)==="css")&&mN(e,()=>{if(x){let $=Oi(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:b,recordCanvas:k,preserveWhiteSpace:Be,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:x,stylesheetLoadTimeout:D,keepIframeSrcFn:Y,ignoreCSSAttributes:G});$&&x(e,$)}},D),C.type===Pe.Element&&delete C.needBlock,C}function _N(e,t){let{mirror:r=new $c,blockClass:n="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOM:g=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:j,stylesheetLoadTimeout:x,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:Y=new Set([])}=t||{};return Oi(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!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}:h===!1?{}:h,maskAttributeFn:y,maskTextFn:E,maskInputFn:m,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:j,stylesheetLoadTimeout:x,keepIframeSrcFn:D,newlyAddedElement:!1,ignoreCSSAttributes:Y})}function yt(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Ci=`Please stop import mirror directly. Instead of that,\r
|
|
26
|
+
Name: ${vt(n)}
|
|
27
|
+
Error:`,o)}}function Kx(){return ly(e=>{aa("cls",{metric:e}),gy=e},{reportAllChanges:!0})}function Xx(){return fy(e=>{aa("lcp",{metric:e}),hy=e},{reportAllChanges:!0})}function Jx(){return my(e=>{aa("ttfb",{metric:e}),Sy=e})}function Zx(){return py(e=>{aa("inp",{metric:e}),vy=e})}function kc(e,t,r,n,o=!1){yy(e,t);let i;return bc[e]||(i=r(),bc[e]=!0),n&&t({metric:n}),_y(e,t,o?i:void 0)}function Qx(e){let t={};e==="event"&&(t.durationThreshold=0),lr(e,r=>{aa(e,{entries:r})},t)}function yy(e,t){sa[e]=sa[e]||[],sa[e].push(t)}function _y(e,t,r){return()=>{r&&r();let n=sa[e];if(!n)return;let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}function Ey(e){return"duration"in e}var e1=80;function pe(e,t={}){if(!e)return"<unknown>";try{let r=e,n=5,o=[],i=0,s=0,a=" > ",l=a.length,c,u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||e1;for(;r&&i++<n&&(c=t1(r,u),!(c==="html"||i>1&&s+o.length*l+c.length>=d));)o.push(c),s+=c.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function t1(e,t){let r=e,n=[];if(!r?.tagName)return"";if(typeof HTMLElement<"u"&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let o=t?.length?t.filter(i=>r.getAttribute(i)).map(i=>[i,r.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{n.push(`[${i[0]}="${i[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let i=r.className;if(i&<(i)){let s=i.split(/\s+/);for(let a of s)n.push(`.${a}`)}}for(let i of["aria-label","type","name","title","alt"]){let s=r.getAttribute(i);s&&n.push(`[${i}="${s}"]`)}return n.join("")}var Ty=e=>{let t=r=>{(r.type==="pagehide"||B.document?.visibilityState==="hidden")&&e(r)};ar("visibilitychange",t,{capture:!0,once:!0}),ar("pagehide",t,{capture:!0,once:!0})};function wc(e){return typeof e=="number"&&isFinite(e)}function un(e,t,r,{...n}){let o=$(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),fi(e,()=>{let i=Ve({startTime:t,...n});return i&&i.end(r),i})}function xi(e){let t=D();if(!t)return;let{name:r,transaction:n,attributes:o,startTime:i}=e,{release:s,environment:a}=t.getOptions(),{userInfo:l}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),d=H(),p=d.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0,h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}let y={release:s,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:u||void 0,transaction:n,"user_agent.original":B.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...o};return Ve({name:r,attributes:y,startTime:i,experimental:{standalone:!0}})}function dn(){return B.addEventListener&&B.performance}function ce(e){return e/1e3}function by(e){let t="unknown",r="unknown",n="";for(let o of e){if(o==="/"){[t,r]=e.split("/");break}if(!isNaN(Number(o))){t=n==="h"?"http":n,r=e.split(n)[1];break}n+=o}return n===e&&(t=n),{name:t,version:r}}function Lo(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Oo(e,t){let r,n=!1;function o(a){!n&&r&&t(a,r.spanContext().spanId,r),n=!0}Ty(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{r=a,s()})}function ky(e){let t=0,r;if(!Lo("layout-shift"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Oo(e,(o,i)=>{r1(t,r,i,o),n()})}function r1(e,t,r,n){Ye&&T.log(`Sending CLS span (${e})`);let o=t?ce((me()||0)+t.startTime):ae(),i=H().getScopeData().transactionName,s=t?pe(t.sources[0]?.node):"Layout shift",a={[ee]:"auto.http.browser.cls",[_e]:"ui.webvital.cls",[dt]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t?.sources&&t.sources.forEach((c,u)=>{a[`cls.source.${u+1}`]=pe(c.node)});let l=xi({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("cls",{[br]:"",[kr]:e}),l.end(o))}var n1=6e4;function Po(e){return e!=null&&e>0&&e<=n1}function wy(e){let t=0,r;if(!Lo("largest-contentful-paint"))return;let n=cn(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Po(o.value)||(t=o.value,r=i)},!0);Oo(e,(o,i)=>{o1(t,r,i,o),n()})}function o1(e,t,r,n){if(!Po(e))return;Ye&&T.log(`Sending LCP span (${e})`);let o=ce((me()||0)+(t?.startTime||0)),i=H().getScopeData().transactionName,s=t?pe(t.element):"Largest contentful paint",a={[ee]:"auto.http.browser.lcp",[_e]:"ui.webvital.lcp",[dt]:0,"sentry.pageload.span_id":r,"sentry.report_event":n};t&&(t.element&&(a["lcp.element"]=pe(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let l=xi({name:s,transaction:i,attributes:a,startTime:o});l&&(l.addEvent("lcp",{[br]:"millisecond",[kr]:e}),l.end(o))}function cr(e){return e&&((me()||performance.timeOrigin)+e)/1e3}function la(e){let t={};if(e.nextHopProtocol!=null){let{name:r,version:n}=by(e.nextHopProtocol);t["network.protocol.version"]=n,t["network.protocol.name"]=r}return me()||dn()?.timeOrigin?i1({...t,"http.request.redirect_start":cr(e.redirectStart),"http.request.redirect_end":cr(e.redirectEnd),"http.request.worker_start":cr(e.workerStart),"http.request.fetch_start":cr(e.fetchStart),"http.request.domain_lookup_start":cr(e.domainLookupStart),"http.request.domain_lookup_end":cr(e.domainLookupEnd),"http.request.connect_start":cr(e.connectStart),"http.request.secure_connection_start":cr(e.secureConnectionStart),"http.request.connection_end":cr(e.connectEnd),"http.request.request_start":cr(e.requestStart),"http.request.response_start":cr(e.responseStart),"http.request.response_end":cr(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function i1(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var s1=2147483647,Iy=0,Et={},Ot,xc;function Jp({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:r}){let n=dn();if(n&&me()){n.mark&&B.performance.mark("sentry-tracing-init");let o=t?wy(r):t===!1?l1():void 0,i=e?ky(r):e===!1?a1():void 0,s=c1();return()=>{s(),o?.(),i?.()}}return()=>{}}function Zp(){wr("longtask",({entries:e})=>{let t=le();if(!t)return;let{op:r,start_timestamp:n}=$(t);for(let o of e){let i=ce(me()+o.startTime),s=ce(o.duration);r==="navigation"&&n&&i<n||un(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[ee]:"auto.ui.browser.metrics"}})}})}function Qp(){new PerformanceObserver(t=>{let r=le();if(r)for(let n of t.getEntries()){if(!n.scripts[0])continue;let o=ce(me()+n.startTime),{start_timestamp:i,op:s}=$(r);if(s==="navigation"&&i&&o<i)continue;let a=ce(n.duration),l={[ee]:"auto.ui.browser.metrics"},c=n.scripts[0],{invoker:u,invokerType:d,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=c;l["browser.script.invoker"]=u,l["browser.script.invoker_type"]=d,p&&(l["code.filepath"]=p),f&&(l["code.function"]=f),h!==-1&&(l["browser.script.source_char_position"]=h),un(r,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ef(){wr("event",({entries:e})=>{let t=le();if(t){for(let r of e)if(r.name==="click"){let n=ce(me()+r.startTime),o=ce(r.duration),i={name:pe(r.target),op:`ui.interaction.${r.name}`,startTime:n,attributes:{[ee]:"auto.ui.browser.metrics"}},s=Ti(r.target);s&&(i.attributes["ui.component_name"]=s),un(t,n,n+o,i)}}})}function a1(){return ln(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Et.cls={value:e.value,unit:""},xc=t)},!0)}function l1(){return cn(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Po(e.value)||(Et.lcp={value:e.value,unit:"millisecond"},Ot=t)},!0)}function c1(){return Xp(({metric:e})=>{e.entries[e.entries.length-1]&&(Et.ttfb={value:e.value,unit:"millisecond"})})}function tf(e,t){let r=dn(),n=me();if(!r?.getEntries||!n)return;let{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:s,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:l}=t,c=ce(n),u=r.getEntries(),{op:d,start_timestamp:p}=$(e);if(u.slice(Iy).forEach(f=>{let h=ce(f.startTime),y=ce(Math.max(0,f.duration));if(!(d==="navigation"&&p&&c+h<p))switch(f.entryType){case"navigation":{f1(e,f,c);break}case"mark":case"paint":case"measure":{d1(e,f,h,y,c,i);let k=$r(),g=f.startTime<k.firstHiddenTime;f.name==="first-paint"&&g&&(Et.fp={value:f.startTime,unit:"millisecond"}),f.name==="first-contentful-paint"&&g&&(Et.fcp={value:f.startTime,unit:"millisecond"});break}case"resource":{h1(e,f,f.name,h,y,c,s);break}}}),Iy=Math.max(u.length-1,0),S1(e,o),d==="pageload"){if(_1(Et),o){let f=(h,y,k)=>{let g=k??`browser.web_vital.${h}.value`;e.setAttribute(g,y),Ye&&T.log("Setting web vital attribute",{[g]:y},"on pageload span")};["ttfb","fp","fcp"].forEach(h=>{Et[h]&&f(h,Et[h].value)}),Et["ttfb.requestTime"]&&f("ttfb.requestTime",Et["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete Et.cls,l||delete Et.lcp,Object.entries(Et).forEach(([f,h])=>{Kl(f,h.value,h.unit)}),v1(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",sr())}Ot=void 0,xc=void 0,Et={}}function u1(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function d1(e,t,r,n,o,i){if(u1(t)||["mark","measure"].includes(t.entryType)&&Ze(t.name,i))return;let s=an(!1),a=ce(s?s.requestStart:0),l=o+Math.max(r,a),c=o+r,u=c+n,d={[ee]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),p1(d,t),l<=u&&un(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function p1(e,t){try{let r=t.detail;if(!r)return;if(typeof r=="object"){for(let[n,o]of Object.entries(r))if(o&&Rt(o))e[`sentry.browser.measure.detail.${n}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${n}`]=JSON.stringify(o)}catch{}return}if(Rt(r)){e["sentry.browser.measure.detail"]=r;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(r)}catch{}}catch{}}function f1(e,t,r){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(n=>{Ic(e,t,n,r)}),Ic(e,t,"secureConnection",r,"TLS/SSL"),Ic(e,t,"fetch",r,"cache"),Ic(e,t,"domainLookup",r,"DNS"),g1(e,t,r)}function Ic(e,t,r,n,o=r){let i=m1(r),s=t[i],a=t[`${r}Start`];!a||!s||un(e,n+ce(a),n+ce(s),{op:`browser.${o}`,name:t.name,attributes:{[ee]:"auto.ui.browser.metrics",...r==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function m1(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function g1(e,t,r){let n=r+ce(t.requestStart),o=r+ce(t.responseEnd),i=r+ce(t.responseStart);t.responseEnd&&(un(e,n,o,{op:"browser.request",name:t.name,attributes:{[ee]:"auto.ui.browser.metrics"}}),un(e,i,o,{op:"browser.response",name:t.name,attributes:{[ee]:"auto.ui.browser.metrics"}}))}function h1(e,t,r,n,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let l={[ee]:"auto.resource.browser.metrics"},c=or(r);c.protocol&&(l["url.scheme"]=c.protocol.split(":").pop()),c.host&&(l["server.address"]=c.host),l["url.same_origin"]=r.includes(B.location.origin),y1(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let u={...l,...la(t)},d=i+n,p=d+o;un(e,d,p,{name:r.replace(B.location.origin,""),op:a,attributes:u})}function S1(e,t){let r=B.navigator;if(!r)return;let n=r.connection;n&&(n.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute(t?"network.connection.type":"connectionType",n.type),wc(n.rtt)&&(Et["connection.rtt"]={value:n.rtt,unit:"millisecond"},t&&e.setAttribute("network.connection.rtt",n.rtt))),wc(r.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",r.deviceMemory):e.setAttribute("deviceMemory",`${r.deviceMemory} GB`)),wc(r.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",r.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(r.hardwareConcurrency)))}function v1(e,t){Ot&&t.recordLcpOnPageloadSpan&&(Ot.element&&e.setAttribute("lcp.element",pe(Ot.element)),Ot.id&&e.setAttribute("lcp.id",Ot.id),Ot.url&&e.setAttribute("lcp.url",Ot.url.trim().slice(0,200)),Ot.loadTime!=null&&e.setAttribute("lcp.loadTime",Ot.loadTime),Ot.renderTime!=null&&e.setAttribute("lcp.renderTime",Ot.renderTime),e.setAttribute("lcp.size",Ot.size)),xc?.sources&&t.recordClsOnPageloadSpan&&xc.sources.forEach((r,n)=>e.setAttribute(`cls.source.${n+1}`,pe(r.node)))}function y1(e,t,r){r.forEach(([n,o])=>{let i=e[n];i!=null&&(typeof i=="number"&&i<s1||typeof i=="string")&&(t[o]=i)})}function _1(e){let t=an(!1);if(!t)return;let{responseStart:r,requestStart:n}=t;n<=r&&(e["ttfb.requestTime"]={value:r-n,unit:"millisecond"})}var rf=[],ca=new Map,Ri=new Map,nf=60;function of(){if(dn()&&me()){let t=E1();return()=>{t()}}return()=>{}}var Ci={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 E1(){return Mo(T1)}var T1=({metric:e})=>{if(e.value==null)return;let t=ce(e.value);if(t>nf)return;let r=e.entries.find(h=>h.duration===e.value&&Ci[h.name]);if(!r)return;let{interactionId:n}=r,o=Ci[r.name],i=ce(me()+r.startTime),s=le(),a=s?ie(s):void 0,l=n!=null?ca.get(n):void 0,c=l?.span||a,u=c?$(c).description:H().getScopeData().transactionName,d=l?.elementName||pe(r.target),p={[ee]:"auto.http.browser.inp",[_e]:`ui.interaction.${o}`,[dt]:r.duration},f=xi({name:d,transaction:u,attributes:p,startTime:i});f&&(f.addEvent("inp",{[br]:"millisecond",[kr]:e.value}),f.end(i+t))};function xy(e){return e!=null?ca.get(e):void 0}function sf(){let e=Object.keys(Ci);ir()&&e.forEach(o=>{B.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=pe(i),a=Math.round(o.timeStamp);if(Ri.set(a,s),Ri.size>50){let l=Ri.keys().next().value;l!==void 0&&Ri.delete(l)}}function r(o){let i=Math.round(o.startTime),s=Ri.get(i);if(!s)for(let a=-5;a<=5;a++){let l=Ri.get(i+a);if(l){s=l;break}}return s||"<unknown>"}let n=({entries:o})=>{let i=le(),s=i&&ie(i);o.forEach(a=>{if(!Ey(a))return;let l=a.interactionId;if(l==null||ca.has(l))return;let c=a.target?pe(a.target):r(a);if(rf.length>10){let u=rf.shift();ca.delete(u)}rf.push(l),ca.set(l,{span:s,elementName:c})})};wr("event",n),wr("first-input",n)}function af(e){let{name:t,op:r,origin:n,metricName:o,value:i,attributes:s,parentSpan:a,reportEvent:l,startTime:c,endTime:u}=e,d=H().getScopeData().transactionName,p={[ee]:n,[_e]:r,[dt]:0,[`browser.web_vital.${o}.value`]:i,"sentry.transaction":d,"user_agent.original":B.navigator?.userAgent,...s};a&&Fs(a).attributes?.[_e]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),l&&(p[`browser.web_vital.${o}.report_event`]=l);let f=Ve({name:t,attributes:p,startTime:c,parentSpan:a});f&&f.end(u??c)}function lf(e){let t=0,r;if(!Lo("largest-contentful-paint"))return;let n=cn(({metric:o})=>{let i=o.entries[o.entries.length-1];!i||!Po(o.value)||(t=o.value,r=i)},!0);Oo(e,(o,i,s)=>{b1(t,r,s,o),n()})}function b1(e,t,r,n){if(!Po(e))return;Ye&&T.log(`Sending LCP span (${e})`);let o=me()||0,i=ce(o),s=ce(o+(t?.startTime||0)),a=t?pe(t.element):"Largest contentful paint",l={};t?.element&&(l["browser.web_vital.lcp.element"]=pe(t.element)),t?.id&&(l["browser.web_vital.lcp.id"]=t.id),t?.url&&(l["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(l["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(l["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(l["browser.web_vital.lcp.size"]=t.size),af({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:l,parentSpan:r,reportEvent:n,startTime:i,endTime:s})}function cf(e){let t=0,r;if(!Lo("layout-shift"))return;let n=ln(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,r=i)},!0);Oo(e,(o,i,s)=>{k1(t,r,s,o),n()})}function k1(e,t,r,n){Ye&&T.log(`Sending CLS span (${e})`);let o=t?ce((me()||0)+t.startTime):ae(),i=t?pe(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,l)=>{s[`browser.web_vital.cls.source.${l+1}`]=pe(a.node)}),af({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:r,reportEvent:n,startTime:o})}function uf(){if(!dn()||!me())return;Mo(({metric:r})=>{if(r.value==null||ce(r.value)>nf)return;let o=r.entries.find(i=>i.duration===r.value&&Ci[i.name]);o&&w1(r.value,o)})}function w1(e,t){Ye&&T.log(`Sending INP span (${e})`);let r=ce(me()+t.startTime),n=ce(e),o=Ci[t.name],i=xy(t.interactionId),s=le(),a=s?ie(s):void 0,l=i?.span||a,c=l?Fs(l).name:H().getScopeData().transactionName,u=i?.elementName||pe(t.target);af({name:u,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[dt]:t.duration,"sentry.transaction":c},startTime:r,endTime:r+n,parentSpan:l})}var I1=1e3,Ry,df,pf;function ua(e){st("dom",e),at("dom",x1)}function x1(){if(!B.document)return;let e=Ue.bind(null,"dom"),t=Cy(e,!0);B.document.addEventListener("click",t,!1),B.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{let o=B[r]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ae(o,"addEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=c[s]=c[s]||{refCount:0};if(!u.handler){let d=Cy(e);u.handler=d,i.call(this,s,d,l)}u.refCount++}catch{}return i.call(this,s,a,l)}}),Ae(o,"removeEventListener",function(i){return function(s,a,l){if(s==="click"||s=="keypress")try{let c=this.__sentry_instrumentation_handlers__||{},u=c[s];u&&(u.refCount--,u.refCount<=0&&(i.call(this,s,u.handler,l),u.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,l)}}))})}function R1(e){if(e.type!==df)return!1;try{if(!e.target||e.target._sentryId!==pf)return!1}catch{}return!0}function C1(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Cy(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;let n=N1(r);if(C1(r.type,n))return;ye(r,"_sentryCaptured",!0),n&&!n._sentryId&&ye(n,"_sentryId",Me());let o=r.type==="keypress"?"input":r.type;R1(r)||(e({event:r,name:o,global:t}),df=r.type,pf=n?n._sentryId:void 0),clearTimeout(Ry),Ry=B.setTimeout(()=>{pf=void 0,df=void 0},I1)}}function N1(e){try{return e.target}catch{return null}}var Rc;function pn(e){let t="history";st(t,e),at(t,A1)}function A1(){if(B.addEventListener("popstate",()=>{let t=B.location.href,r=Rc;if(Rc=t,r===t)return;Ue("history",{from:r,to:t})}),!Bp())return;function e(t){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let o=Rc,i=M1(String(n));if(Rc=i,o===i)return t.apply(this,r);Ue("history",{from:o,to:i})}return t.apply(this,r)}}Ae(B.history,"pushState",e),Ae(B.history,"replaceState",e)}function M1(e){try{return new URL(e,B.location.origin).toString()}catch{return e}}var Cc={};function Nc(e){let t=Cc[e];if(t)return t;let r=B[e];if(ia(r))return Cc[e]=r.bind(B);let n=B.document;if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){Ye&&T.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Cc[e]=r.bind(B))}function ff(e){Cc[e]=void 0}function Do(...e){return Nc("setTimeout")(...e)}var Ir="__sentry_xhr_v3__";function da(e){st("xhr",e),at("xhr",L1)}function L1(){if(!B.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){let o=new Error,i=ae()*1e3,s=lt(n[0])?n[0].toUpperCase():void 0,a=O1(n[1]);if(!s||!a)return t.apply(r,n);r[Ir]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);let l=()=>{let c=r[Ir];if(c&&r.readyState===4){try{c.status_code=r.status}catch{}let u={endTimestamp:ae()*1e3,startTimestamp:i,xhr:r,virtualError:o};Ue("xhr",u)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(c,u,d){return l(),c.apply(u,d)}}):r.addEventListener("readystatechange",l),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(c,u,d){let[p,f]=d,h=u[Ir];return h&<(p)&<(f)&&(h.request_headers[p.toLowerCase()]=f),c.apply(u,d)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){let o=r[Ir];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);let i={startTimestamp:ae()*1e3,xhr:r};return Ue("xhr",i),t.apply(r,n)}})}function O1(e){if(lt(e))return e;try{return e.toString()}catch{}}var P1=Symbol.for("sentry__originalRequestBody");function Ac(e){return new URLSearchParams(e).toString()}function Mc(e,t=T){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ac(e)];if(!e)return[void 0]}catch(r){return Ye&&t.error(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ye&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Lc(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let r=e[0][P1];return r!==void 0?r:void 0}}function pa(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return Ye&&T.error(r,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
|
|
28
|
+
`).reduce((r,n)=>{let[o,i]=n.split(": ");return i&&(r[o.toLowerCase()]=i),r},{}):{}}function mf(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}var D1=40;function Ny(e,t=Nc("fetch")){let r=0,n=0;async function o(i){let s=i.body.length;r+=s,n++;let a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};try{let l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw ff("fetch"),l}finally{r-=s,n--}}return tc(e,o,Co(e.bufferSize||D1))}var xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U1=30;var B1=50;function gf(e,t,r,n){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}var F1=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,H1=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,z1=/\((\S*)(?::(\d+))(?::(\d+))\)/,$1=/at (.+?) ?\(data:(.+?),/,W1=e=>{let t=e.match($1);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let r=F1.exec(e);if(r){let[,o,i,s]=r;return gf(o,"?",+i,+s)}let n=H1.exec(e);if(n){if(n[2]?.indexOf("eval")===0){let a=z1.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}let[i,s]=My(n[1]||"?",n[2]);return gf(s,i,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},j1=[U1,W1],G1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,V1=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Y1=e=>{let t=G1.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=V1.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||"?";return[o,n]=My(o,n),gf(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},q1=[B1,Y1];var K1=[j1,q1],Ay=ys(...K1),My=(e,t)=>{let r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var Oc=1024,X1="Breadcrumbs",J1=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:X1,setup(r){t.console&&Pp(eR(r)),t.dom&&ua(Q1(r,t.dom)),t.xhr&&da(tR(r)),t.fetch&&Dn(rR(r)),t.history&&pn(nR(r)),t.sentry&&r.on("beforeSendEvent",Z1(r))}}}),Ly=J1;function Z1(e){return function(r){D()===e&&Wt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:Tr(r)},{event:r})}}function Q1(e,t){return function(n){if(D()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Oc&&(xe&&T.warn(`\`dom.maxStringLength\` cannot exceed ${Oc}, but a value of ${a} was configured. Sentry will use ${Oc} instead.`),a=Oc),typeof s=="string"&&(s=[s]);try{let c=n.event,u=oR(c)?c.target:c;o=pe(u,{keyAttrs:s,maxStringLength:a}),i=Ti(u)}catch{o="<unknown>"}if(o.length===0)return;let l={category:`ui.${n.name}`,message:o};i&&(l.data={"ui.component_name":i}),Wt(l,{event:n.event,name:n.name,global:n.global})}}function eR(e){return function(r){if(D()!==e)return;let n={category:"console",data:{arguments:r.args,logger:"console"},level:Ei(r.level),message:Cs(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Cs(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Wt(n,{input:r.args,level:r.level})}}function tR(e){return function(r){if(D()!==e)return;let{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[Ir];if(!n||!o||!i)return;let{method:s,url:a,status_code:l,body:c}=i,u={method:s,url:a,status_code:l},d={xhr:r.xhr,input:c,startTimestamp:n,endTimestamp:o},p={category:"xhr",data:u,type:"http",level:uc(l)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),Wt(p,d)}}function rR(e){return function(r){if(D()!==e)return;let{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){let i={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o},s={category:"fetch",data:r.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,i),Wt(s,i)}else{let i=r.response,s={...r.fetchData,status_code:i?.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},l={category:"fetch",data:s,type:"http",level:uc(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),Wt(l,a)}}}function nR(e){return function(r){if(D()!==e)return;let n=r.from,o=r.to,i=or(F.location.href),s=n?or(n):void 0,a=or(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Wt({category:"navigation",data:{from:n,to:o}})}}function oR(e){return!!e&&!!e.target}var iR="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".split(","),sR="BrowserApiErrors",aR=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:sR,setupOnce(){t.setTimeout&&Ae(F,"setTimeout",Oy),t.setInterval&&Ae(F,"setInterval",Oy),t.requestAnimationFrame&&Ae(F,"requestAnimationFrame",lR),t.XMLHttpRequest&&"XMLHttpRequest"in F&&Ae(XMLHttpRequest.prototype,"send",cR);let r=t.eventTarget;r&&(Array.isArray(r)?r:iR).forEach(o=>uR(o,t))}}}),Py=aR;function Oy(e){return function(...t){let r=t[0];return t[0]=No(r,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${vt(e)}`}}),e.apply(this,t)}}function lR(e){return function(t){return e.apply(this,[No(t,{mechanism:{data:{handler:vt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function cR(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&Ae(r,o,function(i){let s={mechanism:{data:{handler:vt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Cn(i);return a&&(s.mechanism.data.handler=vt(a)),No(i,s)})}),e.apply(this,t)}}function uR(e,t){let n=F[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ae(n,"addEventListener",function(o){return function(i,s,a){try{dR(s)&&(s.handleEvent=No(s.handleEvent,{mechanism:{data:{handler:vt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&pR(this,i,s),o.apply(this,[i,No(s,{mechanism:{data:{handler:vt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ae(n,"removeEventListener",function(o){return function(i,s,a){try{let l=s.__sentry_wrapped__;l&&o.call(this,i,l,a)}catch{}return o.call(this,i,s,a)}}))}function dR(e){return typeof e.handleEvent=="function"}function pR(e,t,r){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,r)}var Dy=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof F.document>"u"){xe&&T.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Si({ignoreDuration:!0}),Ro();let r=be(),n=r.getUser();r.addScopeListener(o=>{let i=o.getUser();(n?.id!==i?.id||n?.ip_address!==i?.ip_address)&&(Ro(),n=i)}),t==="route"&&pn(({from:o,to:i})=>{o!==i&&(Si({ignoreDuration:!0}),Ro())})}}};var fR="CultureContext",mR=(()=>({name:fR,preprocessEvent(e){let t=Uy();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Uy();t&&On(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),By=mR;function Uy(){try{let e=F.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var gR="GlobalHandlers",hR=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:gR,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(SR(r),Fy("onerror")),t.onunhandledrejection&&(vR(r),Fy("onunhandledrejection"))}}}),Hy=hR;function SR(e){Ts(t=>{let{stackParser:r,attachStacktrace:n}=zy();if(D()!==e||zp())return;let{msg:o,url:i,line:s,column:a,error:l}=t,c=ER(gc(r,l||o,void 0,n,!1),i,s,a);c.level="error",hi(c,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function vR(e){bs(t=>{let{stackParser:r,attachStacktrace:n}=zy();if(D()!==e||zp())return;let o=yR(t),i=Rt(o)?_R(o):gc(r,o,void 0,n,!0);i.level="error",hi(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function yR(e){if(Rt(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 _R(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ER(e,t,r,n){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[];return l.length===0&&l.push({colno:n,lineno:r,filename:TR(t)??Lt(),function:"?",in_app:!0}),e}function Fy(e){xe&&T.log(`Global Handler attached: ${e}`)}function zy(){return D()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function TR(e){if(!(!lt(e)||e.length===0))return e.startsWith("data:")?`<${pt(e,!1)}>`:e}var $y=()=>({name:"HttpContext",preprocessEvent(e){if(!F.navigator&&!F.location&&!F.document)return;let t=bi(),r={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:r}},processSegmentSpan(e){if(!F.navigator&&!F.location&&!F.document)return;let t=bi();On(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers["User-Agent"],"http.request.header.referer":t.headers.Referer})}});var bR="cause",kR=5,wR="LinkedErrors",IR=((e={})=>{let t=e.limit||kR,r=e.key||bR;return{name:wR,preprocessEvent(n,o,i){let s=i.getOptions();Op(fc,s.stackParser,r,t,n,o)}}}),Wy=IR;var xR=/^HTML(\w*)Element$/;function fa(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(mf(e)){let t=RR(e);if(xR.test(t))return`[HTMLElement: ${pe(e)}]`}}function RR(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function jy(){return CR()?(xe&&Je(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function CR(){if(typeof F.window>"u")return!1;let e=F;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let r=Lt();return!(F===F.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function Gy(e){return[sc(),oc(),Dp(),Py(),Ly(),Hy(),Wy(),lc(),$y(),By(),Dy()]}function hf(e={}){let t=!e.skipBrowserExtensionCheck&&jy(),r=e.defaultIntegrations==null?Gy():e.defaultIntegrations,n={...e,enabled:t?!1:e.enabled,stackParser:Cl(e.stackParser||Ay),integrations:yp({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||Ny};return oi(fa),xp(hc,n)}function Pc(e={}){let t=F.document,r=t?.head||t?.body;if(!r){xe&&T.error("[showReportDialog] Global document not defined");return}let n=H(),i=D()?.getDsn();if(!i){xe&&T.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||qs()},a=F.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Sp(i,s);let{onLoad:l,onClose:c}=s;if(l&&(a.onload=l),c){let u=d=>{if(d.data==="__sentry_reportdialog_closed__")try{c()}finally{F.removeEventListener("message",u)}};F.addEventListener("message",u)}r.appendChild(a)}var he=U,Vf="sentryReplaySession",NR="replay_event",Yf="Unable to send Replay",AR=3e5,MR=9e5,LR=5e3,OR=5500,PR=6e4,DR=5e3,UR=3,Vy=15e4,Dc=5e3,BR=3e3,FR=300,qf=2e7,HR=4999,zR=5e4,Yy=36e5,$R=Object.defineProperty,WR=(e,t,r)=>t in e?$R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qy=(e,t,r)=>WR(e,typeof t!="symbol"?t+"":t,r),Fe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Fe||{});function jR(e){return e.nodeType===e.ELEMENT_NODE}function ha(e){return e?.host?.shadowRoot===e}function Sa(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function GR(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 VR(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function zc(e){try{let t=e.rules||e.cssRules;return t?GR(Array.from(t,v_).join("")):null}catch{return null}}function YR(e){let t="";for(let r=0;r<e.style.length;r++){let n=e.style,o=n[r],i=n.getPropertyPriority(o);t+=`${o}:${n.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function v_(e){let t;if(KR(e))try{t=zc(e.styleSheet)||VR(e)}catch{}else if(XR(e)){let r=e.cssText,n=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(r=YR(e)),n&&(r=qR(r)),n||o)return r}return t||e.cssText}function qR(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function KR(e){return"styleSheet"in e}function XR(e){return"selectorText"in e}var $c=class{constructor(){qy(this,"idNodeMap",new Map),qy(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function JR(){return new $c}function ru({maskInputOptions:e,tagName:t,type:r}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||r&&e[r]||r==="password"||t==="INPUT"&&!r&&e.text)}function ya({isMasked:e,element:t,value:r,maskInputFn:n}){let o=r||"";return e?(n&&(o=n(o,t)),"*".repeat(o.length)):o}function Ui(e){return e.toLowerCase()}function Tf(e){return e.toUpperCase()}var Ky="__rrweb_original__";function ZR(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let o=0;o<e.height;o+=r){let i=t.getImageData,s=Ky in i?i[Ky]:i;if(new Uint32Array(s.call(t,n,o,Math.min(r,e.width-n),Math.min(r,e.height-o)).data.buffer).some(l=>l!==0))return!1}return!0}function Kf(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ui(t):null}function Wc(e,t,r){return t==="INPUT"&&(r==="radio"||r==="checkbox")?e.getAttribute("value")||"":e.value}function y_(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i;return r.pathname.match(n)?.[1]??null}var Xy={};function __(e){let t=Xy[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return Xy[e]=n.bind(window)}function bf(...e){return __("setTimeout")(...e)}function E_(...e){return __("clearTimeout")(...e)}function T_(e){try{return e.contentDocument}catch{}}function QR(e){try{return e.contentWindow}catch{}}var eC=1,tC=new RegExp("[^a-z0-9-_:]"),_a=-2;function Xf(){return eC++}function rC(e){if(e instanceof HTMLFormElement)return"form";let t=Ui(e.tagName);return tC.test(t)?"div":t}function nC(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ni,Jy,oC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,iC=/^(?:[a-z+]+:)?\/\//i,sC=/^www\..*/i,aC=/^(data:)([^,]*),(.*)/i;function lC(e,t){if(!e||t.size===0)return e;try{let r=e.split(";"),n=[];for(let o of r){if(o=o.trim(),!o)continue;let i=o.indexOf(":");if(i===-1){n.push(o);continue}let s=o.slice(0,i).trim();t.has(s)||n.push(o)}return n.join("; ")+(n.length>0&&e.endsWith(";")?";":"")}catch(r){return console.warn("Error filtering CSS properties:",r),e}}function jc(e,t){return(e||"").replace(oC,(r,n,o,i,s,a)=>{let l=o||s||a,c=n||i||"";if(!l)return r;if(iC.test(l)||sC.test(l))return`url(${c}${l}${c})`;if(aC.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${nC(t)+l}${c})`;let u=t.split("/"),d=l.split("/");u.pop();for(let p of d)p!=="."&&(p===".."?u.pop():u.push(p));return`url(${c}${u.join("/")}${c})`})}var cC=/^[^ \t\n\r\u000c]+/,uC=/^[, \t\n\r\u000c]+/;function dC(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,a=i.exec(t.substring(r));return a?(s=a[0],r+=s.length,s):""}let o=[];for(;n(uC),!(r>=t.length);){let i=n(cC);if(i.slice(-1)===",")i=Li(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Li(e,i);let a=!1;for(;;){let l=t.charAt(r);if(l===""){o.push((i+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,o.push((i+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return o.join(", ")}var Zy=new WeakMap;function Li(e,t){return!t||t.trim()===""?t:nu(e,t)}function pC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function nu(e,t){let r=Zy.get(e);if(r||(r=e.createElement("a"),Zy.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function b_(e,t,r,n,o,i,s){if(!n)return n;if(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#"))return Li(e,n);if(r==="xlink:href"&&n[0]!=="#")return Li(e,n);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Li(e,n);if(r==="srcset")return dC(e,n);if(r==="style"){let a=jc(n,nu(e));return s&&s.size>0&&(a=lC(a,s)),a}else if(t==="object"&&r==="data")return Li(e,n);return typeof i=="function"?i(r,n,o):n}function k_(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function fC(e,t,r,n){try{if(n&&e.matches(n))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function mC(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}function Uo(e,t,r=1/0,n=0){return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:Uo(e.parentNode,t,r,n+1)}function Oi(e,t){return r=>{let n=r;if(n===null)return!1;try{if(e){if(typeof e=="string"){if(n.matches(`.${e}`))return!0}else if(mC(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function Bi(e,t,r,n,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let c=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(c))return!0}let a=-1,l=-1;if(i){if(l=Uo(s,Oi(n,o)),l<0)return!0;a=Uo(s,Oi(t,r),l>=0?l:1/0)}else{if(a=Uo(s,Oi(t,r)),a<0)return!1;l=Uo(s,Oi(n,o),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function gC(e,t,r){let n=QR(e);if(!n)return;let o=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let a=bf(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{E_(a),o=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return bf(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function hC(e,t,r){let n=!1,o;try{o=e.sheet}catch{o=null}if(o)return;let i=bf(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{E_(i),n=!0,t()})}function SC(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:y,maskInputFn:k,dataURLOptions:g={},inlineImages:S,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:C=!1,ignoreCSSAttributes:R}=t,_=vC(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Fe.Document,childNodes:[],compatMode:e.compatMode}:{type:Fe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Fe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return _C(e,{doc:r,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:k,dataURLOptions:g,inlineImages:S,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:C,rootId:_,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:R});case e.TEXT_NODE:return yC(e,{doc:r,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:y,maskInputOptions:h,maskInputFn:k,rootId:_});case e.CDATA_SECTION_NODE:return{type:Fe.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:Fe.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}function vC(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function yC(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:l,maskInputFn:c,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,p=e.textContent,f=d==="STYLE"?!0:void 0,h=d==="SCRIPT"?!0:void 0,y=d==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=zc(e.parentNode.sheet))}catch(g){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${g}`,e)}p=jc(p,nu(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");let k=Bi(e,n,i,o,s,r);if(!f&&!h&&!y&&p&&k&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),y&&p&&(l.textarea||k)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p){let g=ru({type:null,tagName:d,maskInputOptions:l});p=ya({isMasked:Bi(e,n,i,o,s,g),element:e,value:p,maskInputFn:c})}return{type:Fe.Text,textContent:p||"",isStyle:f,rootId:u}}function _C(e,t){let{doc:r,blockClass:n,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:c,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:y,maskTextClass:k,unmaskTextClass:g,maskTextSelector:S,unmaskTextSelector:v,ignoreCSSAttributes:E}=t,C=fC(e,n,o,i),R=rC(e),_={},w=e.attributes.length;for(let I=0;I<w;I++){let P=e.attributes[I];P.name&&!k_(R,P.name,P.value)&&(_[P.name]=b_(r,R,Ui(P.name),P.value,e,l,E))}if(R==="link"&&s){let I=Array.from(r.styleSheets).find(W=>W.href===e.href),P=null;I&&(P=zc(I)),P&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=jc(P,I.href))}if(R==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let I=zc(e.sheet);I&&(_._cssText=jc(I,nu(r)))}if(R==="input"||R==="textarea"||R==="select"||R==="option"){let I=e,P=Kf(I),W=Wc(I,Tf(R),P),K=I.checked;if(P!=="submit"&&P!=="button"&&W){let V=Bi(I,k,S,g,v,ru({type:P,tagName:Tf(R),maskInputOptions:a}));_.value=ya({isMasked:V,element:I,value:W,maskInputFn:c})}K&&(_.checked=K)}if(R==="option"&&(e.selected&&!a.select?_.selected=!0:delete _.selected),R==="canvas"&&p){if(e.__context==="2d")ZR(e)||(_.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let I=e.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=e.width,P.height=e.height;let W=P.toDataURL(u.type,u.quality);I!==W&&(_.rr_dataURL=I)}}if(R==="img"&&d){Ni||(Ni=r.createElement("canvas"),Jy=Ni.getContext("2d"));let I=e,P=I.currentSrc||I.getAttribute("src")||"<unknown-src>",W=I.crossOrigin,K=()=>{I.removeEventListener("load",K);try{Ni.width=I.naturalWidth,Ni.height=I.naturalHeight,Jy.drawImage(I,0,0),_.rr_dataURL=Ni.toDataURL(u.type,u.quality)}catch(V){if(I.crossOrigin!=="anonymous"){I.crossOrigin="anonymous",I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K);return}else console.warn(`Cannot inline img src=${P}! Error: ${V}`)}I.crossOrigin==="anonymous"&&(W?_.crossOrigin=W:I.removeAttribute("crossorigin"))};I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K)}if((R==="audio"||R==="video")&&(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),C){let{width:I,height:P}=e.getBoundingClientRect();_={class:_.class,rr_width:`${I}px`,rr_height:`${P}px`}}R==="iframe"&&!f(_.src)&&(!C&&!T_(e)&&(_.rr_src=_.src),delete _.src);let z;try{customElements.get(R)&&(z=!0)}catch{}return{type:Fe.Element,tagName:R,attributes:_,childNodes:[],isSVG:pC(e)||void 0,needBlock:C,rootId:y,isCustom:z}}function ge(e){return e==null?"":e.toLowerCase()}function EC(e,t){if(t.comment&&e.type===Fe.Comment)return!0;if(e.type===Fe.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"&&y_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ge(e.attributes.name)==="application-name"||ge(e.attributes.rel)==="icon"||ge(e.attributes.rel)==="apple-touch-icon"||ge(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||ge(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ge(e.attributes.name)==="robots"||ge(e.attributes.name)==="googlebot"||ge(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ge(e.attributes.name)==="author"||ge(e.attributes.name)==="generator"||ge(e.attributes.name)==="framework"||ge(e.attributes.name)==="publisher"||ge(e.attributes.name)==="progid"||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ge(e.attributes.name)==="google-site-verification"||ge(e.attributes.name)==="yandex-verification"||ge(e.attributes.name)==="csrf-token"||ge(e.attributes.name)==="p:domain_verify"||ge(e.attributes.name)==="verify-v1"||ge(e.attributes.name)==="verification"||ge(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pi(e,t){let{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w=5e3,onBlockedImageLoad:z,onStylesheetLoad:I,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:W=()=>!1,newlyAddedElement:K=!1,ignoreCSSAttributes:V}=t,{preserveWhiteSpace:Pe=!0}=t,ue=SC(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,dataURLOptions:v,inlineImages:E,recordCanvas:C,keepIframeSrcFn:W,newlyAddedElement:K,ignoreCSSAttributes:V});if(!ue)return console.warn(e,"not serialized"),null;let fe;n.hasNode(e)?fe=n.getId(e):EC(ue,S)||!Pe&&ue.type===Fe.Text&&!ue.isStyle&&!ue.textContent.trim().length?fe=_a:fe=Xf();let L=Object.assign(ue,{id:fe});if(n.add(e,L),fe===_a)return null;R&&R(e);let b=!p;if(L.type===Fe.Element){b=b&&!L.needBlock;let x=e.shadowRoot;x&&Sa(x)&&(L.isShadowHost=!0)}if((L.type===Fe.Document||L.type===Fe.Element)&&b){S.headWhitespace&&L.type===Fe.Element&&L.tagName==="head"&&(Pe=!1);let x={doc:r,mirror:n,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onBlockedImageLoad:z,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V},A=e.childNodes?Array.from(e.childNodes):[];for(let oe of A){let J=Pi(oe,x);J&&L.childNodes.push(J)}if(jR(e)&&e.shadowRoot)for(let oe of Array.from(e.shadowRoot.childNodes)){let J=Pi(oe,x);J&&(Sa(e.shadowRoot)&&(J.isShadow=!0),L.childNodes.push(J))}}if(e.parentNode&&ha(e.parentNode)&&Sa(e.parentNode)&&(L.isShadow=!0),L.type===Fe.Element&&L.tagName==="iframe"&&!L.needBlock&&gC(e,()=>{let x=T_(e);if(x&&_){let A=Pi(x,{doc:x,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V});A&&_(e,A)}},w),L.type===Fe.Element&&L.tagName==="img"&&!e.complete&&L.needBlock){let x=e,A=()=>{if(x.isConnected&&!x.complete&&z)try{let oe=x.getBoundingClientRect();oe.width>0&&oe.height>0&&z(x,L,oe)}catch{}x.removeEventListener("load",A)};x.isConnected&&x.addEventListener("load",A)}return L.type===Fe.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&y_(L.attributes.href)==="css")&&hC(e,()=>{if(I){let x=Pi(e,{doc:r,mirror:n,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:l,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S,dataURLOptions:v,inlineImages:E,recordCanvas:C,preserveWhiteSpace:Pe,onSerialize:R,onIframeLoad:_,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:P,keepIframeSrcFn:W,ignoreCSSAttributes:V});x&&I(e,x)}},P),L.type===Fe.Element&&delete L.needBlock,L}function TC(e,t){let{mirror:r=new $c,blockClass:n="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOM:S=!1,dataURLOptions:v,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:_,onBlockedImageLoad:w,onStylesheetLoad:z,stylesheetLoadTimeout:I,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:W=new Set([])}=t||{};return Pi(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:h===!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}:h===!1?{}:h,maskAttributeFn:y,maskTextFn:k,maskInputFn:g,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:_,onBlockedImageLoad:w,onStylesheetLoad:z,stylesheetLoadTimeout:I,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:W})}function bt(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Ai=`Please stop import mirror directly. Instead of that,\r
|
|
29
29
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
30
|
-
or you can use record.mirror to access the mirror instance during recording.`,Zv={map:{},getId(){return console.error(Ci),-1},getNode(){return console.error(Ci),null},removeNodeFromMap(){console.error(Ci)},has(){return console.error(Ci),!1},reset(){console.error(Ci)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zv=new Proxy(Zv,{get(e,t,r){return t==="map"&&console.error(Ci),Reflect.get(e,t,r)}}));function Ea(e,t,r={}){let n=null,o=0;return function(...i){let s=Date.now();!o&&r.leading===!1&&(o=s);let a=t-(s-o),l=this;a<=0||a>t?(n&&(kN(n),n=null),o=s,e.apply(l,i)):!n&&r.trailing!==!1&&(n=ou(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(l,i)},a))}}function x_(e,t,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(s){ou(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>x_(e,t,i||{},!0)}function Jf(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var Gc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gc=()=>new Date().getTime());function k_(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function w_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function R_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function N_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function zt(e,t,r,n,o){if(!e)return!1;let i=N_(e);if(!i)return!1;let s=Li(t,r);if(!o){let c=n&&i.matches(n);return s(i)&&!c}let a=Do(i,s),l=-1;return a<0?!1:(n&&(l=Do(i,Li(null,n))),a>-1&&l<0?!0:a<l)}function EN(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===_a}function C_(e,t){if(ga(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?C_(e.parentNode,t):!0:!0}function If(e){return!!e.changedTouches}function TN(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 r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function A_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function M_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xf(e){return!!e?.shadowRoot}var kf=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function L_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function bN(e){let t=e,r;for(;r=L_(t);)t=r;return t}function IN(e){let t=e.ownerDocument;if(!t)return!1;let r=bN(e);return t.contains(r)}function O_(e){let t=e.ownerDocument;return t?t.contains(e)||IN(e):!1}var e_={};function Qf(e){let t=e_[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return e_[e]=n.bind(window)}function xN(...e){return Qf("requestAnimationFrame")(...e)}function ou(...e){return Qf("setTimeout")(...e)}function kN(...e){return Qf("clearTimeout")(...e)}var W=(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))(W||{}),z=(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))(z||{}),St=(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))(St||{}),dn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(dn||{}),Ai=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ai||{}),ya;function wN(e){ya=e}function RN(){ya=void 0}var Q=e=>ya?((...r)=>{try{return e(...r)}catch(n){if(ya&&ya(n)===!0)return()=>{};throw n}}):e,t_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ma=0;ma<t_.length;ma++)NN[t_.charCodeAt(ma)]=ma;var ma,Vc=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Zf(e){try{return e.contentDocument}catch{}}function Ta(e){try{return e.contentWindow}catch{}}var wf=class{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{let r=new CSSStyleSheet;r.replaceSync(`x { ${t} }`);let n=r.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(t){let r=this.getUnattachedDoc().createElement("span");return r.setAttribute("style",t),r.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function r_(e){return"__ln"in e}var Rf=class{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 r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&r_(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&r_(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},n_=(e,t)=>`${e}@${t}`,Nf=class{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;let t=[],r=new Set,n=new Rf,o=l=>{let c=l,u=_a;for(;u===_a;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=l=>{if(!l.parentNode||!O_(l))return;let c=ga(l.parentNode)?this.mirror.getId(L_(l)):this.mirror.getId(l.parentNode),u=o(l);if(c===-1||u===-1)return n.addNode(l);let d=Oi(l,{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:p=>{A_(p,this.mirror)&&!zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),M_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),xf(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(zt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);let h=Ta(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:y})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${y}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)o_(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(let l of this.addedSet)!i_(this.droppedSet,l)&&!o_(this.removes,l,this.mirror)||i_(this.movedSet,l)?i(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let c=this.mirror.getId(s.value.parentNode),u=o(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let d=this.mirror.getId(u.value.parentNode);if(o(u.value)===-1)continue;if(d!==-1){l=u;break}else{let f=u.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){l=u;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),i(l.value)}let a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:c}=l;if(typeof c.style=="string"){let u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Sf(t.target,this.mirror))switch(t.type){case"characterData":{let r=t.target.textContent;!zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Ui(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,N_(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,o=t.target.getAttribute(n);if(n==="value"){let s=Kf(r),a=r.tagName;o=jc(r,a,s);let l=ru({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=Ui(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);o=va({isMasked:c,element:r,value:o,maskInputFn:this.maskInputFn})}if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(o))if(!Zf(r))n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!I_(r.tagName,n)&&(i.attributes[n]=b_(this.doc,Pi(r.tagName),Pi(n),o,r,this.maskAttributeFn),n==="style")){let s=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(let a of Array.from(r.style)){let l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);l!==(s?.getPropertyValue(a)||"")||c!==(s?.getPropertyPriority(a)||"")?c===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,c]:i._unchangedStyles[a]=[l,c]}if(s)for(let a of Array.from(s))r.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),o=ga(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);zt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(r,this.mirror)||!EN(r,this.mirror)||(this.addedSet.has(r)?(Cf(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||C_(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[n_(n,o)]?Cf(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ga(t.target)&&Sa(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Sf(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[n_(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);zt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(n=>this.genAdds(n)),xf(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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","ignoreCSSAttributes"].forEach(r=>{this[r]=t[r]}),this.styleDeclarationParser=new wf(this.doc)}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 Cf(e,t){e.delete(t),t.childNodes?.forEach(r=>Cf(e,r))}function o_(e,t,r){return e.length===0?!1:CN(e,t,r)}function CN(e,t,r){let n=t.parentNode;for(;n;){let o=r.getId(n);if(e.some(i=>i.id===o))return!0;n=n.parentNode}return!1}function i_(e,t){return e.size===0?!1:D_(e,t)}function D_(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:D_(e,r):!1}var Di=[];function wa(e){try{if("composedPath"in e){let 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 P_(e,t){let r=new Nf;Di.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(n=window[o]);let i=new n(Q(s=>{e.onMutation&&e.onMutation(s)===!1||r.processMutations.bind(r)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function AN({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,l=Ea(Q(d=>{let p=Date.now()-a;e(s.map(f=>(f.timeOffset-=p,f)),d),s=[],a=null}),i),c=Q(Ea(Q(d=>{let p=wa(d),{clientX:f,clientY:h}=If(d)?d.changedTouches[0]:d;a||(a=Gc()),s.push({x:f,y:h,id:n.getId(p),timeOffset:Gc()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?z.Drag:d instanceof MouseEvent?z.MouseMove:z.TouchMove)}),o,{trailing:!1})),u=[yt("mousemove",c,r),yt("touchmove",c,r),yt("drag",c,r)];return Q(()=>{u.forEach(d=>d())})}function MN({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],c=null,u=d=>p=>{let f=wa(p);if(zt(f,n,o,i,!0))return;let h=null,y=d;if("pointerType"in p){switch(p.pointerType){case"mouse":h=dn.Mouse;break;case"touch":h=dn.Touch;break;case"pen":h=dn.Pen;break}h===dn.Touch?St[d]===St.MouseDown?y="TouchStart":St[d]===St.MouseUp&&(y="TouchEnd"):dn.Pen}else If(p)&&(h=dn.Touch);h!==null?(c=h,(y.startsWith("Touch")&&h===dn.Touch||y.startsWith("Mouse")&&h===dn.Mouse)&&(h=null)):St[d]===St.Click&&(h=c,c=null);let E=If(p)?p.changedTouches[0]:p;if(!E)return;let m=r.getId(f),{clientX:g,clientY:v}=E;Q(e)({type:St[y],id:m,x:g,y:v,...h!==null&&{pointerType:h}})};return Object.keys(St).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Pi(d),f=u(d);if(window.PointerEvent)switch(St[d]){case St.MouseDown:case St.MouseUp:p=p.replace("mouse","pointer");break;case St.TouchStart:case St.TouchEnd:return}l.push(yt(p,f,t))}),Q(()=>{l.forEach(d=>d())})}function U_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){let a=Q(Ea(Q(l=>{let c=wa(l);if(!c||zt(c,n,o,i,!0))return;let u=r.getId(c);if(c===t&&t.defaultView){let d=k_(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return yt("scroll",a,t)}function LN({viewportResizeCb:e},{win:t}){let r=-1,n=-1,o=Q(Ea(Q(()=>{let i=w_(),s=R_();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return yt("resize",o,t)}var ON=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function DN({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:y}){function E(_){let I=wa(_),j=_.isTrusted,x=I&&Tf(I.tagName);if(x==="OPTION"&&(I=I.parentElement),!I||!x||ON.indexOf(x)<0||zt(I,n,o,i,!0))return;let D=I;if(D.classList.contains(s)||a&&D.matches(a))return;let Y=Kf(I),ee=jc(D,x,Y),G=!1,Be=ru({maskInputOptions:l,tagName:x,type:Y}),ce=Ui(I,p,h,f,y,Be);(Y==="radio"||Y==="checkbox")&&(G=I.checked),ee=va({isMasked:ce,element:I,value:ee,maskInputFn:c}),m(I,d?{text:ee,isChecked:G,userTriggered:j}:{text:ee,isChecked:G});let ye=I.name;Y==="radio"&&ye&&G&&t.querySelectorAll(`input[type="radio"][name="${ye}"]`).forEach(C=>{if(C!==I){let oe=va({isMasked:ce,element:C,value:jc(C,x,Y),maskInputFn:c});m(C,d?{text:oe,isChecked:!G,userTriggered:!1}:{text:oe,isChecked:!G})}})}function m(_,I){let j=s_.get(_);if(!j||j.text!==I.text||j.isChecked!==I.isChecked){s_.set(_,I);let x=r.getId(_);Q(e)({...I,id:x})}}let v=(u.input==="last"?["change"]:["input","change"]).map(_=>yt(_,Q(E),t)),b=t.defaultView;if(!b)return()=>{v.forEach(_=>_())};let k=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&v.push(...w.map(_=>x_(_[0],_[1],{set(){Q(E)({target:this,isTrusted:!1})}},!1,b))),Q(()=>{v.forEach(_=>_())})}function Yc(e){let t=[];function r(n,o){if(Uc("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Uc("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Uc("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Uc("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function Pn(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function PN({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Q((u,d,p)=>{let[f,h]=p,{id:y,styleId:E}=Pn(d,t,r.styleMirror);return(y&&y!==-1||E&&E!==-1)&&e({id:y,styleId:E,adds:[{rule:f,index:h}]}),u.apply(d,p)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,removes:[{index:f}]}),u.apply(d,p)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replace:f}),u.apply(d,p)})}));let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Q((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Pn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replaceSync:f}),u.apply(d,p)})}));let l={};Bc("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(Bc("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),Bc("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),Bc("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:Q((p,f,h)=>{let[y,E]=h,{id:m,styleId:g}=Pn(f.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:y,index:[...Yc(f),E||0]}]}),p.apply(f,h)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:Q((p,f,h)=>{let[y]=h,{id:E,styleId:m}=Pn(f.parentStyleSheet,t,r.styleMirror);return(E&&E!==-1||m&&m!==-1)&&e({id:E,styleId:m,removes:[{index:[...Yc(f),y]}]}),p.apply(f,h)})})}),Q(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function B_({mirror:e,stylesheetManager:t},r){let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);let o=r.nodeName==="#document"?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!o||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(n!==null&&n!==-1)try{t.adoptStyleSheets(s,n)}catch{}return a}}),Q(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function UN({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Q((a,l,c)=>{let[u,d,p]=c;if(r.has(u))return i.apply(l,[u,d,p]);let{id:f,styleId:h}=Pn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:u,value:d,priority:p},index:Yc(l.parentRule)}),a.apply(l,c)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:Q((a,l,c)=>{let[u]=c;if(r.has(u))return s.apply(l,[u]);let{id:d,styleId:p}=Pn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:u},index:Yc(l.parentRule)}),a.apply(l,c)})}),Q(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function BN({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:o,sampling:i,doc:s}){let a=Q(c=>Ea(Q(u=>{let d=wa(u);if(!d||zt(d,t,r,n,!0))return;let{currentTime:p,volume:f,muted:h,playbackRate:y}=d;e({type:c,id:o.getId(d),currentTime:p,volume:f,muted:h,playbackRate:y})}),i.media||500)),l=[yt("play",a(Ai.Play),s),yt("pause",a(Ai.Pause),s),yt("seeked",a(Ai.Seeked),s),yt("volumechange",a(Ai.VolumeChange),s),yt("ratechange",a(Ai.RateChange),s)];return Q(()=>{l.forEach(c=>c())})}function FN({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let s=Jf(t.fonts,"add",function(a){return function(l){return ou(Q(()=>{let c=o.get(l);c&&(e(c),o.delete(l))}),0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=i}),n.push(s),Q(()=>{n.forEach(a=>a())})}function HN(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,l=Q(()=>{let c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;let u=[],d=c.rangeCount||0;for(let p=0;p<d;p++){let f=c.getRangeAt(p),{startContainer:h,startOffset:y,endContainer:E,endOffset:m}=f;zt(h,n,o,i,!0)||zt(E,n,o,i,!0)||u.push({start:r.getId(h),startOffset:y,end:r.getId(E),endOffset:m})}s({ranges:u})});return l(),yt("selectionchange",l)}function zN({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Jf(r.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function $N(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=P_(e,e.doc));let o=AN(e),i=MN(e),s=U_(e),a=LN(e,{win:r}),l=DN(e),c=BN(e),u=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(u=PN(e,{win:r}),d=B_(e,e.doc),p=UN(e,{win:r}),e.collectFonts&&(f=FN(e)));let h=HN(e),y=zN(e),E=[];for(let m of e.plugins)E.push(m.observer(m.callback,r,m.options));return Q(()=>{Di.forEach(m=>m.reset()),n?.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),p(),f(),h(),y(),E.forEach(m=>m())})}function Uc(e){return typeof window[e]<"u"}function Bc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ba=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){let i=n||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(r);return a||(a=this.generateIdFn(),i.set(r,a),s.set(a,r)),a}getIds(t,r){let n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,o))}getRemoteId(t,r,n){let o=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=o.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},Af=class{constructor(){this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Mf=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(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);let r=Ta(t);r&&this.crossOriginIframeMap.set(r,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&Ta(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let n=Zf(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){switch(r.type){case W.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:W.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case W.Meta:case W.Load:case W.DomContentLoaded:return!1;case W.Plugin:return r;case W.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case W.IncrementalSnapshot:switch(r.data.source){case z.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o)}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case z.Drag:case z.TouchMove:case z.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(r.data,t,["id"]),r;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case z.Font:return r;case z.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case z.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),r.data.styles?.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),r}}return!1}replace(t,r,n,o){for(let i of o)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Pe.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Lf=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Of=class{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,r){if(!Sa(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let n=P_({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(U_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ou(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(B_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let r=Zf(t),n=Ta(t);!r||!n||this.patchAttachShadow(n.Element,r)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(Jf(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&O_(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Df=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new kf,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:y_(a),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Pf=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,xN(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Ae,qc;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var br=KR();function Ir(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:y,maskInputOptions:E,slimDOMOptions:m,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,maxCanvasSize:k=null,packFn:w,sampling:_={},dataURLOptions:I={},mousemoveWait:j,recordDOM:x=!0,recordCanvas:D=!1,recordCrossOriginIframes:Y=!1,recordAfter:ee=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:Be=!1,inlineImages:ce=!1,plugins:ye,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:$,onMutation:q,getCanvasManager:pe}=e;wN($);let fe=Y?window.parent===window:!0,Pt=!1;if(!fe)try{window.parent.document&&(Pt=!1)}catch{Pt=!0}if(fe&&!t)throw new Error("emit function is required");if(!fe&&!Pt)return()=>{};j!==void 0&&_.mousemove===void 0&&(_.mousemove=j),br.reset();let pr=y===!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}:E!==void 0?E:{},Lr=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||{};TN();let Kr,so=0,Ss=re=>{for(let fr of ye||[])fr.eventProcessor&&(re=fr.eventProcessor(re));return w&&!Pt&&(re=w(re)),re};Ae=(re,fr)=>{let K=re;if(K.timestamp=Gc(),Di[0]?.isFrozen()&&K.type!==W.FullSnapshot&&!(K.type===W.IncrementalSnapshot&&K.data.source===z.Mutation)&&Di.forEach(Ye=>Ye.unfreeze()),fe)t?.(Ss(K),fr);else if(Pt){let Ye={type:"rrweb",event:Ss(K),origin:window.location.origin,isCheckout:fr};window.parent.postMessage(Ye,"*")}if(K.type===W.FullSnapshot)Kr=K,so=0;else if(K.type===W.IncrementalSnapshot){if(K.data.source===z.Mutation&&K.data.isAttachIframe)return;so++;let Ye=n&&so>=n,X=r&&Kr&&K.timestamp-Kr.timestamp>r;(Ye||X)&&Pd(!0)}};let ao=re=>{Ae({type:W.IncrementalSnapshot,data:{source:z.Mutation,...re}})},Pg=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.Scroll,...re}}),RI=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.CanvasMutation,...re}}),NI=re=>Ae({type:W.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...re}}),lo=new Df({mutationCb:ao,adoptedStyleSheetCb:NI}),co=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Af:new Mf({mirror:br,mutationCb:ao,stylesheetManager:lo,recordCrossOriginIframes:Y,wrappedEmit:Ae});for(let re of ye||[])re.getMirror&&re.getMirror({nodeMirror:br,crossOriginIframeMirror:co.crossOriginIframeMirror,crossOriginIframeStyleMirror:co.crossOriginIframeStyleMirror});let Od=new Pf,Dd=WN(pe,{mirror:br,win:window,mutationCb:re=>Ae({type:W.IncrementalSnapshot,data:{source:z.CanvasMutation,...re}}),recordCanvas:D,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:k,sampling:_.canvas,dataURLOptions:I,errorHandler:$}),kl=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lf:new Of({mutationCb:ao,scrollCb:Pg,bypassOptions:{onMutation:q,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:pr,dataURLOptions:I,maskAttributeFn:g,maskTextFn:b,maskInputFn:v,recordCanvas:D,inlineImages:ce,sampling:_,slimDOMOptions:Lr,iframeManager:co,stylesheetManager:lo,canvasManager:Dd,keepIframeSrcFn:C,processedNodeManager:Od,ignoreCSSAttributes:oe},mirror:br}),Pd=(re=!1)=>{if(!x)return;Ae({type:W.Meta,data:{href:window.location.href,width:R_(),height:w_()}},re),lo.reset(),kl.init(),Di.forEach(K=>K.lock());let fr=_N(document,{mirror:br,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:pr,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,slimDOM:Lr,dataURLOptions:I,recordCanvas:D,inlineImages:ce,onSerialize:K=>{A_(K,br)&&co.addIframe(K),M_(K,br)&&lo.trackLinkElement(K),xf(K)&&kl.addShadowRoot(K.shadowRoot,document)},onIframeLoad:(K,Ye)=>{co.attachIframe(K,Ye);let X=Ta(K);X&&Dd.addWindow(X),kl.observeAttachShadow(K)},onStylesheetLoad:(K,Ye)=>{lo.attachLinkElement(K,Ye)},onBlockedImageLoad:(K,Ye,{width:X,height:ys})=>{ao({adds:[],removes:[],texts:[],attributes:[{id:Ye.id,attributes:{style:{width:`${X}px`,height:`${ys}px`}}}]})},keepIframeSrcFn:C,ignoreCSSAttributes:oe});if(!fr)return console.warn("Failed to snapshot the document");Ae({type:W.FullSnapshot,data:{node:fr,initialOffset:k_(window)}}),Di.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&lo.adoptStyleSheets(document.adoptedStyleSheets,br.getId(document))};qc=Pd;try{let re=[],fr=Ye=>Q($N)({onMutation:q,mutationCb:ao,mousemoveCb:(X,ys)=>Ae({type:W.IncrementalSnapshot,data:{source:ys,positions:X}}),mouseInteractionCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.MouseInteraction,...X}}),scrollCb:Pg,viewportResizeCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.ViewportResize,...X}}),inputCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.Input,...X}}),mediaInteractionCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.MediaInteraction,...X}}),styleSheetRuleCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.StyleSheetRule,...X}}),styleDeclarationCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.StyleDeclaration,...X}}),canvasMutationCb:RI,fontCb:X=>Ae({type:W.IncrementalSnapshot,data:{source:z.Font,...X}}),selectionCb:X=>{Ae({type:W.IncrementalSnapshot,data:{source:z.Selection,...X}})},customElementCb:X=>{Ae({type:W.IncrementalSnapshot,data:{source:z.CustomElement,...X}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:pr,inlineStylesheet:h,sampling:_,recordDOM:x,recordCanvas:D,inlineImages:ce,userTriggeredOnInput:G,collectFonts:Be,doc:Ye,maskAttributeFn:g,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:C,blockSelector:i,unblockSelector:s,slimDOMOptions:Lr,dataURLOptions:I,mirror:br,iframeManager:co,stylesheetManager:lo,shadowDomManager:kl,processedNodeManager:Od,canvasManager:Dd,ignoreCSSAttributes:oe,plugins:ye?.filter(X=>X.observer)?.map(X=>({observer:X.observer,options:X.options,callback:ys=>Ae({type:W.Plugin,data:{plugin:X.name,payload:ys}})}))||[]},{});co.addLoadListener(Ye=>{try{re.push(fr(Ye.contentDocument))}catch(X){console.warn(X)}});let K=()=>{Pd(),re.push(fr(document))};return document.readyState==="interactive"||document.readyState==="complete"?K():(re.push(yt("DOMContentLoaded",()=>{Ae({type:W.DomContentLoaded,data:{}}),ee==="DOMContentLoaded"&&K()})),re.push(yt("load",()=>{Ae({type:W.Load,data:{}}),ee==="load"&&K()},window))),()=>{re.forEach(Ye=>Ye()),Od.destroy(),qc=void 0,RN()}}catch(re){console.warn(re)}}function jN(e){if(!qc)throw new Error("please take full snapshot after start recording");qc(e)}Ir.mirror=br;Ir.takeFullSnapshot=jN;function WN(e,t){try{return e?e(t):new Vc}catch{return console.warn("Unable to initialize CanvasManager"),new Vc}}var a_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(a_||(a_={}));var GN=3,VN=5;function em(e){return e>9999999999?e:e*1e3}function yf(e){return e>9999999999?e/1e3:e}function Ra(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:W.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ot(t,10,1e3)}}),t.category==="console")))}var YN="button,a";function F_(e){return e.closest(YN)||e}function H_(e){let t=z_(e);return!t||!(t instanceof Element)?t:F_(t)}function z_(e){return qN(e)?e.target:e}function qN(e){return typeof e=="object"&&!!e&&"target"in e}var Un;function KN(e){return Un||(Un=[],XN()),Un.push(e),()=>{let t=Un?Un.indexOf(e):-1;t>-1&&Un.splice(t,1)}}function XN(){Ne(he,"open",function(e){return function(...t){if(Un)try{Un.forEach(r=>r())}catch{}return e.apply(he,t)}})}var JN=new Set([z.Mutation,z.StyleSheetRule,z.StyleDeclaration,z.AdoptedStyleSheet,z.CanvasMutation,z.Selection,z.MediaInteraction]);function QN(e,t,r){e.handleClick(t,r)}var Uf=class{constructor(t,r,n=Ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scrollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let t=KN(()=>{this._lastMutation=l_()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(eC(r,this._ignoreSelector)||!tC(t))return;let n={timestamp:yf(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(o=>o.node===n.node&&Math.abs(o.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=yf(t)}registerScroll(t=Date.now()){this._lastScroll=yf(t)}registerClick(t){let r=F_(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){let t=[],r=l_();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(let n of t){let o=this._clicks.indexOf(n);o>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(r,u);return}if(s>1){let l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(r,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Oo(()=>this._checkClicks(),1e3)}},ZN=["A","BUTTON","INPUT"];function eC(e,t){return!!(!ZN.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 tC(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function l_(){return Date.now()/1e3}function rC(e,t){try{if(!nC(t))return;let{source:r}=t.data;if(JN.has(r)&&e.registerMutation(t.timestamp),r===z.Scroll&&e.registerScroll(t.timestamp),oC(t)){let{type:n,id:o}=t.data,i=Ir.mirror.getNode(o);i instanceof HTMLElement&&n===St.Click&&e.registerClick(i)}}catch{}}function nC(e){return e.type===GN}function oC(e){return e.data.source===z.MouseInteraction}function zr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var iu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(iu||{}),iC=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function sC(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let r in e)if(iC.has(r)){let n=r;(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}var aC=e=>t=>{if(!e.isEnabled())return;let r=lC(t);if(!r)return;let n=t.name==="click",o=n?t.event:void 0;n&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&QN(e.clickDetector,r,H_(t.event)),Ra(e,r)};function $_(e,t){let r=Ir.mirror.getId(e),n=r&&Ir.mirror.getNode(r),o=n&&Ir.mirror.getMeta(n),i=o&&uC(o)?o:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===iu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:sC(i.attributes)}}:{}}}function lC(e){let{target:t,message:r}=cC(e);return zr({category:`ui.${e.name}`,...$_(t,r)})}function cC(e){let t=e.name==="click",r,n=null;try{n=t?H_(e.event):z_(e.event),r=le(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function uC(e){return e.type===iu.Element}function dC(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=pC(t);r&&Ra(e,r)}function pC(e){let{metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i,target:s}=e;if(!s||fC(s)||!i)return null;let a=t||n||o,l=i.length===1;if(!a&&l)return null;let c=le(s,{maxStringLength:200})||"<unknown>",u=$_(s,c);return zr({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i}})}function fC(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var mC={resource:vC,paint:SC,navigation:yC};function vf(e,t){return({metric:r})=>{t.replayPerformanceEntries.push(e(r))}}function hC(e){return e.map(gC).filter(Boolean)}function gC(e){let t=mC[e.entryType];return t?t(e):null}function Bi(e){return((ue()||he.performance.timeOrigin)+e)/1e3}function SC(e){let{duration:t,entryType:r,name:n,startTime:o}=e,i=Bi(o);return{type:r,name:n,start:i,end:i+t,data:void 0}}function yC(e){let{entryType:t,name:r,decodedBodySize:n,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:y}=e;return o===0?null:{type:`${t}.${y}`,start:Bi(f),end:Bi(i),name:r,data:{size:h,decodedBodySize:n,encodedBodySize:s,duration:o,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:p}}}function vC(e){let{entryType:t,initiatorType:r,name:n,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:Bi(i),end:Bi(o),name:n,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function _C(e){let t=e.entries[e.entries.length-1],r=t?.element?[t.element]:void 0;return tm(e,"largest-contentful-paint",r)}function EC(e){return e.sources!==void 0}function TC(e){let t=[],r=[];for(let n of e.entries)if(EC(n)){let o=[];for(let i of n.sources)if(i.node){r.push(i.node);let s=Ir.mirror.getId(i.node);s&&o.push(s)}t.push({value:n.value,nodeIds:o.length?o:void 0})}return tm(e,"cumulative-layout-shift",r,t)}function bC(e){let t=e.entries[e.entries.length-1],r=t?.target?[t.target]:void 0;return tm(e,"interaction-to-next-paint",r)}function tm(e,t,r,n){let o=e.value,i=e.rating,s=Bi(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:r?r.map(a=>Ir.mirror.getId(a)):void 0,attributions:n}}}function IC(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function r({entries:o}){o.forEach(t)}let n=[];return["navigation","paint","resource"].forEach(o=>{n.push(Er(o,r))}),n.push(an(vf(_C,e)),sn(vf(TC,e)),Co(vf(bC,e))),()=>{n.forEach(o=>o())}}var F=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xC='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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,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=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,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[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,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[s[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=w,P=p,Q=y,R=g;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,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-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(s[t]^s[t+1]<<A^s[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||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[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|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function kC(){let e=new Blob([xC]);return URL.createObjectURL(e)}var c_=["log","warn","error"],Hc="[Replay] ";function _f(e,t="info"){Ht({category:"console",data:{logger:"replay"},level:t,message:`${Hc}${e}`},{level:t})}function wC(){let e=!1,t=!1,r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return F?(c_.forEach(n=>{r[n]=(...o)=>{T[n](Hc,...o),t&&_f(o.join(""),_i(n))}}),r.exception=(n,...o)=>{o.length&&r.error&&r.error(...o),T.error(Hc,n),e?rn(n,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&_f(n,"error")},r.infoTick=(...n)=>{T.log(Hc,...n),t&&setTimeout(()=>_f(n[0]),0)}):c_.forEach(n=>{r[n]=()=>{}}),r}var H=wC(),Ia=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qf}.`)}},Kc=class{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){let r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>qf)throw new Ia;this.events.push(t)}finish(){return new Promise(t=>{let r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(let{timestamp:r}of this.events)(t===null||r<t)&&(t=r);return t===null?t:em(t)}},Bf=class{constructor(t){this._onMessage=({data:r})=>{let n=r;if(typeof n.id!="number")return;let o=this._pending.get(n.id);if(!(!o||o.method!==n.method)){if(this._pending.delete(n.id),!n.success){F&&H.error("Error in compression worker: ",n.response),o.reject(new Error("Error in compression worker"));return}o.resolve(n.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():(F&&H.warn("Received worker message with unsuccessful status",n),r(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{F&&H.warn("Failed to load Replay compression worker",n),r(new Error(`Failed to load Replay compression worker: ${n instanceof ErrorEvent&&n.message?n.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){F&&H.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,r){let n=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(n,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:n,method:t,arg:r})}catch(s){this._pending.delete(n),i(s)}})}_getAndIncrementId(){return this._id++}},Ff=class{constructor(t){this._worker=new Bf(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){let r=em(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);let n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>qf?Promise.reject(new Ia):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{F&&H.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},Hf=class{constructor(t){this._fallback=new Kc,this._compression=new Ff(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){F&&H.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:r,waitForCheckout:n}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=r,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){F&&H.exception(i,"Failed to add events when switching buffers.")}}};function RC({useCompression:e,workerUrl:t}){if(e&&window.Worker){let r=NC(t);if(r)return r}return F&&H.log("Using simple buffer"),new Kc}function NC(e){try{let t=e||CC();if(!t)return;F&&H.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new Hf(r)}catch(t){F&&H.exception(t,"Failed to create compression worker")}}function CC(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?kC():""}function rm(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function AC(e){MC(),e.session=void 0}function MC(){if(rm())try{he.sessionStorage.removeItem(Vf)}catch{}}function j_(e){return e===void 0?!1:Math.random()<e}function su(e){if(rm())try{he.sessionStorage.setItem(Vf,JSON.stringify(e))}catch{}}function W_(e){let t=Date.now(),r=e.id||Ce(),n=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:r,started:n,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a,dirty:l}}function LC(e,t){return j_(e)?"session":t?"buffer":!1}function u_({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let o=LC(e,t),i=W_({sampled:o,previousSessionId:n});return r&&su(i),i}function OC(){if(!rm())return null;try{let e=he.sessionStorage.getItem(Vf);if(!e)return null;let t=JSON.parse(e);return F&&H.infoTick("Loading existing session"),W_(t)}catch{return null}}function zf(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function DC(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return zf(e.started,t,n)||zf(e.lastActivity,r,n)}function Xc(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!DC(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function Ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let o=n.stickySession&&OC();return o?Xc(o,{sessionIdleExpire:e,maxReplayDuration:t})?(F&&H.infoTick("Session in sessionStorage is expired, creating new one..."),u_(n,{previousSessionId:o.id})):o:(F&&H.infoTick("Creating new session"),u_(n,{previousSessionId:r}))}function PC(e){return e.type===W.Custom}function nm(e,t,r){return V_(e,t)?(G_(e,t,r),!0):!1}function UC(e,t,r){return V_(e,t)?G_(e,t,r):Promise.resolve(null)}async function G_(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let o=e.recordingMode==="buffer";try{r&&o&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let i=e.getOptions(),s=BC(t,i.beforeAddRecordingEvent);return s?await n.addEvent(s):void 0}catch(i){let s=i&&i instanceof Ia,a=s?"eventBufferOverflow":"eventBufferError",l=M();if(l){let c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&o)return n.clear(),n.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function V_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=em(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(F&&H.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function BC(e,t){try{if(typeof t=="function"&&PC(e))return t(e)}catch(r){return F&&H.exception(r,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function om(e){return!e.type}function $f(e){return e.type==="transaction"}function FC(e){return e.type==="replay_event"}function d_(e){return e.type==="feedback"}function HC(e){return(t,r)=>{if(!e.isEnabled()||!om(t)&&!$f(t))return;let n=r.statusCode;if(!(!n||n<200||n>=300)){if($f(t)){zC(e,t);return}$C(e,t)}}}function zC(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function $C(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||Oo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function jC(e){return t=>{!e.isEnabled()||!om(t)||WC(e,t)}}function WC(e,t){let r=t.exception?.values?.[0]?.value;if(typeof r=="string"&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let n=zr({category:"replay.hydrate-error",data:{url:Rt()}});Ra(e,n)}}function GC(e){let t=M();t&&t.on("beforeAddBreadcrumb",r=>VC(e,r))}function VC(e,t){if(!e.isEnabled()||!Y_(t))return;let r=YC(t);r&&Ra(e,r)}function YC(e){return!Y_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?qC(e):zr(e)}function qC(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return zr(e);let r=!1,n=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Pc?(r=!0,`${o.slice(0,Pc)}\u2026`):o;if(typeof o=="object")try{let i=ot(o,7);return JSON.stringify(i).length>Pc?(r=!0,`${JSON.stringify(i,null,2).slice(0,Pc)}\u2026`):i}catch{}return o});return zr({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Y_(e){return!!e.category}function KC(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Jc(){let e=U().getPropagationContext().dsc;e&&delete e.replay_id;let t=ie();if(t){let r=De(t);delete r.replay_id}}function p_(e){let t=U().getPropagationContext().dsc;t&&(t.replay_id=e);let r=ie();if(r){let n=De(r);n.replay_id=e}}function XC(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:W.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 JC(e,t){return e.recordingMode!=="buffer"||t.message===Yf||!t.exception||t.type?!1:j_(e.getOptions().errorSampleRate)}function QC(e){return Object.assign((t,r)=>{if(e.session&&Xc(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Jc(),!e.isEnabled()||e.isPaused())return t;if(FC(t))return delete t.breadcrumbs,t;if(!om(t)&&!$f(t)&&!d_(t))return t;if(!e.checkAndHandleExpiredSession())return Jc(),t;if(d_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),XC(e,t),t;if(KC(t,r)&&!e.getOptions()._experiments.captureExceptions)return F&&H.log("Ignoring error from rrweb internals",t),null;let o=JC(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&su(s)}return t},{id:"Replay"})}function au(e,t){return t.map(({type:r,start:n,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:W.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function ZC(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function eA(e){return t=>{if(!e.isEnabled())return;let r=ZC(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(au(e,[r]),!1)))}}function tA(e,t){return F&&e.getOptions()._experiments.traceInternals?!1:Np(t,M())}function q_(e,t){e.isEnabled()&&t!==null&&(tA(e,t.name)||e.addUpdate(()=>(au(e,[t]),!0)))}function lu(e){if(!e)return;let 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){let r=Ac(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function K_(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Qc(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function X_(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:o,method:i,statusCode:s,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s,request:a,response:l}}}function xa(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Bn(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:o,warnings:i}=rA(r);return n.body=o,i?.length&&(n._meta={warnings:i}),n}function jf(e,t){return Object.entries(e).reduce((r,[n,o])=>{let i=n.toLowerCase();return t.includes(i)&&e[n]&&(r[i]=o),r},{})}function rA(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Vv,r=nA(e);if(t){let n=e.slice(0,Vv);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function nA(e){let t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Zc(e,t){let r=oA(e);return Ke(r,t)}function oA(e,t=he.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(he.location.origin))return e;let r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;let n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}async function iA(e,t,r){try{let n=await aA(e,t,r),o=X_("resource.fetch",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture fetch breadcrumb")}}function sA(e,t){let{input:r,response:n}=t,o=r?Lc(r):void 0,i=lu(o),s=n?K_(n.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function aA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=Zc(s,r.networkDetailAllowUrls)&&!Zc(s,r.networkDetailDenyUrls),p=d?lA(r,t.input,c):xa(c),f=await cA(d,r,t.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:p,response:f}}function lA({networkCaptureBodies:e,networkRequestHeaders:t},r,n){let o=r?pA(r,t):{};if(!e)return Bn(o,n,void 0);let i=Lc(r),[s,a]=Mc(i,H),l=Bn(o,n,s);return a?Qc(l,a):l}async function cA(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,o){if(!e&&o!==void 0)return xa(o);let i=n?J_(n.headers,r):{};if(!n||!t&&o!==void 0)return Bn(i,o,void 0);let[s,a]=await dA(n),l=uA(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Qc(l,a):l}function uA(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:o}){try{let i=e?.length&&r===void 0?lu(e):r;return n?t?Bn(o,i,e):Bn(o,i,void 0):xa(i)}catch(i){return F&&H.exception(i,"Failed to serialize response body"),Bn(o,r,void 0)}}async function dA(e){let t=fA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await mA(t)]}catch(r){return r instanceof Error&&r.message.indexOf("Timeout")>-1?(F&&H.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(F&&H.exception(r,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function J_(e,t){let r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}function pA(e,t){return e.length===1&&typeof e[0]!="string"?f_(e[0],t):e.length===2?f_(e[1],t):{}}function f_(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?J_(r,t):Array.isArray(r)?{}:jf(r,t):{}}function fA(e){try{return e.clone()}catch(t){F&&H.exception(t,"Failed to clone response body")}}function mA(e){return new Promise((t,r)=>{let n=Oo(()=>r(new Error("Timeout while trying to read response body")),500);hA(e).then(o=>t(o),o=>r(o)).finally(()=>clearTimeout(n))})}async function hA(e){return await e.text()}async function gA(e,t,r){try{let n=yA(e,t,r),o=X_("resource.xhr",n);q_(r.replay,o)}catch(n){F&&H.exception(n,"Failed to capture xhr breadcrumb")}}function SA(e,t){let{xhr:r,input:n}=t;if(!r)return;let o=lu(n),i=r.getResponseHeader("content-length")?K_(r.getResponseHeader("content-length")):EA(r.response,r.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function yA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!l)return null;if(!a||!Zc(l,r.networkDetailAllowUrls)||Zc(l,r.networkDetailDenyUrls)){let w=xa(d),_=xa(p);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:w,response:_}}let f=a[Tr],h=f?jf(f.request_headers,r.networkRequestHeaders):{},y=jf(pa(a),r.networkResponseHeaders),[E,m]=r.networkCaptureBodies?Mc(s,H):[void 0],[g,v]=r.networkCaptureBodies?vA(a):[void 0],b=Bn(h,d,E),k=Bn(y,p,g);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:m?Qc(b,m):b,response:v?Qc(k,v):k}}function vA(e){let t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return _A(e.response,e.responseType)}catch(r){t.push(r)}return F&&H.warn("Failed to get xhr response body",...t),[void 0]}function _A(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(r){return F&&H.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return F&&H.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function EA(e,t){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return lu(r)}catch{return}}function TA(e){let t=M();try{let{networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>bA(a,l,c))}catch{}}function bA(e,t,r){if(t.data)try{IA(t)&&kA(r)&&(SA(t,r),gA(t,r,e)),xA(t)&&wA(r)&&(sA(t,r),iA(t,r,e))}catch(n){F&&H.exception(n,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function xA(e){return e.category==="fetch"}function kA(e){return e?.xhr}function wA(e){return e?.input!==void 0}function RA(e){let t=M();ua(aC(e)),un(eA(e)),GC(e),TA(e);let r=QC(e);Xs(r),t&&(t.on("beforeSendEvent",jC(e)),t.on("afterSendEvent",HC(e)),t.on("createDsc",n=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(n.replay_id=o)}),t.on("spanStart",n=>{e.lastActiveSpan=n}),t.on("spanEnd",n=>{e.lastActiveSpan=n}),t.on("beforeSendFeedback",async(n,o)=>{let i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&n.contexts?.feedback&&(n.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),n.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function NA(e){try{return Promise.all(au(e,[CA(he.performance.memory)]))}catch{return[]}}function CA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function AA(e,t,r){return Ap(e,t,{...r,setTimeoutImpl:Oo})}var Fc=L.navigator;function MA(){return/iPhone|iPad|iPod/i.test(Fc?.userAgent??"")||/Macintosh/i.test(Fc?.userAgent??"")&&Fc?.maxTouchPoints&&Fc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function LA(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){F&&H.warn("Received replay event after session expired.");return}let o=n||!t;t=!0,OA(r),e.clickDetector&&rC(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!nm(e,r,o))return!0;if(!o)return!1;let i=e.session;if(PA(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(F&&H.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&su(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function OA(e){let t=e.data;if(!(e.type!==W.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==z.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let r of t.attributes){let n=Ir.mirror.getNode(r.id),o=n&&Ir.mirror.getMeta(n);if(o?.type===iu.Element)for(let[i,s]of Object.entries(r.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function DA(e){let t=e.getOptions();return{type:W.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 PA(e,t){!t||e.session?.segmentId!==0||nm(e,DA(e),!1)}function UA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function BA(e,t,r,n){return ht(Ws(e,di(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function FA({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)}
|
|
31
|
-
`;if(typeof e=="string")r=`${n}${e}`;else{let i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function HA({client:e,scope:t,replayId:r,event:n}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:o};e.emit("preprocessEvent",n,i);let s=await Ys(e.getOptions(),n,i,t,e,be());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:l,version:c,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}async function zA({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:o,session:i}){let s=FA({recordingData:e,headers:{segment_id:r}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=n,d=M(),p=U(),f=d?.getTransport(),h=d?.getDsn();if(!d||!f||!h||!i.sampled)return Promise.resolve({});let y={type:RR,replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:r,replay_type:i.sampled},E=await HA({scope:p,client:d,replayId:t,event:y});if(!E)return d.recordDroppedEvent("event_processor","replay"),F&&H.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete E.sdkProcessingMetadata;let m=BA(E,s,h,d.getOptions().tunnel),g;try{g=await f.send(m)}catch(b){let k=new Error(Yf);try{k.cause=b}catch{}throw k}let v=ea({},g);if(Zs(v,"replay"))throw new ka(v);if(typeof g.statusCode=="number"&&(g.statusCode<200||g.statusCode>=300))throw new eu(g.statusCode);return g}var eu=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},ka=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},tu=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function Q_(e,t={count:0,interval:OR}){let{recordingData:r,onError:n}=e;if(r.length)try{return await zA(e),!0}catch(o){if(o instanceof eu||o instanceof ka)throw o;if(xo("Replays",{_retryCount:t.count}),n&&n(o),t.count>=DR){let i=new Error(`${Yf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Oo(async()=>{try{await Q_(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Z_="__THROTTLED",$A="__SKIPPED";function jA(e,t,r){let n=new Map,o=a=>{let l=a-r;n.forEach((c,u)=>{u<l&&n.delete(u)})},i=()=>[...n.values()].reduce((a,l)=>a+l,0),s=!1;return(...a)=>{let l=Math.floor(Date.now()/1e3);if(o(l),i()>=t){let u=s;return s=!0,u?$A:Z_}s=!1;let c=n.get(l)||0;return n.set(l,c+1),e(...a)}}var Wf=class{constructor({options:t,recordingOptions:r}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:NR,sessionIdleExpire:CR},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=r,this._options=t,this._debouncedFlush=AA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=jA((s,a)=>UC(this,s,a),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:o}=this.getOptions(),i=n?{threshold:Math.min(PR,n),timeout:n,scrollTimeout:UR,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uf(this,i)),F){let s=t._experiments;H.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=zr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=zr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{dC(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){F&&H.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:r,sessionSampleRate:n}=this._options,o=r<=0&&n<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){F&&H.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",F&&H.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){F&&H.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Ef({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){F&&H.log("Buffering is in progress, call `flush()` to save the replay");return}F&&H.infoTick("Starting replay in buffer mode");let t=Ef({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{let t=this._canvas;this._stopRecording=Ir({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:LR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:LA(this),...MA(),onMutation:this._onMutationHandler.bind(this),...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:r}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";let n=r??"manual";M()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{F&&H.log(`Stopping Replay triggered by ${n}`),Jc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,AC(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),F&&H.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),F&&H.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let r=Date.now();F&&H.log("Converting buffer to session"),await this.flushImmediate();let n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession(),p_(this.session.id)),this.startRecording())}addUpdate(t){let r=t();this.recordingMode==="buffer"||!this._isEnabled||r!==!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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&zf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${he.location.pathname}${he.location.hash}${he.location.search}`,r=`${he.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){let n=this._throttledAddEvent(t,r);if(n===Z_){let o=zr({category:"replay.throttled"});this.addUpdate(()=>!nm(this,{type:VN,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return n}getCurrentRoute(){let t=this.lastActiveSpan||ie(),r=t&&te(t),o=(r&&B(r).data||{})[Fe];if(!(!r||!o||!["route","custom"].includes(o)))return B(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=RC({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&M()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&p_(this.session.id)}_initializeSessionForSampling(t){let r=this._options.errorSampleRate>0,n=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;let t=this.session;return Xc(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{he.document.addEventListener("visibilitychange",this._handleVisibilityChange),he.addEventListener("blur",this._handleWindowBlur),he.addEventListener("focus",this._handleWindowFocus),he.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(RA(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=IC(this)}_removeListeners(){try{he.document.removeEventListener("visibilitychange",this._handleVisibilityChange),he.removeEventListener("blur",this._handleWindowBlur),he.removeEventListener("focus",this._handleWindowFocus),he.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Xc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Jc();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){F&&H.log("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:W.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=hC(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let r=this._context.initialTimestamp/1e3;t=t.filter(n=>n.start>=r)}return Promise.all(au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:r}=this;if(!t||!r||this._requiresManualStart||t.segmentId)return;let n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let 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(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){F&&H.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await NA(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new tu;let n=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Q_({replayId:t,recordingData:i,segmentId:o,eventContext:n,session:this.session,timestamp:r,onError:s=>this.handleException(s)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});let n=M();if(n){let o;r instanceof ka?o="ratelimit_backoff":r instanceof tu?o="invalid":o="send_error",n.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){F&&H.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,o=Date.now()-r;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){F&&H.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&F&&H.log("Flushing initial segment without checkout.");let l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&su(this.session)}_onMutationHandler(t){let{ignoreMutations:r}=this._options._experiments;if(r?.length&&t.some(a=>{let l=UA(a.target),c=r.join(",");return l?.matches(c)}))return!1;let n=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&n>o;if(n>i||s){let a=zr({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ha(e,t){return[...e,...t].join(",")}function WA({mask:e,unmask:t,block:r,unblock:n,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=ha(e,[".sentry-mask","[data-sentry-mask]"]),a=ha(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ha(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:ha(n,[]),ignoreSelector:ha(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function GA({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;let s=r.includes(t),a=n&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?i.replace(/[\S]/g,"*"):i}var m_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',VA=["content-length","content-type","accept"],YA=Symbol.for("sentry__originalRequestBody"),h_=!1,g_=!1;function qA(){if(typeof Request>"u"||g_)return;let e=Request;try{let t=function(r,n){let o=new e(r,n);return n?.body!=null&&(o[YA]=n.body),o};t.prototype=e.prototype,L.Request=t,g_=!0}catch{}}var im=(e=>new Gf(e)),Gf=class{constructor({flushMinDelay:t=AR,flushMaxDelay:r=MR,minReplayDuration:n=BR,maxReplayDuration:o=Yv,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:E=[],networkDetailDenyUrls:m=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:k=[],maskAttributes:w=["title","placeholder","aria-label"],unmask:_=[],block:I=[],unblock:j=[],ignore:x=[],maskFn:D,beforeAddRecordingEvent:Y,beforeErrorSampling:ee,onError:G,attachRawBodyFromRequest:Be=!1}={}){this.name="Replay";let ce=WA({mask:k,unmask:_,block:I,unblock:j,ignore:x});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:D,maskInputFn:D,maskAttributeFn:(ye,C,oe)=>GA({maskAttributes:w,maskAllText:c,privacyOptions:ce,key:ye,value:C,el:oe}),...ce,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:ye=>{try{ye.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,FR),maxReplayDuration:Math.min(o,Yv),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:y,networkDetailAllowUrls:E,networkDetailDenyUrls:m,networkCaptureBodies:g,networkRequestHeaders:S_(v),networkResponseHeaders:S_(b),beforeAddRecordingEvent:Y,beforeErrorSampling:ee,onError:G,attachRawBodyFromRequest:Be,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${m_}`:m_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&er())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return h_}set _isInitialized(t){h_=t}afterAllSetup(t){!er()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&qA(),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",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){let r=this.getReplayId(!0);r&&An(t,{"sentry.replay_id":r})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let r=KA(this._initialOptions,t);this._replay=new Wf({options:r,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let r=t.getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}};function KA(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},o=Ft(r.replaysSessionSampleRate),i=Ft(r.replaysOnErrorSampleRate);return o==null&&i==null&&qe(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(n.sessionSampleRate=o),i!=null&&(n.errorSampleRate=i),n}function S_(e){return[...VA,...e.map(t=>t.toLowerCase())]}function e0(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function sm(e){try{return new URL(e,P.location.origin).href}catch{return}}function t0(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function am(e){try{return new Headers(e)}catch{return}}var lm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function n0(e,t){let{traceFetch:r,traceXHR:n,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:s,onRequestSpanStart:a,onRequestSpanEnd:l}={...lm,...t},c=typeof o=="function"?o:f=>!0,u=f=>JA(f,s),d={},p=e.getOptions().propagateTraceparent;r&&Ln(f=>{let h=Up(f,c,u,d,{propagateTraceparent:p,onRequestSpanEnd:l});if(h){let y=sm(f.fetchData.url),E=y?Zt(y).host:void 0;h.setAttributes({"http.url":y?at(y):void 0,"server.address":E}),i&&r0(h,e),a?.(h,{headers:f.headers})}}),n&&da(f=>{let h=QA(f,c,u,d,p,l);h&&(i&&r0(h,e),a?.(h,{headers:am(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}var XA=300;function r0(e,t){let{url:r}=B(e).data;if(!r||typeof r!="string")return;let n=()=>{setTimeout(o)};if(Je(t)){let i=e.end.bind(e);e.end=s=>{let a=s??ne(),l=!1,c=()=>{l||(l=!0,setTimeout(o),i(a),clearTimeout(u))};n=c;let u=setTimeout(c,XA)}}let o=Er("resource",({entries:i})=>{i.forEach(s=>{t0(s)&&s.name.endsWith(r)&&(e.setAttributes(la(s)),n())})})}function JA(e,t){let r=Rt();if(r){let n,o;try{n=new URL(e,r),o=new URL(r).origin}catch{return!1}let i=n.origin===o;return t?Ke(n.toString(),t)||i&&Ke(n.pathname,t):i}else{let n=!!e.match(/^\/(?!\/)/);return t?Ke(e,t):n}}function QA(e,t,r,n,o,i){let s=e.xhr,a=s?.[Tr];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:c}=a,u=He()&&t(l);if(e.endTimestamp){let g=s.__sentry_xhr_span_id__;if(!g)return;let v=n[g];v&&(u&&a.status_code!==void 0&&(ai(v,a.status_code),v.end(),i?.(v,{headers:am(pa(s)),error:e.error})),delete n[g]);return}let d=sm(l),p=d?Zt(d):Zt(l),f=at(Zl(l)),h=M(),E=!!ie()||!!h&&Je(h),m=u&&E?je({name:`${c} ${f}`,attributes:{url:at(l),type:"xhr","http.method":c,"http.url":d?at(d):void 0,"server.address":p?.host,[J]:"auto.http.browser",[_e]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Xe;return u&&!E&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=m.spanContext().spanId,n[s.__sentry_xhr_span_id__]=m,r(l)&&ZA(s,He()&&E?m:void 0,o),h&&h.emit("beforeOutgoingRequestSpan",m,e),m}function ZA(e,t,r){let{"sentry-trace":n,baggage:o,traceparent:i}=vi({span:t,propagateTraceparent:r});n&&eM(e,n,o,i)}function eM(e,t,r,n){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),n&&!o?.traceparent&&e.setRequestHeader("traceparent",n),r){let i=o?.baggage;(!i||!e0(i))&&e.setRequestHeader("baggage",r)}}catch{}}var o0=new WeakMap,i0=new WeakMap,tM=9e4,rM=["text/event-stream","application/x-ndjson","application/stream+json"],s0=()=>({name:"FetchStreamPerformance",setup(){pc(e=>{if(e.response){let t=o0.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let r=i0.get(e.response);r&&clearTimeout(r)}}}),Ln(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!rM.some(l=>t.startsWith(l)))return;let r=e.fetchData?.url||"",n=e.fetchData?.method||"GET",o=Pr(r),i=r.startsWith("data:")?at(r):o?mi(o):r,s=je({name:`${n} ${i}`,startTime:e.endTimestamp,attributes:{url:at(r),"http.method":n,type:"fetch",[_e]:"http.client.stream",[J]:"auto.http.browser.stream"}});o0.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},tM);i0.set(e.response,a)}})}});function a0(){P.document?P.document.addEventListener("visibilitychange",()=>{let e=ie();if(!e)return;let t=te(e);if(P.document.hidden&&t){let r="cancelled",{op:n,status:o}=B(t);xe&&T.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${n}`),o||t.setStatus({code:2,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):xe&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var nM=3600,l0="sentry_previous_trace",oM="sentry.previous_trace";function c0(e,{linkPreviousTrace:t,consistentTraceSampling:r}){let n=t==="session-storage",o=n?aM():void 0;e.on("spanStart",s=>{if(te(s)!==s)return;let a=U().getPropagationContext();o=iM(o,s,a),n&&sM(o)});let i=!0;r&&e.on("beforeSampling",s=>{if(!o)return;let a=U(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(o.sampleRate),sampled:String(cm(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=cm(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[ii]:o.sampleRate}})}function iM(e,t,r){let n=B(t);function o(){try{let a=Number(n.data?.[Qr]??r.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:n.start_timestamp,sampleRate:o(),sampleRand:r.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=nM&&(xe&&T.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:n.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ul]:"previous_trace"}}),t.setAttribute(oM,`${s.traceId}-${s.spanId}-${cm(s)?1:0}`)),i)}function sM(e){try{P.sessionStorage.setItem(l0,JSON.stringify(e))}catch(t){xe&&T.warn("Could not store previous trace in sessionStorage",t)}}function aM(){try{let e=P.sessionStorage?.getItem(l0);return JSON.parse(e)}catch{return}}function cm(e){return e.traceFlags===1}var lM="BrowserTracing",cM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function m0(){let e=P.navigator;return e?.userAgent?cM.test(e.userAgent):!1}var uM={...fi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...lm},um=((e={})=>{"enableElementTiming"in e&&qe(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},r=P.document,{enableInp:n,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:y,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:m,enableHTTPTimings:g,ignoreResourceSpans:v,ignorePerformanceApiSpans:b,instrumentPageLoad:k,instrumentNavigation:w,detectRedirects:_,linkPreviousTrace:I,consistentTraceSampling:j,enableReportPageLoaded:x,onRequestSpanStart:D,onRequestSpanEnd:Y}={...uM,...e},ee=m0(),G,Be,ce;function ye(C,oe,$=!0){let q=oe.op==="pageload",pe=oe.name,fe=c?c(oe):oe,Pt=fe.attributes||{};if(pe!==fe.name&&(Pt[Fe]="custom",fe.attributes=Pt),!$){let Kr=It();je({...fe,startTime:Kr}).end(Kr);return}t.name=fe.name,t.source=Pt[Fe];let pr=Jl(fe,{idleTimeout:u,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:q,beforeSpanEnd:Kr=>{G?.();let so=Je(C);tf(Kr,{recordClsOnPageloadSpan:!so&&!a,recordLcpOnPageloadSpan:!so&&!l,ignoreResourceSpans:v,ignorePerformanceApiSpans:b,spanStreamingEnabled:so}),p0(C,void 0);let Ss=U(),ao=Ss.getPropagationContext();Ss.setPropagationContext({...ao,traceId:pr.spanContext().traceId,sampled:wt(pr),dsc:De(Kr)}),q&&(ce=void 0)},trimIdleSpanEndTimestamp:!x});q&&x&&(ce=pr),p0(C,pr);function Lr(){r&&["interactive","complete"].includes(r.readyState)&&C.emit("idleSpanEnableAutoFinish",pr)}q&&!x&&r&&(r.addEventListener("readystatechange",()=>{Lr()}),Lr())}return{name:lM,setup(C){if(ee){xe&&T.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}Wl();let oe=Je(C);if(G=Jp({recordClsStandaloneSpans:oe?void 0:a||!1,recordLcpStandaloneSpans:oe?void 0:l||!1,client:C}),oe?(lf(C),cf(C),n&&uf()):n&&of(),i&&L.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Zp():o&&Qp(),s&&ef(),_&&r){let q=()=>{Be=ne()};addEventListener("click",q,{capture:!0}),addEventListener("keydown",q,{capture:!0,passive:!0})}function $(){let q=Na(C);q&&!B(q).timestamp&&(xe&&T.log(`[Tracing] Finishing current active span with op: ${B(q).op}`),q.setAttribute(Zr,"cancelled"),q.end())}C.on("startNavigationSpan",(q,pe)=>{if(M()!==C)return;if(pe?.isRedirect){xe&&T.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ye(C,{op:"navigation.redirect",...q},!1);return}Be=void 0,$(),be().setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:He()?void 0:it()});let fe=U();fe.setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:He()?void 0:it()}),fe.setSDKProcessingMetadata({normalizedRequest:void 0}),ye(C,{op:"navigation",...q,parentSpan:null,forceTransaction:!0})}),C.on("startPageLoadSpan",(q,pe={})=>{if(M()!==C)return;$();let fe=pe.sentryTrace||u0("sentry-trace")||d0("sentry-trace"),Pt=pe.baggage||u0("baggage")||d0("baggage"),pr=tp(fe,Pt),Lr=U();Lr.setPropagationContext(pr),He()||(Lr.getPropagationContext().propagationSpanId=it()),Lr.setSDKProcessingMetadata({normalizedRequest:Ti()}),ye(C,{op:"pageload",...q})}),C.on("endPageloadSpan",()=>{x&&ce&&(ce.setAttribute(Zr,"reportPageLoaded"),ce.end())})},afterAllSetup(C){if(ee)return;let oe=Rt();if(I!=="off"&&c0(C,{linkPreviousTrace:I,consistentTraceSampling:j}),P.location){if(k){let $=ue();h0(C,{name:P.location.pathname,startTime:$?$/1e3:void 0,attributes:{[Fe]:"url",[J]:"auto.pageload.browser"}})}w&&un(({to:$,from:q})=>{if(q===void 0&&oe?.indexOf($)!==-1){oe=void 0;return}oe=void 0;let pe=Pr($),fe=Na(C),Pt=fe&&_&&pM(fe,Be);g0(C,{name:pe?.pathname||P.location.pathname,attributes:{[Fe]:"url",[J]:"auto.navigation.browser"}},{url:$,isRedirect:Pt})})}f&&a0(),s&&dM(C,u,d,p,t),n&&sf(),n0(C,{traceFetch:h,traceXHR:y,tracePropagationTargets:C.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:g,onRequestSpanStart:D,onRequestSpanEnd:Y}),E&&C.addIntegration(s0())}}});function h0(e,t,r){e.emit("startPageLoadSpan",t,r),U().setTransactionName(t.name);let n=Na(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function g0(e,t,r){let{url:n,isRedirect:o}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=U();return i.setTransactionName(t.name),n&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...Ti(),url:n}}),Na(e)}function u0(e){return P.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function d0(e){return P.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(n=>n.name===e)?.description}function dM(e,t,r,n,o){let i=P.document,s,a=()=>{let l="ui.action.click",c=Na(e);if(c){let u=B(c).op;if(["navigation","pageload"].includes(u)){xe&&T.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Zr,"interactionInterrupted"),s.end(),s=void 0),!o.name){xe&&T.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=Jl({name:o.name,op:l,attributes:{[Fe]:o.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:n})};i&&addEventListener("click",a,{capture:!0})}var S0="_sentry_idleSpan";function Na(e){return e[S0]}function p0(e,t){ve(e,S0,t)}var f0=1.5;function pM(e,t){let r=B(e),n=It(),o=r.start_timestamp;return!(n-o>f0||t&&n-t<=f0)}var M0=mr(pn(),1);function A0(e){return Kt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function gm(e){let t={...e};na(t,"react"),xo("react",{version:M0.version});let r=gf(t);return ni(RM),r}function RM(e){return A0(e)?"[SyntheticEvent]":fa(e)}var L0=mr(pn(),1);function NM(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function CM(e,t){let r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function O0(e,{componentStack:t},r){if(NM(L0.version)&&qt(e)&&t){let n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,CM(e,n)}return Qt(n=>(n.setContext("react",{componentStack:t}),rn(e,r)))}var Po=mr(pn(),1);var D0=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Sm={componentStack:null,error:null,eventId:null},Aa=class extends Po.Component{constructor(t){super(t),this.state=Sm,this._openFallbackReportDialog=!0;let r=M();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Dc({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){let{componentStack:n}=r,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:a}=this.props;Qt(l=>{o&&o(l,t,n);let c=this.props.handled!=null?this.props.handled:!!this.props.fallback,u=O0(t,r,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(t,n,u),s&&(this._lastEventId=u,this._openFallbackReportDialog&&Dc({...a,eventId:u})),this.setState({error:t,componentStack:n,eventId:u})})}componentDidMount(){let{onMount:t}=this.props;t&&t()}componentWillUnmount(){let{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&(this.state===Sm?o(null,null,null):o(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){let{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(Sm)}render(){let{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;let o=typeof t=="function"?Po.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return Po.isValidElement(o)?o:(t&&D0&&T.warn("fallback did not produce a valid ReactElement"),null)}};function ym(e,t){if(e==null||e==="")return t;let r=typeof e=="number"?e:Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}var fn=window.__vidfarmSentry,U0=fn?.dsn?.trim()||"";if(U0){let e=fn?.environment?.trim()||"development",t=e==="production"?.1:1,r=e==="production"?.1:1,n=["localhost",window.location.origin,`${window.location.origin}/api`],o=Array.from(new Set([...n,...fn?.tracePropagationTargets??[]].filter(Boolean)));gm({dsn:U0,environment:e,release:fn?.release?.trim()||void 0,integrations:[um(),im({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:ym(fn?.tracesSampleRate,t),tracePropagationTargets:o,replaysSessionSampleRate:ym(fn?.replaysSessionSampleRate,r),replaysOnErrorSampleRate:ym(fn?.replaysOnErrorSampleRate,1),enableLogs:fn?.enableLogs??!0,sendDefaultPii:fn?.sendDefaultPii??!0})}var Dt=mr(pn(),1),kI=mr(oI(),1);var iI=e=>{let t,r=new Set,n=(c,u)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let p=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(f=>f(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,o,a);return a},sI=(e=>e?iI(e):iI);var bl=mr(pn(),1);var LL=e=>e;function Qo(e,t=LL){let r=bl.default.useSyncExternalStore(e.subscribe,bl.default.useCallback(()=>t(e.getState()),[e,t]),bl.default.useCallback(()=>t(e.getInitialState()),[e,t]));return bl.default.useDebugValue(r),r}var OL="[vidfarm]";function DL(e){if(e!=="debug")return!0;if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("debug")||window.localStorage?.getItem("VIDFARM_DEBUG")==="1"}catch{return!1}}function aI(e,t,r){let n={event:t,detail:r,timestamp:new Date().toISOString()};typeof window<"u"&&(window.__VIDFARM_DEBUG_LOGS__=window.__VIDFARM_DEBUG_LOGS__??[],window.__VIDFARM_DEBUG_LOGS__.push(n),window.__VIDFARM_DEBUG_LOGS__.length>1e3&&window.__VIDFARM_DEBUG_LOGS__.splice(0,window.__VIDFARM_DEBUG_LOGS__.length-1e3)),DL(e)&&console[e==="debug"?"log":e](OL,t,r??"")}function Il(e,t){aI("info",e,t)}function hs(e,t){aI("error",e,t)}function lI(){typeof window>"u"||window.__VIDFARM_DEBUG_HOOKS__||(window.__VIDFARM_DEBUG_HOOKS__=!0,Il("boot.hooks-installed",{href:window.location.href,readyState:document.readyState,userAgent:navigator.userAgent}),window.addEventListener("error",e=>{hs("window.error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error instanceof Error?e.error.stack:e.error})}),window.addEventListener("unhandledrejection",e=>{hs("window.unhandledrejection",{reason:e.reason instanceof Error?e.reason.stack:e.reason})}))}var de=mr(pn(),1);function qr(e,t){if(!t||!e.startsWith("/"))return e;let r=new URL(e,"https://vidfarm.local");return r.pathname.startsWith("/u/")?`${r.pathname}${r.search}${r.hash}`:r.pathname==="/discover"||r.pathname.startsWith("/discover/")||r.pathname==="/help"?`${r.pathname}${r.search}${r.hash}`:`/u/${encodeURIComponent(t)}${r.pathname}${r.search}${r.hash}`}function cI(e){let t=e?.email?.trim()||"",r=e?.displayName?.trim()||"";return r||(t?t.split("@")[0].replace(/[._-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()):"")}function Ad(e){return!!(e&&/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e))}var S=mr(xl(),1);function fI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M10 3v4"}),(0,S.jsx)("path",{d:"M10 13v4"}),(0,S.jsx)("path",{d:"M3 10h4"}),(0,S.jsx)("path",{d:"M13 10h4"}),(0,S.jsx)("path",{d:"m5.8 5.8 2.3 2.3"}),(0,S.jsx)("path",{d:"m11.9 11.9 2.3 2.3"}),(0,S.jsx)("path",{d:"m14.2 5.8-2.3 2.3"}),(0,S.jsx)("path",{d:"m8.1 11.9-2.3 2.3"})]})}function $L(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M4.5 4.5h3v11h-3z"}),(0,S.jsx)("path",{d:"M8.7 4.5h3v11h-3z"}),(0,S.jsx)("path",{d:"m13.4 5.1 2.3-.6 2.2 10.7-2.3.6z"})]})}function jL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("circle",{cx:"10",cy:"10",r:"7.2"}),(0,S.jsx)("path",{d:"M10 6.3v4.1l2.8 1.7"})]})}function mI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M14.8 15.2a5.4 5.4 0 1 0-9.6 0"}),(0,S.jsx)("circle",{cx:"10",cy:"6.8",r:"3.1"})]})}function gI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:[(0,S.jsx)("circle",{cx:"4.2",cy:"10",r:"1.45"}),(0,S.jsx)("circle",{cx:"10",cy:"10",r:"1.45"}),(0,S.jsx)("circle",{cx:"15.8",cy:"10",r:"1.45"})]})}function WL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",children:[(0,S.jsx)("path",{d:"M3.5 5.5h13"}),(0,S.jsx)("path",{d:"M3.5 10h13"}),(0,S.jsx)("path",{d:"M3.5 14.5h13"})]})}function GL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.8"}),(0,S.jsx)("path",{d:"m13 13 4.2 4.2"})]})}function VL(){return(0,S.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:(0,S.jsx)("path",{d:"M6 3.8h8a1 1 0 0 1 1 1v11.4l-5-2.9-5 2.9V4.8a1 1 0 0 1 1-1Z"})})}function YL(e){let t=e?.trim();if(!(!t||typeof window>"u"))try{let r="vidfarm:agency:accounts:index",n=window.localStorage.getItem(r),o=n?JSON.parse(n):[];Array.isArray(o)&&window.localStorage.setItem(r,JSON.stringify(o.filter(i=>typeof i=="string"&&i!==t))),window.localStorage.removeItem(`vidfarm:agency:account_${t}`),window.localStorage.removeItem(`vidfarm:flockposter-cache:v1_${t}`),window.localStorage.removeItem(`vidfarm:discover-bookmarks:v1_${t}`)}catch{}}function qL({account:e}){let t=(0,de.useRef)(null),r=e.isLoggedIn?[{id:"discover",href:qr("/discover",e.userId),label:"Discover",icon:(0,S.jsx)(fI,{})},{id:"library",href:qr("/library",e.userId),label:"Library",icon:(0,S.jsx)($L,{})},{id:"calendar",href:qr("/calendar",e.userId),label:"Calendar",icon:(0,S.jsx)(jL,{})},{id:"settings",href:qr("/settings",e.userId),label:"Settings",icon:(0,S.jsx)(mI,{})}]:[{id:"discover",href:"/discover",label:"Discover",icon:(0,S.jsx)(fI,{})},{id:"login",href:"/login",label:"Login",icon:(0,S.jsx)(mI,{})}],n=e.isLoggedIn?[{id:"chat",href:qr("/chat",e.userId),label:"Chat"},{id:"job-runs",href:qr("/job-runs",e.userId),label:"Run History"},{id:"inpaint",href:qr("/inpaint",e.userId),label:"Inpaint"},{id:"help",href:"/help",label:"Help"},{id:"logout",action:"logout",label:"Log Out"}]:[{id:"help",href:"/help",label:"Help"},{id:"login",href:"/login",label:"Login"}],o=r.filter(i=>!n.some(s=>s.id===i.id));return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("nav",{className:"primary-nav","aria-label":"Primary",children:[r.map(i=>(0,S.jsxs)("a",{className:`nav-link${i.id==="discover"?" is-active":""}`,href:i.href,children:[(0,S.jsx)("span",{className:"nav-icon","aria-hidden":"true",children:i.icon}),(0,S.jsx)("span",{children:i.label})]},i.id)),n.map(i=>"href"in i?(0,S.jsx)("a",{className:"nav-link nav-mobile-extra",href:i.href,children:(0,S.jsx)("span",{children:i.label})},`mobile-${i.id}`):(0,S.jsx)("button",{type:"button",className:"nav-link nav-mobile-extra nav-action-link",onClick:()=>{t.current?.open||t.current?.showModal()},children:(0,S.jsx)("span",{children:i.label})},`mobile-${i.id}`)),n.length?(0,S.jsxs)("details",{className:"nav-menu",children:[(0,S.jsxs)("summary",{className:"nav-link nav-menu-trigger","aria-label":"Open navigation menu",children:[(0,S.jsx)("span",{className:"nav-icon nav-menu-desktop-icon","aria-hidden":"true",children:(0,S.jsx)(gI,{})}),(0,S.jsx)("span",{className:"nav-icon nav-menu-mobile-icon","aria-hidden":"true",children:(0,S.jsx)(WL,{})}),(0,S.jsx)("span",{className:"nav-menu-label",children:"Menu"})]}),(0,S.jsxs)("div",{className:"nav-menu-panel",role:"menu",children:[o.map(i=>(0,S.jsx)("a",{className:`nav-menu-item nav-menu-mobile-only${i.id==="discover"?" is-active":""}`,role:"menuitem",href:i.href,children:i.label},`menu-mobile-${i.id}`)),n.map(i=>"href"in i?(0,S.jsx)("a",{className:"nav-menu-item",role:"menuitem",href:i.href,children:i.label},i.id):(0,S.jsx)("button",{type:"button",className:"nav-menu-item nav-menu-button",role:"menuitem",onClick:()=>{t.current?.open||t.current?.showModal()},children:i.label},i.id))]})]}):null]}),e.isLoggedIn?(0,S.jsxs)("dialog",{className:"logout-dialog",ref:t,onClick:i=>{let s=t.current;if(!s)return;let a=s.getBoundingClientRect();(i.clientX<a.left||i.clientX>a.right||i.clientY<a.top||i.clientY>a.bottom)&&s.close()},children:[(0,S.jsxs)("div",{className:"logout-dialog-head",children:[(0,S.jsx)("div",{className:"label logout-dialog-kicker",children:"Log out"}),(0,S.jsx)("h3",{children:"Log out of this browser?"}),(0,S.jsx)("p",{children:"This clears the stored developer key, workspace access, and local session state for the current browser."})]}),(0,S.jsxs)("div",{className:"toolbar logout-dialog-actions",children:[(0,S.jsx)("button",{type:"button",className:"secondary",onClick:()=>t.current?.close(),children:"Cancel"}),(0,S.jsxs)("form",{method:"post",action:"/logout",onSubmit:()=>YL(e.userId),children:[(0,S.jsx)("input",{type:"hidden",name:"account",value:e.userId??""}),(0,S.jsx)("button",{type:"submit",className:"danger",children:"Yes, log out"})]})]})]}):null]})}function KL({account:e}){let t=e.email?.trim()||"",r=cI({displayName:e.displayName,email:e.email}),n=qr("/discover",e.userId);return(0,S.jsxs)("a",{className:"brand-lockup",href:n,children:[(0,S.jsx)("img",{className:"brand-logo-image",src:"/assets/logo-vidfarm.png",alt:"VidFarm AI"}),(0,S.jsxs)("div",{className:"brand-copy",children:[(0,S.jsxs)("div",{className:"brand-title brand-title-static",children:["VidFarm",(0,S.jsx)("span",{className:"brand-title-mobile-hidden",children:" AI"})]}),t?(0,S.jsxs)("div",{className:"brand-account-meta",children:[r," ",(0,S.jsxs)("span",{children:["(",t,")"]})]}):null]})]})}function SI(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[(0,S.jsx)("path",{d:"m5 5 10 10"}),(0,S.jsx)("path",{d:"m15 5-10 10"})]})}function XL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M10 3v9"}),(0,S.jsx)("path",{d:"m6.5 8.5 3.5 3.5 3.5-3.5"}),(0,S.jsx)("path",{d:"M4 16h12"})]})}function JL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M8.4 11.6a3.2 3.2 0 0 0 4.5 0l2.2-2.2a3.2 3.2 0 0 0-4.5-4.5L9.4 6.1"}),(0,S.jsx)("path",{d:"M11.6 8.4a3.2 3.2 0 0 0-4.5 0L4.9 10.6a3.2 3.2 0 0 0 4.5 4.5l1.2-1.2"})]})}function QL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,S.jsx)("path",{d:"M12.4 7.6a3.4 3.4 0 0 1 0 4.8"}),(0,S.jsx)("path",{d:"M14.6 5.4a6.5 6.5 0 0 1 0 9.2"})]})}function ZL(){return(0,S.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,S.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,S.jsx)("path",{d:"m12.6 8 4 4"}),(0,S.jsx)("path",{d:"m16.6 8-4 4"})]})}var yI="vidfarm:discover-muted",gs=typeof window<"u"&&window.localStorage?.getItem(yI)==="1",Lg=new Set;function vI(e){gs=e;try{window.localStorage.setItem(yI,e?"1":"0")}catch{}for(let t of Lg)t()}function _I(e){return Lg.add(e),()=>{Lg.delete(e)}}function EI(){return(0,de.useSyncExternalStore)(_I,()=>gs,()=>!1)}var Og=!1,Dg=new Set;function hI(e){Og=e;for(let t of Dg)t()}function eO({src:e,controls:t=!0}){let r=(0,de.useRef)(null);return(0,de.useEffect)(()=>{let n=r.current;if(!n)return;let o=()=>{!n.dataset.src||n.getAttribute("src")||(n.setAttribute("src",n.dataset.src),n.load())},i=!1,s=()=>{Og||(o(),n.muted=gs,n.play().then(()=>{delete n.dataset.mutedFallback}).catch(()=>{n.muted||(n.dataset.mutedFallback="1",n.muted=!0,n.play().catch(()=>{}))}))},a=()=>{!gs&&n.dataset.mutedFallback==="1"&&!n.paused&&(n.muted=!1,delete n.dataset.mutedFallback)};window.addEventListener("pointerdown",a),window.addEventListener("keydown",a);let c=_I(()=>{gs?(delete n.dataset.mutedFallback,n.muted=!0):n.paused||(n.muted=!1)}),u=()=>{Og?n.paused||n.pause():i&&s()};Dg.add(u);let d=()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("keydown",a),c(),Dg.delete(u)};if(!("IntersectionObserver"in window))return i=!0,s(),d;let p=new IntersectionObserver(h=>{for(let y of h)y.isIntersecting&&(o(),p.unobserve(y.target))},{rootMargin:"240px 0px"}),f=new IntersectionObserver(h=>{for(let y of h)i=y.isIntersecting,y.isIntersecting?s():n.paused||n.pause()},{threshold:.5});return p.observe(n),f.observe(n),()=>{p.disconnect(),f.disconnect(),d()}},[]),(0,S.jsx)("video",{ref:r,className:"preview","data-src":e,preload:"metadata",playsInline:!0,loop:!0,controls:t})}function tO(){let e=EI();return(0,S.jsxs)("button",{type:"button",className:"discover-mute-toggle","aria-pressed":e,"aria-label":e?"Unmute video previews":"Mute video previews",title:e?"Unmute previews":"Mute previews",onClick:()=>vI(!e),children:[e?(0,S.jsx)(ZL,{}):(0,S.jsx)(QL,{}),(0,S.jsx)("span",{className:"discover-mute-toggle-label",children:e?"Muted":"Sound on"})]})}function rO({text:e,label:t}){let[r,n]=(0,de.useState)(""),o=async()=>{try{await navigator.clipboard.writeText(e),n("done")}catch{n("error")}window.setTimeout(()=>n(""),1600)};return(0,S.jsxs)("button",{className:"pill-tag copy-inline",type:"button","data-state":r,"aria-label":r==="done"?`${t} copied`:t,onClick:()=>{o()},children:[(0,S.jsx)("span",{className:"copy-inline-label",children:t}),(0,S.jsx)("span",{className:"copy-inline-feedback","aria-hidden":"true",children:r==="error"?"Couldn\u2019t copy":"Copied"})]})}function TI(e,t){return e.startsWith("hyperframes:")||e.startsWith("template_")?`/editor/${encodeURIComponent(e.replace(/^hyperframes:/,""))}${t?`?account=${encodeURIComponent(t)}`:""}`:qr(`/templates/${encodeURIComponent(e)}/editor/docs`,t)}function nO({templateId:e,accountUserId:t}){return(0,S.jsx)("a",{className:"cta-button",href:TI(e,t),children:"Editor"})}function oO(e){let{template:t}=e,[r,n]=(0,de.useState)(!1),[o,i]=(0,de.useState)(!1),[s,a]=(0,de.useState)(!1),l=(0,de.useRef)(null),c=t.status==="processing"||t.status==="failed",u=t.visibility==="private"&&!!e.onDeleteTemplate;(0,de.useEffect)(()=>{if(!r)return;let f=y=>{l.current&&!l.current.contains(y.target)&&n(!1)},h=y=>{y.key==="Escape"&&n(!1)};return window.addEventListener("mousedown",f),window.addEventListener("keydown",h),()=>{window.removeEventListener("mousedown",f),window.removeEventListener("keydown",h)}},[r]);let d=async()=>{try{await navigator.clipboard.writeText(t.templateId),i(!0),window.setTimeout(()=>{i(!1),n(!1)},900)}catch{n(!1)}},p=async()=>{if(!window.confirm(`Delete "${t.title}"? This removes it from your Discover feed permanently.`))return;a(!0);let f=await(e.onDeleteTemplate?.(t.templateId)??Promise.resolve({ok:!1,error:"Delete unavailable."}));a(!1),f.ok?n(!1):window.alert(f.error||"Unable to delete this template.")};return(0,S.jsxs)("div",{className:"discover-card-menu",ref:l,children:[(0,S.jsx)("button",{type:"button",className:"discover-card-menu-trigger","aria-haspopup":"menu","aria-expanded":r,"aria-label":`More actions for ${t.title}`,title:"More actions",onClick:()=>n(f=>!f),children:(0,S.jsx)(gI,{})}),r?(0,S.jsxs)("div",{className:"discover-card-menu-panel",role:"menu",children:[(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{d()},children:o?"Copied!":"Copy ID"}),c?(0,S.jsx)("span",{className:"discover-card-menu-item is-disabled",role:"menuitem","aria-disabled":"true",children:"Open in Editor"}):(0,S.jsx)("a",{className:"discover-card-menu-item",role:"menuitem",href:TI(t.templateId,e.accountUserId),children:"Open in Editor"}),(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{e.onToggleBookmark?.(t.templateId),n(!1)},children:e.isBookmarked?"Remove Bookmark":"Bookmark"}),u?(0,S.jsx)("button",{type:"button",className:"discover-card-menu-item is-danger",role:"menuitem",disabled:s,onClick:()=>{p()},children:s?"Deleting\u2026":"Delete"}):null]}):null]})}function iO(e){let t=`${e.isBookmarked?"Remove bookmark for ":"Bookmark "}${e.title}`;return(0,S.jsx)("button",{className:"bookmark-button",type:"button","data-active":e.isBookmarked?"true":"false","aria-label":t,"aria-pressed":e.isBookmarked,title:t,onClick:()=>e.onToggleBookmark?.(e.templateId),children:(0,S.jsx)(VL,{})})}function sO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function aO(e){let t=typeof e.layerCount=="number"?e.layerCount:null,r=typeof e.sourceAssetCount=="number"?e.sourceAssetCount:null,n=typeof e.durationSeconds=="number"&&Number.isFinite(e.durationSeconds)?e.durationSeconds>=60?`${Math.floor(e.durationSeconds/60)}:${String(Math.round(e.durationSeconds%60)).padStart(2,"0")}`:`${e.durationSeconds.toFixed(e.durationSeconds>=10?1:2)}s`:null,o=[t===null?null:`${t} layer${t===1?"":"s"}`,r===null?null:`${r} source${r===1?"":"s"}`,n].filter(Boolean);return o.length?o.join(" / "):e.previewUrl?"Draft composition with editable layers.":"Layer recipe with editable timeline."}function lO(e){let{template:t}=e,r=t.status==="processing"||t.status==="failed",n=t.previewUrl?Ad(t.previewUrl)?(0,S.jsx)(eO,{src:t.previewUrl,controls:!1}):(0,S.jsx)("img",{className:"preview",src:t.previewUrl,alt:`${t.title} preview`,loading:"lazy",decoding:"async"}):(0,S.jsx)("div",{className:"preview preview-empty",children:t.status==="processing"?"Downloading\u2026":"No preview"});return(0,S.jsxs)("li",{className:"discover-card row","data-template-id":t.templateId,children:[t.previewUrl?(0,S.jsxs)("button",{className:"discover-card-media discover-card-media-button",type:"button","aria-label":`Open ${t.title} preview`,onClick:()=>e.onOpenPreview?.(t),children:[n,(0,S.jsx)("span",{className:"discover-card-media-affordance","aria-hidden":"true",children:"View"})]}):(0,S.jsx)("div",{className:"discover-card-media",children:n}),(0,S.jsxs)("div",{className:"discover-card-copy",children:[(0,S.jsxs)("div",{className:"discover-card-head",children:[(0,S.jsxs)("div",{className:"discover-card-title-wrap",children:[(0,S.jsx)("h2",{children:t.title}),(0,S.jsx)("p",{className:"discover-card-meta",children:aO(t)})]}),(0,S.jsxs)("div",{className:"discover-card-actions",children:[(0,S.jsx)(iO,{templateId:t.templateId,title:t.title,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark}),r?(0,S.jsx)("span",{className:"cta-button discover-card-cta-disabled","aria-disabled":"true",children:t.status==="failed"?"Failed":"Preparing\u2026"}):(0,S.jsx)(nO,{templateId:t.templateId,accountUserId:e.accountUserId}),(0,S.jsx)(oO,{template:t,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId})]})]}),(0,S.jsx)("div",{className:"discover-card-body",children:(0,S.jsx)("p",{children:String(t.viralDna||"").trim()||"No layer strategy provided for this composition yet."})}),(0,S.jsxs)("div",{className:"discover-card-tags",children:[t.origin==="raw"?(0,S.jsx)("div",{className:"pill-tag origin-pill",title:"Your own project \u2014 created from a prompt or your raw clips, not an imported inspiration",children:"Your project"}):null,t.visibility==="private"?(0,S.jsx)("div",{className:"pill-tag private-pill",title:"Only visible to your account",children:"Only you"}):null,t.status==="processing"?(0,S.jsx)("div",{className:"pill-tag processing-pill",children:"Processing"}):t.status==="failed"?(0,S.jsx)("div",{className:"pill-tag failed-pill",children:"Download failed"}):null,(0,S.jsx)("div",{className:"pill-tag difficulty-pill","data-difficulty":t.difficulty,children:sO(t.difficulty)}),(0,S.jsx)("div",{className:"pill-tag",children:t.sourceType||(Ad(t.previewUrl)?"Video source":"Image sequence")}),(0,S.jsx)(rO,{text:t.templateId,label:t.templateId})]})]})]})}function cO(e){let{onClose:t,template:r}=e,n=r.previewUrl||"",o=Ad(n),[i,s]=(0,de.useState)(""),a=EI();(0,de.useEffect)(()=>(hI(!0),()=>hI(!1)),[]);let l=async()=>{try{await navigator.clipboard.writeText(n),s("done")}catch{s("error")}window.setTimeout(()=>s(""),1600)};return(0,de.useEffect)(()=>{let c=d=>{d.key==="Escape"&&t()},u=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",c),()=>{document.body.style.overflow=u,window.removeEventListener("keydown",c)}},[t]),(0,S.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,S.jsxs)("div",{className:"discover-media-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-media-modal-title",onClick:c=>c.stopPropagation(),children:[(0,S.jsxs)("div",{className:"discover-media-modal-head",children:[(0,S.jsx)("h2",{id:"discover-media-modal-title",children:r.title}),(0,S.jsxs)("div",{className:"discover-media-modal-actions",children:[(0,S.jsx)("a",{className:"discover-media-modal-action",href:n,download:!0,"aria-label":`Download ${r.title} preview`,title:"Download",onClick:c=>c.stopPropagation(),children:(0,S.jsx)(XL,{})}),(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","data-state":i,"aria-label":i==="done"?"Media URL copied":i==="error"?"Unable to copy media URL":`Copy ${r.title} preview URL`,title:i==="done"?"Copied":i==="error"?"Copy failed":"Copy link",onClick:()=>{l()},children:(0,S.jsx)(JL,{})}),(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close preview",title:"Close",onClick:t,children:(0,S.jsx)(SI,{})})]})]}),(0,S.jsx)("div",{className:"discover-media-modal-stage",children:o?(0,S.jsx)("video",{src:n,controls:!0,autoPlay:!0,playsInline:!0,preload:"metadata",muted:a,onVolumeChange:c=>{let u=c.currentTarget.muted;u!==gs&&vI(u)}}):(0,S.jsx)("img",{src:n,alt:`${r.title} preview`})})]})})}function uO(e){let{onClose:t}=e,[r,n]=(0,de.useState)(""),[o,i]=(0,de.useState)(null),[s,a]=(0,de.useState)(""),[l,c]=(0,de.useState)(""),[u,d]=(0,de.useState)(""),[p,f]=(0,de.useState)(!1),[h,y]=(0,de.useState)(null);(0,de.useEffect)(()=>{let m=v=>{v.key==="Escape"&&t()},g=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",m),()=>{document.body.style.overflow=g,window.removeEventListener("keydown",m)}},[t]);let E=async()=>{let m=r.trim();if(!m&&!o){y("Paste a TikTok, YouTube, Twitter/X, or Instagram video URL \u2014 or upload a video file.");return}if(o&&o.size>200*1024*1024){y("Video uploads can be at most 200 MB.");return}f(!0),y(null);let g=await(e.onAddTemplate?.({sourceUrl:o?"":m,file:o,title:s.trim(),tagline:l.trim(),notes:u.trim()})??Promise.resolve({ok:!1,error:"Adding templates is unavailable right now."}));f(!1),g.ok?t():y(g.error||"Unable to add that video. Try again.")};return(0,S.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,S.jsxs)("div",{className:"discover-media-modal discover-add-template-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-add-template-title",onClick:m=>m.stopPropagation(),children:[(0,S.jsxs)("div",{className:"discover-media-modal-head",children:[(0,S.jsx)("h2",{id:"discover-add-template-title",children:"Add Template"}),(0,S.jsx)("div",{className:"discover-media-modal-actions",children:(0,S.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close",title:"Close",onClick:t,children:(0,S.jsx)(SI,{})})})]}),(0,S.jsxs)("form",{className:"discover-add-template-form",onSubmit:m=>{m.preventDefault(),E()},children:[(0,S.jsx)("p",{className:"discover-add-template-hint",children:"Paste a link to a TikTok, YouTube, Twitter/X, or Instagram video \u2014 or upload a video file from your computer. We add it to your Discover feed, visible only to your account."}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsx)("label",{className:"label",htmlFor:"add-template-url",children:"Video URL"}),(0,S.jsx)("input",{id:"add-template-url",type:"url",required:!o,disabled:!!o,placeholder:"https://www.tiktok.com/@creator/video/\u2026",autoComplete:"off",value:r,onChange:m=>n(m.target.value)})]}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-file",children:["Or upload a video ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"MP4 / MOV / WebM, up to 200 MB"})]}),o?(0,S.jsxs)("div",{className:"discover-add-template-file-chip",children:[(0,S.jsx)("span",{className:"discover-add-template-file-name",children:o.name}),(0,S.jsxs)("span",{className:"discover-add-template-file-size",children:[(o.size/(1024*1024)).toFixed(1)," MB"]}),(0,S.jsx)("button",{type:"button",className:"discover-add-template-file-clear","aria-label":"Remove selected file",onClick:()=>i(null),children:"\u2715"})]}):(0,S.jsx)("input",{id:"add-template-file",type:"file",accept:"video/mp4,video/quicktime,video/webm,.mp4,.m4v,.mov,.webm",onChange:m=>{let g=m.target.files?.[0]??null;g&&(i(g),n(""),y(null))}})]}),o?(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-title",children:["Title ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional \u2014 defaults to the template id"})]}),(0,S.jsx)("input",{id:"add-template-title",type:"text",placeholder:"Name this template\u2026",autoComplete:"off",maxLength:140,value:s,onChange:m=>a(m.target.value)})]}):null,(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-tagline",children:["Tagline ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,S.jsx)("input",{id:"add-template-tagline",type:"text",placeholder:"What makes this video work?",autoComplete:"off",maxLength:140,value:l,onChange:m=>c(m.target.value)})]}),(0,S.jsxs)("div",{className:"discover-add-template-field",children:[(0,S.jsxs)("label",{className:"label",htmlFor:"add-template-notes",children:["Notes ",(0,S.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,S.jsx)("textarea",{id:"add-template-notes",rows:4,placeholder:"Ideas for how you want to remix this\u2026",maxLength:2e3,value:u,onChange:m=>d(m.target.value)})]}),h?(0,S.jsx)("p",{className:"discover-add-template-error",role:"alert",children:h}):null,(0,S.jsxs)("div",{className:"toolbar discover-add-template-actions",children:[(0,S.jsx)("button",{type:"button",className:"secondary",onClick:t,disabled:p,children:"Cancel"}),(0,S.jsx)("button",{type:"submit",className:"cta-button discover-add-template-submit",disabled:p,children:p?o?"Uploading\u2026":"Adding\u2026":"Add Template"})]})]})]})})}function bI(e){let t=!e.loading&&!e.error&&e.templates.length>0&&e.visibleTemplates.length===0,[r,n]=(0,de.useState)(null),[o,i]=(0,de.useState)(!1),s=e.loading||e.error?"Search Templates":`Search ${e.visibleTemplates.length} Template${e.visibleTemplates.length===1?"":"s"}`,a=!0,l=e.account.isLoggedIn;return(0,S.jsxs)("section",{className:`frame discover-frame${a?" has-chat-rail":""}`,children:[(0,S.jsxs)("header",{className:"topbar",children:[(0,S.jsx)(KL,{account:e.account}),(0,S.jsx)("div",{className:"topbar-actions",children:(0,S.jsx)(qL,{account:e.account})})]}),(0,S.jsx)("div",{className:"frame-body",children:(0,S.jsxs)("section",{className:"discover-shell",children:[(0,S.jsxs)("div",{className:"discover-filter-bar",role:"toolbar","aria-label":"Composition filters",children:[(0,S.jsxs)("div",{className:"discover-filter-search search-field",children:[(0,S.jsx)("span",{className:"search-icon","aria-hidden":"true",children:(0,S.jsx)(GL,{})}),(0,S.jsx)("input",{id:"search",type:"search",placeholder:s,autoComplete:"off",value:e.searchQuery,onChange:c=>e.onSearchQueryChange?.(c.target.value)})]}),(0,S.jsxs)("label",{className:"discover-filter-toggle",htmlFor:"bookmarks-only","data-active":e.bookmarksOnly?"true":"false",children:[(0,S.jsx)("span",{className:"discover-filter-toggle-label",children:"Saved"}),(0,S.jsxs)("span",{className:"switch-shell","data-active":e.bookmarksOnly?"true":"false",children:[(0,S.jsx)("input",{id:"bookmarks-only",className:"switch-input",type:"checkbox",checked:e.bookmarksOnly,onChange:c=>e.onBookmarksOnlyChange?.(c.target.checked)}),(0,S.jsx)("span",{className:"switch-knob"})]})]}),e.account.isLoggedIn?(0,S.jsx)("button",{type:"button",className:"discover-add-template-button",onClick:()=>i(!0),children:"Add Template"}):(0,S.jsx)("a",{className:"discover-add-template-button",href:"/login",children:"Add Template"}),(0,S.jsx)(tO,{})]}),(0,S.jsx)("section",{className:"discover-results",children:(0,S.jsx)("div",{className:"discover-results-scroll",children:(0,S.jsxs)("div",{className:"discover-list-scroll",children:[(0,S.jsx)("ul",{className:"discover-list",id:"template-list",children:e.loading?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading compositions..."}):e.error?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"Unable to load compositions."}):e.templates.length===0?(0,S.jsx)("li",{className:"empty-state discover-loading-card",children:"No compositions available."}):e.visibleTemplates.map(c=>(0,S.jsx)(lO,{template:c,isBookmarked:e.bookmarks.has(c.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId},c.templateId))}),(0,S.jsx)("div",{className:"empty-state empty",id:"empty-state","data-visible":t?"true":"false",children:"No compositions match the current search and filter combination."})]})})})]})}),a?(0,S.jsx)("aside",{className:"editor-right-rail","aria-label":"Discover copilot",children:l?(0,S.jsx)("div",{className:"editor-chat-panel","data-template-editor-chat-root":!0}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("a",{className:"vf-editor-chat-mobile-fab",href:"/login","aria-label":"Log in to chat with Vidfarm",children:(0,S.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,S.jsx)("path",{d:"M20 11.5a7.5 7.5 0 0 1-9.8 7.1L4 20l1.5-5.3A7.5 7.5 0 1 1 20 11.5Z"})})}),(0,S.jsxs)("div",{className:"editor-chat-panel editor-chat-panel--logged-out",style:{display:"flex",flexDirection:"column",height:"100%",padding:"20px",gap:"16px",boxSizing:"border-box"},children:[(0,S.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[(0,S.jsx)("span",{className:"label",style:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",color:"#a9884a"},children:"Vidfarm copilot"}),(0,S.jsx)("h3",{style:{margin:0,fontSize:"1.05rem",color:"#2f3748"},children:"Chat with Vidfarm"}),(0,S.jsx)("p",{style:{margin:0,fontSize:"0.9rem",color:"#74829c"},children:"Ask for hooks, angles, and remixes tailored to compositions in your library."})]}),(0,S.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginTop:"14px"},"aria-hidden":"true",children:["Give me 10 hooks for this coffee-shop template","Which awareness stage fits my product?","Remix this into an ad for my brand"].map(c=>(0,S.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 14px",borderRadius:"14px",border:"1px dashed rgba(191, 164, 109, 0.45)",background:"rgba(250, 245, 234, 0.65)",color:"#74829c",fontSize:"0.85rem",lineHeight:1.35},children:[(0,S.jsx)("span",{style:{color:"#bfa46d",fontWeight:700},children:"\u201C"}),c]},c))}),(0,S.jsxs)("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,S.jsx)("textarea",{rows:3,placeholder:"Log in to chat with Vidfarm\u2026",disabled:!0,"aria-label":"Chat with Vidfarm (log in to enable)",style:{width:"100%",resize:"none",padding:"10px 12px",borderRadius:"10px",border:"1px solid rgba(191, 164, 109, 0.36)",background:"rgba(250, 245, 234, 0.9)",color:"#74829c",fontFamily:"inherit",fontSize:"0.9rem",cursor:"not-allowed",boxSizing:"border-box"}}),(0,S.jsx)("a",{href:"/login",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:"38px",padding:"0 16px",borderRadius:"999px",background:"#bfa46d",color:"#1a1409",fontWeight:700,fontSize:"0.9rem",textDecoration:"none"},children:"Log in to chat"})]})]})]})}):null,r?(0,S.jsx)(cO,{template:r,onClose:()=>n(null)}):null,o?(0,S.jsx)(uO,{onClose:()=>i(!1),onAddTemplate:e.onAddTemplate}):null]})}function II(e){return sI(t=>({templates:e.templates,searchQuery:"",bookmarksOnly:!1,bookmarks:new Set,loading:e.templates.length===0,error:null,setTemplates:r=>t({templates:r,loading:!1,error:null}),setSearchQuery:r=>t({searchQuery:r}),setBookmarksOnly:r=>t({bookmarksOnly:r}),setBookmarks:r=>t({bookmarks:new Set(r)}),toggleBookmark:r=>t(n=>{let o=new Set(n.bookmarks);return o.has(r)?o.delete(r):o.add(r),{bookmarks:o}}),setLoading:r=>t({loading:r}),setError:r=>t({error:r,loading:!1})}))}var Zo=mr(xl(),1);lI();var dO="vidfarm:discover-bookmarks:v1",pO="public";function fO(){let e=document.getElementById("homepage-boot");return e?.textContent?JSON.parse(e.textContent):{templates:[],account:{isLoggedIn:!1},loadEndpoint:"/discover/feed",skillEndpointPrefix:"/discover/skills/"}}function wI(e){return`${dO}_${e?.trim()||pO}`}function mO(e){try{let t=window.localStorage.getItem(wI(e));if(!t)return new Set;let r=JSON.parse(t);return Array.isArray(r)?new Set(r.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function hO(e,t){try{window.localStorage.setItem(wI(t),JSON.stringify(Array.from(e)))}catch{}}function gO(e){let t=e.searchQuery.trim().toLowerCase();return e.templates.filter(r=>{let n=!t||`${r.templateId} ${r.title} ${r.slugId} ${r.difficulty}`.toLowerCase().includes(t),o=!e.bookmarksOnly||e.bookmarks.has(r.templateId);return n&&o})}function SO({boot:e}){let t=(0,Dt.useMemo)(()=>II(e),[e]),r=Qo(t,y=>y.templates),n=Qo(t,y=>y.searchQuery),o=Qo(t,y=>y.bookmarksOnly),i=Qo(t,y=>y.bookmarks),s=Qo(t,y=>y.loading),a=Qo(t,y=>y.error),[l,c]=(0,Dt.useState)(!1),u=(0,Dt.useMemo)(()=>gO({templates:r,searchQuery:n,bookmarksOnly:o,bookmarks:i}),[r,n,o,i]);(0,Dt.useEffect)(()=>{t.getState().setBookmarks(mO(e.account.userId)),c(!0)},[e.account.userId,t]),(0,Dt.useEffect)(()=>{l&&hO(i,e.account.userId)},[e.account.userId,i,l]);let d=(0,Dt.useCallback)(async y=>{y?.showLoading&&t.getState().setLoading(!0);try{let E=await fetch(e.loadEndpoint,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),m=await E.json().catch(()=>({}));if(!E.ok)throw new Error(typeof m.error=="string"&&m.error?m.error:"Unable to load formats.");t.getState().setTemplates(Array.isArray(m.templates)?m.templates:[])}catch(E){y?.showLoading?t.getState().setError(E instanceof Error?E.message:"Unable to load formats."):hs("homepage.feed_refresh_failed",{message:E instanceof Error?E.message:String(E)})}},[e.loadEndpoint,t]);(0,Dt.useEffect)(()=>{e.templates.length>0||d({showLoading:!0})},[e.templates.length,d]);let p=r.some(y=>y.status==="processing");(0,Dt.useEffect)(()=>{if(!p)return;let y=window.setInterval(()=>{d()},8e3);return()=>window.clearInterval(y)},[p,d]);let f=(0,Dt.useCallback)(async y=>{try{let E=await fetch(`/discover/templates/${encodeURIComponent(y)}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json"}}),m=await E.json().catch(()=>({}));return E.ok?(Il("homepage.template_deleted",{template_id:y}),await d(),{ok:!0}):{ok:!1,error:typeof m.error=="string"&&m.error?m.error:"Unable to delete this template."}}catch(E){return{ok:!1,error:E instanceof Error?E.message:"Unable to delete this template."}}},[d]),h=(0,Dt.useCallback)(async y=>{try{let E=null;if(y.file){let v=y.file,b=await fetch("/discover/templates/upload/presign",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({file_name:v.name,content_type:v.type||null,size_bytes:v.size})}),k=await b.json().catch(()=>({}));if(!b.ok)return{ok:!1,error:k.error||"Unable to start the video upload."};if(k.transport==="presigned"&&k.upload?.url&&k.storage_key){let w=await fetch(k.upload.url,{method:k.upload.method||"PUT",headers:k.upload.headers||{},body:v});if(!w.ok)return{ok:!1,error:`Video upload failed (${w.status}). Try again.`};E={storage_key:k.storage_key,file_name:k.file_name||v.name}}else{let w=new FormData;w.append("file",v,k.file_name||v.name);let _=await fetch(k.upload?.url||"/discover/templates/upload",{method:"POST",credentials:"same-origin",body:w}),I=await _.json().catch(()=>({}));if(!_.ok||!I.storage_key)return{ok:!1,error:I.error||"Video upload failed. Try again."};E={storage_key:I.storage_key,file_name:I.file_name||v.name}}}let m=await fetch("/discover/templates",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(E?{upload:E,title:y.title||null,tagline:y.tagline||null,notes:y.notes||null}:{source_url:y.sourceUrl,tagline:y.tagline||null,notes:y.notes||null})}),g=await m.json().catch(()=>({}));return m.ok?(Il("homepage.template_added",E?{storage_key:E.storage_key}:{source_url:y.sourceUrl}),await d(),{ok:!0}):{ok:!1,error:typeof g.error=="string"&&g.error?g.error:"Unable to add that video."}}catch(E){return{ok:!1,error:E instanceof Error?E.message:"Unable to add that video."}}},[d]);return(0,Zo.jsx)(bI,{account:e.account,templates:r,visibleTemplates:u,searchQuery:n,bookmarksOnly:o,bookmarks:i,loading:s,error:a,skillEndpointPrefix:e.skillEndpointPrefix,onSearchQueryChange:y=>t.getState().setSearchQuery(y),onBookmarksOnlyChange:y=>t.getState().setBookmarksOnly(y),onToggleBookmark:y=>t.getState().toggleBookmark(y),onAddTemplate:h,onDeleteTemplate:f})}var Ld=fO(),xI=document.getElementById("homepage-root");Il("homepage.boot",{is_logged_in:Ld.account?.isLoggedIn??!1,template_count:Ld.templates?.length??0,load_endpoint:Ld.loadEndpoint});xI?(0,kI.hydrateRoot)(xI,(0,Zo.jsx)(Aa,{fallback:(0,Zo.jsx)(Zo.Fragment,{}),onError:e=>hs("homepage.render_error",{message:e instanceof Error?e.message:String(e)}),children:(0,Zo.jsx)(SO,{boot:Ld})})):hs("homepage.no_root_element",{});
|
|
30
|
+
or you can use record.mirror to access the mirror instance during recording.`,Qy={map:{},getId(){return console.error(Ai),-1},getNode(){return console.error(Ai),null},removeNodeFromMap(){console.error(Ai)},has(){return console.error(Ai),!1},reset(){console.error(Ai)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Qy=new Proxy(Qy,{get(e,t,r){return t==="map"&&console.error(Ai),Reflect.get(e,t,r)}}));function Ea(e,t,r={}){let n=null,o=0;return function(...i){let s=Date.now();!o&&r.leading===!1&&(o=s);let a=t-(s-o),l=this;a<=0||a>t?(n&&(RC(n),n=null),o=s,e.apply(l,i)):!n&&r.trailing!==!1&&(n=ou(()=>{o=r.leading===!1?0:Date.now(),n=null,e.apply(l,i)},a))}}function w_(e,t,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(s){ou(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>w_(e,t,i||{},!0)}function Jf(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}var Gc=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gc=()=>new Date().getTime());function I_(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function x_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function R_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function C_(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function jt(e,t,r,n,o){if(!e)return!1;let i=C_(e);if(!i)return!1;let s=Oi(t,r);if(!o){let c=n&&i.matches(n);return s(i)&&!c}let a=Uo(i,s),l=-1;return a<0?!1:(n&&(l=Uo(i,Oi(null,n))),a>-1&&l<0?!0:a<l)}function bC(e,t){return t.getId(e)!==-1}function Sf(e,t){return t.getId(e)===_a}function N_(e,t){if(ha(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?N_(e.parentNode,t):!0:!0}function kf(e){return!!e.changedTouches}function kC(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 r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function A_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function M_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function wf(e){return!!e?.shadowRoot}var If=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function L_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function wC(e){let t=e,r;for(;r=L_(t);)t=r;return t}function IC(e){let t=e.ownerDocument;if(!t)return!1;let r=wC(e);return t.contains(r)}function O_(e){let t=e.ownerDocument;return t?t.contains(e)||IC(e):!1}var e_={};function Zf(e){let t=e_[e];if(t)return t;let r=window.document,n=window[e];if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch{}return e_[e]=n.bind(window)}function xC(...e){return Zf("requestAnimationFrame")(...e)}function ou(...e){return Zf("setTimeout")(...e)}function RC(...e){return Zf("clearTimeout")(...e)}var q=(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))(q||{}),Y=(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))(Y||{}),Tt=(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))(Tt||{}),fn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(fn||{}),Mi=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Mi||{}),va;function CC(e){va=e}function NC(){va=void 0}var te=e=>va?((...r)=>{try{return e(...r)}catch(n){if(va&&va(n)===!0)return()=>{};throw n}}):e,t_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",AC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ma=0;ma<t_.length;ma++)AC[t_.charCodeAt(ma)]=ma;var ma,Vc=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Qf(e){try{return e.contentDocument}catch{}}function Ta(e){try{return e.contentWindow}catch{}}var xf=class{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{let r=new CSSStyleSheet;r.replaceSync(`x { ${t} }`);let n=r.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(t){let r=this.getUnattachedDoc().createElement("span");return r.setAttribute("style",t),r.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function r_(e){return"__ln"in e}var Rf=class{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 r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&r_(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&r_(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},n_=(e,t)=>`${e}@${t}`,Cf=class{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;let t=[],r=new Set,n=new Rf,o=l=>{let c=l,u=_a;for(;u===_a;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},i=l=>{if(!l.parentNode||!O_(l))return;let c=ha(l.parentNode)?this.mirror.getId(L_(l)):this.mirror.getId(l.parentNode),u=o(l);if(c===-1||u===-1)return n.addNode(l);let d=Pi(l,{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:p=>{A_(p,this.mirror)&&!jt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),M_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),wf(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(jt(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);let h=Ta(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:y})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${y}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:c,nextId:u,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)o_(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(let l of this.addedSet)!i_(this.droppedSet,l)&&!o_(this.removes,l,this.mirror)||i_(this.movedSet,l)?i(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let c=this.mirror.getId(s.value.parentNode),u=o(s.value);c!==-1&&u!==-1&&(l=s)}if(!l){let c=n.tail;for(;c;){let u=c;if(c=c.previous,u){let d=this.mirror.getId(u.value.parentNode);if(o(u.value)===-1)continue;if(d!==-1){l=u;break}else{let f=u.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=f.parentNode.host;if(this.mirror.getId(h)!==-1){l=u;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),i(l.value)}let a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:c}=l;if(typeof c.style=="string"){let u=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+d).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Sf(t.target,this.mirror))switch(t.type){case"characterData":{let r=t.target.textContent;!jt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Bi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&r?this.maskTextFn?this.maskTextFn(r,C_(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,o=t.target.getAttribute(n);if(n==="value"){let s=Kf(r),a=r.tagName;o=Wc(r,a,s);let l=ru({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),c=Bi(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);o=ya({isMasked:c,element:r,value:o,maskInputFn:this.maskInputFn})}if(jt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(o))if(!Qf(r))n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!k_(r.tagName,n)&&(i.attributes[n]=b_(this.doc,Ui(r.tagName),Ui(n),o,r,this.maskAttributeFn),n==="style")){let s=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(let a of Array.from(r.style)){let l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);l!==(s?.getPropertyValue(a)||"")||c!==(s?.getPropertyPriority(a)||"")?c===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,c]:i._unchangedStyles[a]=[l,c]}if(s)for(let a of Array.from(s))r.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(jt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),o=ha(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);jt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Sf(r,this.mirror)||!bC(r,this.mirror)||(this.addedSet.has(r)?(Nf(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||N_(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[n_(n,o)]?Nf(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ha(t.target)&&Sa(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Sf(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[n_(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);jt(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(n=>this.genAdds(n)),wf(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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","ignoreCSSAttributes"].forEach(r=>{this[r]=t[r]}),this.styleDeclarationParser=new xf(this.doc)}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 Nf(e,t){e.delete(t),t.childNodes?.forEach(r=>Nf(e,r))}function o_(e,t,r){return e.length===0?!1:MC(e,t,r)}function MC(e,t,r){let n=t.parentNode;for(;n;){let o=r.getId(n);if(e.some(i=>i.id===o))return!0;n=n.parentNode}return!1}function i_(e,t){return e.size===0?!1:P_(e,t)}function P_(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:P_(e,r):!1}var Di=[];function xa(e){try{if("composedPath"in e){let 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 D_(e,t){let r=new Cf;Di.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(n=window[o]);let i=new n(te(s=>{e.onMutation&&e.onMutation(s)===!1||r.processMutations.bind(r)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function LC({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,l=Ea(te(d=>{let p=Date.now()-a;e(s.map(f=>(f.timeOffset-=p,f)),d),s=[],a=null}),i),c=te(Ea(te(d=>{let p=xa(d),{clientX:f,clientY:h}=kf(d)?d.changedTouches[0]:d;a||(a=Gc()),s.push({x:f,y:h,id:n.getId(p),timeOffset:Gc()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Y.Drag:d instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),o,{trailing:!1})),u=[bt("mousemove",c,r),bt("touchmove",c,r),bt("drag",c,r)];return te(()=>{u.forEach(d=>d())})}function OC({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],c=null,u=d=>p=>{let f=xa(p);if(jt(f,n,o,i,!0))return;let h=null,y=d;if("pointerType"in p){switch(p.pointerType){case"mouse":h=fn.Mouse;break;case"touch":h=fn.Touch;break;case"pen":h=fn.Pen;break}h===fn.Touch?Tt[d]===Tt.MouseDown?y="TouchStart":Tt[d]===Tt.MouseUp&&(y="TouchEnd"):fn.Pen}else kf(p)&&(h=fn.Touch);h!==null?(c=h,(y.startsWith("Touch")&&h===fn.Touch||y.startsWith("Mouse")&&h===fn.Mouse)&&(h=null)):Tt[d]===Tt.Click&&(h=c,c=null);let k=kf(p)?p.changedTouches[0]:p;if(!k)return;let g=r.getId(f),{clientX:S,clientY:v}=k;te(e)({type:Tt[y],id:g,x:S,y:v,...h!==null&&{pointerType:h}})};return Object.keys(Tt).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let p=Ui(d),f=u(d);if(window.PointerEvent)switch(Tt[d]){case Tt.MouseDown:case Tt.MouseUp:p=p.replace("mouse","pointer");break;case Tt.TouchStart:case Tt.TouchEnd:return}l.push(bt(p,f,t))}),te(()=>{l.forEach(d=>d())})}function U_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,sampling:s}){let a=te(Ea(te(l=>{let c=xa(l);if(!c||jt(c,n,o,i,!0))return;let u=r.getId(c);if(c===t&&t.defaultView){let d=I_(t.defaultView);e({id:u,x:d.left,y:d.top})}else e({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return bt("scroll",a,t)}function PC({viewportResizeCb:e},{win:t}){let r=-1,n=-1,o=te(Ea(te(()=>{let i=x_(),s=R_();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return bt("resize",o,t)}var DC=["INPUT","TEXTAREA","SELECT"],s_=new WeakMap;function UC({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:y}){function k(_){let w=xa(_),z=_.isTrusted,I=w&&Tf(w.tagName);if(I==="OPTION"&&(w=w.parentElement),!w||!I||DC.indexOf(I)<0||jt(w,n,o,i,!0))return;let P=w;if(P.classList.contains(s)||a&&P.matches(a))return;let W=Kf(w),K=Wc(P,I,W),V=!1,Pe=ru({maskInputOptions:l,tagName:I,type:W}),ue=Bi(w,p,h,f,y,Pe);(W==="radio"||W==="checkbox")&&(V=w.checked),K=ya({isMasked:ue,element:w,value:K,maskInputFn:c}),g(w,d?{text:K,isChecked:V,userTriggered:z}:{text:K,isChecked:V});let fe=w.name;W==="radio"&&fe&&V&&t.querySelectorAll(`input[type="radio"][name="${fe}"]`).forEach(L=>{if(L!==w){let b=ya({isMasked:ue,element:L,value:Wc(L,I,W),maskInputFn:c});g(L,d?{text:b,isChecked:!V,userTriggered:!1}:{text:b,isChecked:!V})}})}function g(_,w){let z=s_.get(_);if(!z||z.text!==w.text||z.isChecked!==w.isChecked){s_.set(_,w);let I=r.getId(_);te(e)({...w,id:I})}}let v=(u.input==="last"?["change"]:["input","change"]).map(_=>bt(_,te(k),t)),E=t.defaultView;if(!E)return()=>{v.forEach(_=>_())};let C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),R=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&v.push(...R.map(_=>w_(_[0],_[1],{set(){te(k)({target:this,isTrusted:!1})}},!1,E))),te(()=>{v.forEach(_=>_())})}function Yc(e){let t=[];function r(n,o){if(Uc("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Uc("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Uc("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Uc("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(s)}return o}return r(e,t)}function Fn(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function BC({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:te((u,d,p)=>{let[f,h]=p,{id:y,styleId:k}=Fn(d,t,r.styleMirror);return(y&&y!==-1||k&&k!==-1)&&e({id:y,styleId:k,adds:[{rule:f,index:h}]}),u.apply(d,p)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,removes:[{index:f}]}),u.apply(d,p)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replace:f}),u.apply(d,p)})}));let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:te((u,d,p)=>{let[f]=p,{id:h,styleId:y}=Fn(d,t,r.styleMirror);return(h&&h!==-1||y&&y!==-1)&&e({id:h,styleId:y,replaceSync:f}),u.apply(d,p)})}));let l={};Bc("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(Bc("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),Bc("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),Bc("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[u].insertRule,{apply:te((p,f,h)=>{let[y,k]=h,{id:g,styleId:S}=Fn(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,adds:[{rule:y,index:[...Yc(f),k||0]}]}),p.apply(f,h)})}),d.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:te((p,f,h)=>{let[y]=h,{id:k,styleId:g}=Fn(f.parentStyleSheet,t,r.styleMirror);return(k&&k!==-1||g&&g!==-1)&&e({id:k,styleId:g,removes:[{index:[...Yc(f),y]}]}),p.apply(f,h)})})}),te(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})})}function B_({mirror:e,stylesheetManager:t},r){let n=null;r.nodeName==="#document"?n=e.getId(r):n=e.getId(r.host);let o=r.nodeName==="#document"?r.defaultView?.Document:r.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!o||!i?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(n!==null&&n!==-1)try{t.adoptStyleSheets(s,n)}catch{}return a}}),te(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function FC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:te((a,l,c)=>{let[u,d,p]=c;if(r.has(u))return i.apply(l,[u,d,p]);let{id:f,styleId:h}=Fn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:u,value:d,priority:p},index:Yc(l.parentRule)}),a.apply(l,c)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:te((a,l,c)=>{let[u]=c;if(r.has(u))return s.apply(l,[u]);let{id:d,styleId:p}=Fn(l.parentRule?.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:u},index:Yc(l.parentRule)}),a.apply(l,c)})}),te(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function HC({mediaInteractionCb:e,blockClass:t,blockSelector:r,unblockSelector:n,mirror:o,sampling:i,doc:s}){let a=te(c=>Ea(te(u=>{let d=xa(u);if(!d||jt(d,t,r,n,!0))return;let{currentTime:p,volume:f,muted:h,playbackRate:y}=d;e({type:c,id:o.getId(d),currentTime:p,volume:f,muted:h,playbackRate:y})}),i.media||500)),l=[bt("play",a(Mi.Play),s),bt("pause",a(Mi.Pause),s),bt("seeked",a(Mi.Seeked),s),bt("volumechange",a(Mi.VolumeChange),s),bt("ratechange",a(Mi.RateChange),s)];return te(()=>{l.forEach(c=>c())})}function zC({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let s=Jf(t.fonts,"add",function(a){return function(l){return ou(te(()=>{let c=o.get(l);c&&(e(c),o.delete(l))}),0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=i}),n.push(s),te(()=>{n.forEach(a=>a())})}function $C(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,l=te(()=>{let c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;let u=[],d=c.rangeCount||0;for(let p=0;p<d;p++){let f=c.getRangeAt(p),{startContainer:h,startOffset:y,endContainer:k,endOffset:g}=f;jt(h,n,o,i,!0)||jt(k,n,o,i,!0)||u.push({start:r.getId(h),startOffset:y,end:r.getId(k),endOffset:g})}s({ranges:u})});return l(),bt("selectionchange",l)}function WC({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Jf(r.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function jC(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};let n;e.recordDOM&&(n=D_(e,e.doc));let o=LC(e),i=OC(e),s=U_(e),a=PC(e,{win:r}),l=UC(e),c=HC(e),u=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(u=BC(e,{win:r}),d=B_(e,e.doc),p=FC(e,{win:r}),e.collectFonts&&(f=zC(e)));let h=$C(e),y=WC(e),k=[];for(let g of e.plugins)k.push(g.observer(g.callback,r,g.options));return te(()=>{Di.forEach(g=>g.reset()),n?.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),p(),f(),h(),y(),k.forEach(g=>g())})}function Uc(e){return typeof window[e]<"u"}function Bc(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ba=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,o){let i=n||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(r);return a||(a=this.generateIdFn(),i.set(r,a),s.set(a,r)),a}getIds(t,r){let n=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,o))}getRemoteId(t,r,n){let o=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=o.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(o=>this.getRemoteId(t,o,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},Af=class{constructor(){this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Mf=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ba(Xf),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(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);let r=Ta(t);r&&this.crossOriginIframeMap.set(r,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&Ta(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let n=Qf(t);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){switch(r.type){case q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let n=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(r.data.node,n),{timestamp:r.timestamp,type:q.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return r;case q.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case q.IncrementalSnapshot:switch(r.data.source){case Y.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(n.node,o)}),r.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),r;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(r.data,t,["id"]),r;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case Y.Font:return r;case Y.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),r;case Y.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),r.data.styles?.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),r}}return!1}replace(t,r,n,o){for(let i of o)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Fe.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Lf=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Of=class{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,r){if(!Sa(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let n=D_({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(U_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ou(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(B_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let r=Qf(t),n=Ta(t);!r||!n||this.patchAttachShadow(n.Element,r)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(Jf(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&O_(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},Pf=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new If,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:v_(a),index:l}))})),n.styleIds.push(s)}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Df=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(o=>o!==r)}add(t,r){this.active||(this.active=!0,xC(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Le,qc;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var xr=JR();function Rr(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:c=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:y,maskInputOptions:k,slimDOMOptions:g,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,maxCanvasSize:C=null,packFn:R,sampling:_={},dataURLOptions:w={},mousemoveWait:z,recordDOM:I=!0,recordCanvas:P=!1,recordCrossOriginIframes:W=!1,recordAfter:K=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Pe=!1,inlineImages:ue=!1,plugins:fe,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:b=new Set([]),errorHandler:x,onMutation:A,getCanvasManager:oe}=e;CC(x);let J=W?window.parent===window:!0,ot=!1;if(!J)try{window.parent.document&&(ot=!1)}catch{ot=!0}if(J&&!t)throw new Error("emit function is required");if(!J&&!ot)return()=>{};z!==void 0&&_.mousemove===void 0&&(_.mousemove=z),xr.reset();let Ie=y===!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:{},it=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all"}:g||{};kC();let Jt,Zt=0,Ss=se=>{for(let Sr of fe||[])Sr.eventProcessor&&(se=Sr.eventProcessor(se));return R&&!ot&&(se=R(se)),se};Le=(se,Sr)=>{let Z=se;if(Z.timestamp=Gc(),Di[0]?.isFrozen()&&Z.type!==q.FullSnapshot&&!(Z.type===q.IncrementalSnapshot&&Z.data.source===Y.Mutation)&&Di.forEach(Xe=>Xe.unfreeze()),J)t?.(Ss(Z),Sr);else if(ot){let Xe={type:"rrweb",event:Ss(Z),origin:window.location.origin,isCheckout:Sr};window.parent.postMessage(Xe,"*")}if(Z.type===q.FullSnapshot)Jt=Z,Zt=0;else if(Z.type===q.IncrementalSnapshot){if(Z.data.source===Y.Mutation&&Z.data.isAttachIframe)return;Zt++;let Xe=n&&Zt>=n,Q=r&&Jt&&Z.timestamp-Jt.timestamp>r;(Xe||Q)&&Dd(!0)}};let co=se=>{Le({type:q.IncrementalSnapshot,data:{source:Y.Mutation,...se}})},Dh=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.Scroll,...se}}),Nk=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...se}}),Ak=se=>Le({type:q.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...se}}),uo=new Pf({mutationCb:co,adoptedStyleSheetCb:Ak}),po=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Af:new Mf({mirror:xr,mutationCb:co,stylesheetManager:uo,recordCrossOriginIframes:W,wrappedEmit:Le});for(let se of fe||[])se.getMirror&&se.getMirror({nodeMirror:xr,crossOriginIframeMirror:po.crossOriginIframeMirror,crossOriginIframeStyleMirror:po.crossOriginIframeStyleMirror});let Od=new Df,Pd=VC(oe,{mirror:xr,win:window,mutationCb:se=>Le({type:q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...se}}),recordCanvas:P,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:C,sampling:_.canvas,dataURLOptions:w,errorHandler:x}),Il=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lf:new Of({mutationCb:co,scrollCb:Dh,bypassOptions:{onMutation:A,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:Ie,dataURLOptions:w,maskAttributeFn:S,maskTextFn:E,maskInputFn:v,recordCanvas:P,inlineImages:ue,sampling:_,slimDOMOptions:it,iframeManager:po,stylesheetManager:uo,canvasManager:Pd,keepIframeSrcFn:L,processedNodeManager:Od,ignoreCSSAttributes:b},mirror:xr}),Dd=(se=!1)=>{if(!I)return;Le({type:q.Meta,data:{href:window.location.href,width:R_(),height:x_()}},se),uo.reset(),Il.init(),Di.forEach(Z=>Z.lock());let Sr=TC(document,{mirror:xr,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:Ie,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,slimDOM:it,dataURLOptions:w,recordCanvas:P,inlineImages:ue,onSerialize:Z=>{A_(Z,xr)&&po.addIframe(Z),M_(Z,xr)&&uo.trackLinkElement(Z),wf(Z)&&Il.addShadowRoot(Z.shadowRoot,document)},onIframeLoad:(Z,Xe)=>{po.attachIframe(Z,Xe);let Q=Ta(Z);Q&&Pd.addWindow(Q),Il.observeAttachShadow(Z)},onStylesheetLoad:(Z,Xe)=>{uo.attachLinkElement(Z,Xe)},onBlockedImageLoad:(Z,Xe,{width:Q,height:vs})=>{co({adds:[],removes:[],texts:[],attributes:[{id:Xe.id,attributes:{style:{width:`${Q}px`,height:`${vs}px`}}}]})},keepIframeSrcFn:L,ignoreCSSAttributes:b});if(!Sr)return console.warn("Failed to snapshot the document");Le({type:q.FullSnapshot,data:{node:Sr,initialOffset:I_(window)}}),Di.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&uo.adoptStyleSheets(document.adoptedStyleSheets,xr.getId(document))};qc=Dd;try{let se=[],Sr=Xe=>te(jC)({onMutation:A,mutationCb:co,mousemoveCb:(Q,vs)=>Le({type:q.IncrementalSnapshot,data:{source:vs,positions:Q}}),mouseInteractionCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.MouseInteraction,...Q}}),scrollCb:Dh,viewportResizeCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.ViewportResize,...Q}}),inputCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.Input,...Q}}),mediaInteractionCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.MediaInteraction,...Q}}),styleSheetRuleCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...Q}}),styleDeclarationCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...Q}}),canvasMutationCb:Nk,fontCb:Q=>Le({type:q.IncrementalSnapshot,data:{source:Y.Font,...Q}}),selectionCb:Q=>{Le({type:q.IncrementalSnapshot,data:{source:Y.Selection,...Q}})},customElementCb:Q=>{Le({type:q.IncrementalSnapshot,data:{source:Y.CustomElement,...Q}})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:Ie,inlineStylesheet:h,sampling:_,recordDOM:I,recordCanvas:P,inlineImages:ue,userTriggeredOnInput:V,collectFonts:Pe,doc:Xe,maskAttributeFn:S,maskInputFn:v,maskTextFn:E,keepIframeSrcFn:L,blockSelector:i,unblockSelector:s,slimDOMOptions:it,dataURLOptions:w,mirror:xr,iframeManager:po,stylesheetManager:uo,shadowDomManager:Il,processedNodeManager:Od,canvasManager:Pd,ignoreCSSAttributes:b,plugins:fe?.filter(Q=>Q.observer)?.map(Q=>({observer:Q.observer,options:Q.options,callback:vs=>Le({type:q.Plugin,data:{plugin:Q.name,payload:vs}})}))||[]},{});po.addLoadListener(Xe=>{try{se.push(Sr(Xe.contentDocument))}catch(Q){console.warn(Q)}});let Z=()=>{Dd(),se.push(Sr(document))};return document.readyState==="interactive"||document.readyState==="complete"?Z():(se.push(bt("DOMContentLoaded",()=>{Le({type:q.DomContentLoaded,data:{}}),K==="DOMContentLoaded"&&Z()})),se.push(bt("load",()=>{Le({type:q.Load,data:{}}),K==="load"&&Z()},window))),()=>{se.forEach(Xe=>Xe()),Od.destroy(),qc=void 0,NC()}}catch(se){console.warn(se)}}function GC(e){if(!qc)throw new Error("please take full snapshot after start recording");qc(e)}Rr.mirror=xr;Rr.takeFullSnapshot=GC;function VC(e,t){try{return e?e(t):new Vc}catch{return console.warn("Unable to initialize CanvasManager"),new Vc}}var a_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(a_||(a_={}));var YC=3,qC=5;function em(e){return e>9999999999?e:e*1e3}function vf(e){return e>9999999999?e/1e3:e}function Ra(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ct(t,10,1e3)}}),t.category==="console")))}var KC="button,a";function F_(e){return e.closest(KC)||e}function H_(e){let t=z_(e);return!t||!(t instanceof Element)?t:F_(t)}function z_(e){return XC(e)?e.target:e}function XC(e){return typeof e=="object"&&!!e&&"target"in e}var Hn;function JC(e){return Hn||(Hn=[],ZC()),Hn.push(e),()=>{let t=Hn?Hn.indexOf(e):-1;t>-1&&Hn.splice(t,1)}}function ZC(){Ae(he,"open",function(e){return function(...t){if(Hn)try{Hn.forEach(r=>r())}catch{}return e.apply(he,t)}})}var QC=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function eN(e,t,r){e.handleClick(t,r)}var Uf=class{constructor(t,r,n=Ra){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=r.timeout/1e3,this._threshold=r.threshold/1e3,this._scrollTimeout=r.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=r.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let t=JC(()=>{this._lastMutation=l_()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,r){if(rN(r,this._ignoreSelector)||!nN(t))return;let n={timestamp:vf(t.timestamp),clickBreadcrumb:t,clickCount:0,node:r};this._clicks.some(o=>o.node===n.node&&Math.abs(o.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=vf(t)}registerScroll(t=Date.now()){this._lastScroll=vf(t)}registerClick(t){let r=F_(t);this._handleMultiClick(r)}_handleMultiClick(t){this._getClicks(t).forEach(r=>{r.clickCount++})}_getClicks(t){return this._clicks.filter(r=>r.node===t)}_checkClicks(){let t=[],r=l_();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=r&&t.push(n)});for(let n of t){let o=this._clicks.indexOf(n);o>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let r=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!n&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,c=l<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),timeAfterClickMs:l,endReason:c,clickCount:s||1}};this._addBreadcrumbEvent(r,u);return}if(s>1){let l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:he.location.href,route:r.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(r,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Do(()=>this._checkClicks(),1e3)}},tN=["A","BUTTON","INPUT"];function rN(e,t){return!!(!tN.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 nN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function l_(){return Date.now()/1e3}function oN(e,t){try{if(!iN(t))return;let{source:r}=t.data;if(QC.has(r)&&e.registerMutation(t.timestamp),r===Y.Scroll&&e.registerScroll(t.timestamp),sN(t)){let{type:n,id:o}=t.data,i=Rr.mirror.getNode(o);i instanceof HTMLElement&&n===Tt.Click&&e.registerClick(i)}}catch{}}function iN(e){return e.type===YC}function sN(e){return e.data.source===Y.MouseInteraction}function jr(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var iu=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(iu||{}),aN=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function lN(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let r in e)if(aN.has(r)){let n=r;(r==="data-testid"||r==="data-test-id")&&(n="testId"),t[n]=e[r]}return t}var cN=e=>t=>{if(!e.isEnabled())return;let r=uN(t);if(!r)return;let n=t.name==="click",o=n?t.event:void 0;n&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&eN(e.clickDetector,r,H_(t.event)),Ra(e,r)};function $_(e,t){let r=Rr.mirror.getId(e),n=r&&Rr.mirror.getNode(r),o=n&&Rr.mirror.getMeta(n),i=o&&pN(o)?o:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===iu.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:lN(i.attributes)}}:{}}}function uN(e){let{target:t,message:r}=dN(e);return jr({category:`ui.${e.name}`,...$_(t,r)})}function dN(e){let t=e.name==="click",r,n=null;try{n=t?H_(e.event):z_(e.event),r=pe(n,{maxStringLength:200})||"<unknown>"}catch{r="<unknown>"}return{target:n,message:r}}function pN(e){return e.type===iu.Element}function fN(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=mN(t);r&&Ra(e,r)}function mN(e){let{metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i,target:s}=e;if(!s||gN(s)||!i)return null;let a=t||n||o,l=i.length===1;if(!a&&l)return null;let c=pe(s,{maxStringLength:200})||"<unknown>",u=$_(s,c);return jr({category:"ui.keyDown",message:c,data:{...u.data,metaKey:t,shiftKey:r,ctrlKey:n,altKey:o,key:i}})}function gN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var hN={resource:EN,paint:yN,navigation:_N};function yf(e,t){return({metric:r})=>{t.replayPerformanceEntries.push(e(r))}}function SN(e){return e.map(vN).filter(Boolean)}function vN(e){let t=hN[e.entryType];return t?t(e):null}function Fi(e){return((me()||he.performance.timeOrigin)+e)/1e3}function yN(e){let{duration:t,entryType:r,name:n,startTime:o}=e,i=Fi(o);return{type:r,name:n,start:i,end:i+t,data:void 0}}function _N(e){let{entryType:t,name:r,decodedBodySize:n,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:y}=e;return o===0?null:{type:`${t}.${y}`,start:Fi(f),end:Fi(i),name:r,data:{size:h,decodedBodySize:n,encodedBodySize:s,duration:o,domInteractive:c,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:p}}}function EN(e){let{entryType:t,initiatorType:r,name:n,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:`${t}.${r}`,start:Fi(i),end:Fi(o),name:n,data:{size:c,statusCode:l,decodedBodySize:s,encodedBodySize:a}}}function TN(e){let t=e.entries[e.entries.length-1],r=t?.element?[t.element]:void 0;return tm(e,"largest-contentful-paint",r)}function bN(e){return e.sources!==void 0}function kN(e){let t=[],r=[];for(let n of e.entries)if(bN(n)){let o=[];for(let i of n.sources)if(i.node){r.push(i.node);let s=Rr.mirror.getId(i.node);s&&o.push(s)}t.push({value:n.value,nodeIds:o.length?o:void 0})}return tm(e,"cumulative-layout-shift",r,t)}function wN(e){let t=e.entries[e.entries.length-1],r=t?.target?[t.target]:void 0;return tm(e,"interaction-to-next-paint",r)}function tm(e,t,r,n){let o=e.value,i=e.rating,s=Fi(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:r?r.map(a=>Rr.mirror.getId(a)):void 0,attributions:n}}}function IN(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function r({entries:o}){o.forEach(t)}let n=[];return["navigation","paint","resource"].forEach(o=>{n.push(wr(o,r))}),n.push(cn(yf(TN,e)),ln(yf(kN,e)),Mo(yf(wN,e))),()=>{n.forEach(o=>o())}}var j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xN='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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,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=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,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[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,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[s[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=w,P=p,Q=y,R=g;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,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-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(s[t]^s[t+1]<<A^s[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||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[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|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function RN(){let e=new Blob([xN]);return URL.createObjectURL(e)}var c_=["log","warn","error"],Hc="[Replay] ";function _f(e,t="info"){Wt({category:"console",data:{logger:"replay"},level:t,message:`${Hc}${e}`},{level:t})}function CN(){let e=!1,t=!1,r={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return j?(c_.forEach(n=>{r[n]=(...o)=>{T[n](Hc,...o),t&&_f(o.join(""),Ei(n))}}),r.exception=(n,...o)=>{o.length&&r.error&&r.error(...o),T.error(Hc,n),e?on(n,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&_f(n,"error")},r.infoTick=(...n)=>{T.log(Hc,...n),t&&setTimeout(()=>_f(n[0]),0)}):c_.forEach(n=>{r[n]=()=>{}}),r}var G=CN(),ka=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qf}.`)}},Kc=class{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){let r=JSON.stringify(t).length;if(this._totalSize+=r,this._totalSize>qf)throw new ka;this.events.push(t)}finish(){return new Promise(t=>{let r=this.events;this.clear(),t(JSON.stringify(r))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(let{timestamp:r}of this.events)(t===null||r<t)&&(t=r);return t===null?t:em(t)}},Bf=class{constructor(t){this._onMessage=({data:r})=>{let n=r;if(typeof n.id!="number")return;let o=this._pending.get(n.id);if(!(!o||o.method!==n.method)){if(this._pending.delete(n.id),!n.success){j&&G.error("Error in compression worker: ",n.response),o.reject(new Error("Error in compression worker"));return}o.resolve(n.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,r)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():(j&&G.warn("Received worker message with unsuccessful status",n),r(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{j&&G.warn("Failed to load Replay compression worker",n),r(new Error(`Failed to load Replay compression worker: ${n instanceof ErrorEvent&&n.message?n.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){j&&G.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,r){let n=this._getAndIncrementId();return new Promise((o,i)=>{this._pending.set(n,{method:t,resolve:o,reject:i});try{this._worker.postMessage({id:n,method:t,arg:r})}catch(s){this._pending.delete(n),i(s)}})}_getAndIncrementId(){return this._id++}},Ff=class{constructor(t){this._worker=new Bf(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){let r=em(t.timestamp);(!this._earliestTimestamp||r<this._earliestTimestamp)&&(this._earliestTimestamp=r);let n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>qf?Promise.reject(new ka):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&G.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},Hf=class{constructor(t){this._fallback=new Kc,this._compression=new Ff(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){j&&G.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:r,waitForCheckout:n}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=r,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){j&&G.exception(i,"Failed to add events when switching buffers.")}}};function NN({useCompression:e,workerUrl:t}){if(e&&window.Worker){let r=AN(t);if(r)return r}return j&&G.log("Using simple buffer"),new Kc}function AN(e){try{let t=e||MN();if(!t)return;j&&G.log(`Using compression worker${e?` from ${e}`:""}`);let r=new Worker(t);return new Hf(r)}catch(t){j&&G.exception(t,"Failed to create compression worker")}}function MN(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?RN():""}function rm(){try{return"sessionStorage"in he&&!!he.sessionStorage}catch{return!1}}function LN(e){ON(),e.session=void 0}function ON(){if(rm())try{he.sessionStorage.removeItem(Vf)}catch{}}function W_(e){return e===void 0?!1:Math.random()<e}function su(e){if(rm())try{he.sessionStorage.setItem(Vf,JSON.stringify(e))}catch{}}function j_(e){let t=Date.now(),r=e.id||Me(),n=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:r,started:n,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a,dirty:l}}function PN(e,t){return W_(e)?"session":t?"buffer":!1}function u_({sessionSampleRate:e,allowBuffering:t,stickySession:r=!1},{previousSessionId:n}={}){let o=PN(e,t),i=j_({sampled:o,previousSessionId:n});return r&&su(i),i}function DN(){if(!rm())return null;try{let e=he.sessionStorage.getItem(Vf);if(!e)return null;let t=JSON.parse(e);return j&&G.infoTick("Loading existing session"),j_(t)}catch{return null}}function zf(e,t,r=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=r}function UN(e,{maxReplayDuration:t,sessionIdleExpire:r,targetTime:n=Date.now()}){return zf(e.started,t,n)||zf(e.lastActivity,r,n)}function Xc(e,{sessionIdleExpire:t,maxReplayDuration:r}){return!(!UN(e,{sessionIdleExpire:t,maxReplayDuration:r})||e.sampled==="buffer"&&e.segmentId===0)}function Ef({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:r},n){let o=n.stickySession&&DN();return o?Xc(o,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&G.infoTick("Session in sessionStorage is expired, creating new one..."),u_(n,{previousSessionId:o.id})):o:(j&&G.infoTick("Creating new session"),u_(n,{previousSessionId:r}))}function BN(e){return e.type===q.Custom}function nm(e,t,r){return V_(e,t)?(G_(e,t,r),!0):!1}function FN(e,t,r){return V_(e,t)?G_(e,t,r):Promise.resolve(null)}async function G_(e,t,r){let{eventBuffer:n}=e;if(!n||n.waitForCheckout&&!r)return null;let o=e.recordingMode==="buffer";try{r&&o&&n.clear(),r&&(n.hasCheckout=!0,n.waitForCheckout=!1);let i=e.getOptions(),s=HN(t,i.beforeAddRecordingEvent);return s?await n.addEvent(s):void 0}catch(i){let s=i&&i instanceof ka,a=s?"eventBufferOverflow":"eventBufferError",l=D();if(l){let c=s?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(c,"replay")}if(s&&o)return n.clear(),n.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function V_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=em(t.timestamp);return r+e.timeouts.sessionIdlePause<Date.now()?!1:r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(j&&G.infoTick(`Skipping event with timestamp ${r} because it is after maxReplayDuration`),!1):!0}function HN(e,t){try{if(typeof t=="function"&&BN(e))return t(e)}catch(r){return j&&G.exception(r,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function om(e){return!e.type}function $f(e){return e.type==="transaction"}function zN(e){return e.type==="replay_event"}function d_(e){return e.type==="feedback"}function $N(e){return(t,r)=>{if(!e.isEnabled()||!om(t)&&!$f(t))return;let n=r.statusCode;if(!(!n||n<200||n>=300)){if($f(t)){WN(e,t);return}jN(e,t)}}}function WN(e,t){let r=e.getContext();t.contexts?.trace?.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}function jN(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;let{beforeErrorSampling:n}=e.getOptions();typeof n=="function"&&!n(t)||Do(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function GN(e){return t=>{!e.isEnabled()||!om(t)||VN(e,t)}}function VN(e,t){let r=t.exception?.values?.[0]?.value;if(typeof r=="string"&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let n=jr({category:"replay.hydrate-error",data:{url:Lt()}});Ra(e,n)}}function YN(e){let t=D();t&&t.on("beforeAddBreadcrumb",r=>qN(e,r))}function qN(e,t){if(!e.isEnabled()||!Y_(t))return;let r=KN(t);r&&Ra(e,r)}function KN(e){return!Y_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?XN(e):jr(e)}function XN(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return jr(e);let r=!1,n=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Dc?(r=!0,`${o.slice(0,Dc)}\u2026`):o;if(typeof o=="object")try{let i=ct(o,7);return JSON.stringify(i).length>Dc?(r=!0,`${JSON.stringify(i,null,2).slice(0,Dc)}\u2026`):i}catch{}return o});return jr({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Y_(e){return!!e.category}function JN(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Jc(){let e=H().getPropagationContext().dsc;e&&delete e.replay_id;let t=le();if(t){let r=Be(t);delete r.replay_id}}function p_(e){let t=H().getPropagationContext().dsc;t&&(t.replay_id=e);let r=le();if(r){let n=Be(r);n.replay_id=e}}function ZN(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:q.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 QN(e,t){return e.recordingMode!=="buffer"||t.message===Yf||!t.exception||t.type?!1:W_(e.getOptions().errorSampleRate)}function eA(e){return Object.assign((t,r)=>{if(e.session&&Xc(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Jc(),!e.isEnabled()||e.isPaused())return t;if(zN(t))return delete t.breadcrumbs,t;if(!om(t)&&!$f(t)&&!d_(t))return t;if(!e.checkAndHandleExpiredSession())return Jc(),t;if(d_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),ZN(e,t),t;if(JN(t,r)&&!e.getOptions()._experiments.captureExceptions)return j&&G.log("Ignoring error from rrweb internals",t),null;let o=QN(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&su(s)}return t},{id:"Replay"})}function au(e,t){return t.map(({type:r,start:n,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:q.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function tA(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}function rA(e){return t=>{if(!e.isEnabled())return;let r=tA(t);r!==null&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(au(e,[r]),!1)))}}function nA(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:Cp(t,D())}function q_(e,t){e.isEnabled()&&t!==null&&(nA(e,t.name)||e.addUpdate(()=>(au(e,[t]),!0)))}function lu(e){if(!e)return;let 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){let r=Ac(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function K_(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Zc(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function X_(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:o,method:i,statusCode:s,request:a,response:l}=t;return{type:e,start:r/1e3,end:n/1e3,name:o,data:{method:i,statusCode:s,request:a,response:l}}}function wa(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function zn(e,t,r){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:o,warnings:i}=oA(r);return n.body=o,i?.length&&(n._meta={warnings:i}),n}function Wf(e,t){return Object.entries(e).reduce((r,[n,o])=>{let i=n.toLowerCase();return t.includes(i)&&e[n]&&(r[i]=o),r},{})}function oA(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Vy,r=iA(e);if(t){let n=e.slice(0,Vy);return r?{body:n,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${n}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(r)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function iA(e){let t=e[0],r=e[e.length-1];return t==="["&&r==="]"||t==="{"&&r==="}"}function Qc(e,t){let r=sA(e);return Ze(r,t)}function sA(e,t=he.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(he.location.origin))return e;let r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;let n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}async function aA(e,t,r){try{let n=await cA(e,t,r),o=X_("resource.fetch",n);q_(r.replay,o)}catch(n){j&&G.exception(n,"Failed to capture fetch breadcrumb")}}function lA(e,t){let{input:r,response:n}=t,o=r?Lc(r):void 0,i=lu(o),s=n?K_(n.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function cA(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n}=t,{url:s,method:a,status_code:l=0,request_body_size:c,response_body_size:u}=e.data,d=Qc(s,r.networkDetailAllowUrls)&&!Qc(s,r.networkDetailDenyUrls),p=d?uA(r,t.input,c):wa(c),f=await dA(d,r,t.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:l,request:p,response:f}}function uA({networkCaptureBodies:e,networkRequestHeaders:t},r,n){let o=r?mA(r,t):{};if(!e)return zn(o,n,void 0);let i=Lc(r),[s,a]=Mc(i,G),l=zn(o,n,s);return a?Zc(l,a):l}async function dA(e,{networkCaptureBodies:t,networkResponseHeaders:r},n,o){if(!e&&o!==void 0)return wa(o);let i=n?J_(n.headers,r):{};if(!n||!t&&o!==void 0)return zn(i,o,void 0);let[s,a]=await fA(n),l=pA(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Zc(l,a):l}function pA(e,{networkCaptureBodies:t,responseBodySize:r,captureDetails:n,headers:o}){try{let i=e?.length&&r===void 0?lu(e):r;return n?t?zn(o,i,e):zn(o,i,void 0):wa(i)}catch(i){return j&&G.exception(i,"Failed to serialize response body"),zn(o,r,void 0)}}async function fA(e){let t=gA(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await hA(t)]}catch(r){return r instanceof Error&&r.message.indexOf("Timeout")>-1?(j&&G.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&G.exception(r,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function J_(e,t){let r={};return t.forEach(n=>{e.get(n)&&(r[n]=e.get(n))}),r}function mA(e,t){return e.length===1&&typeof e[0]!="string"?f_(e[0],t):e.length===2?f_(e[1],t):{}}function f_(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?J_(r,t):Array.isArray(r)?{}:Wf(r,t):{}}function gA(e){try{return e.clone()}catch(t){j&&G.exception(t,"Failed to clone response body")}}function hA(e){return new Promise((t,r)=>{let n=Do(()=>r(new Error("Timeout while trying to read response body")),500);SA(e).then(o=>t(o),o=>r(o)).finally(()=>clearTimeout(n))})}async function SA(e){return await e.text()}async function vA(e,t,r){try{let n=_A(e,t,r),o=X_("resource.xhr",n);q_(r.replay,o)}catch(n){j&&G.exception(n,"Failed to capture xhr breadcrumb")}}function yA(e,t){let{xhr:r,input:n}=t;if(!r)return;let o=lu(n),i=r.getResponseHeader("content-length")?K_(r.getResponseHeader("content-length")):bA(r.response,r.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function _A(e,t,r){let n=Date.now(),{startTimestamp:o=n,endTimestamp:i=n,input:s,xhr:a}=t,{url:l,method:c,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!l)return null;if(!a||!Qc(l,r.networkDetailAllowUrls)||Qc(l,r.networkDetailDenyUrls)){let R=wa(d),_=wa(p);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:R,response:_}}let f=a[Ir],h=f?Wf(f.request_headers,r.networkRequestHeaders):{},y=Wf(pa(a),r.networkResponseHeaders),[k,g]=r.networkCaptureBodies?Mc(s,G):[void 0],[S,v]=r.networkCaptureBodies?EA(a):[void 0],E=zn(h,d,k),C=zn(y,p,S);return{startTimestamp:o,endTimestamp:i,url:l,method:c,statusCode:u,request:g?Zc(E,g):E,response:v?Zc(C,v):C}}function EA(e){let t=[];try{return[e.responseText]}catch(r){t.push(r)}try{return TA(e.response,e.responseType)}catch(r){t.push(r)}return j&&G.warn("Failed to get xhr response body",...t),[void 0]}function TA(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(r){return j&&G.exception(r,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&G.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function bA(e,t){try{let r=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return lu(r)}catch{return}}function kA(e){let t=D();try{let{networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:r,networkDetailDenyUrls:n,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(l,c)=>wA(a,l,c))}catch{}}function wA(e,t,r){if(t.data)try{IA(t)&&RA(r)&&(yA(t,r),vA(t,r,e)),xA(t)&&CA(r)&&(lA(t,r),aA(t,r,e))}catch(n){j&&G.exception(n,"Error when enriching network breadcrumb")}}function IA(e){return e.category==="xhr"}function xA(e){return e.category==="fetch"}function RA(e){return e?.xhr}function CA(e){return e?.input!==void 0}function NA(e){let t=D();ua(cN(e)),pn(rA(e)),YN(e),kA(e);let r=eA(e);Xs(r),t&&(t.on("beforeSendEvent",GN(e)),t.on("afterSendEvent",$N(e)),t.on("createDsc",n=>{let o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(n.replay_id=o)}),t.on("spanStart",n=>{e.lastActiveSpan=n}),t.on("spanEnd",n=>{e.lastActiveSpan=n}),t.on("beforeSendFeedback",async(n,o)=>{let i=e.getSessionId();o?.includeReplay&&e.isEnabled()&&i&&n.contexts?.feedback&&(n.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),n.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function AA(e){try{return Promise.all(au(e,[MA(he.performance.memory)]))}catch{return[]}}function MA(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}function LA(e,t,r){return Ap(e,t,{...r,setTimeoutImpl:Do})}var Fc=U.navigator;function OA(){return/iPhone|iPad|iPod/i.test(Fc?.userAgent??"")||/Macintosh/i.test(Fc?.userAgent??"")&&Fc?.maxTouchPoints&&Fc?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function PA(e){let t=!1;return(r,n)=>{if(!e.checkAndHandleExpiredSession()){j&&G.warn("Received replay event after session expired.");return}let o=n||!t;t=!0,DA(r),e.clickDetector&&oN(e.clickDetector,r),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!nm(e,r,o))return!0;if(!o)return!1;let i=e.session;if(BA(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(j&&G.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&su(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function DA(e){let t=e.data;if(!(e.type!==q.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Y.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let r of t.attributes){let n=Rr.mirror.getNode(r.id),o=n&&Rr.mirror.getMeta(n);if(o?.type===iu.Element)for(let[i,s]of Object.entries(r.attributes))s===null?delete o.attributes[i]:o.attributes[i]=s}}function UA(e){let t=e.getOptions();return{type:q.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 BA(e,t){!t||e.session?.segmentId!==0||nm(e,UA(e),!1)}function FA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function HA(e,t,r,n){return _t(js(e,pi(e),n,r),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function zA({recordingData:e,headers:t}){let r,n=`${JSON.stringify(t)}
|
|
31
|
+
`;if(typeof e=="string")r=`${n}${e}`;else{let i=new TextEncoder().encode(n);r=new Uint8Array(i.length+e.length),r.set(i),r.set(e,i.length)}return r}async function $A({client:e,scope:t,replayId:r,event:n}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:r,integrations:o};e.emit("preprocessEvent",n,i);let s=await Ys(e.getOptions(),n,i,t,e,be());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:l,version:c,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:l||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}async function WA({recordingData:e,replayId:t,segmentId:r,eventContext:n,timestamp:o,session:i}){let s=zA({recordingData:e,headers:{segment_id:r}}),{urls:a,errorIds:l,traceIds:c,initialTimestamp:u}=n,d=D(),p=H(),f=d?.getTransport(),h=d?.getDsn();if(!d||!f||!h||!i.sampled)return Promise.resolve({});let y={type:NR,replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:l,trace_ids:c,urls:a,replay_id:t,segment_id:r,replay_type:i.sampled},k=await $A({scope:p,client:d,replayId:t,event:y});if(!k)return d.recordDroppedEvent("event_processor","replay"),j&&G.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete k.sdkProcessingMetadata;let g=HA(k,s,h,d.getOptions().tunnel),S;try{S=await f.send(g)}catch(E){let C=new Error(Yf);try{C.cause=E}catch{}throw C}let v=ea({},S);if(Qs(v,"replay"))throw new Ia(v);if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new eu(S.statusCode);return S}var eu=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},Ia=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},tu=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function Z_(e,t={count:0,interval:DR}){let{recordingData:r,onError:n}=e;if(r.length)try{return await WA(e),!0}catch(o){if(o instanceof eu||o instanceof Ia)throw o;if(xo("Replays",{_retryCount:t.count}),n&&n(o),t.count>=UR){let i=new Error(`${Yf} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Do(async()=>{try{await Z_(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var Q_="__THROTTLED",jA="__SKIPPED";function GA(e,t,r){let n=new Map,o=a=>{let l=a-r;n.forEach((c,u)=>{u<l&&n.delete(u)})},i=()=>[...n.values()].reduce((a,l)=>a+l,0),s=!1;return(...a)=>{let l=Math.floor(Date.now()/1e3);if(o(l),i()>=t){let u=s;return s=!0,u?jA:Q_}s=!1;let c=n.get(l)||0;return n.set(l,c+1),e(...a)}}var jf=class{constructor({options:t,recordingOptions:r}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:AR,sessionIdleExpire:MR},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=r,this._options=t,this._debouncedFlush=LA(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=GA((s,a)=>FN(this,s,a),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:o}=this.getOptions(),i=n?{threshold:Math.min(BR,n),timeout:n,scrollTimeout:FR,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uf(this,i)),j){let s=t._experiments;G.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{he.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=jr({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=jr({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{fN(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&G.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:r,sessionSampleRate:n}=this._options,o=r<=0&&n<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){j&&G.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",j&&G.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&G.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&G.log("Buffering is in progress, call `flush()` to save the replay");return}j&&G.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Ef({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){j&&G.log("Buffering is in progress, call `flush()` to save the replay");return}j&&G.infoTick("Starting replay in buffer mode");let t=Ef({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{let t=this._canvas;this._stopRecording=Rr({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:PR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:PA(this),...OA(),onMutation:this._onMutationHandler.bind(this),...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:r}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";let n=r??"manual";D()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{j&&G.log(`Stopping Replay triggered by ${n}`),Jc(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,LN(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&G.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&G.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let r=Date.now();j&&G.log("Converting buffer to session"),await this.flushImmediate();let n=this.stopRecording();!t||!n||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(r),this._updateSessionActivity(r),this._maybeSaveSession(),p_(this.session.id)),this.startRecording())}addUpdate(t){let r=t();this.recordingMode==="buffer"||!this._isEnabled||r!==!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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&zf(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${he.location.pathname}${he.location.hash}${he.location.search}`,r=`${he.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=r,this._context.initialTimestamp=Date.now(),this._context.urls.push(r)}throttledAddEvent(t,r){let n=this._throttledAddEvent(t,r);if(n===Q_){let o=jr({category:"replay.throttled"});this.addUpdate(()=>!nm(this,{type:qC,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return n}getCurrentRoute(){let t=this.lastActiveSpan||le(),r=t&&ie(t),o=(r&&$(r).data||{})[$e];if(!(!r||!o||!["route","custom"].includes(o)))return $(r).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=NN({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&D()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&p_(this.session.id)}_initializeSessionForSampling(t){let r=this._options.errorSampleRate>0,n=Ef({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:r});this.session=n}_checkSession(){if(!this.session)return!1;let t=this.session;return Xc(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{he.document.addEventListener("visibilitychange",this._handleVisibilityChange),he.addEventListener("blur",this._handleWindowBlur),he.addEventListener("focus",this._handleWindowFocus),he.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(NA(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=IN(this)}_removeListeners(){try{he.document.removeEventListener("visibilitychange",this._handleVisibilityChange),he.removeEventListener("blur",this._handleWindowBlur),he.removeEventListener("focus",this._handleWindowFocus),he.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Xc(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Jc();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){j&&G.log("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:q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=SN(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let r=this._context.initialTimestamp/1e3;t=t.filter(n=>n.start>=r)}return Promise.all(au(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:r}=this;if(!t||!r||this._requiresManualStart||t.segmentId)return;let n=r.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let 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(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&G.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await AA(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new tu;let n=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await Z_({replayId:t,recordingData:i,segmentId:o,eventContext:n,session:this.session,timestamp:r,onError:s=>this.handleException(s)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});let n=D();if(n){let o;r instanceof Ia?o="ratelimit_backoff":r instanceof tu?o="invalid":o="send_error",n.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&G.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let r=this.session.started,o=Date.now()-r;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){j&&G.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&j&&G.log("Flushing initial segment without checkout.");let l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&su(this.session)}_onMutationHandler(t){let{ignoreMutations:r}=this._options._experiments;if(r?.length&&t.some(a=>{let l=FA(a.target),c=r.join(",");return l?.matches(c)}))return!1;let n=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&n>o;if(n>i||s){let a=jr({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ga(e,t){return[...e,...t].join(",")}function VA({mask:e,unmask:t,block:r,unblock:n,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=ga(e,[".sentry-mask","[data-sentry-mask]"]),a=ga(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ga(r,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:ga(n,[]),ignoreSelector:ga(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function YA({el:e,key:t,maskAttributes:r,maskAllText:n,privacyOptions:o,value:i}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return i;let s=r.includes(t),a=n&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?i.replace(/[\S]/g,"*"):i}var m_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',qA=["content-length","content-type","accept"],KA=Symbol.for("sentry__originalRequestBody"),g_=!1,h_=!1;function XA(){if(typeof Request>"u"||h_)return;let e=Request;try{let t=function(r,n){let o=new e(r,n);return n?.body!=null&&(o[KA]=n.body),o};t.prototype=e.prototype,U.Request=t,h_=!0}catch{}}var im=(e=>new Gf(e)),Gf=class{constructor({flushMinDelay:t=LR,flushMaxDelay:r=OR,minReplayDuration:n=HR,maxReplayDuration:o=Yy,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:l={},maskAllText:c=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:k=[],networkDetailDenyUrls:g=[],networkCaptureBodies:S=!0,networkRequestHeaders:v=[],networkResponseHeaders:E=[],mask:C=[],maskAttributes:R=["title","placeholder","aria-label"],unmask:_=[],block:w=[],unblock:z=[],ignore:I=[],maskFn:P,beforeAddRecordingEvent:W,beforeErrorSampling:K,onError:V,attachRawBodyFromRequest:Pe=!1}={}){this.name="Replay";let ue=VA({mask:C,unmask:_,block:w,unblock:z,ignore:I});if(this._recordingOptions={maskAllInputs:u,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(fe,L,b)=>YA({maskAttributes:R,maskAllText:c,privacyOptions:ue,key:fe,value:L,el:b}),...ue,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:fe=>{try{fe.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:r,minReplayDuration:Math.min(n,zR),maxReplayDuration:Math.min(o,Yy),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:c,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:y,networkDetailAllowUrls:k,networkDetailDenyUrls:g,networkCaptureBodies:S,networkRequestHeaders:S_(v),networkResponseHeaders:S_(E),beforeAddRecordingEvent:W,beforeErrorSampling:K,onError:V,attachRawBodyFromRequest:Pe,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${m_}`:m_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ir())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return g_}set _isInitialized(t){g_=t}afterAllSetup(t){!ir()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&XA(),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",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){let r=this.getReplayId(!0);r&&On(t,{"sentry.replay_id":r})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let r=JA(this._initialOptions,t);this._replay=new jf({options:r,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let r=t.getIntegrationByName("ReplayCanvas");if(!r)return;this._replay._canvas=r.getOptions()}catch{}}};function JA(e,t){let r=t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...e},o=$t(r.replaysSessionSampleRate),i=$t(r.replaysOnErrorSampleRate);return o==null&&i==null&&Je(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(n.sessionSampleRate=o),i!=null&&(n.errorSampleRate=i),n}function S_(e){return[...qA,...e.map(t=>t.toLowerCase())]}function eE(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function sm(e){try{return new URL(e,F.location.origin).href}catch{return}}function tE(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function am(e){try{return new Headers(e)}catch{return}}var lm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function nE(e,t){let{traceFetch:r,traceXHR:n,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:s,onRequestSpanStart:a,onRequestSpanEnd:l}={...lm,...t},c=typeof o=="function"?o:f=>!0,u=f=>QA(f,s),d={},p=e.getOptions().propagateTraceparent;r&&Dn(f=>{let h=Up(f,c,u,d,{propagateTraceparent:p,onRequestSpanEnd:l});if(h){let y=sm(f.fetchData.url),k=y?or(y).host:void 0;h.setAttributes({"http.url":y?pt(y):void 0,"server.address":k}),i&&rE(h,e),a?.(h,{headers:f.headers})}}),n&&da(f=>{let h=eM(f,c,u,d,p,l);h&&(i&&rE(h,e),a?.(h,{headers:am(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}var ZA=300;function rE(e,t){let{url:r}=$(e).data;if(!r||typeof r!="string")return;let n=()=>{setTimeout(o)};if(et(t)){let i=e.end.bind(e);e.end=s=>{let a=s??ae(),l=!1,c=()=>{l||(l=!0,setTimeout(o),i(a),clearTimeout(u))};n=c;let u=setTimeout(c,ZA)}}let o=wr("resource",({entries:i})=>{i.forEach(s=>{tE(s)&&s.name.endsWith(r)&&(e.setAttributes(la(s)),n())})})}function QA(e,t){let r=Lt();if(r){let n,o;try{n=new URL(e,r),o=new URL(r).origin}catch{return!1}let i=n.origin===o;return t?Ze(n.toString(),t)||i&&Ze(n.pathname,t):i}else{let n=!!e.match(/^\/(?!\/)/);return t?Ze(e,t):n}}function eM(e,t,r,n,o,i){let s=e.xhr,a=s?.[Ir];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:c}=a,u=We()&&t(l);if(e.endTimestamp){let S=s.__sentry_xhr_span_id__;if(!S)return;let v=n[S];v&&(u&&a.status_code!==void 0&&(li(v,a.status_code),v.end(),i?.(v,{headers:am(pa(s)),error:e.error})),delete n[S]);return}let d=sm(l),p=d?or(d):or(l),f=pt(Ql(l)),h=D(),k=!!le()||!!h&&et(h),g=u&&k?Ve({name:`${c} ${f}`,attributes:{url:pt(l),type:"xhr","http.method":c,"http.url":d?pt(d):void 0,"server.address":p?.host,[ee]:"auto.http.browser",[_e]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Qe;return u&&!k&&h?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=g.spanContext().spanId,n[s.__sentry_xhr_span_id__]=g,r(l)&&tM(s,We()&&k?g:void 0,o),h&&h.emit("beforeOutgoingRequestSpan",g,e),g}function tM(e,t,r){let{"sentry-trace":n,baggage:o,traceparent:i}=_i({span:t,propagateTraceparent:r});n&&rM(e,n,o,i)}function rM(e,t,r,n){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),n&&!o?.traceparent&&e.setRequestHeader("traceparent",n),r){let i=o?.baggage;(!i||!eE(i))&&e.setRequestHeader("baggage",r)}}catch{}}var oE=new WeakMap,iE=new WeakMap,nM=9e4,oM=["text/event-stream","application/x-ndjson","application/stream+json"],sE=()=>({name:"FetchStreamPerformance",setup(){pc(e=>{if(e.response){let t=oE.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let r=iE.get(e.response);r&&clearTimeout(r)}}}),Dn(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!oM.some(l=>t.startsWith(l)))return;let r=e.fetchData?.url||"",n=e.fetchData?.method||"GET",o=Fr(r),i=r.startsWith("data:")?pt(r):o?gi(o):r,s=Ve({name:`${n} ${i}`,startTime:e.endTimestamp,attributes:{url:pt(r),"http.method":n,type:"fetch",[_e]:"http.client.stream",[ee]:"auto.http.browser.stream"}});oE.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},nM);iE.set(e.response,a)}})}});function aE(){F.document?F.document.addEventListener("visibilitychange",()=>{let e=le();if(!e)return;let t=ie(e);if(F.document.hidden&&t){let r="cancelled",{op:n,status:o}=$(t);xe&&T.log(`[Tracing] Transaction: ${r} -> since tab moved to the background, op: ${n}`),o||t.setStatus({code:2,message:r}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):xe&&T.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var iM=3600,lE="sentry_previous_trace",sM="sentry.previous_trace";function cE(e,{linkPreviousTrace:t,consistentTraceSampling:r}){let n=t==="session-storage",o=n?cM():void 0;e.on("spanStart",s=>{if(ie(s)!==s)return;let a=H().getPropagationContext();o=aM(o,s,a),n&&lM(o)});let i=!0;r&&e.on("beforeSampling",s=>{if(!o)return;let a=H(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(o.sampleRate),sampled:String(cm(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=cm(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[si]:o.sampleRate}})}function aM(e,t,r){let n=$(t);function o(){try{let a=Number(n.data?.[en]??r.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:n.start_timestamp,sampleRate:o(),sampleRand:r.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===n.trace_id?e:(Date.now()/1e3-e.startTimestamp<=iM&&(xe&&T.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:n.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ul]:"previous_trace"}}),t.setAttribute(sM,`${s.traceId}-${s.spanId}-${cm(s)?1:0}`)),i)}function lM(e){try{F.sessionStorage.setItem(lE,JSON.stringify(e))}catch(t){xe&&T.warn("Could not store previous trace in sessionStorage",t)}}function cM(){try{let e=F.sessionStorage?.getItem(lE);return JSON.parse(e)}catch{return}}function cm(e){return e.traceFlags===1}var uM="BrowserTracing",dM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function mE(){let e=F.navigator;return e?.userAgent?dM.test(e.userAgent):!1}var pM={...mi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...lm},um=((e={})=>{"enableElementTiming"in e&&Je(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},r=F.document,{enableInp:n,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:l},beforeStartSpan:c,idleTimeout:u,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:y,trackFetchStreamPerformance:k,shouldCreateSpanForRequest:g,enableHTTPTimings:S,ignoreResourceSpans:v,ignorePerformanceApiSpans:E,instrumentPageLoad:C,instrumentNavigation:R,detectRedirects:_,linkPreviousTrace:w,consistentTraceSampling:z,enableReportPageLoaded:I,onRequestSpanStart:P,onRequestSpanEnd:W}={...pM,...e},K=mE(),V,Pe,ue;function fe(L,b,x=!0){let A=b.op==="pageload",oe=b.name,J=c?c(b):b,ot=J.attributes||{};if(oe!==J.name&&(ot[$e]="custom",J.attributes=ot),!x){let Jt=Ct();Ve({...J,startTime:Jt}).end(Jt);return}t.name=J.name,t.source=ot[$e];let Ie=Jl(J,{idleTimeout:u,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:A,beforeSpanEnd:Jt=>{V?.();let Zt=et(L);tf(Jt,{recordClsOnPageloadSpan:!Zt&&!a,recordLcpOnPageloadSpan:!Zt&&!l,ignoreResourceSpans:v,ignorePerformanceApiSpans:E,spanStreamingEnabled:Zt}),pE(L,void 0);let Ss=H(),co=Ss.getPropagationContext();Ss.setPropagationContext({...co,traceId:Ie.spanContext().traceId,sampled:Mt(Ie),dsc:Be(Jt)}),A&&(ue=void 0)},trimIdleSpanEndTimestamp:!I});A&&I&&(ue=Ie),pE(L,Ie);function it(){r&&["interactive","complete"].includes(r.readyState)&&L.emit("idleSpanEnableAutoFinish",Ie)}A&&!I&&r&&(r.addEventListener("readystatechange",()=>{it()}),it())}return{name:uM,setup(L){if(K){xe&&T.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}jl();let b=et(L);if(V=Jp({recordClsStandaloneSpans:b?void 0:a||!1,recordLcpStandaloneSpans:b?void 0:l||!1,client:L}),b?(lf(L),cf(L),n&&uf()):n&&of(),i&&U.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Qp():o&&Zp(),s&&ef(),_&&r){let A=()=>{Pe=ae()};addEventListener("click",A,{capture:!0}),addEventListener("keydown",A,{capture:!0,passive:!0})}function x(){let A=Ca(L);A&&!$(A).timestamp&&(xe&&T.log(`[Tracing] Finishing current active span with op: ${$(A).op}`),A.setAttribute(tn,"cancelled"),A.end())}L.on("startNavigationSpan",(A,oe)=>{if(D()!==L)return;if(oe?.isRedirect){xe&&T.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),fe(L,{op:"navigation.redirect",...A},!1);return}Pe=void 0,x(),be().setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:We()?void 0:ut()});let J=H();J.setPropagationContext({traceId:yt(),sampleRand:Math.random(),propagationSpanId:We()?void 0:ut()}),J.setSDKProcessingMetadata({normalizedRequest:void 0}),fe(L,{op:"navigation",...A,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(A,oe={})=>{if(D()!==L)return;x();let J=oe.sentryTrace||uE("sentry-trace")||dE("sentry-trace"),ot=oe.baggage||uE("baggage")||dE("baggage"),Ie=tp(J,ot),it=H();it.setPropagationContext(Ie),We()||(it.getPropagationContext().propagationSpanId=ut()),it.setSDKProcessingMetadata({normalizedRequest:bi()}),fe(L,{op:"pageload",...A})}),L.on("endPageloadSpan",()=>{I&&ue&&(ue.setAttribute(tn,"reportPageLoaded"),ue.end())})},afterAllSetup(L){if(K)return;let b=Lt();if(w!=="off"&&cE(L,{linkPreviousTrace:w,consistentTraceSampling:z}),F.location){if(C){let x=me();gE(L,{name:F.location.pathname,startTime:x?x/1e3:void 0,attributes:{[$e]:"url",[ee]:"auto.pageload.browser"}})}R&&pn(({to:x,from:A})=>{if(A===void 0&&b?.indexOf(x)!==-1){b=void 0;return}b=void 0;let oe=Fr(x),J=Ca(L),ot=J&&_&&mM(J,Pe);hE(L,{name:oe?.pathname||F.location.pathname,attributes:{[$e]:"url",[ee]:"auto.navigation.browser"}},{url:x,isRedirect:ot})})}f&&aE(),s&&fM(L,u,d,p,t),n&&sf(),nE(L,{traceFetch:h,traceXHR:y,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:g,enableHTTPTimings:S,onRequestSpanStart:P,onRequestSpanEnd:W}),k&&L.addIntegration(sE())}}});function gE(e,t,r){e.emit("startPageLoadSpan",t,r),H().setTransactionName(t.name);let n=Ca(e);return n&&e.emit("afterStartPageLoadSpan",n),n}function hE(e,t,r){let{url:n,isRedirect:o}=r||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=H();return i.setTransactionName(t.name),n&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...bi(),url:n}}),Ca(e)}function uE(e){return F.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function dE(e){return F.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(n=>n.name===e)?.description}function fM(e,t,r,n,o){let i=F.document,s,a=()=>{let l="ui.action.click",c=Ca(e);if(c){let u=$(c).op;if(["navigation","pageload"].includes(u)){xe&&T.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(tn,"interactionInterrupted"),s.end(),s=void 0),!o.name){xe&&T.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}s=Jl({name:o.name,op:l,attributes:{[$e]:o.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:n})};i&&addEventListener("click",a,{capture:!0})}var SE="_sentry_idleSpan";function Ca(e){return e[SE]}function pE(e,t){ye(e,SE,t)}var fE=1.5;function mM(e,t){let r=$(e),n=Ct(),o=r.start_timestamp;return!(n-o>fE||t&&n-t<=fE)}var ME=vr(mn(),1);function AE(e){return er(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function hm(e){let t={...e};na(t,"react"),xo("react",{version:ME.version});let r=hf(t);return oi(NM),r}function NM(e){return AE(e)?"[SyntheticEvent]":fa(e)}var LE=vr(mn(),1);function AM(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function MM(e,t){let r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function OE(e,{componentStack:t},r){if(AM(LE.version)&&Qt(e)&&t){let n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,MM(e,n)}return nr(n=>(n.setContext("react",{componentStack:t}),on(e,r)))}var Bo=vr(mn(),1);var PE=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Sm={componentStack:null,error:null,eventId:null},Aa=class extends Bo.Component{constructor(t){super(t),this.state=Sm,this._openFallbackReportDialog=!0;let r=D();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Pc({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){let{componentStack:n}=r,{beforeCapture:o,onError:i,showDialog:s,dialogOptions:a}=this.props;nr(l=>{o&&o(l,t,n);let c=this.props.handled!=null?this.props.handled:!!this.props.fallback,u=OE(t,r,{mechanism:{handled:c,type:"auto.function.react.error_boundary"}});i&&i(t,n,u),s&&(this._lastEventId=u,this._openFallbackReportDialog&&Pc({...a,eventId:u})),this.setState({error:t,componentStack:n,eventId:u})})}componentDidMount(){let{onMount:t}=this.props;t&&t()}componentWillUnmount(){let{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&(this.state===Sm?o(null,null,null):o(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){let{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(Sm)}render(){let{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;let o=typeof t=="function"?Bo.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return Bo.isValidElement(o)?o:(t&&PE&&T.warn("fallback did not produce a valid ReactElement"),null)}};function vm(e,t){if(e==null||e==="")return t;let r=typeof e=="number"?e:Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}var gn=window.__vidfarmSentry,UE=gn?.dsn?.trim()||"";if(UE){let e=gn?.environment?.trim()||"development",t=e==="production"?.1:1,r=e==="production"?.1:1,n=["localhost",window.location.origin,`${window.location.origin}/api`],o=Array.from(new Set([...n,...gn?.tracePropagationTargets??[]].filter(Boolean)));hm({dsn:UE,environment:e,release:gn?.release?.trim()||void 0,integrations:[um(),im({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:vm(gn?.tracesSampleRate,t),tracePropagationTargets:o,replaysSessionSampleRate:vm(gn?.replaysSessionSampleRate,r),replaysOnErrorSampleRate:vm(gn?.replaysOnErrorSampleRate,1),enableLogs:gn?.enableLogs??!0,sendDefaultPii:gn?.sendDefaultPii??!0})}var we=vr(mn(),1),Rk=vr(ok(),1);var ik=e=>{let t,r=new Set,n=(c,u)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let p=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(f=>f(t,p))}},o=()=>t,a={setState:n,getState:o,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,o,a);return a},sk=(e=>e?ik(e):ik);var bl=vr(mn(),1);var P2=e=>e;function ze(e,t=P2){let r=bl.default.useSyncExternalStore(e.subscribe,bl.default.useCallback(()=>t(e.getState()),[e,t]),bl.default.useCallback(()=>t(e.getInitialState()),[e,t]));return bl.default.useDebugValue(r),r}var D2="[vidfarm]";function U2(e){if(e!=="debug")return!0;if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("debug")||window.localStorage?.getItem("VIDFARM_DEBUG")==="1"}catch{return!1}}function ak(e,t,r){let n={event:t,detail:r,timestamp:new Date().toISOString()};typeof window<"u"&&(window.__VIDFARM_DEBUG_LOGS__=window.__VIDFARM_DEBUG_LOGS__??[],window.__VIDFARM_DEBUG_LOGS__.push(n),window.__VIDFARM_DEBUG_LOGS__.length>1e3&&window.__VIDFARM_DEBUG_LOGS__.splice(0,window.__VIDFARM_DEBUG_LOGS__.length-1e3)),U2(e)&&console[e==="debug"?"log":e](D2,t,r??"")}function kl(e,t){ak("info",e,t)}function In(e,t){ak("error",e,t)}function lk(){typeof window>"u"||window.__VIDFARM_DEBUG_HOOKS__||(window.__VIDFARM_DEBUG_HOOKS__=!0,kl("boot.hooks-installed",{href:window.location.href,readyState:document.readyState,userAgent:navigator.userAgent}),window.addEventListener("error",e=>{In("window.error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error instanceof Error?e.error.stack:e.error})}),window.addEventListener("unhandledrejection",e=>{In("window.unhandledrejection",{reason:e.reason instanceof Error?e.reason.stack:e.reason})}))}var re=vr(mn(),1);function Jr(e,t){if(!t||!e.startsWith("/"))return e;let r=new URL(e,"https://vidfarm.local");return r.pathname.startsWith("/u/")?`${r.pathname}${r.search}${r.hash}`:r.pathname==="/discover"||r.pathname.startsWith("/discover/")||r.pathname==="/help"?`${r.pathname}${r.search}${r.hash}`:`/u/${encodeURIComponent(t)}${r.pathname}${r.search}${r.hash}`}function ck(e){let t=e?.email?.trim()||"",r=e?.displayName?.trim()||"";return r||(t?t.split("@")[0].replace(/[._-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()):"")}function Ad(e){return!!(e&&/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e))}var m=vr(wl(),1);function fk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M10 3v4"}),(0,m.jsx)("path",{d:"M10 13v4"}),(0,m.jsx)("path",{d:"M3 10h4"}),(0,m.jsx)("path",{d:"M13 10h4"}),(0,m.jsx)("path",{d:"m5.8 5.8 2.3 2.3"}),(0,m.jsx)("path",{d:"m11.9 11.9 2.3 2.3"}),(0,m.jsx)("path",{d:"m14.2 5.8-2.3 2.3"}),(0,m.jsx)("path",{d:"m8.1 11.9-2.3 2.3"})]})}function j2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M4.5 4.5h3v11h-3z"}),(0,m.jsx)("path",{d:"M8.7 4.5h3v11h-3z"}),(0,m.jsx)("path",{d:"m13.4 5.1 2.3-.6 2.2 10.7-2.3.6z"})]})}function G2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("circle",{cx:"10",cy:"10",r:"7.2"}),(0,m.jsx)("path",{d:"M10 6.3v4.1l2.8 1.7"})]})}function mk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M14.8 15.2a5.4 5.4 0 1 0-9.6 0"}),(0,m.jsx)("circle",{cx:"10",cy:"6.8",r:"3.1"})]})}function hk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:[(0,m.jsx)("circle",{cx:"4.2",cy:"10",r:"1.45"}),(0,m.jsx)("circle",{cx:"10",cy:"10",r:"1.45"}),(0,m.jsx)("circle",{cx:"15.8",cy:"10",r:"1.45"})]})}function V2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",children:[(0,m.jsx)("path",{d:"M3.5 5.5h13"}),(0,m.jsx)("path",{d:"M3.5 10h13"}),(0,m.jsx)("path",{d:"M3.5 14.5h13"})]})}function Y2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.8"}),(0,m.jsx)("path",{d:"m13 13 4.2 4.2"})]})}function q2(){return(0,m.jsx)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:(0,m.jsx)("path",{d:"M6 3.8h8a1 1 0 0 1 1 1v11.4l-5-2.9-5 2.9V4.8a1 1 0 0 1 1-1Z"})})}function K2(e){let t=e?.trim();if(!(!t||typeof window>"u"))try{let r="vidfarm:agency:accounts:index",n=window.localStorage.getItem(r),o=n?JSON.parse(n):[];Array.isArray(o)&&window.localStorage.setItem(r,JSON.stringify(o.filter(i=>typeof i=="string"&&i!==t))),window.localStorage.removeItem(`vidfarm:agency:account_${t}`),window.localStorage.removeItem(`vidfarm:flockposter-cache:v1_${t}`),window.localStorage.removeItem(`vidfarm:discover-bookmarks:v1_${t}`)}catch{}}function X2({account:e}){let t=(0,re.useRef)(null),r=e.isLoggedIn?[{id:"discover",href:Jr("/discover",e.userId),label:"Discover",icon:(0,m.jsx)(fk,{})},{id:"library",href:Jr("/library",e.userId),label:"Library",icon:(0,m.jsx)(j2,{})},{id:"calendar",href:Jr("/calendar",e.userId),label:"Calendar",icon:(0,m.jsx)(G2,{})},{id:"settings",href:Jr("/settings",e.userId),label:"Settings",icon:(0,m.jsx)(mk,{})}]:[{id:"discover",href:"/discover",label:"Discover",icon:(0,m.jsx)(fk,{})},{id:"login",href:"/login",label:"Login",icon:(0,m.jsx)(mk,{})}],n=e.isLoggedIn?[{id:"chat",href:Jr("/chat",e.userId),label:"Chat"},{id:"job-runs",href:Jr("/job-runs",e.userId),label:"Run History"},{id:"inpaint",href:Jr("/inpaint",e.userId),label:"Inpaint"},{id:"help",href:"/help",label:"Help"},{id:"logout",action:"logout",label:"Log Out"}]:[{id:"help",href:"/help",label:"Help"},{id:"login",href:"/login",label:"Login"}],o=r.filter(i=>!n.some(s=>s.id===i.id));return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("nav",{className:"primary-nav","aria-label":"Primary",children:[r.map(i=>(0,m.jsxs)("a",{className:`nav-link${i.id==="discover"?" is-active":""}`,href:i.href,children:[(0,m.jsx)("span",{className:"nav-icon","aria-hidden":"true",children:i.icon}),(0,m.jsx)("span",{children:i.label})]},i.id)),n.map(i=>"href"in i?(0,m.jsx)("a",{className:"nav-link nav-mobile-extra",href:i.href,children:(0,m.jsx)("span",{children:i.label})},`mobile-${i.id}`):(0,m.jsx)("button",{type:"button",className:"nav-link nav-mobile-extra nav-action-link",onClick:()=>{t.current?.open||t.current?.showModal()},children:(0,m.jsx)("span",{children:i.label})},`mobile-${i.id}`)),n.length?(0,m.jsxs)("details",{className:"nav-menu",children:[(0,m.jsxs)("summary",{className:"nav-link nav-menu-trigger","aria-label":"Open navigation menu",children:[(0,m.jsx)("span",{className:"nav-icon nav-menu-desktop-icon","aria-hidden":"true",children:(0,m.jsx)(hk,{})}),(0,m.jsx)("span",{className:"nav-icon nav-menu-mobile-icon","aria-hidden":"true",children:(0,m.jsx)(V2,{})}),(0,m.jsx)("span",{className:"nav-menu-label",children:"Menu"})]}),(0,m.jsxs)("div",{className:"nav-menu-panel",role:"menu",children:[o.map(i=>(0,m.jsx)("a",{className:`nav-menu-item nav-menu-mobile-only${i.id==="discover"?" is-active":""}`,role:"menuitem",href:i.href,children:i.label},`menu-mobile-${i.id}`)),n.map(i=>"href"in i?(0,m.jsx)("a",{className:"nav-menu-item",role:"menuitem",href:i.href,children:i.label},i.id):(0,m.jsx)("button",{type:"button",className:"nav-menu-item nav-menu-button",role:"menuitem",onClick:()=>{t.current?.open||t.current?.showModal()},children:i.label},i.id))]})]}):null]}),e.isLoggedIn?(0,m.jsxs)("dialog",{className:"logout-dialog",ref:t,onClick:i=>{let s=t.current;if(!s)return;let a=s.getBoundingClientRect();(i.clientX<a.left||i.clientX>a.right||i.clientY<a.top||i.clientY>a.bottom)&&s.close()},children:[(0,m.jsxs)("div",{className:"logout-dialog-head",children:[(0,m.jsx)("div",{className:"label logout-dialog-kicker",children:"Log out"}),(0,m.jsx)("h3",{children:"Log out of this browser?"}),(0,m.jsx)("p",{children:"This clears the stored developer key, workspace access, and local session state for the current browser."})]}),(0,m.jsxs)("div",{className:"toolbar logout-dialog-actions",children:[(0,m.jsx)("button",{type:"button",className:"secondary",onClick:()=>t.current?.close(),children:"Cancel"}),(0,m.jsxs)("form",{method:"post",action:"/logout",onSubmit:()=>K2(e.userId),children:[(0,m.jsx)("input",{type:"hidden",name:"account",value:e.userId??""}),(0,m.jsx)("button",{type:"submit",className:"danger",children:"Yes, log out"})]})]})]}):null]})}function J2({account:e}){let t=e.email?.trim()||"",r=ck({displayName:e.displayName,email:e.email}),n=Jr("/discover",e.userId);return(0,m.jsxs)("a",{className:"brand-lockup",href:n,children:[(0,m.jsx)("img",{className:"brand-logo-image",src:"/assets/logo-vidfarm.png",alt:"VidFarm AI"}),(0,m.jsxs)("div",{className:"brand-copy",children:[(0,m.jsxs)("div",{className:"brand-title brand-title-static",children:["VidFarm",(0,m.jsx)("span",{className:"brand-title-mobile-hidden",children:" AI"})]}),t?(0,m.jsxs)("div",{className:"brand-account-meta",children:[r," ",(0,m.jsxs)("span",{children:["(",t,")"]})]}):null]})]})}function Sk(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:[(0,m.jsx)("path",{d:"m5 5 10 10"}),(0,m.jsx)("path",{d:"m15 5-10 10"})]})}function Z2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M10 3v9"}),(0,m.jsx)("path",{d:"m6.5 8.5 3.5 3.5 3.5-3.5"}),(0,m.jsx)("path",{d:"M4 16h12"})]})}function Q2(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M8.4 11.6a3.2 3.2 0 0 0 4.5 0l2.2-2.2a3.2 3.2 0 0 0-4.5-4.5L9.4 6.1"}),(0,m.jsx)("path",{d:"M11.6 8.4a3.2 3.2 0 0 0-4.5 0L4.9 10.6a3.2 3.2 0 0 0 4.5 4.5l1.2-1.2"})]})}function eO(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,m.jsx)("path",{d:"M12.4 7.6a3.4 3.4 0 0 1 0 4.8"}),(0,m.jsx)("path",{d:"M14.6 5.4a6.5 6.5 0 0 1 0 9.2"})]})}function tO(){return(0,m.jsxs)("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,m.jsx)("path",{d:"M3.5 8v4h2.8l3.5 3V5l-3.5 3Z"}),(0,m.jsx)("path",{d:"m12.6 8 4 4"}),(0,m.jsx)("path",{d:"m16.6 8-4 4"})]})}var vk="vidfarm:discover-muted",hs=typeof window<"u"&&window.localStorage?.getItem(vk)==="1",Lh=new Set;function yk(e){hs=e;try{window.localStorage.setItem(vk,e?"1":"0")}catch{}for(let t of Lh)t()}function _k(e){return Lh.add(e),()=>{Lh.delete(e)}}function Ek(){return(0,re.useSyncExternalStore)(_k,()=>hs,()=>!1)}var Oh=!1,Ph=new Set;function gk(e){Oh=e;for(let t of Ph)t()}function rO({src:e,controls:t=!0}){let r=(0,re.useRef)(null);return(0,re.useEffect)(()=>{let n=r.current;if(!n)return;let o=()=>{!n.dataset.src||n.getAttribute("src")||(n.setAttribute("src",n.dataset.src),n.load())},i=!1,s=()=>{Oh||(o(),n.muted=hs,n.play().then(()=>{delete n.dataset.mutedFallback}).catch(()=>{n.muted||(n.dataset.mutedFallback="1",n.muted=!0,n.play().catch(()=>{}))}))},a=()=>{!hs&&n.dataset.mutedFallback==="1"&&!n.paused&&(n.muted=!1,delete n.dataset.mutedFallback)};window.addEventListener("pointerdown",a),window.addEventListener("keydown",a);let c=_k(()=>{hs?(delete n.dataset.mutedFallback,n.muted=!0):n.paused||(n.muted=!1)}),u=()=>{Oh?n.paused||n.pause():i&&s()};Ph.add(u);let d=()=>{window.removeEventListener("pointerdown",a),window.removeEventListener("keydown",a),c(),Ph.delete(u)};if(!("IntersectionObserver"in window))return i=!0,s(),d;let p=new IntersectionObserver(h=>{for(let y of h)y.isIntersecting&&(o(),p.unobserve(y.target))},{rootMargin:"240px 0px"}),f=new IntersectionObserver(h=>{for(let y of h)i=y.isIntersecting,y.isIntersecting?s():n.paused||n.pause()},{threshold:.5});return p.observe(n),f.observe(n),()=>{p.disconnect(),f.disconnect(),d()}},[]),(0,m.jsx)("video",{ref:r,className:"preview","data-src":e,preload:"metadata",playsInline:!0,loop:!0,controls:t})}function nO(){let e=Ek();return(0,m.jsx)("button",{type:"button",className:"discover-mute-toggle","aria-pressed":e,"aria-label":e?"Unmute video previews":"Mute video previews",title:e?"Unmute previews":"Mute previews",onClick:()=>yk(!e),children:e?(0,m.jsx)(tO,{}):(0,m.jsx)(eO,{})})}function oO({text:e,label:t}){let[r,n]=(0,re.useState)(""),o=async()=>{try{await navigator.clipboard.writeText(e),n("done")}catch{n("error")}window.setTimeout(()=>n(""),1600)};return(0,m.jsxs)("button",{className:"pill-tag copy-inline",type:"button","data-state":r,"aria-label":r==="done"?`${t} copied`:t,onClick:()=>{o()},children:[(0,m.jsx)("span",{className:"copy-inline-label",children:t}),(0,m.jsx)("span",{className:"copy-inline-feedback","aria-hidden":"true",children:r==="error"?"Couldn\u2019t copy":"Copied"})]})}function Tk(e,t){return e.startsWith("hyperframes:")||e.startsWith("template_")?`/editor/${encodeURIComponent(e.replace(/^hyperframes:/,""))}${t?`?account=${encodeURIComponent(t)}`:""}`:Jr(`/templates/${encodeURIComponent(e)}/editor/docs`,t)}function iO({templateId:e,accountUserId:t}){return(0,m.jsx)("a",{className:"cta-button",href:Tk(e,t),children:"Editor"})}function sO(e){let{template:t}=e,[r,n]=(0,re.useState)(!1),[o,i]=(0,re.useState)(!1),[s,a]=(0,re.useState)(!1),l=(0,re.useRef)(null),c=t.status==="processing"||t.status==="failed",u=t.visibility==="private"&&!!e.onDeleteTemplate;(0,re.useEffect)(()=>{if(!r)return;let f=y=>{l.current&&!l.current.contains(y.target)&&n(!1)},h=y=>{y.key==="Escape"&&n(!1)};return window.addEventListener("mousedown",f),window.addEventListener("keydown",h),()=>{window.removeEventListener("mousedown",f),window.removeEventListener("keydown",h)}},[r]);let d=async()=>{try{await navigator.clipboard.writeText(t.templateId),i(!0),window.setTimeout(()=>{i(!1),n(!1)},900)}catch{n(!1)}},p=async()=>{if(!window.confirm(`Delete "${t.title}"? This removes it from your Discover feed permanently.`))return;a(!0);let f=await(e.onDeleteTemplate?.(t.templateId)??Promise.resolve({ok:!1,error:"Delete unavailable."}));a(!1),f.ok?n(!1):window.alert(f.error||"Unable to delete this template.")};return(0,m.jsxs)("div",{className:"discover-card-menu",ref:l,children:[(0,m.jsx)("button",{type:"button",className:"discover-card-menu-trigger","aria-haspopup":"menu","aria-expanded":r,"aria-label":`More actions for ${t.title}`,title:"More actions",onClick:()=>n(f=>!f),children:(0,m.jsx)(hk,{})}),r?(0,m.jsxs)("div",{className:"discover-card-menu-panel",role:"menu",children:[(0,m.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{d()},children:o?"Copied!":"Copy ID"}),c?(0,m.jsx)("span",{className:"discover-card-menu-item is-disabled",role:"menuitem","aria-disabled":"true",children:"Open in Editor"}):(0,m.jsx)("a",{className:"discover-card-menu-item",role:"menuitem",href:Tk(t.templateId,e.accountUserId),children:"Open in Editor"}),(0,m.jsx)("button",{type:"button",className:"discover-card-menu-item",role:"menuitem",onClick:()=>{e.onToggleBookmark?.(t.templateId),n(!1)},children:e.isBookmarked?"Remove Bookmark":"Bookmark"}),u?(0,m.jsx)("button",{type:"button",className:"discover-card-menu-item is-danger",role:"menuitem",disabled:s,onClick:()=>{p()},children:s?"Deleting\u2026":"Delete"}):null]}):null]})}function aO(e){let t=`${e.isBookmarked?"Remove bookmark for ":"Bookmark "}${e.title}`;return(0,m.jsx)("button",{className:"bookmark-button",type:"button","data-active":e.isBookmarked?"true":"false","aria-label":t,"aria-pressed":e.isBookmarked,title:t,onClick:()=>e.onToggleBookmark?.(e.templateId),children:(0,m.jsx)(q2,{})})}function lO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function cO(e){let t=typeof e.layerCount=="number"?e.layerCount:null,r=typeof e.sourceAssetCount=="number"?e.sourceAssetCount:null,n=typeof e.durationSeconds=="number"&&Number.isFinite(e.durationSeconds)?e.durationSeconds>=60?`${Math.floor(e.durationSeconds/60)}:${String(Math.round(e.durationSeconds%60)).padStart(2,"0")}`:`${e.durationSeconds.toFixed(e.durationSeconds>=10?1:2)}s`:null,o=[t===null?null:`${t} layer${t===1?"":"s"}`,r===null?null:`${r} source${r===1?"":"s"}`,n].filter(Boolean);return o.length?o.join(" / "):e.previewUrl?"Draft composition with editable layers.":"Layer recipe with editable timeline."}function bk(e){let{template:t}=e,r=t.status==="processing"||t.status==="failed",n=t.previewUrl?Ad(t.previewUrl)?(0,m.jsx)(rO,{src:t.previewUrl,controls:!1}):(0,m.jsx)("img",{className:"preview",src:t.previewUrl,alt:`${t.title} preview`,loading:"lazy",decoding:"async"}):(0,m.jsx)("div",{className:"preview preview-empty",children:t.status==="processing"?"Downloading\u2026":"No preview"});return(0,m.jsxs)("li",{className:"discover-card row","data-template-id":t.templateId,children:[t.previewUrl?(0,m.jsxs)("button",{className:"discover-card-media discover-card-media-button",type:"button","aria-label":`Open ${t.title} preview`,onClick:()=>e.onOpenPreview?.(t),children:[n,(0,m.jsx)("span",{className:"discover-card-media-affordance","aria-hidden":"true",children:"View"})]}):(0,m.jsx)("div",{className:"discover-card-media",children:n}),(0,m.jsxs)("div",{className:"discover-card-copy",children:[(0,m.jsxs)("div",{className:"discover-card-head",children:[(0,m.jsxs)("div",{className:"discover-card-title-wrap",children:[(0,m.jsx)("h2",{children:t.title}),(0,m.jsx)("p",{className:"discover-card-meta",children:cO(t)})]}),(0,m.jsxs)("div",{className:"discover-card-actions",children:[(0,m.jsx)(aO,{templateId:t.templateId,title:t.title,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark}),r?(0,m.jsx)("span",{className:"cta-button discover-card-cta-disabled","aria-disabled":"true",children:t.status==="failed"?"Failed":"Preparing\u2026"}):(0,m.jsx)(iO,{templateId:t.templateId,accountUserId:e.accountUserId}),(0,m.jsx)(sO,{template:t,isBookmarked:e.isBookmarked,onToggleBookmark:e.onToggleBookmark,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId})]})]}),(0,m.jsx)("div",{className:"discover-card-body",children:(0,m.jsx)("p",{children:String(t.viralDna||"").trim()||"No layer strategy provided for this composition yet."})}),(0,m.jsxs)("div",{className:"discover-card-tags",children:[t.origin==="raw"?(0,m.jsx)("div",{className:"pill-tag origin-pill",title:"Your own project \u2014 created from a prompt or your raw clips, not an imported inspiration",children:"Your project"}):null,t.visibility==="private"?(0,m.jsx)("div",{className:"pill-tag private-pill",title:"Only visible to your account",children:"Only you"}):null,t.status==="processing"?(0,m.jsx)("div",{className:"pill-tag processing-pill",children:"Processing"}):t.status==="failed"?(0,m.jsx)("div",{className:"pill-tag failed-pill",children:"Download failed"}):null,(0,m.jsx)("div",{className:"pill-tag difficulty-pill","data-difficulty":t.difficulty,children:lO(t.difficulty)}),(0,m.jsx)("div",{className:"pill-tag",children:t.sourceType||(Ad(t.previewUrl)?"Video source":"Image sequence")}),(0,m.jsx)(oO,{text:t.templateId,label:t.templateId})]})]})]})}function uO(e){let{onClose:t,template:r}=e,n=r.previewUrl||"",o=Ad(n),[i,s]=(0,re.useState)(""),a=Ek();(0,re.useEffect)(()=>(gk(!0),()=>gk(!1)),[]);let l=async()=>{try{await navigator.clipboard.writeText(n),s("done")}catch{s("error")}window.setTimeout(()=>s(""),1600)};return(0,re.useEffect)(()=>{let c=d=>{d.key==="Escape"&&t()},u=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",c),()=>{document.body.style.overflow=u,window.removeEventListener("keydown",c)}},[t]),(0,m.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,m.jsxs)("div",{className:"discover-media-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-media-modal-title",onClick:c=>c.stopPropagation(),children:[(0,m.jsxs)("div",{className:"discover-media-modal-head",children:[(0,m.jsx)("h2",{id:"discover-media-modal-title",children:r.title}),(0,m.jsxs)("div",{className:"discover-media-modal-actions",children:[(0,m.jsx)("a",{className:"discover-media-modal-action",href:n,download:!0,"aria-label":`Download ${r.title} preview`,title:"Download",onClick:c=>c.stopPropagation(),children:(0,m.jsx)(Z2,{})}),(0,m.jsx)("button",{className:"discover-media-modal-action",type:"button","data-state":i,"aria-label":i==="done"?"Media URL copied":i==="error"?"Unable to copy media URL":`Copy ${r.title} preview URL`,title:i==="done"?"Copied":i==="error"?"Copy failed":"Copy link",onClick:()=>{l()},children:(0,m.jsx)(Q2,{})}),(0,m.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close preview",title:"Close",onClick:t,children:(0,m.jsx)(Sk,{})})]})]}),(0,m.jsx)("div",{className:"discover-media-modal-stage",children:o?(0,m.jsx)("video",{src:n,controls:!0,autoPlay:!0,playsInline:!0,preload:"metadata",muted:a,onVolumeChange:c=>{let u=c.currentTarget.muted;u!==hs&&yk(u)}}):(0,m.jsx)("img",{src:n,alt:`${r.title} preview`})})]})})}function dO(e){let{onClose:t}=e,[r,n]=(0,re.useState)(""),[o,i]=(0,re.useState)(null),[s,a]=(0,re.useState)(""),[l,c]=(0,re.useState)(""),[u,d]=(0,re.useState)(""),[p,f]=(0,re.useState)(!1),[h,y]=(0,re.useState)(null);(0,re.useEffect)(()=>{let g=v=>{v.key==="Escape"&&t()},S=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",g),()=>{document.body.style.overflow=S,window.removeEventListener("keydown",g)}},[t]);let k=async()=>{let g=r.trim();if(!g&&!o){y("Paste a TikTok, YouTube, Twitter/X, or Instagram video URL \u2014 or upload a video file.");return}if(o&&o.size>200*1024*1024){y("Video uploads can be at most 200 MB.");return}f(!0),y(null);let S=await(e.onAddTemplate?.({sourceUrl:o?"":g,file:o,title:s.trim(),tagline:l.trim(),notes:u.trim()})??Promise.resolve({ok:!1,error:"Adding templates is unavailable right now."}));f(!1),S.ok?t():y(S.error||"Unable to add that video. Try again.")};return(0,m.jsx)("div",{className:"discover-media-modal-backdrop",role:"presentation",onClick:t,children:(0,m.jsxs)("div",{className:"discover-media-modal discover-add-template-modal",role:"dialog","aria-modal":"true","aria-labelledby":"discover-add-template-title",onClick:g=>g.stopPropagation(),children:[(0,m.jsxs)("div",{className:"discover-media-modal-head",children:[(0,m.jsx)("h2",{id:"discover-add-template-title",children:"Add Template"}),(0,m.jsx)("div",{className:"discover-media-modal-actions",children:(0,m.jsx)("button",{className:"discover-media-modal-action",type:"button","aria-label":"Close",title:"Close",onClick:t,children:(0,m.jsx)(Sk,{})})})]}),(0,m.jsxs)("form",{className:"discover-add-template-form",onSubmit:g=>{g.preventDefault(),k()},children:[(0,m.jsx)("p",{className:"discover-add-template-hint",children:"Paste a link to a TikTok, YouTube, Twitter/X, or Instagram video \u2014 or upload a video file from your computer. We add it to your Discover feed, visible only to your account."}),(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsx)("label",{className:"label",htmlFor:"add-template-url",children:"Video URL"}),(0,m.jsx)("input",{id:"add-template-url",type:"url",required:!o,disabled:!!o,placeholder:"https://www.tiktok.com/@creator/video/\u2026",autoComplete:"off",value:r,onChange:g=>n(g.target.value)})]}),(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-file",children:["Or upload a video ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"MP4 / MOV / WebM, up to 200 MB"})]}),o?(0,m.jsxs)("div",{className:"discover-add-template-file-chip",children:[(0,m.jsx)("span",{className:"discover-add-template-file-name",children:o.name}),(0,m.jsxs)("span",{className:"discover-add-template-file-size",children:[(o.size/(1024*1024)).toFixed(1)," MB"]}),(0,m.jsx)("button",{type:"button",className:"discover-add-template-file-clear","aria-label":"Remove selected file",onClick:()=>i(null),children:"\u2715"})]}):(0,m.jsx)("input",{id:"add-template-file",type:"file",accept:"video/mp4,video/quicktime,video/webm,.mp4,.m4v,.mov,.webm",onChange:g=>{let S=g.target.files?.[0]??null;S&&(i(S),n(""),y(null))}})]}),o?(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-title",children:["Title ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional \u2014 defaults to the template id"})]}),(0,m.jsx)("input",{id:"add-template-title",type:"text",placeholder:"Name this template\u2026",autoComplete:"off",maxLength:140,value:s,onChange:g=>a(g.target.value)})]}):null,(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-tagline",children:["Tagline ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,m.jsx)("input",{id:"add-template-tagline",type:"text",placeholder:"What makes this video work?",autoComplete:"off",maxLength:140,value:l,onChange:g=>c(g.target.value)})]}),(0,m.jsxs)("div",{className:"discover-add-template-field",children:[(0,m.jsxs)("label",{className:"label",htmlFor:"add-template-notes",children:["Notes ",(0,m.jsx)("span",{className:"discover-add-template-optional",children:"optional"})]}),(0,m.jsx)("textarea",{id:"add-template-notes",rows:4,placeholder:"Ideas for how you want to remix this\u2026",maxLength:2e3,value:u,onChange:g=>d(g.target.value)})]}),h?(0,m.jsx)("p",{className:"discover-add-template-error",role:"alert",children:h}):null,(0,m.jsxs)("div",{className:"toolbar discover-add-template-actions",children:[(0,m.jsx)("button",{type:"button",className:"secondary",onClick:t,disabled:p,children:"Cancel"}),(0,m.jsx)("button",{type:"submit",className:"cta-button discover-add-template-submit",disabled:p,children:p?o?"Uploading\u2026":"Adding\u2026":"Add Template"})]})]})]})})}function pO(e){if(e.loading)return(0,m.jsx)("ul",{className:"discover-list",children:(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading categories\u2026"})});if(e.error)return(0,m.jsx)("ul",{className:"discover-list",children:(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:e.error})});let t=e.searchQuery.trim().toLowerCase(),r=t?e.templates.filter(o=>`${o.title} ${o.templateId} ${o.popularGroup??""}`.toLowerCase().includes(t)):e.templates;if(r.length===0)return(0,m.jsx)("ul",{className:"discover-list",children:(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:t?"No categories match your search.":"No categories yet."})});let n=[];for(let o of r){let i=(o.popularGroup||"Popular").trim()||"Popular",s=n.find(a=>a.label===i);s||(s={label:i,items:[]},n.push(s)),s.items.push(o)}return(0,m.jsx)("div",{className:"discover-popular",children:n.map(o=>(0,m.jsxs)("section",{className:"discover-popular-group",children:[(0,m.jsx)("h3",{className:"discover-popular-group-label",children:o.label}),(0,m.jsx)("ul",{className:"discover-list",children:o.items.map(i=>(0,m.jsx)(bk,{template:i,isBookmarked:e.bookmarks.has(i.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:e.onOpenPreview,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.accountUserId},i.templateId))})]},o.label))})}function fO(e){let[t,r]=(0,re.useState)(null),[n,o]=(0,re.useState)(null),[i,s]=(0,re.useState)(!1),[a,l]=(0,re.useState)(null),[c,u]=(0,re.useState)(!1),d=e.stack.length?e.stack[0].id:null;(0,re.useEffect)(()=>(window.__VF_SWIPE_SOUND__=c,window.__VF_SWIPE_SOUND_TOP__=d,()=>{window.__VF_SWIPE_SOUND__=!1,window.__VF_SWIPE_SOUND_TOP__=null}),[c,d]);let p=(0,re.useRef)(null),f=110,h=(g,S)=>{!g||i||(s(!0),l(null),o({id:g.id,dir:S}),window.setTimeout(async()=>{let v=S==="right"?e.onApprove:e.onReject;try{let E=await v?.(g.id);E&&!E.ok&&l(E.error??"Action failed.")}finally{o(null),r(null),p.current=null,s(!1)}},260))};if(!e.isLoggedIn)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Swipe is for your product"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Log in to auto-generate ads from viral templates and swipe to approve."}),(0,m.jsx)("a",{className:"swipe-empty-cta",href:"/login",children:"Log in"})]});if(!e.productSet)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Tell us about your product"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Swipe auto-recuts viral templates into ads for your product. Add a product / offer description in Settings to start the deck."}),(0,m.jsx)("a",{className:"swipe-empty-cta",href:"/settings",children:"Open Settings"})]});if(e.error)return(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"Couldn't load your deck"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:e.error})]});if(e.stack.length===0)return e.loading||e.customizing>0||e.refilling?(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("div",{className:"swipe-spinner","aria-hidden":"true"}),(0,m.jsx)("p",{className:"swipe-empty-title",children:"Customizing fresh clips\u2026"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"Recutting viral templates into ads for your product."})]}):(0,m.jsxs)("div",{className:"swipe-empty",children:[(0,m.jsx)("p",{className:"swipe-empty-title",children:"You're all caught up"}),(0,m.jsx)("p",{className:"swipe-empty-sub",children:"No more templates to customize right now. Check back as new ones are added."})]});let y=e.stack.slice(0,4),k=y[0];return(0,m.jsxs)("div",{className:"swipe-deck-wrap",children:[(0,m.jsxs)("div",{className:"swipe-deck-row",children:[(0,m.jsx)("button",{type:"button",className:"swipe-action swipe-action-reject",disabled:i,onClick:()=>h(k,"left"),"aria-label":"Reject",children:"\u2715"}),(0,m.jsxs)("div",{className:"swipe-deck",children:[(0,m.jsx)("button",{type:"button",className:"swipe-sound",onClick:()=>u(g=>!g),"aria-label":c?"Mute preview":"Play preview with sound","aria-pressed":c,title:c?"Mute":"Sound on",children:c?"\u{1F50A}":"\u{1F507}"}),y.map((g,S)=>{let v=S===0,E=n?.id===g.id,C=v&&t?.id===g.id,R=S<=1&&!!g.previewUrl,_=C?t.dx:0,w=C?t.dy:0,z,I;E?(z=`translate(${n.dir==="right"?130:-130}%, ${w}px) rotate(${n.dir==="right"?22:-22}deg)`,I="transform 0.26s ease-in"):v?(z=`translate(${_}px, ${w*.25}px) rotate(${_/22}deg)`,I=C?"none":"transform 0.2s ease"):(z=`translateY(${S*12}px) scale(${1-S*.04})`,I="transform 0.2s ease");let P=C?t.dx>40?"approve":t.dx<-40?"reject":null:null;return(0,m.jsxs)("div",{className:"swipe-card",style:{transform:z,transition:I,zIndex:100-S},onPointerDown:v&&!i?W=>{p.current={x:W.clientX,y:W.clientY},W.currentTarget.setPointerCapture?.(W.pointerId)}:void 0,onPointerMove:v&&!i?W=>{p.current&&r({id:g.id,dx:W.clientX-p.current.x,dy:W.clientY-p.current.y})}:void 0,onPointerUp:v&&!i?()=>{let W=t?.id===g.id?t.dx:0;p.current=null,W>f?h(g,"right"):W<-f?h(g,"left"):r(null)}:void 0,onPointerCancel:v?()=>{p.current=null,r(null)}:void 0,children:[R?(0,m.jsx)("iframe",{className:"swipe-card-preview",src:g.previewUrl??void 0,title:g.title,loading:"lazy",scrolling:"no",allow:"autoplay",style:{pointerEvents:"none"}}):(0,m.jsx)("div",{className:"swipe-card-fallback",children:(0,m.jsx)("span",{children:g.title})}),(0,m.jsxs)("div",{className:"swipe-card-overlay",children:[(0,m.jsx)("div",{className:"swipe-card-title",children:g.title}),g.caption?(0,m.jsx)("div",{className:"swipe-card-caption",children:g.caption}):null]}),P==="approve"?(0,m.jsx)("div",{className:"swipe-stamp swipe-stamp-yes",children:"Approve"}):null,P==="reject"?(0,m.jsx)("div",{className:"swipe-stamp swipe-stamp-no",children:"Reject"}):null]},g.id)})]}),(0,m.jsx)("button",{type:"button",className:"swipe-action swipe-action-approve",disabled:i,onClick:()=>h(k,"right"),"aria-label":"Approve",children:"\u2713"})]}),(0,m.jsx)("div",{className:"swipe-status",children:e.customizing>0||e.refilling?"Customizing more\u2026":`${e.stack.length} ready`}),a?(0,m.jsx)("div",{className:"swipe-action-error",children:a}):null]})}function kk(e){let t=!e.loading&&!e.error&&e.templates.length>0&&e.visibleTemplates.length===0,[r,n]=(0,re.useState)(null),[o,i]=(0,re.useState)(!1),s=e.view==="popular",a=e.view==="swipe",l=p=>e.onViewChange?.(p),c=s?"Search categories":e.loading||e.error?"Search Templates":`Search ${e.visibleTemplates.length} Template${e.visibleTemplates.length===1?"":"s"}`,u=!0,d=e.account.isLoggedIn;return(0,m.jsxs)("section",{className:`frame discover-frame${u?" has-chat-rail":""}`,children:[(0,m.jsxs)("header",{className:"topbar",children:[(0,m.jsx)(J2,{account:e.account}),(0,m.jsx)("div",{className:"topbar-actions",children:(0,m.jsx)(X2,{account:e.account})})]}),(0,m.jsx)("div",{className:"frame-body",children:(0,m.jsxs)("section",{className:"discover-shell",children:[(0,m.jsxs)("div",{className:"discover-filter-bar",role:"toolbar","aria-label":"Composition filters",children:[(0,m.jsxs)("div",{className:"view-toggle discover-view-toggle",role:"tablist","aria-label":"Discover view",children:[(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${!s&&!a?" is-active":""}`,role:"tab","aria-selected":!s&&!a,onClick:()=>l("feed"),children:"Feed"}),(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${a?" is-active":""}`,role:"tab","aria-selected":a,onClick:()=>l("swipe"),children:"Swipe"}),(0,m.jsx)("button",{type:"button",className:`view-toggle-tab${s?" is-active":""}`,role:"tab","aria-selected":s,onClick:()=>l("popular"),children:"Category"})]}),(0,m.jsx)(nO,{}),(0,m.jsxs)("div",{className:"discover-filter-search search-field",children:[(0,m.jsx)("span",{className:"search-icon","aria-hidden":"true",children:(0,m.jsx)(Y2,{})}),(0,m.jsx)("input",{id:"search",type:"search",placeholder:c,autoComplete:"off",value:e.searchQuery,onChange:p=>e.onSearchQueryChange?.(p.target.value)})]}),!s&&!a?(0,m.jsxs)("label",{className:"discover-filter-toggle",htmlFor:"bookmarks-only","data-active":e.bookmarksOnly?"true":"false",children:[(0,m.jsx)("span",{className:"discover-filter-toggle-label",children:"Saved"}),(0,m.jsxs)("span",{className:"switch-shell","data-active":e.bookmarksOnly?"true":"false",children:[(0,m.jsx)("input",{id:"bookmarks-only",className:"switch-input",type:"checkbox",checked:e.bookmarksOnly,onChange:p=>e.onBookmarksOnlyChange?.(p.target.checked)}),(0,m.jsx)("span",{className:"switch-knob"})]})]}):null,e.account.isLoggedIn?(0,m.jsx)("button",{type:"button",className:"discover-add-template-button",onClick:()=>i(!0),children:"Add Template"}):(0,m.jsx)("a",{className:"discover-add-template-button",href:"/login",children:"Add Template"})]}),(0,m.jsx)("section",{className:"discover-results",children:(0,m.jsx)("div",{className:"discover-results-scroll",children:(0,m.jsx)("div",{className:"discover-list-scroll",children:a?(0,m.jsx)(fO,{stack:e.swipeStack,loading:e.swipeLoading,loaded:e.swipeLoaded,error:e.swipeError,customizing:e.swipeCustomizing,targetDepth:e.swipeTargetDepth,productSet:e.swipeProductSet,refilling:e.swipeRefilling,isLoggedIn:e.account.isLoggedIn,onApprove:e.onSwipeApprove,onReject:e.onSwipeReject}):s?(0,m.jsx)(pO,{templates:e.popularTemplates,loading:e.popularLoading,error:e.popularError,searchQuery:e.searchQuery,bookmarks:e.bookmarks,onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("ul",{className:"discover-list",id:"template-list",children:e.loading?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Loading compositions..."}):e.error?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"Unable to load compositions."}):e.templates.length===0?(0,m.jsx)("li",{className:"empty-state discover-loading-card",children:"No compositions available."}):e.visibleTemplates.map(p=>(0,m.jsx)(bk,{template:p,isBookmarked:e.bookmarks.has(p.templateId),onToggleBookmark:e.onToggleBookmark,onOpenPreview:n,onDeleteTemplate:e.onDeleteTemplate,accountUserId:e.account.userId},p.templateId))}),(0,m.jsx)("div",{className:"empty-state empty",id:"empty-state","data-visible":t?"true":"false",children:"No compositions match the current search and filter combination."})]})})})})]})}),u?(0,m.jsx)("aside",{className:"editor-right-rail","aria-label":"Discover copilot",children:d?(0,m.jsx)("div",{className:"editor-chat-panel","data-template-editor-chat-root":!0}):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("a",{className:"vf-editor-chat-mobile-fab",href:"/login","aria-label":"Log in to chat with Vidfarm",children:(0,m.jsx)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(0,m.jsx)("path",{d:"M20 11.5a7.5 7.5 0 0 1-9.8 7.1L4 20l1.5-5.3A7.5 7.5 0 1 1 20 11.5Z"})})}),(0,m.jsxs)("div",{className:"editor-chat-panel editor-chat-panel--logged-out",style:{display:"flex",flexDirection:"column",height:"100%",padding:"20px",gap:"16px",boxSizing:"border-box"},children:[(0,m.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[(0,m.jsx)("span",{className:"label",style:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase",color:"#a9884a"},children:"Vidfarm copilot"}),(0,m.jsx)("h3",{style:{margin:0,fontSize:"1.05rem",color:"#2f3748"},children:"Chat with Vidfarm"}),(0,m.jsx)("p",{style:{margin:0,fontSize:"0.9rem",color:"#74829c"},children:"Ask for hooks, angles, and remixes tailored to compositions in your library."})]}),(0,m.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",marginTop:"14px"},"aria-hidden":"true",children:["Give me 10 hooks for this coffee-shop template","Which awareness stage fits my product?","Remix this into an ad for my brand"].map(p=>(0,m.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 14px",borderRadius:"14px",border:"1px dashed rgba(191, 164, 109, 0.45)",background:"rgba(250, 245, 234, 0.65)",color:"#74829c",fontSize:"0.85rem",lineHeight:1.35},children:[(0,m.jsx)("span",{style:{color:"#bfa46d",fontWeight:700},children:"\u201C"}),p]},p))}),(0,m.jsxs)("div",{style:{marginTop:"auto",display:"flex",flexDirection:"column",gap:"10px"},children:[(0,m.jsx)("textarea",{rows:3,placeholder:"Log in to chat with Vidfarm\u2026",disabled:!0,"aria-label":"Chat with Vidfarm (log in to enable)",style:{width:"100%",resize:"none",padding:"10px 12px",borderRadius:"10px",border:"1px solid rgba(191, 164, 109, 0.36)",background:"rgba(250, 245, 234, 0.9)",color:"#74829c",fontFamily:"inherit",fontSize:"0.9rem",cursor:"not-allowed",boxSizing:"border-box"}}),(0,m.jsx)("a",{href:"/login",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:"38px",padding:"0 16px",borderRadius:"999px",background:"#bfa46d",color:"#1a1409",fontWeight:700,fontSize:"0.9rem",textDecoration:"none"},children:"Log in to chat"})]})]})]})}):null,r?(0,m.jsx)(uO,{template:r,onClose:()=>n(null)}):null,o?(0,m.jsx)(dO,{onClose:()=>i(!1),onAddTemplate:e.onAddTemplate}):null]})}function wk(e){return sk(t=>({templates:e.templates,searchQuery:"",bookmarksOnly:!1,bookmarks:new Set,loading:e.templates.length===0,error:null,view:"feed",popularTemplates:[],popularLoading:!1,popularLoaded:!1,popularError:null,swipeStack:[],swipeLoading:!1,swipeLoaded:!1,swipeError:null,swipeCustomizing:0,swipeTargetDepth:5,swipeProductSet:!0,swipeRefilling:!1,setTemplates:r=>t({templates:r,loading:!1,error:null}),setSearchQuery:r=>t({searchQuery:r}),setBookmarksOnly:r=>t({bookmarksOnly:r}),setBookmarks:r=>t({bookmarks:new Set(r)}),toggleBookmark:r=>t(n=>{let o=new Set(n.bookmarks);return o.has(r)?o.delete(r):o.add(r),{bookmarks:o}}),setLoading:r=>t({loading:r}),setError:r=>t({error:r,loading:!1}),setView:r=>t({view:r}),setPopularTemplates:r=>t({popularTemplates:r,popularLoading:!1,popularLoaded:!0,popularError:null}),setPopularLoading:r=>t({popularLoading:r}),setPopularError:r=>t({popularError:r,popularLoading:!1}),setSwipeLoading:r=>t({swipeLoading:r}),setSwipeError:r=>t({swipeError:r,swipeLoading:!1}),setSwipeStack:(r,n)=>t({swipeStack:r,swipeLoading:!1,swipeLoaded:!0,swipeError:null,...n?.customizing!==void 0?{swipeCustomizing:n.customizing}:{},...n?.targetDepth!==void 0?{swipeTargetDepth:n.targetDepth}:{},...n?.productSet!==void 0?{swipeProductSet:n.productSet}:{}}),setSwipeMeta:r=>t({...r.customizing!==void 0?{swipeCustomizing:r.customizing}:{},...r.targetDepth!==void 0?{swipeTargetDepth:r.targetDepth}:{},...r.productSet!==void 0?{swipeProductSet:r.productSet}:{}}),appendSwipeCard:r=>t(n=>n.swipeStack.some(o=>o.id===r.id)?{}:{swipeStack:[...n.swipeStack,r]}),removeSwipeCard:r=>t(n=>({swipeStack:n.swipeStack.filter(o=>o.id!==r)})),setSwipeRefilling:r=>t({swipeRefilling:r})}))}var ei=vr(wl(),1);lk();var mO="vidfarm:discover-bookmarks:v1",gO="public";function hO(){let e=document.getElementById("homepage-boot");return e?.textContent?JSON.parse(e.textContent):{templates:[],account:{isLoggedIn:!1},loadEndpoint:"/discover/feed",skillEndpointPrefix:"/discover/skills/"}}function Ck(e){return`${mO}_${e?.trim()||gO}`}function SO(e){try{let t=window.localStorage.getItem(Ck(e));if(!t)return new Set;let r=JSON.parse(t);return Array.isArray(r)?new Set(r.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function vO(e,t){try{window.localStorage.setItem(Ck(t),JSON.stringify(Array.from(e)))}catch{}}function yO(e){let t=e.searchQuery.trim().toLowerCase();return e.templates.filter(r=>{let n=!t||`${r.templateId} ${r.title} ${r.slugId} ${r.difficulty}`.toLowerCase().includes(t),o=!e.bookmarksOnly||e.bookmarks.has(r.templateId);return n&&o})}function Ik(e){return{id:String(e?.id??""),templateId:String(e?.template_id??""),forkId:e?.fork_id??null,sourceTitle:e?.source_title??null,title:String(e?.title??e?.source_title??"Untitled"),caption:String(e?.caption??""),pinnedComment:e?.pinned_comment??null,previewUrl:e?.preview_url??null,durationSeconds:typeof e?.duration_seconds=="number"?e.duration_seconds:null,status:String(e?.status??"ready")}}function _O({boot:e}){let t=(0,we.useMemo)(()=>wk(e),[e]),r=ze(t,b=>b.templates),n=ze(t,b=>b.searchQuery),o=ze(t,b=>b.bookmarksOnly),i=ze(t,b=>b.bookmarks),s=ze(t,b=>b.loading),a=ze(t,b=>b.error),l=ze(t,b=>b.view),c=ze(t,b=>b.popularTemplates),u=ze(t,b=>b.popularLoading),d=ze(t,b=>b.popularError),p=ze(t,b=>b.swipeStack),f=ze(t,b=>b.swipeLoading),h=ze(t,b=>b.swipeLoaded),y=ze(t,b=>b.swipeError),k=ze(t,b=>b.swipeCustomizing),g=ze(t,b=>b.swipeTargetDepth),S=ze(t,b=>b.swipeProductSet),v=ze(t,b=>b.swipeRefilling),E=(0,we.useRef)(!1),[C,R]=(0,we.useState)(!1),_=(0,we.useMemo)(()=>yO({templates:r,searchQuery:n,bookmarksOnly:o,bookmarks:i}),[r,n,o,i]);(0,we.useEffect)(()=>{t.getState().setBookmarks(SO(e.account.userId)),R(!0)},[e.account.userId,t]),(0,we.useEffect)(()=>{C&&vO(i,e.account.userId)},[e.account.userId,i,C]);let w=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setLoading(!0);try{let x=await fetch(e.loadEndpoint,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load formats.");t.getState().setTemplates(Array.isArray(A.templates)?A.templates:[])}catch(x){b?.showLoading?t.getState().setError(x instanceof Error?x.message:"Unable to load formats."):In("homepage.feed_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[e.loadEndpoint,t]);(0,we.useEffect)(()=>{e.templates.length>0||w({showLoading:!0})},[e.templates.length,w]);let z=r.some(b=>b.status==="processing");(0,we.useEffect)(()=>{if(!z)return;let b=window.setInterval(()=>{w()},8e3);return()=>window.clearInterval(b)},[z,w]);let I=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setPopularLoading(!0);try{let x=await fetch("/discover/popular",{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load popular formats.");t.getState().setPopularTemplates(Array.isArray(A.templates)?A.templates:[])}catch(x){b?.showLoading?t.getState().setPopularError(x instanceof Error?x.message:"Unable to load popular formats."):In("homepage.popular_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[t]),P=ze(t,b=>b.popularLoaded);(0,we.useEffect)(()=>{l!=="popular"||P||I({showLoading:!0})},[l,P,I]);let W=l==="popular"&&c.some(b=>b.status==="processing");(0,we.useEffect)(()=>{if(!W)return;let b=window.setInterval(()=>{I()},8e3);return()=>window.clearInterval(b)},[W,I]);let K=(0,we.useCallback)(async b=>{b?.showLoading&&t.getState().setSwipeLoading(!0);try{let x=await fetch("/discover/swipe/stack",{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok)throw new Error(typeof A.error=="string"&&A.error?A.error:"Unable to load your swipe deck.");let oe=Array.isArray(A.stack)?A.stack.map(Ik):[];t.getState().setSwipeStack(oe,{customizing:typeof A.customizing=="number"?A.customizing:0,targetDepth:typeof A.target_depth=="number"?A.target_depth:void 0,productSet:typeof A.product_description_set=="boolean"?A.product_description_set:void 0})}catch(x){b?.showLoading?t.getState().setSwipeError(x instanceof Error?x.message:"Unable to load your swipe deck."):In("homepage.swipe_refresh_failed",{message:x instanceof Error?x.message:String(x)})}},[t]),V=(0,we.useCallback)(async()=>{if(!E.current){E.current=!0,t.getState().setSwipeRefilling(!0);try{for(let b=0;b<8;b+=1){let x=await fetch("/discover/swipe/refill",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));if(!x.ok){A?.need_product_description?t.getState().setSwipeMeta({productSet:!1}):t.getState().setSwipeError(typeof A.error=="string"&&A.error?A.error:"Customization failed.");break}if(A.filled&&A.record&&t.getState().appendSwipeCard(Ik(A.record)),!A.filled)break}}catch(b){In("homepage.swipe_refill_failed",{message:b instanceof Error?b.message:String(b)})}finally{E.current=!1,t.getState().setSwipeRefilling(!1),K()}}},[t,K]);(0,we.useEffect)(()=>{l!=="swipe"||h||(async()=>{await K({showLoading:!0});let b=t.getState();b.swipeProductSet&&b.swipeStack.length<b.swipeTargetDepth&&V()})()},[l,h,K,V,t]);let Pe=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/swipe/${encodeURIComponent(b)}/approve`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(t.getState().removeSwipeCard(b),V(),{ok:!0}):A&&A.superseded?(t.getState().removeSwipeCard(b),V(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to approve."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to approve."}}},[t,V]),ue=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/swipe/${encodeURIComponent(b)}/reject`,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(t.getState().removeSwipeCard(b),V(),{ok:!0}):A&&A.superseded?(t.getState().removeSwipeCard(b),V(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to reject."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to reject."}}},[t,V]),fe=(0,we.useCallback)(async b=>{try{let x=await fetch(`/discover/templates/${encodeURIComponent(b)}`,{method:"DELETE",credentials:"same-origin",headers:{Accept:"application/json"}}),A=await x.json().catch(()=>({}));return x.ok?(kl("homepage.template_deleted",{template_id:b}),await w(),{ok:!0}):{ok:!1,error:typeof A.error=="string"&&A.error?A.error:"Unable to delete this template."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to delete this template."}}},[w]),L=(0,we.useCallback)(async b=>{try{let x=null;if(b.file){let J=b.file,ot=await fetch("/discover/templates/upload/presign",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify({file_name:J.name,content_type:J.type||null,size_bytes:J.size})}),Ie=await ot.json().catch(()=>({}));if(!ot.ok)return{ok:!1,error:Ie.error||"Unable to start the video upload."};if(Ie.transport==="presigned"&&Ie.upload?.url&&Ie.storage_key){let it=await fetch(Ie.upload.url,{method:Ie.upload.method||"PUT",headers:Ie.upload.headers||{},body:J});if(!it.ok)return{ok:!1,error:`Video upload failed (${it.status}). Try again.`};x={storage_key:Ie.storage_key,file_name:Ie.file_name||J.name}}else{let it=new FormData;it.append("file",J,Ie.file_name||J.name);let Jt=await fetch(Ie.upload?.url||"/discover/templates/upload",{method:"POST",credentials:"same-origin",body:it}),Zt=await Jt.json().catch(()=>({}));if(!Jt.ok||!Zt.storage_key)return{ok:!1,error:Zt.error||"Video upload failed. Try again."};x={storage_key:Zt.storage_key,file_name:Zt.file_name||J.name}}}let A=await fetch("/discover/templates",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json",Accept:"application/json"},body:JSON.stringify(x?{upload:x,title:b.title||null,tagline:b.tagline||null,notes:b.notes||null}:{source_url:b.sourceUrl,tagline:b.tagline||null,notes:b.notes||null})}),oe=await A.json().catch(()=>({}));return A.ok?(kl("homepage.template_added",x?{storage_key:x.storage_key}:{source_url:b.sourceUrl}),await w(),{ok:!0}):{ok:!1,error:typeof oe.error=="string"&&oe.error?oe.error:"Unable to add that video."}}catch(x){return{ok:!1,error:x instanceof Error?x.message:"Unable to add that video."}}},[w]);return(0,ei.jsx)(kk,{account:e.account,templates:r,visibleTemplates:_,searchQuery:n,bookmarksOnly:o,bookmarks:i,loading:s,error:a,view:l,popularTemplates:c,popularLoading:u,popularError:d,swipeStack:p,swipeLoading:f,swipeLoaded:h,swipeError:y,swipeCustomizing:k,swipeTargetDepth:g,swipeProductSet:S,swipeRefilling:v,skillEndpointPrefix:e.skillEndpointPrefix,onSearchQueryChange:b=>t.getState().setSearchQuery(b),onBookmarksOnlyChange:b=>t.getState().setBookmarksOnly(b),onViewChange:b=>t.getState().setView(b),onToggleBookmark:b=>t.getState().toggleBookmark(b),onAddTemplate:L,onDeleteTemplate:fe,onSwipeApprove:Pe,onSwipeReject:ue})}var Ld=hO(),xk=document.getElementById("homepage-root");kl("homepage.boot",{is_logged_in:Ld.account?.isLoggedIn??!1,template_count:Ld.templates?.length??0,load_endpoint:Ld.loadEndpoint});xk?(0,Rk.hydrateRoot)(xk,(0,ei.jsx)(Aa,{fallback:(0,ei.jsx)(ei.Fragment,{}),onError:e=>In("homepage.render_error",{message:e instanceof Error?e.message:String(e)}),children:(0,ei.jsx)(_O,{boot:Ld})})):In("homepage.no_root_element",{});
|
|
32
32
|
/*! Bundled license information:
|
|
33
33
|
|
|
34
34
|
react/cjs/react.production.min.js:
|