rivet-design 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,108 @@
1
+ function H1(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var W1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fv={exports:{}},tl={},hv={exports:{}},K={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var to=Symbol.for("react.element"),K1=Symbol.for("react.portal"),G1=Symbol.for("react.fragment"),Y1=Symbol.for("react.strict_mode"),q1=Symbol.for("react.profiler"),X1=Symbol.for("react.provider"),Q1=Symbol.for("react.context"),Z1=Symbol.for("react.forward_ref"),J1=Symbol.for("react.suspense"),ex=Symbol.for("react.memo"),tx=Symbol.for("react.lazy"),Mh=Symbol.iterator;function nx(t){return t===null||typeof t!="object"?null:(t=Mh&&t[Mh]||t["@@iterator"],typeof t=="function"?t:null)}var pv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gv=Object.assign,mv={};function bi(t,e,n){this.props=t,this.context=e,this.refs=mv,this.updater=n||pv}bi.prototype.isReactComponent={};bi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};bi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function vv(){}vv.prototype=bi.prototype;function Dd(t,e,n){this.props=t,this.context=e,this.refs=mv,this.updater=n||pv}var Fd=Dd.prototype=new vv;Fd.constructor=Dd;gv(Fd,bi.prototype);Fd.isPureReactComponent=!0;var Ih=Array.isArray,yv=Object.prototype.hasOwnProperty,Od={current:null},_v={key:!0,ref:!0,__self:!0,__source:!0};function wv(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)yv.call(e,r)&&!_v.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:to,type:t,key:s,ref:o,props:i,_owner:Od.current}}function rx(t,e){return{$$typeof:to,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function jd(t){return typeof t=="object"&&t!==null&&t.$$typeof===to}function ix(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Lh=/\/+/g;function Il(t,e){return typeof t=="object"&&t!==null&&t.key!=null?ix(""+t.key):e.toString(36)}function Ko(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case to:case K1:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+Il(o,0):r,Ih(i)?(n="",t!=null&&(n=t.replace(Lh,"$&/")+"/"),Ko(i,e,n,"",function(u){return u})):i!=null&&(jd(i)&&(i=rx(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Lh,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Ih(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+Il(s,a);o+=Ko(s,e,n,l,i)}else if(l=nx(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+Il(s,a++),o+=Ko(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function fo(t,e,n){if(t==null)return t;var r=[],i=0;return Ko(t,r,"","",function(s){return e.call(n,s,i++)}),r}function sx(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ze={current:null},Go={transition:null},ox={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:Go,ReactCurrentOwner:Od};function xv(){throw Error("act(...) is not supported in production builds of React.")}K.Children={map:fo,forEach:function(t,e,n){fo(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return fo(t,function(){e++}),e},toArray:function(t){return fo(t,function(e){return e})||[]},only:function(t){if(!jd(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};K.Component=bi;K.Fragment=G1;K.Profiler=q1;K.PureComponent=Dd;K.StrictMode=Y1;K.Suspense=J1;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ox;K.act=xv;K.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=gv({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Od.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)yv.call(e,l)&&!_v.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:to,type:t.type,key:i,ref:s,props:r,_owner:o}};K.createContext=function(t){return t={$$typeof:Q1,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:X1,_context:t},t.Consumer=t};K.createElement=wv;K.createFactory=function(t){var e=wv.bind(null,t);return e.type=t,e};K.createRef=function(){return{current:null}};K.forwardRef=function(t){return{$$typeof:Z1,render:t}};K.isValidElement=jd;K.lazy=function(t){return{$$typeof:tx,_payload:{_status:-1,_result:t},_init:sx}};K.memo=function(t,e){return{$$typeof:ex,type:t,compare:e===void 0?null:e}};K.startTransition=function(t){var e=Go.transition;Go.transition={};try{t()}finally{Go.transition=e}};K.unstable_act=xv;K.useCallback=function(t,e){return Ze.current.useCallback(t,e)};K.useContext=function(t){return Ze.current.useContext(t)};K.useDebugValue=function(){};K.useDeferredValue=function(t){return Ze.current.useDeferredValue(t)};K.useEffect=function(t,e){return Ze.current.useEffect(t,e)};K.useId=function(){return Ze.current.useId()};K.useImperativeHandle=function(t,e,n){return Ze.current.useImperativeHandle(t,e,n)};K.useInsertionEffect=function(t,e){return Ze.current.useInsertionEffect(t,e)};K.useLayoutEffect=function(t,e){return Ze.current.useLayoutEffect(t,e)};K.useMemo=function(t,e){return Ze.current.useMemo(t,e)};K.useReducer=function(t,e,n){return Ze.current.useReducer(t,e,n)};K.useRef=function(t){return Ze.current.useRef(t)};K.useState=function(t){return Ze.current.useState(t)};K.useSyncExternalStore=function(t,e,n){return Ze.current.useSyncExternalStore(t,e,n)};K.useTransition=function(){return Ze.current.useTransition()};K.version="18.3.1";hv.exports=K;var S=hv.exports;const qe=Nd(S),ax=H1({__proto__:null,default:qe},[S]);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var lx=S,ux=Symbol.for("react.element"),cx=Symbol.for("react.fragment"),dx=Object.prototype.hasOwnProperty,fx=lx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hx={key:!0,ref:!0,__self:!0,__source:!0};function Sv(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)dx.call(e,r)&&!hx.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:ux,type:t,key:s,ref:o,props:i,_owner:fx.current}}tl.Fragment=cx;tl.jsx=Sv;tl.jsxs=Sv;fv.exports=tl;var P=fv.exports,ju={},Ev={exports:{}},vt={},kv={exports:{}},Cv={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(t){function e(R,F){var j=R.length;R.push(F);e:for(;0<j;){var q=j-1>>>1,H=R[q];if(0<i(H,F))R[q]=F,R[j]=H,j=q;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var F=R[0],j=R.pop();if(j!==F){R[0]=j;e:for(var q=0,H=R.length,ge=H>>>1;q<ge;){var ae=2*(q+1)-1,Bt=R[ae],Oe=ae+1,$r=R[Oe];if(0>i(Bt,j))Oe<H&&0>i($r,Bt)?(R[q]=$r,R[Oe]=j,q=Oe):(R[q]=Bt,R[ae]=j,q=ae);else if(Oe<H&&0>i($r,j))R[q]=$r,R[Oe]=j,q=Oe;else break e}}return F}function i(R,F){var j=R.sortIndex-F.sortIndex;return j!==0?j:R.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,y=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=R)r(u),F.sortIndex=F.expirationTime,e(l,F);else break;F=n(u)}}function x(R){if(m=!1,v(R),!y)if(n(l)!==null)y=!0,Ee(w);else{var F=n(u);F!==null&&G(x,F.startTime-R)}}function w(R,F){y=!1,m&&(m=!1,p(C),C=-1),h=!0;var j=f;try{for(v(F),d=n(l);d!==null&&(!(d.expirationTime>F)||R&&!O());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var H=q(d.expirationTime<=F);F=t.unstable_now(),typeof H=="function"?d.callback=H:d===n(l)&&r(l),v(F)}else r(l);d=n(l)}if(d!==null)var ge=!0;else{var ae=n(u);ae!==null&&G(x,ae.startTime-F),ge=!1}return ge}finally{d=null,f=j,h=!1}}var E=!1,k=null,C=-1,$=5,M=-1;function O(){return!(t.unstable_now()-M<$)}function U(){if(k!==null){var R=t.unstable_now();M=R;var F=!0;try{F=k(!0,R)}finally{F?ee():(E=!1,k=null)}}else E=!1}var ee;if(typeof g=="function")ee=function(){g(U)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,Q=V.port2;V.port1.onmessage=U,ee=function(){Q.postMessage(null)}}else ee=function(){_(U,0)};function Ee(R){k=R,E||(E=!0,ee())}function G(R,F){C=_(function(){R(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,Ee(w))},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(R){switch(f){case 1:case 2:case 3:var F=3;break;default:F=f}var j=f;f=F;try{return R()}finally{f=j}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(R,F){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var j=f;f=R;try{return F()}finally{f=j}},t.unstable_scheduleCallback=function(R,F,j){var q=t.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?q+j:q):j=q,R){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=j+H,R={id:c++,callback:F,priorityLevel:R,startTime:j,expirationTime:H,sortIndex:-1},j>q?(R.sortIndex=j,e(u,R),n(l)===null&&R===n(u)&&(m?(p(C),C=-1):m=!0,G(x,j-q))):(R.sortIndex=H,e(l,R),y||h||(y=!0,Ee(w))),R},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(R){var F=f;return function(){var j=f;f=F;try{return R.apply(this,arguments)}finally{f=j}}}})(Cv);kv.exports=Cv;var px=kv.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var gx=S,mt=px;function b(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Tv=new Set,Ts={};function Ir(t,e){pi(t,e),pi(t+"Capture",e)}function pi(t,e){for(Ts[t]=e,t=0;t<e.length;t++)Tv.add(e[t])}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=Object.prototype.hasOwnProperty,mx=/^[: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]*$/,$h={},Nh={};function vx(t){return Vu.call(Nh,t)?!0:Vu.call($h,t)?!1:mx.test(t)?Nh[t]=!0:($h[t]=!0,!1)}function yx(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _x(t,e,n,r){if(e===null||typeof e>"u"||yx(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Je(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Fe[t]=new Je(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Fe[e]=new Je(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Fe[t]=new Je(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Fe[t]=new Je(t,2,!1,t,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(t){Fe[t]=new Je(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Fe[t]=new Je(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Fe[t]=new Je(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Fe[t]=new Je(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Fe[t]=new Je(t,5,!1,t.toLowerCase(),null,!1,!1)});var Vd=/[\-:]([a-z])/g;function Bd(t){return t[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(t){var e=t.replace(Vd,Bd);Fe[e]=new Je(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Vd,Bd);Fe[e]=new Je(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Vd,Bd);Fe[e]=new Je(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Fe[t]=new Je(t,1,!1,t.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Fe[t]=new Je(t,1,!1,t.toLowerCase(),null,!0,!0)});function zd(t,e,n,r){var i=Fe.hasOwnProperty(e)?Fe[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(_x(e,n,i,r)&&(n=null),r||i===null?vx(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Sn=gx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ho=Symbol.for("react.element"),jr=Symbol.for("react.portal"),Vr=Symbol.for("react.fragment"),Ud=Symbol.for("react.strict_mode"),Bu=Symbol.for("react.profiler"),Pv=Symbol.for("react.provider"),bv=Symbol.for("react.context"),Hd=Symbol.for("react.forward_ref"),zu=Symbol.for("react.suspense"),Uu=Symbol.for("react.suspense_list"),Wd=Symbol.for("react.memo"),An=Symbol.for("react.lazy"),Rv=Symbol.for("react.offscreen"),Dh=Symbol.iterator;function $i(t){return t===null||typeof t!="object"?null:(t=Dh&&t[Dh]||t["@@iterator"],typeof t=="function"?t:null)}var pe=Object.assign,Ll;function Xi(t){if(Ll===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ll=e&&e[1]||""}return`
34
+ `+Ll+t}var $l=!1;function Nl(t,e){if(!t||$l)return"";$l=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`
37
+ `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{$l=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Xi(t):""}function wx(t){switch(t.tag){case 5:return Xi(t.type);case 16:return Xi("Lazy");case 13:return Xi("Suspense");case 19:return Xi("SuspenseList");case 0:case 2:case 15:return t=Nl(t.type,!1),t;case 11:return t=Nl(t.type.render,!1),t;case 1:return t=Nl(t.type,!0),t;default:return""}}function Hu(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Vr:return"Fragment";case jr:return"Portal";case Bu:return"Profiler";case Ud:return"StrictMode";case zu:return"Suspense";case Uu:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case bv:return(t.displayName||"Context")+".Consumer";case Pv:return(t._context.displayName||"Context")+".Provider";case Hd:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Wd:return e=t.displayName||null,e!==null?e:Hu(t.type)||"Memo";case An:e=t._payload,t=t._init;try{return Hu(t(e))}catch{}}return null}function xx(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Hu(e);case 8:return e===Ud?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Gn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Av(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Sx(t){var e=Av(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function po(t){t._valueTracker||(t._valueTracker=Sx(t))}function Mv(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Av(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function da(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Wu(t,e){var n=e.checked;return pe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Fh(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Gn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Iv(t,e){e=e.checked,e!=null&&zd(t,"checked",e,!1)}function Ku(t,e){Iv(t,e);var n=Gn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Gu(t,e.type,n):e.hasOwnProperty("defaultValue")&&Gu(t,e.type,Gn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Oh(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Gu(t,e,n){(e!=="number"||da(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Qi=Array.isArray;function si(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Gn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Yu(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(b(91));return pe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function jh(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(b(92));if(Qi(n)){if(1<n.length)throw Error(b(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Gn(n)}}function Lv(t,e){var n=Gn(e.value),r=Gn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Vh(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function $v(t){switch(t){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 qu(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?$v(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var go,Nv=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(go=go||document.createElement("div"),go.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=go.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ps(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var cs={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},Ex=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(t){Ex.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),cs[e]=cs[t]})});function Dv(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||cs.hasOwnProperty(t)&&cs[t]?(""+e).trim():e+"px"}function Fv(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Dv(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var kx=pe({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 Xu(t,e){if(e){if(kx[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(b(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(b(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(b(61))}if(e.style!=null&&typeof e.style!="object")throw Error(b(62))}}function Qu(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Zu=null;function Kd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ju=null,oi=null,ai=null;function Bh(t){if(t=io(t)){if(typeof Ju!="function")throw Error(b(280));var e=t.stateNode;e&&(e=ol(e),Ju(t.stateNode,t.type,e))}}function Ov(t){oi?ai?ai.push(t):ai=[t]:oi=t}function jv(){if(oi){var t=oi,e=ai;if(ai=oi=null,Bh(t),e)for(t=0;t<e.length;t++)Bh(e[t])}}function Vv(t,e){return t(e)}function Bv(){}var Dl=!1;function zv(t,e,n){if(Dl)return t(e,n);Dl=!0;try{return Vv(t,e,n)}finally{Dl=!1,(oi!==null||ai!==null)&&(Bv(),jv())}}function bs(t,e){var n=t.stateNode;if(n===null)return null;var r=ol(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(b(231,e,typeof n));return n}var ec=!1;if(mn)try{var Ni={};Object.defineProperty(Ni,"passive",{get:function(){ec=!0}}),window.addEventListener("test",Ni,Ni),window.removeEventListener("test",Ni,Ni)}catch{ec=!1}function Cx(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var ds=!1,fa=null,ha=!1,tc=null,Tx={onError:function(t){ds=!0,fa=t}};function Px(t,e,n,r,i,s,o,a,l){ds=!1,fa=null,Cx.apply(Tx,arguments)}function bx(t,e,n,r,i,s,o,a,l){if(Px.apply(this,arguments),ds){if(ds){var u=fa;ds=!1,fa=null}else throw Error(b(198));ha||(ha=!0,tc=u)}}function Lr(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Uv(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function zh(t){if(Lr(t)!==t)throw Error(b(188))}function Rx(t){var e=t.alternate;if(!e){if(e=Lr(t),e===null)throw Error(b(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return zh(i),t;if(s===r)return zh(i),e;s=s.sibling}throw Error(b(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(b(189))}}if(n.alternate!==r)throw Error(b(190))}if(n.tag!==3)throw Error(b(188));return n.stateNode.current===n?t:e}function Hv(t){return t=Rx(t),t!==null?Wv(t):null}function Wv(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Wv(t);if(e!==null)return e;t=t.sibling}return null}var Kv=mt.unstable_scheduleCallback,Uh=mt.unstable_cancelCallback,Ax=mt.unstable_shouldYield,Mx=mt.unstable_requestPaint,Se=mt.unstable_now,Ix=mt.unstable_getCurrentPriorityLevel,Gd=mt.unstable_ImmediatePriority,Gv=mt.unstable_UserBlockingPriority,pa=mt.unstable_NormalPriority,Lx=mt.unstable_LowPriority,Yv=mt.unstable_IdlePriority,nl=null,Yt=null;function $x(t){if(Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(nl,t,void 0,(t.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:Fx,Nx=Math.log,Dx=Math.LN2;function Fx(t){return t>>>=0,t===0?32:31-(Nx(t)/Dx|0)|0}var mo=64,vo=4194304;function Zi(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ga(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Zi(a):(s&=o,s!==0&&(r=Zi(s)))}else o=n&~i,o!==0?r=Zi(o):s!==0&&(r=Zi(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Ot(e),i=1<<n,r|=t[n],e&=~i;return r}function Ox(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 jx(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Ot(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=Ox(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function nc(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function qv(){var t=mo;return mo<<=1,!(mo&4194240)&&(mo=64),t}function Fl(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function no(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ot(e),t[e]=n}function Vx(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Ot(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function Yd(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Ot(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Z=0;function Xv(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Qv,qd,Zv,Jv,ey,rc=!1,yo=[],Fn=null,On=null,jn=null,Rs=new Map,As=new Map,In=[],Bx="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 Hh(t,e){switch(t){case"focusin":case"focusout":Fn=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":Rs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(e.pointerId)}}function Di(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=io(e),e!==null&&qd(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function zx(t,e,n,r,i){switch(e){case"focusin":return Fn=Di(Fn,t,e,n,r,i),!0;case"dragenter":return On=Di(On,t,e,n,r,i),!0;case"mouseover":return jn=Di(jn,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return Rs.set(s,Di(Rs.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,As.set(s,Di(As.get(s)||null,t,e,n,r,i)),!0}return!1}function ty(t){var e=hr(t.target);if(e!==null){var n=Lr(e);if(n!==null){if(e=n.tag,e===13){if(e=Uv(n),e!==null){t.blockedOn=e,ey(t.priority,function(){Zv(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Yo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ic(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Zu=r,n.target.dispatchEvent(r),Zu=null}else return e=io(n),e!==null&&qd(e),t.blockedOn=n,!1;e.shift()}return!0}function Wh(t,e,n){Yo(t)&&n.delete(e)}function Ux(){rc=!1,Fn!==null&&Yo(Fn)&&(Fn=null),On!==null&&Yo(On)&&(On=null),jn!==null&&Yo(jn)&&(jn=null),Rs.forEach(Wh),As.forEach(Wh)}function Fi(t,e){t.blockedOn===e&&(t.blockedOn=null,rc||(rc=!0,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,Ux)))}function Ms(t){function e(i){return Fi(i,t)}if(0<yo.length){Fi(yo[0],t);for(var n=1;n<yo.length;n++){var r=yo[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Fn!==null&&Fi(Fn,t),On!==null&&Fi(On,t),jn!==null&&Fi(jn,t),Rs.forEach(e),As.forEach(e),n=0;n<In.length;n++)r=In[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<In.length&&(n=In[0],n.blockedOn===null);)ty(n),n.blockedOn===null&&In.shift()}var li=Sn.ReactCurrentBatchConfig,ma=!0;function Hx(t,e,n,r){var i=Z,s=li.transition;li.transition=null;try{Z=1,Xd(t,e,n,r)}finally{Z=i,li.transition=s}}function Wx(t,e,n,r){var i=Z,s=li.transition;li.transition=null;try{Z=4,Xd(t,e,n,r)}finally{Z=i,li.transition=s}}function Xd(t,e,n,r){if(ma){var i=ic(t,e,n,r);if(i===null)Gl(t,e,r,va,n),Hh(t,r);else if(zx(i,t,e,n,r))r.stopPropagation();else if(Hh(t,r),e&4&&-1<Bx.indexOf(t)){for(;i!==null;){var s=io(i);if(s!==null&&Qv(s),s=ic(t,e,n,r),s===null&&Gl(t,e,r,va,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Gl(t,e,r,null,n)}}var va=null;function ic(t,e,n,r){if(va=null,t=Kd(r),t=hr(t),t!==null)if(e=Lr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Uv(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return va=t,null}function ny(t){switch(t){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(Ix()){case Gd:return 1;case Gv:return 4;case pa:case Lx:return 16;case Yv:return 536870912;default:return 16}default:return 16}}var $n=null,Qd=null,qo=null;function ry(){if(qo)return qo;var t,e=Qd,n=e.length,r,i="value"in $n?$n.value:$n.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return qo=i.slice(t,1<r?1-r:void 0)}function Xo(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function _o(){return!0}function Kh(){return!1}function yt(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?_o:Kh,this.isPropagationStopped=Kh,this}return pe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=_o)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_o)},persist:function(){},isPersistent:_o}),e}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zd=yt(Ri),ro=pe({},Ri,{view:0,detail:0}),Kx=yt(ro),Ol,jl,Oi,rl=pe({},ro,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Oi&&(Oi&&t.type==="mousemove"?(Ol=t.screenX-Oi.screenX,jl=t.screenY-Oi.screenY):jl=Ol=0,Oi=t),Ol)},movementY:function(t){return"movementY"in t?t.movementY:jl}}),Gh=yt(rl),Gx=pe({},rl,{dataTransfer:0}),Yx=yt(Gx),qx=pe({},ro,{relatedTarget:0}),Vl=yt(qx),Xx=pe({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),Qx=yt(Xx),Zx=pe({},Ri,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Jx=yt(Zx),eS=pe({},Ri,{data:0}),Yh=yt(eS),tS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nS={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"},rS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iS(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=rS[t])?!!e[t]:!1}function Jd(){return iS}var sS=pe({},ro,{key:function(t){if(t.key){var e=tS[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Xo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?nS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jd,charCode:function(t){return t.type==="keypress"?Xo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),oS=yt(sS),aS=pe({},rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qh=yt(aS),lS=pe({},ro,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jd}),uS=yt(lS),cS=pe({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),dS=yt(cS),fS=pe({},rl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),hS=yt(fS),pS=[9,13,27,32],ef=mn&&"CompositionEvent"in window,fs=null;mn&&"documentMode"in document&&(fs=document.documentMode);var gS=mn&&"TextEvent"in window&&!fs,iy=mn&&(!ef||fs&&8<fs&&11>=fs),Xh=" ",Qh=!1;function sy(t,e){switch(t){case"keyup":return pS.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Br=!1;function mS(t,e){switch(t){case"compositionend":return oy(e);case"keypress":return e.which!==32?null:(Qh=!0,Xh);case"textInput":return t=e.data,t===Xh&&Qh?null:t;default:return null}}function vS(t,e){if(Br)return t==="compositionend"||!ef&&sy(t,e)?(t=ry(),qo=Qd=$n=null,Br=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return iy&&e.locale!=="ko"?null:e.data;default:return null}}var yS={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 Zh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!yS[t.type]:e==="textarea"}function ay(t,e,n,r){Ov(r),e=ya(e,"onChange"),0<e.length&&(n=new Zd("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var hs=null,Is=null;function _S(t){yy(t,0)}function il(t){var e=Hr(t);if(Mv(e))return t}function wS(t,e){if(t==="change")return e}var ly=!1;if(mn){var Bl;if(mn){var zl="oninput"in document;if(!zl){var Jh=document.createElement("div");Jh.setAttribute("oninput","return;"),zl=typeof Jh.oninput=="function"}Bl=zl}else Bl=!1;ly=Bl&&(!document.documentMode||9<document.documentMode)}function ep(){hs&&(hs.detachEvent("onpropertychange",uy),Is=hs=null)}function uy(t){if(t.propertyName==="value"&&il(Is)){var e=[];ay(e,Is,t,Kd(t)),zv(_S,e)}}function xS(t,e,n){t==="focusin"?(ep(),hs=e,Is=n,hs.attachEvent("onpropertychange",uy)):t==="focusout"&&ep()}function SS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return il(Is)}function ES(t,e){if(t==="click")return il(e)}function kS(t,e){if(t==="input"||t==="change")return il(e)}function CS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Vt=typeof Object.is=="function"?Object.is:CS;function Ls(t,e){if(Vt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Vu.call(e,i)||!Vt(t[i],e[i]))return!1}return!0}function tp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function np(t,e){var n=tp(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tp(n)}}function cy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function dy(){for(var t=window,e=da();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=da(t.document)}return e}function tf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function TS(t){var e=dy(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&cy(n.ownerDocument.documentElement,n)){if(r!==null&&tf(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=np(n,s);var o=np(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var PS=mn&&"documentMode"in document&&11>=document.documentMode,zr=null,sc=null,ps=null,oc=!1;function rp(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;oc||zr==null||zr!==da(r)||(r=zr,"selectionStart"in r&&tf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ps&&Ls(ps,r)||(ps=r,r=ya(sc,"onSelect"),0<r.length&&(e=new Zd("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=zr)))}function wo(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ur={animationend:wo("Animation","AnimationEnd"),animationiteration:wo("Animation","AnimationIteration"),animationstart:wo("Animation","AnimationStart"),transitionend:wo("Transition","TransitionEnd")},Ul={},fy={};mn&&(fy=document.createElement("div").style,"AnimationEvent"in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),"TransitionEvent"in window||delete Ur.transitionend.transition);function sl(t){if(Ul[t])return Ul[t];if(!Ur[t])return t;var e=Ur[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in fy)return Ul[t]=e[n];return t}var hy=sl("animationend"),py=sl("animationiteration"),gy=sl("animationstart"),my=sl("transitionend"),vy=new Map,ip="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 Zn(t,e){vy.set(t,e),Ir(e,[t])}for(var Hl=0;Hl<ip.length;Hl++){var Wl=ip[Hl],bS=Wl.toLowerCase(),RS=Wl[0].toUpperCase()+Wl.slice(1);Zn(bS,"on"+RS)}Zn(hy,"onAnimationEnd");Zn(py,"onAnimationIteration");Zn(gy,"onAnimationStart");Zn("dblclick","onDoubleClick");Zn("focusin","onFocus");Zn("focusout","onBlur");Zn(my,"onTransitionEnd");pi("onMouseEnter",["mouseout","mouseover"]);pi("onMouseLeave",["mouseout","mouseover"]);pi("onPointerEnter",["pointerout","pointerover"]);pi("onPointerLeave",["pointerout","pointerover"]);Ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ir("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="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(" "),AS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ji));function sp(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,bx(r,e,void 0,t),t.currentTarget=null}function yy(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;sp(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;sp(i,a,u),s=l}}}if(ha)throw t=tc,ha=!1,tc=null,t}function re(t,e){var n=e[dc];n===void 0&&(n=e[dc]=new Set);var r=t+"__bubble";n.has(r)||(_y(e,t,2,!1),n.add(r))}function Kl(t,e,n){var r=0;e&&(r|=4),_y(n,t,r,e)}var xo="_reactListening"+Math.random().toString(36).slice(2);function $s(t){if(!t[xo]){t[xo]=!0,Tv.forEach(function(n){n!=="selectionchange"&&(AS.has(n)||Kl(n,!1,t),Kl(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[xo]||(e[xo]=!0,Kl("selectionchange",!1,e))}}function _y(t,e,n,r){switch(ny(e)){case 1:var i=Hx;break;case 4:i=Wx;break;default:i=Xd}n=i.bind(null,e,n,t),i=void 0,!ec||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Gl(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=hr(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}zv(function(){var u=s,c=Kd(n),d=[];e:{var f=vy.get(t);if(f!==void 0){var h=Zd,y=t;switch(t){case"keypress":if(Xo(n)===0)break e;case"keydown":case"keyup":h=oS;break;case"focusin":y="focus",h=Vl;break;case"focusout":y="blur",h=Vl;break;case"beforeblur":case"afterblur":h=Vl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Yx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=uS;break;case hy:case py:case gy:h=Qx;break;case my:h=dS;break;case"scroll":h=Kx;break;case"wheel":h=hS;break;case"copy":case"cut":case"paste":h=Jx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=qh}var m=(e&4)!==0,_=!m&&t==="scroll",p=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,v;g!==null;){v=g;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,p!==null&&(x=bs(g,p),x!=null&&m.push(Ns(g,x,v)))),_)break;g=g.return}0<m.length&&(f=new h(f,y,null,n,c),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==Zu&&(y=n.relatedTarget||n.fromElement)&&(hr(y)||y[vn]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?hr(y):null,y!==null&&(_=Lr(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(m=Gh,x="onMouseLeave",p="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(m=qh,x="onPointerLeave",p="onPointerEnter",g="pointer"),_=h==null?f:Hr(h),v=y==null?f:Hr(y),f=new m(x,g+"leave",h,n,c),f.target=_,f.relatedTarget=v,x=null,hr(c)===u&&(m=new m(p,g+"enter",y,n,c),m.target=v,m.relatedTarget=_,x=m),_=x,h&&y)t:{for(m=h,p=y,g=0,v=m;v;v=Nr(v))g++;for(v=0,x=p;x;x=Nr(x))v++;for(;0<g-v;)m=Nr(m),g--;for(;0<v-g;)p=Nr(p),v--;for(;g--;){if(m===p||p!==null&&m===p.alternate)break t;m=Nr(m),p=Nr(p)}m=null}else m=null;h!==null&&op(d,f,h,m,!1),y!==null&&_!==null&&op(d,_,y,m,!0)}}e:{if(f=u?Hr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var w=wS;else if(Zh(f))if(ly)w=kS;else{w=SS;var E=xS}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=ES);if(w&&(w=w(t,u))){ay(d,w,n,c);break e}E&&E(t,f,u),t==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Gu(f,"number",f.value)}switch(E=u?Hr(u):window,t){case"focusin":(Zh(E)||E.contentEditable==="true")&&(zr=E,sc=u,ps=null);break;case"focusout":ps=sc=zr=null;break;case"mousedown":oc=!0;break;case"contextmenu":case"mouseup":case"dragend":oc=!1,rp(d,n,c);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":rp(d,n,c)}var k;if(ef)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Br?sy(t,n)&&(C="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(iy&&n.locale!=="ko"&&(Br||C!=="onCompositionStart"?C==="onCompositionEnd"&&Br&&(k=ry()):($n=c,Qd="value"in $n?$n.value:$n.textContent,Br=!0)),E=ya(u,C),0<E.length&&(C=new Yh(C,t,null,n,c),d.push({event:C,listeners:E}),k?C.data=k:(k=oy(n),k!==null&&(C.data=k)))),(k=gS?mS(t,n):vS(t,n))&&(u=ya(u,"onBeforeInput"),0<u.length&&(c=new Yh("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=k))}yy(d,e)})}function Ns(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ya(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=bs(t,n),s!=null&&r.unshift(Ns(t,s,i)),s=bs(t,e),s!=null&&r.push(Ns(t,s,i))),t=t.return}return r}function Nr(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function op(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=bs(n,s),l!=null&&o.unshift(Ns(n,l,a))):i||(l=bs(n,s),l!=null&&o.push(Ns(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var MS=/\r\n?/g,IS=/\u0000|\uFFFD/g;function ap(t){return(typeof t=="string"?t:""+t).replace(MS,`
38
+ `).replace(IS,"")}function So(t,e,n){if(e=ap(e),ap(t)!==e&&n)throw Error(b(425))}function _a(){}var ac=null,lc=null;function uc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var cc=typeof setTimeout=="function"?setTimeout:void 0,LS=typeof clearTimeout=="function"?clearTimeout:void 0,lp=typeof Promise=="function"?Promise:void 0,$S=typeof queueMicrotask=="function"?queueMicrotask:typeof lp<"u"?function(t){return lp.resolve(null).then(t).catch(NS)}:cc;function NS(t){setTimeout(function(){throw t})}function Yl(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Ms(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ms(e)}function Vn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function up(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Ai,Ds="__reactProps$"+Ai,vn="__reactContainer$"+Ai,dc="__reactEvents$"+Ai,DS="__reactListeners$"+Ai,FS="__reactHandles$"+Ai;function hr(t){var e=t[Wt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[vn]||n[Wt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=up(t);t!==null;){if(n=t[Wt])return n;t=up(t)}return e}t=n,n=t.parentNode}return null}function io(t){return t=t[Wt]||t[vn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Hr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(b(33))}function ol(t){return t[Ds]||null}var fc=[],Wr=-1;function Jn(t){return{current:t}}function oe(t){0>Wr||(t.current=fc[Wr],fc[Wr]=null,Wr--)}function ne(t,e){Wr++,fc[Wr]=t.current,t.current=e}var Yn={},Ke=Jn(Yn),at=Jn(!1),Sr=Yn;function gi(t,e){var n=t.type.contextTypes;if(!n)return Yn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function lt(t){return t=t.childContextTypes,t!=null}function wa(){oe(at),oe(Ke)}function cp(t,e,n){if(Ke.current!==Yn)throw Error(b(168));ne(Ke,e),ne(at,n)}function wy(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(b(108,xx(t)||"Unknown",i));return pe({},n,r)}function xa(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Yn,Sr=Ke.current,ne(Ke,t),ne(at,at.current),!0}function dp(t,e,n){var r=t.stateNode;if(!r)throw Error(b(169));n?(t=wy(t,e,Sr),r.__reactInternalMemoizedMergedChildContext=t,oe(at),oe(Ke),ne(Ke,t)):oe(at),ne(at,n)}var cn=null,al=!1,ql=!1;function xy(t){cn===null?cn=[t]:cn.push(t)}function OS(t){al=!0,xy(t)}function er(){if(!ql&&cn!==null){ql=!0;var t=0,e=Z;try{var n=cn;for(Z=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}cn=null,al=!1}catch(i){throw cn!==null&&(cn=cn.slice(t+1)),Kv(Gd,er),i}finally{Z=e,ql=!1}}return null}var Kr=[],Gr=0,Sa=null,Ea=0,xt=[],St=0,Er=null,hn=1,pn="";function lr(t,e){Kr[Gr++]=Ea,Kr[Gr++]=Sa,Sa=t,Ea=e}function Sy(t,e,n){xt[St++]=hn,xt[St++]=pn,xt[St++]=Er,Er=t;var r=hn;t=pn;var i=32-Ot(r)-1;r&=~(1<<i),n+=1;var s=32-Ot(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,hn=1<<32-Ot(e)+i|n<<i|r,pn=s+t}else hn=1<<s|n<<i|r,pn=t}function nf(t){t.return!==null&&(lr(t,1),Sy(t,1,0))}function rf(t){for(;t===Sa;)Sa=Kr[--Gr],Kr[Gr]=null,Ea=Kr[--Gr],Kr[Gr]=null;for(;t===Er;)Er=xt[--St],xt[St]=null,pn=xt[--St],xt[St]=null,hn=xt[--St],xt[St]=null}var gt=null,ft=null,le=!1,Ft=null;function Ey(t,e){var n=Et(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function fp(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,gt=t,ft=Vn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,gt=t,ft=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Er!==null?{id:hn,overflow:pn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Et(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,gt=t,ft=null,!0):!1;default:return!1}}function hc(t){return(t.mode&1)!==0&&(t.flags&128)===0}function pc(t){if(le){var e=ft;if(e){var n=e;if(!fp(t,e)){if(hc(t))throw Error(b(418));e=Vn(n.nextSibling);var r=gt;e&&fp(t,e)?Ey(r,n):(t.flags=t.flags&-4097|2,le=!1,gt=t)}}else{if(hc(t))throw Error(b(418));t.flags=t.flags&-4097|2,le=!1,gt=t}}}function hp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;gt=t}function Eo(t){if(t!==gt)return!1;if(!le)return hp(t),le=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!uc(t.type,t.memoizedProps)),e&&(e=ft)){if(hc(t))throw ky(),Error(b(418));for(;e;)Ey(t,e),e=Vn(e.nextSibling)}if(hp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(b(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){ft=Vn(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}ft=null}}else ft=gt?Vn(t.stateNode.nextSibling):null;return!0}function ky(){for(var t=ft;t;)t=Vn(t.nextSibling)}function mi(){ft=gt=null,le=!1}function sf(t){Ft===null?Ft=[t]:Ft.push(t)}var jS=Sn.ReactCurrentBatchConfig;function ji(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(b(309));var r=n.stateNode}if(!r)throw Error(b(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(b(284));if(!n._owner)throw Error(b(290,t))}return t}function ko(t,e){throw t=Object.prototype.toString.call(e),Error(b(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function pp(t){var e=t._init;return e(t._payload)}function Cy(t){function e(p,g){if(t){var v=p.deletions;v===null?(p.deletions=[g],p.flags|=16):v.push(g)}}function n(p,g){if(!t)return null;for(;g!==null;)e(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Hn(p,g),p.index=0,p.sibling=null,p}function s(p,g,v){return p.index=v,t?(v=p.alternate,v!==null?(v=v.index,v<g?(p.flags|=2,g):v):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return t&&p.alternate===null&&(p.flags|=2),p}function a(p,g,v,x){return g===null||g.tag!==6?(g=nu(v,p.mode,x),g.return=p,g):(g=i(g,v),g.return=p,g)}function l(p,g,v,x){var w=v.type;return w===Vr?c(p,g,v.props.children,x,v.key):g!==null&&(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===An&&pp(w)===g.type)?(x=i(g,v.props),x.ref=ji(p,g,v),x.return=p,x):(x=ra(v.type,v.key,v.props,null,p.mode,x),x.ref=ji(p,g,v),x.return=p,x)}function u(p,g,v,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=ru(v,p.mode,x),g.return=p,g):(g=i(g,v.children||[]),g.return=p,g)}function c(p,g,v,x,w){return g===null||g.tag!==7?(g=_r(v,p.mode,x,w),g.return=p,g):(g=i(g,v),g.return=p,g)}function d(p,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=nu(""+g,p.mode,v),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ho:return v=ra(g.type,g.key,g.props,null,p.mode,v),v.ref=ji(p,null,g),v.return=p,v;case jr:return g=ru(g,p.mode,v),g.return=p,g;case An:var x=g._init;return d(p,x(g._payload),v)}if(Qi(g)||$i(g))return g=_r(g,p.mode,v,null),g.return=p,g;ko(p,g)}return null}function f(p,g,v,x){var w=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return w!==null?null:a(p,g,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ho:return v.key===w?l(p,g,v,x):null;case jr:return v.key===w?u(p,g,v,x):null;case An:return w=v._init,f(p,g,w(v._payload),x)}if(Qi(v)||$i(v))return w!==null?null:c(p,g,v,x,null);ko(p,v)}return null}function h(p,g,v,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return p=p.get(v)||null,a(g,p,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ho:return p=p.get(x.key===null?v:x.key)||null,l(g,p,x,w);case jr:return p=p.get(x.key===null?v:x.key)||null,u(g,p,x,w);case An:var E=x._init;return h(p,g,v,E(x._payload),w)}if(Qi(x)||$i(x))return p=p.get(v)||null,c(g,p,x,w,null);ko(g,x)}return null}function y(p,g,v,x){for(var w=null,E=null,k=g,C=g=0,$=null;k!==null&&C<v.length;C++){k.index>C?($=k,k=null):$=k.sibling;var M=f(p,k,v[C],x);if(M===null){k===null&&(k=$);break}t&&k&&M.alternate===null&&e(p,k),g=s(M,g,C),E===null?w=M:E.sibling=M,E=M,k=$}if(C===v.length)return n(p,k),le&&lr(p,C),w;if(k===null){for(;C<v.length;C++)k=d(p,v[C],x),k!==null&&(g=s(k,g,C),E===null?w=k:E.sibling=k,E=k);return le&&lr(p,C),w}for(k=r(p,k);C<v.length;C++)$=h(k,p,C,v[C],x),$!==null&&(t&&$.alternate!==null&&k.delete($.key===null?C:$.key),g=s($,g,C),E===null?w=$:E.sibling=$,E=$);return t&&k.forEach(function(O){return e(p,O)}),le&&lr(p,C),w}function m(p,g,v,x){var w=$i(v);if(typeof w!="function")throw Error(b(150));if(v=w.call(v),v==null)throw Error(b(151));for(var E=w=null,k=g,C=g=0,$=null,M=v.next();k!==null&&!M.done;C++,M=v.next()){k.index>C?($=k,k=null):$=k.sibling;var O=f(p,k,M.value,x);if(O===null){k===null&&(k=$);break}t&&k&&O.alternate===null&&e(p,k),g=s(O,g,C),E===null?w=O:E.sibling=O,E=O,k=$}if(M.done)return n(p,k),le&&lr(p,C),w;if(k===null){for(;!M.done;C++,M=v.next())M=d(p,M.value,x),M!==null&&(g=s(M,g,C),E===null?w=M:E.sibling=M,E=M);return le&&lr(p,C),w}for(k=r(p,k);!M.done;C++,M=v.next())M=h(k,p,C,M.value,x),M!==null&&(t&&M.alternate!==null&&k.delete(M.key===null?C:M.key),g=s(M,g,C),E===null?w=M:E.sibling=M,E=M);return t&&k.forEach(function(U){return e(p,U)}),le&&lr(p,C),w}function _(p,g,v,x){if(typeof v=="object"&&v!==null&&v.type===Vr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ho:e:{for(var w=v.key,E=g;E!==null;){if(E.key===w){if(w=v.type,w===Vr){if(E.tag===7){n(p,E.sibling),g=i(E,v.props.children),g.return=p,p=g;break e}}else if(E.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===An&&pp(w)===E.type){n(p,E.sibling),g=i(E,v.props),g.ref=ji(p,E,v),g.return=p,p=g;break e}n(p,E);break}else e(p,E);E=E.sibling}v.type===Vr?(g=_r(v.props.children,p.mode,x,v.key),g.return=p,p=g):(x=ra(v.type,v.key,v.props,null,p.mode,x),x.ref=ji(p,g,v),x.return=p,p=x)}return o(p);case jr:e:{for(E=v.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(p,g.sibling),g=i(g,v.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else e(p,g);g=g.sibling}g=ru(v,p.mode,x),g.return=p,p=g}return o(p);case An:return E=v._init,_(p,g,E(v._payload),x)}if(Qi(v))return y(p,g,v,x);if($i(v))return m(p,g,v,x);ko(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(p,g.sibling),g=i(g,v),g.return=p,p=g):(n(p,g),g=nu(v,p.mode,x),g.return=p,p=g),o(p)):n(p,g)}return _}var vi=Cy(!0),Ty=Cy(!1),ka=Jn(null),Ca=null,Yr=null,of=null;function af(){of=Yr=Ca=null}function lf(t){var e=ka.current;oe(ka),t._currentValue=e}function gc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function ui(t,e){Ca=t,of=Yr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(rt=!0),t.firstContext=null)}function Rt(t){var e=t._currentValue;if(of!==t)if(t={context:t,memoizedValue:e,next:null},Yr===null){if(Ca===null)throw Error(b(308));Yr=t,Ca.dependencies={lanes:0,firstContext:t}}else Yr=Yr.next=t;return e}var pr=null;function uf(t){pr===null?pr=[t]:pr.push(t)}function Py(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,uf(e)):(n.next=i.next,i.next=n),e.interleaved=n,yn(t,r)}function yn(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Mn=!1;function cf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function by(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function gn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Bn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,yn(t,n)}return i=r.interleaved,i===null?(e.next=e,uf(r)):(e.next=i.next,i.next=e),r.interleaved=e,yn(t,n)}function Qo(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Yd(t,n)}}function gp(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ta(t,e,n,r){var i=t.updateQueue;Mn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;o=0,c=u=l=null,a=s;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,m=a;switch(f=e,h=n,m.tag){case 1:if(y=m.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=m.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=pe({},d,f);break e;case 2:Mn=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Cr|=o,t.lanes=o,t.memoizedState=d}}function mp(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(b(191,i));i.call(r)}}}var so={},qt=Jn(so),Fs=Jn(so),Os=Jn(so);function gr(t){if(t===so)throw Error(b(174));return t}function df(t,e){switch(ne(Os,e),ne(Fs,t),ne(qt,so),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:qu(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=qu(e,t)}oe(qt),ne(qt,e)}function yi(){oe(qt),oe(Fs),oe(Os)}function Ry(t){gr(Os.current);var e=gr(qt.current),n=qu(e,t.type);e!==n&&(ne(Fs,t),ne(qt,n))}function ff(t){Fs.current===t&&(oe(qt),oe(Fs))}var ce=Jn(0);function Pa(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Xl=[];function hf(){for(var t=0;t<Xl.length;t++)Xl[t]._workInProgressVersionPrimary=null;Xl.length=0}var Zo=Sn.ReactCurrentDispatcher,Ql=Sn.ReactCurrentBatchConfig,kr=0,he=null,Te=null,Me=null,ba=!1,gs=!1,js=0,VS=0;function je(){throw Error(b(321))}function pf(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Vt(t[n],e[n]))return!1;return!0}function gf(t,e,n,r,i,s){if(kr=s,he=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Zo.current=t===null||t.memoizedState===null?HS:WS,t=n(r,i),gs){s=0;do{if(gs=!1,js=0,25<=s)throw Error(b(301));s+=1,Me=Te=null,e.updateQueue=null,Zo.current=KS,t=n(r,i)}while(gs)}if(Zo.current=Ra,e=Te!==null&&Te.next!==null,kr=0,Me=Te=he=null,ba=!1,e)throw Error(b(300));return t}function mf(){var t=js!==0;return js=0,t}function Ht(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?he.memoizedState=Me=t:Me=Me.next=t,Me}function At(){if(Te===null){var t=he.alternate;t=t!==null?t.memoizedState:null}else t=Te.next;var e=Me===null?he.memoizedState:Me.next;if(e!==null)Me=e,Te=t;else{if(t===null)throw Error(b(310));Te=t,t={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Me===null?he.memoizedState=Me=t:Me=Me.next=t}return Me}function Vs(t,e){return typeof e=="function"?e(t):e}function Zl(t){var e=At(),n=e.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=t;var r=Te,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((kr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,he.lanes|=c,Cr|=c}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Vt(r,e.memoizedState)||(rt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,he.lanes|=s,Cr|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Jl(t){var e=At(),n=e.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Vt(s,e.memoizedState)||(rt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function Ay(){}function My(t,e){var n=he,r=At(),i=e(),s=!Vt(r.memoizedState,i);if(s&&(r.memoizedState=i,rt=!0),r=r.queue,vf($y.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Bs(9,Ly.bind(null,n,r,i,e),void 0,null),Ie===null)throw Error(b(349));kr&30||Iy(n,e,i)}return i}function Iy(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=he.updateQueue,e===null?(e={lastEffect:null,stores:null},he.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Ly(t,e,n,r){e.value=n,e.getSnapshot=r,Ny(e)&&Dy(t)}function $y(t,e,n){return n(function(){Ny(e)&&Dy(t)})}function Ny(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Vt(t,n)}catch{return!0}}function Dy(t){var e=yn(t,1);e!==null&&jt(e,t,1,-1)}function vp(t){var e=Ht();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vs,lastRenderedState:t},e.queue=t,t=t.dispatch=US.bind(null,he,t),[e.memoizedState,t]}function Bs(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=he.updateQueue,e===null?(e={lastEffect:null,stores:null},he.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function Fy(){return At().memoizedState}function Jo(t,e,n,r){var i=Ht();he.flags|=t,i.memoizedState=Bs(1|e,n,void 0,r===void 0?null:r)}function ll(t,e,n,r){var i=At();r=r===void 0?null:r;var s=void 0;if(Te!==null){var o=Te.memoizedState;if(s=o.destroy,r!==null&&pf(r,o.deps)){i.memoizedState=Bs(e,n,s,r);return}}he.flags|=t,i.memoizedState=Bs(1|e,n,s,r)}function yp(t,e){return Jo(8390656,8,t,e)}function vf(t,e){return ll(2048,8,t,e)}function Oy(t,e){return ll(4,2,t,e)}function jy(t,e){return ll(4,4,t,e)}function Vy(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function By(t,e,n){return n=n!=null?n.concat([t]):null,ll(4,4,Vy.bind(null,e,t),n)}function yf(){}function zy(t,e){var n=At();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pf(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Uy(t,e){var n=At();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pf(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Hy(t,e,n){return kr&21?(Vt(n,e)||(n=qv(),he.lanes|=n,Cr|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,rt=!0),t.memoizedState=n)}function BS(t,e){var n=Z;Z=n!==0&&4>n?n:4,t(!0);var r=Ql.transition;Ql.transition={};try{t(!1),e()}finally{Z=n,Ql.transition=r}}function Wy(){return At().memoizedState}function zS(t,e,n){var r=Un(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ky(t))Gy(e,n);else if(n=Py(t,e,n,r),n!==null){var i=Qe();jt(n,t,r,i),Yy(n,e,r)}}function US(t,e,n){var r=Un(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ky(t))Gy(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Vt(a,o)){var l=e.interleaved;l===null?(i.next=i,uf(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=Py(t,e,i,r),n!==null&&(i=Qe(),jt(n,t,r,i),Yy(n,e,r))}}function Ky(t){var e=t.alternate;return t===he||e!==null&&e===he}function Gy(t,e){gs=ba=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Yy(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Yd(t,n)}}var Ra={readContext:Rt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},HS={readContext:Rt,useCallback:function(t,e){return Ht().memoizedState=[t,e===void 0?null:e],t},useContext:Rt,useEffect:yp,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Jo(4194308,4,Vy.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Jo(4194308,4,t,e)},useInsertionEffect:function(t,e){return Jo(4,2,t,e)},useMemo:function(t,e){var n=Ht();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ht();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=zS.bind(null,he,t),[r.memoizedState,t]},useRef:function(t){var e=Ht();return t={current:t},e.memoizedState=t},useState:vp,useDebugValue:yf,useDeferredValue:function(t){return Ht().memoizedState=t},useTransition:function(){var t=vp(!1),e=t[0];return t=BS.bind(null,t[1]),Ht().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=he,i=Ht();if(le){if(n===void 0)throw Error(b(407));n=n()}else{if(n=e(),Ie===null)throw Error(b(349));kr&30||Iy(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,yp($y.bind(null,r,s,t),[t]),r.flags|=2048,Bs(9,Ly.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Ht(),e=Ie.identifierPrefix;if(le){var n=pn,r=hn;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=js++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=VS++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},WS={readContext:Rt,useCallback:zy,useContext:Rt,useEffect:vf,useImperativeHandle:By,useInsertionEffect:Oy,useLayoutEffect:jy,useMemo:Uy,useReducer:Zl,useRef:Fy,useState:function(){return Zl(Vs)},useDebugValue:yf,useDeferredValue:function(t){var e=At();return Hy(e,Te.memoizedState,t)},useTransition:function(){var t=Zl(Vs)[0],e=At().memoizedState;return[t,e]},useMutableSource:Ay,useSyncExternalStore:My,useId:Wy,unstable_isNewReconciler:!1},KS={readContext:Rt,useCallback:zy,useContext:Rt,useEffect:vf,useImperativeHandle:By,useInsertionEffect:Oy,useLayoutEffect:jy,useMemo:Uy,useReducer:Jl,useRef:Fy,useState:function(){return Jl(Vs)},useDebugValue:yf,useDeferredValue:function(t){var e=At();return Te===null?e.memoizedState=t:Hy(e,Te.memoizedState,t)},useTransition:function(){var t=Jl(Vs)[0],e=At().memoizedState;return[t,e]},useMutableSource:Ay,useSyncExternalStore:My,useId:Wy,unstable_isNewReconciler:!1};function Lt(t,e){if(t&&t.defaultProps){e=pe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function mc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:pe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var ul={isMounted:function(t){return(t=t._reactInternals)?Lr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Qe(),i=Un(t),s=gn(r,i);s.payload=e,n!=null&&(s.callback=n),e=Bn(t,s,i),e!==null&&(jt(e,t,i,r),Qo(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Qe(),i=Un(t),s=gn(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Bn(t,s,i),e!==null&&(jt(e,t,i,r),Qo(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Qe(),r=Un(t),i=gn(n,r);i.tag=2,e!=null&&(i.callback=e),e=Bn(t,i,r),e!==null&&(jt(e,t,r,n),Qo(e,t,r))}};function _p(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!Ls(n,r)||!Ls(i,s):!0}function qy(t,e,n){var r=!1,i=Yn,s=e.contextType;return typeof s=="object"&&s!==null?s=Rt(s):(i=lt(e)?Sr:Ke.current,r=e.contextTypes,s=(r=r!=null)?gi(t,i):Yn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=ul,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function wp(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&ul.enqueueReplaceState(e,e.state,null)}function vc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},cf(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Rt(s):(s=lt(e)?Sr:Ke.current,i.context=gi(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(mc(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&ul.enqueueReplaceState(i,i.state,null),Ta(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function _i(t,e){try{var n="",r=e;do n+=wx(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:t,source:e,stack:i,digest:null}}function eu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function yc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var GS=typeof WeakMap=="function"?WeakMap:Map;function Xy(t,e,n){n=gn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ma||(Ma=!0,bc=r),yc(t,e)},n}function Qy(t,e,n){n=gn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){yc(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){yc(t,e),typeof r!="function"&&(zn===null?zn=new Set([this]):zn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function xp(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new GS;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=aE.bind(null,t,e,n),e.then(t,t))}function Sp(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Ep(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=gn(-1,1),e.tag=2,Bn(n,e,1))),n.lanes|=1),t)}var YS=Sn.ReactCurrentOwner,rt=!1;function Ye(t,e,n,r){e.child=t===null?Ty(e,null,n,r):vi(e,t.child,n,r)}function kp(t,e,n,r,i){n=n.render;var s=e.ref;return ui(e,i),r=gf(t,e,n,r,s,i),n=mf(),t!==null&&!rt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,_n(t,e,i)):(le&&n&&nf(e),e.flags|=1,Ye(t,e,r,i),e.child)}function Cp(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Tf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,Zy(t,e,s,r,i)):(t=ra(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ls,n(o,r)&&t.ref===e.ref)return _n(t,e,i)}return e.flags|=1,t=Hn(s,r),t.ref=e.ref,t.return=e,e.child=t}function Zy(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Ls(s,r)&&t.ref===e.ref)if(rt=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(rt=!0);else return e.lanes=t.lanes,_n(t,e,i)}return _c(t,e,n,r,i)}function Jy(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Xr,ct),ct|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ne(Xr,ct),ct|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ne(Xr,ct),ct|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,ne(Xr,ct),ct|=r;return Ye(t,e,i,n),e.child}function e0(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function _c(t,e,n,r,i){var s=lt(n)?Sr:Ke.current;return s=gi(e,s),ui(e,i),n=gf(t,e,n,r,s,i),r=mf(),t!==null&&!rt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,_n(t,e,i)):(le&&r&&nf(e),e.flags|=1,Ye(t,e,n,i),e.child)}function Tp(t,e,n,r,i){if(lt(n)){var s=!0;xa(e)}else s=!1;if(ui(e,i),e.stateNode===null)ea(t,e),qy(e,n,r),vc(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Rt(u):(u=lt(n)?Sr:Ke.current,u=gi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&wp(e,o,r,u),Mn=!1;var f=e.memoizedState;o.state=f,Ta(e,r,o,i),l=e.memoizedState,a!==r||f!==l||at.current||Mn?(typeof c=="function"&&(mc(e,n,c,r),l=e.memoizedState),(a=Mn||_p(e,n,a,r,f,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,by(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:Lt(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Rt(l):(l=lt(n)?Sr:Ke.current,l=gi(e,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&wp(e,o,r,l),Mn=!1,f=e.memoizedState,o.state=f,Ta(e,r,o,i);var y=e.memoizedState;a!==d||f!==y||at.current||Mn?(typeof h=="function"&&(mc(e,n,h,r),y=e.memoizedState),(u=Mn||_p(e,n,u,r,f,y,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),o.props=r,o.state=y,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return wc(t,e,n,r,s,i)}function wc(t,e,n,r,i,s){e0(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&dp(e,n,!1),_n(t,e,s);r=e.stateNode,YS.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=vi(e,t.child,null,s),e.child=vi(e,null,a,s)):Ye(t,e,a,s),e.memoizedState=r.state,i&&dp(e,n,!0),e.child}function t0(t){var e=t.stateNode;e.pendingContext?cp(t,e.pendingContext,e.pendingContext!==e.context):e.context&&cp(t,e.context,!1),df(t,e.containerInfo)}function Pp(t,e,n,r,i){return mi(),sf(i),e.flags|=256,Ye(t,e,n,r),e.child}var xc={dehydrated:null,treeContext:null,retryLane:0};function Sc(t){return{baseLanes:t,cachePool:null,transitions:null}}function n0(t,e,n){var r=e.pendingProps,i=ce.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ne(ce,i&1),t===null)return pc(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=fl(o,r,0,null),t=_r(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Sc(n),e.memoizedState=xc,t):_f(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return qS(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Hn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Hn(a,s):(s=_r(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?Sc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=xc,r}return s=t.child,t=s.sibling,r=Hn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function _f(t,e){return e=fl({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Co(t,e,n,r){return r!==null&&sf(r),vi(e,t.child,null,n),t=_f(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function qS(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=eu(Error(b(422))),Co(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=fl({mode:"visible",children:r.children},i,0,null),s=_r(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&vi(e,t.child,null,o),e.child.memoizedState=Sc(o),e.memoizedState=xc,s);if(!(e.mode&1))return Co(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(b(419)),r=eu(s,r,void 0),Co(t,e,o,r)}if(a=(o&t.childLanes)!==0,rt||a){if(r=Ie,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,yn(t,i),jt(r,t,i,-1))}return Cf(),r=eu(Error(b(421))),Co(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=lE.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,ft=Vn(i.nextSibling),gt=e,le=!0,Ft=null,t!==null&&(xt[St++]=hn,xt[St++]=pn,xt[St++]=Er,hn=t.id,pn=t.overflow,Er=e),e=_f(e,r.children),e.flags|=4096,e)}function bp(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),gc(t.return,e,n)}function tu(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function r0(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Ye(t,e,r.children,n),r=ce.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&bp(t,n,e);else if(t.tag===19)bp(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ne(ce,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Pa(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),tu(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Pa(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}tu(e,!0,n,null,s);break;case"together":tu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ea(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function _n(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Cr|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(b(153));if(e.child!==null){for(t=e.child,n=Hn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Hn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function XS(t,e,n){switch(e.tag){case 3:t0(e),mi();break;case 5:Ry(e);break;case 1:lt(e.type)&&xa(e);break;case 4:df(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;ne(ka,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ne(ce,ce.current&1),e.flags|=128,null):n&e.child.childLanes?n0(t,e,n):(ne(ce,ce.current&1),t=_n(t,e,n),t!==null?t.sibling:null);ne(ce,ce.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return r0(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ne(ce,ce.current),r)break;return null;case 22:case 23:return e.lanes=0,Jy(t,e,n)}return _n(t,e,n)}var i0,Ec,s0,o0;i0=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ec=function(){};s0=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,gr(qt.current);var s=null;switch(n){case"input":i=Wu(t,i),r=Wu(t,r),s=[];break;case"select":i=pe({},i,{value:void 0}),r=pe({},r,{value:void 0}),s=[];break;case"textarea":i=Yu(t,i),r=Yu(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=_a)}Xu(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ts.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ts.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&re("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};o0=function(t,e,n,r){n!==r&&(e.flags|=4)};function Vi(t,e){if(!le)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ve(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function QS(t,e,n){var r=e.pendingProps;switch(rf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(e),null;case 1:return lt(e.type)&&wa(),Ve(e),null;case 3:return r=e.stateNode,yi(),oe(at),oe(Ke),hf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Eo(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ft!==null&&(Mc(Ft),Ft=null))),Ec(t,e),Ve(e),null;case 5:ff(e);var i=gr(Os.current);if(n=e.type,t!==null&&e.stateNode!=null)s0(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(b(166));return Ve(e),null}if(t=gr(qt.current),Eo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Wt]=e,r[Ds]=s,t=(e.mode&1)!==0,n){case"dialog":re("cancel",r),re("close",r);break;case"iframe":case"object":case"embed":re("load",r);break;case"video":case"audio":for(i=0;i<Ji.length;i++)re(Ji[i],r);break;case"source":re("error",r);break;case"img":case"image":case"link":re("error",r),re("load",r);break;case"details":re("toggle",r);break;case"input":Fh(r,s),re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},re("invalid",r);break;case"textarea":jh(r,s),re("invalid",r)}Xu(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&So(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&So(r.textContent,a,t),i=["children",""+a]):Ts.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&re("scroll",r)}switch(n){case"input":po(r),Oh(r,s,!0);break;case"textarea":po(r),Vh(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=_a)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=$v(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Wt]=e,t[Ds]=r,i0(t,e,!1,!1),e.stateNode=t;e:{switch(o=Qu(n,r),n){case"dialog":re("cancel",t),re("close",t),i=r;break;case"iframe":case"object":case"embed":re("load",t),i=r;break;case"video":case"audio":for(i=0;i<Ji.length;i++)re(Ji[i],t);i=r;break;case"source":re("error",t),i=r;break;case"img":case"image":case"link":re("error",t),re("load",t),i=r;break;case"details":re("toggle",t),i=r;break;case"input":Fh(t,r),i=Wu(t,r),re("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=pe({},r,{value:void 0}),re("invalid",t);break;case"textarea":jh(t,r),i=Yu(t,r),re("invalid",t);break;default:i=r}Xu(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Fv(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Nv(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ps(t,l):typeof l=="number"&&Ps(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ts.hasOwnProperty(s)?l!=null&&s==="onScroll"&&re("scroll",t):l!=null&&zd(t,s,l,o))}switch(n){case"input":po(t),Oh(t,r,!1);break;case"textarea":po(t),Vh(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Gn(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?si(t,!!r.multiple,s,!1):r.defaultValue!=null&&si(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=_a)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Ve(e),null;case 6:if(t&&e.stateNode!=null)o0(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(b(166));if(n=gr(Os.current),gr(qt.current),Eo(e)){if(r=e.stateNode,n=e.memoizedProps,r[Wt]=e,(s=r.nodeValue!==n)&&(t=gt,t!==null))switch(t.tag){case 3:So(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&So(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wt]=e,e.stateNode=r}return Ve(e),null;case 13:if(oe(ce),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(le&&ft!==null&&e.mode&1&&!(e.flags&128))ky(),mi(),e.flags|=98560,s=!1;else if(s=Eo(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(b(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(b(317));s[Wt]=e}else mi(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ve(e),s=!1}else Ft!==null&&(Mc(Ft),Ft=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||ce.current&1?be===0&&(be=3):Cf())),e.updateQueue!==null&&(e.flags|=4),Ve(e),null);case 4:return yi(),Ec(t,e),t===null&&$s(e.stateNode.containerInfo),Ve(e),null;case 10:return lf(e.type._context),Ve(e),null;case 17:return lt(e.type)&&wa(),Ve(e),null;case 19:if(oe(ce),s=e.memoizedState,s===null)return Ve(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Vi(s,!1);else{if(be!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Pa(t),o!==null){for(e.flags|=128,Vi(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ne(ce,ce.current&1|2),e.child}t=t.sibling}s.tail!==null&&Se()>wi&&(e.flags|=128,r=!0,Vi(s,!1),e.lanes=4194304)}else{if(!r)if(t=Pa(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Vi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!le)return Ve(e),null}else 2*Se()-s.renderingStartTime>wi&&n!==1073741824&&(e.flags|=128,r=!0,Vi(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Se(),e.sibling=null,n=ce.current,ne(ce,r?n&1|2:n&1),e):(Ve(e),null);case 22:case 23:return kf(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ct&1073741824&&(Ve(e),e.subtreeFlags&6&&(e.flags|=8192)):Ve(e),null;case 24:return null;case 25:return null}throw Error(b(156,e.tag))}function ZS(t,e){switch(rf(e),e.tag){case 1:return lt(e.type)&&wa(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return yi(),oe(at),oe(Ke),hf(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return ff(e),null;case 13:if(oe(ce),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(b(340));mi()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return oe(ce),null;case 4:return yi(),null;case 10:return lf(e.type._context),null;case 22:case 23:return kf(),null;case 24:return null;default:return null}}var To=!1,ze=!1,JS=typeof WeakSet=="function"?WeakSet:Set,D=null;function qr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(t,e,r)}else n.current=null}function kc(t,e,n){try{n()}catch(r){ve(t,e,r)}}var Rp=!1;function eE(t,e){if(ac=ma,t=dy(),tf(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=o+i),d!==s||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===i&&(a=o),f===s&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(lc={focusedElem:t,selectionRange:n},ma=!1,D=e;D!==null;)if(e=D,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,D=t;else for(;D!==null;){e=D;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var m=y.memoizedProps,_=y.memoizedState,p=e.stateNode,g=p.getSnapshotBeforeUpdate(e.elementType===e.type?m:Lt(e.type,m),_);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=e.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(b(163))}}catch(x){ve(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,D=t;break}D=e.return}return y=Rp,Rp=!1,y}function ms(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&kc(e,n,s)}i=i.next}while(i!==r)}}function cl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Cc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function a0(t){var e=t.alternate;e!==null&&(t.alternate=null,a0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Wt],delete e[Ds],delete e[dc],delete e[DS],delete e[FS])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function l0(t){return t.tag===5||t.tag===3||t.tag===4}function Ap(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||l0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Tc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=_a));else if(r!==4&&(t=t.child,t!==null))for(Tc(t,e,n),t=t.sibling;t!==null;)Tc(t,e,n),t=t.sibling}function Pc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Pc(t,e,n),t=t.sibling;t!==null;)Pc(t,e,n),t=t.sibling}var Le=null,Dt=!1;function Cn(t,e,n){for(n=n.child;n!==null;)u0(t,e,n),n=n.sibling}function u0(t,e,n){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(nl,n)}catch{}switch(n.tag){case 5:ze||qr(n,e);case 6:var r=Le,i=Dt;Le=null,Cn(t,e,n),Le=r,Dt=i,Le!==null&&(Dt?(t=Le,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(Dt?(t=Le,n=n.stateNode,t.nodeType===8?Yl(t.parentNode,n):t.nodeType===1&&Yl(t,n),Ms(t)):Yl(Le,n.stateNode));break;case 4:r=Le,i=Dt,Le=n.stateNode.containerInfo,Dt=!0,Cn(t,e,n),Le=r,Dt=i;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&kc(n,e,o),i=i.next}while(i!==r)}Cn(t,e,n);break;case 1:if(!ze&&(qr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,e,a)}Cn(t,e,n);break;case 21:Cn(t,e,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,Cn(t,e,n),ze=r):Cn(t,e,n);break;default:Cn(t,e,n)}}function Mp(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new JS),e.forEach(function(r){var i=uE.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Mt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Le=a.stateNode,Dt=!1;break e;case 3:Le=a.stateNode.containerInfo,Dt=!0;break e;case 4:Le=a.stateNode.containerInfo,Dt=!0;break e}a=a.return}if(Le===null)throw Error(b(160));u0(s,o,i),Le=null,Dt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){ve(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)c0(e,t),e=e.sibling}function c0(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Mt(e,t),zt(t),r&4){try{ms(3,t,t.return),cl(3,t)}catch(m){ve(t,t.return,m)}try{ms(5,t,t.return)}catch(m){ve(t,t.return,m)}}break;case 1:Mt(e,t),zt(t),r&512&&n!==null&&qr(n,n.return);break;case 5:if(Mt(e,t),zt(t),r&512&&n!==null&&qr(n,n.return),t.flags&32){var i=t.stateNode;try{Ps(i,"")}catch(m){ve(t,t.return,m)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Iv(i,s),Qu(a,o);var u=Qu(a,s);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?Fv(i,d):c==="dangerouslySetInnerHTML"?Nv(i,d):c==="children"?Ps(i,d):zd(i,c,d,u)}switch(a){case"input":Ku(i,s);break;case"textarea":Lv(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?si(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?si(i,!!s.multiple,s.defaultValue,!0):si(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ds]=s}catch(m){ve(t,t.return,m)}}break;case 6:if(Mt(e,t),zt(t),r&4){if(t.stateNode===null)throw Error(b(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(m){ve(t,t.return,m)}}break;case 3:if(Mt(e,t),zt(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ms(e.containerInfo)}catch(m){ve(t,t.return,m)}break;case 4:Mt(e,t),zt(t);break;case 13:Mt(e,t),zt(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Sf=Se())),r&4&&Mp(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(ze=(u=ze)||c,Mt(e,t),ze=u):Mt(e,t),zt(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(D=t,c=t.child;c!==null;){for(d=D=c;D!==null;){switch(f=D,h=f.child,f.tag){case 0:case 11:case 14:case 15:ms(4,f,f.return);break;case 1:qr(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(m){ve(r,n,m)}}break;case 5:qr(f,f.return);break;case 22:if(f.memoizedState!==null){Lp(d);continue}}h!==null?(h.return=f,D=h):Lp(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Dv("display",o))}catch(m){ve(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){ve(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Mt(e,t),zt(t),r&4&&Mp(t);break;case 21:break;default:Mt(e,t),zt(t)}}function zt(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(l0(n)){var r=n;break e}n=n.return}throw Error(b(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ps(i,""),r.flags&=-33);var s=Ap(t);Pc(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Ap(t);Tc(t,a,o);break;default:throw Error(b(161))}}catch(l){ve(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function tE(t,e,n){D=t,d0(t)}function d0(t,e,n){for(var r=(t.mode&1)!==0;D!==null;){var i=D,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||To;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||ze;a=To;var u=ze;if(To=o,(ze=l)&&!u)for(D=i;D!==null;)o=D,l=o.child,o.tag===22&&o.memoizedState!==null?$p(i):l!==null?(l.return=o,D=l):$p(i);for(;s!==null;)D=s,d0(s),s=s.sibling;D=i,To=a,ze=u}Ip(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,D=s):Ip(t)}}function Ip(t){for(;D!==null;){var e=D;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ze||cl(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!ze)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:Lt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&mp(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}mp(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ms(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(b(163))}ze||e.flags&512&&Cc(e)}catch(f){ve(e,e.return,f)}}if(e===t){D=null;break}if(n=e.sibling,n!==null){n.return=e.return,D=n;break}D=e.return}}function Lp(t){for(;D!==null;){var e=D;if(e===t){D=null;break}var n=e.sibling;if(n!==null){n.return=e.return,D=n;break}D=e.return}}function $p(t){for(;D!==null;){var e=D;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{cl(4,e)}catch(l){ve(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){ve(e,i,l)}}var s=e.return;try{Cc(e)}catch(l){ve(e,s,l)}break;case 5:var o=e.return;try{Cc(e)}catch(l){ve(e,o,l)}}}catch(l){ve(e,e.return,l)}if(e===t){D=null;break}var a=e.sibling;if(a!==null){a.return=e.return,D=a;break}D=e.return}}var nE=Math.ceil,Aa=Sn.ReactCurrentDispatcher,wf=Sn.ReactCurrentOwner,kt=Sn.ReactCurrentBatchConfig,Y=0,Ie=null,Ce=null,De=0,ct=0,Xr=Jn(0),be=0,zs=null,Cr=0,dl=0,xf=0,vs=null,tt=null,Sf=0,wi=1/0,on=null,Ma=!1,bc=null,zn=null,Po=!1,Nn=null,Ia=0,ys=0,Rc=null,ta=-1,na=0;function Qe(){return Y&6?Se():ta!==-1?ta:ta=Se()}function Un(t){return t.mode&1?Y&2&&De!==0?De&-De:jS.transition!==null?(na===0&&(na=qv()),na):(t=Z,t!==0||(t=window.event,t=t===void 0?16:ny(t.type)),t):1}function jt(t,e,n,r){if(50<ys)throw ys=0,Rc=null,Error(b(185));no(t,n,r),(!(Y&2)||t!==Ie)&&(t===Ie&&(!(Y&2)&&(dl|=n),be===4&&Ln(t,De)),ut(t,r),n===1&&Y===0&&!(e.mode&1)&&(wi=Se()+500,al&&er()))}function ut(t,e){var n=t.callbackNode;jx(t,e);var r=ga(t,t===Ie?De:0);if(r===0)n!==null&&Uh(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Uh(n),e===1)t.tag===0?OS(Np.bind(null,t)):xy(Np.bind(null,t)),$S(function(){!(Y&6)&&er()}),n=null;else{switch(Xv(r)){case 1:n=Gd;break;case 4:n=Gv;break;case 16:n=pa;break;case 536870912:n=Yv;break;default:n=pa}n=_0(n,f0.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function f0(t,e){if(ta=-1,na=0,Y&6)throw Error(b(327));var n=t.callbackNode;if(ci()&&t.callbackNode!==n)return null;var r=ga(t,t===Ie?De:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=La(t,r);else{e=r;var i=Y;Y|=2;var s=p0();(Ie!==t||De!==e)&&(on=null,wi=Se()+500,yr(t,e));do try{sE();break}catch(a){h0(t,a)}while(!0);af(),Aa.current=s,Y=i,Ce!==null?e=0:(Ie=null,De=0,e=be)}if(e!==0){if(e===2&&(i=nc(t),i!==0&&(r=i,e=Ac(t,i))),e===1)throw n=zs,yr(t,0),Ln(t,r),ut(t,Se()),n;if(e===6)Ln(t,r);else{if(i=t.current.alternate,!(r&30)&&!rE(i)&&(e=La(t,r),e===2&&(s=nc(t),s!==0&&(r=s,e=Ac(t,s))),e===1))throw n=zs,yr(t,0),Ln(t,r),ut(t,Se()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(b(345));case 2:ur(t,tt,on);break;case 3:if(Ln(t,r),(r&130023424)===r&&(e=Sf+500-Se(),10<e)){if(ga(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Qe(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=cc(ur.bind(null,t,tt,on),e);break}ur(t,tt,on);break;case 4:if(Ln(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Ot(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nE(r/1960))-r,10<r){t.timeoutHandle=cc(ur.bind(null,t,tt,on),r);break}ur(t,tt,on);break;case 5:ur(t,tt,on);break;default:throw Error(b(329))}}}return ut(t,Se()),t.callbackNode===n?f0.bind(null,t):null}function Ac(t,e){var n=vs;return t.current.memoizedState.isDehydrated&&(yr(t,e).flags|=256),t=La(t,e),t!==2&&(e=tt,tt=n,e!==null&&Mc(e)),t}function Mc(t){tt===null?tt=t:tt.push.apply(tt,t)}function rE(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Vt(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ln(t,e){for(e&=~xf,e&=~dl,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Ot(e),r=1<<n;t[n]=-1,e&=~r}}function Np(t){if(Y&6)throw Error(b(327));ci();var e=ga(t,0);if(!(e&1))return ut(t,Se()),null;var n=La(t,e);if(t.tag!==0&&n===2){var r=nc(t);r!==0&&(e=r,n=Ac(t,r))}if(n===1)throw n=zs,yr(t,0),Ln(t,e),ut(t,Se()),n;if(n===6)throw Error(b(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ur(t,tt,on),ut(t,Se()),null}function Ef(t,e){var n=Y;Y|=1;try{return t(e)}finally{Y=n,Y===0&&(wi=Se()+500,al&&er())}}function Tr(t){Nn!==null&&Nn.tag===0&&!(Y&6)&&ci();var e=Y;Y|=1;var n=kt.transition,r=Z;try{if(kt.transition=null,Z=1,t)return t()}finally{Z=r,kt.transition=n,Y=e,!(Y&6)&&er()}}function kf(){ct=Xr.current,oe(Xr)}function yr(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,LS(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(rf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wa();break;case 3:yi(),oe(at),oe(Ke),hf();break;case 5:ff(r);break;case 4:yi();break;case 13:oe(ce);break;case 19:oe(ce);break;case 10:lf(r.type._context);break;case 22:case 23:kf()}n=n.return}if(Ie=t,Ce=t=Hn(t.current,null),De=ct=e,be=0,zs=null,xf=dl=Cr=0,tt=vs=null,pr!==null){for(e=0;e<pr.length;e++)if(n=pr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}pr=null}return t}function h0(t,e){do{var n=Ce;try{if(af(),Zo.current=Ra,ba){for(var r=he.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}ba=!1}if(kr=0,Me=Te=he=null,gs=!1,js=0,wf.current=null,n===null||n.return===null){be=1,zs=e,Ce=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=De,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Sp(o);if(h!==null){h.flags&=-257,Ep(h,o,a,s,e),h.mode&1&&xp(s,u,e),e=h,l=u;var y=e.updateQueue;if(y===null){var m=new Set;m.add(l),e.updateQueue=m}else y.add(l);break e}else{if(!(e&1)){xp(s,u,e),Cf();break e}l=Error(b(426))}}else if(le&&a.mode&1){var _=Sp(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ep(_,o,a,s,e),sf(_i(l,a));break e}}s=l=_i(l,a),be!==4&&(be=2),vs===null?vs=[s]:vs.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var p=Xy(s,l,e);gp(s,p);break e;case 1:a=l;var g=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(zn===null||!zn.has(v)))){s.flags|=65536,e&=-e,s.lanes|=e;var x=Qy(s,a,e);gp(s,x);break e}}s=s.return}while(s!==null)}m0(n)}catch(w){e=w,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function p0(){var t=Aa.current;return Aa.current=Ra,t===null?Ra:t}function Cf(){(be===0||be===3||be===2)&&(be=4),Ie===null||!(Cr&268435455)&&!(dl&268435455)||Ln(Ie,De)}function La(t,e){var n=Y;Y|=2;var r=p0();(Ie!==t||De!==e)&&(on=null,yr(t,e));do try{iE();break}catch(i){h0(t,i)}while(!0);if(af(),Y=n,Aa.current=r,Ce!==null)throw Error(b(261));return Ie=null,De=0,be}function iE(){for(;Ce!==null;)g0(Ce)}function sE(){for(;Ce!==null&&!Ax();)g0(Ce)}function g0(t){var e=y0(t.alternate,t,ct);t.memoizedProps=t.pendingProps,e===null?m0(t):Ce=e,wf.current=null}function m0(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=ZS(n,e),n!==null){n.flags&=32767,Ce=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{be=6,Ce=null;return}}else if(n=QS(n,e,ct),n!==null){Ce=n;return}if(e=e.sibling,e!==null){Ce=e;return}Ce=e=t}while(e!==null);be===0&&(be=5)}function ur(t,e,n){var r=Z,i=kt.transition;try{kt.transition=null,Z=1,oE(t,e,n,r)}finally{kt.transition=i,Z=r}return null}function oE(t,e,n,r){do ci();while(Nn!==null);if(Y&6)throw Error(b(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(b(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(Vx(t,s),t===Ie&&(Ce=Ie=null,De=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Po||(Po=!0,_0(pa,function(){return ci(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=kt.transition,kt.transition=null;var o=Z;Z=1;var a=Y;Y|=4,wf.current=null,eE(t,n),c0(n,t),TS(lc),ma=!!ac,lc=ac=null,t.current=n,tE(n),Mx(),Y=a,Z=o,kt.transition=s}else t.current=n;if(Po&&(Po=!1,Nn=t,Ia=i),s=t.pendingLanes,s===0&&(zn=null),$x(n.stateNode),ut(t,Se()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ma)throw Ma=!1,t=bc,bc=null,t;return Ia&1&&t.tag!==0&&ci(),s=t.pendingLanes,s&1?t===Rc?ys++:(ys=0,Rc=t):ys=0,er(),null}function ci(){if(Nn!==null){var t=Xv(Ia),e=kt.transition,n=Z;try{if(kt.transition=null,Z=16>t?16:t,Nn===null)var r=!1;else{if(t=Nn,Nn=null,Ia=0,Y&6)throw Error(b(331));var i=Y;for(Y|=4,D=t.current;D!==null;){var s=D,o=s.child;if(D.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(D=u;D!==null;){var c=D;switch(c.tag){case 0:case 11:case 15:ms(8,c,s)}var d=c.child;if(d!==null)d.return=c,D=d;else for(;D!==null;){c=D;var f=c.sibling,h=c.return;if(a0(c),c===u){D=null;break}if(f!==null){f.return=h,D=f;break}D=h}}}var y=s.alternate;if(y!==null){var m=y.child;if(m!==null){y.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}D=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,D=o;else e:for(;D!==null;){if(s=D,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ms(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,D=p;break e}D=s.return}}var g=t.current;for(D=g;D!==null;){o=D;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,D=v;else e:for(o=g;D!==null;){if(a=D,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:cl(9,a)}}catch(w){ve(a,a.return,w)}if(a===o){D=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,D=x;break e}D=a.return}}if(Y=i,er(),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(nl,t)}catch{}r=!0}return r}finally{Z=n,kt.transition=e}}return!1}function Dp(t,e,n){e=_i(n,e),e=Xy(t,e,1),t=Bn(t,e,1),e=Qe(),t!==null&&(no(t,1,e),ut(t,e))}function ve(t,e,n){if(t.tag===3)Dp(t,t,n);else for(;e!==null;){if(e.tag===3){Dp(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(zn===null||!zn.has(r))){t=_i(n,t),t=Qy(e,t,1),e=Bn(e,t,1),t=Qe(),e!==null&&(no(e,1,t),ut(e,t));break}}e=e.return}}function aE(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Qe(),t.pingedLanes|=t.suspendedLanes&n,Ie===t&&(De&n)===n&&(be===4||be===3&&(De&130023424)===De&&500>Se()-Sf?yr(t,0):xf|=n),ut(t,e)}function v0(t,e){e===0&&(t.mode&1?(e=vo,vo<<=1,!(vo&130023424)&&(vo=4194304)):e=1);var n=Qe();t=yn(t,e),t!==null&&(no(t,e,n),ut(t,n))}function lE(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),v0(t,n)}function uE(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(b(314))}r!==null&&r.delete(e),v0(t,n)}var y0;y0=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||at.current)rt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return rt=!1,XS(t,e,n);rt=!!(t.flags&131072)}else rt=!1,le&&e.flags&1048576&&Sy(e,Ea,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ea(t,e),t=e.pendingProps;var i=gi(e,Ke.current);ui(e,n),i=gf(null,e,r,t,i,n);var s=mf();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,lt(r)?(s=!0,xa(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cf(e),i.updater=ul,e.stateNode=i,i._reactInternals=e,vc(e,r,t,n),e=wc(null,e,r,!0,s,n)):(e.tag=0,le&&s&&nf(e),Ye(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ea(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=dE(r),t=Lt(r,t),i){case 0:e=_c(null,e,r,t,n);break e;case 1:e=Tp(null,e,r,t,n);break e;case 11:e=kp(null,e,r,t,n);break e;case 14:e=Cp(null,e,r,Lt(r.type,t),n);break e}throw Error(b(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),_c(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),Tp(t,e,r,i,n);case 3:e:{if(t0(e),t===null)throw Error(b(387));r=e.pendingProps,s=e.memoizedState,i=s.element,by(t,e),Ta(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=_i(Error(b(423)),e),e=Pp(t,e,r,n,i);break e}else if(r!==i){i=_i(Error(b(424)),e),e=Pp(t,e,r,n,i);break e}else for(ft=Vn(e.stateNode.containerInfo.firstChild),gt=e,le=!0,Ft=null,n=Ty(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mi(),r===i){e=_n(t,e,n);break e}Ye(t,e,r,n)}e=e.child}return e;case 5:return Ry(e),t===null&&pc(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,uc(r,i)?o=null:s!==null&&uc(r,s)&&(e.flags|=32),e0(t,e),Ye(t,e,o,n),e.child;case 6:return t===null&&pc(e),null;case 13:return n0(t,e,n);case 4:return df(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=vi(e,null,r,n):Ye(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),kp(t,e,r,i,n);case 7:return Ye(t,e,e.pendingProps,n),e.child;case 8:return Ye(t,e,e.pendingProps.children,n),e.child;case 12:return Ye(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ne(ka,r._currentValue),r._currentValue=o,s!==null)if(Vt(s.value,o)){if(s.children===i.children&&!at.current){e=_n(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=gn(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),gc(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(b(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),gc(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ye(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,ui(e,n),i=Rt(i),r=r(i),e.flags|=1,Ye(t,e,r,n),e.child;case 14:return r=e.type,i=Lt(r,e.pendingProps),i=Lt(r.type,i),Cp(t,e,r,i,n);case 15:return Zy(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Lt(r,i),ea(t,e),e.tag=1,lt(r)?(t=!0,xa(e)):t=!1,ui(e,n),qy(e,r,i),vc(e,r,i,n),wc(null,e,r,!0,t,n);case 19:return r0(t,e,n);case 22:return Jy(t,e,n)}throw Error(b(156,e.tag))};function _0(t,e){return Kv(t,e)}function cE(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(t,e,n,r){return new cE(t,e,n,r)}function Tf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function dE(t){if(typeof t=="function")return Tf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Hd)return 11;if(t===Wd)return 14}return 2}function Hn(t,e){var n=t.alternate;return n===null?(n=Et(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ra(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")Tf(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Vr:return _r(n.children,i,s,e);case Ud:o=8,i|=8;break;case Bu:return t=Et(12,n,e,i|2),t.elementType=Bu,t.lanes=s,t;case zu:return t=Et(13,n,e,i),t.elementType=zu,t.lanes=s,t;case Uu:return t=Et(19,n,e,i),t.elementType=Uu,t.lanes=s,t;case Rv:return fl(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Pv:o=10;break e;case bv:o=9;break e;case Hd:o=11;break e;case Wd:o=14;break e;case An:o=16,r=null;break e}throw Error(b(130,t==null?t:typeof t,""))}return e=Et(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function _r(t,e,n,r){return t=Et(7,t,r,e),t.lanes=n,t}function fl(t,e,n,r){return t=Et(22,t,r,e),t.elementType=Rv,t.lanes=n,t.stateNode={isHidden:!1},t}function nu(t,e,n){return t=Et(6,t,null,e),t.lanes=n,t}function ru(t,e,n){return e=Et(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fE(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pf(t,e,n,r,i,s,o,a,l){return t=new fE(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Et(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cf(s),t}function hE(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:jr,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function w0(t){if(!t)return Yn;t=t._reactInternals;e:{if(Lr(t)!==t||t.tag!==1)throw Error(b(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(lt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(b(171))}if(t.tag===1){var n=t.type;if(lt(n))return wy(t,n,e)}return e}function x0(t,e,n,r,i,s,o,a,l){return t=Pf(n,r,!0,t,i,s,o,a,l),t.context=w0(null),n=t.current,r=Qe(),i=Un(n),s=gn(r,i),s.callback=e??null,Bn(n,s,i),t.current.lanes=i,no(t,i,r),ut(t,r),t}function hl(t,e,n,r){var i=e.current,s=Qe(),o=Un(i);return n=w0(n),e.context===null?e.context=n:e.pendingContext=n,e=gn(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Bn(i,e,o),t!==null&&(jt(t,i,o,s),Qo(t,i,o)),o}function $a(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Fp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function bf(t,e){Fp(t,e),(t=t.alternate)&&Fp(t,e)}function pE(){return null}var S0=typeof reportError=="function"?reportError:function(t){console.error(t)};function Rf(t){this._internalRoot=t}pl.prototype.render=Rf.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(b(409));hl(t,e,null,null)};pl.prototype.unmount=Rf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Tr(function(){hl(null,t,null,null)}),e[vn]=null}};function pl(t){this._internalRoot=t}pl.prototype.unstable_scheduleHydration=function(t){if(t){var e=Jv();t={blockedOn:null,target:t,priority:e};for(var n=0;n<In.length&&e!==0&&e<In[n].priority;n++);In.splice(n,0,t),n===0&&ty(t)}};function Af(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function gl(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Op(){}function gE(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=$a(o);s.call(u)}}var o=x0(e,r,t,0,null,!1,!1,"",Op);return t._reactRootContainer=o,t[vn]=o.current,$s(t.nodeType===8?t.parentNode:t),Tr(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=$a(l);a.call(u)}}var l=Pf(t,0,!1,null,null,!1,!1,"",Op);return t._reactRootContainer=l,t[vn]=l.current,$s(t.nodeType===8?t.parentNode:t),Tr(function(){hl(e,l,n,r)}),l}function ml(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=$a(o);a.call(l)}}hl(e,o,t,i)}else o=gE(n,e,t,i,r);return $a(o)}Qv=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Zi(e.pendingLanes);n!==0&&(Yd(e,n|1),ut(e,Se()),!(Y&6)&&(wi=Se()+500,er()))}break;case 13:Tr(function(){var r=yn(t,1);if(r!==null){var i=Qe();jt(r,t,1,i)}}),bf(t,1)}};qd=function(t){if(t.tag===13){var e=yn(t,134217728);if(e!==null){var n=Qe();jt(e,t,134217728,n)}bf(t,134217728)}};Zv=function(t){if(t.tag===13){var e=Un(t),n=yn(t,e);if(n!==null){var r=Qe();jt(n,t,e,r)}bf(t,e)}};Jv=function(){return Z};ey=function(t,e){var n=Z;try{return Z=t,e()}finally{Z=n}};Ju=function(t,e,n){switch(e){case"input":if(Ku(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=ol(r);if(!i)throw Error(b(90));Mv(r),Ku(r,i)}}}break;case"textarea":Lv(t,n);break;case"select":e=n.value,e!=null&&si(t,!!n.multiple,e,!1)}};Vv=Ef;Bv=Tr;var mE={usingClientEntryPoint:!1,Events:[io,Hr,ol,Ov,jv,Ef]},Bi={findFiberByHostInstance:hr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vE={bundleType:Bi.bundleType,version:Bi.version,rendererPackageName:Bi.rendererPackageName,rendererConfig:Bi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Hv(t),t===null?null:t.stateNode},findFiberByHostInstance:Bi.findFiberByHostInstance||pE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bo.isDisabled&&bo.supportsFiber)try{nl=bo.inject(vE),Yt=bo}catch{}}vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mE;vt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Af(e))throw Error(b(200));return hE(t,e,null,n)};vt.createRoot=function(t,e){if(!Af(t))throw Error(b(299));var n=!1,r="",i=S0;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Pf(t,1,!1,null,null,n,!1,r,i),t[vn]=e.current,$s(t.nodeType===8?t.parentNode:t),new Rf(e)};vt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(b(188)):(t=Object.keys(t).join(","),Error(b(268,t)));return t=Hv(e),t=t===null?null:t.stateNode,t};vt.flushSync=function(t){return Tr(t)};vt.hydrate=function(t,e,n){if(!gl(e))throw Error(b(200));return ml(null,t,e,!0,n)};vt.hydrateRoot=function(t,e,n){if(!Af(t))throw Error(b(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=S0;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=x0(e,null,t,1,n??null,i,!1,s,o),t[vn]=e.current,$s(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new pl(e)};vt.render=function(t,e,n){if(!gl(e))throw Error(b(200));return ml(null,t,e,!1,n)};vt.unmountComponentAtNode=function(t){if(!gl(t))throw Error(b(40));return t._reactRootContainer?(Tr(function(){ml(null,null,t,!1,function(){t._reactRootContainer=null,t[vn]=null})}),!0):!1};vt.unstable_batchedUpdates=Ef;vt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!gl(n))throw Error(b(200));if(t==null||t._reactInternals===void 0)throw Error(b(38));return ml(t,e,n,!1,r)};vt.version="18.3.1-next-f1338f8080-20240426";function E0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E0)}catch(t){console.error(t)}}E0(),Ev.exports=vt;var vl=Ev.exports;const yE=Nd(vl);var jp=vl;ju.createRoot=jp.createRoot,ju.hydrateRoot=jp.hydrateRoot;const k0=S.createContext({});function _E(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Mf=typeof window<"u",wE=Mf?S.useLayoutEffect:S.useEffect,If=S.createContext(null);function Lf(t,e){t.indexOf(e)===-1&&t.push(e)}function $f(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const wn=(t,e,n)=>n>e?e:n<t?t:n;let Nf=()=>{};const xn={},C0=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function T0(t){return typeof t=="object"&&t!==null}const P0=t=>/^0[^.\s]+$/u.test(t);function Df(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ct=t=>t,xE=(t,e)=>n=>e(t(n)),oo=(...t)=>t.reduce(xE),Us=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Ff{constructor(){this.subscriptions=[]}add(e){return Lf(this.subscriptions,e),()=>$f(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xt=t=>t*1e3,Qt=t=>t/1e3;function b0(t,e){return e?t*(1e3/e):0}const R0=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,SE=1e-7,EE=12;function kE(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=R0(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>SE&&++a<EE);return o}function ao(t,e,n,r){if(t===e&&n===r)return Ct;const i=s=>kE(s,0,1,t,n);return s=>s===0||s===1?s:R0(i(s),e,r)}const A0=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,M0=t=>e=>1-t(1-e),I0=ao(.33,1.53,.69,.99),Of=M0(I0),L0=A0(Of),$0=t=>(t*=2)<1?.5*Of(t):.5*(2-Math.pow(2,-10*(t-1))),jf=t=>1-Math.sin(Math.acos(t)),N0=M0(jf),D0=A0(jf),CE=ao(.42,0,1,1),TE=ao(0,0,.58,1),F0=ao(.42,0,.58,1),PE=t=>Array.isArray(t)&&typeof t[0]!="number",O0=t=>Array.isArray(t)&&typeof t[0]=="number",bE={linear:Ct,easeIn:CE,easeInOut:F0,easeOut:TE,circIn:jf,circInOut:D0,circOut:N0,backIn:Of,backInOut:L0,backOut:I0,anticipate:$0},RE=t=>typeof t=="string",Vp=t=>{if(O0(t)){Nf(t.length===4);const[e,n,r,i]=t;return ao(e,n,r,i)}else if(RE(t))return bE[t];return t},Ro=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function AE(t,e){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const y=f&&i?n:r;return d&&o.add(c),y.has(c)||y.add(c),c},cancel:c=>{r.delete(c),o.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const ME=40;function j0(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ro.reduce((v,x)=>(v[x]=AE(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:y}=o,m=()=>{const v=xn.useManualTiming?i.timestamp:performance.now();n=!1,xn.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,ME),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),y.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(m))},_=()=>{n=!0,r=!0,i.isProcessing||t(m)};return{schedule:Ro.reduce((v,x)=>{const w=o[x];return v[x]=(E,k=!1,C=!1)=>(n||_(),w.schedule(E,k,C)),v},{}),cancel:v=>{for(let x=0;x<Ro.length;x++)o[Ro[x]].cancel(v)},state:i,steps:o}}const{schedule:ue,cancel:qn,state:$e,steps:iu}=j0(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ct,!0);let ia;function IE(){ia=void 0}const it={now:()=>(ia===void 0&&it.set($e.isProcessing||xn.useManualTiming?$e.timestamp:performance.now()),ia),set:t=>{ia=t,queueMicrotask(IE)}},V0=t=>e=>typeof e=="string"&&e.startsWith(t),Vf=V0("--"),LE=V0("var(--"),Bf=t=>LE(t)?$E.test(t.split("/*")[0].trim()):!1,$E=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Mi={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Hs={...Mi,transform:t=>wn(0,1,t)},Ao={...Mi,default:1},_s=t=>Math.round(t*1e5)/1e5,zf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function NE(t){return t==null}const DE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Uf=(t,e)=>n=>!!(typeof n=="string"&&DE.test(n)&&n.startsWith(t)||e&&!NE(n)&&Object.prototype.hasOwnProperty.call(n,e)),B0=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(zf);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},FE=t=>wn(0,255,t),su={...Mi,transform:t=>Math.round(FE(t))},mr={test:Uf("rgb","red"),parse:B0("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+su.transform(t)+", "+su.transform(e)+", "+su.transform(n)+", "+_s(Hs.transform(r))+")"};function OE(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ic={test:Uf("#"),parse:OE,transform:mr.transform},lo=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bn=lo("deg"),Zt=lo("%"),z=lo("px"),jE=lo("vh"),VE=lo("vw"),Bp={...Zt,parse:t=>Zt.parse(t)/100,transform:t=>Zt.transform(t*100)},Qr={test:Uf("hsl","hue"),parse:B0("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Zt.transform(_s(e))+", "+Zt.transform(_s(n))+", "+_s(Hs.transform(r))+")"},ke={test:t=>mr.test(t)||Ic.test(t)||Qr.test(t),parse:t=>mr.test(t)?mr.parse(t):Qr.test(t)?Qr.parse(t):Ic.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?mr.transform(t):Qr.transform(t),getAnimatableNone:t=>{const e=ke.parse(t);return e.alpha=0,ke.transform(e)}},BE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zE(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(zf))==null?void 0:e.length)||0)+(((n=t.match(BE))==null?void 0:n.length)||0)>0}const z0="number",U0="color",UE="var",HE="var(",zp="${}",WE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ws(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(WE,l=>(ke.test(l)?(r.color.push(s),i.push(U0),n.push(ke.parse(l))):l.startsWith(HE)?(r.var.push(s),i.push(UE),n.push(l)):(r.number.push(s),i.push(z0),n.push(parseFloat(l))),++s,zp)).split(zp);return{values:n,split:a,indexes:r,types:i}}function H0(t){return Ws(t).values}function W0(t){const{split:e,types:n}=Ws(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===z0?s+=_s(i[o]):a===U0?s+=ke.transform(i[o]):s+=i[o]}return s}}const KE=t=>typeof t=="number"?0:ke.test(t)?ke.getAnimatableNone(t):t;function GE(t){const e=H0(t);return W0(t)(e.map(KE))}const Xn={test:zE,parse:H0,createTransformer:W0,getAnimatableNone:GE};function ou(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function YE({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ou(l,a,t+1/3),s=ou(l,a,t),o=ou(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Na(t,e){return n=>n>0?e:t}const de=(t,e,n)=>t+(e-t)*n,au=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},qE=[Ic,mr,Qr],XE=t=>qE.find(e=>e.test(t));function Up(t){const e=XE(t);if(!e)return!1;let n=e.parse(t);return e===Qr&&(n=YE(n)),n}const Hp=(t,e)=>{const n=Up(t),r=Up(e);if(!n||!r)return Na(t,e);const i={...n};return s=>(i.red=au(n.red,r.red,s),i.green=au(n.green,r.green,s),i.blue=au(n.blue,r.blue,s),i.alpha=de(n.alpha,r.alpha,s),mr.transform(i))},Lc=new Set(["none","hidden"]);function QE(t,e){return Lc.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ZE(t,e){return n=>de(t,e,n)}function Hf(t){return typeof t=="number"?ZE:typeof t=="string"?Bf(t)?Na:ke.test(t)?Hp:tk:Array.isArray(t)?K0:typeof t=="object"?ke.test(t)?Hp:JE:Na}function K0(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>Hf(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function JE(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Hf(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function ek(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=t.indexes[s][r[s]],a=t.values[o]??0;n[i]=a,r[s]++}return n}const tk=(t,e)=>{const n=Xn.createTransformer(e),r=Ws(t),i=Ws(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Lc.has(t)&&!i.values.length||Lc.has(e)&&!r.values.length?QE(t,e):oo(K0(ek(r,i),i.values),n):Na(t,e)};function G0(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?de(t,e,n):Hf(t)(t,e)}const nk=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ue.update(e,n),stop:()=>qn(e),now:()=>$e.isProcessing?$e.timestamp:it.now()}},Y0=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Da=2e4;function Wf(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Da;)e+=n,r=t.next(e);return e>=Da?1/0:e}function rk(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Wf(r),Da);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:Qt(i)}}const ik=5;function q0(t,e,n){const r=Math.max(e-ik,0);return b0(n-t(r),e-r)}const me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},lu=.001;function sk({duration:t=me.duration,bounce:e=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let i,s,o=1-e;o=wn(me.minDamping,me.maxDamping,o),t=wn(me.minDuration,me.maxDuration,Qt(t)),o<1?(i=u=>{const c=u*o,d=c*t,f=c-n,h=$c(u,o),y=Math.exp(-d);return lu-f/h*y},s=u=>{const d=u*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*t,y=Math.exp(-d),m=$c(Math.pow(u,2),o);return(-i(u)+lu>0?-1:1)*((f-h)*y)/m}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-lu+c*d},s=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=ak(i,s,a);if(t=Xt(t),isNaN(l))return{stiffness:me.stiffness,damping:me.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const ok=12;function ak(t,e,n){let r=n;for(let i=1;i<ok;i++)r=r-t(r)/e(r);return r}function $c(t,e){return t*Math.sqrt(1-e*e)}const lk=["duration","bounce"],uk=["stiffness","damping","mass"];function Wp(t,e){return e.some(n=>t[n]!==void 0)}function ck(t){let e={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...t};if(!Wp(t,uk)&&Wp(t,lk))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*wn(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:me.mass,stiffness:i,damping:s}}else{const n=sk(t);e={...e,...n,mass:me.mass},e.isResolvedFromDuration=!0}return e}function Fa(t=me.visualDuration,e=me.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=ck({...n,velocity:-Qt(n.velocity||0)}),y=f||0,m=u/(2*Math.sqrt(l*c)),_=o-s,p=Qt(Math.sqrt(l/c)),g=Math.abs(_)<5;r||(r=g?me.restSpeed.granular:me.restSpeed.default),i||(i=g?me.restDelta.granular:me.restDelta.default);let v;if(m<1){const w=$c(p,m);v=E=>{const k=Math.exp(-m*p*E);return o-k*((y+m*p*_)/w*Math.sin(w*E)+_*Math.cos(w*E))}}else if(m===1)v=w=>o-Math.exp(-p*w)*(_+(y+p*_)*w);else{const w=p*Math.sqrt(m*m-1);v=E=>{const k=Math.exp(-m*p*E),C=Math.min(w*E,300);return o-k*((y+m*p*_)*Math.sinh(C)+w*_*Math.cosh(C))/w}}const x={calculatedDuration:h&&d||null,next:w=>{const E=v(w);if(h)a.done=w>=d;else{let k=w===0?y:0;m<1&&(k=w===0?Xt(y):q0(v,w,E));const C=Math.abs(k)<=r,$=Math.abs(o-E)<=i;a.done=C&&$}return a.value=a.done?o:E,a},toString:()=>{const w=Math.min(Wf(x),Da),E=Y0(k=>x.next(w*k).value,w,30);return w+"ms "+E},toTransition:()=>{}};return x}Fa.applyToOptions=t=>{const e=rk(t,100,Fa);return t.ease=e.ease,t.duration=Xt(e.duration),t.type="keyframes",t};function Nc({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=C=>a!==void 0&&C<a||l!==void 0&&C>l,y=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*e;const _=d+m,p=o===void 0?_:o(_);p!==_&&(m=p-d);const g=C=>-m*Math.exp(-C/r),v=C=>p+g(C),x=C=>{const $=g(C),M=v(C);f.done=Math.abs($)<=u,f.value=f.done?p:M};let w,E;const k=C=>{h(f.value)&&(w=C,E=Fa({keyframes:[f.value,y(f.value)],velocity:q0(v,C,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:C=>{let $=!1;return!E&&w===void 0&&($=!0,x(C),k(C)),w!==void 0&&C>=w?E.next(C-w):(!$&&x(C),f)}}}function dk(t,e,n){const r=[],i=n||xn.mix||G0,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Ct:e;a=oo(l,a)}r.push(a)}return r}function fk(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(Nf(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=dk(e,r,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=Us(t[d],t[d+1],c);return a[d](f)};return n?c=>u(wn(t[0],t[s-1],c)):u}function hk(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Us(0,e,r);t.push(de(n,1,i))}}function pk(t){const e=[0];return hk(e,t.length-1),e}function gk(t,e){return t.map(n=>n*e)}function mk(t,e){return t.map(()=>e||F0).splice(0,t.length-1)}function ws({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=PE(r)?r.map(Vp):Vp(r),s={done:!1,value:e[0]},o=gk(n&&n.length===e.length?n:pk(e),t),a=fk(o,e,{ease:Array.isArray(i)?i:mk(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const vk=t=>t!==null;function Kf(t,{repeat:e,repeatType:n="loop"},r,i=1){const s=t.filter(vk),a=i<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const yk={decay:Nc,inertia:Nc,tween:ws,keyframes:ws,spring:Fa};function X0(t){typeof t.type=="string"&&(t.type=yk[t.type])}class Gf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const _k=t=>t/100;class Yf extends Gf{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==it.now()&&this.tick(it.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;X0(e);const{type:n=ws,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||ws;l!==ws&&typeof a[0]!="number"&&(this.mixKeyframes=oo(_k,G0(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Wf(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:y,onUpdate:m,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,x=r;if(d){const C=Math.min(this.currentTime,i)/a;let $=Math.floor(C),M=C%1;!M&&C>=1&&(M=1),M===1&&$--,$=Math.min($,d+1),!!($%2)&&(f==="reverse"?(M=1-M,h&&(M-=h/a)):f==="mirror"&&(x=o)),v=wn(0,1,M)*a}const w=g?{done:!1,value:c[0]}:x.next(v);s&&(w.value=s(w.value));let{done:E}=w;!g&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&y!==Nc&&(w.value=Kf(c,this.options,_,this.speed)),m&&m(w.value),k&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return Qt(this.calculatedDuration)}get time(){return Qt(this.currentTime)}set time(e){var n;e=Xt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(it.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Qt(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=nk,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(it.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function wk(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const vr=t=>t*180/Math.PI,Dc=t=>{const e=vr(Math.atan2(t[1],t[0]));return Fc(e)},xk={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Dc,rotateZ:Dc,skewX:t=>vr(Math.atan(t[1])),skewY:t=>vr(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Fc=t=>(t=t%360,t<0&&(t+=360),t),Kp=Dc,Gp=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Yp=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Sk={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Gp,scaleY:Yp,scale:t=>(Gp(t)+Yp(t))/2,rotateX:t=>Fc(vr(Math.atan2(t[6],t[5]))),rotateY:t=>Fc(vr(Math.atan2(-t[2],t[0]))),rotateZ:Kp,rotate:Kp,skewX:t=>vr(Math.atan(t[4])),skewY:t=>vr(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Oc(t){return t.includes("scale")?1:0}function jc(t,e){if(!t||t==="none")return Oc(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Sk,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=xk,i=a}if(!i)return Oc(e);const s=r[e],o=i[1].split(",").map(kk);return typeof s=="function"?s(o):o[s]}const Ek=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return jc(n,e)};function kk(t){return parseFloat(t.trim())}const Ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Li=new Set(Ii),qp=t=>t===Mi||t===z,Ck=new Set(["x","y","z"]),Tk=Ii.filter(t=>!Ck.has(t));function Pk(t){const e=[];return Tk.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const wr={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>jc(e,"x"),y:(t,{transform:e})=>jc(e,"y")};wr.translateX=wr.x;wr.translateY=wr.y;const xr=new Set;let Vc=!1,Bc=!1,zc=!1;function Q0(){if(Bc){const t=Array.from(xr).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=Pk(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Bc=!1,Vc=!1,xr.forEach(t=>t.complete(zc)),xr.clear()}function Z0(){xr.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Bc=!0)})}function bk(){zc=!0,Z0(),Q0(),zc=!1}class qf{constructor(e,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(xr.add(this),Vc||(Vc=!0,ue.read(Z0),ue.resolveKeyframes(Q0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}wk(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),xr.delete(this)}cancel(){this.state==="scheduled"&&(xr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rk=t=>t.startsWith("--");function Ak(t,e,n){Rk(e)?t.style.setProperty(e,n):t.style[e]=n}const Mk=Df(()=>window.ScrollTimeline!==void 0),Ik={};function Lk(t,e){const n=Df(t);return()=>Ik[e]??n()}const J0=Lk(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),es=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Xp={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:es([0,.65,.55,1]),circOut:es([.55,0,1,.45]),backIn:es([.31,.01,.66,-.59]),backOut:es([.33,1.53,.69,.99])};function e_(t,e){if(t)return typeof t=="function"?J0()?Y0(t,e):"ease-out":O0(t)?es(t):Array.isArray(t)?t.map(n=>e_(n,e)||Xp.easeOut):Xp[t]}function $k(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=e_(a,i);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function t_(t){return typeof t=="function"&&"applyToOptions"in t}function Nk({type:t,...e}){return t_(t)&&J0()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Dk extends Gf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,Nf(typeof e.type!="string");const u=Nk(e);this.animation=$k(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Kf(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Ak(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Qt(Number(e))}get time(){return Qt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Xt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Mk()?(this.animation.timeline=e,Ct):n(this)}}const n_={anticipate:$0,backInOut:L0,circInOut:D0};function Fk(t){return t in n_}function Ok(t){typeof t.ease=="string"&&Fk(t.ease)&&(t.ease=n_[t.ease])}const Qp=10;class jk extends Dk{constructor(e){Ok(e),X0(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Yf({...o,autoplay:!1}),l=Xt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Qp).value,a.sample(l).value,Qp),a.stop()}}const Zp=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Xn.test(t)||t==="0")&&!t.startsWith("url("));function Vk(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Bk(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=Zp(i,e),a=Zp(s,e);return!o||!a?!1:Vk(t)||(n==="spring"||t_(n))&&r}function Uc(t){t.duration=0,t.type}const zk=new Set(["opacity","clipPath","filter","transform"]),Uk=Df(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hk(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Uk()&&n&&zk.has(n)&&(n!=="transform"||!u)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const Wk=40;class Kk extends Gf{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var y;super(),this.stop=()=>{var m,_;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(_=this.keyframeResolver)==null||_.cancel()},this.createdAt=it.now();const f={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||qf;this.keyframeResolver=new h(a,(m,_,p)=>this.onKeyframesResolved(m,_,f,!p),l,u,c),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=it.now(),Bk(e,s,o,a)||((xn.instantAnimations||!l)&&(c==null||c(Kf(e,r,n))),e[0]=e[e.length-1],Uc(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Wk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},h=!u&&Hk(f)?new jk({...f,element:f.motionValue.owner.current}):new Yf(f);h.finished.then(()=>this.notifyFinished()).catch(Ct),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),bk()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Gk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yk(t){const e=Gk.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function r_(t,e,n=1){const[r,i]=Yk(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return C0(o)?parseFloat(o):o}return Bf(i)?r_(i,e,n+1):i}function Xf(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const i_=new Set(["width","height","top","left","right","bottom",...Ii]),qk={test:t=>t==="auto",parse:t=>t},s_=t=>e=>e.test(t),o_=[Mi,z,Zt,bn,VE,jE,qk],Jp=t=>o_.find(s_(t));function Xk(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||P0(t):!0}const Qk=new Set(["brightness","contrast","saturate","opacity"]);function Zk(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(zf)||[];if(!r)return t;const i=n.replace(r,"");let s=Qk.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const Jk=/\b([a-z-]*)\(.*?\)/gu,Hc={...Xn,getAnimatableNone:t=>{const e=t.match(Jk);return e?e.map(Zk).join(" "):t}},eg={...Mi,transform:Math.round},eC={rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scale:Ao,scaleX:Ao,scaleY:Ao,scaleZ:Ao,skew:bn,skewX:bn,skewY:bn,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Hs,originX:Bp,originY:Bp,originZ:z},Qf={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,radius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,backgroundPositionX:z,backgroundPositionY:z,...eC,zIndex:eg,fillOpacity:Hs,strokeOpacity:Hs,numOctaves:eg},tC={...Qf,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:Hc,WebkitFilter:Hc},a_=t=>tC[t];function l_(t,e){let n=a_(t);return n!==Hc&&(n=Xn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const nC=new Set(["auto","none","0"]);function rC(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!nC.has(s)&&Ws(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=l_(n,i)}class iC extends qf{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Bf(u))){const c=r_(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!i_.has(r)||e.length!==2)return;const[i,s]=e,o=Jp(i),a=Jp(s);if(o!==a)if(qp(o)&&qp(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else wr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Xk(e[i]))&&r.push(i);r.length&&rC(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=wr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=wr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function sC(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const i=(n==null?void 0:n[t])??r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const u_=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function oC(t){return T0(t)&&"offsetHeight"in t}const tg=30,aC=t=>!isNaN(parseFloat(t));class lC{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=it.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=it.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=aC(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ff);const r=this.events[e].add(n);return e==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>tg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tg);return b0(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xi(t,e){return new lC(t,e)}const{schedule:Zf}=j0(queueMicrotask,!1),It={x:!1,y:!1};function c_(){return It.x||It.y}function uC(t){return t==="x"||t==="y"?It[t]?null:(It[t]=!0,()=>{It[t]=!1}):It.x||It.y?null:(It.x=It.y=!0,()=>{It.x=It.y=!1})}function d_(t,e){const n=sC(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function ng(t){return!(t.pointerType==="touch"||c_())}function cC(t,e,n={}){const[r,i,s]=d_(t,n),o=a=>{if(!ng(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=d=>{ng(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const f_=(t,e)=>e?t===e?!0:f_(t,e.parentElement):!1,Jf=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,dC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fC(t){return dC.has(t.tagName)||t.tabIndex!==-1}const sa=new WeakSet;function rg(t){return e=>{e.key==="Enter"&&t(e)}}function uu(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const hC=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=rg(()=>{if(sa.has(n))return;uu(n,"down");const i=rg(()=>{uu(n,"up")}),s=()=>uu(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function ig(t){return Jf(t)&&!c_()}function pC(t,e,n={}){const[r,i,s]=d_(t,n),o=a=>{const l=a.currentTarget;if(!ig(a))return;sa.add(l);const u=e(l,a),c=(h,y)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),sa.has(l)&&sa.delete(l),ig(h)&&typeof u=="function"&&u(h,{success:y})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||f_(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),oC(a)&&(a.addEventListener("focus",u=>hC(u,i)),!fC(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function h_(t){return T0(t)&&"ownerSVGElement"in t}function gC(t){return h_(t)&&t.tagName==="svg"}const He=t=>!!(t&&t.getVelocity),mC=[...o_,ke,Xn],vC=t=>mC.find(s_(t)),p_=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function yC(t=!0){const e=S.useContext(If);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=S.useId();S.useEffect(()=>{if(t)return i(s)},[t]);const o=S.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const g_=S.createContext({strict:!1}),sg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Si={};for(const t in sg)Si[t]={isEnabled:e=>sg[t].some(n=>!!e[n])};function _C(t){for(const e in t)Si[e]={...Si[e],...t[e]}}const wC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Oa(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||wC.has(t)}let m_=t=>!Oa(t);function xC(t){typeof t=="function"&&(m_=e=>e.startsWith("on")?!Oa(e):t(e))}try{xC(require("@emotion/is-prop-valid").default)}catch{}function SC(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(m_(i)||n===!0&&Oa(i)||!e&&!Oa(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const yl=S.createContext({});function _l(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ks(t){return typeof t=="string"||Array.isArray(t)}const eh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],th=["initial",...eh];function wl(t){return _l(t.animate)||th.some(e=>Ks(t[e]))}function v_(t){return!!(wl(t)||t.variants)}function EC(t,e){if(wl(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ks(n)?n:void 0,animate:Ks(r)?r:void 0}}return t.inherit!==!1?e:{}}function kC(t){const{initial:e,animate:n}=EC(t,S.useContext(yl));return S.useMemo(()=>({initial:e,animate:n}),[og(e),og(n)])}function og(t){return Array.isArray(t)?t.join(" "):t}const Gs={};function CC(t){for(const e in t)Gs[e]=t[e],Vf(e)&&(Gs[e].isCSSVariable=!0)}function y_(t,{layout:e,layoutId:n}){return Li.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Gs[t]||t==="opacity")}const TC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PC=Ii.length;function bC(t,e,n){let r="",i=!0;for(let s=0;s<PC;s++){const o=Ii[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=u_(a,Qf[o]);if(!l){i=!1;const c=TC[o]||o;r+=`${c}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function nh(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Li.has(l)){o=!0;continue}else if(Vf(l)){i[l]=u;continue}else{const c=u_(u,Qf[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(e.transform||(o||n?r.transform=bC(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}const rh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function __(t,e,n){for(const r in e)!He(e[r])&&!y_(r,n)&&(t[r]=e[r])}function RC({transformTemplate:t},e){return S.useMemo(()=>{const n=rh();return nh(n,e,t),Object.assign({},n.vars,n.style)},[e])}function AC(t,e){const n=t.style||{},r={};return __(r,n,t),Object.assign(r,RC(t,e)),r}function MC(t,e){const n={},r=AC(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const IC={offset:"stroke-dashoffset",array:"stroke-dasharray"},LC={offset:"strokeDashoffset",array:"strokeDasharray"};function $C(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?IC:LC;t[s.offset]=z.transform(-r);const o=z.transform(e),a=z.transform(n);t[s.array]=`${o} ${a}`}function w_(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(nh(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&$C(d,i,s,o,!1)}const x_=()=>({...rh(),attrs:{}}),S_=t=>typeof t=="string"&&t.toLowerCase()==="svg";function NC(t,e,n,r){const i=S.useMemo(()=>{const s=x_();return w_(s,e,S_(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};__(s,t.style,t),i.style={...s,...i.style}}return i}const DC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ih(t){return typeof t!="string"||t.includes("-")?!1:!!(DC.indexOf(t)>-1||/[A-Z]/u.test(t))}function FC(t,e,n,{latestValues:r},i,s=!1){const a=(ih(t)?NC:MC)(e,r,i,t),l=SC(e,typeof t=="string",s),u=t!==S.Fragment?{...l,...a,ref:n}:{},{children:c}=e,d=S.useMemo(()=>He(c)?c.get():c,[c]);return S.createElement(t,{...u,children:d})}function ag(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function sh(t,e,n,r){if(typeof e=="function"){const[i,s]=ag(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=ag(r);e=e(n!==void 0?n:t.custom,i,s)}return e}function oa(t){return He(t)?t.get():t}function OC({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:jC(n,r,i,t),renderState:e()}}function jC(t,e,n,r){const i={},s=r(t,{});for(const f in s)i[f]=oa(s[f]);let{initial:o,animate:a}=t;const l=wl(t),u=v_(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!_l(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const y=sh(t,f[h]);if(y){const{transitionEnd:m,transition:_,...p}=y;for(const g in p){let v=p[g];if(Array.isArray(v)){const x=c?v.length-1:0;v=v[x]}v!==null&&(i[g]=v)}for(const g in m)i[g]=m[g]}}}return i}const E_=t=>(e,n)=>{const r=S.useContext(yl),i=S.useContext(If),s=()=>OC(t,e,r,i);return n?s():_E(s)};function oh(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(He(r[o])||e.style&&He(e.style[o])||y_(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const VC=E_({scrapeMotionValuesFromProps:oh,createRenderState:rh});function k_(t,e,n){const r=oh(t,e,n);for(const i in t)if(He(t[i])||He(e[i])){const s=Ii.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}const BC=E_({scrapeMotionValuesFromProps:k_,createRenderState:x_}),zC=Symbol.for("motionComponentSymbol");function Zr(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function UC(t,e,n){return S.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Zr(n)&&(n.current=r))},[e,n])}const ah=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HC="framerAppearId",C_="data-"+ah(HC),T_=S.createContext({});function WC(t,e,n,r,i){var m,_;const{visualElement:s}=S.useContext(yl),o=S.useContext(g_),a=S.useContext(If),l=S.useContext(p_).reducedMotion,u=S.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=S.useContext(T_);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&KC(u.current,n,i,d);const f=S.useRef(!1);S.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[C_],y=S.useRef(!!h&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,h))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,h)));return wE(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),y.current&&c.animationState&&c.animationState.animateChanges())}),S.useEffect(()=>{c&&(!y.current&&c.animationState&&c.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,h)}),y.current=!1),c.enteringChildren=void 0)}),c}function KC(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:P_(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Zr(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function P_(t){if(t)return t.options.allowProjection!==!1?t.projection:P_(t.parent)}function cu(t,{forwardMotionProps:e=!1}={},n,r){n&&_C(n);const i=ih(t)?BC:VC;function s(a,l){let u;const c={...S.useContext(p_),...a,layoutId:GC(a)},{isStatic:d}=c,f=kC(a),h=i(a,d);if(!d&&Mf){YC();const y=qC(c);u=y.MeasureLayout,f.visualElement=WC(t,h,c,r,y.ProjectionNode)}return P.jsxs(yl.Provider,{value:f,children:[u&&f.visualElement?P.jsx(u,{visualElement:f.visualElement,...c}):null,FC(t,a,UC(h,f.visualElement,l),h,d,e)]})}s.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const o=S.forwardRef(s);return o[zC]=t,o}function GC({layoutId:t}){const e=S.useContext(k0).id;return e&&t!==void 0?e+"-"+t:t}function YC(t,e){S.useContext(g_).strict}function qC(t){const{drag:e,layout:n}=Si;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function XC(t,e){if(typeof Proxy>"u")return cu;const n=new Map,r=(s,o)=>cu(s,o,t,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,cu(o,void 0,t,e)),n.get(o))})}function b_({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function QC({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ZC(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function du(t){return t===void 0||t===1}function Wc({scale:t,scaleX:e,scaleY:n}){return!du(t)||!du(e)||!du(n)}function cr(t){return Wc(t)||R_(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function R_(t){return lg(t.x)||lg(t.y)}function lg(t){return t&&t!=="0%"}function ja(t,e,n){const r=t-n,i=e*r;return n+i}function ug(t,e,n,r,i){return i!==void 0&&(t=ja(t,i,r)),ja(t,n,r)+e}function Kc(t,e=0,n=1,r,i){t.min=ug(t.min,e,n,r,i),t.max=ug(t.max,e,n,r,i)}function A_(t,{x:e,y:n}){Kc(t.x,e.translate,e.scale,e.originPoint),Kc(t.y,n.translate,n.scale,n.originPoint)}const cg=.999999999999,dg=1.0000000000001;function JC(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ei(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,A_(t,o)),r&&cr(s.latestValues)&&ei(t,s.latestValues))}e.x<dg&&e.x>cg&&(e.x=1),e.y<dg&&e.y>cg&&(e.y=1)}function Jr(t,e){t.min=t.min+e,t.max=t.max+e}function fg(t,e,n,r,i=.5){const s=de(t.min,t.max,i);Kc(t,e,n,s,r)}function ei(t,e){fg(t.x,e.x,e.scaleX,e.scale,e.originX),fg(t.y,e.y,e.scaleY,e.scale,e.originY)}function M_(t,e){return b_(ZC(t.getBoundingClientRect(),e))}function eT(t,e,n){const r=M_(t,n),{scroll:i}=e;return i&&(Jr(r.x,i.offset.x),Jr(r.y,i.offset.y)),r}const hg=()=>({translate:0,scale:1,origin:0,originPoint:0}),ti=()=>({x:hg(),y:hg()}),pg=()=>({min:0,max:0}),we=()=>({x:pg(),y:pg()}),Gc={current:null},I_={current:!1};function tT(){if(I_.current=!0,!!Mf)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Gc.current=t.matches;t.addEventListener("change",e),e()}else Gc.current=!1}const nT=new WeakMap;function rT(t,e,n){for(const r in e){const i=e[r],s=n[r];if(He(i))t.addValue(r,i);else if(He(s))t.addValue(r,xi(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,xi(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const gg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class iT{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=qf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=it.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ue.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=wl(n),this.isVariantNode=v_(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&He(h)&&h.set(l[f])}}mount(e){var n;this.current=e,nT.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),I_.current||tT(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gc.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),qn(this.notifyUpdate),qn(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Li.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Si){const n=Si[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):we()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<gg.length;r++){const i=gg[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=rT(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=xi(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(C0(r)||P0(r))?r=parseFloat(r):!vC(r)&&Xn.test(n)&&(r=l_(e,n)),this.setBaseTarget(e,He(r)?r.get():r)),He(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=sh(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!He(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ff),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Zf.render(this.render)}}class L_ extends iT{constructor(){super(...arguments),this.KeyframeResolver=iC}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;He(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function $_(t,{style:e,vars:n},r,i){const s=t.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function sT(t){return window.getComputedStyle(t)}class oT extends L_{constructor(){super(...arguments),this.type="html",this.renderInstance=$_}readValueFromInstance(e,n){var r;if(Li.has(n))return(r=this.projection)!=null&&r.isProjecting?Oc(n):Ek(e,n);{const i=sT(e),s=(Vf(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return M_(e,n)}build(e,n,r){nh(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return oh(e,n,r)}}const N_=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function aT(t,e,n,r){$_(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(N_.has(i)?i:ah(i),e.attrs[i])}class lT extends L_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=we}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Li.has(n)){const r=a_(n);return r&&r.default||0}return n=N_.has(n)?n:ah(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return k_(e,n,r)}build(e,n,r){w_(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){aT(e,n,r,i)}mount(e){this.isSVGTag=S_(e.tagName),super.mount(e)}}const uT=(t,e)=>ih(t)?new lT(e):new oT(e,{allowProjection:t!==S.Fragment});function di(t,e,n){const r=t.getProps();return sh(r,e,n!==void 0?n:r.custom,t)}const Yc=t=>Array.isArray(t);function cT(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xi(n))}function dT(t){return Yc(t)?t[t.length-1]||0:t}function fT(t,e){const n=di(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=dT(s[o]);cT(t,o,a)}}function hT(t){return!!(He(t)&&t.add)}function qc(t,e){const n=t.getValue("willChange");if(hT(n))return n.add(e);if(!n&&xn.WillChange){const r=new xn.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function D_(t){return t.props[C_]}const pT=t=>t!==null;function gT(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(pT),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[s]}const mT={type:"spring",stiffness:500,damping:25,restSpeed:10},vT=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),yT={type:"keyframes",duration:.8},_T={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wT=(t,{keyframes:e})=>e.length>2?yT:Li.has(t)?t.startsWith("scale")?vT(e[1]):mT:_T;function xT({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const lh=(t,e,n,r={},i,s)=>o=>{const a=Xf(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Xt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};xT(a)||Object.assign(c,wT(t,c)),c.duration&&(c.duration=Xt(c.duration)),c.repeatDelay&&(c.repeatDelay=Xt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Uc(c),c.delay===0&&(d=!0)),(xn.instantAnimations||xn.skipAnimations)&&(d=!0,Uc(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&e.get()!==void 0){const f=gT(c.keyframes,a);if(f!==void 0){ue.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Yf(c):new Kk(c)};function ST({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function F_(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(s=r);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const d=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&ST(u,c))continue;const h={delay:n,...Xf(s||{},c)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===y&&!h.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const p=D_(t);if(p){const g=window.MotionHandoffAnimation(p,c,ue);g!==null&&(h.startTime=g,m=!0)}}qc(t,c),d.start(lh(c,d,f,t.shouldReduceMotion&&i_.has(c)?{type:!1}:h,t,m));const _=d.animation;_&&l.push(_)}return o&&Promise.all(l).then(()=>{ue.update(()=>{o&&fT(t,o)})}),l}function O_(t,e,n,r=0,i=1){const s=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function Xc(t,e,n={}){var l;const r=di(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(F_(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return ET(t,e,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function ET(t,e,n=0,r=0,i=0,s=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Xc(l,e,{...o,delay:n+(typeof r=="function"?0:r)+O_(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function kT(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>Xc(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=Xc(t,e,n);else{const i=typeof e=="function"?di(t,e,n.custom):e;r=Promise.all(F_(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function j_(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const CT=th.length;function V_(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?V_(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<CT;n++){const r=th[n],i=t.props[r];(Ks(i)||i===!1)&&(e[r]=i)}return e}const TT=[...eh].reverse(),PT=eh.length;function bT(t){return e=>Promise.all(e.map(({animation:n,options:r})=>kT(t,n,r)))}function RT(t){let e=bT(t),n=mg(),r=!0;const i=l=>(u,c)=>{var f;const d=di(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:y,...m}=d;u={...u,...m,...y}}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,c=V_(t.parent)||{},d=[],f=new Set;let h={},y=1/0;for(let _=0;_<PT;_++){const p=TT[_],g=n[p],v=u[p]!==void 0?u[p]:c[p],x=Ks(v),w=p===l?g.isActive:null;w===!1&&(y=_);let E=v===c[p]&&v!==u[p]&&x;if(E&&r&&t.manuallyAnimateOnMount&&(E=!1),g.protectedKeys={...h},!g.isActive&&w===null||!v&&!g.prevProp||_l(v)||typeof v=="boolean")continue;const k=AT(g.prevProp,v);let C=k||p===l&&g.isActive&&!E&&x||_>y&&x,$=!1;const M=Array.isArray(v)?v:[v];let O=M.reduce(i(p),{});w===!1&&(O={});const{prevResolvedValues:U={}}=g,ee={...U,...O},V=G=>{C=!0,f.has(G)&&($=!0,f.delete(G)),g.needsAnimating[G]=!0;const R=t.getValue(G);R&&(R.liveStyle=!1)};for(const G in ee){const R=O[G],F=U[G];if(h.hasOwnProperty(G))continue;let j=!1;Yc(R)&&Yc(F)?j=!j_(R,F):j=R!==F,j?R!=null?V(G):f.add(G):R!==void 0&&f.has(G)?V(G):g.protectedKeys[G]=!0}g.prevProp=v,g.prevResolvedValues=O,g.isActive&&(h={...h,...O}),r&&t.blockInitialAnimation&&(C=!1);const Q=E&&k;C&&(!Q||$)&&d.push(...M.map(G=>{const R={type:p};if(typeof G=="string"&&r&&!Q&&t.manuallyAnimateOnMount&&t.parent){const{parent:F}=t,j=di(F,G);if(F.enteringChildren&&j){const{delayChildren:q}=j.transition||{};R.delay=O_(F.enteringChildren,t,q)}}return{animation:G,options:R}}))}if(f.size){const _={};if(typeof u.initial!="boolean"){const p=di(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(_.transition=p.transition)}f.forEach(p=>{const g=t.getBaseTarget(p),v=t.getValue(p);v&&(v.liveStyle=!0),_[p]=g??null}),d.push({animation:_})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=mg(),r=!0}}}function AT(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!j_(e,t):!1}function rr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mg(){return{animate:rr(!0),whileInView:rr(),whileHover:rr(),whileTap:rr(),whileDrag:rr(),whileFocus:rr(),exit:rr()}}class tr{constructor(e){this.isMounted=!1,this.node=e}update(){}}class MT extends tr{constructor(e){super(e),e.animationState||(e.animationState=RT(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_l(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let IT=0;class LT extends tr{constructor(){super(...arguments),this.id=IT++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const $T={animation:{Feature:MT},exit:{Feature:LT}};function Ys(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function uo(t){return{point:{x:t.pageX,y:t.pageY}}}const NT=t=>e=>Jf(e)&&t(e,uo(e));function xs(t,e,n,r){return Ys(t,e,NT(n),r)}const B_=1e-4,DT=1-B_,FT=1+B_,z_=.01,OT=0-z_,jT=0+z_;function Xe(t){return t.max-t.min}function VT(t,e,n){return Math.abs(t-e)<=n}function vg(t,e,n,r=.5){t.origin=r,t.originPoint=de(e.min,e.max,t.origin),t.scale=Xe(n)/Xe(e),t.translate=de(n.min,n.max,t.origin)-t.originPoint,(t.scale>=DT&&t.scale<=FT||isNaN(t.scale))&&(t.scale=1),(t.translate>=OT&&t.translate<=jT||isNaN(t.translate))&&(t.translate=0)}function Ss(t,e,n,r){vg(t.x,e.x,n.x,r?r.originX:void 0),vg(t.y,e.y,n.y,r?r.originY:void 0)}function yg(t,e,n){t.min=n.min+e.min,t.max=t.min+Xe(e)}function BT(t,e,n){yg(t.x,e.x,n.x),yg(t.y,e.y,n.y)}function _g(t,e,n){t.min=e.min-n.min,t.max=t.min+Xe(e)}function Es(t,e,n){_g(t.x,e.x,n.x),_g(t.y,e.y,n.y)}function wt(t){return[t("x"),t("y")]}const U_=({current:t})=>t?t.ownerDocument.defaultView:null,wg=(t,e)=>Math.abs(t-e);function zT(t,e){const n=wg(t.x,e.x),r=wg(t.y,e.y);return Math.sqrt(n**2+r**2)}class H_{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=hu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,y=zT(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!y)return;const{point:m}=f,{timestamp:_}=$e;this.history.push({...m,timestamp:_});const{onStart:p,onMove:g}=this.handlers;h||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=fu(h,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=hu(f.type==="pointercancel"?this.lastMoveEventInfo:fu(h,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,p),m&&m(f,p)},!Jf(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=uo(e),l=fu(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=$e;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(e,hu(l,this.history)),this.removeListeners=oo(xs(this.contextWindow,"pointermove",this.handlePointerMove),xs(this.contextWindow,"pointerup",this.handlePointerUp),xs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),qn(this.updatePoint)}}function fu(t,e){return e?{point:e(t.point)}:t}function xg(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hu({point:t},e){return{point:t,delta:xg(t,W_(e)),offset:xg(t,UT(e)),velocity:HT(e,.1)}}function UT(t){return t[0]}function W_(t){return t[t.length-1]}function HT(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=W_(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Xt(e)));)n--;if(!r)return{x:0,y:0};const s=Qt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function WT(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?de(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?de(n,t,r.max):Math.min(t,n)),t}function Sg(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function KT(t,{top:e,left:n,bottom:r,right:i}){return{x:Sg(t.x,n,i),y:Sg(t.y,e,r)}}function Eg(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function GT(t,e){return{x:Eg(t.x,e.x),y:Eg(t.y,e.y)}}function YT(t,e){let n=.5;const r=Xe(t),i=Xe(e);return i>r?n=Us(e.min,e.max-r,t.min):r>i&&(n=Us(t.min,t.max-i,e.min)),wn(0,1,n)}function qT(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Qc=.35;function XT(t=Qc){return t===!1?t=0:t===!0&&(t=Qc),{x:kg(t,"left","right"),y:kg(t,"top","bottom")}}function kg(t,e,n){return{min:Cg(t,e),max:Cg(t,n)}}function Cg(t,e){return typeof t=="number"?t:t[e]||0}const QT=new WeakMap;class ZT{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=we(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(uo(d).point)},o=(d,f)=>{const{drag:h,dragPropagation:y,onDragStart:m}=this.getProps();if(h&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uC(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wt(p=>{let g=this.getAxisMotionValue(p).get()||0;if(Zt.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[p];x&&(g=Xe(x)*(parseFloat(g)/100))}}this.originPoint[p]=g}),m&&ue.postRender(()=>m(d,f)),qc(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:y,onDirectionLock:m,onDrag:_}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:p}=f;if(y&&this.currentDirection===null){this.currentDirection=JT(p),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),_&&_(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>wt(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new H_(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:U_(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ue.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Mo(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=WT(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&Zr(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=KT(r.layoutBox,e):this.constraints=!1,this.elastic=XT(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&wt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qT(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Zr(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=eT(r,i.root,this.visualElement.getTransformPagePoint());let o=GT(i.layout.layoutBox,s);if(n){const a=n(QC(o));this.hasMutatedConstraints=!!a,a&&(o=b_(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=wt(c=>{if(!Mo(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,y={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return qc(this.visualElement,e),r.start(lh(e,r,0,n,this.visualElement,!1))}stopAnimation(){wt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){wt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){wt(n=>{const{drag:r}=this.getProps();if(!Mo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-de(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Zr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};wt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=YT({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),wt(o=>{if(!Mo(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(de(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;QT.set(this.visualElement,this);const e=this.visualElement.current,n=xs(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Zr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=Ys(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(wt(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Qc,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Mo(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function JT(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class eP extends tr{constructor(e){super(e),this.removeGroupControls=Ct,this.removeListeners=Ct,this.controls=new ZT(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ct}unmount(){this.removeGroupControls(),this.removeListeners()}}const Tg=t=>(e,n)=>{t&&ue.postRender(()=>t(e,n))};class tP extends tr{constructor(){super(...arguments),this.removePointerDownListener=Ct}onPointerDown(e){this.session=new H_(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U_(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Tg(e),onStart:Tg(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=xs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const aa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pg(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zi={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(z.test(t))t=parseFloat(t);else return t;const n=Pg(t,e.target.x),r=Pg(t,e.target.y);return`${n}% ${r}%`}},nP={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Xn.parse(t);if(i.length>5)return r;const s=Xn.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=de(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let pu=!1;class rP extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;CC(iP),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),pu&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),aa.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,pu=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Zf.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;pu=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function K_(t){const[e,n]=yC(),r=S.useContext(k0);return P.jsx(rP,{...t,layoutGroup:r,switchLayoutGroup:S.useContext(T_),isPresent:e,safeToRemove:n})}const iP={borderRadius:{...zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zi,borderTopRightRadius:zi,borderBottomLeftRadius:zi,borderBottomRightRadius:zi,boxShadow:nP};function sP(t,e,n){const r=He(t)?t:xi(t);return r.start(lh("",r,e,n)),r.animation}const oP=(t,e)=>t.depth-e.depth;class aP{constructor(){this.children=[],this.isDirty=!1}add(e){Lf(this.children,e),this.isDirty=!0}remove(e){$f(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(oP),this.isDirty=!1,this.children.forEach(e)}}function lP(t,e){const n=it.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(qn(r),t(s-e))};return ue.setup(r,!0),()=>qn(r)}const G_=["TopLeft","TopRight","BottomLeft","BottomRight"],uP=G_.length,bg=t=>typeof t=="string"?parseFloat(t):t,Rg=t=>typeof t=="number"||z.test(t);function cP(t,e,n,r,i,s){i?(t.opacity=de(0,n.opacity??1,dP(r)),t.opacityExit=de(e.opacity??1,0,fP(r))):s&&(t.opacity=de(e.opacity??1,n.opacity??1,r));for(let o=0;o<uP;o++){const a=`border${G_[o]}Radius`;let l=Ag(e,a),u=Ag(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Rg(l)===Rg(u)?(t[a]=Math.max(de(bg(l),bg(u),r),0),(Zt.test(u)||Zt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=de(e.rotate||0,n.rotate||0,r))}function Ag(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const dP=Y_(0,.5,N0),fP=Y_(.5,.95,Ct);function Y_(t,e,n){return r=>r<t?0:r>e?1:n(Us(t,e,r))}function Mg(t,e){t.min=e.min,t.max=e.max}function _t(t,e){Mg(t.x,e.x),Mg(t.y,e.y)}function Ig(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Lg(t,e,n,r,i){return t-=e,t=ja(t,1/n,r),i!==void 0&&(t=ja(t,1/i,r)),t}function hP(t,e=0,n=1,r=.5,i,s=t,o=t){if(Zt.test(e)&&(e=parseFloat(e),e=de(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=de(s.min,s.max,r);t===s&&(a-=e),t.min=Lg(t.min,e,n,a,i),t.max=Lg(t.max,e,n,a,i)}function $g(t,e,[n,r,i],s,o){hP(t,e[n],e[r],e[i],e.scale,s,o)}const pP=["x","scaleX","originX"],gP=["y","scaleY","originY"];function Ng(t,e,n,r){$g(t.x,e,pP,n?n.x:void 0,r?r.x:void 0),$g(t.y,e,gP,n?n.y:void 0,r?r.y:void 0)}function Dg(t){return t.translate===0&&t.scale===1}function q_(t){return Dg(t.x)&&Dg(t.y)}function Fg(t,e){return t.min===e.min&&t.max===e.max}function mP(t,e){return Fg(t.x,e.x)&&Fg(t.y,e.y)}function Og(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function X_(t,e){return Og(t.x,e.x)&&Og(t.y,e.y)}function jg(t){return Xe(t.x)/Xe(t.y)}function Vg(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class vP{constructor(){this.members=[]}add(e){Lf(this.members,e),e.scheduleRender()}remove(e){if($f(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function yP(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const gu=["","X","Y","Z"],_P=1e3;let wP=0;function mu(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Q_(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=D_(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Q_(r)}function Z_({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=wP++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(EP),this.nodes.forEach(PP),this.nodes.forEach(bP),this.nodes.forEach(kP)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new aP)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ff),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=h_(o)&&!gC(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;ue.read(()=>{d=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=lP(f,250),aa.hasAnimatedSinceResize&&(aa.hasAnimatedSinceResize=!1,this.nodes.forEach(Ug)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||LP,{onLayoutAnimationStart:m,onLayoutAnimationComplete:_}=u.getProps(),p=!this.targetLayout||!X_(this.targetLayout,h),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Xf(y,"layout"),onPlay:m,onComplete:_};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,g)}else d||Ug(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(RP),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Q_(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bg);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(zg);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(TP),this.nodes.forEach(xP),this.nodes.forEach(SP)):this.nodes.forEach(zg),this.clearAllSnapshots();const a=it.now();$e.delta=wn(0,1e3/60,a-$e.timestamp),$e.timestamp=a,$e.isProcessing=!0,iu.update.process($e),iu.preRender.process($e),iu.render.process($e),$e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CP),this.sharedNodes.forEach(AP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xe(this.snapshot.measuredBox.x)&&!Xe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=we(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!q_(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||cr(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),$P(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return we();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(NP))){const{scroll:c}=this.root;c&&(Jr(a.x,c.offset.x),Jr(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=we();if(_t(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&_t(a,o),Jr(a.x,d.offset.x),Jr(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=we();_t(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ei(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),cr(c.latestValues)&&ei(l,c.latestValues)}return cr(this.latestValues)&&ei(l,this.latestValues),l}removeTransform(o){const a=we();_t(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!cr(u.latestValues))continue;Wc(u.latestValues)&&u.updateSnapshot();const c=we(),d=u.measurePageBox();_t(c,d),Ng(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return cr(this.latestValues)&&Ng(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=$e.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=we(),this.relativeTargetOrigin=we(),Es(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),_t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=we(),this.targetWithTransforms=we()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),BT(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_t(this.target,this.layout.layoutBox),A_(this.target,this.targetDelta)):_t(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=we(),this.relativeTargetOrigin=we(),Es(this.relativeTargetOrigin,this.target,h.target),_t(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Wc(this.parent.latestValues)||R_(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var y;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$e.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;_t(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;JC(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=we());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ig(this.prevProjectionDelta.x,this.projectionDelta.x),Ig(this.prevProjectionDelta.y,this.projectionDelta.y)),Ss(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Vg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ti(),this.projectionDelta=ti(),this.projectionDeltaWithTransform=ti()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ti();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=we(),h=l?l.source:void 0,y=this.layout?this.layout.source:void 0,m=h!==y,_=this.getStack(),p=!_||_.members.length<=1,g=!!(m&&!p&&this.options.crossfade===!0&&!this.path.some(IP));this.animationProgress=0;let v;this.mixTargetDelta=x=>{const w=x/1e3;Hg(d.x,o.x,w),Hg(d.y,o.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Es(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MP(this.relativeTarget,this.relativeTargetOrigin,f,w),v&&mP(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=we()),_t(v,this.relativeTarget)),m&&(this.animationValues=c,cP(c,u,this.latestValues,w,g,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(qn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{aa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xi(0)),this.currentAnimation=sP(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_P),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&J_(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||we();const d=Xe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=Xe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}_t(a,l),ei(a,c),Ss(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new vP),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&mu("z",o,u,this.animationValues);for(let c=0;c<gu.length;c++)mu(`rotate${gu[c]}`,o,u,this.animationValues),mu(`skew${gu[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=oa(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=oa(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!cr(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=yP(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const y in Gs){if(c[y]===void 0)continue;const{correct:m,applyTo:_,isCSSVariable:p}=Gs[y],g=d==="none"?c[y]:m(c[y],u);if(_){const v=_.length;for(let x=0;x<v;x++)o[_[x]]=g}else p?this.options.visualElement.renderState.vars[y]=g:o[y]=g}this.options.layoutId&&(o.pointerEvents=u===this?oa(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Bg),this.root.sharedNodes.clear()}}}function xP(t){t.updateLayout()}function SP(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?wt(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Xe(f);f.min=r[d].min,f.max=f.min+h}):J_(s,e.layoutBox,r)&&wt(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=Xe(r[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=ti();Ss(a,r,e.layoutBox);const l=ti();o?Ss(l,t.applyTransform(i,!0),e.measuredBox):Ss(l,r,e.layoutBox);const u=!q_(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const y=we();Es(y,e.layoutBox,f.layoutBox);const m=we();Es(m,r,h.layoutBox),X_(y,m)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=y,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function EP(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kP(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function CP(t){t.clearSnapshot()}function Bg(t){t.clearMeasurements()}function zg(t){t.isLayoutDirty=!1}function TP(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ug(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function PP(t){t.resolveTargetDelta()}function bP(t){t.calcProjection()}function RP(t){t.resetSkewAndRotation()}function AP(t){t.removeLeadSnapshot()}function Hg(t,e,n){t.translate=de(e.translate,0,n),t.scale=de(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Wg(t,e,n,r){t.min=de(e.min,n.min,r),t.max=de(e.max,n.max,r)}function MP(t,e,n,r){Wg(t.x,e.x,n.x,r),Wg(t.y,e.y,n.y,r)}function IP(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const LP={duration:.45,ease:[.4,0,.1,1]},Kg=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Gg=Kg("applewebkit/")&&!Kg("chrome/")?Math.round:Ct;function Yg(t){t.min=Gg(t.min),t.max=Gg(t.max)}function $P(t){Yg(t.x),Yg(t.y)}function J_(t,e,n){return t==="position"||t==="preserve-aspect"&&!VT(jg(e),jg(n),.2)}function NP(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const DP=Z_({attachResizeListener:(t,e)=>Ys(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vu={current:void 0},ew=Z_({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!vu.current){const t=new DP({});t.mount(window),t.setOptions({layoutScroll:!0}),vu.current=t}return vu.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),FP={pan:{Feature:tP},drag:{Feature:eP,ProjectionNode:ew,MeasureLayout:K_}};function qg(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(e,uo(e)))}class OP extends tr{mount(){const{current:e}=this.node;e&&(this.unmount=cC(e,(n,r)=>(qg(this.node,r,"Start"),i=>qg(this.node,i,"End"))))}unmount(){}}class jP extends tr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oo(Ys(this.node.current,"focus",()=>this.onFocus()),Ys(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Xg(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(e,uo(e)))}class VP extends tr{mount(){const{current:e}=this.node;e&&(this.unmount=pC(e,(n,r)=>(Xg(this.node,r,"Start"),(i,{success:s})=>Xg(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Zc=new WeakMap,yu=new WeakMap,BP=t=>{const e=Zc.get(t.target);e&&e(t)},zP=t=>{t.forEach(BP)};function UP({root:t,...e}){const n=t||document;yu.has(n)||yu.set(n,{});const r=yu.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(zP,{root:t,...e})),r[i]}function HP(t,e,n){const r=UP(e);return Zc.set(t,n),r.observe(t),()=>{Zc.delete(t),r.unobserve(t)}}const WP={some:0,all:1};class KP extends tr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:WP[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return HP(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(GP(e,n))&&this.startObserver()}unmount(){}}function GP({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const YP={inView:{Feature:KP},tap:{Feature:VP},focus:{Feature:jP},hover:{Feature:OP}},qP={layout:{ProjectionNode:ew,MeasureLayout:K_}},XP={...$T,...YP,...FP,...qP},tw=XC(XP,uT);/**
41
+ * @license lucide-react v0.539.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const QP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ZP=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),Qg=t=>{const e=ZP(t);return e.charAt(0).toUpperCase()+e.slice(1)},nw=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),JP=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
46
+ * @license lucide-react v0.539.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var eb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51
+ * @license lucide-react v0.539.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const tb=S.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>S.createElement("svg",{ref:l,...eb,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:nw("lucide",i),...!s&&!JP(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>S.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
56
+ * @license lucide-react v0.539.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const En=(t,e)=>{const n=S.forwardRef(({className:r,...i},s)=>S.createElement(tb,{ref:s,iconNode:e,className:nw(`lucide-${QP(Qg(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Qg(t),n};/**
61
+ * @license lucide-react v0.539.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const nb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Zg=En("circle-alert",nb);/**
66
+ * @license lucide-react v0.539.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const rb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ib=En("circle-check-big",rb);/**
71
+ * @license lucide-react v0.539.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const sb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ob=En("eye",sb);/**
76
+ * @license lucide-react v0.539.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const ab=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Jg=En("loader-circle",ab);/**
81
+ * @license lucide-react v0.539.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const lb=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],ub=En("palette",lb);/**
86
+ * @license lucide-react v0.539.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const cb=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],db=En("pencil",cb);/**
91
+ * @license lucide-react v0.539.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const fb=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],hb=En("sparkles",fb);/**
96
+ * @license lucide-react v0.539.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const pb=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],gb=En("upload",pb);/**
101
+ * @license lucide-react v0.539.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const mb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vb=En("x",mb);var rw={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(W1,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function a(m,_){var p=m[_];if(typeof p.bind=="function")return p.bind(m);try{return Function.prototype.bind.call(p,m)}catch{return function(){return Function.prototype.apply.apply(p,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&r?l:console[m]!==void 0?a(console,m):console.log!==void 0?a(console,"log"):e}function c(){for(var m=this.getLevel(),_=0;_<i.length;_++){var p=i[_];this[p]=_<m?e:this.methodFactory(p,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,_,p){return u(m)||d.apply(this,arguments)}function h(m,_){var p=this,g,v,x,w="loglevel";typeof m=="string"?w+=":"+m:typeof m=="symbol"&&(w=void 0);function E(O){var U=(i[O]||"silent").toUpperCase();if(!(typeof window===n||!w)){try{window.localStorage[w]=U;return}catch{}try{window.document.cookie=encodeURIComponent(w)+"="+U+";"}catch{}}}function k(){var O;if(!(typeof window===n||!w)){try{O=window.localStorage[w]}catch{}if(typeof O===n)try{var U=window.document.cookie,ee=encodeURIComponent(w),V=U.indexOf(ee+"=");V!==-1&&(O=/^([^;]+)/.exec(U.slice(V+ee.length+1))[1])}catch{}return p.levels[O]===void 0&&(O=void 0),O}}function C(){if(!(typeof window===n||!w)){try{window.localStorage.removeItem(w)}catch{}try{window.document.cookie=encodeURIComponent(w)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function $(O){var U=O;if(typeof U=="string"&&p.levels[U.toUpperCase()]!==void 0&&(U=p.levels[U.toUpperCase()]),typeof U=="number"&&U>=0&&U<=p.levels.SILENT)return U;throw new TypeError("log.setLevel() called with invalid level: "+O)}p.name=m,p.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},p.methodFactory=_||f,p.getLevel=function(){return x??v??g},p.setLevel=function(O,U){return x=$(O),U!==!1&&E(x),c.call(p)},p.setDefaultLevel=function(O){v=$(O),k()||p.setLevel(O,!1)},p.resetLevel=function(){x=null,C(),c.call(p)},p.enableAll=function(O){p.setLevel(p.levels.TRACE,O)},p.disableAll=function(O){p.setLevel(p.levels.SILENT,O)},p.rebuild=function(){if(o!==p&&(g=$(o.getLevel())),c.call(p),o===p)for(var O in s)s[O].rebuild()},g=$(o?o.getLevel():"WARN");var M=k();M!=null&&(x=$(M)),c.call(p)}o=new h,o.getLogger=function(_){if(typeof _!="symbol"&&typeof _!="string"||_==="")throw new TypeError("You must supply a name when creating a logger.");var p=s[_];return p||(p=s[_]=new h(_,o.methodFactory)),p};var y=typeof window!==n?window.log:void 0;return o.noConflict=function(){return typeof window!==n&&window.log===o&&(window.log=y),o},o.getLoggers=function(){return s},o.default=o,o})})(rw);var yb=rw.exports;const $t=Nd(yb),_b="INFO",wb=_b.toUpperCase();$t.setLevel($t.levels[wb]||$t.levels.INFO);const xl=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>$t.trace(`${e}${n}`,...r),debug:(n,...r)=>$t.debug(`${e}${n}`,...r),info:(n,...r)=>$t.info(`${e}${n}`,...r),warn:(n,...r)=>$t.warn(`${e}${n}`,...r),error:(n,...r)=>$t.error(`${e}${n}`,...r),api:(n,...r)=>$t.info(`${e}API: ${n}`,...r),hook:(n,...r)=>$t.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>$t.debug(`${e}Mount: ${n}`,...r)}},Ui=xl("useGitPublish"),xb=()=>{const[t,e]=S.useState(!1),[n,r]=S.useState(null),i=S.useCallback(async()=>{Ui.debug("publishChanges called"),e(!0),r(null);try{Ui.debug("Making fetch request to /api/git/publish");const o=await fetch("/api/git/publish",{method:"POST",headers:{"Content-Type":"application/json"}});if(Ui.debug("Response received",{status:o.status,ok:o.ok}),!o.ok){const l=await o.json();throw new Error(l.details||l.error||`HTTP ${o.status}`)}const a=await o.json();return Ui.info("Git publish completed successfully:",a.prUrl),a}catch(o){const a=o instanceof Error?o.message:"Failed to publish changes";return r(a),Ui.error("Git publish error:",o),null}finally{e(!1)}},[]);return{publishChanges:S.useCallback(async o=>{const a=await i();return a?o("success","🎉 Changes published successfully!","Your branch has been pushed and is ready for a pull request.",{label:"View PR",onClick:()=>window.open(a.prUrl,"_blank")}):n&&o("error","Failed to publish changes",n),a},[i,n]),isPublishing:t,error:n,clearError:()=>r(null)}};function dt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function em(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function iw(...t){return e=>{let n=!1;const r=t.map(i=>{const s=em(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():em(t[i],null)}}}}function Pr(...t){return S.useCallback(iw(...t),t)}function sw(t,e=[]){let n=[];function r(s,o){const a=S.createContext(o),l=n.length;n=[...n,o];const u=d=>{var p;const{scope:f,children:h,...y}=d,m=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,_=S.useMemo(()=>y,Object.values(y));return P.jsx(m.Provider,{value:_,children:h})};u.displayName=s+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,y=S.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>S.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return S.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,Sb(i,...e)]}function Sb(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return S.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Jc(t){const e=Eb(t),n=S.forwardRef((r,i)=>{const{children:s,...o}=r,a=S.Children.toArray(s),l=a.find(Cb);if(l){const u=l.props.children,c=a.map(d=>d===l?S.Children.count(u)>1?S.Children.only(null):S.isValidElement(u)?u.props.children:null:d);return P.jsx(e,{...o,ref:i,children:S.isValidElement(u)?S.cloneElement(u,void 0,c):null})}return P.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function Eb(t){const e=S.forwardRef((n,r)=>{const{children:i,...s}=n;if(S.isValidElement(i)){const o=Pb(i),a=Tb(s,i.props);return i.type!==S.Fragment&&(a.ref=r?iw(r,o):o),S.cloneElement(i,a)}return S.Children.count(i)>1?S.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var kb=Symbol("radix.slottable");function Cb(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===kb}function Tb(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function Pb(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function bb(t){const e=t+"CollectionProvider",[n,r]=sw(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:_,children:p}=m,g=qe.useRef(null),v=qe.useRef(new Map).current;return P.jsx(i,{scope:_,itemMap:v,collectionRef:g,children:p})};o.displayName=e;const a=t+"CollectionSlot",l=Jc(a),u=qe.forwardRef((m,_)=>{const{scope:p,children:g}=m,v=s(a,p),x=Pr(_,v.collectionRef);return P.jsx(l,{ref:x,children:g})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=Jc(c),h=qe.forwardRef((m,_)=>{const{scope:p,children:g,...v}=m,x=qe.useRef(null),w=Pr(_,x),E=s(c,p);return qe.useEffect(()=>(E.itemMap.set(x,{ref:x,...v}),()=>void E.itemMap.delete(x))),P.jsx(f,{[d]:"",ref:w,children:g})});h.displayName=c;function y(m){const _=s(t+"CollectionConsumer",m);return qe.useCallback(()=>{const g=_.collectionRef.current;if(!g)return[];const v=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((E,k)=>v.indexOf(E.ref.current)-v.indexOf(k.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},y,r]}var Rb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nn=Rb.reduce((t,e)=>{const n=Jc(`Primitive.${e}`),r=S.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function ow(t,e){t&&vl.flushSync(()=>t.dispatchEvent(e))}function br(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function Ab(t,e=globalThis==null?void 0:globalThis.document){const n=br(t);S.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var Mb="DismissableLayer",ed="dismissableLayer.update",Ib="dismissableLayer.pointerDownOutside",Lb="dismissableLayer.focusOutside",tm,aw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lw=S.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=S.useContext(aw),[c,d]=S.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=S.useState({}),y=Pr(e,k=>d(k)),m=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=m.indexOf(_),g=c?m.indexOf(c):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,x=g>=p,w=Nb(k=>{const C=k.target,$=[...u.branches].some(M=>M.contains(C));!x||$||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),E=Db(k=>{const C=k.target;[...u.branches].some(M=>M.contains(C))||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return Ab(k=>{g===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),S.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),nm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=tm)}},[c,f,n,u]),S.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),nm())},[c,u]),S.useEffect(()=>{const k=()=>h({});return document.addEventListener(ed,k),()=>document.removeEventListener(ed,k)},[]),P.jsx(nn.div,{...l,ref:y,style:{pointerEvents:v?x?"auto":"none":void 0,...t.style},onFocusCapture:dt(t.onFocusCapture,E.onFocusCapture),onBlurCapture:dt(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:dt(t.onPointerDownCapture,w.onPointerDownCapture)})});lw.displayName=Mb;var $b="DismissableLayerBranch",uw=S.forwardRef((t,e)=>{const n=S.useContext(aw),r=S.useRef(null),i=Pr(e,r);return S.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),P.jsx(nn.div,{...t,ref:i})});uw.displayName=$b;function Nb(t,e=globalThis==null?void 0:globalThis.document){const n=br(t),r=S.useRef(!1),i=S.useRef(()=>{});return S.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){cw(Ib,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Db(t,e=globalThis==null?void 0:globalThis.document){const n=br(t),r=S.useRef(!1);return S.useEffect(()=>{const i=s=>{s.target&&!r.current&&cw(Lb,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nm(){const t=new CustomEvent(ed);document.dispatchEvent(t)}function cw(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ow(i,s):i.dispatchEvent(s)}var Fb=lw,Ob=uw,qs=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},jb="Portal",dw=S.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=S.useState(!1);qs(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?yE.createPortal(P.jsx(nn.div,{...r,ref:e}),o):null});dw.displayName=jb;function Vb(t,e){return S.useReducer((n,r)=>e[n][r]??n,t)}var fw=t=>{const{present:e,children:n}=t,r=Bb(e),i=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=Pr(r.ref,zb(i));return typeof n=="function"||r.isPresent?S.cloneElement(i,{ref:s}):null};fw.displayName="Presence";function Bb(t){const[e,n]=S.useState(),r=S.useRef(null),i=S.useRef(t),s=S.useRef("none"),o=t?"mounted":"unmounted",[a,l]=Vb(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=Io(r.current);s.current=a==="mounted"?u:"none"},[a]),qs(()=>{const u=r.current,c=i.current;if(c!==t){const f=s.current,h=Io(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),qs(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const m=Io(r.current).includes(CSS.escape(h.animationName));if(h.target===e&&m&&(l("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},f=h=>{h.target===e&&(s.current=Io(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:S.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Io(t){return(t==null?void 0:t.animationName)||"none"}function zb(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ub=ax[" useInsertionEffect ".trim().toString()]||qs;function Hb({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=Wb({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const c=S.useRef(t!==void 0);S.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=S.useCallback(c=>{var d;if(a){const f=Kb(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}function Wb({defaultProp:t,onChange:e}){const[n,r]=S.useState(t),i=S.useRef(n),s=S.useRef(e);return Ub(()=>{s.current=e},[e]),S.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function Kb(t){return typeof t=="function"}var Gb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yb="VisuallyHidden",uh=S.forwardRef((t,e)=>P.jsx(nn.span,{...t,ref:e,style:{...Gb,...t.style}}));uh.displayName=Yb;var ch="ToastProvider",[dh,qb,Xb]=bb("Toast"),[hw]=sw("Toast",[Xb]),[Qb,Sl]=hw(ch),pw=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[a,l]=S.useState(null),[u,c]=S.useState(0),d=S.useRef(!1),f=S.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ch}\`. Expected non-empty \`string\`.`),P.jsx(dh.Provider,{scope:e,children:P.jsx(Qb,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:S.useCallback(()=>c(h=>h+1),[]),onToastRemove:S.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};pw.displayName=ch;var gw="ToastViewport",Zb=["F8"],td="toast.viewportPause",nd="toast.viewportResume",mw=S.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=Zb,label:i="Notifications ({hotkey})",...s}=t,o=Sl(gw,n),a=qb(n),l=S.useRef(null),u=S.useRef(null),c=S.useRef(null),d=S.useRef(null),f=Pr(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;S.useEffect(()=>{const _=p=>{var v;r.length!==0&&r.every(x=>p[x]||p.code===x)&&((v=d.current)==null||v.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),S.useEffect(()=>{const _=l.current,p=d.current;if(y&&_&&p){const g=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(td);p.dispatchEvent(E),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(nd);p.dispatchEvent(E),o.isClosePausedRef.current=!1}},x=E=>{!_.contains(E.relatedTarget)&&v()},w=()=>{_.contains(document.activeElement)||v()};return _.addEventListener("focusin",g),_.addEventListener("focusout",x),_.addEventListener("pointermove",g),_.addEventListener("pointerleave",w),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{_.removeEventListener("focusin",g),_.removeEventListener("focusout",x),_.removeEventListener("pointermove",g),_.removeEventListener("pointerleave",w),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[y,o.isClosePausedRef]);const m=S.useCallback(({tabbingDirection:_})=>{const g=a().map(v=>{const x=v.ref.current,w=[x,...dR(x)];return _==="forwards"?w:w.reverse()});return(_==="forwards"?g.reverse():g).flat()},[a]);return S.useEffect(()=>{const _=d.current;if(_){const p=g=>{var w,E,k;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const C=document.activeElement,$=g.shiftKey;if(g.target===_&&$){(w=u.current)==null||w.focus();return}const U=m({tabbingDirection:$?"backwards":"forwards"}),ee=U.findIndex(V=>V===C);_u(U.slice(ee+1))?g.preventDefault():$?(E=u.current)==null||E.focus():(k=c.current)==null||k.focus()}};return _.addEventListener("keydown",p),()=>_.removeEventListener("keydown",p)}},[a,m]),P.jsxs(Ob,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&P.jsx(rd,{ref:u,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"forwards"});_u(_)}}),P.jsx(dh.Slot,{scope:n,children:P.jsx(nn.ol,{tabIndex:-1,...s,ref:f})}),y&&P.jsx(rd,{ref:c,onFocusFromOutsideViewport:()=>{const _=m({tabbingDirection:"backwards"});_u(_)}})]})});mw.displayName=gw;var vw="ToastFocusProxy",rd=S.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=Sl(vw,n);return P.jsx(uh,{tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});rd.displayName=vw;var co="Toast",Jb="toast.swipeStart",eR="toast.swipeMove",tR="toast.swipeCancel",nR="toast.swipeEnd",yw=S.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=t,[a,l]=Hb({prop:r,defaultProp:i??!0,onChange:s,caller:co});return P.jsx(fw,{present:n||a,children:P.jsx(sR,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:br(t.onPause),onResume:br(t.onResume),onSwipeStart:dt(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dt(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:dt(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dt(t.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});yw.displayName=co;var[rR,iR]=hw(co,{onClose(){}}),sR=S.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=t,m=Sl(co,n),[_,p]=S.useState(null),g=Pr(e,V=>p(V)),v=S.useRef(null),x=S.useRef(null),w=i||m.duration,E=S.useRef(0),k=S.useRef(w),C=S.useRef(0),{onToastAdd:$,onToastRemove:M}=m,O=br(()=>{var Q;(_==null?void 0:_.contains(document.activeElement))&&((Q=m.viewport)==null||Q.focus()),o()}),U=S.useCallback(V=>{!V||V===1/0||(window.clearTimeout(C.current),E.current=new Date().getTime(),C.current=window.setTimeout(O,V))},[O]);S.useEffect(()=>{const V=m.viewport;if(V){const Q=()=>{U(k.current),u==null||u()},Ee=()=>{const G=new Date().getTime()-E.current;k.current=k.current-G,window.clearTimeout(C.current),l==null||l()};return V.addEventListener(td,Ee),V.addEventListener(nd,Q),()=>{V.removeEventListener(td,Ee),V.removeEventListener(nd,Q)}}},[m.viewport,w,l,u,U]),S.useEffect(()=>{s&&!m.isClosePausedRef.current&&U(w)},[s,w,m.isClosePausedRef,U]),S.useEffect(()=>($(),()=>M()),[$,M]);const ee=S.useMemo(()=>_?Cw(_):null,[_]);return m.viewport?P.jsxs(P.Fragment,{children:[ee&&P.jsx(oR,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:ee}),P.jsx(rR,{scope:n,onClose:O,children:vl.createPortal(P.jsx(dh.ItemSlot,{scope:n,children:P.jsx(Fb,{asChild:!0,onEscapeKeyDown:dt(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||O(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:P.jsx(nn.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...y,ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:dt(t.onKeyDown,V=>{V.key==="Escape"&&(a==null||a(V.nativeEvent),V.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:dt(t.onPointerDown,V=>{V.button===0&&(v.current={x:V.clientX,y:V.clientY})}),onPointerMove:dt(t.onPointerMove,V=>{if(!v.current)return;const Q=V.clientX-v.current.x,Ee=V.clientY-v.current.y,G=!!x.current,R=["left","right"].includes(m.swipeDirection),F=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,j=R?F(0,Q):0,q=R?0:F(0,Ee),H=V.pointerType==="touch"?10:2,ge={x:j,y:q},ae={originalEvent:V,delta:ge};G?(x.current=ge,Lo(eR,d,ae,{discrete:!1})):rm(ge,m.swipeDirection,H)?(x.current=ge,Lo(Jb,c,ae,{discrete:!1}),V.target.setPointerCapture(V.pointerId)):(Math.abs(Q)>H||Math.abs(Ee)>H)&&(v.current=null)}),onPointerUp:dt(t.onPointerUp,V=>{const Q=x.current,Ee=V.target;if(Ee.hasPointerCapture(V.pointerId)&&Ee.releasePointerCapture(V.pointerId),x.current=null,v.current=null,Q){const G=V.currentTarget,R={originalEvent:V,delta:Q};rm(Q,m.swipeDirection,m.swipeThreshold)?Lo(nR,h,R,{discrete:!0}):Lo(tR,f,R,{discrete:!0}),G.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),oR=t=>{const{__scopeToast:e,children:n,...r}=t,i=Sl(co,e),[s,o]=S.useState(!1),[a,l]=S.useState(!1);return uR(()=>o(!0)),S.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:P.jsx(dw,{asChild:!0,children:P.jsx(uh,{...r,children:s&&P.jsxs(P.Fragment,{children:[i.label," ",n]})})})},aR="ToastTitle",_w=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(nn.div,{...r,ref:e})});_w.displayName=aR;var lR="ToastDescription",ww=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(nn.div,{...r,ref:e})});ww.displayName=lR;var xw="ToastAction",Sw=S.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?P.jsx(kw,{altText:n,asChild:!0,children:P.jsx(fh,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${xw}\`. Expected non-empty \`string\`.`),null)});Sw.displayName=xw;var Ew="ToastClose",fh=S.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=iR(Ew,n);return P.jsx(kw,{asChild:!0,children:P.jsx(nn.button,{type:"button",...r,ref:e,onClick:dt(t.onClick,i.onClose)})})});fh.displayName=Ew;var kw=S.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return P.jsx(nn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function Cw(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),cR(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Cw(r))}}),e}function Lo(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ow(i,s):i.dispatchEvent(s)}var rm=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function uR(t=()=>{}){const e=br(t);qs(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function cR(t){return t.nodeType===t.ELEMENT_NODE}function dR(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function _u(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var fR=pw,hR=mw,pR=yw,gR=_w,mR=ww,vR=Sw,yR=fh;const Tw=({isOpen:t,onOpenChange:e,type:n,title:r,description:i,action:s})=>{const o=()=>{switch(n){case"success":return{Icon:ib,bgColor:"bg-green-50",borderColor:"border-green-200",textColor:"text-green-900",iconColor:"text-green-600",actionStyles:"border-green-300 hover:bg-green-100 hover:border-green-400"};case"error":return{Icon:Zg,bgColor:"bg-red-50",borderColor:"border-red-200",textColor:"text-red-900",iconColor:"text-red-600",actionStyles:"border-red-300 hover:bg-red-100 hover:border-red-400"};default:return{Icon:Zg,bgColor:"bg-gray-50",borderColor:"border-gray-200",textColor:"text-gray-900",iconColor:"text-gray-600",actionStyles:"border-gray-300 hover:bg-gray-100 hover:border-gray-400"}}},{Icon:a,bgColor:l,borderColor:u,textColor:c,iconColor:d,actionStyles:f}=o();return P.jsxs(pR,{className:`${l} ${u} ${c} border rounded-lg shadow-lg p-4 grid grid-cols-[auto_1fr_auto] gap-3 items-start data-[state=open]:animate-slideIn data-[state=closed]:animate-hide data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:animate-swipeOut`,open:t,onOpenChange:e,duration:9e3,children:[P.jsx(a,{className:`${d} w-5 h-5 mt-0.5`}),P.jsxs("div",{className:"flex flex-col gap-2",children:[P.jsxs("div",{className:"flex flex-col gap-1",children:[P.jsx(gR,{className:"font-semibold text-sm",children:r}),i&&P.jsx(mR,{className:"text-sm opacity-90",children:i})]}),s&&P.jsx(vR,{className:`px-3 py-1.5 text-xs font-medium rounded border transition-colors ${f} self-start`,altText:s.label,onClick:s.onClick,children:s.label})]}),P.jsx(yR,{className:"rounded p-1 hover:bg-black/10 transition-colors",children:P.jsx(vb,{className:"w-4 h-4"})})]})},Pw=({children:t})=>P.jsxs(fR,{swipeDirection:"right",children:[t,P.jsx(hR,{className:"fixed bottom-0 right-0 flex flex-col p-6 gap-3 w-96 max-w-[100vw] m-0 list-none z-50 outline-none"})]}),_R=({isEditMode:t,onModeChange:e,isLoading:n=!1})=>{const{publishChanges:r,isPublishing:i}=xb(),[s,o]=S.useState({isOpen:!1,type:"success",title:"",onOpenChange:()=>{},description:void 0,action:void 0}),a=(l,u,c,d)=>{o({isOpen:!0,type:l,title:u,description:c,action:d,onOpenChange:f=>o(h=>({...h,isOpen:f}))})};return P.jsxs(Pw,{children:[P.jsx(tw.div,{className:"absolute bottom-6 left-1/2 transform -translate-x-1/2 z-20",initial:{y:100,opacity:0},animate:{y:n?100:0,opacity:n?0:1},transition:{duration:.6,ease:"easeOut",delay:n?0:.3},children:P.jsxs("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200 p-1 flex items-center space-x-1",children:[P.jsx("button",{onClick:()=>e(!1),className:`p-2 rounded-md transition-colors ${t?"text-gray-500 hover:text-gray-700 hover:bg-gray-50":"bg-orange-100 text-orange-600"}`,title:"View Mode",children:P.jsx(ob,{className:"w-5 h-5"})}),P.jsx("div",{className:"w-px h-6 bg-gray-300"}),P.jsx("button",{onClick:()=>e(!0),className:`p-2 rounded-md transition-colors ${t?"bg-orange-100 text-orange-600":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,title:"Edit Mode - Drag to select elements",children:P.jsx(db,{className:"w-5 h-5"})}),P.jsx("div",{className:"w-px h-6 bg-gray-300"}),P.jsx("button",{onClick:()=>r(a),disabled:i,className:"p-2 rounded-md transition-colors text-gray-500 hover:text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",title:i?"Publishing changes...":"Publish Changes & Create PR",children:i?P.jsx("div",{className:"animate-spin w-5 h-5",children:P.jsxs("svg",{className:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[P.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),P.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):P.jsx(gb,{className:"w-5 h-5"})})]})}),P.jsx(Tw,{isOpen:s.isOpen,onOpenChange:s.onOpenChange,type:s.type,title:s.title,description:s.description,action:s.action})]})},wR=()=>{const[t,e]=S.useState([]),[n,r]=S.useState(!1),[i,s]=S.useState(null),o=S.useCallback(async l=>{var c;const u=Array.isArray(l)?l:[l];if(console.log(`[ComponentSearch] searchComponents called for ${u.length} element(s)!`,u.map(d=>d==null?void 0:d.tagName)),!l||Array.isArray(l)&&l.length===0){const d={results:[]};return e([]),s(null),d}r(!0),s(null);try{const d=await fetch("/api/search-components",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!d.ok){const m=await d.json();throw new Error(m.error||`HTTP ${d.status}`)}const f=await d.json(),h=((c=f.results[0])==null?void 0:c.matches)||[];e(h);const y=f.results.reduce((m,_)=>m+_.matches.length,0);return console.log(`Found ${y} total component matches across ${f.results.length} element(s)`),f}catch(d){const f=d instanceof Error?d.message:"Component search failed";return s(f),e([]),console.error("Component search error:",d),{results:[]}}finally{r(!1)}},[]),a=S.useCallback(()=>{e([]),s(null)},[]);return{matches:t,isSearching:n,error:i,searchComponents:o,clearSearch:a}},xR=({onElementsSelect:t,isEditMode:e})=>{const n=S.useRef(null);S.useEffect(()=>{const s=o=>{if(!o.origin.includes("localhost")){console.log("[IframeMessaging] Message from non-localhost origin:",o.origin);return}if(console.log("[IframeMessaging] Message received:",o.data.type),o.data.type==="ELEMENT_SELECTED"){const a=o.data.element;console.log("[IframeMessaging] Single element selected:",a.tagName),t==null||t([a])}else if(o.data.type==="BOX_SELECTION_COMPLETE"){const{elements:a}=o.data;console.log("[IframeMessaging] Multi-element selection completed:",a.length,"elements"),t==null||t(a)}else o.data.type==="SCRIPT_INJECTED"?console.log("[IframeMessaging] Selection script loaded"):o.data.type==="CLEAR_SELECTION"&&(console.log("[IframeMessaging] Clearing selection"),t==null||t([]))};return window.addEventListener("message",s),()=>window.removeEventListener("message",s)},[t]);const r=S.useCallback(s=>{if(n.current=s,!s)return;const o=()=>{console.log("[IframeMessaging] Iframe loaded"),i(e||!1)};return s.addEventListener("load",o),()=>s.removeEventListener("load",o)},[e]),i=S.useCallback(s=>{const o=n.current;o&&o.contentWindow?(console.log("[IframeMessaging] Sending TOGGLE_SELECTION:",s),o.contentWindow.postMessage({type:"TOGGLE_SELECTION",enabled:s},"*")):console.log("[IframeMessaging] Cannot send message - iframe not ready")},[]);return{setupIframe:r,sendToggleSelection:i}},SR=({onElementsSelect:t,userPort:e,isLoading:n=!1})=>{const[r,i]=S.useState(!1),{searchComponents:s}=wR(),o=S.useCallback(async c=>{if(c.length===0){t==null||t([]);return}t==null||t(c);try{const d=c.map(y=>({tagName:y.tagName,className:y.className,id:y.id,textContent:y.textContent})),f=await s(d),h=c.map((y,m)=>{const _=f.results[m];if(_&&!_.error&&_.matches.length>0){const p=_.matches[0];return{...y,filePath:p.filePath}}return y});t==null||t(h)}catch(d){console.error("[PreviewFrame] Batch component search failed:",d),t==null||t(c)}},[t,s]),{setupIframe:a,sendToggleSelection:l}=xR({onElementsSelect:o,isEditMode:r});S.useEffect(()=>{l(r)},[r,l]);const u=c=>{i(c)};return P.jsxs("div",{className:"relative w-full h-full",children:[P.jsx(_R,{isEditMode:r,onModeChange:u,isLoading:n}),P.jsx("iframe",{ref:a,src:`http://localhost:${e}`,className:"w-full h-full border-none",title:"Project Preview",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-modals"})]})},ER=({type:t,value:e,onChange:n,disabled:r=!1})=>{const i=s=>{n(s.target.value)};switch(t){case"color":return P.jsxs("div",{className:"w-28 flex items-center space-x-1 px-2 py-1 border border-gray-300 rounded focus-within:ring-1 focus-within:ring-orange-500 focus-within:border-orange-500",children:[P.jsx("input",{type:"color",value:e,onChange:i,disabled:r,className:"border-0 rounded cursor-pointer outline-none flex-shrink-0",style:{width:"16px",height:"16px",padding:"0",margin:"0",border:"none",borderRadius:"2px",WebkitAppearance:"none",MozAppearance:"none",appearance:"none",aspectRatio:"1/1"},title:e}),P.jsx("span",{className:"text-xs font-mono text-gray-700 flex-1 min-w-0 text-center",children:e})]});case"range":return P.jsx("input",{type:"text",value:`${e}%`,onChange:s=>{const o=s.target.value.replace("%","");n(o)},disabled:r,className:"w-28 px-4 py-1 text-xs border border-gray-300 rounded focus:ring-1 focus:ring-orange-500 focus:border-orange-500 text-black text-right",placeholder:"100%"});case"text":case"spacing":default:return P.jsx("input",{type:"text",value:e,onChange:i,disabled:r,className:"w-28 px-4 py-1 text-xs border border-gray-300 rounded focus:ring-1 focus:ring-orange-500 focus:border-orange-500 text-black text-right"})}},$o=xl("useCodeModification"),kR=()=>{const[t,e]=S.useState(!1),[n,r]=S.useState(null),i=S.useCallback(async o=>{e(!0),r(null);try{$o.debug("Making fetch request to /api/modify-code",o);const a=await fetch("/api/modify-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if($o.debug("Response received",{status:a.status,ok:a.ok}),!a.ok){const u=await a.json();throw new Error(u.details||u.error||`HTTP ${a.status}`)}const l=await a.json();return $o.info("Code modification completed:",l.changes),l}catch(a){const l=a instanceof Error?a.message:"Code modification failed";return r(l),$o.error("Code modification error:",a),null}finally{e(!1)}},[]),s=S.useCallback(async(o,a)=>{const u=`Apply these CSS styles: ${Object.entries(a).map(([c,d])=>`${c}: ${d}`).join(", ")}`;return i({instruction:u,elements:[o],temperature:.3})},[i]);return{modifyCode:i,modifyCodeWithCSS:s,isModifying:t,error:n,clearError:()=>r(null)}},rn=xl("ElementInspector"),CR=[{key:"backgroundColor",label:"Background Color",type:"color"},{key:"color",label:"Text Color",type:"color"},{key:"fontSize",label:"Text Size",type:"text"},{key:"opacity",label:"Opacity",type:"range"},{key:"borderColor",label:"Border Color",type:"color"},{key:"borderWidth",label:"Border Width",type:"text"},{key:"borderRadius",label:"Border Radius",type:"text"},{key:"paddingVertical",label:"Padding Vertical",type:"spacing"},{key:"paddingHorizontal",label:"Padding Horizontal",type:"spacing"},{key:"marginVertical",label:"Margin Vertical",type:"spacing",isHidden:!0},{key:"marginHorizontal",label:"Margin Horizontal",type:"spacing",isHidden:!0}],TR={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080"},No=(t,e,n)=>{const r=t[e],i=t[n];return r&&i&&r===i?r:r&&i&&r!==i?`${r}/${i}`:r||i||""},PR=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),im=(t,e)=>t[e]||t[PR(e)]||"",bR=t=>{if(!t||t==="transparent"||t==="inherit"||t==="initial")return"#000000";if(t.startsWith("#"))return t;const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(e){const n=parseInt(e[1]),r=parseInt(e[2]),i=parseInt(e[3]),s=o=>{const a=o.toString(16);return a.length===1?"0"+a:a};return`#${s(n)}${s(r)}${s(i)}`}return TR[t.toLowerCase()]||"#000000"},RR=({selectedElements:t,onClose:e})=>{if(t.length===0)return null;const n=t.length===1,r=t[0];return P.jsxs("div",{className:"w-80 bg-white border-l border-gray-200 overflow-y-auto",children:[P.jsxs("div",{className:"p-4 border-b border-gray-200",children:[P.jsxs("div",{className:"flex items-center justify-between mb-2",children:[P.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Element"}),P.jsx("button",{onClick:e,className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),P.jsx("div",{className:"text-sm text-gray-600",children:n?P.jsxs(P.Fragment,{children:["Selected:"," ",P.jsxs("span",{className:"font-mono text-orange-600",children:[r.tagName,r.className&&`.${r.className.split(" ")[0]}`,r.id&&`#${r.id}`]})]}):P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"font-medium mb-2",children:["Selected ",t.length," elements:"]}),P.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:t.map((i,s)=>P.jsxs("div",{className:"text-xs",children:[P.jsxs("span",{className:"font-mono text-orange-600",children:[i.tagName,i.className&&`.${i.className.split(" ")[0]}`,i.id&&`#${i.id}`]}),i.filePath&&P.jsxs("span",{className:"text-gray-500 ml-1",children:["in ",i.filePath.split("/").pop()]})]},`${i.xpath}-${s}`))})]})})]}),P.jsx("div",{className:"p-4 space-y-4",children:P.jsx(AR,{selectedElements:t})})]})},AR=({selectedElements:t})=>{const e=t[0],n=t.length>1,[r,i]=S.useState({}),[s,o]=S.useState(""),[a,l]=S.useState({isOpen:!1,type:"success",title:"",description:"",onOpenChange:()=>{}}),{modifyCode:u,modifyCodeWithCSS:c,isModifying:d}=kR();rn.debug("selectedElement:",e);const f=t.every(w=>!!w.filePath),h=w=>{const{computedStyles:E}=e;switch(w){case"paddingVertical":return No(E,"padding-top","padding-bottom");case"paddingHorizontal":return No(E,"padding-left","padding-right");case"marginVertical":return No(E,"margin-top","margin-bottom");case"marginHorizontal":return No(E,"margin-left","margin-right");case"opacity":return im(E,"opacity")||"1";case"borderColor":return E["border-color"]||E["border-top-color"]||E["border-right-color"]||E["border-bottom-color"]||E["border-left-color"]||"";case"borderWidth":return E["border-width"]||E["border-top-width"]||E["border-right-width"]||E["border-bottom-width"]||E["border-left-width"]||"";case"borderRadius":return E["border-radius"]||E["border-top-left-radius"]||"";default:const k=im(E,w);return["color","backgroundColor","borderColor"].includes(w)&&k?bR(k):k}},y=w=>r[w]??h(w),m=(w,E)=>{i(k=>({...k,[w]:E}))},_=(w,E)=>{const C={paddingVertical:["paddingTop","paddingBottom"],paddingHorizontal:["paddingLeft","paddingRight"],marginVertical:["marginTop","marginBottom"],marginHorizontal:["marginLeft","marginRight"]}[w];C&&i($=>{const M={...$};return C.forEach(O=>{M[O]=E}),M})},p=w=>{const E=y(w),k=parseFloat(E??"");return isNaN(k)?100:Math.round(k*100)},g=(w,E)=>{const k=E.replace("%","").trim(),C=parseFloat(k);if(!isNaN(C)){const M=(Math.max(0,Math.min(100,C))/100).toString();m(w,M)}},v=async()=>{if(Object.keys(r).length!==0){if(!e.filePath){rn.error("Please find the component file first using the search functionality.");return}try{const w=await c(e,r);w?(rn.info("CSS changes applied successfully:",w.changes),i({})):l({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:"An error occurred while applying the style changes.",onOpenChange:E=>l(k=>({...k,isOpen:E}))})}catch(w){rn.error("Error applying CSS changes:",w),l({isOpen:!0,type:"error",title:"Failed to apply CSS changes",description:w instanceof Error?w.message:"An unexpected error occurred.",onOpenChange:E=>l(k=>({...k,isOpen:E}))})}}},x=async()=>{var E;if(rn.debug("applyLlmChange called",{instruction:s,isMultiElement:n,elementCount:t.length,isModifying:d}),!s.trim()){rn.debug("No instruction provided");return}if(t.filter(k=>!k.filePath).length>0){rn.debug("Some elements missing filePath");return}try{const k=await u({instruction:s,elements:t,temperature:.7});if(k)rn.info("LLM changes applied successfully:",k),o(""),l({isOpen:!0,type:"success",title:n?"Multi-element changes applied!":"Changes applied!",description:n?`Modified ${((E=k.filesModified)==null?void 0:E.length)||0} files with ${k.totalElements} elements.`:k.changes,onOpenChange:C=>l($=>({...$,isOpen:C}))});else throw new Error("No result returned from modification")}catch(k){rn.error("Error applying LLM changes:",k),l({isOpen:!0,type:"error",title:"Failed to apply AI changes",description:k instanceof Error?k.message:"An unexpected error occurred.",onOpenChange:C=>l($=>({...$,isOpen:C}))})}};return P.jsxs("div",{className:"space-y-8",children:[P.jsxs("div",{className:"space-y-3",children:[P.jsxs("div",{className:"flex items-center space-x-2",children:[P.jsx(hb,{className:"w-4 h-4 text-gray-500"}),P.jsx("h5",{className:"text-sm font-medium text-gray-700",children:n?"Change multiple elements":"Change an element"})]}),P.jsx("textarea",{value:s,onChange:w=>o(w.target.value),placeholder:"Describe the changes you'd like to make",className:"w-full px-3 py-2 text-sm border border-gray-300 focus:ring-1 focus:ring-orange-500 focus:border-orange-500 resize-none text-black rounded-lg",rows:4}),P.jsxs("button",{onClick:x,disabled:s.trim()===""||d||!f,className:"w-full bg-orange-500 text-white px-3 py-2 rounded text-sm shadow-lg shadow-orange-400/60 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center gap-2",children:[d&&P.jsx(Jg,{className:"w-4 h-4 animate-spin"}),d?"Applying AI Changes...":"Apply AI Changes"]})]}),P.jsxs("div",{className:"space-y-3",children:[P.jsxs("div",{className:"flex items-center space-x-2",children:[P.jsx(ub,{className:"w-4 h-4 text-gray-500"}),P.jsx("h5",{className:"text-sm font-medium text-gray-700",children:"Style Properties"})]}),CR.filter(({isHidden:w})=>!w).map(({key:w,label:E,type:k})=>P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx("label",{className:"text-xs text-gray-600 flex-1",children:E}),P.jsx(ER,{type:k,value:k==="range"?p(w):y(w),onChange:C=>{k==="spacing"?_(w,C):k==="range"?g(w,C+"%"):m(w,C)}})]},w)),P.jsxs("button",{onClick:v,disabled:Object.keys(r).length===0||d||!f,className:"w-full bg-orange-500 text-white px-3 py-2 rounded text-sm shadow-lg shadow-orange-400/60 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 flex items-center justify-center gap-2",children:[d?P.jsx(Jg,{className:"w-4 h-4 animate-spin"}):null,d?"Applying Style Changes...":"Apply Style Changes"]})]}),f?null:P.jsx("div",{className:"p-3 text-xs rounded border border-yellow-200 bg-yellow-50 text-yellow-800",children:n?"Cannot modify - component files not found for some elements.":"Cannot modify - no component file found."}),P.jsx(Pw,{children:P.jsx(Tw,{isOpen:a.isOpen,onOpenChange:a.onOpenChange,type:a.type,title:a.title,description:a.description})})]})},MR=xl("useServerConfig"),IR=()=>{const[t,e]=S.useState({userPort:3e3}),[n,r]=S.useState(!1),[i,s]=S.useState(null),o=S.useCallback(async()=>{try{r(!0),s(null);const a=await fetch("/api/config");if(!a.ok)throw new Error(`Failed to fetch config: ${a.status}`);const l=await a.json();return e(l),l}catch(a){const l=a instanceof Error?a.message:"Failed to fetch server config";throw s(l),MR.error("Error fetching server config:",a),a}finally{r(!1)}},[]);return{config:t,fetchConfig:o,isLoading:n,error:i}},LR=()=>{const[t,e]=S.useState([]),{config:n,fetchConfig:r}=IR();S.useEffect(()=>{r().catch(console.error)},[r]);const i=S.useCallback(o=>{e(o)},[]),s=()=>{e([])};return P.jsxs(tw.div,{className:"h-screen flex bg-gray-50",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},children:[P.jsx("div",{className:"flex-1 flex flex-col relative",children:P.jsx(SR,{onElementsSelect:i,userPort:n.userPort})}),P.jsx(RR,{selectedElements:t,onClose:s})]})};var T=typeof window<"u"?window:void 0,st=typeof globalThis<"u"?globalThis:T,bw=Array.prototype,sm=bw.forEach,om=bw.indexOf,ht=st==null?void 0:st.navigator,N=st==null?void 0:st.document,nt=st==null?void 0:st.location,id=st==null?void 0:st.fetch,sd=st!=null&&st.XMLHttpRequest&&"withCredentials"in new st.XMLHttpRequest?st.XMLHttpRequest:void 0,am=st==null?void 0:st.AbortController,et=ht==null?void 0:ht.userAgent,B=T??{},dn={DEBUG:!1,LIB_VERSION:"1.266.0"};function I(){return I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},I.apply(null,arguments)}function Rw(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var $R=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function W(t,e){return t.indexOf(e)!==-1}var El=function(t){return t.trim()},od=function(t){return t.replace(/^\$/,"")},NR=Array.isArray,Aw=Object.prototype,Mw=Aw.hasOwnProperty,kl=Aw.toString,ie=NR||function(t){return kl.call(t)==="[object Array]"},Tt=t=>typeof t=="function",ye=t=>t===Object(t)&&!ie(t),ni=t=>{if(ye(t)){for(var e in t)if(Mw.call(t,e))return!1;return!0}return!1},A=t=>t===void 0,_e=t=>kl.call(t)=="[object String]",ad=t=>_e(t)&&t.trim().length===0,nr=t=>t===null,X=t=>A(t)||nr(t),Ue=t=>kl.call(t)=="[object Number]",Kt=t=>kl.call(t)==="[object Boolean]",DR=t=>t instanceof FormData,FR=t=>W($R,t),OR=[!0,"true",1,"1","yes"],wu=t=>W(OR,t),jR=[!1,"false",0,"0","no"];function pt(t,e,n,r,i){return e>n&&(r.warn("min cannot be greater than max."),e=n),Ue(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t<e?(r.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),pt(i||n,e,n,r))}class Iw{stop(){this.t&&(clearInterval(this.t),this.t=void 0)}constructor(e){this.i=e,this.o={},this.h=()=>{Object.keys(this.o).forEach(n=>{var r=this.m(n)+this.S;r>=this.$?delete this.o[n]:this.k(n,r)})},this.m=n=>this.o[String(n)],this.k=(n,r)=>{this.o[String(n)]=r},this.consumeRateLimit=n=>{var r,i=(r=this.m(n))!=null?r:this.$;if((i=Math.max(i-1,0))===0)return!0;this.k(n,i);var s,o=i===0;return o&&((s=this.I)==null||s.call(this,n)),o},this.I=this.i.I,this.$=pt(this.i.bucketSize,0,100,this.i.P),this.S=pt(this.i.refillRate,0,this.$,this.i.P),this.R=pt(this.i.refillInterval,0,864e5,this.i.P),this.t=setInterval(()=>{this.h()},this.R)}}var Lw=t=>{var e={T:function(n){if(T&&(dn.DEBUG||B.POSTHOG_DEBUG)&&!A(T.console)&&T.console){for(var r=("__rrweb_original__"in T.console[n])?T.console[n].__rrweb_original__:T.console[n],i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];r(t,...s)}},info:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("log",...r)},warn:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("warn",...r)},error:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.T("error",...r)},critical:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning:n=>{e.error("You must initialize PostHog before calling "+n)},createLogger:n=>Lw(t+" "+n)};return e},L=Lw("[PostHog.js]"),Re=L.createLogger,VR=Re("[ExternalScriptsLoader]"),lm=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return VR.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=N==null?void 0:N.querySelectorAll("script");if(r){for(var i,s=function(){if(r[o].src===e){var l=r[o];return l.__posthog_loading_callback_fired?{v:n()}:(l.addEventListener("load",u=>{l.__posthog_loading_callback_fired=!0,n(void 0,u)}),l.onerror=u=>n(u),{v:void 0})}},o=0;o<r.length;o++)if(i=s())return i.v}var a=()=>{if(!N)return n("document not found");var l=N.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=d=>{l.__posthog_loading_callback_fired=!0,n(void 0,d)},l.onerror=d=>n(d),t.config.prepare_external_dependency_script&&(l=t.config.prepare_external_dependency_script(l)),!l)return n("prepare_external_dependency_script returned null");var u,c=N.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(l,c[0]):N.body.appendChild(l)};N!=null&&N.body?a():N==null||N.addEventListener("DOMContentLoaded",a)};B.__PosthogExtensions__=B.__PosthogExtensions__||{},B.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{var r="/static/"+e+".js?v="+t.version;if(e==="remote-config"&&(r="/array/"+t.config.token+"/config.js"),e==="toolbar"){var i=3e5;r=r+"&t="+Math.floor(Date.now()/i)*i}var s=t.requestRouter.endpointFor("assets",r);lm(t,s,n)},B.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);lm(t,r,n)};var Va={};function Wn(t,e,n){if(ie(t)){if(sm&&t.forEach===sm)t.forEach(e,n);else if("length"in t&&t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===Va)return}}}function J(t,e,n){if(!X(t)){if(ie(t))return Wn(t,e,n);if(DR(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===Va)return}else for(var i in t)if(Mw.call(t,i)&&e.call(n,t[i],i)===Va)return}}var xe=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Wn(n,function(i){for(var s in i)i[s]!==void 0&&(t[s]=i[s])}),t},Cl=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return Wn(n,function(i){Wn(i,function(s){t.push(s)})}),t};function la(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}var um=function(t){try{return t()}catch{return}},BR=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.apply(this,n)}catch(i){L.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),L.critical(i)}}},hh=function(t){var e={};return J(t,function(n,r){(_e(n)&&n.length>0||Ue(n))&&(e[r]=n)}),e};function zR(t,e){return n=t,r=s=>_e(s)&&!nr(e)?s.slice(0,e):s,i=new Set,function s(o,a){return o!==Object(o)?r?r(o,a):o:i.has(o)?void 0:(i.add(o),ie(o)?(l=[],Wn(o,u=>{l.push(s(u))})):(l={},J(o,(u,c)=>{i.has(u)||(l[c]=s(u,c))})),l);var l}(n);var n,r,i}var UR=["herokuapp.com","vercel.app","netlify.app"];function HR(t){var e=t==null?void 0:t.hostname;if(!_e(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of UR)if(n===r)return!1;return!0}function $w(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n]}function fe(t,e,n,r){var{capture:i=!1,passive:s=!0}=r??{};t==null||t.addEventListener(e,n,{capture:i,passive:s})}var Nw="$people_distinct_id",ts="__alias",ns="__timers",cm="$autocapture_disabled_server_side",ld="$heatmaps_enabled_server_side",dm="$exception_capture_enabled_server_side",ud="$error_tracking_suppression_rules",fm="$error_tracking_capture_extension_exceptions",hm="$web_vitals_enabled_server_side",Dw="$dead_clicks_enabled_server_side",pm="$web_vitals_allowed_metrics",Xs="$session_recording_enabled_server_side",gm="$console_log_recording_enabled_server_side",mm="$session_recording_network_payload_capture",vm="$session_recording_masking",ym="$session_recording_canvas_recording",_m="$replay_sample_rate",wm="$replay_minimum_duration",Ba="$replay_script_config",za="$sesid",rs="$session_is_sampled",cd="$session_recording_url_trigger_activated_session",dd="$session_recording_event_trigger_activated_session",ri="$enabled_feature_flags",is="$early_access_features",fd="$feature_flag_details",ss="$stored_person_properties",dr="$stored_group_properties",hd="$surveys",Do="$surveys_activated",Ua="$flag_call_reported",an="$user_state",pd="$client_session_props",gd="$capture_rate_limit",md="$initial_campaign_params",vd="$initial_referrer_info",Ha="$initial_person_info",Wa="$epp",Fw="__POSTHOG_TOOLBAR__",Hi="$posthog_cookieless",WR=[Nw,ts,"__cmpns",ns,Xs,ld,za,ri,ud,an,is,fd,dr,ss,hd,Ua,pd,gd,md,vd,Wa,Ha];function xm(t){return t instanceof Element&&(t.id===Fw||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function Tl(t){return!!t&&t.nodeType===1}function Kn(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function Ow(t){return!!t&&t.nodeType===3}function jw(t){return!!t&&t.nodeType===11}function ph(t){return t?El(t).split(/\s+/):[]}function Sm(t){var e=T==null?void 0:T.location.href;return!!(e&&t&&t.some(n=>e.match(n)))}function Ka(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return ph(e)}function Vw(t){return X(t)?null:El(t).split(/(\s+)/).filter(e=>Ei(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Pl(t){var e="";return _d(t)&&!Uw(t)&&t.childNodes&&t.childNodes.length&&J(t.childNodes,function(n){var r;Ow(n)&&n.textContent&&(e+=(r=Vw(n.textContent))!==null&&r!==void 0?r:"")}),El(e)}function Bw(t){return A(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var yd=["a","button","form","input","select","textarea","label"];function zw(t){var e=t.parentNode;return!(!e||!Tl(e))&&e}function KR(t,e,n,r,i){var s,o,a;if(n===void 0&&(n=void 0),!T||!t||Kn(t,"html")||!Tl(t)||(s=n)!=null&&s.url_allowlist&&!Sm(n.url_allowlist)||(o=n)!=null&&o.url_ignorelist&&Sm(n.url_ignorelist))return!1;if((a=n)!=null&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some(_=>e.type===_))return!1}for(var u=!1,c=[t],d=!0,f=t;f.parentNode&&!Kn(f,"body");)if(jw(f.parentNode))c.push(f.parentNode.host),f=f.parentNode.host;else{if(!(d=zw(f)))break;if(r||yd.indexOf(d.tagName.toLowerCase())>-1)u=!0;else{var h=T.getComputedStyle(d);h&&h.getPropertyValue("cursor")==="pointer"&&(u=!0)}c.push(d),f=d}if(!function(_,p){var g=p==null?void 0:p.element_allowlist;if(A(g))return!0;var v,x=function(E){if(g.some(k=>E.tagName.toLowerCase()===k))return{v:!0}};for(var w of _)if(v=x(w))return v.v;return!1}(c,n)||!function(_,p){var g=p==null?void 0:p.css_selector_allowlist;if(A(g))return!0;var v,x=function(E){if(g.some(k=>E.matches(k)))return{v:!0}};for(var w of _)if(v=x(w))return v.v;return!1}(c,n))return!1;var y=T.getComputedStyle(t);if(y&&y.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var m=t.tagName.toLowerCase();switch(m){case"html":return!1;case"form":return(i||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(e.type)>=0;default:return u?(i||["click"]).indexOf(e.type)>=0:(i||["click"]).indexOf(e.type)>=0&&(yd.indexOf(m)>-1||t.getAttribute("contenteditable")==="true")}}function _d(t){for(var e=t;e.parentNode&&!Kn(e,"body");e=e.parentNode){var n=Ka(e);if(W(n,"ph-sensitive")||W(n,"ph-no-capture"))return!1}if(W(Ka(t),"ph-include"))return!0;var r=t.type||"";if(_e(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";return!(_e(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function Uw(t){return!!(Kn(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Kn(t,"select")||Kn(t,"textarea")||t.getAttribute("contenteditable")==="true")}var Hw="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",GR=new RegExp("^(?:"+Hw+")$"),YR=new RegExp(Hw),Ww="\\d{3}-?\\d{2}-?\\d{4}",qR=new RegExp("^("+Ww+")$"),XR=new RegExp("("+Ww+")");function Ei(t,e){return e===void 0&&(e=!0),!(X(t)||_e(t)&&(t=El(t),(e?GR:YR).test((t||"").replace(/[- ]/g,""))||(e?qR:XR).test(t)))}function Kw(t){var e=Pl(t);return Ei(e=(e+" "+Gw(t)).trim())?e:""}function Gw(t){var e="";return t&&t.childNodes&&t.childNodes.length&&J(t.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var i=Pl(n);e=(e+" "+i).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+Gw(n)).trim())}catch(s){L.error("[AutoCapture]",s)}}),e}function QR(t){return function(e){var n=e.map(r=>{var i,s,o="";if(r.tag_name&&(o+=r.tag_name),r.attr_class)for(var a of(r.attr_class.sort(),r.attr_class))o+="."+a.replace(/"/g,"");var l=I({},r.text?{text:r.text}:{},{"nth-child":(i=r.nth_child)!==null&&i!==void 0?i:0,"nth-of-type":(s=r.nth_of_type)!==null&&s!==void 0?s:0},r.href?{href:r.href}:{},r.attr_id?{attr_id:r.attr_id}:{},r.attributes),u={};return la(l).sort((c,d)=>{var[f]=c,[h]=d;return f.localeCompare(h)}).forEach(c=>{var[d,f]=c;return u[Em(d.toString())]=Em(f.toString())}),o+=":",o+=la(u).map(c=>{var[d,f]=c;return d+'="'+f+'"'}).join("")});return n.join(";")}(function(e){return e.map(n=>{var r,i,s={text:(r=n.$el_text)==null?void 0:r.slice(0,400),tag_name:n.tag_name,href:(i=n.attr__href)==null?void 0:i.slice(0,2048),attr_class:ZR(n),attr_id:n.attr__id,nth_child:n.nth_child,nth_of_type:n.nth_of_type,attributes:{}};return la(n).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return s.attributes[a]=l}),s})}(t))}function Em(t){return t.replace(/"|\\"/g,'\\"')}function ZR(t){var e=t.attr__class;return e?ie(e)?e:ph(e):void 0}class Yw{constructor(){this.clicks=[]}isRageClick(e,n,r){var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(e-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var xu="$copy_autocapture",fn=function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),JR=["fatal","error","warning","log","info","debug"],eA=["localhost","127.0.0.1"],ki=t=>{var e=N==null?void 0:N.createElement("a");return A(e)?null:(e.href=t,e)},tA=function(t,e){var n,r;e===void 0&&(e="&");var i=[];return J(t,function(s,o){A(s)||A(o)||o==="undefined"||(n=encodeURIComponent((a=>a instanceof File)(s)?s.name:s.toString()),r=encodeURIComponent(o),i[i.length]=r+"="+n)}),i.join(e)},Ga=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===e){n=s;break}}if(!ie(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{L.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},gh=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),i=r[0]||"",s=r[1],o=i.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),c=[],d=0;d<u.length;d++){var f=u[d].split("=");ie(f)&&(e.includes(f[0])?c.push(f[0]+"="+n):c.push(u[d]))}var h=l;return a!=null&&(h+="?"+c.join("&")),s!=null&&(h+="#"+s),h},Ya=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},km=Re("[AutoCapture]");function Su(t,e){return e.length>t?e.slice(0,t)+"...":e}function nA(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!Tl(e));return e}function rA(t,e,n,r){var i=t.tagName.toLowerCase(),s={tag_name:i};yd.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=Su(1024,Kw(t)):s.$el_text=Su(1024,Pl(t)));var o=Ka(t);o.length>0&&(s.classes=o.filter(function(c){return c!==""})),J(t.attributes,function(c){var d;if((!Uw(t)||["name","id","class","aria-label"].indexOf(c.name)!==-1)&&(r==null||!r.includes(c.name))&&!e&&Ei(c.value)&&(d=c.name,!_e(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var f=c.value;c.name==="class"&&(f=ph(f).join(" ")),s["attr__"+c.name]=Su(1024,f)}});for(var a=1,l=1,u=t;u=nA(u);)a++,u.tagName===t.tagName&&l++;return s.nth_child=a,s.nth_of_type=l,s}function iA(t,e){for(var n,r,{e:i,maskAllElementAttributes:s,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=e,u=[t],c=t;c.parentNode&&!Kn(c,"body");)jw(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var d,f=[],h={},y=!1,m=!1;if(J(u,x=>{var w=_d(x);x.tagName.toLowerCase()==="a"&&(y=x.getAttribute("href"),y=w&&y&&Ei(y)&&y),W(Ka(x),"ph-no-capture")&&(m=!0),f.push(rA(x,s,o,a));var E=function(k){if(!_d(k))return{};var C={};return J(k.attributes,function($){if($.name&&$.name.indexOf("data-ph-capture-attribute")===0){var M=$.name.replace("data-ph-capture-attribute-",""),O=$.value;M&&O&&Ei(O)&&(C[M]=O)}}),C}(x);xe(h,E)}),m)return{props:{},explicitNoCapture:m};if(o||(t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?f[0].$el_text=Kw(t):f[0].$el_text=Pl(t)),y){var _,p;f[0].attr__href=y;var g=(_=ki(y))==null?void 0:_.host,v=T==null||(p=T.location)==null?void 0:p.host;g&&v&&g!==v&&(d=y)}return{props:xe({$event_type:i.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:QR(f)},(n=f[0])!=null&&n.$el_text?{$el_text:(r=f[0])==null?void 0:r.$el_text}:{},d&&i.type==="click"?{$external_click_url:d}:{},h)}}class sA{constructor(e){this.C=!1,this.M=null,this.rageclicks=new Yw,this.O=!1,this.instance=e,this.F=null}get A(){var e,n,r=ye(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(e=r.url_allowlist)==null?void 0:e.map(i=>new RegExp(i)),r.url_ignorelist=(n=r.url_ignorelist)==null?void 0:n.map(i=>new RegExp(i)),r}D(){if(this.isBrowserSupported()){if(T&&N){var e=r=>{r=r||(T==null?void 0:T.event);try{this.j(r)}catch(i){km.error("Failed to capture event",i)}};if(fe(N,"submit",e,{capture:!0}),fe(N,"change",e,{capture:!0}),fe(N,"click",e,{capture:!0}),this.A.capture_copied_text){var n=r=>{r=r||(T==null?void 0:T.event),this.j(r,xu)};fe(N,"copy",n,{capture:!0}),fe(N,"cut",n,{capture:!0})}}}else km.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.C&&(this.D(),this.C=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.O=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[cm]:!!e.autocapture_opt_out}),this.M=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.F=e}getElementSelectors(e){var n,r=[];return(n=this.F)==null||n.forEach(i=>{var s=N==null?void 0:N.querySelectorAll(i);s==null||s.forEach(o=>{e===o&&r.push(i)})}),r}get isEnabled(){var e,n,r=(e=this.instance.persistence)==null?void 0:e.props[cm],i=this.M;if(nr(i)&&!Kt(r)&&!this.instance.L())return!1;var s=(n=this.M)!==null&&n!==void 0?n:!!r;return!!this.instance.config.autocapture&&!s}j(e,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r,i=Bw(e);Ow(i)&&(i=i.parentNode||null),n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.j(e,"$rageclick");var s=n===xu;if(i&&KR(i,e,this.A,s,s?["copy","cut"]:void 0)){var{props:o,explicitNoCapture:a}=iA(i,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.A.element_attribute_ignorelist,elementsChainAsString:this.O});if(a)return!1;var l=this.getElementSelectors(i);if(l&&l.length>0&&(o.$element_selectors=l),n===xu){var u,c=Vw(T==null||(u=T.getSelection())==null?void 0:u.toString()),d=e.type||"clipboard";if(!c)return!1;o.$selected_content=c,o.$copy_type=d}return this.instance.capture(n,o),!0}}}isBrowserSupported(){return Tt(N==null?void 0:N.querySelectorAll)}}Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Ue(t)&&isFinite(t)&&Math.floor(t)===t});var Cm="0123456789abcdef";class qa{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,i){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||e<0||n<0||r<0||i<0||e>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new qa(s)}toString(){for(var e="",n=0;n<this.bytes.length;n++)e=e+Cm.charAt(this.bytes[n]>>>4)+Cm.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new qa(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;n<16;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class oA{constructor(){this.N=0,this.U=0,this.q=new aA}generate(){var e=this.generateOrAbort();if(A(e)){this.N=0;var n=this.generateOrAbort();if(A(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.N)this.N=e,this.B();else{if(!(e+1e4>this.N))return;this.U++,this.U>4398046511103&&(this.N++,this.B())}return qa.fromFieldsV7(this.N,Math.trunc(this.U/Math.pow(2,30)),this.U&Math.pow(2,30)-1,this.q.nextUint32())}B(){this.U=1024*this.q.nextUint32()+(1023&this.q.nextUint32())}}var Tm,qw=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};T&&!A(T.crypto)&&crypto.getRandomValues&&(qw=t=>crypto.getRandomValues(t));class aA{constructor(){this.H=new Uint32Array(8),this.W=1/0}nextUint32(){return this.W>=this.H.length&&(qw(this.H),this.W=0),this.H[this.W++]}}var Dn=()=>lA().toString(),lA=()=>(Tm||(Tm=new oA)).generate(),Wi="",uA=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function cA(t,e){if(e){var n=function(i,s){if(s===void 0&&(s=N),Wi)return Wi;if(!s||["localhost","127.0.0.1"].includes(i))return"";for(var o=i.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Dn();!Wi&&a--;){var u=o.slice(a).join("."),c=l+"=1;domain=."+u+";path=/";s.cookie=c+";max-age=3",s.cookie.includes(l)&&(s.cookie=c+";max-age=0",Wi=u)}return Wi}(t);if(!n){var r=(i=>{var s=i.match(uA);return s?s[0]:""})(t);r!==n&&L.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}var Jt={G:()=>!!N,J:function(t){L.error("cookieStore error: "+t)},V:function(t){if(N){try{for(var e=t+"=",n=N.cookie.split(";").filter(s=>s.length),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return decodeURIComponent(i.substring(e.length,i.length))}}catch{}return null}},K:function(t){var e;try{e=JSON.parse(Jt.V(t))||{}}catch{}return e},Y:function(t,e,n,r,i){if(N)try{var s="",o="",a=cA(N.location.hostname,r);if(n){var l=new Date;l.setTime(l.getTime()+24*n*60*60*1e3),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&L.warn("cookieStore warning: large cookie, len="+u.length),N.cookie=u,u}catch{return}},X:function(t,e){if(N!=null&&N.cookie)try{Jt.Y(t,"",-1,e)}catch{return}}},Eu=null,Pe={G:function(){if(!nr(Eu))return Eu;var t=!0;if(A(T))t=!1;else try{var e="__mplssupport__";Pe.Y(e,"xyz"),Pe.V(e)!=='"xyz"'&&(t=!1),Pe.X(e)}catch{t=!1}return t||L.error("localStorage unsupported; falling back to cookie store"),Eu=t,t},J:function(t){L.error("localStorage error: "+t)},V:function(t){try{return T==null?void 0:T.localStorage.getItem(t)}catch(e){Pe.J(e)}return null},K:function(t){try{return JSON.parse(Pe.V(t))||{}}catch{}return null},Y:function(t,e){try{T==null||T.localStorage.setItem(t,JSON.stringify(e))}catch(n){Pe.J(n)}},X:function(t){try{T==null||T.localStorage.removeItem(t)}catch(e){Pe.J(e)}}},dA=["distinct_id",za,rs,Wa,Ha],Fo=I({},Pe,{K:function(t){try{var e={};try{e=Jt.K(t)||{}}catch{}var n=xe(e,JSON.parse(Pe.V(t)||"{}"));return Pe.Y(t,n),n}catch{}return null},Y:function(t,e,n,r,i,s){try{Pe.Y(t,e,void 0,void 0,s);var o={};dA.forEach(a=>{e[a]&&(o[a]=e[a])}),Object.keys(o).length&&Jt.Y(t,o,n,r,i,s)}catch(a){Pe.J(a)}},X:function(t,e){try{T==null||T.localStorage.removeItem(t),Jt.X(t,e)}catch(n){Pe.J(n)}}}),Oo={},fA={G:function(){return!0},J:function(t){L.error("memoryStorage error: "+t)},V:function(t){return Oo[t]||null},K:function(t){return Oo[t]||null},Y:function(t,e){Oo[t]=e},X:function(t){delete Oo[t]}},ir=null,Ne={G:function(){if(!nr(ir))return ir;if(ir=!0,A(T))ir=!1;else try{var t="__support__";Ne.Y(t,"xyz"),Ne.V(t)!=='"xyz"'&&(ir=!1),Ne.X(t)}catch{ir=!1}return ir},J:function(t){L.error("sessionStorage error: ",t)},V:function(t){try{return T==null?void 0:T.sessionStorage.getItem(t)}catch(e){Ne.J(e)}return null},K:function(t){try{return JSON.parse(Ne.V(t))||null}catch{}return null},Y:function(t,e){try{T==null||T.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){Ne.J(n)}},X:function(t){try{T==null||T.sessionStorage.removeItem(t)}catch(e){Ne.J(e)}}},ln=function(t){return t[t.PENDING=-1]="PENDING",t[t.DENIED=0]="DENIED",t[t.GRANTED=1]="GRANTED",t}({});class hA{constructor(e){this._instance=e}get A(){return this._instance.config}get consent(){return this.Z()?ln.DENIED:this.tt}isOptedOut(){return this.A.cookieless_mode==="always"||this.consent===ln.DENIED||this.consent===ln.PENDING&&(this.A.opt_out_capturing_by_default||this.A.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===ln.DENIED}optInOut(e){this.it.Y(this.et,e?1:0,this.A.cookie_expiration,this.A.cross_subdomain_cookie,this.A.secure_cookie)}reset(){this.it.X(this.et,this.A.cross_subdomain_cookie)}get et(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+e:"__ph_opt_in_out_"+e)}get tt(){var e=this.it.V(this.et);return wu(e)?ln.GRANTED:W(jR,e)?ln.DENIED:ln.PENDING}get it(){if(!this.rt){var e=this.A.opt_out_capturing_persistence_type;this.rt=e==="localStorage"?Pe:Jt;var n=e==="localStorage"?Jt:Pe;n.V(this.et)&&(this.rt.V(this.et)||this.optInOut(wu(n.V(this.et))),n.X(this.et,this.A.cross_subdomain_cookie))}return this.rt}Z(){return!!this.A.respect_dnt&&!!$w([ht==null?void 0:ht.doNotTrack,ht==null?void 0:ht.msDoNotTrack,B.doNotTrack],e=>wu(e))}}var jo=Re("[Dead Clicks]"),pA=()=>!0,gA=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(Dw)),r=t.instance.config.capture_dead_clicks;return Kt(r)?r:n};class Xw{get lazyLoadedDeadClicksAutocapture(){return this.st}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[Dw]:e==null?void 0:e.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.nt(()=>{this.ot()})}nt(e){var n,r;(n=B.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&e(),(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",i=>{i?jo.error("failed to load script",i):e()})}ot(){var e;if(N){if(!this.st&&(e=B.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=ye(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.st=B.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.st.start(N),jo.info("starting...")}}else jo.error("`document` not found. Cannot start.")}stop(){this.st&&(this.st.stop(),this.st=void 0,jo.info("stopping..."))}}var Ki=Re("[ExceptionAutocapture]");class mA{constructor(e){var n,r,i;this.lt=()=>{var s;if(T&&this.isEnabled&&(s=B.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var o=B.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=B.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=B.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ht&&this.A.capture_unhandled_errors&&(this.ht=o(this.captureException.bind(this))),!this.ut&&this.A.capture_unhandled_rejections&&(this.ut=a(this.captureException.bind(this))),!this.dt&&this.A.capture_console_errors&&(this.dt=l(this.captureException.bind(this)))}catch(u){Ki.error("failed to start",u),this.vt()}}},this._instance=e,this.ct=!((n=this._instance.persistence)==null||!n.props[dm]),this.A=this.ft(),this.gt=new Iw({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10,refillInterval:1e4,P:Ki}),this.startIfEnabled()}ft(){var e=this._instance.config.capture_exceptions,n={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return ye(e)?n=I({},n,e):(A(e)?this.ct:e)&&(n=I({},n,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),n}get isEnabled(){return this.A.capture_console_errors||this.A.capture_unhandled_errors||this.A.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(Ki.info("enabled"),this.nt(this.lt))}nt(e){var n,r;(n=B.__PosthogExtensions__)!=null&&n.errorWrappingFunctions&&e(),(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",i=>{if(i)return Ki.error("failed to load script",i);e()})}vt(){var e,n,r;(e=this.ht)==null||e.call(this),this.ht=void 0,(n=this.ut)==null||n.call(this),this.ut=void 0,(r=this.dt)==null||r.call(this),this.dt=void 0}onRemoteConfig(e){var n=e.autocaptureExceptions;this.ct=!!n||!1,this.A=this.ft(),this._instance.persistence&&this._instance.persistence.register({[dm]:this.ct}),this.startIfEnabled()}captureException(e){var n,r=this._instance.requestRouter.endpointFor("ui");e.$exception_personURL=r+"/project/"+this._instance.config.token+"/person/"+this._instance.get_distinct_id();var i=(n=e.$exception_list[0].type)!==null&&n!==void 0?n:"Exception";this.gt.consumeRateLimit(i)?Ki.info("Skipping exception capture because of client rate limiting.",{exception:e.$exception_list[0].type}):this._instance.exceptions.sendExceptionEvent(e)}}function Qw(t){return!A(Event)&&Zw(t,Event)}function Zw(t,e){try{return t instanceof e}catch{return!1}}function Jw(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return Zw(t,Error)}}function ua(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function ku(t){return ua(t,"DOMError")}var Pm=/\(error: (.*)\)/,bm=50,ii="?";function Cu(t,e,n,r){var i={platform:"web:javascript",filename:t,function:e==="<anonymous>"?ii:e,in_app:!0};return A(n)||(i.lineno=n),A(r)||(i.colno=r),i}var vA=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,yA=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_A=/\((\S*)(?::(\d+))(?::(\d+))\)/,wA=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xA=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,SA=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.sort((i,s)=>i[0]-s[0]).map(i=>i[1]);return function(i,s){s===void 0&&(s=0);for(var o=[],a=i.split(`
106
+ `),l=s;l<a.length;l++){var u=a[l];if(!(u.length>1024)){var c=Pm.test(u)?u.replace(Pm,"$1"):u;if(!c.match(/\S*Error: /)){for(var d of r){var f=d(c);if(f){o.push(f);break}}if(o.length>=bm)break}}}return function(h){if(!h.length)return[];var y=Array.from(h);return y.reverse(),y.slice(0,bm).map(m=>I({},m,{filename:m.filename||EA(y).filename,function:m.function||ii}))}(o)}}([30,t=>{var e=vA.exec(t);if(e){var[,n,r,i]=e;return Cu(n,ii,+r,+i)}var s=yA.exec(t);if(s){if(s[2]&&s[2].indexOf("eval")===0){var o=_A.exec(s[2]);o&&(s[2]=o[1],s[3]=o[2],s[4]=o[3])}var[a,l]=Am(s[1]||ii,s[2]);return Cu(l,a,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}}],[50,t=>{var e=wA.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n=xA.exec(e[3]);n&&(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]="")}var r=e[3],i=e[1]||ii;return[i,r]=Am(i,r),Cu(r,i,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]);function EA(t){return t[t.length-1]||{}}var Vo,Rm,Tu,Am=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:ii,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},kA=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function mh(t,e){e===void 0&&(e=0);var n=t.stacktrace||t.stack||"",r=function(o){return o&&CA.test(o.message)?1:0}(t);try{var i=SA,s=function(o,a){var l=function(u){var c=globalThis._posthogChunkIds;if(!c)return{};var d=Object.keys(c);return Tu&&d.length===Rm||(Rm=d.length,Tu=d.reduce((f,h)=>{Vo||(Vo={});var y=Vo[h];if(y)f[y[0]]=y[1];else for(var m=u(h),_=m.length-1;_>=0;_--){var p=m[_],g=p==null?void 0:p.filename,v=c[h];if(g&&v){f[g]=v,Vo[h]=[g,v];break}}return f},{})),Tu}(a);return o.forEach(u=>{u.filename&&(u.chunk_id=l[u.filename])}),o}(i(n,r),i);return s.slice(0,s.length-e)}catch{}return[]}var CA=/Minified React error #\d+;/i;function TA(t,e){var n,r,i=mh(t),s=(n=e==null?void 0:e.handled)===null||n===void 0||n,o=(r=e==null?void 0:e.synthetic)!==null&&r!==void 0&&r;return{type:e!=null&&e.overrideExceptionType?e.overrideExceptionType:t.name,value:function(a){var l=a.message;return l.error&&typeof l.error.message=="string"?String(l.error.message):String(l)}(t),stacktrace:{frames:i,type:"raw"},mechanism:{handled:s,synthetic:o}}}function e1(t,e){var n=TA(t,e);return t.cause&&Jw(t.cause)&&t.cause!==t?[n,...e1(t.cause,{handled:e==null?void 0:e.handled,synthetic:e==null?void 0:e.synthetic})]:[n]}function Pu(t,e){return{$exception_list:e1(t,e),$exception_level:"error"}}function bu(t,e){var n,r,i,s=(n=e==null?void 0:e.handled)===null||n===void 0||n,o=(r=e==null?void 0:e.synthetic)===null||r===void 0||r,a={type:e!=null&&e.overrideExceptionType?e.overrideExceptionType:(i=e==null?void 0:e.defaultExceptionType)!==null&&i!==void 0?i:"Error",value:t||(e==null?void 0:e.defaultExceptionMessage),mechanism:{handled:s,synthetic:o}};if(e!=null&&e.syntheticException){var l=mh(e.syntheticException,1);l.length&&(a.stacktrace={frames:l,type:"raw"})}return{$exception_list:[a],$exception_level:"error"}}function PA(t){return _e(t)&&!ad(t)&&JR.indexOf(t)>=0}function bA(t,e){var n,r,i=(n=e==null?void 0:e.handled)===null||n===void 0||n,s=(r=e==null?void 0:e.synthetic)===null||r===void 0||r,o=e!=null&&e.overrideExceptionType?e.overrideExceptionType:Qw(t)?t.constructor.name:"Error",a="Non-Error 'exception' captured with keys: "+function(c,d){d===void 0&&(d=40);var f=Object.keys(c);if(f.sort(),!f.length)return"[object has no keys]";for(var h=f.length;h>0;h--){var y=f.slice(0,h).join(", ");if(!(y.length>d))return h===f.length||y.length<=d?y:y.slice(0,d)+"..."}return""}(t),l={type:o,value:a,mechanism:{handled:i,synthetic:s}};if(e!=null&&e.syntheticException){var u=mh(e==null?void 0:e.syntheticException,1);u.length&&(l.stacktrace={frames:u,type:"raw"})}return{$exception_list:[l],$exception_level:PA(t.level)?t.level:"error"}}function RA(t,e){var{error:n,event:r}=t,i={$exception_list:[]},s=n||r;if(ku(s)||function(f){return ua(f,"DOMException")}(s)){var o=s;if(function(f){return"stack"in f}(s))i=Pu(s,e);else{var a=o.name||(ku(o)?"DOMError":"DOMException"),l=o.message?a+": "+o.message:a;i=bu(l,I({},e,{overrideExceptionType:ku(o)?"DOMError":"DOMException",defaultExceptionMessage:l}))}return"code"in o&&(i.$exception_DOMException_code=""+o.code),i}if(function(f){return ua(f,"ErrorEvent")}(s)&&s.error)return Pu(s.error,e);if(Jw(s))return Pu(s,e);if(function(f){return ua(f,"Object")}(s)||Qw(s))return bA(s,e);if(A(n)&&_e(r)){var u="Error",c=r,d=r.match(kA);return d&&(u=d[1],c=d[2]),bu(c,I({},e,{overrideExceptionType:u,defaultExceptionMessage:c}))}return bu(s,e)}function Mm(t,e,n){try{if(!(e in t))return()=>{};var r=t[e],i=n(r);return Tt(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}class AA{constructor(e){var n;this._instance=e,this._t=(T==null||(n=T.location)==null?void 0:n.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(L.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.bt&&this.bt(),this.bt=void 0,L.info("History API monitoring stopped")}monitorHistoryChanges(){var e,n;if(T&&T.history){var r=this;(e=T.history.pushState)!=null&&e.__posthog_wrapped__||Mm(T.history,"pushState",i=>function(s,o,a){i.call(this,s,o,a),r.yt("pushState")}),(n=T.history.replaceState)!=null&&n.__posthog_wrapped__||Mm(T.history,"replaceState",i=>function(s,o,a){i.call(this,s,o,a),r.yt("replaceState")}),this.wt()}}yt(e){try{var n,r=T==null||(n=T.location)==null?void 0:n.pathname;if(!r)return;r!==this._t&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this._t=r}catch(i){L.error("Error capturing "+e+" pageview",i)}}wt(){if(!this.bt){var e=()=>{this.yt("popstate")};fe(T,"popstate",e),this.bt=()=>{T&&T.removeEventListener("popstate",e)}}}}function Xa(t){var e,n;return((e=JSON.stringify(t,(n=[],function(r,i){if(ye(i)){for(;n.length>0&&n[n.length-1]!==this;)n.pop();return n.includes(i)?"[Circular]":(n.push(i),i)}return i})))==null?void 0:e.length)||0}function wd(t,e){if(e===void 0&&(e=66060288e-1),t.size>=e&&t.data.length>1){var n=Math.floor(t.data.length/2),r=t.data.slice(0,n),i=t.data.slice(n);return[wd({size:Xa(r),data:r,sessionId:t.sessionId,windowId:t.windowId}),wd({size:Xa(i),data:i,sessionId:t.sessionId,windowId:t.windowId})].flatMap(s=>s)}return[t]}var un=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(un||{}),Nt=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Nt||{}),xd="[SessionRecording]",Sd="redacted",Bo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},MA=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],IA=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],LA=["/s/","/e/","/i/"];function Im(t,e,n,r){if(X(t))return t;var i=(e==null?void 0:e["content-length"])||function(s){return new Blob([s]).size}(t);return _e(i)&&(i=parseInt(i)),i>n?xd+" "+r+" body too large to record ("+i+" bytes)":t}function Lm(t,e){if(X(t))return t;var n=t;return Ei(n,!1)||(n=xd+" "+e+" body "+Sd),J(IA,r=>{var i,s;(i=n)!=null&&i.length&&((s=n)==null?void 0:s.indexOf(r))!==-1&&(n=xd+" "+e+" body "+Sd+" as might contain: "+r)}),n}var $A=(t,e)=>{var n,r,i,s={payloadSizeLimitBytes:Bo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Bo.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Bo.payloadHostDenyList]},o=t.session_recording.recordHeaders!==!1&&e.recordHeaders,a=t.session_recording.recordBody!==!1&&e.recordBody,l=t.capture_performance!==!1&&e.recordPerformance,u=(n=s,i=Math.min(1e6,(r=n.payloadSizeLimitBytes)!==null&&r!==void 0?r:1e6),f=>(f!=null&&f.requestBody&&(f.requestBody=Im(f.requestBody,f.requestHeaders,i,"Request")),f!=null&&f.responseBody&&(f.responseBody=Im(f.responseBody,f.responseHeaders,i,"Response")),f)),c=f=>{return u(((m,_)=>{var p,g=ki(m.name),v=_.indexOf("http")===0?(p=ki(_))==null?void 0:p.pathname:_;v==="/"&&(v="");var x=g==null?void 0:g.pathname.replace(v||"","");if(!(g&&x&&LA.some(w=>x.indexOf(w)===0)))return m})((y=(h=f).requestHeaders,X(y)||J(Object.keys(y??{}),m=>{MA.includes(m.toLowerCase())&&(y[m]=Sd)}),h),t.api_host));var h,y},d=Tt(t.session_recording.maskNetworkRequestFn);return d&&Tt(t.session_recording.maskCapturedNetworkRequestFn)&&L.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),d&&(t.session_recording.maskCapturedNetworkRequestFn=f=>{var h=t.session_recording.maskNetworkRequestFn({url:f.name});return I({},f,{name:h==null?void 0:h.url})}),s.maskRequestFn=Tt(t.session_recording.maskCapturedNetworkRequestFn)?f=>{var h,y=c(f);return y&&(h=t.session_recording.maskCapturedNetworkRequestFn==null?void 0:t.session_recording.maskCapturedNetworkRequestFn(y))!==null&&h!==void 0?h:void 0}:f=>function(h){if(!A(h))return h.requestBody=Lm(h.requestBody,"Request"),h.responseBody=Lm(h.responseBody,"Response"),h}(c(f)),I({},Bo,s,{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})};class NA{constructor(e,n){var r,i;n===void 0&&(n={}),this.St={},this.$t=s=>{if(!this.St[s]){var o,a;this.St[s]=!0;var l=this.xt(s);(o=(a=this.i).onBlockedNode)==null||o.call(a,s,l)}},this.kt=s=>{var o=this.xt(s);if((o==null?void 0:o.nodeName)!=="svg"&&o instanceof Element){var a=o.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[s,o]},this.xt=s=>this._rrweb.mirror.getNode(s),this.Et=s=>{var o,a,l,u,c,d,f,h;return((o=(a=s.removes)==null?void 0:a.length)!==null&&o!==void 0?o:0)+((l=(u=s.attributes)==null?void 0:u.length)!==null&&l!==void 0?l:0)+((c=(d=s.texts)==null?void 0:d.length)!==null&&c!==void 0?c:0)+((f=(h=s.adds)==null?void 0:h.length)!==null&&f!==void 0?f:0)},this.throttleMutations=s=>{if(s.type!==3||s.data.source!==0)return s;var o=s.data,a=this.Et(o);o.attributes&&(o.attributes=o.attributes.filter(u=>{var[c]=this.kt(u.id);return!this.gt.consumeRateLimit(c)&&u}));var l=this.Et(o);return l!==0||a===l?s:void 0},this._rrweb=e,this.i=n,this.gt=new Iw({bucketSize:(r=this.i.bucketSize)!==null&&r!==void 0?r:100,refillRate:(i=this.i.refillRate)!==null&&i!==void 0?i:10,refillInterval:1e3,I:this.$t,P:L})}}var Pt=Uint8Array,ot=Uint16Array,Ci=Uint32Array,vh=new Pt([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]),yh=new Pt([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]),$m=new Pt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t1=function(t,e){for(var n=new ot(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];var i=new Ci(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},n1=t1(vh,2),DA=n1[0],Ed=n1[1];DA[28]=258,Ed[258]=28;for(var Nm=t1(yh,0)[1],r1=new ot(32768),se=0;se<32768;++se){var sr=(43690&se)>>>1|(21845&se)<<1;sr=(61680&(sr=(52428&sr)>>>2|(13107&sr)<<2))>>>4|(3855&sr)<<4,r1[se]=((65280&sr)>>>8|(255&sr)<<8)>>>1}var ks=function(t,e,n){for(var r=t.length,i=0,s=new ot(e);i<r;++i)++s[t[i]-1];var o,a=new ot(e);for(i=0;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;for(o=new ot(r),i=0;i<r;++i)o[i]=r1[a[t[i]-1]++]>>>15-t[i];return o},Rr=new Pt(288);for(se=0;se<144;++se)Rr[se]=8;for(se=144;se<256;++se)Rr[se]=9;for(se=256;se<280;++se)Rr[se]=7;for(se=280;se<288;++se)Rr[se]=8;var Qa=new Pt(32);for(se=0;se<32;++se)Qa[se]=5;var FA=ks(Rr,9),OA=ks(Qa,5),i1=function(t){return(t/8>>0)+(7&t&&1)},s1=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof ot?ot:t instanceof Ci?Ci:Pt)(n-e);return r.set(t.subarray(e,n)),r},sn=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8},Gi=function(t,e,n){n<<=7&e;var r=e/8>>0;t[r]|=n,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Ru=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,s=n.slice();if(!i)return[new Pt(0),0];if(i==1){var o=new Pt(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(w,E){return w.f-E.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[d].f?u++:d++],l=n[u!=c&&n[u].f<n[d].f?u++:d++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var f=s[0].s;for(r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var h=new ot(f+1),y=kd(n[c-1],h,0);if(y>e){r=0;var m=0,_=y-e,p=1<<_;for(s.sort(function(w,E){return h[E.s]-h[w.s]||w.f-E.f});r<i;++r){var g=s[r].s;if(!(h[g]>e))break;m+=p-(1<<y-h[g]),h[g]=e}for(m>>>=_;m>0;){var v=s[r].s;h[v]<e?m-=1<<e-h[v]++-1:++r}for(;r>=0&&m;--r){var x=s[r].s;h[x]==e&&(--h[x],++m)}y=e}return[new Pt(h),y]},kd=function(t,e,n){return t.s==-1?Math.max(kd(t.l,e,n+1),kd(t.r,e,n+1)):e[t.s]=n},Dm=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new ot(++e),r=0,i=t[0],s=1,o=function(l){n[r++]=l},a=1;a<=e;++a)if(t[a]==i&&a!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=t[a]}return[n.subarray(0,r),e]},Yi=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},Cd=function(t,e,n){var r=n.length,i=i1(e+2);t[i]=255&r,t[i+1]=r>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<r;++s)t[i+s+4]=n[s];return 8*(i+4+r)},Fm=function(t,e,n,r,i,s,o,a,l,u,c){sn(e,c++,n),++i[256];for(var d=Ru(i,15),f=d[0],h=d[1],y=Ru(s,15),m=y[0],_=y[1],p=Dm(f),g=p[0],v=p[1],x=Dm(m),w=x[0],E=x[1],k=new ot(19),C=0;C<g.length;++C)k[31&g[C]]++;for(C=0;C<w.length;++C)k[31&w[C]]++;for(var $=Ru(k,7),M=$[0],O=$[1],U=19;U>4&&!M[$m[U-1]];--U);var ee,V,Q,Ee,G=u+5<<3,R=Yi(i,Rr)+Yi(s,Qa)+o,F=Yi(i,f)+Yi(s,m)+o+14+3*U+Yi(k,M)+(2*k[16]+3*k[17]+7*k[18]);if(G<=R&&G<=F)return Cd(e,c,t.subarray(l,l+u));if(sn(e,c,1+(F<R)),c+=2,F<R){ee=ks(f,h),V=f,Q=ks(m,_),Ee=m;var j=ks(M,O);for(sn(e,c,v-257),sn(e,c+5,E-1),sn(e,c+10,U-4),c+=14,C=0;C<U;++C)sn(e,c+3*C,M[$m[C]]);c+=3*U;for(var q=[g,w],H=0;H<2;++H){var ge=q[H];for(C=0;C<ge.length;++C){var ae=31&ge[C];sn(e,c,j[ae]),c+=M[ae],ae>15&&(sn(e,c,ge[C]>>>5&127),c+=ge[C]>>>12)}}}else ee=FA,V=Rr,Q=OA,Ee=Qa;for(C=0;C<a;++C)if(r[C]>255){ae=r[C]>>>18&31,Gi(e,c,ee[ae+257]),c+=V[ae+257],ae>7&&(sn(e,c,r[C]>>>23&31),c+=vh[ae]);var Bt=31&r[C];Gi(e,c,Q[Bt]),c+=Ee[Bt],Bt>3&&(Gi(e,c,r[C]>>>5&8191),c+=yh[Bt])}else Gi(e,c,ee[r[C]]),c+=V[r[C]];return Gi(e,c,ee[256]),c+V[256]},jA=new Ci([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),VA=function(){for(var t=new Ci(256),e=0;e<256;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t}(),BA=function(){var t=4294967295;return{p:function(e){for(var n=t,r=0;r<e.length;++r)n=VA[255&n^e[r]]^n>>>8;t=n},d:function(){return 4294967295^t}}},zA=function(t,e,n,r,i){return function(s,o,a,l,u,c){var d=s.length,f=new Pt(l+d+5*(1+Math.floor(d/7e3))+u),h=f.subarray(l,f.length-u),y=0;if(!o||d<8)for(var m=0;m<=d;m+=65535){var _=m+65535;_<d?y=Cd(h,y,s.subarray(m,_)):(h[m]=c,y=Cd(h,y,s.subarray(m,d)))}else{for(var p=jA[o-1],g=p>>>13,v=8191&p,x=(1<<a)-1,w=new ot(32768),E=new ot(x+1),k=Math.ceil(a/3),C=2*k,$=function(Ml){return(s[Ml]^s[Ml+1]<<k^s[Ml+2]<<C)&x},M=new Ci(25e3),O=new ot(288),U=new ot(32),ee=0,V=0,Q=(m=0,0),Ee=0,G=0;m<d;++m){var R=$(m),F=32767&m,j=E[R];if(w[F]=j,E[R]=F,Ee<=m){var q=d-m;if((ee>7e3||Q>24576)&&q>423){y=Fm(s,h,0,M,O,U,V,Q,G,m-G,y),Q=ee=V=0,G=m;for(var H=0;H<286;++H)O[H]=0;for(H=0;H<30;++H)U[H]=0}var ge=2,ae=0,Bt=v,Oe=F-j&32767;if(q>2&&R==$(m-Oe))for(var $r=Math.min(g,q)-1,B1=Math.min(32767,m),z1=Math.min(258,q);Oe<=B1&&--Bt&&F!=j;){if(s[m+ge]==s[m+ge-Oe]){for(var kn=0;kn<z1&&s[m+kn]==s[m+kn-Oe];++kn);if(kn>ge){if(ge=kn,ae=Oe,kn>$r)break;var U1=Math.min(Oe,kn-2),Ph=0;for(H=0;H<U1;++H){var Al=m-Oe+H+32768&32767,bh=Al-w[Al]+32768&32767;bh>Ph&&(Ph=bh,j=Al)}}}Oe+=(F=j)-(j=w[F])+32768&32767}if(ae){M[Q++]=268435456|Ed[ge]<<18|Nm[ae];var Rh=31&Ed[ge],Ah=31&Nm[ae];V+=vh[Rh]+yh[Ah],++O[257+Rh],++U[Ah],Ee=m+ge,++ee}else M[Q++]=s[m],++O[s[m]]}}y=Fm(s,h,c,M,O,U,V,Q,G,m-G,y)}return s1(f,0,l+i1(y)+u)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,n,r,!0)},Td=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},UA=function(t,e){var n=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:e.level==9?2:0,t[9]=3,e.mtime!=0&&Td(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){t[3]=8;for(var r=0;r<=n.length;++r)t[r+10]=n.charCodeAt(r)}},HA=function(t){return 10+(t.filename&&t.filename.length+1||0)};function o1(t,e){e===void 0&&(e={});var n=BA(),r=t.length;n.p(t);var i=zA(t,e,HA(e),8),s=i.length;return UA(i,e),Td(i,s-8,n.d()),Td(i,s-4,r),i}function a1(t,e){var n=t.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var r=new Pt(t.length+(t.length>>>1)),i=0,s=function(u){r[i++]=u},o=0;o<n;++o){if(i+5>r.length){var a=new Pt(i+8+(n-o<<1));a.set(r),r=a}var l=t.charCodeAt(o);l<128||e?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&t.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return s1(r,0,i)}function WA(t,e){return function(n){for(var r=0,i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r|=0;return Math.abs(r)}(t)%100<pt(100*e,0,100,L)}var Qn="disabled",_h="sampled",Za="active",Ar="buffering",wh="paused",xh="trigger",en=xh+"_activated",We=xh+"_pending",tn=xh+"_"+Qn;function Om(t,e){return e.some(n=>n.matching==="regex"&&new RegExp(n.url).test(t))}class l1{constructor(e){this.It=e}triggerStatus(e){var n=this.It.map(r=>r.triggerStatus(e));return n.includes(en)?en:n.includes(We)?We:tn}stop(){this.It.forEach(e=>e.stop())}}class u1{constructor(e){this.It=e}triggerStatus(e){var n=new Set;for(var r of this.It)n.add(r.triggerStatus(e));switch(n.delete(tn),n.size){case 0:return tn;case 1:return Array.from(n)[0];default:return We}}stop(){this.It.forEach(e=>e.stop())}}class KA{triggerStatus(){return We}stop(){}}class GA{constructor(e){this.Pt=[],this.Rt=[],this.urlBlocked=!1,this._instance=e}onRemoteConfig(e){var n,r;this.Pt=((n=e.sessionRecording)==null?void 0:n.urlTriggers)||[],this.Rt=((r=e.sessionRecording)==null?void 0:r.urlBlocklist)||[]}Tt(e){var n;return this.Pt.length===0?tn:((n=this._instance)==null?void 0:n.get_property(cd))===e?en:We}triggerStatus(e){var n=this.Tt(e),r=n===en?en:n===We?We:tn;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(e,n,r){if(T!==void 0&&T.location.href){var i=T.location.href,s=this.urlBlocked,o=Om(i,this.Rt);s&&o||(o&&!s?e():!o&&s&&n(),Om(i,this.Pt)&&r("url"))}}stop(){}}class YA{constructor(e){this.linkedFlag=null,this.linkedFlagSeen=!1,this.Ct=()=>{},this._instance=e}triggerStatus(){var e=We;return X(this.linkedFlag)&&(e=tn),this.linkedFlagSeen&&(e=en),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:e}),e}onRemoteConfig(e,n){var r;if(this.linkedFlag=((r=e.sessionRecording)==null?void 0:r.linkedFlag)||null,!X(this.linkedFlag)&&!this.linkedFlagSeen){var i=_e(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,s=_e(this.linkedFlag)?null:this.linkedFlag.variant;this.Ct=this._instance.onFeatureFlags((o,a)=>{var l=!1;if(ye(a)&&i in a){var u=a[i];l=Kt(u)?u===!0:s?u===s:!!u}this.linkedFlagSeen=l,l&&n(i,s)})}}stop(){this.Ct()}}class qA{constructor(e){this.Mt=[],this._instance=e}onRemoteConfig(e){var n;this.Mt=((n=e.sessionRecording)==null?void 0:n.eventTriggers)||[]}Ot(e){var n;return this.Mt.length===0?tn:((n=this._instance)==null?void 0:n.get_property(dd))===e?en:We}triggerStatus(e){var n=this.Ot(e),r=n===en?en:n===We?We:tn;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function XA(t){return t.isRecordingEnabled?Ar:Qn}function QA(t){if(!t.receivedFlags)return Ar;if(!t.isRecordingEnabled)return Qn;if(t.urlTriggerMatching.urlBlocked)return wh;var e=t.isSampled===!0,n=new l1([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?_h:n===en?Za:n===We?Ar:t.isSampled===!1?Qn:Za}function ZA(t){if(!t.receivedFlags)return Ar;if(!t.isRecordingEnabled)return Qn;if(t.urlTriggerMatching.urlBlocked)return wh;var e=new u1([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),n=e!==tn,r=Kt(t.isSampled);return n&&e===We?Ar:n&&e===tn||r&&!t.isSampled?Qn:t.isSampled===!0?_h:Za}var os="[SessionRecording]",Ae=Re(os);function zo(){var t;return B==null||(t=B.__PosthogExtensions__)==null||(t=t.rrweb)==null?void 0:t.record}var JA=3e5,eM=[Nt.MouseMove,Nt.MouseInteraction,Nt.Scroll,Nt.ViewportResize,Nt.Input,Nt.TouchMove,Nt.MediaInteraction,Nt.Drag],jm=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function or(t){return function(e,n){for(var r="",i=0;i<e.length;){var s=e[i++];r+=String.fromCharCode(s)}return r}(o1(a1(JSON.stringify(t))))}function Vm(t){return t.type===un.Custom&&t.data.tag==="sessionIdle"}class Bm{get sessionId(){return this.Ft}get At(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get started(){return this.Dt}get jt(){if(!this._instance.sessionManager)throw new Error(os+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Lt(){var e,n;return this.Nt.triggerStatus(this.sessionId)===We?6e4:(e=(n=this._instance.config.session_recording)==null?void 0:n.full_snapshot_interval_millis)!==null&&e!==void 0?e:JA}get zt(){var e=this._instance.get_property(rs);return Kt(e)?e:null}get Ut(){var e,n,r=(e=this.H)==null?void 0:e.data[((n=this.H)==null?void 0:n.data.length)-1],{sessionStartTimestamp:i}=this.jt.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}get qt(){var e=!!this._instance.get_property(Xs),n=!this._instance.config.disable_session_recording;return T&&e&&n}get Bt(){var e=!!this._instance.get_property(gm),n=this._instance.config.enable_recording_console_log;return n??e}get Ht(){var e,n,r,i,s,o,a=this._instance.config.session_recording.captureCanvas,l=this._instance.get_property(ym),u=(e=(n=a==null?void 0:a.recordCanvas)!==null&&n!==void 0?n:l==null?void 0:l.enabled)!==null&&e!==void 0&&e,c=(r=(i=a==null?void 0:a.canvasFps)!==null&&i!==void 0?i:l==null?void 0:l.fps)!==null&&r!==void 0?r:4,d=(s=(o=a==null?void 0:a.canvasQuality)!==null&&o!==void 0?o:l==null?void 0:l.quality)!==null&&s!==void 0?s:.4;if(typeof d=="string"){var f=parseFloat(d);d=isNaN(f)?.4:f}return{enabled:u,fps:pt(c,0,12,Ae.createLogger("canvas recording fps"),4),quality:pt(d,0,1,Ae.createLogger("canvas recording quality"),.4)}}get Wt(){var e,n,r=this._instance.get_property(mm),i={recordHeaders:(e=this._instance.config.session_recording)==null?void 0:e.recordHeaders,recordBody:(n=this._instance.config.session_recording)==null?void 0:n.recordBody},s=(i==null?void 0:i.recordHeaders)||(r==null?void 0:r.recordHeaders),o=(i==null?void 0:i.recordBody)||(r==null?void 0:r.recordBody),a=ye(this._instance.config.capture_performance)?this._instance.config.capture_performance.network_timing:this._instance.config.capture_performance,l=!!(Kt(a)?a:r!=null&&r.capturePerformance);return s||o||l?{recordHeaders:s,recordBody:o,recordPerformance:l}:void 0}get Gt(){var e,n,r,i,s,o,a=this._instance.get_property(vm),l={maskAllInputs:(e=this._instance.config.session_recording)==null?void 0:e.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)==null?void 0:n.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)==null?void 0:r.blockSelector},u=(i=l==null?void 0:l.maskAllInputs)!==null&&i!==void 0?i:a==null?void 0:a.maskAllInputs,c=(s=l==null?void 0:l.maskTextSelector)!==null&&s!==void 0?s:a==null?void 0:a.maskTextSelector,d=(o=l==null?void 0:l.blockSelector)!==null&&o!==void 0?o:a==null?void 0:a.blockSelector;return A(u)&&A(c)&&A(d)?void 0:{maskAllInputs:u==null||u,maskTextSelector:c,blockSelector:d}}get Jt(){var e=this._instance.get_property(_m);return Ue(e)?e:null}get Vt(){var e=this._instance.get_property(wm);return Ue(e)?e:null}get status(){return this.Kt?this.Yt({receivedFlags:this.Kt,isRecordingEnabled:this.qt,isSampled:this.zt,urlTriggerMatching:this.Xt,eventTriggerMatching:this.Qt,linkedFlagMatching:this.Zt,sessionId:this.sessionId}):Ar}constructor(e){if(this.Yt=XA,this.Kt=!1,this.ti=[],this.ii="unknown",this.ei=Date.now(),this.Nt=new KA,this.ri=void 0,this.si=void 0,this.ni=void 0,this.oi=void 0,this.ai=void 0,this._forceAllowLocalhostNetworkCapture=!1,this.li=()=>{this.hi()},this.ui=()=>{this.tryAddCustomEvent("browser offline",{})},this.di=()=>{this.tryAddCustomEvent("browser online",{})},this.vi=()=>{if(N!=null&&N.visibilityState){var i="window "+N.visibilityState;this.tryAddCustomEvent(i,{})}},this._instance=e,this.Dt=!1,this.ci="/s/",this.fi=void 0,this.Kt=!1,!this._instance.sessionManager)throw Ae.error("started without valid sessionManager"),new Error(os+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(os+' cannot be used with cookieless_mode="always"');this.Zt=new YA(this._instance),this.Xt=new GA(this._instance),this.Qt=new qA(this._instance);var{sessionId:n,windowId:r}=this.jt.checkAndGetSessionAndWindowId();this.Ft=n,this.pi=r,this.H=this.gi(),this.At>=this.jt.sessionTimeoutMs&&Ae.warn("session_idle_threshold_ms ("+this.At+") is greater than the session timeout ("+this.jt.sessionTimeoutMs+"). Session will never be detected as idle")}startIfEnabledOrStop(e){this.qt?(this.mi(e),fe(T,"beforeunload",this.li),fe(T,"offline",this.ui),fe(T,"online",this.di),fe(T,"visibilitychange",this.vi),this.bi(),this.yi(),X(this.ri)&&(this.ri=this._instance.on("eventCaptured",n=>{try{if(n.event==="$pageview"){var r=n!=null&&n.properties.$current_url?this.wi(n==null?void 0:n.properties.$current_url):"";if(!r)return;this.tryAddCustomEvent("$pageview",{href:r})}}catch(i){Ae.error("Could not add $pageview to rrweb session",i)}})),this.si||(this.si=this.jt.onSessionId((n,r,i)=>{var s,o;i&&(this.tryAddCustomEvent("$session_id_change",{sessionId:n,windowId:r,changeReason:i}),(s=this._instance)==null||(s=s.persistence)==null||s.unregister(dd),(o=this._instance)==null||(o=o.persistence)==null||o.unregister(cd))}))):this.stopRecording()}stopRecording(){var e,n,r,i;this.Dt&&this.fi&&(this.fi(),this.fi=void 0,this.Dt=!1,T==null||T.removeEventListener("beforeunload",this.li),T==null||T.removeEventListener("offline",this.ui),T==null||T.removeEventListener("online",this.di),T==null||T.removeEventListener("visibilitychange",this.vi),this.gi(),clearInterval(this.Si),(e=this.ri)==null||e.call(this),this.ri=void 0,(n=this.ai)==null||n.call(this),this.ai=void 0,(r=this.si)==null||r.call(this),this.si=void 0,(i=this.oi)==null||i.call(this),this.oi=void 0,this.Qt.stop(),this.Xt.stop(),this.Zt.stop(),Ae.info("stopped"))}$i(){var e;(e=this._instance.persistence)==null||e.unregister(rs)}xi(e){var n,r=this.Ft!==e,i=this.Jt;if(Ue(i)){var s=this.zt,o=r||!Kt(s),a=o?WA(e,i):s;o&&(a?this.ki(_h):Ae.warn("Sample rate ("+i+") has determined that this sessionId ("+e+") will not be sent to the server."),this.tryAddCustomEvent("samplingDecisionMade",{sampleRate:i,isSampled:a})),(n=this._instance.persistence)==null||n.register({[rs]:a})}else this.$i()}onRemoteConfig(e){var n,r,i,s;this.tryAddCustomEvent("$remote_config_received",e),this.Ei(e),(n=e.sessionRecording)!=null&&n.endpoint&&(this.ci=(s=e.sessionRecording)==null?void 0:s.endpoint),this.bi(),((r=e.sessionRecording)==null?void 0:r.triggerMatchType)==="any"?(this.Yt=QA,this.Nt=new l1([this.Qt,this.Xt])):(this.Yt=ZA,this.Nt=new u1([this.Qt,this.Xt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:(i=e.sessionRecording)==null?void 0:i.triggerMatchType}),this.Xt.onRemoteConfig(e),this.Qt.onRemoteConfig(e),this.Zt.onRemoteConfig(e,(o,a)=>{this.ki("linked_flag_matched",{flag:o,variant:a})}),this.Kt=!0,this.startIfEnabledOrStop()}bi(){Ue(this.Jt)&&X(this.oi)&&(this.oi=this.jt.onSessionId(e=>{this.xi(e)}))}Ei(e){if(this._instance.persistence){var n,r=this._instance.persistence,i=()=>{var s,o,a,l,u,c,d,f,h,y=(s=e.sessionRecording)==null?void 0:s.sampleRate,m=X(y)?null:parseFloat(y);X(m)&&this.$i();var _=(o=e.sessionRecording)==null?void 0:o.minimumDurationMilliseconds;r.register({[Xs]:!!e.sessionRecording,[gm]:(a=e.sessionRecording)==null?void 0:a.consoleLogRecordingEnabled,[mm]:I({capturePerformance:e.capturePerformance},(l=e.sessionRecording)==null?void 0:l.networkPayloadCapture),[vm]:(u=e.sessionRecording)==null?void 0:u.masking,[ym]:{enabled:(c=e.sessionRecording)==null?void 0:c.recordCanvas,fps:(d=e.sessionRecording)==null?void 0:d.canvasFps,quality:(f=e.sessionRecording)==null?void 0:f.canvasQuality},[_m]:m,[wm]:A(_)?null:_,[Ba]:(h=e.sessionRecording)==null?void 0:h.scriptConfig})};i(),(n=this.ni)==null||n.call(this),this.ni=this.jt.onSessionId(i)}}log(e,n){var r;n===void 0&&(n="log"),(r=this._instance.sessionRecording)==null||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}mi(e){if(!A(Object.assign)&&!A(Array.from)&&!(this.Dt||this._instance.config.disable_session_recording||this._instance.consent.isOptedOut())){var n;this.Dt=!0,this.jt.checkAndGetSessionAndWindowId(),zo()?this.Ii():(n=B.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Pi,r=>{if(r)return Ae.error("could not load recorder",r);this.Ii()}),Ae.info("starting"),this.status===Za&&this.ki(e||"recording_initialized")}}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(Ba))==null?void 0:e.script)||"recorder"}Ri(e){var n;return e.type===3&&eM.indexOf((n=e.data)==null?void 0:n.source)!==-1}Ti(e){var n=this.Ri(e);n||this.ii||e.timestamp-this.ei>this.At&&(this.ii=!0,clearInterval(this.Si),this.tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.ei,threshold:this.At,bufferLength:this.H.data.length,bufferSize:this.H.size}),this.hi());var r=!1;if(n&&(this.ei=e.timestamp,this.ii)){var i=this.ii==="unknown";this.ii=!1,i||(this.tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),r=!0)}if(!this.ii){var{windowId:s,sessionId:o}=this.jt.checkAndGetSessionAndWindowId(!n,e.timestamp),a=this.Ft!==o,l=this.pi!==s;this.pi=s,this.Ft=o,a||l?(this.stopRecording(),this.startIfEnabledOrStop("session_id_changed")):r&&this.Ci()}}Mi(e){try{return e.rrwebMethod(),!0}catch(n){return this.ti.length<10?this.ti.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):Ae.warn("could not emit queued rrweb event.",n,e),!1}}tryAddCustomEvent(e,n){return this.Mi(jm(()=>zo().addCustomEvent(e,n)))}Oi(){return this.Mi(jm(()=>zo().takeFullSnapshot()))}Ii(){var e,n,r,i,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,l]of Object.entries(o||{}))a in s&&(a==="maskInputOptions"?s.maskInputOptions=I({password:!0},l):s[a]=l);this.Ht&&this.Ht.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Ht.fps},s.dataURLOptions={type:"image/webp",quality:this.Ht.quality}),this.Gt&&(s.maskAllInputs=(n=this.Gt.maskAllInputs)===null||n===void 0||n,s.maskTextSelector=(r=this.Gt.maskTextSelector)!==null&&r!==void 0?r:void 0,s.blockSelector=(i=this.Gt.blockSelector)!==null&&i!==void 0?i:void 0);var u=zo();if(u){this.Fi=(e=this.Fi)!==null&&e!==void 0?e:new NA(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(d,f)=>{var h="Too many mutations on node '"+d+"'. Rate limiting. This could be due to SVG animations or something similar";Ae.info(h,{node:f}),this.log(os+" "+h,"warn")}});var c=this.Ai();this.fi=u(I({emit:d=>{this.onRRwebEmit(d)},plugins:c},s)),this.ei=Date.now(),this.ii=Kt(this.ii)?this.ii:"unknown",this.tryAddCustomEvent("$session_options",{sessionRecordingOptions:s,activePlugins:c.map(d=>d==null?void 0:d.name)}),this.tryAddCustomEvent("$posthog_config",{config:this._instance.config})}else Ae.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}Ci(){if(this.Si&&clearInterval(this.Si),this.ii!==!0){var e=this.Lt;e&&(this.Si=setInterval(()=>{this.Oi()},e))}}Ai(){var e,n,r=[],i=(e=B.__PosthogExtensions__)==null||(e=e.rrwebPlugins)==null?void 0:e.getRecordConsolePlugin;i&&this.Bt&&r.push(i());var s=(n=B.__PosthogExtensions__)==null||(n=n.rrwebPlugins)==null?void 0:n.getRecordNetworkPlugin;return this.Wt&&Tt(s)&&(!eA.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(s($A(this._instance.config,this.Wt))):Ae.info("NetworkCapture not started because we are on localhost.")),r}onRRwebEmit(e){var n;if(this.Di(),e&&ye(e)){if(e.type===un.Meta){var r=this.wi(e.data.href);if(this.ji=r,!r)return;e.data.href=r}else this.Li();if(this.Xt.checkUrlTriggerConditions(()=>this.Ni(),()=>this.zi(),f=>this.Ui(f)),!this.Xt.urlBlocked||(i=e).type===un.Custom&&i.data.tag==="recording paused"){var i;e.type===un.FullSnapshot&&this.Ci(),e.type===un.FullSnapshot&&this.Kt&&this.Nt.triggerStatus(this.sessionId)===We&&this.gi();var s=this.Fi?this.Fi.throttleMutations(e):e;if(s){var o=function(f){var h=f;if(h&&ye(h)&&h.type===6&&ye(h.data)&&h.data.plugin==="rrweb/console@1"){h.data.payload.payload.length>10&&(h.data.payload.payload=h.data.payload.payload.slice(0,10),h.data.payload.payload.push("...[truncated]"));for(var y=[],m=0;m<h.data.payload.payload.length;m++)h.data.payload.payload[m]&&h.data.payload.payload[m].length>2e3?y.push(h.data.payload.payload[m].slice(0,2e3)+"...[truncated]"):y.push(h.data.payload.payload[m]);return h.data.payload.payload=y,f}return f}(s);if(this.Ti(o),this.ii!==!0||Vm(o)){if(Vm(o)){var a=o.data.payload;if(a){var l=a.lastActivityTimestamp,u=a.threshold;o.timestamp=l+u}}var c=(n=this._instance.config.session_recording.compress_events)===null||n===void 0||n?function(f){if(Xa(f)<1024)return f;try{if(f.type===un.FullSnapshot)return I({},f,{data:or(f.data),cv:"2024-10"});if(f.type===un.IncrementalSnapshot&&f.data.source===Nt.Mutation)return I({},f,{cv:"2024-10",data:I({},f.data,{texts:or(f.data.texts),attributes:or(f.data.attributes),removes:or(f.data.removes),adds:or(f.data.adds)})});if(f.type===un.IncrementalSnapshot&&f.data.source===Nt.StyleSheetRule)return I({},f,{cv:"2024-10",data:I({},f.data,{adds:f.data.adds?or(f.data.adds):void 0,removes:f.data.removes?or(f.data.removes):void 0})})}catch(h){Ae.error("could not compress event - will use uncompressed event",h)}return f}(o):o,d={$snapshot_bytes:Xa(c),$snapshot_data:c,$session_id:this.Ft,$window_id:this.pi};this.status!==Qn?this.qi(d):this.gi()}}}}}Li(){if(!this._instance.config.capture_pageview&&T){var e=this.wi(T.location.href);this.ji!==e&&(this.tryAddCustomEvent("$url_changed",{href:e}),this.ji=e)}}Di(){if(this.ti.length){var e=[...this.ti];this.ti=[],e.forEach(n=>{Date.now()-n.enqueuedAt<=2e3&&this.Mi(n)})}}wi(e){var n=this._instance.config.session_recording;if(n.maskNetworkRequestFn){var r,i={url:e};return(r=i=n.maskNetworkRequestFn(i))==null?void 0:r.url}return e}gi(){return this.H={size:0,data:[],sessionId:this.Ft,windowId:this.pi},this.H}hi(){this.Bi&&(clearTimeout(this.Bi),this.Bi=void 0);var e=this.Vt,n=this.Ut,r=Ue(n)&&n>=0,i=Ue(e)&&r&&n<e;return this.status===Ar||this.status===wh||this.status===Qn||i?(this.Bi=setTimeout(()=>{this.hi()},2e3),this.H):(this.H.data.length>0&&wd(this.H).forEach(s=>{this.Hi({$snapshot_bytes:s.size,$snapshot_data:s.data,$session_id:s.sessionId,$window_id:s.windowId,$lib:"web",$lib_version:dn.LIB_VERSION})}),this.gi())}qi(e){var n,r=2+(((n=this.H)==null?void 0:n.data.length)||0);!this.ii&&(this.H.size+e.$snapshot_bytes+r>943718.4||this.H.sessionId!==this.Ft)&&(this.H=this.hi()),this.H.size+=e.$snapshot_bytes,this.H.data.push(e.$snapshot_data),this.Bi||this.ii||(this.Bi=setTimeout(()=>{this.hi()},2e3))}Hi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.ci),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}Ui(e){var n;this.Nt.triggerStatus(this.sessionId)===We&&((n=this._instance)==null||(n=n.persistence)==null||n.register({[e==="url"?cd:dd]:this.Ft}),this.hi(),this.ki(e+"_trigger_matched"))}Ni(){this.Xt.urlBlocked||(this.Xt.urlBlocked=!0,clearInterval(this.Si),Ae.info("recording paused due to URL blocker"),this.tryAddCustomEvent("recording paused",{reason:"url blocker"}))}zi(){this.Xt.urlBlocked&&(this.Xt.urlBlocked=!1,this.Oi(),this.Ci(),this.tryAddCustomEvent("recording resumed",{reason:"left blocked url"}),Ae.info("recording resumed"))}yi(){this.Qt.Mt.length!==0&&X(this.ai)&&(this.ai=this._instance.on("eventCaptured",e=>{try{this.Qt.Mt.includes(e.event)&&this.Ui("event")}catch(n){Ae.error("Could not activate event trigger",n)}}))}overrideLinkedFlag(){this.Zt.linkedFlagSeen=!0,this.Oi(),this.ki("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)==null||e.register({[rs]:!0}),this.Oi(),this.ki("sampling_overridden")}overrideTrigger(e){this.Ui(e)}ki(e,n){this._instance.register_for_session({$session_recording_start_reason:e}),Ae.info(e.replace("_"," "),n),W(["recording_initialized","session_id_changed"],e)||this.tryAddCustomEvent(e,n)}get sdkDebugProperties(){var{sessionStartTimestamp:e}=this.jt.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.H.data.length,$sdk_debug_replay_internal_buffer_size:this.H.size,$sdk_debug_current_session_duration:this.Ut,$sdk_debug_session_start:e}}}var Au=Re("[SegmentIntegration]");function tM(t,e){var n=t.config.segment;if(!n)return e();(function(r,i){var s=r.config.segment;if(!s)return i();var o=l=>{var u=()=>l.anonymousId()||Dn();r.config.get_device_id=u,l.id()&&(r.register({distinct_id:l.id(),$device_id:u()}),r.persistence.set_property(an,"identified")),i()},a=s.user();"then"in a&&Tt(a.then)?a.then(l=>o(l)):o(a)})(t,()=>{n.register((r=>{Promise&&Promise.resolve||Au.warn("This browser does not have Promise support, and can not use the segment integration");var i=(s,o)=>{if(!o)return s;s.event.userId||s.event.anonymousId===r.get_distinct_id()||(Au.info("No userId set, resetting PostHog"),r.reset()),s.event.userId&&s.event.userId!==r.get_distinct_id()&&(Au.info("UserId set, identifying with PostHog"),r.identify(s.event.userId));var a=r.calculateEventProperties(o,s.event.properties);return s.event.properties=Object.assign({},a,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>i(s,s.event.event),page:s=>i(s,"$pageview"),identify:s=>i(s,"$identify"),screen:s=>i(s,"$screen")}})(t)).then(()=>{e()})})}var c1="posthog-js";function d1(t,e){var{organization:n,projectId:r,prefix:i,severityAllowList:s=["error"],sendExceptionsToPostHog:o=!0}=e===void 0?{}:e;return a=>{var l,u,c,d,f;if(!(s==="*"||s.includes(a.level))||!t.__loaded)return a;a.tags||(a.tags={});var h=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());a.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var y=((l=a.exception)==null?void 0:l.values)||[],m=y.map(p=>I({},p,{stacktrace:p.stacktrace?I({},p.stacktrace,{type:"raw",frames:(p.stacktrace.frames||[]).map(g=>I({},g,{platform:"web:javascript"}))}):void 0})),_={$exception_message:((u=y[0])==null?void 0:u.value)||a.message,$exception_type:(c=y[0])==null?void 0:c.type,$exception_personURL:h,$exception_level:a.level,$exception_list:m,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=y[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(f=y[0])==null?void 0:f.type,$sentry_tags:a.tags};return n&&r&&(_.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+a.event_id),o&&t.exceptions.sendExceptionEvent(_),a}}class nM{constructor(e,n,r,i,s,o){this.name=c1,this.setupOnce=function(a){a(d1(e,{organization:n,projectId:r,prefix:i,severityAllowList:s,sendExceptionsToPostHog:o==null||o}))}}}var rM=T!=null&&T.location?Ya(T.location.hash,"__posthog")||Ya(location.hash,"state"):null,zm="_postHogToolbarParams",Um=Re("[Toolbar]"),Rn=function(t){return t[t.UNINITIALIZED=0]="UNINITIALIZED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t}(Rn||{});class iM{constructor(e){this.instance=e}Wi(e){B.ph_toolbar_state=e}Gi(){var e;return(e=B.ph_toolbar_state)!==null&&e!==void 0?e:Rn.UNINITIALIZED}maybeLoadToolbar(e,n,r){if(e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),!T||!N)return!1;e=e??T.location,r=r??T.history;try{if(!n){try{T.localStorage.setItem("test","test"),T.localStorage.removeItem("test")}catch{return!1}n=T==null?void 0:T.localStorage}var i,s=rM||Ya(e.hash,"__posthog")||Ya(e.hash,"state"),o=s?um(()=>JSON.parse(atob(decodeURIComponent(s))))||um(()=>JSON.parse(decodeURIComponent(s))):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?e.hash=o.desiredHash:r?r.replaceState(r.state,"",e.pathname+e.search):e.hash="")):((i=JSON.parse(n.getItem(zm)||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}Ji(e){var n=B.ph_load_toolbar||B.ph_load_editor;!X(n)&&Tt(n)?n(e,this.instance):Um.warn("No toolbar load function found")}loadToolbar(e){var n=!(N==null||!N.getElementById(Fw));if(!T||n)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,i=I({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(T.localStorage.setItem(zm,JSON.stringify(I({},i,{source:void 0}))),this.Gi()===Rn.LOADED)this.Ji(i);else if(this.Gi()===Rn.UNINITIALIZED){var s;this.Wi(Rn.LOADING),(s=B.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",o=>{if(o)return Um.error("[Toolbar] Failed to load",o),void this.Wi(Rn.UNINITIALIZED);this.Wi(Rn.LOADED),this.Ji(i)}),fe(T,"turbolinks:load",()=>{this.Wi(Rn.UNINITIALIZED),this.loadToolbar(i)})}return!0}Vi(e){return this.loadToolbar(e)}maybeLoadEditor(e,n,r){return e===void 0&&(e=void 0),n===void 0&&(n=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(e,n,r)}}var sM=Re("[TracingHeaders]");class oM{constructor(e){this.Ki=void 0,this.Yi=void 0,this.lt=()=>{var n,r;A(this.Ki)&&((n=B.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),A(this.Yi)&&((r=B.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}nt(e){var n,r;(n=B.__PosthogExtensions__)!=null&&n.tracingHeadersPatchFns&&e(),(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",i=>{if(i)return sM.error("failed to load script",i);e()})}startIfEnabledOrStop(){var e,n;this._instance.config.__add_tracing_headers?this.nt(this.lt):((e=this.Ki)==null||e.call(this),(n=this.Yi)==null||n.call(this),this.Ki=void 0,this.Yi=void 0)}}var Tn=Re("[Web Vitals]"),Hm=9e5;class aM{constructor(e){var n;this.Xi=!1,this.C=!1,this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Qi=()=>{clearTimeout(this.Zi),this.H.metrics.length!==0&&(this._instance.capture("$web_vitals",this.H.metrics.reduce((r,i)=>I({},r,{["$web_vitals_"+i.name+"_event"]:I({},i),["$web_vitals_"+i.name+"_value"]:i.value}),{})),this.H={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.te=r=>{var i,s=(i=this._instance.sessionManager)==null?void 0:i.checkAndGetSessionAndWindowId(!0);if(A(s))Tn.error("Could not read session ID. Dropping metrics!");else{this.H=this.H||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var o=this.ie();A(o)||(X(r==null?void 0:r.name)||X(r==null?void 0:r.value)?Tn.error("Invalid metric received",r):this.ee&&r.value>=this.ee?Tn.error("Ignoring metric with value >= "+this.ee,r):(this.H.url!==o&&(this.Qi(),this.Zi=setTimeout(this.Qi,this.flushToCaptureTimeoutMs)),A(this.H.url)&&(this.H.url=o),this.H.firstMetricTimestamp=A(this.H.firstMetricTimestamp)?Date.now():this.H.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.H.metrics.push(I({},r,{$current_url:o,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.H.metrics.length===this.allowedMetrics.length&&this.Qi()))}},this.lt=()=>{var r,i,s,o,a=B.__PosthogExtensions__;A(a)||A(a.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:i,onFCP:s,onINP:o}=a.postHogWebVitalsCallbacks),r&&i&&s&&o?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.te.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&i(this.te.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.te.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&o(this.te.bind(this)),this.C=!0):Tn.error("web vitals callbacks not loaded - not starting")},this._instance=e,this.Xi=!((n=this._instance.persistence)==null||!n.props[hm]),this.startIfEnabled()}get allowedMetrics(){var e,n,r=ye(this._instance.config.capture_performance)?(e=this._instance.config.capture_performance)==null?void 0:e.web_vitals_allowed_metrics:void 0;return A(r)?((n=this._instance.persistence)==null?void 0:n.props[pm])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(ye(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get ee(){var e=ye(this._instance.config.capture_performance)&&Ue(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:Hm;return 0<e&&e<=6e4?Hm:e}get isEnabled(){var e=nt==null?void 0:nt.protocol;if(e!=="http:"&&e!=="https:")return Tn.info("Web Vitals are disabled on non-http/https protocols"),!1;var n=ye(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:Kt(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return Kt(n)?n:this.Xi}startIfEnabled(){this.isEnabled&&!this.C&&(Tn.info("enabled, starting..."),this.nt(this.lt))}onRemoteConfig(e){var n=ye(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=ye(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[hm]:n}),this._instance.persistence.register({[pm]:r})),this.Xi=n,this.startIfEnabled()}nt(e){var n,r;(n=B.__PosthogExtensions__)!=null&&n.postHogWebVitalsCallbacks&&e(),(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"web-vitals",i=>{i?Tn.error("failed to load script",i):e()})}ie(){var e=T?T.location.href:void 0;return e||Tn.error("Could not determine current URL"),e}}var lM=Re("[Heatmaps]");function Wm(t){return ye(t)&&"clientX"in t&&"clientY"in t&&Ue(t.clientX)&&Ue(t.clientY)}class uM{constructor(e){var n;this.rageclicks=new Yw,this.Xi=!1,this.C=!1,this.re=null,this.instance=e,this.Xi=!((n=this.instance.persistence)==null||!n.props[ld])}get flushIntervalMilliseconds(){var e=5e3;return ye(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return A(this.instance.config.capture_heatmaps)?A(this.instance.config.enable_heatmaps)?this.Xi:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.C)return;lM.info("starting..."),this.se(),this.re=setInterval(this.ne.bind(this),this.flushIntervalMilliseconds)}else{var e,n;clearInterval((e=this.re)!==null&&e!==void 0?e:void 0),(n=this.oe)==null||n.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ld]:n}),this.Xi=n,this.startIfEnabled()}getAndClearBuffer(){var e=this.H;return this.H=void 0,e}ae(e){this.le(e.originalEvent,"deadclick")}se(){T&&N&&(fe(T,"beforeunload",this.ne.bind(this)),fe(N,"click",e=>this.le(e||(T==null?void 0:T.event)),{capture:!0}),fe(N,"mousemove",e=>this.he(e||(T==null?void 0:T.event)),{capture:!0}),this.oe=new Xw(this.instance,pA,this.ae.bind(this)),this.oe.startIfEnabled(),this.C=!0)}ue(e,n){var r=this.instance.scrollManager.scrollY(),i=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),o=function(a,l,u){for(var c=a;c&&Tl(c)&&!Kn(c,"body");){if(c===u)return!1;if(W(l,T==null?void 0:T.getComputedStyle(c).position))return!0;c=zw(c)}return!1}(Bw(e),["fixed","sticky"],s);return{x:e.clientX+(o?0:i),y:e.clientY+(o?0:r),target_fixed:o,type:n}}le(e,n){var r;if(n===void 0&&(n="click"),!xm(e.target)&&Wm(e)){var i=this.ue(e,n);(r=this.rageclicks)!=null&&r.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.de(I({},i,{type:"rageclick"})),this.de(i)}}he(e){!xm(e.target)&&Wm(e)&&(clearTimeout(this.ve),this.ve=setTimeout(()=>{this.de(this.ue(e,"mousemove"))},500))}de(e){if(T){var n=T.location.href;this.H=this.H||{},this.H[n]||(this.H[n]=[]),this.H[n].push(e)}}ne(){this.H&&!ni(this.H)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class cM{constructor(e){this._instance=e}doPageView(e,n){var r,i=this.ce(e,n);return this.fe={pathname:(r=T==null?void 0:T.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),i}doPageLeave(e){var n;return this.ce(e,(n=this.fe)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.fe)==null?void 0:e.pageViewId}}ce(e,n){var r=this.fe;if(!r)return{$pageview_id:n};var i={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:u,lastContentY:c,maxContentY:d}=s;if(!(A(o)||A(a)||A(l)||A(u)||A(c)||A(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d);var f=o<=1?1:pt(a/o,0,1,L),h=o<=1?1:pt(l/o,0,1,L),y=u<=1?1:pt(c/u,0,1,L),m=u<=1?1:pt(d/u,0,1,L);i=xe(i,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:c,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:m})}}return r.pathname&&(i.$prev_pageview_pathname=r.pathname),r.timestamp&&(i.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),i}}var dM=function(t){var e,n,r,i,s="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,`
107
+ `).replace(/\r/g,`
108
+ `)).length,i=0;i<r;i++){var o=t.charCodeAt(i),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),nr(a)||(n>e&&(s+=t.substring(e,n)),s+=a,e=n=i+1)}return n>e&&(s+=t.substring(e,t.length)),s},fM=!!sd||!!id,Km="text/plain",Ja=(t,e)=>{var[n,r]=t.split("?"),i=I({},e);r==null||r.split("&").forEach(o=>{var[a]=o.split("=");delete i[a]});var s=tA(i);return n+"?"+(s=s?(r?r+"&":"")+s:r)},as=(t,e)=>JSON.stringify(t,(n,r)=>typeof r=="bigint"?r.toString():r,e),Mu=t=>{var{data:e,compression:n}=t;if(e){if(n===fn.GZipJS){var r=o1(a1(as(e)),{mtime:0}),i=new Blob([r],{type:Km});return{contentType:Km,body:i,estimatedSize:i.size}}if(n===fn.Base64){var s=function(l){var u,c,d,f,h,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",m=0,_=0,p="",g=[];if(!l)return l;l=dM(l);do u=(h=l.charCodeAt(m++)<<16|l.charCodeAt(m++)<<8|l.charCodeAt(m++))>>18&63,c=h>>12&63,d=h>>6&63,f=63&h,g[_++]=y.charAt(u)+y.charAt(c)+y.charAt(d)+y.charAt(f);while(m<l.length);switch(p=g.join(""),l.length%3){case 1:p=p.slice(0,-2)+"==";break;case 2:p=p.slice(0,-1)+"="}return p}(as(e)),o=(l=>"data="+encodeURIComponent(typeof l=="string"?l:as(l)))(s);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var a=as(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},ca=[];id&&ca.push({transport:"fetch",method:t=>{var e,n,{contentType:r,body:i,estimatedSize:s}=(e=Mu(t))!==null&&e!==void 0?e:{},o=new Headers;J(t.headers,function(c,d){o.append(d,c)}),r&&o.append("Content-Type",r);var a=t.url,l=null;if(am){var u=new am;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),t.timeout)}}id(a,I({method:(t==null?void 0:t.method)||"GET",headers:o,keepalive:t.method==="POST"&&(s||0)<52428.8,body:i,signal:(n=l)==null?void 0:n.signal},t.fetchOptions)).then(c=>c.text().then(d=>{var f={statusCode:c.status,text:d};if(c.status===200)try{f.json=JSON.parse(d)}catch(h){L.error(h)}t.callback==null||t.callback(f)})).catch(c=>{L.error(c),t.callback==null||t.callback({statusCode:0,text:c})}).finally(()=>l?clearTimeout(l.timeout):null)}}),sd&&ca.push({transport:"XHR",method:t=>{var e,n=new sd;n.open(t.method||"GET",t.url,!0);var{contentType:r,body:i}=(e=Mu(t))!==null&&e!==void 0?e:{};J(t.headers,function(s,o){n.setRequestHeader(o,s)}),r&&n.setRequestHeader("Content-Type",r),t.timeout&&(n.timeout=t.timeout),t.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(s)}},n.send(i)}}),ht!=null&&ht.sendBeacon&&ca.push({transport:"sendBeacon",method:t=>{var e=Ja(t.url,{beacon:"1"});try{var n,{contentType:r,body:i}=(n=Mu(t))!==null&&n!==void 0?n:{},s=typeof i=="string"?new Blob([i],{type:r}):i;ht.sendBeacon(e,s)}catch{}}});var Ti=function(t,e){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function Gm(t,e,n){return as({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var hM={exact:(t,e)=>e.some(n=>t.some(r=>n===r)),is_not:(t,e)=>e.every(n=>t.every(r=>n!==r)),regex:(t,e)=>e.some(n=>t.some(r=>Ti(n,r))),not_regex:(t,e)=>e.every(n=>t.every(r=>!Ti(n,r))),icontains:(t,e)=>e.map(Uo).some(n=>t.map(Uo).some(r=>n.includes(r))),not_icontains:(t,e)=>e.map(Uo).every(n=>t.map(Uo).every(r=>!n.includes(r)))},Uo=t=>t.toLowerCase(),Ym=Re("[Error tracking]");class pM{constructor(e){var n,r;this.pe=[],this._instance=e,this.pe=(n=(r=this._instance.persistence)==null?void 0:r.get_property(ud))!==null&&n!==void 0?n:[]}onRemoteConfig(e){var n,r,i,s=(n=(r=e.errorTracking)==null?void 0:r.suppressionRules)!==null&&n!==void 0?n:[],o=(i=e.errorTracking)==null?void 0:i.captureExtensionExceptions;this.pe=s,this._instance.persistence&&this._instance.persistence.register({[ud]:this.pe,[fm]:o})}get ge(){var e,n=!!this._instance.get_property(fm),r=this._instance.config.error_tracking.captureExtensionExceptions;return(e=r??n)!==null&&e!==void 0&&e}sendExceptionEvent(e){if(this._e(e))Ym.info("Skipping exception capture because a suppression rule matched");else{if(this.ge||!this.me(e))return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent"});Ym.info("Skipping exception capture because it was thrown by an extension")}}_e(e){var n=e.$exception_list;if(!n||!ie(n)||n.length===0)return!1;var r=n.reduce((i,s)=>{var{type:o,value:a}=s;return _e(o)&&o.length>0&&i.$exception_types.push(o),_e(a)&&a.length>0&&i.$exception_values.push(a),i},{$exception_types:[],$exception_values:[]});return this.pe.some(i=>{var s=i.values.map(o=>{var a,l=hM[o.operator],u=ie(o.value)?o.value:[o.value],c=(a=r[o.key])!==null&&a!==void 0?a:[];return u.length>0&&l(u,c)});return i.type==="OR"?s.some(Boolean):s.every(Boolean)})}me(e){var n=e.$exception_list;return!(!n||!ie(n))&&n.flatMap(r=>{var i,s;return(i=(s=r.stacktrace)==null?void 0:s.frames)!==null&&i!==void 0?i:[]}).some(r=>r.filename&&r.filename.startsWith("chrome-extension://"))}}var bt="Mobile",el="iOS",Gt="Android",Qs="Tablet",f1=Gt+" "+Qs,h1="iPad",p1="Apple",g1=p1+" Watch",Zs="Safari",Pi="BlackBerry",m1="Samsung",v1=m1+"Browser",y1=m1+" Internet",Mr="Chrome",gM=Mr+" OS",_1=Mr+" "+el,Sh="Internet Explorer",w1=Sh+" "+bt,Eh="Opera",mM=Eh+" Mini",kh="Edge",x1="Microsoft "+kh,fi="Firefox",S1=fi+" "+el,Js="Nintendo",eo="PlayStation",hi="Xbox",E1=Gt+" "+bt,k1=bt+" "+Zs,ls="Windows",Pd=ls+" Phone",qm="Nokia",bd="Ouya",C1="Generic",vM=C1+" "+bt.toLowerCase(),T1=C1+" "+Qs.toLowerCase(),Rd="Konqueror",Ge="(\\d+(\\.\\d+)?)",Iu=new RegExp("Version/"+Ge),yM=new RegExp(hi,"i"),_M=new RegExp(eo+" \\w+","i"),wM=new RegExp(Js+" \\w+","i"),Ch=new RegExp(Pi+"|PlayBook|BB10","i"),xM={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},SM=(t,e)=>e&&W(e,p1)||function(n){return W(n,Zs)&&!W(n,Mr)&&!W(n,Gt)}(t),P1=function(t,e){return e=e||"",W(t," OPR/")&&W(t,"Mini")?mM:W(t," OPR/")?Eh:Ch.test(t)?Pi:W(t,"IE"+bt)||W(t,"WPDesktop")?w1:W(t,v1)?y1:W(t,kh)||W(t,"Edg/")?x1:W(t,"FBIOS")?"Facebook "+bt:W(t,"UCWEB")||W(t,"UCBrowser")?"UC Browser":W(t,"CriOS")?_1:W(t,"CrMo")||W(t,Mr)?Mr:W(t,Gt)&&W(t,Zs)?E1:W(t,"FxiOS")?S1:W(t.toLowerCase(),Rd.toLowerCase())?Rd:SM(t,e)?W(t,bt)?k1:Zs:W(t,fi)?fi:W(t,"MSIE")||W(t,"Trident/")?Sh:W(t,"Gecko")?fi:""},EM={[w1]:[new RegExp("rv:"+Ge)],[x1]:[new RegExp(kh+"?\\/"+Ge)],[Mr]:[new RegExp("("+Mr+"|CrMo)\\/"+Ge)],[_1]:[new RegExp("CriOS\\/"+Ge)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ge)],[Zs]:[Iu],[k1]:[Iu],[Eh]:[new RegExp("(Opera|OPR)\\/"+Ge)],[fi]:[new RegExp(fi+"\\/"+Ge)],[S1]:[new RegExp("FxiOS\\/"+Ge)],[Rd]:[new RegExp("Konqueror[:/]?"+Ge,"i")],[Pi]:[new RegExp(Pi+" "+Ge),Iu],[E1]:[new RegExp("android\\s"+Ge,"i")],[y1]:[new RegExp(v1+"\\/"+Ge)],[Sh]:[new RegExp("(rv:|MSIE )"+Ge)],Mozilla:[new RegExp("rv:"+Ge)]},kM=function(t,e){var n=P1(t,e),r=EM[n];if(A(r))return null;for(var i=0;i<r.length;i++){var s=r[i],o=t.match(s);if(o)return parseFloat(o[o.length-2])}return null},Xm=[[new RegExp(hi+"; "+hi+" (.*?)[);]","i"),t=>[hi,t&&t[1]||""]],[new RegExp(Js,"i"),[Js,""]],[new RegExp(eo,"i"),[eo,""]],[Ch,[Pi,""]],[new RegExp(ls,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Pd,""];if(new RegExp(bt).test(e)&&!/IEMobile\b/.test(e))return[ls+" "+bt,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=n[1],i=xM[r]||"";return/arm/i.test(e)&&(i="RT"),[ls,i]}return[ls,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[el,e.join(".")]}return[el,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=A(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Gt+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Gt+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[Gt,e.join(".")]}return[Gt,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var n=[t[1],t[2],t[3]||"0"];e[1]=n.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[gM,""]],[/Linux|debian/i,["Linux",""]]],Qm=function(t){return wM.test(t)?Js:_M.test(t)?eo:yM.test(t)?hi:new RegExp(bd,"i").test(t)?bd:new RegExp("("+Pd+"|WPDesktop)","i").test(t)?Pd:/iPad/.test(t)?h1:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?g1:Ch.test(t)?Pi:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(qm,"i").test(t)?qm:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?!new RegExp(bt).test(t)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)?/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?Gt:f1:Gt:new RegExp("(pda|"+bt+")","i").test(t)?vM:new RegExp(Qs,"i").test(t)&&!new RegExp(Qs+" pc","i").test(t)?T1:""},Ho="https?://(.*)",bl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],CM=Cl(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],bl),Th="<masked>",TM=["li_fat_id"];function b1(t,e,n){if(!N)return{};var r,i=e?Cl([],bl,n||[]):[],s=R1(gh(N.URL,i,Th),t),o=(r={},J(TM,function(a){var l=Jt.V(a);r[a]=l||null}),r);return xe(o,s)}function R1(t,e){var n=CM.concat(e||[]),r={};return J(n,function(i){var s=Ga(t,i);r[i]=s||null}),r}function A1(t){var e=function(s){return s?s.search(Ho+"google.([^/?]*)")===0?"google":s.search(Ho+"bing.com")===0?"bing":s.search(Ho+"yahoo.com")===0?"yahoo":s.search(Ho+"duckduckgo.com")===0?"duckduckgo":null:null}(t),n=e!="yahoo"?"q":"p",r={};if(!nr(e)){r.$search_engine=e;var i=N?Ga(N.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function Zm(){return navigator.language||navigator.userLanguage}function M1(){return(N==null?void 0:N.referrer)||"$direct"}function I1(t,e){var n=t?Cl([],bl,e||[]):[],r=nt==null?void 0:nt.href.substring(0,1e3);return{r:M1().substring(0,1e3),u:r?gh(r,n,Th):void 0}}function L1(t){var e,{r:n,u:r}=t,i={$referrer:n,$referring_domain:n==null?void 0:n=="$direct"?"$direct":(e=ki(n))==null?void 0:e.host};if(r){i.$current_url=r;var s=ki(r);i.$host=s==null?void 0:s.host,i.$pathname=s==null?void 0:s.pathname;var o=R1(r);xe(i,o)}if(n){var a=A1(n);xe(i,a)}return i}function $1(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function PM(){try{return new Date().getTimezoneOffset()}catch{return}}function bM(t,e){if(!et)return{};var n,r,i,s=t?Cl([],bl,e||[]):[],[o,a]=function(l){for(var u=0;u<Xm.length;u++){var[c,d]=Xm[u],f=c.exec(l),h=f&&(Tt(d)?d(f,l):d);if(h)return h}return["",""]}(et);return xe(hh({$os:o,$os_version:a,$browser:P1(et,navigator.vendor),$device:Qm(et),$device_type:(r=et,i=Qm(r),i===h1||i===f1||i==="Kobo"||i==="Kindle Fire"||i===T1?Qs:i===Js||i===hi||i===eo||i===bd?"Console":i===g1?"Wearable":i?bt:"Desktop"),$timezone:$1(),$timezone_offset:PM()}),{$current_url:gh(nt==null?void 0:nt.href,s,Th),$host:nt==null?void 0:nt.host,$pathname:nt==null?void 0:nt.pathname,$raw_user_agent:et.length>1e3?et.substring(0,997)+"...":et,$browser_version:kM(et,navigator.vendor),$browser_language:Zm(),$browser_language_prefix:(n=Zm(),typeof n=="string"?n.split("-")[0]:void 0),$screen_height:T==null?void 0:T.screen.height,$screen_width:T==null?void 0:T.screen.width,$viewport_height:T==null?void 0:T.innerHeight,$viewport_width:T==null?void 0:T.innerWidth,$lib:"web",$lib_version:dn.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Ut=Re("[FeatureFlags]"),Lu="$active_feature_flags",Dr="$override_feature_flags",Jm="$feature_flag_payloads",qi="$override_feature_flag_payloads",ev="$feature_flag_request_id",tv=t=>{var e={};for(var[n,r]of la(t||{}))r&&(e[n]=r);return e},RM=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map(n=>{var r;return[n,(r=e[n].variant)!==null&&r!==void 0?r:e[n].enabled]})),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter(n=>e[n].enabled).filter(n=>{var r;return(r=e[n].metadata)==null?void 0:r.payload}).map(n=>{var r;return[n,(r=e[n].metadata)==null?void 0:r.payload]}))):Ut.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},AM=function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t}({});class MM{constructor(e){this.be=!1,this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.xe=!1,this.ke=!1,this._instance=e,this.featureFlagEventHandlers=[]}flags(){if(this._instance.config.__preview_remote_config)this.xe=!0;else{var e=!this.Ee&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.Ie({disableFlags:e})}}get hasLoadedFlags(){return this.ye}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(fd),n=this._instance.get_property(Dr),r=this._instance.get_property(qi);if(!r&&!n)return e||{};var i=xe({},e||{}),s=[...new Set([...Object.keys(r||{}),...Object.keys(n||{})])];for(var o of s){var a,l,u=i[o],c=n==null?void 0:n[o],d=A(c)?(a=u==null?void 0:u.enabled)!==null&&a!==void 0&&a:!!c,f=A(c)?u.variant:typeof c=="string"?c:void 0,h=r==null?void 0:r[o],y=I({},u,{enabled:d,variant:d?f??(u==null?void 0:u.variant):void 0});d!==(u==null?void 0:u.enabled)&&(y.original_enabled=u==null?void 0:u.enabled),f!==(u==null?void 0:u.variant)&&(y.original_variant=u==null?void 0:u.variant),h&&(y.metadata=I({},u==null?void 0:u.metadata,{payload:h,original_payload:u==null||(l=u.metadata)==null?void 0:l.payload})),i[o]=y}return this.be||(Ut.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:r,finalDetails:i}),this.be=!0),i}getFlagVariants(){var e=this._instance.get_property(ri),n=this._instance.get_property(Dr);if(!n)return e||{};for(var r=xe({},e),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.be||(Ut.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:n,finalFlags:r}),this.be=!0),r}getFlagPayloads(){var e=this._instance.get_property(Jm),n=this._instance.get_property(qi);if(!n)return e||{};for(var r=xe({},e||{}),i=Object.keys(n),s=0;s<i.length;s++)r[i[s]]=n[i[s]];return this.be||(Ut.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:n,finalPayloads:r}),this.be=!0),r}reloadFeatureFlags(){this.Se||this._instance.config.advanced_disable_feature_flags||this.Ee||(this.Ee=setTimeout(()=>{this.Ie()},5))}Pe(){clearTimeout(this.Ee),this.Ee=void 0}ensureFlagsLoaded(){this.ye||this.we||this.Ee||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Se=e}Ie(e){var n;if(this.Pe(),!this._instance.L())if(this.we)this.$e=!0;else{var r={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:I({},((n=this._instance.persistence)==null?void 0:n.get_initial_props())||{},this._instance.get_property(ss)||{}),group_properties:this._instance.get_property(dr)};(e!=null&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(r.disable_flags=!0);var i=this._instance.config.__preview_remote_config,s=i?"/flags/?v=2":"/flags/?v=2&config=true",o=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("api",s+o);i&&(r.timezone=$1()),this.we=!0,this._instance.Re({method:"POST",url:a,data:r,compression:this._instance.config.disable_compression?void 0:fn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var u,c,d=!0;if(l.statusCode===200&&(this.$e||(this.$anon_distinct_id=void 0),d=!1),this.we=!1,this.xe||(this.xe=!0,this._instance.Te((c=l.json)!==null&&c!==void 0?c:{})),!r.disable_flags||this.$e)if(this.ke=!d,l.json&&(u=l.json.quotaLimited)!=null&&u.includes(AM.FeatureFlags))Ut.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var f;r.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},d),this.$e&&(this.$e=!1,this.Ie())}}})}}getFeatureFlag(e,n){if(n===void 0&&(n={}),this.ye||this.getFlags()&&this.getFlags().length>0){var r=this.getFlagVariants()[e],i=""+r,s=this._instance.get_property(ev)||void 0,o=this._instance.get_property(Ua)||{};if((n.send_event||!("send_event"in n))&&(!(e in o)||!o[e].includes(i))){var a,l,u,c,d,f,h,y,m;ie(o[e])?o[e].push(i):o[e]=[i],(a=this._instance.persistence)==null||a.register({[Ua]:o});var _=this.getFeatureFlagDetails(e),p={$feature_flag:e,$feature_flag_response:r,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_request_id:s,$feature_flag_bootstrapped_response:((l=this._instance.config.bootstrap)==null||(l=l.featureFlags)==null?void 0:l[e])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[e])||null,$used_bootstrap_value:!this.ke};A(_==null||(c=_.metadata)==null?void 0:c.version)||(p.$feature_flag_version=_.metadata.version);var g,v=(d=_==null||(f=_.reason)==null?void 0:f.description)!==null&&d!==void 0?d:_==null||(h=_.reason)==null?void 0:h.code;v&&(p.$feature_flag_reason=v),_!=null&&(y=_.metadata)!=null&&y.id&&(p.$feature_flag_id=_.metadata.id),A(_==null?void 0:_.original_variant)&&A(_==null?void 0:_.original_enabled)||(p.$feature_flag_original_response=A(_.original_variant)?_.original_enabled:_.original_variant),_!=null&&(m=_.metadata)!=null&&m.original_payload&&(p.$feature_flag_original_payload=_==null||(g=_.metadata)==null?void 0:g.original_payload),this._instance.capture("$feature_flag_called",p)}return r}Ut.warn('getFeatureFlag for key "'+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}getRemoteConfigPayload(e,n){var r=this._instance.config.token;this._instance.Re({method:"POST",url:this._instance.requestRouter.endpointFor("api","/flags/?v=2&config=true"),data:{distinct_id:this._instance.get_distinct_id(),token:r},compression:this._instance.config.disable_compression?void 0:fn.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var s,o=(s=i.json)==null?void 0:s.featureFlagPayloads;n((o==null?void 0:o[e])||void 0)}})}isFeatureEnabled(e,n){if(n===void 0&&(n={}),this.ye||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(e,n);return A(r)?void 0:!!r}Ut.warn('isFeatureEnabled for key "'+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(n=>n!==e)}receivedFeatureFlags(e,n){if(this._instance.persistence){this.ye=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(o,a,l,u,c){l===void 0&&(l={}),u===void 0&&(u={}),c===void 0&&(c={});var d=RM(o),f=d.flags,h=d.featureFlags,y=d.featureFlagPayloads;if(h){var m=o.requestId;if(ie(h)){Ut.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(h)for(var p=0;p<h.length;p++)_[h[p]]=!0;a&&a.register({[Lu]:h,[ri]:_})}else{var g=h,v=y,x=f;o.errorsWhileComputingFlags&&(g=I({},l,g),v=I({},u,v),x=I({},c,x)),a&&a.register(I({[Lu]:Object.keys(tv(g)),[ri]:g||{},[Jm]:v||{},[fd]:x||{}},m?{[ev]:m}:{}))}}})(e,this._instance.persistence,r,i,s),this.Ce(n)}}override(e,n){n===void 0&&(n=!1),Ut.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:n})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return Ut.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this._instance.persistence.unregister(Dr),this._instance.persistence.unregister(qi),void this.Ce();if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.be=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(Dr);else if(r.flags)if(ie(r.flags)){for(var i={},s=0;s<r.flags.length;s++)i[r.flags[s]]=!0;this._instance.persistence.register({[Dr]:i})}else this._instance.persistence.register({[Dr]:r.flags})}return"payloads"in r&&(r.payloads===!1?this._instance.persistence.unregister(qi):r.payloads&&this._instance.persistence.register({[qi]:r.payloads})),void this.Ce()}this.Ce()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.ye){var{flags:n,flagVariants:r}=this.Me();e(n,r)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,n,r){var i,s=(this._instance.get_property(is)||[]).find(u=>u.flagKey===e),o={["$feature_enrollment/"+e]:n},a={$feature_flag:e,$feature_enrollment:n,$set:o};s&&(a.$early_access_feature_name=s.name),r&&(a.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(o,!1);var l=I({},this.getFlagVariants(),{[e]:n});(i=this._instance.persistence)==null||i.register({[Lu]:Object.keys(tv(l)),[ri]:l}),this.Ce()}getEarlyAccessFeatures(e,n,r){n===void 0&&(n=!1);var i=this._instance.get_property(is),s=r?"&"+r.map(o=>"stage="+o).join("&"):"";if(i&&!n)return e(i);this._instance.Re({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:o=>{var a,l;if(o.json){var u=o.json.earlyAccessFeatures;return(a=this._instance.persistence)==null||a.unregister(is),(l=this._instance.persistence)==null||l.register({[is]:u}),e(u)}}})}Me(){var e=this.getFlags(),n=this.getFlagVariants();return{flags:e.filter(r=>n[r]),flagVariants:Object.keys(n).filter(r=>n[r]).reduce((r,i)=>(r[i]=n[i],r),{})}}Ce(e){var{flags:n,flagVariants:r}=this.Me();this.featureFlagEventHandlers.forEach(i=>i(n,r,{errorsLoading:e}))}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(ss)||{};this._instance.register({[ss]:I({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(ss)}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0);var r=this._instance.get_property(dr)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(i=>{r[i]=I({},r[i],e[i]),delete e[i]}),this._instance.register({[dr]:I({},r,e)}),n&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var n=this._instance.get_property(dr)||{};this._instance.register({[dr]:I({},n,{[e]:{}})})}else this._instance.unregister(dr)}reset(){this.ye=!1,this.we=!1,this.Se=!1,this.$e=!1,this.xe=!1,this.ke=!1,this.$anon_distinct_id=void 0,this.Pe(),this.be=!1}}var IM=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class $u{constructor(e,n){this.A=e,this.props={},this.Oe=!1,this.Fe=(r=>{var i="";return r.token&&(i=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+i+"_posthog"})(e),this.it=this.Ae(e),this.load(),e.debug&&L.info("Persistence loaded",e.persistence,I({},this.props)),this.update_config(e,e,n),this.save()}isDisabled(){return!!this.De}Ae(e){IM.indexOf(e.persistence.toLowerCase())===-1&&(L.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n=e.persistence.toLowerCase();return n==="localstorage"&&Pe.G()?Pe:n==="localstorage+cookie"&&Fo.G()?Fo:n==="sessionstorage"&&Ne.G()?Ne:n==="memory"?fA:n==="cookie"?Jt:Fo.G()?Fo:Jt}properties(){var e={};return J(this.props,function(n,r){if(r===ri&&ye(n))for(var i=Object.keys(n),s=0;s<i.length;s++)e["$feature/"+i[s]]=n[i[s]];else a=r,l=!1,(nr(o=WR)?l:om&&o.indexOf===om?o.indexOf(a)!=-1:(J(o,function(u){if(l||(l=u===a))return Va}),l))||(e[r]=n);var o,a,l}),e}load(){if(!this.De){var e=this.it.K(this.Fe);e&&(this.props=xe({},e))}}save(){this.De||this.it.Y(this.Fe,this.props,this.je,this.Le,this.Ne,this.A.debug)}remove(){this.it.X(this.Fe,!1),this.it.X(this.Fe,!0)}clear(){this.remove(),this.props={}}register_once(e,n,r){if(ye(e)){A(n)&&(n="None"),this.je=A(r)?this.ze:r;var i=!1;if(J(e,(s,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==n||(this.props[o]=s,i=!0)}),i)return this.save(),!0}return!1}register(e,n){if(ye(e)){this.je=A(n)?this.ze:n;var r=!1;if(J(e,(i,s)=>{e.hasOwnProperty(s)&&this.props[s]!==i&&(this.props[s]=i,r=!0)}),r)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.Oe){var e=b1(this.A.custom_campaign_params,this.A.mask_personal_data_properties,this.A.custom_personal_data_properties);ni(hh(e))||this.register(e),this.Oe=!0}}update_search_keyword(){var e;this.register((e=N==null?void 0:N.referrer)?A1(e):{})}update_referrer_info(){var e;this.register_once({$referrer:M1(),$referring_domain:N!=null&&N.referrer&&((e=ki(N.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[md]||this.props[vd]||this.register_once({[Ha]:I1(this.A.mask_personal_data_properties,this.A.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};J([vd,md],o=>{var a=this.props[o];a&&J(a,function(l,u){e["$initial_"+od(u)]=l})});var n,r,i=this.props[Ha];if(i){var s=(n=L1(i),r={},J(n,function(o,a){r["$initial_"+od(a)]=o}),r);xe(e,s)}return e}safe_merge(e){return J(this.props,function(n,r){r in e||(e[r]=n)}),e}update_config(e,n,r){if(this.ze=this.je=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!r),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==n.persistence){var i=this.Ae(e),s=this.props;this.clear(),this.it=i,this.props=s,this.save()}}set_disabled(e){this.De=e,this.De?this.remove():this.save()}set_cross_subdomain(e){e!==this.Le&&(this.Le=e,this.remove(),this.save())}set_secure(e){e!==this.Ne&&(this.Ne=e,this.remove(),this.save())}set_event_timer(e,n){var r=this.props[ns]||{};r[e]=n,this.props[ns]=r,this.save()}remove_event_timer(e){var n=(this.props[ns]||{})[e];return A(n)||(delete this.props[ns][e],this.save()),n}get_property(e){return this.props[e]}set_property(e,n){this.props[e]=n,this.save()}}(function(t){return t.Button="button",t.Tab="tab",t.Selector="selector",t})({});(function(t){return t.TopLeft="top_left",t.TopRight="top_right",t.TopCenter="top_center",t.MiddleLeft="middle_left",t.MiddleRight="middle_right",t.MiddleCenter="middle_center",t.Left="left",t.Center="center",t.Right="right",t.NextToTrigger="next_to_trigger",t})({});var Nu=function(t){return t.Popover="popover",t.API="api",t.Widget="widget",t.ExternalSurvey="external_survey",t}({});(function(t){return t.Open="open",t.MultipleChoice="multiple_choice",t.SingleChoice="single_choice",t.Rating="rating",t.Link="link",t})({});(function(t){return t.NextQuestion="next_question",t.End="end",t.ResponseBased="response_based",t.SpecificQuestion="specific_question",t})({});(function(t){return t.Once="once",t.Recurring="recurring",t.Always="always",t})({});var Du=function(t){return t.SHOWN="survey shown",t.DISMISSED="survey dismissed",t.SENT="survey sent",t}({}),nv=function(t){return t.SURVEY_ID="$survey_id",t.SURVEY_NAME="$survey_name",t.SURVEY_RESPONSE="$survey_response",t.SURVEY_ITERATION="$survey_iteration",t.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",t.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",t.SURVEY_SUBMISSION_ID="$survey_submission_id",t.SURVEY_QUESTIONS="$survey_questions",t.SURVEY_COMPLETED="$survey_completed",t}({}),N1=function(t){return t.Popover="popover",t.Inline="inline",t}({});class D1{constructor(){this.Ue={},this.Ue={}}on(e,n){return this.Ue[e]||(this.Ue[e]=[]),this.Ue[e].push(n),()=>{this.Ue[e]=this.Ue[e].filter(r=>r!==n)}}emit(e,n){for(var r of this.Ue[e]||[])r(n);for(var i of this.Ue["*"]||[])i(e,n)}}class fr{constructor(e){this.qe=new D1,this.Be=(n,r)=>this.He(n,r)&&this.We(n,r)&&this.Ge(n,r),this.He=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e,this.Je=new Set,this.Ve=new Set}init(){var e;if(!A((e=this._instance)==null?void 0:e.Ke)){var n;(n=this._instance)==null||n.Ke((r,i)=>{this.on(r,i)})}}register(e){var n,r;if(!A((n=this._instance)==null?void 0:n.Ke)&&(e.forEach(o=>{var a,l;(a=this.Ve)==null||a.add(o),(l=o.steps)==null||l.forEach(u=>{var c;(c=this.Je)==null||c.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var i,s=new Set;e.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&s.add(l==null?void 0:l.selector)})}),(i=this._instance)==null||i.autocapture.setElementSelectors(s)}}on(e,n){var r;n!=null&&e.length!=0&&(this.Je.has(e)||this.Je.has(n==null?void 0:n.event))&&this.Ve&&((r=this.Ve)==null?void 0:r.size)>0&&this.Ve.forEach(i=>{this.Ye(n,i)&&this.qe.emit("actionCaptured",i.name)})}Xe(e){this.onAction("actionCaptured",n=>e(n))}Ye(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.Be(e,r))return!0;return!1}onAction(e,n){return this.qe.on(e,n)}We(e,n){if(n!=null&&n.url){var r,i=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!i||typeof i!="string"||!fr.Qe(i,n==null?void 0:n.url,(n==null?void 0:n.url_matching)||"contains"))return!1}return!0}static Qe(e,n,r){switch(r){case"regex":return!!T&&Ti(e,n);case"exact":return n===e;case"contains":var i=fr.Ze(n).replace(/_/g,".").replace(/%/g,".*");return Ti(e,i);default:return!1}}static Ze(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ge(e,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.tr(e).some(s=>!(n!=null&&n.href&&!fr.Qe(s.href||"",n==null?void 0:n.href,(n==null?void 0:n.href_matching)||"exact"))&&(n==null||!n.tag_name||s.tag_name===(n==null?void 0:n.tag_name))&&!(n!=null&&n.text&&!fr.Qe(s.text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact")&&!fr.Qe(s.$el_text||"",n==null?void 0:n.text,(n==null?void 0:n.text_matching)||"exact"))))return!1;if(n!=null&&n.selector){var r,i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(!i||!i.includes(n==null?void 0:n.selector))return!1}return!0}tr(e){return(e==null?void 0:e.properties.$elements)==null?[]:e==null?void 0:e.properties.$elements}}var te=Re("[Surveys]"),Ad="seenSurvey_",LM=(t,e)=>{var n="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(n="$survey_"+e+"/"+t.id+"/"+t.current_iteration),n},rv=t=>{var e=""+Ad+t.id;return t.current_iteration&&t.current_iteration>0&&(e=""+Ad+t.id+"_"+t.current_iteration),e},$M=[Nu.Popover,Nu.Widget,Nu.API],NM={ignoreConditions:!1,ignoreDelay:!1,displayType:N1.Popover};class DM{constructor(e){this._instance=e,this.ir=new Map,this.er=new Map}register(e){var n;A((n=this._instance)==null?void 0:n.Ke)||(this.rr(e),this.sr(e))}sr(e){var n=e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});n.length!==0&&(this.nr==null&&(this.nr=new fr(this._instance),this.nr.init(),this.nr.Xe(r=>{this.onAction(r)})),n.forEach(r=>{var i,s,o,a,l;r.conditions&&(i=r.conditions)!=null&&i.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((o=r.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.nr)==null||a.register(r.conditions.actions.values),(l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(u=>{if(u&&u.name){var c=this.er.get(u.name);c&&c.push(r.id),this.er.set(u.name,c||[r.id])}}))}))}rr(e){var n;e.filter(r=>{var i,s;return((i=r.conditions)==null?void 0:i.events)&&((s=r.conditions)==null||(s=s.events)==null||(s=s.values)==null?void 0:s.length)>0}).length!==0&&((n=this._instance)==null||n.Ke((r,i)=>{this.onEvent(r,i)}),e.forEach(r=>{var i;(i=r.conditions)==null||(i=i.events)==null||(i=i.values)==null||i.forEach(s=>{if(s&&s.name){var o=this.ir.get(s.name);o&&o.push(r.id),this.ir.set(s.name,o||[r.id])}})}))}onEvent(e,n){var r,i=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[Do])||[];if(e==="survey shown"&&n&&i.length>0){var s;te.info("survey event matched, removing survey from activated surveys",{event:e,eventPayload:n,existingActivatedSurveys:i});var o=n==null||(s=n.properties)==null?void 0:s.$survey_id;if(o){var a=i.indexOf(o);a>=0&&(i.splice(a,1),this.ar(i))}}else this.ir.has(e)&&(te.info("survey event matched, updating activated surveys",{event:e,surveys:this.ir.get(e)}),this.ar(i.concat(this.ir.get(e)||[])))}onAction(e){var n,r=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[Do])||[];this.er.has(e)&&this.ar(r.concat(this.er.get(e)||[]))}ar(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Do]:[...new Set(e)]})}getSurveys(){var e,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[Do];return n||[]}getEventToSurveys(){return this.ir}lr(){return this.nr}}class FM{constructor(e){this.hr=void 0,this._surveyManager=null,this.ur=!1,this.dr=!1,this.vr=[],this._instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var n=e.surveys;if(X(n))return te.warn("Flags not loaded yet. Not loading surveys.");var r=ie(n);this.hr=r?n.length>0:n,te.info("flags response received, isSurveysEnabled: "+this.hr),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(Ad)||r!=null&&r.startsWith("inProgressSurvey_"))&&e.push(r)}e.forEach(i=>localStorage.removeItem(i))}loadIfEnabled(){if(!this._surveyManager)if(this.dr)te.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)te.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())te.info("Not loading surveys in cookieless mode without consent.");else{var e=B==null?void 0:B.__PosthogExtensions__;if(e){if(!A(this.hr)||this._instance.config.advanced_enable_surveys){var n=this.hr||this._instance.config.advanced_enable_surveys;this.dr=!0;try{var r=e.generateSurveys;if(r)return void this.cr(r,n);var i=e.loadExternalDependency;if(!i)return void this.pr("PostHog loadExternalDependency extension not found.");i(this._instance,"surveys",s=>{s||!e.generateSurveys?this.pr("Could not load surveys script",s):this.cr(e.generateSurveys,n)})}catch(s){throw this.pr("Error initializing surveys",s),s}finally{this.dr=!1}}}else te.error("PostHog Extensions not found.")}}cr(e,n){this._surveyManager=e(this._instance,n),this._surveyEventReceiver=new DM(this._instance),te.info("Surveys loaded successfully"),this.gr({isLoaded:!0})}pr(e,n){te.error(e,n),this.gr({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.vr.push(e),this._surveyManager&&this.gr({isLoaded:!0}),()=>{this.vr=this.vr.filter(n=>n!==e)}}getSurveys(e,n){if(n===void 0&&(n=!1),this._instance.config.disable_surveys)return te.info("Disabled. Not loading surveys."),e([]);var r=this._instance.get_property(hd);if(r&&!n)return e(r,{isLoaded:!0});if(this.ur)return e([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.ur=!0,this._instance.Re({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:i=>{var s;this.ur=!1;var o=i.statusCode;if(o!==200||!i.json){var a="Surveys API could not be loaded, status: "+o;return te.error(a),e([],{isLoaded:!1,error:a})}var l,u=i.json.surveys||[],c=u.filter(d=>function(f){return!(!f.start_date||f.end_date)}(d)&&(function(f){var h;return!((h=f.conditions)==null||(h=h.events)==null||(h=h.values)==null||!h.length)}(d)||function(f){var h;return!((h=f.conditions)==null||(h=h.actions)==null||(h=h.values)==null||!h.length)}(d)));return c.length>0&&((l=this._surveyEventReceiver)==null||l.register(c)),(s=this._instance.persistence)==null||s.register({[hd]:u}),e(u,{isLoaded:!0})}})}catch(i){throw this.ur=!1,i}}gr(e){for(var n of this.vr)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(r){te.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!X(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);te.warn("init was not called")}_r(e){var n=null;return this.getSurveys(r=>{var i;n=(i=r.find(s=>s.id===e))!==null&&i!==void 0?i:null}),n}mr(e){if(X(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var n=typeof e=="string"?this._r(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(X(this._surveyManager))return te.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var n=this.mr(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return X(this._surveyManager)?(te.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(i=>{var s,o=(s=i.find(l=>l.id===e))!==null&&s!==void 0?s:null;if(o){var a=this.mr(o);r({visible:a.eligible,disabledReason:a.reason})}else r({visible:!1,disabledReason:"Survey not found"})},n)})}renderSurvey(e,n){var r;if(X(this._surveyManager))te.warn("init was not called");else{var i=typeof e=="string"?this._r(e):e;if(i!=null&&i.id)if($M.includes(i.type)){var s=N==null?void 0:N.querySelector(n);if(s)return(r=i.appearance)!=null&&r.surveyPopupDelaySeconds?(te.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var o,a;te.info("Rendering survey "+i.id+" with delay of "+((o=i.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(i,s),te.info("Survey "+i.id+" rendered")},1e3*i.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(i,s);te.warn("Survey element not found")}else te.warn("Surveys of type "+i.type+" cannot be rendered in the app");else te.warn("Survey not found")}}displaySurvey(e,n){var r;if(X(this._surveyManager))te.warn("init was not called");else{var i=this._r(e);if(i){var s=i;if((r=i.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(s=I({},i,{appearance:I({},i.appearance,{surveyPopupDelaySeconds:0})})),n.ignoreConditions===!1){var o=this.canRenderSurvey(i);if(!o.visible)return void te.warn("Survey is not eligible to be displayed: ",o.disabledReason)}n.displayType!==N1.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,n.selector)}else te.warn("Survey not found")}}}var iv=Re("[RateLimiter]");class OM{constructor(e){var n,r;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=i=>{var s=i.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach(o=>{iv.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4})}catch(o){return void iv.warn('could not rate limit - continuing. Error: "'+(o==null?void 0:o.message)+'"',{text:s})}},this.instance=e,this.captureEventsPerSecond=((n=e.config.rate_limiting)==null?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((r=e.config.rate_limiting)==null?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(e){var n,r,i;e===void 0&&(e=!1);var s=new Date().getTime(),o=(n=(r=this.instance.persistence)==null?void 0:r.get_property(gd))!==null&&n!==void 0?n:{tokens:this.captureEventsBurstLimit,last:s};o.tokens+=(s-o.last)/1e3*this.captureEventsPerSecond,o.last=s,o.tokens>this.captureEventsBurstLimit&&(o.tokens=this.captureEventsBurstLimit);var a=o.tokens<1;return a||e||(o.tokens=Math.max(0,o.tokens-1)),!a||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=a,(i=this.instance.persistence)==null||i.set_property(gd,o),{isRateLimited:a,remainingTokens:o.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ar=Re("[RemoteConfig]");class jM{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=B._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}br(e){var n,r;(n=B.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):(ar.error("PostHog Extensions not found. Cannot load remote config."),e())}yr(e){this._instance.Re({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:n=>{e(n.json)}})}load(){try{if(this.remoteConfig)return ar.info("Using preloaded remote config",this.remoteConfig),void this.Te(this.remoteConfig);if(this._instance.L())return void ar.warn("Remote config is disabled. Falling back to local config.");this.br(e=>{if(!e)return ar.info("No config found after loading remote JS config. Falling back to JSON."),void this.yr(n=>{this.Te(n)});this.Te(e)})}catch(e){ar.error("Error loading remote config",e)}}Te(e){e?this._instance.config.__preview_remote_config?(this._instance.Te(e),e.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):ar.info("__preview_remote_config is disabled. Logging config instead",e):ar.error("Failed to fetch remote config from PostHog.")}}var Md=3e3;class VM{constructor(e,n){this.wr=!0,this.Sr=[],this.$r=pt((n==null?void 0:n.flush_interval_ms)||Md,250,5e3,L.createLogger("flush interval"),Md),this.kr=e}enqueue(e){this.Sr.push(e),this.Er||this.Ir()}unload(){this.Pr();var e=this.Sr.length>0?this.Rr():{},n=Object.values(e);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.kr(I({},r,{transport:"sendBeacon"}))})}enable(){this.wr=!1,this.Ir()}Ir(){var e=this;this.wr||(this.Er=setTimeout(()=>{if(this.Pr(),this.Sr.length>0){var n=this.Rr(),r=function(){var s=n[i],o=new Date().getTime();s.data&&ie(s.data)&&J(s.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),e.kr(s)};for(var i in n)r()}},this.$r))}Pr(){clearTimeout(this.Er),this.Er=void 0}Rr(){var e={};return J(this.Sr,n=>{var r,i=n,s=(i?i.batchKey:null)||i.url;A(e[s])&&(e[s]=I({},i,{data:[]})),(r=e[s].data)==null||r.push(i.data)}),this.Sr=[],e}}var BM=["retriesPerformedSoFar"];class zM{constructor(e){this.Tr=!1,this.Cr=3e3,this.Sr=[],this._instance=e,this.Sr=[],this.Mr=!0,!A(T)&&"onLine"in T.navigator&&(this.Mr=T.navigator.onLine,fe(T,"online",()=>{this.Mr=!0,this.ne()}),fe(T,"offline",()=>{this.Mr=!1}))}get length(){return this.Sr.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,r=Rw(e,BM);Ue(n)&&n>0&&(r.url=Ja(r.url,{retry_count:n})),this._instance.Re(I({},r,{callback:i=>{i.statusCode!==200&&(i.statusCode<400||i.statusCode>=500)&&(n??0)<10?this.Or(I({retriesPerformedSoFar:n},r)):r.callback==null||r.callback(i)}}))}Or(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=function(o){var a=3e3*Math.pow(2,o),l=a/2,u=Math.min(18e5,a),c=(Math.random()-.5)*(u-l);return Math.ceil(u+c)}(n),i=Date.now()+r;this.Sr.push({retryAt:i,requestOptions:e});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),L.warn(s),this.Tr||(this.Tr=!0,this.Fr())}Fr(){this.Ar&&clearTimeout(this.Ar),this.Ar=setTimeout(()=>{this.Mr&&this.Sr.length>0&&this.ne(),this.Fr()},this.Cr)}ne(){var e=Date.now(),n=[],r=this.Sr.filter(s=>s.retryAt<e||(n.push(s),!1));if(this.Sr=n,r.length>0)for(var{requestOptions:i}of r)this.retriableRequest(i)}unload(){for(var{requestOptions:e}of(this.Ar&&(clearTimeout(this.Ar),this.Ar=void 0),this.Sr))try{this._instance.Re(I({},e,{transport:"sendBeacon"}))}catch(n){L.error(n)}this.Sr=[]}}class UM{constructor(e){this.Dr=()=>{var n,r,i,s;this.jr||(this.jr={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=a+((o==null?void 0:o.clientHeight)||0),c=(o==null?void 0:o.scrollHeight)||0;this.jr.lastScrollY=Math.ceil(a),this.jr.maxScrollY=Math.max(a,(n=this.jr.maxScrollY)!==null&&n!==void 0?n:0),this.jr.maxScrollHeight=Math.max(l,(r=this.jr.maxScrollHeight)!==null&&r!==void 0?r:0),this.jr.lastContentY=u,this.jr.maxContentY=Math.max(u,(i=this.jr.maxContentY)!==null&&i!==void 0?i:0),this.jr.maxContentHeight=Math.max(c,(s=this.jr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}getContext(){return this.jr}resetContext(){var e=this.jr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){fe(T,"scroll",this.Dr,{capture:!0}),fe(T,"scrollend",this.Dr,{capture:!0}),fe(T,"resize",this.Dr)}scrollElement(){if(!this._instance.config.scroll_root_selector)return T==null?void 0:T.document.documentElement;var e=ie(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var n of e){var r=T==null?void 0:T.document.querySelector(n);if(r)return r}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return T&&(T.scrollY||T.pageYOffset||T.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return T&&(T.scrollX||T.pageXOffset||T.document.documentElement.scrollLeft)||0}}var HM=t=>I1(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties);class sv{constructor(e,n,r,i){this.Lr=s=>{var o=this.Nr();if(!o||o.sessionId!==s){var a={sessionId:s,props:this.zr(this._instance)};this.Ur.register({[pd]:a})}},this._instance=e,this.qr=n,this.Ur=r,this.zr=i||HM,this.qr.onSessionId(this.Lr)}Nr(){return this.Ur.props[pd]}getSetOnceProps(){var e,n=(e=this.Nr())==null?void 0:e.props;return n?"r"in n?L1(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var e={};return J(hh(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+od(r)]=n}),e}}var Fu=Re("[SessionId]");class ov{constructor(e,n,r){var i;if(this.Br=[],this.Hr=(c,d)=>Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.A=e.config,this.Ur=e.persistence,this.pi=void 0,this.Ft=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Wr=n||Dn,this.Gr=r||Dn;var s=this.A.persistence_name||this.A.token,o=this.A.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*pt(o,60,36e3,Fu.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.Jr(),this.Vr="ph_"+s+"_window_id",this.Kr="ph_"+s+"_primary_window_exists",this.Yr()){var a=Ne.K(this.Vr),l=Ne.K(this.Kr);a&&!l?this.pi=a:Ne.X(this.Vr),Ne.Y(this.Kr,!0)}if((i=this.A.bootstrap)!=null&&i.sessionID)try{var u=(c=>{var d=c.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.A.bootstrap.sessionID);this.Xr(this.A.bootstrap.sessionID,new Date().getTime(),u)}catch(c){Fu.error("Invalid sessionID in bootstrap",c)}this.Qr()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return A(this.Br)&&(this.Br=[]),this.Br.push(e),this.Ft&&e(this.Ft,this.pi),()=>{this.Br=this.Br.filter(n=>n!==e)}}Yr(){return this.A.persistence!=="memory"&&!this.Ur.De&&Ne.G()}Zr(e){e!==this.pi&&(this.pi=e,this.Yr()&&Ne.Y(this.Vr,e))}ts(){return this.pi?this.pi:this.Yr()?Ne.K(this.Vr):null}Xr(e,n,r){e===this.Ft&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.Ft=e,this.Ur.register({[za]:[n,e,r]}))}es(){if(this.Ft&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this.Ft,this._sessionStartTimestamp];var e=this.Ur.props[za];return ie(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Xr(null,null,null)}Qr(){fe(T,"beforeunload",()=>{this.Yr()&&Ne.X(this.Kr)},{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.A.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[i,s,o]=this.es(),a=this.ts(),l=Ue(o)&&o>0&&Math.abs(r-o)>864e5,u=!1,c=!s,d=!e&&this.Hr(r,i);c||d||l?(s=this.Wr(),a=this.Gr(),Fu.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}}),o=r,u=!0):a||(a=this.Gr(),u=!0);var f=i===0||!e||l?r:i,h=o===0?new Date().getTime():o;return this.Zr(a),this.Xr(s,f,h),e||this.Jr(),u&&this.Br.forEach(y=>y(s,a,u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:h,changeReason:u?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:i}}Jr(){clearTimeout(this.rs),this.rs=setTimeout(()=>{var[e]=this.es();this.Hr(new Date().getTime(),e)&&this.resetSessionId()},1.1*this.sessionTimeoutMs)}}var WM=["$set_once","$set"],Pn=Re("[SiteApps]");class KM{constructor(e){this._instance=e,this.ss=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}ns(e,n){if(n){var r=this.globalsForEvent(n);this.ss.push(r),this.ss.length>1e3&&(this.ss=this.ss.slice(10))}}get siteAppLoaders(){var e;return(e=B._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}init(){if(this.isEnabled){var e=this._instance.Ke(this.ns.bind(this));this.os=()=>{e(),this.ss=[],this.os=void 0}}}globalsForEvent(e){var n,r,i,s,o,a,l;if(!e)throw new Error("Event payload is required");var u={},c=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,h]of Object.entries(d))u[f]={id:c[f],type:f,properties:h};var{$set_once:y,$set:m}=e;return{event:I({},Rw(e,WM),{properties:I({},e.properties,m?{$set:I({},(n=(r=e.properties)==null?void 0:r.$set)!==null&&n!==void 0?n:{},m)}:{},y?{$set_once:I({},(i=(s=e.properties)==null?void 0:s.$set_once)!==null&&i!==void 0?i:{},y)}:{}),elements_chain:(o=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&o!==void 0?o:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var n=this.apps[e.id],r=()=>{var a;!n.errored&&this.ss.length&&(Pn.info("Processing "+this.ss.length+" events for site app with id "+e.id),this.ss.forEach(l=>n.processEvent==null?void 0:n.processEvent(l)),n.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((a=this.os)==null||a.call(this))},i=!1,s=a=>{n.errored=!a,n.loaded=!0,Pn.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),i&&r()};try{var{processEvent:o}=e.init({posthog:this._instance,callback:a=>{s(a)}});o&&(n.processEvent=o),i=!0}catch(a){Pn.error("Error while initializing PostHog app with config id "+e.id,a),s(!1)}if(i&&n.loaded)try{r()}catch(a){Pn.error("Error while processing buffered events PostHog app with config id "+e.id,a),n.errored=!0}}ls(){var e=this.siteAppLoaders||[];for(var n of e)this.apps[n.id]={id:n.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of e)this.setupSiteApp(r)}hs(e){if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(n)}catch(i){Pn.error("Error while processing event "+e.event+" for site app "+r.id,i)}}}onRemoteConfig(e){var n,r,i,s=this;if((n=this.siteAppLoaders)!=null&&n.length)return this.isEnabled?(this.ls(),void this._instance.on("eventCaptured",u=>this.hs(u))):void Pn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.os)==null||r.call(this),(i=e.siteApps)!=null&&i.length)if(this.isEnabled){var o=function(u){var c;B["__$$ph_site_app_"+u]=s._instance,(c=B.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,l,d=>{if(d)return Pn.error("Error while initializing PostHog app with config id "+u,d)})};for(var{id:a,url:l}of e.siteApps)o(a)}else Pn.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var GM=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],av=function(t,e){if(!t)return!1;var n=t.toLowerCase();return GM.concat(e||[]).some(r=>{var i=r.toLowerCase();return n.indexOf(i)!==-1})},F1=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&av(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some(i=>av(i==null?void 0:i.brand,e)))return!0}catch{}return!!t.webdriver},us=function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t}({}),lv="i.posthog.com";class YM{constructor(e){this.us={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+lv,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.us[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.us[this.apiHost]=us.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.us[this.apiHost]=us.EU:this.us[this.apiHost]=us.CUSTOM),this.us[this.apiHost]}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(this.region===us.CUSTOM)return this.apiHost+n;var r=lv+n;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var qM={icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!T&&Ti(e.href,t),not_regex:(t,e)=>!!T&&!Ti(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};class Be{constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(i=>{Be.ds("retrieved web experiments from the server"),n.vs=new Map,i.forEach(s=>{if(s.feature_flag_key){var o;n.vs&&(Be.ds("setting flag key ",s.feature_flag_key," to web experiment ",s),(o=n.vs)==null||o.set(s.feature_flag_key,s));var a=n._instance.getFeatureFlag(s.feature_flag_key);_e(a)&&s.variants[a]&&n.cs(s.name,a,s.variants[a].transforms)}else if(s.variants)for(var l in s.variants){var u=s.variants[l];Be.fs(u)&&n.cs(s.name,l,u.transforms)}})},r)},this._instance=e,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}onFeatureFlags(e){if(this._is_bot())Be.ds("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(X(this.vs))return this.vs=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Be.ds("applying feature flags",e),e.forEach(n=>{var r;if(this.vs&&(r=this.vs)!=null&&r.has(n)){var i,s=this._instance.getFeatureFlag(n),o=(i=this.vs)==null?void 0:i.get(n);s&&o!=null&&o.variants[s]&&this.cs(o.name,s,o.variants[s].transforms)}})}}previewWebExperiment(){var e=Be.getWindowLocation();if(e!=null&&e.search){var n=Ga(e==null?void 0:e.search,"__experiment_id"),r=Ga(e==null?void 0:e.search,"__experiment_variant");n&&r&&(Be.ds("previewing web experiments "+n+" && "+r),this.getWebExperiments(i=>{this.ps(parseInt(n),r,i)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this._instance.config.disable_web_experiments&&!r)return e([]);var i=this._instance.get_property("$web_experiments");if(i&&!n)return e(i);this._instance.Re({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return e([]);var o=s.json.experiments||[];return e(o)}})}ps(e,n,r){var i=r.filter(s=>s.id===e);i&&i.length>0&&(Be.ds("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this.cs(i[0].name,n,i[0].variants[n].transforms))}static fs(e){return!X(e.conditions)&&Be.gs(e)&&Be._s(e)}static gs(e){var n;if(X(e.conditions)||X((n=e.conditions)==null?void 0:n.url))return!0;var r,i,s,o=Be.getWindowLocation();return!!o&&((r=e.conditions)==null||!r.url||qM[(i=(s=e.conditions)==null?void 0:s.urlMatchType)!==null&&i!==void 0?i:"icontains"](e.conditions.url,o))}static getWindowLocation(){return T==null?void 0:T.location}static _s(e){var n;if(X(e.conditions)||X((n=e.conditions)==null?void 0:n.utm))return!0;var r=b1();if(r.utm_source){var i,s,o,a,l,u,c,d,f=(i=e.conditions)==null||(i=i.utm)==null||!i.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,h=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==r.utm_source,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,m=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==r.utm_term;return f&&y&&m&&h}return!1}static ds(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];L.info("[WebExperiments] "+e,r)}cs(e,n,r){this._is_bot()?Be.ds("Refusing to render web experiment since the viewer is a likely bot"):n!=="control"?r.forEach(i=>{if(i.selector){var s;Be.ds("applying transform of variant "+n+" for experiment "+e+" ",i);var o=(s=document)==null?void 0:s.querySelectorAll(i.selector);o==null||o.forEach(a=>{var l=a;i.html&&(l.innerHTML=i.html),i.css&&l.setAttribute("style",i.css)})}}):Be.ds("Control variants leave the page unmodified.")}_is_bot(){return ht&&this._instance?F1(ht,this._instance.config.custom_blocked_useragents):void 0}}var XM=Re("[PostHog ExternalIntegrations]"),QM={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class ZM{constructor(e){this._instance=e}nt(e,n){var r;(r=B.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,i=>{if(i)return XM.error("failed to load script",i);n()})}startIfEnabledOrStop(){var e=this,n=function(o){var a,l,u;!i||(a=B.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||e.nt(QM[o],()=>{var c;(c=B.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.start(e._instance)}),!i&&(l=B.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((u=B.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.stop())};for(var[r,i]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var Id="[SessionRecording]",Wo=Re(Id);class JM{get started(){var e;return!((e=this.bs)==null||!e.isStarted)}get status(){var e;return((e=this.bs)==null?void 0:e.status)||"lazy_loading"}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._instance=e,!this._instance.sessionManager)throw Wo.error("started without valid sessionManager"),new Error(Id+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Id+' cannot be used with cookieless_mode="always"')}get qt(){var e=!!this._instance.get_property(Xs),n=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return T&&e&&n&&!r}startIfEnabledOrStop(e){var n;if(!this.qt||(n=this.bs)==null||!n.isStarted){var r=!A(Object.assign)&&!A(Array.from);this.qt&&r?(this.ys(e),Wo.info("starting")):this.stopRecording()}}ys(e){var n,r,i;this.qt&&(B!=null&&(n=B.__PosthogExtensions__)!=null&&(n=n.rrweb)!=null&&n.record&&(r=B.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Ii(e):(i=B.__PosthogExtensions__)==null||i.loadExternalDependency==null||i.loadExternalDependency(this._instance,this.Pi,s=>{if(s)return Wo.error("could not load recorder",s);this.Ii(e)}))}stopRecording(){var e;(e=this.bs)==null||e.stop()}onRemoteConfig(e){this.ws=e;var n,r=this._instance.persistence;r&&r.register({[Xs]:!!e.sessionRecording,[Ba]:(n=e.sessionRecording)==null?void 0:n.scriptConfig}),this.bs?(this.bs.onRemoteConfig(e),this.ws=void 0):this.ys(),this.startIfEnabledOrStop()}log(e,n){var r;n===void 0&&(n="log"),(r=this.bs)!=null&&r.log?this.bs.log(e,n):Wo.warn("log called before recorder was ready")}get Pi(){var e;return((e=this._instance)==null||(e=e.persistence)==null||(e=e.get_property(Ba))==null?void 0:e.script)||"lazy-recorder"}Ii(e){var n,r;if((n=B.__PosthogExtensions__)==null||!n.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.bs||(this.bs=(r=B.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture,this.ws&&(this.bs.onRemoteConfig(this.ws),this.ws=void 0)),this.bs.start(e)}onRRwebEmit(e){var n;(n=this.bs)==null||n.onRRwebEmit==null||n.onRRwebEmit(e)}overrideLinkedFlag(){var e;(e=this.bs)==null||e.overrideLinkedFlag()}overrideSampling(){var e;(e=this.bs)==null||e.overrideSampling()}overrideTrigger(e){var n;(n=this.bs)==null||n.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.bs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,n){var r;return!((r=this.bs)==null||!r.tryAddCustomEvent(e,n))}}var Cs={},Ld=()=>{},Fr="posthog",O1=!fM&&(et==null?void 0:et.indexOf("MSIE"))===-1&&(et==null?void 0:et.indexOf("Mozilla"))===-1,uv=t=>{var e;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:HR(N==null?void 0:N.location),persistence:"localStorage+cookie",persistence_name:"",loaded:Ld,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:t!=="2025-05-24"||"history_change",capture_pageleave:"if_capture_pageview",defaults:t??"unset",debug:nt&&_e(nt==null?void 0:nt.search)&&nt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(T==null||(e=T.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:n=>{var r="Bad HTTP status: "+n.statusCode+" "+n.text;L.error(r)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:Md},error_tracking:{},_onCapture:Ld,__preview_eager_load_replay:!0}},cv=t=>{var e={};A(t.process_person)||(e.person_profiles=t.process_person),A(t.xhr_headers)||(e.request_headers=t.xhr_headers),A(t.cookie_name)||(e.persistence_name=t.cookie_name),A(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),A(t.store_google)||(e.save_campaign_params=t.store_google),A(t.verbose)||(e.debug=t.verbose);var n=xe({},e,t);return ie(t.property_blacklist)&&(A(t.property_denylist)?n.property_denylist=t.property_blacklist:ie(t.property_denylist)?n.property_denylist=[...t.property_blacklist,...t.property_denylist]:L.error("Invalid value for property_denylist config: "+t.property_denylist)),n};class e2{constructor(){this.__forceAllowLocalhost=!1}get Ss(){return this.__forceAllowLocalhost}set Ss(e){L.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Rl{get decideEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){this.webPerformance=new e2,this.$s=!1,this.version=dn.LIB_VERSION,this.xs=new D1,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=uv(),this.SentryIntegration=nM,this.sentryIntegration=e=>function(n,r){var i=d1(n,r);return{name:c1,processEvent:s=>i(s)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.ks=!1,this.Es=null,this.Is=null,this.Ps=null,this.featureFlags=new MM(this),this.toolbar=new iM(this),this.scrollManager=new UM(this),this.pageViewManager=new cM(this),this.surveys=new FM(this),this.experiments=new Be(this),this.exceptions=new pM(this),this.rateLimiter=new OM(this),this.requestRouter=new YM(this),this.consent=new hA(this),this.externalIntegrations=new ZM(this),this.people={set:(e,n,r)=>{var i=_e(e)?{[e]:n}:e;this.setPersonProperties(i),r==null||r({})},set_once:(e,n,r)=>{var i=_e(e)?{[e]:n}:e;this.setPersonProperties(void 0,i),r==null||r({})}},this.on("eventCaptured",e=>L.info('send "'+(e==null?void 0:e.event)+'"',e))}init(e,n,r){if(r&&r!==Fr){var i,s=(i=Cs[r])!==null&&i!==void 0?i:new Rl;return s._init(e,n,r),Cs[r]=s,Cs[Fr][r]=s,s}return this._init(e,n,r)}_init(e,n,r){var i,s;if(n===void 0&&(n={}),A(e)||ad(e))return L.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return L.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},this.Rs=n,this.Ts=[],n.person_profiles&&(this.Is=n.person_profiles),this.set_config(xe({},uv(n.defaults),cv(n),{name:r,token:e})),this.config.on_xhr_error&&L.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:fn.GZipJS;var o=this.Cs();this.persistence=new $u(this.config,o),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new $u(I({},this.config,{persistence:"sessionStorage"}),o);var a=I({},this.persistence.props),l=I({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ms=new VM(v=>this.Os(v),this.config.request_queue_config),this.Fs=new zM(this),this.__request_queue=[];var u=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(u||(this.sessionManager=new ov(this),this.sessionPropsManager=new sv(this,this.sessionManager,this.persistence)),new oM(this).startIfEnabledOrStop(),this.siteApps=new KM(this),(i=this.siteApps)==null||i.init(),u||(this.config.__preview_eager_load_replay?this.sessionRecording=new Bm(this):this.sessionRecording=new JM(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new sA(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new uM(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new aM(this),this.exceptionObserver=new mA(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new Xw(this,gA),this.deadClicksAutocapture.startIfEnabled(),this.historyAutocapture=new AA(this),this.historyAutocapture.startIfEnabled(),dn.DEBUG=dn.DEBUG||this.config.debug,dn.DEBUG&&L.info("Starting in debug mode",{this:this,config:n,thisC:I({},this.config),p:a,s:l}),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,d,f=this.config.get_device_id(Dn()),h=(c=n.bootstrap)!=null&&c.isIdentifiedID?f:n.bootstrap.distinctID;this.persistence.set_property(an,(d=n.bootstrap)!=null&&d.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:n.bootstrap.distinctID,$device_id:h})}if(this.As()){var y,m,_=Object.keys(((y=n.bootstrap)==null?void 0:y.featureFlags)||{}).filter(v=>{var x;return!((x=n.bootstrap)==null||(x=x.featureFlags)==null||!x[v])}).reduce((v,x)=>{var w;return v[x]=((w=n.bootstrap)==null||(w=w.featureFlags)==null?void 0:w[x])||!1,v},{}),p=Object.keys(((m=n.bootstrap)==null?void 0:m.featureFlagPayloads)||{}).filter(v=>_[v]).reduce((v,x)=>{var w,E;return(w=n.bootstrap)!=null&&(w=w.featureFlagPayloads)!=null&&w[x]&&(v[x]=(E=n.bootstrap)==null||(E=E.featureFlagPayloads)==null?void 0:E[x]),v},{});this.featureFlags.receivedFeatureFlags({featureFlags:_,featureFlagPayloads:p})}if(u)this.register_once({distinct_id:Hi,$device_id:null},"");else if(!this.get_distinct_id()){var g=this.config.get_device_id(Dn());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(an,"anonymous")}return fe(T,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?tM(this,()=>this.Ds()):this.Ds(),Tt(this.config._onCapture)&&this.config._onCapture!==Ld&&(L.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",v=>this.config._onCapture(v.event,v))),this.config.ip&&L.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Te(e){var n,r,i,s,o,a,l,u;if(!N||!N.body)return L.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Te(e)},500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=W(e.supportedCompression,fn.GZipJS)?fn.GZipJS:W(e.supportedCompression,fn.Base64)?fn.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Is?this.Is:"identified_only"}),(r=this.siteApps)==null||r.onRemoteConfig(e),(i=this.sessionRecording)==null||i.onRemoteConfig(e),(s=this.autocapture)==null||s.onRemoteConfig(e),(o=this.heatmaps)==null||o.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(a=this.webVitalsAutocapture)==null||a.onRemoteConfig(e),(l=this.exceptionObserver)==null||l.onRemoteConfig(e),this.exceptions.onRemoteConfig(e),(u=this.deadClicksAutocapture)==null||u.onRemoteConfig(e)}Ds(){try{this.config.loaded(this)}catch(e){L.critical("`loaded` function failed",e)}this.js(),this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Ls()},1),new jM(this).load(),this.featureFlags.flags()}js(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.Ms)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Wn(this.__request_queue,e=>this.Os(e)),this.__request_queue=[],this.js()}_handle_unload(){var e,n;this.config.request_batching?(this.Ns()&&this.capture("$pageleave"),(e=this.Ms)==null||e.unload(),(n=this.Fs)==null||n.unload()):this.Ns()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}Re(e){this.__loaded&&(O1?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Ja(e.url,{ip:this.config.ip?1:0}),e.headers=I({},this.config.request_headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var r,i,s,o=I({},n);o.timeout=o.timeout||6e4,o.url=Ja(o.url,{_:new Date().getTime().toString(),ver:dn.LIB_VERSION,compression:o.compression});var a=(r=o.transport)!==null&&r!==void 0?r:"fetch",l=ca.filter(c=>!o.disableTransport||!c.transport||!o.disableTransport.includes(c.transport)),u=(i=(s=$w(l,c=>c.transport===a))==null?void 0:s.method)!==null&&i!==void 0?i:l[0].method;if(!u)throw new Error("No available transport method");u(o)})(I({},e,{callback:n=>{var r,i;this.rateLimiter.checkForLimiting(n),n.statusCode>=400&&((r=(i=this.config).on_request_error)==null||r.call(i,n)),e.callback==null||e.callback(n)}}))))}Os(e){this.Fs?this.Fs.retriableRequest(e):this.Re(e)}_execute_array(e){var n,r=[],i=[],s=[];Wn(e,a=>{a&&(n=a[0],ie(n)?s.push(a):Tt(a)?a.call(this):ie(a)&&n==="alias"?r.push(a):ie(a)&&n.indexOf("capture")!==-1&&Tt(this[n])?s.push(a):i.push(a))});var o=function(a,l){Wn(a,function(u){if(ie(u[0])){var c=l;J(u,function(d){c=c[d[0]].apply(c,d.slice(1))})}else this[u[0]].apply(this,u.slice(1))},l)};o(r,this),o(i,this),o(s,this)}As(){var e,n;return((e=this.config.bootstrap)==null?void 0:e.featureFlags)&&Object.keys((n=this.config.bootstrap)==null?void 0:n.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,n,r){var i;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ms){if(this.is_capturing())if(!A(e)&&_e(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var s=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(s==null||!s.isRateLimited){n!=null&&n.$current_url&&!_e(n==null?void 0:n.$current_url)&&(L.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,a=(r==null?void 0:r.timestamp)||o,l=Dn(),u={uuid:l,event:e,properties:this.calculateEventProperties(e,n||{},a,l)};s&&(u.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),r!=null&&r.$set&&(u.$set=r==null?void 0:r.$set);var c,d=this.zs(r==null?void 0:r.$set_once);if(d&&(u.$set_once=d),(u=zR(u,r!=null&&r._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,A(r==null?void 0:r.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o),e===Du.DISMISSED||e===Du.SENT){var f=n==null?void 0:n[nv.SURVEY_ID],h=n==null?void 0:n[nv.SURVEY_ITERATION];c={id:f,current_iteration:h},localStorage.getItem(rv(c))||localStorage.setItem(rv(c),"true"),u.$set=I({},u.$set,{[LM({id:f,current_iteration:h},e===Du.SENT?"responded":"dismissed")]:!0})}var y=I({},u.properties.$set,u.$set);if(ni(y)||this.setPersonPropertiesForFlags(y),!X(this.config.before_send)){var m=this.Us(u);if(!m)return;u=m}this.xs.emit("eventCaptured",u);var _={method:"POST",url:(i=r==null?void 0:r._url)!==null&&i!==void 0?i:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:r==null?void 0:r._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Os(_):this.Ms.enqueue(_),u}L.critical("This capture call is ignored due to client rate limiting.")}}else L.error("No event name provided to posthog.capture")}else L.uninitializedWarning("posthog.capture")}Ke(e){return this.on("eventCaptured",n=>e(n.event,n))}calculateEventProperties(e,n,r,i,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var o=s?void 0:this.persistence.remove_event_timer(e),a=I({},n);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var l=I({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!_e(a.distinct_id)&&!Ue(a.distinct_id)||ad(a.distinct_id))&&L.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var u,c=bM(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());a.$session_id=d,a.$window_id=f}this.sessionPropsManager&&xe(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&xe(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.Fs)==null?void 0:h.length}catch(p){a.$sdk_debug_error_capturing_properties=String(p)}if(this.requestRouter.region===us.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),u=e!=="$pageview"||s?e!=="$pageleave"||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,i),a=xe(a,u),e==="$pageview"&&N&&(a.title=N.title),!A(o)){var y=r.getTime()-o;a.$duration=parseFloat((y/1e3).toFixed(3))}et&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=xe({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),ie(this.config.property_denylist)?J(this.config.property_denylist,function(p){delete a[p]}):L.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var m=this.config.sanitize_properties;m&&(L.error("sanitize_properties is deprecated. Use before_send instead"),a=m(a,e));var _=this.qs();return a.$process_person_profile=_,_&&!s&&this.Bs("_calculate_event_properties"),a}zs(e){var n;if(!this.persistence||!this.qs()||this.$s)return e;var r=this.persistence.get_initial_props(),i=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),s=xe({},r,i||{},e||{}),o=this.config.sanitize_properties;return o&&(L.error("sanitize_properties is deprecated. Use before_send instead"),s=o(s,"$set_once")),this.$s=!0,ni(s)?void 0:s}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var i;(i=this.persistence)==null||i.register_once(e,n,r)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Hs(e,n){this.register({[e]:n})}getFeatureFlag(e,n){return this.featureFlags.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(n)}catch{return n}}isFeatureEnabled(e,n){return this.featureFlags.isFeatureEnabled(e,n)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,n,r){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){return n===void 0&&(n=!1),this.featureFlags.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.xs.on(e,n)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSurveysLoaded(e){return this.surveys.onSurveysLoaded(e)}onSessionId(e){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(e))!==null&&n!==void 0?n:()=>{}}getSurveys(e,n){n===void 0&&(n=!1),this.surveys.getSurveys(e,n)}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys.getActiveMatchingSurveys(e,n)}renderSurvey(e,n){this.surveys.renderSurvey(e,n)}displaySurvey(e,n){n===void 0&&(n=NM),this.surveys.displaySurvey(e,n)}canRenderSurvey(e){return this.surveys.canRenderSurvey(e)}canRenderSurveyAsync(e,n){return n===void 0&&(n=!1),this.surveys.canRenderSurveyAsync(e,n)}identify(e,n,r){if(!this.__loaded||!this.persistence)return L.uninitializedWarning("posthog.identify");if(Ue(e)&&(e=e.toString(),L.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))L.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==Hi){if(this.Bs("posthog.identify")){var i=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}e!==i&&e!==this.get_property(ts)&&(this.unregister(ts),this.register({distinct_id:e}));var o=(this.persistence.get_property(an)||"anonymous")==="anonymous";e!==i&&o?(this.persistence.set_property(an,"identified"),this.setPersonPropertiesForFlags(I({},r||{},n||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.Ps=Gm(e,n,r),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),e!==i&&(this.reloadFeatureFlags(),this.unregister(Ua))}}else L.critical('The string "'+Hi+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else L.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,n){if((e||n)&&this.Bs("posthog.setPersonProperties")){var r=Gm(this.get_distinct_id(),e,n);this.Ps!==r?(this.setPersonPropertiesForFlags(I({},n||{},e||{})),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ps=r):L.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,n,r){if(e&&n){if(this.Bs("posthog.group")){var i=this.getGroups();i[e]!==n&&this.resetGroupPropertiesForFlags(e),this.register({$groups:I({},i,{[e]:n})}),r&&(this.capture("$groupidentify",{$group_type:e,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags({[e]:r})),i[e]===n||r||this.reloadFeatureFlags()}}else L.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){n===void 0&&(n=!0),this.featureFlags.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,n){n===void 0&&(n=!0),this.Bs("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,n)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var n,r,i,s;if(L.info("reset"),!this.__loaded)return L.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),this.surveys.reset(),this.featureFlags.reset(),(i=this.persistence)==null||i.set_property(an,"anonymous"),(s=this.sessionManager)==null||s.resetSessionId(),this.Ps=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:Hi,$device_id:null},"");else{var a=this.config.get_device_id(Dn());this.register_once({distinct_id:a,$device_id:e?a:o},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&r){var s,o=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return i;i+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-o,0)}return i}alias(e,n){return e===this.get_property(Nw)?(L.critical("Attempting to create alias for existing People user - aborting."),-2):this.Bs("posthog.alias")?(A(n)&&(n=this.get_distinct_id()),e!==n?(this.Hs(ts,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(L.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=I({},this.config);if(ye(e)){var r,i,s,o,a;xe(this.config,cv(e));var l=this.Cs();(r=this.persistence)==null||r.update_config(this.config,n,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new $u(I({},this.config,{persistence:"sessionStorage"}),l),Pe.G()&&Pe.V("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(dn.DEBUG=!0,L.info("set_config",{config:e,oldConfig:n,newConfig:I({},this.config)})),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(o=this.heatmaps)==null||o.startIfEnabled(),this.surveys.loadIfEnabled(),this.Ws(),(a=this.externalIntegrations)==null||a.startIfEnabledOrStop()}}startSessionRecording(e){var n=e===!0,r={sampling:n||!(e==null||!e.sampling),linked_flag:n||!(e==null||!e.linked_flag),url_trigger:n||!(e==null||!e.url_trigger),event_trigger:n||!(e==null||!e.event_trigger)};if(Object.values(r).some(Boolean)){var i,s,o,a,l;(i=this.sessionManager)==null||i.checkAndGetSessionAndWindowId(),r.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),r.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),r.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),r.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){var r=new Error("PostHog syntheticException");return this.exceptions.sendExceptionEvent(I({},RA((i=>i instanceof Error)(e)?{error:e,event:e.message}:{event:e},{syntheticException:r}),n))}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){var n;return(n=this.persistence)==null?void 0:n.props[e]}getSessionProperty(e){var n;return(n=this.sessionPersistence)==null?void 0:n.props[e]}toString(){var e,n=(e=this.config.name)!==null&&e!==void 0?e:Fr;return n!==Fr&&(n=Fr+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(an))==="identified"||((n=this.sessionPersistence)==null?void 0:n.get_property(an))==="identified"}qs(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&ni(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[ts])&&((n=this.persistence)==null||(n=n.props)==null||!n[Wa]))}Ns(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.qs()||this.Bs("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Bs(e){return this.config.person_profiles==="never"?(L.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Hs(Wa,!0),!0)}Cs(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),n=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!n}Ws(){var e,n,r,i,s=this.Cs();return((e=this.persistence)==null?void 0:e.De)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.De)!==s&&((i=this.sessionPersistence)==null||i.set_disabled(s)),s}opt_in_capturing(e){if(this.config.cookieless_mode!=="always"){var n;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),this.sessionManager=new ov(this),this.persistence&&(this.sessionPropsManager=new sv(this,this.sessionManager,this.persistence)),this.sessionRecording=new Bm(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Ws(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(A(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((n=e==null?void 0:e.captureEventName)!==null&&n!==void 0?n:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ls()}else L.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Ws(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:Hi,$device_id:null}),this.sessionManager=void 0,this.sessionPropsManager=void 0,(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,this.Ls())):L.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===ln.GRANTED?"granted":e===ln.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Ws()}_is_bot(){return ht?F1(ht,this.config.custom_blocked_useragents):void 0}Ls(){N&&(N.visibilityState==="visible"?this.ks||(this.ks=!0,this.capture("$pageview",{title:N.title},{send_instantly:!0}),this.Es&&(N.removeEventListener("visibilitychange",this.Es),this.Es=null)):this.Es||(this.Es=this.Ls.bind(this),fe(N,"visibilitychange",this.Es)))}debug(e){e===!1?(T==null||T.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(T==null||T.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}L(){var e,n,r,i,s,o,a,l=this.Rs||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(L.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",i=!1,s=L,o=(n="advanced_disable_flags")in(e=l)&&!A(e[n]),a=r in e&&!A(e[r]),o?e[n]:a?(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[r]):i)}Us(e){if(X(this.config.before_send))return e;var n=ie(this.config.before_send)?this.config.before_send:[this.config.before_send],r=e;for(var i of n){if(r=i(r),X(r)){var s="Event '"+e.event+"' was rejected in beforeSend function";return FR(e.event)?L.warn(s+". This can cause unexpected behavior."):L.info(s),null}r.properties&&!ni(r.properties)||L.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var e;return(e=this.pageViewManager.fe)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,r){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(r)})}}(function(t,e){for(var n=0;n<e.length;n++)t.prototype[e[n]]=BR(t.prototype[e[n]])})(Rl,["identify"]);var dv,Or=(dv=Cs[Fr]=new Rl,function(){function t(){t.done||(t.done=!0,O1=!1,J(Cs,function(e){e._dom_loaded()}))}N!=null&&N.addEventListener?N.readyState==="complete"?t():fe(N,"DOMContentLoaded",t,{capture:!1}):T&&L.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),dv),j1=S.createContext({client:Or});function V1(t,e,n){if(n===void 0&&(n=new WeakMap),t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(n.has(t)&&n.get(t)===e)return!0;n.set(t,e);var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var s=0,o=r;s<o.length;s++){var a=o[s];if(!i.includes(a)||!V1(t[a],e[a],n))return!1}return!0}function t2(t){var e=t.children,n=t.client,r=t.apiKey,i=t.options,s=S.useRef(null),o=S.useMemo(function(){return n?(r&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(r||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Or)},[n,r,JSON.stringify(i)]);return S.useEffect(function(){if(!n){var a=s.current;a?(r!==a.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!V1(i,a.options)&&Or.set_config(i),s.current={apiKey:r,options:i??{}}):(Or.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Or.init(r,i),s.current={apiKey:r,options:i??{}})}},[n,r,JSON.stringify(i)]),qe.createElement(j1.Provider,{value:{client:o}},e)}var $d=function(t,e){return $d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},$d(t,e)};function n2(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$d(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Ou=function(t){return typeof t=="function"},r2={componentStack:null,exceptionEvent:null,error:null},i2={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(t){n2(e,t);function e(n){var r=t.call(this,n)||this;return r.state=r2,r}return e.prototype.componentDidCatch=function(n,r){var i=this.props.additionalProperties,s;Ou(i)?s=i(n):typeof i=="object"&&(s=i);var o=this.context.client,a=o.captureException(n,s),l=r.componentStack;this.setState({error:n,componentStack:l,exceptionEvent:a})},e.prototype.render=function(){var n=this.props,r=n.children,i=n.fallback,s=this.state;if(s.componentStack==null)return Ou(r)?r():r;var o=Ou(i)?qe.createElement(i,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):i;return qe.isValidElement(o)?o:(console.warn(i2.INVALID_FALLBACK),qe.createElement(qe.Fragment,null))},e.contextType=j1,e})(qe.Component);const s2="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",o2="https://us.i.posthog.com";ju.createRoot(document.getElementById("root")).render(P.jsx(qe.StrictMode,{children:P.jsx(t2,{apiKey:s2,options:{api_host:o2,capture_exceptions:!0,debug:!1},children:P.jsx(LR,{})})}));