rivet-design 0.16.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-variants/WorktreeOrchestrator.d.ts +1 -1
- package/dist/cli/commands/mcpServe.d.ts.map +1 -1
- package/dist/cli/commands/mcpServe.js +1 -2
- package/dist/cli/commands/mcpServe.js.map +1 -1
- package/dist/cli/commands/reference.d.ts.map +1 -1
- package/dist/cli/commands/reference.js +13 -1
- package/dist/cli/commands/reference.js.map +1 -1
- package/dist/cli/commands/serve.js +2 -2
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/variants.d.ts.map +1 -1
- package/dist/cli/commands/variants.js +10 -3
- package/dist/cli/commands/variants.js.map +1 -1
- package/dist/config/flags.d.ts +0 -3
- package/dist/config/flags.d.ts.map +1 -1
- package/dist/config/flags.js +0 -1
- package/dist/config/flags.js.map +1 -1
- package/dist/config/telemetry.d.ts +0 -3
- package/dist/config/telemetry.d.ts.map +1 -1
- package/dist/config/telemetry.js +0 -3
- package/dist/config/telemetry.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/routes/agentVariants.d.ts.map +1 -1
- package/dist/routes/agentVariants.js +83 -0
- package/dist/routes/agentVariants.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -15
- package/dist/server.js.map +1 -1
- package/dist/services/AuthService.d.ts +1 -1
- package/dist/services/AuthService.d.ts.map +1 -1
- package/dist/services/CliLogForwarder.d.ts +1 -3
- package/dist/services/CliLogForwarder.d.ts.map +1 -1
- package/dist/services/CliLogForwarder.js +1 -3
- package/dist/services/CliLogForwarder.js.map +1 -1
- package/dist/services/IntegrationsClient.d.ts +2 -2
- package/dist/services/MCPOnboardingTelemetry.d.ts +2 -2
- package/dist/services/MCPOnboardingTelemetry.d.ts.map +1 -1
- package/dist/services/MCPOnboardingTelemetry.js +0 -4
- package/dist/services/MCPOnboardingTelemetry.js.map +1 -1
- package/dist/services/ProjectDetectionService.d.ts +2 -2
- package/dist/services/ProjectDetectionService.d.ts.map +1 -1
- package/dist/services/ProjectDetectionService.js +4 -16
- package/dist/services/ProjectDetectionService.js.map +1 -1
- package/dist/services/ProjectMetadataStore.d.ts +13 -0
- package/dist/services/ProjectMetadataStore.d.ts.map +1 -1
- package/dist/services/ProjectMetadataStore.js +28 -1
- package/dist/services/ProjectMetadataStore.js.map +1 -1
- package/dist/services/TelemetryService.d.ts +0 -52
- package/dist/services/TelemetryService.d.ts.map +1 -1
- package/dist/services/TelemetryService.js +0 -67
- package/dist/services/TelemetryService.js.map +1 -1
- package/dist/services/VariantRunService.d.ts +1 -1
- package/dist/services/VariantRunService.js +1 -1
- package/dist/services/accessTokenRefresh.d.ts +1 -1
- package/dist/services/accessTokenRefresh.js +1 -1
- package/dist/services/templates/designCatalog.d.ts.map +1 -1
- package/dist/services/templates/designCatalog.js +0 -3
- package/dist/services/templates/designCatalog.js.map +1 -1
- package/dist/services/templates/viteReactTs.d.ts +1 -1
- package/dist/utils/skills/cli-guidance.js +1 -1
- package/package.json +3 -6
- package/src/ui/dist/assets/main-BjwDfDy8.js +423 -0
- package/src/ui/dist/assets/main-Ct1aZend.css +1 -0
- package/src/ui/dist/index.html +2 -2
- package/dist/services/DesktopVersionPolicyService.d.ts +0 -21
- package/dist/services/DesktopVersionPolicyService.d.ts.map +0 -1
- package/dist/services/DesktopVersionPolicyService.js +0 -151
- package/dist/services/DesktopVersionPolicyService.js.map +0 -1
- package/src/ui/dist/assets/main-Bx4iKDsk.js +0 -423
- package/src/ui/dist/assets/main-DtQq1see.css +0 -1
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
var wL=Object.defineProperty;var mE=t=>{throw TypeError(t)};var bL=(t,e,n)=>e in t?wL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Uo=(t,e,n)=>bL(t,typeof e!="symbol"?e+"":e,n),Ig=(t,e,n)=>e.has(t)||mE("Cannot "+n);var U=(t,e,n)=>(Ig(t,e,"read from private field"),n?n.call(t):e.get(t)),Be=(t,e,n)=>e.has(t)?mE("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ke=(t,e,n,r)=>(Ig(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),lt=(t,e,n)=>(Ig(t,e,"access private method"),n);var ip=(t,e,n,r)=>({set _(s){ke(t,e,s,n)},get _(){return U(t,e,r)}});function SL(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function x0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rg={exports:{}},hd={},Mg={exports:{}},ot={};/**
|
|
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 vE;function EL(){if(vE)return ot;vE=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function m(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function w(D,Y,oe){this.props=D,this.context=Y,this.refs=y,this.updater=oe||_}w.prototype.isReactComponent={},w.prototype.setState=function(D,Y){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,Y,"setState")},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function b(){}b.prototype=w.prototype;function C(D,Y,oe){this.props=D,this.context=Y,this.refs=y,this.updater=oe||_}var P=C.prototype=new b;P.constructor=C,x(P,w.prototype),P.isPureReactComponent=!0;var T=Array.isArray,A=Object.prototype.hasOwnProperty,R={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function I(D,Y,oe){var J,se={},pe=null,Se=null;if(Y!=null)for(J in Y.ref!==void 0&&(Se=Y.ref),Y.key!==void 0&&(pe=""+Y.key),Y)A.call(Y,J)&&!L.hasOwnProperty(J)&&(se[J]=Y[J]);var ce=arguments.length-2;if(ce===1)se.children=oe;else if(1<ce){for(var ae=Array(ce),$e=0;$e<ce;$e++)ae[$e]=arguments[$e+2];se.children=ae}if(D&&D.defaultProps)for(J in ce=D.defaultProps,ce)se[J]===void 0&&(se[J]=ce[J]);return{$$typeof:t,type:D,key:pe,ref:Se,props:se,_owner:R.current}}function O(D,Y){return{$$typeof:t,type:D.type,key:Y,ref:D.ref,props:D.props,_owner:D._owner}}function N(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function j(D){var Y={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(oe){return Y[oe]})}var F=/\/+/g;function G(D,Y){return typeof D=="object"&&D!==null&&D.key!=null?j(""+D.key):Y.toString(36)}function Q(D,Y,oe,J,se){var pe=typeof D;(pe==="undefined"||pe==="boolean")&&(D=null);var Se=!1;if(D===null)Se=!0;else switch(pe){case"string":case"number":Se=!0;break;case"object":switch(D.$$typeof){case t:case e:Se=!0}}if(Se)return Se=D,se=se(Se),D=J===""?"."+G(Se,0):J,T(se)?(oe="",D!=null&&(oe=D.replace(F,"$&/")+"/"),Q(se,Y,oe,"",function($e){return $e})):se!=null&&(N(se)&&(se=O(se,oe+(!se.key||Se&&Se.key===se.key?"":(""+se.key).replace(F,"$&/")+"/")+D)),Y.push(se)),1;if(Se=0,J=J===""?".":J+":",T(D))for(var ce=0;ce<D.length;ce++){pe=D[ce];var ae=J+G(pe,ce);Se+=Q(pe,Y,oe,ae,se)}else if(ae=m(D),typeof ae=="function")for(D=ae.call(D),ce=0;!(pe=D.next()).done;)pe=pe.value,ae=J+G(pe,ce++),Se+=Q(pe,Y,oe,ae,se);else if(pe==="object")throw Y=String(D),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Se}function Z(D,Y,oe){if(D==null)return D;var J=[],se=0;return Q(D,J,"","",function(pe){return Y.call(oe,pe,se++)}),J}function W(D){if(D._status===-1){var Y=D._result;Y=Y(),Y.then(function(oe){(D._status===0||D._status===-1)&&(D._status=1,D._result=oe)},function(oe){(D._status===0||D._status===-1)&&(D._status=2,D._result=oe)}),D._status===-1&&(D._status=0,D._result=Y)}if(D._status===1)return D._result.default;throw D._result}var q={current:null},z={transition:null},X={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:z,ReactCurrentOwner:R};function H(){throw Error("act(...) is not supported in production builds of React.")}return ot.Children={map:Z,forEach:function(D,Y,oe){Z(D,function(){Y.apply(this,arguments)},oe)},count:function(D){var Y=0;return Z(D,function(){Y++}),Y},toArray:function(D){return Z(D,function(Y){return Y})||[]},only:function(D){if(!N(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},ot.Component=w,ot.Fragment=n,ot.Profiler=s,ot.PureComponent=C,ot.StrictMode=r,ot.Suspense=c,ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,ot.act=H,ot.cloneElement=function(D,Y,oe){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var J=x({},D.props),se=D.key,pe=D.ref,Se=D._owner;if(Y!=null){if(Y.ref!==void 0&&(pe=Y.ref,Se=R.current),Y.key!==void 0&&(se=""+Y.key),D.type&&D.type.defaultProps)var ce=D.type.defaultProps;for(ae in Y)A.call(Y,ae)&&!L.hasOwnProperty(ae)&&(J[ae]=Y[ae]===void 0&&ce!==void 0?ce[ae]:Y[ae])}var ae=arguments.length-2;if(ae===1)J.children=oe;else if(1<ae){ce=Array(ae);for(var $e=0;$e<ae;$e++)ce[$e]=arguments[$e+2];J.children=ce}return{$$typeof:t,type:D.type,key:se,ref:pe,props:J,_owner:Se}},ot.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:i,_context:D},D.Consumer=D},ot.createElement=I,ot.createFactory=function(D){var Y=I.bind(null,D);return Y.type=D,Y},ot.createRef=function(){return{current:null}},ot.forwardRef=function(D){return{$$typeof:u,render:D}},ot.isValidElement=N,ot.lazy=function(D){return{$$typeof:f,_payload:{_status:-1,_result:D},_init:W}},ot.memo=function(D,Y){return{$$typeof:d,type:D,compare:Y===void 0?null:Y}},ot.startTransition=function(D){var Y=z.transition;z.transition={};try{D()}finally{z.transition=Y}},ot.unstable_act=H,ot.useCallback=function(D,Y){return q.current.useCallback(D,Y)},ot.useContext=function(D){return q.current.useContext(D)},ot.useDebugValue=function(){},ot.useDeferredValue=function(D){return q.current.useDeferredValue(D)},ot.useEffect=function(D,Y){return q.current.useEffect(D,Y)},ot.useId=function(){return q.current.useId()},ot.useImperativeHandle=function(D,Y,oe){return q.current.useImperativeHandle(D,Y,oe)},ot.useInsertionEffect=function(D,Y){return q.current.useInsertionEffect(D,Y)},ot.useLayoutEffect=function(D,Y){return q.current.useLayoutEffect(D,Y)},ot.useMemo=function(D,Y){return q.current.useMemo(D,Y)},ot.useReducer=function(D,Y,oe){return q.current.useReducer(D,Y,oe)},ot.useRef=function(D){return q.current.useRef(D)},ot.useState=function(D){return q.current.useState(D)},ot.useSyncExternalStore=function(D,Y,oe){return q.current.useSyncExternalStore(D,Y,oe)},ot.useTransition=function(){return q.current.useTransition()},ot.version="18.3.1",ot}var gE;function N2(){return gE||(gE=1,Mg.exports=EL()),Mg.exports}/**
|
|
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 yE;function CL(){if(yE)return hd;yE=1;var t=N2(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(u,c,d){var f,p={},m=null,_=null;d!==void 0&&(m=""+d),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(_=c.ref);for(f in c)r.call(c,f)&&!i.hasOwnProperty(f)&&(p[f]=c[f]);if(u&&u.defaultProps)for(f in c=u.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:e,type:u,key:m,ref:_,props:p,_owner:s.current}}return hd.Fragment=n,hd.jsx=a,hd.jsxs=a,hd}var _E;function kL(){return _E||(_E=1,Rg.exports=CL()),Rg.exports}var E=kL(),v=N2();const we=x0(v),Nf=SL({__proto__:null,default:we},[v]),_6=v.createContext(void 0),x6=t=>{const e=v.useContext(_6);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},PL=({client:t,children:e})=>(v.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),E.jsx(_6.Provider,{value:t,children:e})),TL={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var Zo,L2,u6,AL=(u6=class{constructor(){Be(this,Zo,TL);Be(this,L2,!1)}setTimeoutProvider(t){ke(this,Zo,t)}setTimeout(t,e){return U(this,Zo).setTimeout(t,e)}clearTimeout(t){U(this,Zo).clearTimeout(t)}setInterval(t,e){return U(this,Zo).setInterval(t,e)}clearInterval(t){U(this,Zo).clearInterval(t)}},Zo=new WeakMap,L2=new WeakMap,u6);const al=new AL;function IL(t){setTimeout(t,0)}const RL=typeof window>"u"||"Deno"in globalThis;function Fr(){}function ML(t,e){return typeof t=="function"?t(e):t}function w6(t){return typeof t=="number"&&t>=0&&t!==1/0}function b6(t,e){return Math.max(t+(e||0)-Date.now(),0)}function fn(t,e){return typeof t=="function"?t(e):t}function xE(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==D2(a,e.options))return!1}else if(!sc(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||s&&s!==e.state.fetchStatus||i&&!i(e))}function wE(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Xd(e.options.mutationKey)!==Xd(i))return!1}else if(!sc(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function D2(t,e){return((e==null?void 0:e.queryKeyHashFn)||Xd)(t)}function Xd(t){return JSON.stringify(t,(e,n)=>py(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function sc(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let r=0;r<e.length;r++)if(!sc(t[r],e[r]))return!1;return!0}const n=Object.keys(e);for(const r of n)if(!sc(t[r],e[r]))return!1;return!0}return!1}const OL=Object.prototype.hasOwnProperty;function S6(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=bE(t)&&bE(e);if(!r&&!(py(t)&&py(e)))return e;const s=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),a=i.length,u=r?new Array(a):{};let c=0;for(let d=0;d<a;d++){const f=r?d:i[d],p=t[f],m=e[f];if(p===m){u[f]=p,(r?d<s:OL.call(t,f))&&c++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){u[f]=m;continue}const _=S6(p,m,n+1);u[f]=_,_===p&&c++}return s===a&&c===s?t:u}function Og(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function bE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function py(t){if(!SE(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!SE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function SE(t){return Object.prototype.toString.call(t)==="[object Object]"}function LL(t){return new Promise(e=>{al.setTimeout(e,t)})}function my(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?S6(t,e):e}function NL(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function DL(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}const j2=Symbol();function E6(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===j2?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function C6(t,e){return typeof t=="function"?t(...e):!!t}function jL(t,e,n){let r=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??(s=e()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),t}let FL=()=>RL;const F2=()=>FL();var Df=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},pl,Yo,Wu,c6,VL=(c6=class extends Df{constructor(){super();Be(this,pl);Be(this,Yo);Be(this,Wu);ke(this,Wu,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){U(this,Yo)||this.setEventListener(U(this,Wu))}onUnsubscribe(){var e;this.hasListeners()||((e=U(this,Yo))==null||e.call(this),ke(this,Yo,void 0))}setEventListener(e){var n;ke(this,Wu,e),(n=U(this,Yo))==null||n.call(this),ke(this,Yo,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){U(this,pl)!==e&&(ke(this,pl,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof U(this,pl)=="boolean"?U(this,pl):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},pl=new WeakMap,Yo=new WeakMap,Wu=new WeakMap,c6);const V2=new VL,$L=IL;function zL(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=$L;const i=u=>{e?t.push(u):s(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&s(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{i(()=>{u(...c)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}const Yn=zL();var qu,Xo,Gu,d6,HL=(d6=class extends Df{constructor(){super();Be(this,qu,!0);Be(this,Xo);Be(this,Gu);ke(this,Gu,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){U(this,Xo)||this.setEventListener(U(this,Gu))}onUnsubscribe(){var e;this.hasListeners()||((e=U(this,Xo))==null||e.call(this),ke(this,Xo,void 0))}setEventListener(e){var n;ke(this,Gu,e),(n=U(this,Xo))==null||n.call(this),ke(this,Xo,e(this.setOnline.bind(this)))}setOnline(e){U(this,qu)!==e&&(ke(this,qu,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return U(this,qu)}},qu=new WeakMap,Xo=new WeakMap,Gu=new WeakMap,d6);const ym=new HL;function UL(t){return Math.min(1e3*2**t,3e4)}function k6(t){return(t??"online")==="online"?ym.isOnline():!0}var vy=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function P6(t){let e=!1,n=0,r,s="pending",i,a;const u=new Promise((C,P)=>{i=C,a=P});u.catch(Fr);const c=()=>s!=="pending",d=C=>{var P;if(!c()){const T=new vy(C);y(T),(P=t.onCancel)==null||P.call(t,T)}},f=()=>{e=!0},p=()=>{e=!1},m=()=>V2.isFocused()&&(t.networkMode==="always"||ym.isOnline())&&t.canRun(),_=()=>k6(t.networkMode)&&t.canRun(),x=C=>{c()||(r==null||r(),s="resolved",i(C))},y=C=>{c()||(r==null||r(),s="rejected",a(C))},w=()=>new Promise(C=>{var P;r=T=>{(c()||m())&&C(T)},(P=t.onPause)==null||P.call(t)}).then(()=>{var C;r=void 0,c()||(C=t.onContinue)==null||C.call(t)}),b=()=>{if(c())return;let C;const P=n===0?t.initialPromise:void 0;try{C=P??t.fn()}catch(T){C=Promise.reject(T)}Promise.resolve(C).then(x).catch(T=>{var O;if(c())return;const A=t.retry??(F2()?0:3),R=t.retryDelay??UL,L=typeof R=="function"?R(n,T):R,I=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,T);if(e||!I){y(T);return}n++,(O=t.onFail)==null||O.call(t,n,T),LL(L).then(()=>m()?void 0:w()).then(()=>{e?y(T):b()})})};return{promise:u,status:()=>s,cancel:d,continue:()=>(r==null||r(),u),cancelRetry:f,continueRetry:p,canStart:_,start:()=>(_()?b():w().then(b),u)}}var ml,f6,T6=(f6=class{constructor(){Be(this,ml)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),w6(this.gcTime)&&ke(this,ml,al.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(F2()?1/0:3e5))}clearGcTimeout(){U(this,ml)!==void 0&&(al.clearTimeout(U(this,ml)),ke(this,ml,void 0))}},ml=new WeakMap,f6);function BL(t){return{onFetch:(e,n)=>{var f,p,m,_,x;const r=e.options,s=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,i=((_=e.state.data)==null?void 0:_.pages)||[],a=((x=e.state.data)==null?void 0:x.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const d=async()=>{let y=!1;const w=P=>{jL(P,()=>e.signal,()=>y=!0)},b=E6(e.options,e.fetchOptions),C=async(P,T,A)=>{if(y)return Promise.reject(e.signal.reason);if(T==null&&P.pages.length)return Promise.resolve(P);const L=(()=>{const j={client:e.client,queryKey:e.queryKey,pageParam:T,direction:A?"backward":"forward",meta:e.options.meta};return w(j),j})(),I=await b(L),{maxPages:O}=e.options,N=A?DL:NL;return{pages:N(P.pages,I,O),pageParams:N(P.pageParams,T,O)}};if(s&&i.length){const P=s==="backward",T=P?WL:EE,A={pages:i,pageParams:a};u=await C(A,T(r,A),P)}else{const P=t??i.length;do{const T=c===0?a[0]??r.initialPageParam:EE(r,u);if(c>0&&T==null)break;u=await C(u,T),c++}while(c<P)}return u};e.options.persister?e.fetchFn=()=>{var y,w;return(w=(y=e.options).persister)==null?void 0:w.call(y,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=d}}}function EE(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function WL(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Ku,vl,Zu,ks,gl,Rn,If,yl,Gs,Qi,h6,qL=(h6=class extends T6{constructor(e){super();Be(this,Gs);Be(this,Ku);Be(this,vl);Be(this,Zu);Be(this,ks);Be(this,gl);Be(this,Rn);Be(this,If);Be(this,yl);ke(this,yl,!1),ke(this,If,e.defaultOptions),this.setOptions(e.options),this.observers=[],ke(this,gl,e.client),ke(this,ks,U(this,gl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ke(this,vl,kE(this.options)),this.state=e.state??U(this,vl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,Ku)}get promise(){var e;return(e=U(this,Rn))==null?void 0:e.promise}setOptions(e){if(this.options={...U(this,If),...e},e!=null&&e._type&&ke(this,Ku,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=kE(this.options);n.data!==void 0&&(this.setState(CE(n.data,n.dataUpdatedAt)),ke(this,vl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,ks).remove(this)}setData(e,n){const r=my(this.state.data,e,this.options);return lt(this,Gs,Qi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){lt(this,Gs,Qi).call(this,{type:"setState",state:e})}cancel(e){var r,s;const n=(r=U(this,Rn))==null?void 0:r.promise;return(s=U(this,Rn))==null||s.cancel(e),n?n.then(Fr).catch(Fr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return U(this,vl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>fn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===j2||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>fn(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!b6(this.state.dataUpdatedAt,e)}onFocus(){var e,n;(e=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||e.refetch({cancelRefetch:!1}),(n=U(this,Rn))==null||n.continue()}onOnline(){var e,n;(e=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||e.refetch({cancelRefetch:!1}),(n=U(this,Rn))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),U(this,ks).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(U(this,Rn)&&(U(this,yl)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?U(this,Rn).cancel({revert:!0}):U(this,Rn).cancelRetry()),this.scheduleGc()),U(this,ks).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,Gs,Qi).call(this,{type:"invalidate"})}async fetch(e,n){var d,f,p,m,_,x,y,w,b,C,P,T;if(this.state.fetchStatus!=="idle"&&((d=U(this,Rn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(U(this,Rn))return U(this,Rn).continueRetry(),U(this,Rn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(R=>R.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,s=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ke(this,yl,!0),r.signal)})},i=()=>{const A=E6(this.options,n),L=(()=>{const I={client:U(this,gl),queryKey:this.queryKey,meta:this.meta};return s(I),I})();return ke(this,yl,!1),this.options.persister?this.options.persister(A,L,this):A(L)},u=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:U(this,gl),state:this.state,fetchFn:i};return s(A),A})();(f=U(this,Ku)==="infinite"?BL(this.options.pages):this.options.behavior)==null||f.onFetch(u,this),ke(this,Zu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=u.fetchOptions)==null?void 0:p.meta))&<(this,Gs,Qi).call(this,{type:"fetch",meta:(m=u.fetchOptions)==null?void 0:m.meta});const c=ke(this,Rn,P6({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:A=>{A instanceof vy&&A.revert&&this.setState({...U(this,Zu),fetchStatus:"idle"}),r.abort()},onFail:(A,R)=>{lt(this,Gs,Qi).call(this,{type:"failed",failureCount:A,error:R})},onPause:()=>{lt(this,Gs,Qi).call(this,{type:"pause"})},onContinue:()=>{lt(this,Gs,Qi).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const A=await c.start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(_=U(this,ks).config).onSuccess)==null||x.call(_,A,this),(w=(y=U(this,ks).config).onSettled)==null||w.call(y,A,this.state.error,this),A}catch(A){if(A instanceof vy){if(A.silent)return U(this,Rn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw lt(this,Gs,Qi).call(this,{type:"error",error:A}),(C=(b=U(this,ks).config).onError)==null||C.call(b,A,this),(T=(P=U(this,ks).config).onSettled)==null||T.call(P,this.state.data,A,this),A}finally{U(this,Rn)===c&&ke(this,Rn,void 0),this.scheduleGc()}}},Ku=new WeakMap,vl=new WeakMap,Zu=new WeakMap,ks=new WeakMap,gl=new WeakMap,Rn=new WeakMap,If=new WeakMap,yl=new WeakMap,Gs=new WeakSet,Qi=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...A6(r.data,this.options),fetchMeta:e.meta??null};case"success":const s={...r,...CE(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,Zu,e.manual?s:void 0),s;case"error":const i=e.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Yn.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),U(this,ks).notify({query:this,type:"updated",action:e})})},h6);function A6(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:k6(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function CE(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var yr,dt,Rf,_r,_l,Yu,io,Mf,Xu,Qu,xl,wl,Qo,Ju,xt,Td,gy,yy,_y,xy,wy,by,Sy,Ey,p6,GL=(p6=class extends Df{constructor(e,n){super();Be(this,xt);Be(this,yr);Be(this,dt);Be(this,Rf);Be(this,_r);Be(this,_l);Be(this,Yu);Be(this,io);Be(this,Mf);Be(this,Xu);Be(this,Qu);Be(this,xl);Be(this,wl);Be(this,Qo);Be(this,Ju,new Set);this.options=n,ke(this,yr,e),ke(this,io,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,dt).addObserver(this),PE(U(this,dt),this.options)?lt(this,xt,Td).call(this):this.updateResult(),lt(this,xt,wy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Cy(U(this,dt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Cy(U(this,dt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,lt(this,xt,by).call(this),lt(this,xt,Sy).call(this),U(this,dt).removeObserver(this)}setOptions(e){const n=this.options,r=U(this,dt);if(this.options=U(this,yr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fn(this.options.enabled,U(this,dt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");lt(this,xt,Ey).call(this),U(this,dt).setOptions(this.options),n._defaulted&&!Og(this.options,n)&&U(this,yr).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,dt),observer:this});const s=this.hasListeners();s&&TE(U(this,dt),r,this.options,n)&<(this,xt,Td).call(this),this.updateResult(),s&&(U(this,dt)!==r||fn(this.options.enabled,U(this,dt))!==fn(n.enabled,U(this,dt))||fn(this.options.staleTime,U(this,dt))!==fn(n.staleTime,U(this,dt)))&<(this,xt,yy).call(this);const i=lt(this,xt,_y).call(this);s&&(U(this,dt)!==r||fn(this.options.enabled,U(this,dt))!==fn(n.enabled,U(this,dt))||i!==U(this,Qo))&<(this,xt,xy).call(this,i)}getOptimisticResult(e){const n=U(this,yr).getQueryCache().build(U(this,yr),e),r=this.createResult(n,e);return Og(this.getCurrentResult(),r)||(ke(this,_r,r),ke(this,Yu,this.options),ke(this,_l,U(this,dt).state)),r}getCurrentResult(){return U(this,_r)}trackResult(e,n){return new Proxy(e,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(e){U(this,Ju).add(e)}getCurrentQuery(){return U(this,dt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=U(this,yr).defaultQueryOptions(e),r=U(this,yr).getQueryCache().build(U(this,yr),n);let s=()=>{},i;const a=new Promise(u=>{i=u,s=U(this,yr).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),u(this.createResult(r,n)))})});return Promise.race([r.fetch().then(()=>{const u=this.createResult(r,n);return i==null||i(u),u}).finally(()=>{s()}),a])}fetch(e){return lt(this,xt,Td).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,_r)))}createResult(e,n){var R;const r=U(this,dt),s=this.options,i=U(this,_r),a=U(this,_l),u=U(this,Yu),c=e!==r?e.state:U(this,Rf),{state:d}=e;let f={...d},p=!1,m;if(n._optimisticResults){const L=this.hasListeners(),I=!L&&PE(e,n),O=L&&TE(e,r,n,s);(I||O)&&(f={...f,...A6(d.data,e.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:_,errorUpdatedAt:x,status:y}=f;m=f.data;let w=!1;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let L;i!=null&&i.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(L=i.data,w=!0):L=typeof n.placeholderData=="function"?n.placeholderData((R=U(this,Qu))==null?void 0:R.state.data,U(this,Qu)):n.placeholderData,L!==void 0&&(y="success",m=my(i==null?void 0:i.data,L,n),p=!0)}if(n.select&&m!==void 0&&!w)if(i&&m===(a==null?void 0:a.data)&&n.select===U(this,Mf))m=U(this,Xu);else try{ke(this,Mf,n.select),m=n.select(m),m=my(i==null?void 0:i.data,m,n),ke(this,Xu,m),ke(this,io,null)}catch(L){ke(this,io,L)}else m===void 0&&ke(this,io,null);U(this,io)&&(_=U(this,io),m=U(this,Xu),x=Date.now(),y="error",p=!1);const b=f.fetchStatus==="fetching",C=y==="pending",P=y==="error",T=C&&b,A=m!==void 0;return{status:y,fetchStatus:f.fetchStatus,isPending:C,isSuccess:y==="success",isError:P,isInitialLoading:T,isLoading:T,data:m,dataUpdatedAt:f.dataUpdatedAt,error:_,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!C,isLoadingError:P&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:P&&A,isStale:$2(e,n),refetch:this.refetch,isEnabled:fn(n.enabled,e)!==!1}}updateResult(){const e=U(this,_r),n=this.createResult(U(this,dt),this.options);if(ke(this,_l,U(this,dt).state),ke(this,Yu,this.options),U(this,_l).data!==void 0&&ke(this,Qu,U(this,dt)),Og(n,e))return;ke(this,_r,n);const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!U(this,Ju).size)return!0;const u=new Set(a??U(this,Ju));return this.options.throwOnError&&u.add("error"),Object.keys(U(this,_r)).some(c=>{const d=c;return U(this,_r)[d]!==e[d]&&u.has(d)})})();Yn.batch(()=>{s&&this.listeners.forEach(i=>{i(U(this,_r))}),U(this,yr).getQueryCache().notify({query:U(this,dt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&<(this,xt,wy).call(this)}},yr=new WeakMap,dt=new WeakMap,Rf=new WeakMap,_r=new WeakMap,_l=new WeakMap,Yu=new WeakMap,io=new WeakMap,Mf=new WeakMap,Xu=new WeakMap,Qu=new WeakMap,xl=new WeakMap,wl=new WeakMap,Qo=new WeakMap,Ju=new WeakMap,xt=new WeakSet,Td=function(e){lt(this,xt,Ey).call(this);let n=U(this,dt).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Fr)),n},gy=function(e){return!F2()&&fn(this.options.enabled,U(this,dt))!==!1&&w6(e)},yy=function(){lt(this,xt,by).call(this);const e=fn(this.options.staleTime,U(this,dt));if(U(this,_r).isStale||!lt(this,xt,gy).call(this,e))return;const n=b6(U(this,_r).dataUpdatedAt,e)+1;ke(this,xl,al.setTimeout(()=>{U(this,_r).isStale||this.updateResult()},n))},_y=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(U(this,dt)):this.options.refetchInterval)??!1},xy=function(e){lt(this,xt,Sy).call(this),ke(this,Qo,e),!(U(this,Qo)===0||!lt(this,xt,gy).call(this,U(this,Qo)))&&ke(this,wl,al.setInterval(()=>{(this.options.refetchIntervalInBackground||V2.isFocused())&<(this,xt,Td).call(this)},U(this,Qo)))},wy=function(){lt(this,xt,yy).call(this),lt(this,xt,xy).call(this,lt(this,xt,_y).call(this))},by=function(){U(this,xl)!==void 0&&(al.clearTimeout(U(this,xl)),ke(this,xl,void 0))},Sy=function(){U(this,wl)!==void 0&&(al.clearInterval(U(this,wl)),ke(this,wl,void 0))},Ey=function(){const e=U(this,yr).getQueryCache().build(U(this,yr),this.options);if(e===U(this,dt))return;const n=U(this,dt);ke(this,dt,e),ke(this,Rf,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},p6);function KL(t,e){return fn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&fn(e.retryOnMount,t)===!1)}function PE(t,e){return KL(t,e)||t.state.data!==void 0&&Cy(t,e,e.refetchOnMount)}function Cy(t,e,n){if(fn(e.enabled,t)!==!1&&fn(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&$2(t,e)}return!1}function TE(t,e,n,r){return(t!==e||fn(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&$2(t,n)}function $2(t,e){return fn(e.enabled,t)!==!1&&t.isStaleByTime(fn(e.staleTime,t))}var Of,xi,or,bl,wi,Go,m6,ZL=(m6=class extends T6{constructor(e){super();Be(this,wi);Be(this,Of);Be(this,xi);Be(this,or);Be(this,bl);ke(this,Of,e.client),this.mutationId=e.mutationId,ke(this,or,e.mutationCache),ke(this,xi,[]),this.state=e.state||YL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){U(this,xi).includes(e)||(U(this,xi).push(e),this.clearGcTimeout(),U(this,or).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ke(this,xi,U(this,xi).filter(n=>n!==e)),this.scheduleGc(),U(this,or).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){U(this,xi).length||(this.state.status==="pending"?this.scheduleGc():U(this,or).remove(this))}continue(){var e;return((e=U(this,bl))==null?void 0:e.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){var u,c,d,f,p,m,_,x,y,w,b,C,P,T,A,R,L,I;const n=()=>{lt(this,wi,Go).call(this,{type:"continue"})},r={client:U(this,Of),meta:this.options.meta,mutationKey:this.options.mutationKey},s=ke(this,bl,P6({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,N)=>{lt(this,wi,Go).call(this,{type:"failed",failureCount:O,error:N})},onPause:()=>{lt(this,wi,Go).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,or).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)n();else{lt(this,wi,Go).call(this,{type:"pending",variables:e,isPaused:a}),U(this,or).config.onMutate&&await U(this,or).config.onMutate(e,this,r);const N=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,e,r));N!==this.state.context&<(this,wi,Go).call(this,{type:"pending",context:N,variables:e,isPaused:a})}const O=await s.start();return await((f=(d=U(this,or).config).onSuccess)==null?void 0:f.call(d,O,e,this.state.context,this,r)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,O,e,this.state.context,r)),await((x=(_=U(this,or).config).onSettled)==null?void 0:x.call(_,O,null,this.state.variables,this.state.context,this,r)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,O,null,e,this.state.context,r)),lt(this,wi,Go).call(this,{type:"success",data:O}),O}catch(O){try{await((C=(b=U(this,or).config).onError)==null?void 0:C.call(b,O,e,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((T=(P=this.options).onError)==null?void 0:T.call(P,O,e,this.state.context,r))}catch(N){Promise.reject(N)}try{await((R=(A=U(this,or).config).onSettled)==null?void 0:R.call(A,void 0,O,this.state.variables,this.state.context,this,r))}catch(N){Promise.reject(N)}try{await((I=(L=this.options).onSettled)==null?void 0:I.call(L,void 0,O,e,this.state.context,r))}catch(N){Promise.reject(N)}throw lt(this,wi,Go).call(this,{type:"error",error:O}),O}finally{U(this,bl)===s&&ke(this,bl,void 0),U(this,or).runNext(this)}}},Of=new WeakMap,xi=new WeakMap,or=new WeakMap,bl=new WeakMap,wi=new WeakSet,Go=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Yn.batch(()=>{U(this,xi).forEach(r=>{r.onMutationUpdate(e)}),U(this,or).notify({mutation:this,type:"updated",action:e})})},m6);function YL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oo,Ks,Lf,v6,XL=(v6=class extends Df{constructor(e={}){super();Be(this,oo);Be(this,Ks);Be(this,Lf);this.config=e,ke(this,oo,new Set),ke(this,Ks,new Map),ke(this,Lf,0)}build(e,n,r){const s=new ZL({client:e,mutationCache:this,mutationId:++ip(this,Lf)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){U(this,oo).add(e);const n=op(e);if(typeof n=="string"){const r=U(this,Ks).get(n);r?r.push(e):U(this,Ks).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(U(this,oo).delete(e)){const n=op(e);if(typeof n=="string"){const r=U(this,Ks).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&U(this,Ks).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=op(e);if(typeof n=="string"){const s=(r=U(this,Ks).get(n))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r,s;const n=op(e);return typeof n=="string"?((s=(r=U(this,Ks).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Yn.batch(()=>{U(this,oo).forEach(e=>{this.notify({type:"removed",mutation:e})}),U(this,oo).clear(),U(this,Ks).clear()})}getAll(){return Array.from(U(this,oo))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>wE(n,r))}findAll(e={}){return this.getAll().filter(n=>wE(e,n))}notify(e){Yn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Yn.batch(()=>Promise.all(e.map(n=>n.continue().catch(Fr))))}},oo=new WeakMap,Ks=new WeakMap,Lf=new WeakMap,v6);function op(t){var e;return(e=t.options.scope)==null?void 0:e.id}var bi,g6,QL=(g6=class extends Df{constructor(e={}){super();Be(this,bi);this.config=e,ke(this,bi,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??D2(s,n);let a=this.get(i);return a||(a=new qL({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){U(this,bi).has(e.queryHash)||(U(this,bi).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=U(this,bi).get(e.queryHash);n&&(e.destroy(),n===e&&U(this,bi).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Yn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return U(this,bi).get(e)}getAll(){return[...U(this,bi).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>xE(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>xE(e,r)):n}notify(e){Yn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Yn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Yn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},bi=new WeakMap,g6),en,Jo,ea,ec,tc,ta,nc,rc,y6,JL=(y6=class{constructor(t={}){Be(this,en);Be(this,Jo);Be(this,ea);Be(this,ec);Be(this,tc);Be(this,ta);Be(this,nc);Be(this,rc);ke(this,en,t.queryCache||new QL),ke(this,Jo,t.mutationCache||new XL),ke(this,ea,t.defaultOptions||{}),ke(this,ec,new Map),ke(this,tc,new Map),ke(this,ta,0)}mount(){ip(this,ta)._++,U(this,ta)===1&&(ke(this,nc,V2.subscribe(async t=>{t&&(await this.resumePausedMutations(),U(this,en).onFocus())})),ke(this,rc,ym.subscribe(async t=>{t&&(await this.resumePausedMutations(),U(this,en).onOnline())})))}unmount(){var t,e;ip(this,ta)._--,U(this,ta)===0&&((t=U(this,nc))==null||t.call(this),ke(this,nc,void 0),(e=U(this,rc))==null||e.call(this),ke(this,rc,void 0))}isFetching(t){return U(this,en).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return U(this,Jo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=U(this,en).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=U(this,en).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(fn(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return U(this,en).findAll(t).map(({queryKey:e,state:n})=>[e,n.data])}setQueryData(t,e,n){var a;const r=this.defaultQueryOptions({queryKey:t}),s=(a=U(this,en).get(r.queryHash))==null?void 0:a.state.data,i=ML(e,s);if(i!==void 0)return U(this,en).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(t,e,n){return Yn.batch(()=>U(this,en).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=U(this,en).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=U(this,en);Yn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=U(this,en);return Yn.batch(()=>{const r=n.findAll(t),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},e)})}cancelQueries(t,e={}){const n={revert:!0,...e},r=Yn.batch(()=>U(this,en).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Fr).catch(Fr)}invalidateQueries(t,e={}){return Yn.batch(()=>(U(this,en).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Yn.batch(()=>U(this,en).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Fr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Fr)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=U(this,en).build(this,e),r=n.isStaleByTime(fn(e.staleTime,n))?await n.fetch(e):n.state.data,s=e.select;return s?s(r):r}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=U(this,en).build(this,e);return n.isStaleByTime(fn(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Fr).catch(Fr)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Fr).catch(Fr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return ym.isOnline()?U(this,Jo).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,en)}getMutationCache(){return U(this,Jo)}getDefaultOptions(){return U(this,ea)}setDefaultOptions(t){ke(this,ea,t)}setQueryDefaults(t,e){U(this,ec).set(Xd(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...U(this,ec).values()],n={};return e.forEach(r=>{sc(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){U(this,tc).set(Xd(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...U(this,tc).values()],n={};return e.forEach(r=>{sc(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...U(this,ea).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=D2(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===j2&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...U(this,ea).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){U(this,en).clear(),U(this,Jo).clear()}},en=new WeakMap,Jo=new WeakMap,ea=new WeakMap,ec=new WeakMap,tc=new WeakMap,ta=new WeakMap,nc=new WeakMap,rc=new WeakMap,y6);const I6=v.createContext(!1),eN=()=>v.useContext(I6);I6.Provider;function tN(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const nN=v.createContext(tN()),rN=()=>v.useContext(nN),sN=(t,e,n)=>{const r=n!=null&&n.state.error&&typeof t.throwOnError=="function"?C6(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},iN=t=>{v.useEffect(()=>{t.clearReset()},[t])},oN=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||C6(n,[t.error,r])),aN=t=>{if(t.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},lN=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,uN=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function cN(t,e,n){const r=eN(),s=rN(),i=x6(),a=i.defaultQueryOptions(t),u=i.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,aN(a),sN(a,s,u),iN(s);const[d]=v.useState(()=>new e(i,a)),f=d.getOptimisticResult(a),p=!r&&c;if(v.useSyncExternalStore(v.useCallback(m=>{const _=p?d.subscribe(Yn.batchCalls(m)):Fr;return d.updateResult(),_},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),v.useEffect(()=>{d.setOptions(a)},[a,d]),lN(a,f))throw uN(a,d,s);if(oN({result:f,errorResetBoundary:s,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw f.error;return a.notifyOnChangeProps?f:d.trackResult(f)}function ky(t,e){return cN(t,GL)}var ne=typeof window<"u"?window:void 0,ur=typeof globalThis<"u"?globalThis:ne,wr=ur==null?void 0:ur.navigator,fe=ur==null?void 0:ur.document,zt=ur==null?void 0:ur.location,z2=ur==null?void 0:ur.fetch,Py=ur!=null&&ur.XMLHttpRequest&&"withCredentials"in new ur.XMLHttpRequest?ur.XMLHttpRequest:void 0,AE=ur==null?void 0:ur.AbortController,dN=ur==null?void 0:ur.CompressionStream,Dr=wr==null?void 0:wr.userAgent;function R6(){return!(!ne||ne.navigator.onLine===!1)}var pd=typeof globalThis<"u"?globalThis:ne;pd&&typeof self>"u"&&(pd.self=pd),pd&&typeof File>"u"&&(pd.File=function(){});var Re=ne??{},Pt={DEBUG:!1,LIB_VERSION:"0.6.1",LIB_NAME:"browser-common"};function IE(t,e,n,r,s,i,a){try{var u=t[i](a),c=u.value}catch(d){return void n(d)}u.done?e(c):Promise.resolve(c).then(r,s)}function Tt(t){return function(){var e=this,n=arguments;return new Promise((function(r,s){var i=t.apply(e,n);function a(c){IE(i,r,s,a,u,"next",c)}function u(c){IE(i,r,s,a,u,"throw",c)}a(void 0)}))}}function ue(){return ue=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ue.apply(null,arguments)}function M6(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 RE=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function ME(t){return typeof t=="string"||t}function OE(t){return typeof t=="string"?t:void 0}var fN=["$feature_flag","$feature_flag_response","$feature_flag_has_experiment","$feature_flag_id","$feature_flag_version","$feature_flag_reason","$feature_flag_request_id","$feature_flag_evaluated_at","$feature_flag_error","locally_evaluated","$groups","$process_person_profile","$geoip_disable","$current_url","$pathname","$referring_domain","utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid","gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx","$session_id","$window_id","$lib","$lib_version","$device_id","$is_server"],vi=(function(t){return t.AnonymousId="anonymous_id",t.DistinctId="distinct_id",t.Props="props",t.EnablePersonProcessing="enable_person_processing",t.PersonMode="person_mode",t.FeatureFlagDetails="feature_flag_details",t.FeatureFlags="feature_flags",t.FeatureFlagPayloads="feature_flag_payloads",t.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",t.BootstrapFeatureFlags="bootstrap_feature_flags",t.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",t.OverrideFeatureFlags="override_feature_flags",t.Queue="queue",t.AiQueue="ai_queue",t.AiCaptureQueue="ai_capture_queue",t.LogsQueue="logs_queue",t.OptedOut="opted_out",t.SessionId="session_id",t.SessionStartTimestamp="session_start_timestamp",t.SessionLastTimestamp="session_timestamp",t.PersonProperties="person_properties",t.GroupProperties="group_properties",t.InstalledAppBuild="installed_app_build",t.InstalledAppVersion="installed_app_version",t.SessionReplay="session_replay",t.PushRegistered="push_registered",t.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",t.SurveyLastSeenDate="survey_last_seen_date",t.SurveysSeen="surveys_seen",t.Surveys="surveys",t.RemoteConfig="remote_config",t.FlagsEndpointWasHit="flags_endpoint_was_hit",t.DeviceId="device_id",t})({}),Ty=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),hN=["$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"],pN=["token"],mN=20,O6=1e3,vN=1e4,gN="[Circular]",Ay="[Truncated]",w0="[Unserializable]",yN="[Function]";function Ou(t){for(var e="",n=0;t.length>n;n++){var r=t.charCodeAt(n);if(55296>r||r>56319)e+=56320>r||r>57343?t[n]:"�";else{var s=t.charCodeAt(n+1);56320>s||s>57343?e+="�":(e+=t[n]+t[n+1],n++)}}return e}var _N=["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","pinterestbot","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"],LE=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return _N.concat(e).some((r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1}))};function Ze(t,e){return t.indexOf(e)!==-1}var b0=function(t){return t.trim()},Iy=function(t){return t.replace(/^\$/,"")};function L6(t){var e,n=[];return(e=JSON.stringify(t,(function(r,s){if(typeof s=="bigint")return s.toString();if(typeof s!="function"&&typeof s!="symbol"){if(s instanceof Error)return{name:s.name,message:s.message,stack:s.stack};if(s&&typeof s=="object"){for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(n.includes(s))return"[Circular]";n.push(s)}return s}})))!==null&&e!==void 0?e:"null"}var N6=Object.prototype,D6=N6.hasOwnProperty,S0=N6.toString,Ke=Array.isArray||function(t){return S0.call(t)==="[object Array]"},ar=t=>typeof t=="function",bt=t=>t===Object(t)&&!Ke(t),Zs=t=>{if(bt(t)){for(var e in t)if(D6.call(t,e))return!1;return!0}return!1},de=t=>t===void 0,ut=t=>S0.call(t)=="[object String]",_m=t=>ut(t)&&t.trim().length===0,Xn=t=>t===null,Qe=t=>de(t)||Xn(t),sn=t=>S0.call(t)=="[object Number]"&&t==t,Ji=t=>sn(t)&&t>0,xr=t=>S0.call(t)==="[object Boolean]",xN=t=>t instanceof FormData,wN=t=>Ze(hN,t),bN=t=>Ze(pN,t);function j6(t){return t===null||typeof t!="object"}function xm(t,e){return{}.toString.call(t)==="[object "+e+"]"}function F6(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":case"[object WebAssembly.Exception]":return!0;default:return V6(t,Error)}}function H2(t){return typeof Event<"u"&&V6(t,Event)}function V6(t,e){try{return t instanceof e}catch{return!1}}var SN=[!0,"true",1,"1","yes"],Lg=t=>Ze(SN,t),EN=[!1,"false",0,"0","no"];function Pi(t,e,n,r,s){return e>n&&(r.warn("min cannot be greater than max."),e=n),sn(t)?t>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(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: "+s),Pi(s||n,e,n,r))}class CN{constructor(e){this.k={},this.S=e.S,this.C=Pi(e.bucketSize,0,100,e.I),this.A=Pi(e.refillRate,0,this.C,e.I),this.R=Pi(e.refillInterval,0,864e5,e.I)}O(e,n){var r=Math.floor((n-e.lastAccess)/this.R);r>0&&(e.tokens=Math.min(e.tokens+r*this.A,this.C),e.lastAccess=e.lastAccess+r*this.R)}consumeRateLimit(e){var n,r=Date.now(),s=String(e),i=this.k[s];return i?this.O(i,r):this.k[s]=i={tokens:this.C,lastAccess:r},i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.S)==null||n.call(this,e)),i.tokens===0)}stop(){this.k={}}}var as="Mobile",wm="iOS",fo="Android",ic="Tablet",$6=fo+" "+ic,z6="iPad",H6="Apple",U6=H6+" Watch",Dd="Safari",oc="BlackBerry",B6="Samsung",W6=B6+"Browser",q6=B6+" Internet",Sl="Chrome",kN=Sl+" OS",G6=Sl+" "+wm,U2="Internet Explorer",K6=U2+" "+as,B2="Opera",PN=B2+" Mini",W2="Edge",Z6="Microsoft "+W2,Lu="Firefox",Y6=Lu+" "+wm,Qd="Nintendo",Jd="PlayStation",Nu="Xbox",X6=fo+" "+as,Q6=as+" "+Dd,Ad="Windows",Ry=Ad+" Phone",NE="Nokia",My="Ouya",J6="Generic",TN=J6+" "+as.toLowerCase(),eP=J6+" "+ic.toLowerCase(),Oy="Konqueror",tP="Oculus Browser",bm="Vivaldi",nP="Yandex",Sm="Whale",Ly="DuckDuckGo",rP="Pale Moon",Em="Waterfox",jd="Brave",sP="Google Search App",qt="(\\d+(\\.\\d+)?)",Ng=new RegExp("Version/"+qt),AN=new RegExp(Nu,"i"),IN=new RegExp(Jd+" \\w+","i"),RN=new RegExp(Qd+" \\w+","i"),q2=new RegExp(oc+"|PlayBook|BB10","i"),MN={"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"},iP=function(t,e,n,r){e=e||"";var s=(function(i){return i!=null&&i.brave?jd:null})(n);return s||(r!=null&&r.detectGoogleSearchApp&&Ze(t,"GSA/")?sP:Ze(t," OPR/")&&Ze(t,"Mini")?PN:Ze(t," OPR/")?B2:q2.test(t)?oc:Ze(t,"IE"+as)||Ze(t,"WPDesktop")?K6:Ze(t,"OculusBrowser")?tP:Ze(t,W6)?q6:Ze(t,W2)||Ze(t,"Edg/")?Z6:Ze(t,bm+"/")?bm:Ze(t,"YaBrowser/")?nP:Ze(t,Sm+"/")?Sm:Ze(t,Ly+"/")||Ze(t,"Ddg/")?Ly:Ze(t,"FBIOS")?"Facebook "+as:Ze(t,"UCWEB")||Ze(t,"UCBrowser")?"UC Browser":Ze(t,"CriOS")?G6:Ze(t,"CrMo")||Ze(t,Sl)?Sl:Ze(t,fo)&&Ze(t,Dd)?X6:Ze(t,"FxiOS")?Y6:Ze(t.toLowerCase(),Oy.toLowerCase())?Oy:Ze(t,jd+"/")?jd:((i,a)=>a&&Ze(a,H6)||(function(u){return Ze(u,Dd)&&!Ze(u,Sl)&&!Ze(u,fo)})(i))(t,e)?Ze(t,as)?Q6:Dd:Ze(t,"PaleMoon/")?rP:Ze(t,Em+"/")?Em:Ze(t,Lu)?Lu:Ze(t,"MSIE")||Ze(t,"Trident/")?U2:Ze(t,"Gecko")?Lu:"")},ON={[K6]:[new RegExp("rv:"+qt)],[Z6]:[new RegExp(W2+"?\\/"+qt)],[Sl]:[new RegExp("("+Sl+"|CrMo)\\/"+qt)],[G6]:[new RegExp("CriOS\\/"+qt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+qt)],[Dd]:[Ng],[Q6]:[Ng],[B2]:[new RegExp("(Opera|OPR)\\/"+qt)],[Lu]:[new RegExp(Lu+"\\/"+qt)],[Y6]:[new RegExp("FxiOS\\/"+qt)],[Oy]:[new RegExp("Konqueror[:/]?"+qt,"i")],[oc]:[new RegExp(oc+" "+qt),Ng],[X6]:[new RegExp("android\\s"+qt,"i")],[q6]:[new RegExp(W6+"\\/"+qt)],[tP]:[new RegExp("OculusBrowser\\/"+qt)],[bm]:[new RegExp(bm+"\\/"+qt)],[nP]:[new RegExp("YaBrowser\\/"+qt)],[Sm]:[new RegExp(Sm+"\\/"+qt)],[jd]:[new RegExp(jd+"\\/"+qt)],[Ly]:[new RegExp("(DuckDuckGo|Ddg)\\/"+qt)],[rP]:[new RegExp("PaleMoon\\/"+qt)],[Em]:[new RegExp(Em+"\\/"+qt)],[sP]:[new RegExp("GSA\\/"+qt)],[U2]:[new RegExp("(rv:|MSIE )"+qt)],Mozilla:[new RegExp("rv:"+qt)]},LN=function(t,e,n,r){var s=iP(t,e,n,r),i=ON[s];if(de(i))return null;for(var a=0;i.length>a;a++){var u=t.match(i[a]);if(u)return parseFloat(u[u.length-2])}return null},DE=[[new RegExp(Nu+"; "+Nu+" (.*?)[);]","i"),t=>[Nu,t&&t[1]||""]],[new RegExp(Qd,"i"),[Qd,""]],[new RegExp(Jd,"i"),[Jd,""]],[q2,[oc,""]],[new RegExp(Ad,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[Ry,""];if(new RegExp(as).test(e)&&!/IEMobile\b/.test(e))return[Ad+" "+as,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var r=MN[n[1]]||"";return/arm/i.test(e)&&(r="RT"),[Ad,r]}return[Ad,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[wm,[t[3],t[4],t[5]||"0"].join(".")]:[wm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=de(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+fo+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+fo+")","i"),t=>t&&t[2]?[fo,[t[2],t[3],t[4]||"0"].join(".")]:[fo,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];return t&&t[1]&&(e[1]=[t[1],t[2],t[3]||"0"].join(".")),e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[kN,""]],[/Linux|debian/i,["Linux",""]]],jE=function(t){return RN.test(t)?Qd:IN.test(t)?Jd:AN.test(t)?Nu:new RegExp(My,"i").test(t)?My:new RegExp("("+Ry+"|WPDesktop)","i").test(t)?Ry:/iPad/.test(t)?z6:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?U6:q2.test(t)?oc:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(NE,"i").test(t)?NE:/(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(as).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)?fo:$6:new RegExp("(pda|"+as+")","i").test(t)?TN:new RegExp(ic,"i").test(t)&&!new RegExp(ic+" pc","i").test(t)?eP:""},NN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function FE(t,e){return typeof(n=t)=="string"&&NN.test(n)?t:e();var n}function oP(t,e){var n=new Error(e);try{Object.defineProperty(n,"name",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch{}return n}function ca(t){return t&&t.split("#")[0]}function G2(t,e){var n=setTimeout(t,e);return n!=null&&n.unref&&(n==null||n.unref()),n}function VE(t,e,n){return aP.apply(this,arguments)}function aP(){return(aP=Tt((function*(t,e,n){var r;try{return yield Promise.race([t,new Promise(((s,i)=>{r=G2((()=>{try{n==null||n(),s()}catch(a){i(a)}}),e)}))])}finally{clearTimeout(r)}}))).apply(this,arguments)}var md,lP="NativeGzipValidationError",Ny=t=>t.length>=2&&t[0]===31&&t[1]===139,$E=(t,e)=>t===Ty.GZipJS||e===Ty.GZipJS||e==="gzip",zE=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",ap=t=>{throw oP(lP,"Native gzip produced invalid output: "+t)},DN=(function(){var t=Tt((function*(e,n){18>e.size&&ap("too-short");var r=new Uint8Array(yield e.slice(0,10).arrayBuffer());Ny(r)&&r[2]===8||ap("invalid-header");var s=new DataView(yield e.slice(e.size-8).arrayBuffer());s.getUint32(0,!0)!==(a=>{for(var u=(()=>{if(md)return md;md=[];for(var f=0;256>f;f++){for(var p=f,m=0;8>m;m++)p=1&p?3988292384^p>>>1:p>>>1;md[f]=p>>>0}return md})(),c=4294967295,d=0;a.length>d;d++)c=u[255&(c^a[d])]^c>>>8;return(4294967295^c)>>>0})(n)&&ap("invalid-crc");var i=n.length>>>0;s.getUint32(4,!0)!==i&&ap("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function Dy(){return Dy=Tt((function*(t,e,n){e===void 0&&(e=!0);try{var r=new TextEncoder().encode(t),s=new globalThis.CompressionStream("gzip"),i=s.writable.getWriter(),a=i.write(r).then((()=>i.close())).catch((function(){var d=Tt((function*(f){try{yield i.abort(f)}catch{}throw f}));return function(f){return d.apply(this,arguments)}})()),u=new Response(s.readable).blob(),c=(yield Promise.all([u,a]))[0];return yield DN(c,r),c}catch(d){if(n!=null&&n.rethrow)throw d;return e&&console.error("Failed to gzip compress data",d),null}})),Dy.apply(this,arguments)}var uP={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},jN=uP.info,HE=9223372036854776e3,FN={}.propertyIsEnumerable;function Cm(t,e){try{return cP(t,e,{ancestors:new WeakSet,remainingNodes:vN},0)}catch{return[]}}function K2(t,e,n,r){if(0>=n.remainingNodes)return{stringValue:Ay};if(n.remainingNodes--,xr(t))return{boolValue:t};if(typeof t=="number"){if(!Number.isFinite(t))return{stringValue:String(t)};if(Number.isInteger(t)){if(Number.isSafeInteger(t))return{intValue:String(t)};if(typeof BigInt>"u")return{stringValue:String(t)};var s=BigInt(t).toString();return t>=HE||-HE>t?(e==null||e.debug("Attribute "+s+" is outside the int64 range; encoding it as a string"),{stringValue:s}):{intValue:s}}return{doubleValue:t}}if(typeof t=="string")return{stringValue:Ou(t)};if(typeof t=="function")return{stringValue:yN};if(typeof t=="symbol")return{stringValue:String(t)};if(typeof t=="object"&&t!==null){if(n.ancestors.has(t))return{stringValue:gN};if(r>=mN)return{stringValue:Ay};if(t instanceof Date){var i=t.getTime(),a=Number.isFinite(i)?t.toISOString():String(t);return{stringValue:typeof a=="string"?Ou(a):String(a)}}n.ancestors.add(t);try{try{var u=t.toJSON;if(typeof u=="function")return K2(u.call(t),e,n,r+1)}catch{}return Ke(t)?{arrayValue:{values:VN(t,e,n,r+1)}}:{kvlistValue:{values:cP(t,e,n,r+1)}}}finally{n.ancestors.delete(t)}}return{stringValue:Ou(String(t))}}function VN(t,e,n,r){for(var s=[],i=Math.min(t.length,O6),a=0;i>a&&n.remainingNodes>0;a++)try{var u=a in t?t[a]:void 0;if(Qe(u))continue;s.push(K2(u,e,n,r))}catch{s.push({stringValue:w0})}return t.length>a&&s.push({stringValue:Ay}),s}function cP(t,e,n,r){var s=[];for(var i in t)if(FN.call(t,i)){if(s.length>=O6||0>=n.remainingNodes){e==null||e.debug("Attributes truncated: the value exceeds the OTLP encoder budget");break}try{var a=t[i];if(Xn(a)||de(a))continue;s.push({key:Ou(i),value:K2(a,e,n,r)})}catch{s.push({key:Ou(i),value:{stringValue:w0}})}}return s}function $N(t){try{return Ou(String(t))}catch{return w0}}function zN(t,e,n,r){var s,i=uP[t.level||"info"]||jN,a=i.text,u=i.number,c=((s=sn(r)?r:void 0)===void 0&&(s=Date.now()),String(s)+"000000"),d={};e.distinctId&&(d.posthogDistinctId=e.distinctId),e.sessionId&&(d.sessionId=e.sessionId),e.windowId&&(d["window.id"]=e.windowId),Qe(e.sessionStartTimestamp)||(d.sessionStartTimestamp=String(e.sessionStartTimestamp)),Qe(e.lastActivityTimestamp)||(d.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(d["url.full"]=e.currentUrl),e.screenName&&(d["screen.name"]=e.screenName),e.appState&&(d["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(d.feature_flags=e.activeFeatureFlags);var f=ue({},d),p=t.attributes;if(p){var m=[];try{m=Object.keys(p)}catch{m=[]}for(var _ of m){var x=void 0;try{x=p[_]}catch{x=w0}Object.defineProperty(f,_,{value:x,enumerable:!0,writable:!0,configurable:!0})}}var y={timeUnixNano:c,observedTimeUnixNano:c,severityNumber:u,severityText:a,body:{stringValue:$N(t.body)},attributes:Cm(f,n)};return t.trace_id&&(y.traceId=t.trace_id),t.span_id&&(y.spanId=t.span_id),de(t.trace_flags)||(y.flags=t.trace_flags),y}function dP(t,e,n){return ue({},t.resourceAttributes,{"service.name":t.serviceName||"unknown_service"},t.environment&&{"deployment.environment":t.environment},t.serviceVersion&&{"service.version":t.serviceVersion},{"telemetry.sdk.name":e,"telemetry.sdk.version":n})}function fP(t,e,n,r){return{resourceLogs:[{resource:{attributes:Cm(e)},scopeLogs:[{scope:{name:n,version:r},logRecords:t}]}]}}let HN=class{constructor(t,e,n,r,s,i,a){var u;i===void 0&&(i=()=>Promise.resolve()),this._instance=t,this.zi=e,this.I=n,this.hn=r,this.dn=s,this.vn=i,this.fn=a,this.pn=null,this.gn=0,this.mn=0,this.yn=0,this.bn=0,this._n=0,this.wn=!1,this.kn=e.maxBufferSize,this.Sn=Math.max((u=e.maxQueueSize)!==null&&u!==void 0?u:e.maxBufferSize,e.maxBufferSize),this.xn=e.flushIntervalMs,this.Cn=e.maxBatchRecordsPerPost,this.Tn=e.rateCapWindowMs,this.Mn=e.maxLogsPerInterval}clearQueue(){this.mn++,this._instance.setPersistedProperty(vi.LogsQueue,[])}reset(){this.En(),this.bn=0,this._n=0,this.wn=!1,this.yn=0,this.Cn=this.zi.maxBatchRecordsPerPost}onReconnect(){this.yn=0,this.In()}captureLog(t,e){var n;if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var r=this.Rn(t);if(r!==null)if(r.body){if(this.Pn()){var s={record:zN(r,(n=e==null?void 0:e.context)!==null&&n!==void 0?n:this.hn(),this.I,e==null?void 0:e.occurredAtMs)};this.dn((()=>this.An(s)))}}else this.I.info("Log was rejected in beforeSend function")}}Rn(t){var e=this.zi.beforeSend;if(!e)return t;var n=Ke(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.I.info("Log was rejected in beforeSend function"),null;r=i}catch(a){return this.I.error("Error in beforeSend function for log:",a),null}return r}Pn(){if(this.Mn===void 0)return!0;var t=Date.now(),e=t-this.bn;return this.Tn>e&&e>=0||(this.bn=t,this._n=0,this.wn=!1),this.Mn>this._n?(this._n++,!0):(this.wn||(this.I.warn("captureLog dropping logs: exceeded "+this.Mn+" logs per "+this.Tn+"ms"),this.wn=!0),!1)}flush(){var t=this;return Tt((function*(){if(!t._instance.isDisabled)return t.pn||(t.pn=t.Fn().finally((()=>{t.pn=null}))),t.pn}))()}Fn(){var t=this;return Tt((function*(){var e;t.En();var n=(e=t._instance.getPersistedProperty(vi.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var r=n.length,s=0;n.length>0&&r>s;){var i,a,u=t.mn;t.gn=0;var c=Math.min(n.length,t.Cn),d=n.slice(0,c),f=fP(d.map((m=>m.record)),t.On(),(i=t.fn)!==null&&i!==void 0?i:t._instance.getLibraryId(),t._instance.getLibraryVersion()),p=yield t._instance.Ln(f);if(t.mn!==u)return;if(p.kind==="too-large"&&d.length>1)t.Cn=Math.max(1,Math.floor(d.length/2)),t.I.warn("Received 413 when sending logs batch of size "+d.length+", reducing batch size to "+t.Cn);else if(p.kind==="retry-later"||(p.kind==="too-large"?t.I.warn("Dropping a single log record after 413 with batch size 1 — the record is larger than the server cap and cannot be split further."):p.kind==="ok"&&t.zi.maxBatchRecordsPerPost>t.Cn&&(t.Cn=Math.min(t.zi.maxBatchRecordsPerPost,t.Cn+1)),yield t.Dn(d.length),n=(a=t._instance.getPersistedProperty(vi.LogsQueue))!==null&&a!==void 0?a:[],s+=d.length,p.kind==="fatal"))throw p.error}}))()}Dn(t){var e=this;return Tt((function*(){var n,r=Math.max(0,t-e.gn),s=(n=e._instance.getPersistedProperty(vi.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(vi.LogsQueue,s.slice(r)),yield e.vn()}))()}On(){return dP(this.zi,this._instance.getLibraryId(),this._instance.getLibraryVersion())}An(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(vi.LogsQueue))!==null&&e!==void 0?e:[];this.Sn>n.length||(n.shift(),this.gn++,this.I.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(vi.LogsQueue,n),this.kn>n.length?this.$n():this.In()}}$n(t){t===void 0&&(t=this.xn),this.Nn||(this.Nn=G2((()=>{this.Nn=void 0,this.In()}),t))}qn(){var t=Math.min(Math.max(0,this.yn-1),6);return this.xn*Math.pow(2,t)}jn(){var t=this._instance.getPersistedProperty(vi.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return Tt((function*(){e.En();var n=e.flush().catch((()=>{}));t!==void 0?yield VE(n,t):yield n}))()}flushWithTimeout(t){var e=this;return Tt((function*(){var n=e.flush();yield VE(n,t,(()=>{n.catch((()=>{}))}))}))()}In(){this.flush().then((()=>{this.yn=0}),(t=>{this.yn++,this.I.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.jn()&&this.$n(this.qn())}))}En(){this.Nn&&(clearTimeout(this.Nn),this.Nn=void 0)}};var Dg=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4];function UE(t){return String(t)+"000000"}function BE(t,e,n,r){var s="";return r&&(s=Object.keys(r).sort().map((i=>JSON.stringify(i)+":"+JSON.stringify(r[i]))).join(",")),t+"\0"+e+"\0"+(n??"")+"\0"+s}let UN=class{constructor(t,e,n){this._instance=t,this.zi=e,this.I=n,this.Bn=new Map,this.pn=null,this.Hn=!1,this.Un=new Map,this.zn=new Set,this.Wn=0}count(t,e,n){e===void 0&&(e=1),this.Vn({name:t,type:"count",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}gauge(t,e,n){this.Vn({name:t,type:"gauge",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}histogram(t,e,n){this.Vn({name:t,type:"histogram",value:e,unit:n==null?void 0:n.unit,attributes:n==null?void 0:n.attributes})}flush(){var t=this,e=this.pn,n=(function(){var s=Tt((function*(){e&&(yield e.catch((()=>{}))),yield t.Gn()}));return function(){return s.apply(this,arguments)}})(),r=n().finally((()=>{this.pn===r&&(this.pn=null)}));return this.pn=r,r}drainWindow(){if(this.Bn.size===0)return null;var t=this.Bn;return this.Bn=new Map,this.Hn=!1,this.Un=new Map,this.zn=new Set,this.Zn(t)}reset(){this.Wn++,this.En(),this.Bn=new Map,this.pn=null,this.Hn=!1,this.Un=new Map,this.zn=new Set}Vn(t){if(!this._instance.isDisabled&&!this._instance.optedOut){var e=this.Rn(t);if(e!==null)if(e.name&&typeof e.name=="string")if(typeof e.value=="number"&&Number.isFinite(e.value))if(e.type==="count"&&0>e.value)this.I.warn("Dropping count '"+e.name+"': counters are monotonic, value must be >= 0");else{var n,r;try{n=e.attributes?ue({},e.attributes):void 0,r=BE(e.type,e.name,e.unit,n)}catch(a){return void this.I.warn("Dropping metric '"+e.name+"': attributes could not be serialized",a)}var s=this.Bn.get(r);if(!s){if(!this.Qn())return;s={name:e.name,type:e.type,unit:e.unit,attributes:n,windowStartMs:Date.now()},this.Bn.set(r,s)}var i=this.Un.get(e.name);i===void 0?this.Un.set(e.name,e.type):i===e.type||this.zn.has(e.name)||(this.zn.add(e.name),this.I.warn("Metric name '"+e.name+"' is already used as a "+i+"; recording it as a "+e.type+" too will blend both series in charts. Use a distinct name.")),this.Jn(s,e.value),this.$n()}else this.I.warn("Dropping metric '"+e.name+"': value must be a finite number");else this.I.warn("Dropping metric with empty name")}}Qn(){return this.zi.maxSeriesPerFlush>this.Bn.size||(this.Hn||(this.Hn=!0,this.I.warn("Metric series cap reached ("+this.zi.maxSeriesPerFlush+" per flush window); dropping new series until the next flush. Reduce attribute cardinality.")),!1)}Jn(t,e){var n;switch(t.type){case"count":t.total=((n=t.total)!==null&&n!==void 0?n:0)+e;break;case"gauge":t.last=e;break;case"histogram":t.hist||(t.hist={count:0,sum:0,min:e,max:e,bucketCounts:new Array(Dg.length+1).fill(0)});var r=t.hist;r.count+=1,r.sum+=e,r.min=Math.min(r.min,e),r.max=Math.max(r.max,e),r.bucketCounts[(function(s,i){for(var a=0;i.length>a;a++)if(i[a]>=s)return a;return i.length})(e,Dg)]+=1}}Rn(t){var e=this.zi.beforeSend;if(!e)return t;var n=Ke(e)?e:[e],r=t;for(var s of n)try{var i=s(r);if(!i)return this.I.info("Metric was rejected in beforeSend function"),null;r=i}catch(a){return this.I.error("Error in beforeSend function for metric:",a),null}return r}$n(){this.Nn||(this.Nn=G2((()=>{this.Nn=void 0,this.flush().catch((t=>{this.I.error("Metrics flush failed:",t)}))}),this.zi.flushIntervalMs))}En(){this.Nn&&(clearTimeout(this.Nn),this.Nn=void 0)}Gn(){var t=this;return Tt((function*(){if(t.Bn.size!==0){var e=t.Bn;t.Bn=new Map,t.Hn=!1,t.Un=new Map,t.zn=new Set;var n=t.Wn,r=yield t._instance.Kn(t.Zn(e));if(n===t.Wn)switch(r.kind){case"ok":return;case"retry-later":return t.Yn(e),void t.$n();case"too-large":return void t.I.warn("Metrics batch exceeded the server size limit and was dropped");case"fatal":return void t.I.error("Failed to send metrics batch:",r.error)}}}))()}Zn(t){return e=this.Xn(t),n=(function(i,a,u){return ue({},i.resourceAttributes,{"service.name":i.serviceName||"unknown_service"},i.environment&&{"deployment.environment":i.environment},i.serviceVersion&&{"service.version":i.serviceVersion},{"telemetry.sdk.name":a,"telemetry.sdk.version":u})})(this.zi,this._instance.getLibraryId(),this._instance.getLibraryVersion()),r=this._instance.getLibraryId(),s=this._instance.getLibraryVersion(),{resourceMetrics:[{resource:{attributes:Cm(n)},scopeMetrics:[{scope:{name:r,version:s},metrics:e}]}]};var e,n,r,s}Xn(t){var e=UE(Date.now()),n=new Map;for(var r of t.values()){var s,i=BE(r.type,r.name,r.unit,void 0),a=n.get(i);a||(a=ue({name:r.name},r.unit&&{unit:r.unit}),r.type==="count"?a.sum={aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}:r.type==="gauge"?a.gauge={dataPoints:[]}:a.histogram={aggregationTemporality:1,dataPoints:[]},n.set(i,a));var u=Cm((s=r.attributes)!==null&&s!==void 0?s:{},this.I),c=UE(r.windowStartMs);if(r.type==="count"){var d,f={attributes:u,startTimeUnixNano:c,timeUnixNano:e,asDouble:(d=r.total)!==null&&d!==void 0?d:0};a.sum.dataPoints.push(f)}else if(r.type==="gauge"){var p,m={attributes:u,timeUnixNano:e,asDouble:(p=r.last)!==null&&p!==void 0?p:0};a.gauge.dataPoints.push(m)}else r.hist&&a.histogram.dataPoints.push({attributes:u,startTimeUnixNano:c,timeUnixNano:e,count:r.hist.count,sum:r.hist.sum,min:r.hist.min,max:r.hist.max,bucketCounts:r.hist.bucketCounts,explicitBounds:Dg})}return Array.from(n.values())}Yn(t){var e,n;for(var r of t){var s=r[0],i=r[1],a=this.Bn.get(s);if(a)switch(a.windowStartMs=Math.min(a.windowStartMs,i.windowStartMs),a.type){case"count":a.total=((e=a.total)!==null&&e!==void 0?e:0)+((n=i.total)!==null&&n!==void 0?n:0);break;case"gauge":break;case"histogram":if(i.hist)if(a.hist){a.hist.count+=i.hist.count,a.hist.sum+=i.hist.sum,a.hist.min=Math.min(a.hist.min,i.hist.min),a.hist.max=Math.max(a.hist.max,i.hist.max);for(var u=0;a.hist.bucketCounts.length>u;u++)a.hist.bucketCounts[u]+=i.hist.bucketCounts[u]}else a.hist=i.hist}else this.Qn()&&this.Bn.set(s,i)}}};var lp,WE,jg;function BN(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return jg&&n.length===WE||(WE=n.length,jg=n.reduce(((r,s)=>{lp||(lp={});var i=lp[s];if(i)r[i[0]]=i[1];else for(var a=t(s),u=a.length-1;u>=0;u--){var c=a[u],d=c==null?void 0:c.filename,f=e[s];if(d&&f){r[d]=f,lp[s]=[d,f];break}}return r}),{})),jg}}class WN{constructor(e,n,r){r===void 0&&(r=[]),this.coercers=e,this.stackParser=n,this.modifiers=r}buildFromUnknown(e,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,n,0).apply(e),i=this.buildParsingContext(n),a=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(e){var n=this;return Tt((function*(){for(var r of e)r.stacktrace&&r.stacktrace.frames&&Ke(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return e}))()}coerceFallback(e){var n;return{type:"Error",value:"Unknown error",stack:(n=e.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(e,n){var r,s;return e.cause!=null&&(r=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),ue({},e,{cause:r,stack:s})}applyChunkIds(e,n){return e.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(e,n){for(var r of this.coercers)if(r.match(e))return r.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return Tt((function*(){var r=e;for(var s of n.modifiers)r=yield s(r);return r}))()}convertToExceptionList(e,n){var r,s,i,a={type:e.type,value:e.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=e.synthetic)!==null&&i!==void 0&&i}};e.stack&&(a.stacktrace={type:"raw",frames:e.stack});var u=[a];return e.cause!=null&&u.push(...this.convertToExceptionList(e.cause,ue({},n,{handled:!0}))),u}buildParsingContext(e){var n;return{chunkIdMap:BN(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,r){r===void 0&&(r=0);var s=(i,a)=>{if(4>=a){var u=this.buildCoercingContext(e,n,a);return this.applyCoercers(i,u)}};return ue({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:e,apply:i=>s(i,r),next:i=>s(i,r+1)})}}var ac="?";function jy(t,e,n,r,s){var i={platform:t,filename:e,function:n==="<anonymous>"?ac:n,in_app:!(e!=null&&e.startsWith("webkit-masked-url://"))&&e!=="<anonymous>"};return de(r)||(i.lineno=r),de(s)||(i.colno=s),i}var hP=(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]:ac,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},qN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,GN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,KN=/\((\S*)(?::(\d+))(?::(\d+))\)/,ZN=(t,e)=>{var n=qN.exec(t);if(n)return jy(e,n[1],ac,+n[2],+n[3]);var r=GN.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){var s=KN.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}var i=hP(r[1]||ac,r[2]);return jy(e,i[1],i[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},YN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,XN=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,QN=(t,e)=>{var n=YN.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=XN.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||ac,a=hP(i,s);return jy(e,s=a[1],i=a[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},qE=/\(error: (.*)\)/;class JN{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var r=ut(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:r?e.stack:void 0,cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var n=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?n+": "+e.message:n}isDOMException(e){return xm(e,"DOMException")}isDOMError(e){return xm(e,"DOMError")}}class eD{match(e){return F6(e)}coerce(e,n){var r,s=this.getStack(e),i=s===void 0;return{type:this.getType(e),value:this.getMessage(e,n),stack:s??((r=n.syntheticException)==null?void 0:r.stack),cause:e.cause?n.next(e.cause):void 0,synthetic:i}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var r=e.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(e){return e.stacktrace||e.stack||void 0}}class tD{constructor(){}match(e){return!!xm(e,"ErrorEvent")&&(e.error!=null||this.ki(e))}coerce(e,n){var r;if(e.error!=null)return n.apply(e.error);var s=n.apply(e.message);return ue({},s,{stack:(r=this.Si(e))!==null&&r!==void 0?r:s.stack,synthetic:!0})}ki(e){return ut(e.message)&&e.message.length>0}Si(e){var n,r,s=e,i=(n=s.lineno)!==null&&n!==void 0?n:0,a=(r=s.colno)!==null&&r!==void 0?r:0;if(ut(s.filename)&&s.filename.length!==0&&i!==0)return`Error
|
|
18
|
-
at `+s.filename+":"+i+":"+a}}var nD=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class rD{match(e){return typeof e=="string"}coerce(e,n){var r,s=this.getInfos(e),i=s[0],a=s[1];return{type:i??"Error",value:a??e,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(e){var n="Error",r=e,s=e.match(nD);return s&&(n=s[1],r=s[2]),[n,r]}}var sD=["fatal","error","warning","log","info","debug"];function pP(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var s=n.slice(0,r).join(", ");if(e>=s.length)return r===n.length?s:s.length>e?s.slice(0,e)+"...":s}return""}class iD{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var r,s,i=this.getErrorPropertyFromObject(e);return i?n.apply(i):{type:this.getType(e),value:this.getValue(e),stack:(r=this.getStack(e))!==null&&r!==void 0?r:(s=n.syntheticException)==null?void 0:s.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){if(H2(e))return e.constructor.name;var n="name"in e?e.name:void 0;return ut(n)&&!_m(n)?n:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var n="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(n+=" with message: '"+e.message+"'"),n}if("message"in e&&typeof e.message=="string")return e.message;var r=this.getObjectClassName(e);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+pP(e)}isSeverityLevel(e){return ut(e)&&!_m(e)&&sD.indexOf(e)>=0}getStack(e){try{return ut(e.stacktrace)&&e.stacktrace.length>0?e.stacktrace:ut(e.stack)&&e.stack.length>0?e.stack:void 0}catch{return}}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var r=e[n];if(F6(r))return r}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class oD{match(e){return H2(e)}coerce(e,n){var r,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+pP(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class aD{match(e){return j6(e)}coerce(e,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class lD{match(e){return xm(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!H2(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var r,s=this.getUnhandledRejectionReason(e);return j6(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var km="$message",Pm="$timestamp",uD=new Set([km,Pm]),Fg={enabled:!0,max_bytes:32768};function Tm(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:Fg.enabled,max_bytes:dD(t.max_bytes,Fg.max_bytes)}:ue({},Fg)}class cD{constructor(e){this.ts=[],this.es=0,this.zi=Tm(e)}setConfig(e){this.zi=Tm(e),this.rs()}add(e){var n=(function(s){var i;try{i=L6(s)}catch{return}try{var a=JSON.parse(i);if(!bt(a))return;var u=a,c=u[km],d=u[Pm];return!ut(c)||c.trim().length===0||!ut(d)&&!sn(d)?void 0:{step:u,json:i}}catch{return}})(e);if(n){var r=(function(s){if(typeof TextEncoder<"u")return new TextEncoder().encode(s).length;for(var i=encodeURIComponent(s),a=0,u=0;i.length>u;u++)i[u]==="%"?(a+=1,u+=2):a+=1;return a})(n.json);r>this.zi.max_bytes||(this.ts.push({step:n.step,bytes:r}),this.es+=r,this.rs())}}getAttachable(){return this.ts.map((e=>e.step))}clear(){this.ts=[],this.es=0}size(){return this.ts.length}rs(){for(;this.es>this.zi.max_bytes&&this.ts.length>0;){var e=this.ts.shift();e&&(this.es-=e.bytes)}}}function dD(t,e){if(!sn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var mP=function(t,e){var n=(e===void 0?{}:e).debugEnabled,r={P(s){if(ne&&(Pt.DEBUG||ne.POSTHOG_DEBUG||n)&&!de(ne.console)&&ne.console){for(var i=("__rrweb_original__"in ne.console[s])?ne.console[s].__rrweb_original__:ne.console[s],a=arguments.length,u=new Array(a>1?a-1:0),c=1;a>c;c++)u[c-1]=arguments[c];i(t,...u)}},debug(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.P("debug",...i)},info(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.P("log",...i)},warn(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.P("warn",...i)},error(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.P("error",...i)},critical(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];console.error(t,...i)},uninitializedWarning(s){r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>mP(t+" "+s,i)};return r},ge=mP("[PostHog.js]"),jt=ge.createLogger,fD=jt("[ExternalScriptsLoader]"),Am=t=>{var e=fe==null?void 0:fe.querySelectorAll("script");if(e){for(var n=0;e.length>n;n++)if(e[n].src===t||e[n].getAttribute("src")===t)return e[n]}},tl=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return fD.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=Am(e);if(r){if(r.__posthog_loading_callback_fired)return n();var s=r.__posthog_loading_error;return s?n(s):(r.addEventListener("load",(a=>{r.__posthog_loading_callback_fired=!0,n(void 0,a)})),void r.addEventListener("error",(a=>{r.__posthog_loading_error=a,n(a)})))}var i=()=>{if(!fe)return n("document not found");if(Am(e))return tl(t,e,n);var a=fe.createElement("script");if(a.type="text/javascript",a.crossOrigin="anonymous",a.src=e,a.onload=d=>{a.__posthog_loading_callback_fired=!0,n(void 0,d)},a.onerror=d=>{a.__posthog_loading_error=d,n(d)},t.config.prepare_external_dependency_script&&(a=t.config.prepare_external_dependency_script(a)),!a)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")fe.head.appendChild(a);else{var u,c=fe.querySelectorAll("body > script");c.length>0?(u=c[0].parentNode)==null||u.insertBefore(a,c[0]):fe.body.appendChild(a)}};fe!=null&&fe.body?i():fe==null||fe.addEventListener("DOMContentLoaded",i)},Vg={},GE=(t,e)=>{var n="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var r=3e5;n=n+"&t="+Math.floor(Date.now()/r)*r}return t.requestRouter.endpointFor("assets",n)};Re.__PosthogExtensions__=Re.__PosthogExtensions__||{},Re.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var r=t.config.strict_script_versioning;if(r){var s=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js"),i=Vg[s];if(r==="fallback"&&i){if(Am(i))return void tl(t,i,n);delete Vg[s]}tl(t,s,r==="fallback"?(u,c)=>{if(u)if(typeof u=="string")n(u);else{var d,f=GE(t,e);Vg[s]=f;var p=Am(s);p==null||(d=p.parentNode)==null||d.removeChild(p),tl(t,f,n)}else n(void 0,c)}:n)}else tl(t,GE(t,e),n)}else{var a=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");tl(t,a,n)}},Re.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var r=t.requestRouter.endpointFor("api",e);tl(t,r,n)};Pt.DEBUG=!1,Pt.LIB_VERSION="1.422.1",Pt.LIB_NAME="web";var vP="$people_distinct_id",gr="distinct_id",ef="$device_id",$g="$device_model",Cu="__alias",Id="__timers",Fy="$autocapture_disabled_server_side",Vy="$heatmaps_enabled_server_side",$y="$exception_capture_enabled_server_side",zy="$error_tracking_suppression_rules",Hy="$error_tracking_capture_extension_exceptions",Uy="$web_vitals_enabled_server_side",Z2="$dead_clicks_enabled_server_side",Y2="$product_tours_enabled_server_side",By="$logs_capture_enabled_server_side",Wy="$web_vitals_allowed_metrics",ll="$session_recording_remote_config",gP="$replay_sample_rate",yP="$replay_override_sampling",_P="$replay_override_linked_flag",xP="$replay_override_url_trigger",wP="$replay_override_event_trigger",ku="$sesid",X2="$session_is_sampled",ro="$enabled_feature_flags",ul="$active_feature_flags",Up="$early_access_features",tf="$feature_flag_details",cl="$feature_flag_payloads",Du="$feature_flag_request_id",Im="$minimal_flag_called_events",pi="$override_feature_flags",nl="$override_feature_flag_payloads",Ws="$stored_person_properties",Si="$stored_group_properties",bP="$groups",qy="$surveys",Rm="$surveys_loaded_at",Gy="$surveys_activated",Bp="$surveys_activated_session",Wp="$surveys_activated_timestamps",Rd="ph_product_tours",ao="$flag_call_reported",Md="$flag_call_reported_session_id",ju="$feature_flag_errors",El="$feature_flag_evaluated_at",nt="$user_state",Ky="$client_session_props",Zy="$capture_rate_limit",Yy="$initial_campaign_params",Xy="$initial_referrer_info",Mm="$initial_person_info",Om="$epp",cu="$posthog_cookieless",SP="$cookieless_mode",EP="$sdk_debug_extensions_init_method",CP="$sdk_debug_extensions_init_time_ms",Qy="$sdk_debug_recording_script_not_loaded",Q2="PostHog loadExternalDependency extension not found.",rl="on_reject",lo="always",dn="anonymous",Zn="identified",Jy="identified_only",lc="visibilitychange",Lm="beforeunload",wu="$pageview",zg="$pageleave",Hg="$identify",KE="$groupidentify";function up(t,e){Ke(t)&&t.forEach(e)}function _t(t,e){if(!Qe(t))if(Ke(t))t.forEach(e);else if(xN(t))t.forEach(((r,s)=>e(r,s)));else for(var n in t)D6.call(t,n)&&e(t[n],n)}var St=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];for(var s of n)for(var i in s)s[i]!==void 0&&(t[i]=s[i]);return t};function qp(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 ZE=function(t){try{return t()}catch{return}},hD=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),r=0;e>r;r++)n[r]=arguments[r];return t.apply(this,n)}catch(s){ge.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ge.critical(s)}}},J2=function(t){var e={};return _t(t,(function(n,r){(ut(n)&&n.length>0||sn(n))&&(e[r]=n)})),e},pD=["herokuapp.com","vercel.app","netlify.app"];function mD(t){var e=t==null?void 0:t.hostname;if(!ut(e))return!1;var n=e.split(".").slice(-2).join(".");for(var r of pD)if(n===r)return!1;return!0}function At(t,e,n,r){var s=r??{},i=s.capture,a=s.passive;t==null||t.addEventListener(e,n,{capture:i!==void 0&&i,passive:a===void 0||a})}function e_(t){return t.name==="ph_toolbar_internal"}var kP=t=>{if(fe){try{for(var e=t+"=",n=fe.cookie.split(";").filter((i=>i.length)),r=0;n.length>r;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return decodeURIComponent(s.substring(e.length,s.length))}}catch{}return null}};Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return sn(t)&&isFinite(t)&&Math.floor(t)===t});class Nm{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,r,s){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||0>e||0>n||0>r||0>s||e>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/256,i[5]=e,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new Nm(i)}toString(){for(var e="",n=0;this.bytes.length>n;n++)e=e+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),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 Nm(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class vD{generate(){var e=this.generateOrAbort();if(!de(e))return e;this.Fr=0;var n=this.generateOrAbort();if(de(n))throw new Error("Could not generate UUID after timestamp reset");return n}generateOrAbort(){var e=Date.now();if(e>this.Fr)this.Fr=e,this.Nr();else{if(this.Fr>=e+1e4)return;this.qr++,this.qr>4398046511103&&(this.Fr++,this.Nr())}return Nm.fromFieldsV7(this.Fr,Math.trunc(this.qr/Math.pow(2,30)),this.qr&Math.pow(2,30)-1,this.jr.nextUint32())}Nr(){this.qr=1024*this.jr.nextUint32()+(1023&this.jr.nextUint32())}constructor(){this.Fr=0,this.qr=0,this.jr=new gD}}var YE,PP=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;t.length>e;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};ne&&!de(ne.crypto)&&crypto.getRandomValues&&(PP=t=>crypto.getRandomValues(t));class gD{nextUint32(){return this.bt.length>this.Br||(PP(this.bt),this.Br=0),this.bt[this.Br++]}constructor(){this.bt=new Uint32Array(8),this.Br=1/0}}var yi=()=>yD().toString(),yD=()=>(YE||(YE=new vD)).generate(),vd="",_D=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,yn={Hr:()=>!!fe,zr(t){ge.error("cookieStore error: "+t)},$r:kP,Vr(t){var e;try{e=JSON.parse(yn.$r(t))||{}}catch{}return e},Ur(t,e,n,r,s){if(!fe)return!1;try{var i="",a="",u=(function(f,p){if(p){var m=(function(x,y){if(y===void 0&&(y=fe),vd)return vd;if(!y||["localhost","127.0.0.1"].includes(x))return"";for(var w=x.split("."),b=Math.min(w.length,8),C="dmn_chk_"+yi();!vd&&b--;){var P=w.slice(b).join("."),T=C+"=1;domain=."+P+";path=/";y.cookie=T+";max-age=3",y.cookie.includes(C)&&(y.cookie=T+";max-age=0",vd=P)}return vd})(f);if(!m){var _=(x=>{var y=x.match(_D);return y?y[0]:""})(f);_!==m&&ge.info("Warning: cookie subdomain discovery mismatch",_,m),m=_}return m?"; domain=."+m:""}return""})(fe.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),i="; expires="+c.toUTCString()}s&&(a="; secure");var d=t+"="+encodeURIComponent(JSON.stringify(e))+i+"; SameSite=Lax; path=/"+u+a;return d.length>3686.4&&ge.warn("cookieStore warning: large cookie, len="+d.length),fe.cookie=d,!0}catch{return!1}},Wr(t,e){if(fe!=null&&fe.cookie)try{yn.Ur(t,"",-1,e)}catch{return}}},Ug=null,wt={Hr(){if(!Xn(Ug))return Ug;var t=!0;if(de(ne))t=!1;else try{var e="__mplssupport__";wt.Ur(e,"xyz"),wt.$r(e)!=='"xyz"'&&(t=!1),wt.Wr(e)}catch{t=!1}return t||ge.error("localStorage unsupported; falling back to cookie store"),Ug=t,t},zr(t){ge.error("localStorage error: "+t)},$r(t){try{return ne==null?void 0:ne.localStorage.getItem(t)}catch(e){wt.zr(e)}return null},Vr(t){try{return JSON.parse(wt.$r(t))||{}}catch{}return null},Ur(t,e){try{return ne==null||ne.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){wt.zr(n)}return!1},Wr(t){try{ne==null||ne.localStorage.removeItem(t)}catch(e){wt.zr(e)}}},Bg=[Ws,ul,ro,tf,cl,Du,El,ju,ao],sl=[ef,gr,ku,X2,Om,Mm,nt],Dm=t=>t+"_cpm",xD=["__proto__","constructor","prototype"],Wg=t=>{if(!bt(t))return{};var e={};return Object.keys(t).forEach((n=>{xD.indexOf(n)===-1&&(e[n]=t[n])})),e},qg=function(t,e){e===void 0&&(e=[]);var n={};return[...sl,...e].forEach((r=>{var s=t[r];de(s)||Xn(s)||s===""||(n[r]=s)})),n},TP=t=>{for(var e=5381,n=2166136261,r=0;t.length>r;r++){var s=t.charCodeAt(r);e=33*e^s,n=Math.imul(n^s,16777619)}return t.length.toString(36)+"."+(e>>>0).toString(36)+"."+(n>>>0).toString(36)},XE=(t,e)=>({p:e,f:TP(JSON.stringify(t))}),QE=(t,e)=>{if(!e)return{properties:[],isValid:!1};try{var n=yn.Vr(Dm(t)),r=(n==null?void 0:n.f)===TP(e)&&Ke(n.p);return{properties:r?n.p:[],isValid:r}}catch{return{properties:[],isValid:!1}}},Gg=(t,e)=>e+"|"+(yn.$r(Dm(t))||""),cp={},wD={Hr:()=>!0,zr(t){ge.error("memoryStorage error: "+t)},$r:t=>cp[t]||null,Vr:t=>cp[t]||null,Ur:(t,e)=>(cp[t]=e,!0),Wr(t){delete cp[t]}},Ua=null,Et={Hr(){if(!Xn(Ua))return Ua;if(Ua=!0,de(ne))Ua=!1;else try{var t="__support__";Et.Ur(t,"xyz"),Et.$r(t)!=='"xyz"'&&(Ua=!1),Et.Wr(t)}catch{Ua=!1}return Ua},zr(t){ge.error("sessionStorage error: ",t)},$r(t){try{return ne==null?void 0:ne.sessionStorage.getItem(t)}catch(e){Et.zr(e)}return null},Vr(t){try{return JSON.parse(Et.$r(t))||null}catch{}return null},Ur(t,e){try{return ne==null||ne.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Et.zr(n)}return!1},Wr(t){try{ne==null||ne.sessionStorage.removeItem(t)}catch(e){Et.zr(e)}}};class bD{constructor(e){this._instance=e}get zi(){return this._instance.config}get consent(){return this.ks()?0:this.Ss}isOptedOut(){return this.zi.cookieless_mode===lo||this.isRejected()||this.consent===-1&&this.zi.cookieless_mode===rl}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.zi.opt_out_capturing_by_default}optInOut(e){this.xs.Ur(this.Cs,e?1:0,this.zi.cookie_expiration,this.zi.cross_subdomain_cookie,this.zi.secure_cookie)}reset(){this.xs.Wr(this.Cs,this.zi.cross_subdomain_cookie)}get Cs(){var e=this._instance.config,n=e.token,r=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(r?r+n:"__ph_opt_in_out_"+n)}get Ss(){var e=this.xs.$r(this.Cs);return Lg(e)?1:Ze(EN,e)?0:-1}get xs(){var e=this.zi.opt_out_capturing_persistence_type,n=e==="localStorage"?wt:yn;if(!this.Ts||this.Ts!==n){this.Ts=n;var r=e==="localStorage"?yn:wt;r.$r(this.Cs)&&(this.Ts.$r(this.Cs)||this.optInOut(Lg(r.$r(this.Cs))),r.Wr(this.Cs,this.zi.cross_subdomain_cookie))}return this.Ts}ks(){return!!this.zi.respect_dnt&&[wr==null?void 0:wr.doNotTrack,wr==null?void 0:wr.msDoNotTrack,Re.doNotTrack].some((e=>Lg(e)))}}function AP(t,e){var n,r=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!ar(r))return e;try{var s=r(e);return ut(s)&&s?s:e}catch(i){return ge.error("Error in get_current_url, falling back to window.location.href",i),e}}var IP="__POSTHOG_TOOLBAR__",SD=1,ED=3,CD=11;function JE(t){return t instanceof Element&&(t.id===IP||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function da(t){return!!t&&t.nodeType===SD}function ss(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function RP(t){return!!t&&t.nodeType===ED}function MP(t){return!!t&&t.nodeType===CD&&da(t.host)}var OP=1e3;function ex(t){return t?b0(t).split(/\s+/):[]}function e4(t,e){var n=(function(r){var s,i=ne==null||(s=ne.location)==null?void 0:s.href;return de(i)?void 0:AP(r,i)})(e);return!!(n&&t&&t.some((r=>n.match(r))))}function jm(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 ex(e)}function LP(t){return Qe(t)?null:b0(t).split(/(\s+)/).filter((e=>Fd(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function nf(t){var e="";return r_(t)&&!VP(t)&&t.childNodes&&t.childNodes.length&&_t(t.childNodes,(function(n){var r;RP(n)&&n.textContent&&(e+=(r=LP(n.textContent))!==null&&r!==void 0?r:"")})),b0(e)}function t_(t){var e;return de(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null}var tx=["a","button","form","input","select","textarea","label"];function n_(t,e){if(de(e))return!0;var n,r=function(i){if(e.some((a=>(function(u,c){var d=u.matches||u.matchesSelector||u.msMatchesSelector||u.mozMatchesSelector||u.webkitMatchesSelector||u.oMatchesSelector;try{return!!d&&d.call(u,c)}catch{return!1}})(i,a))))return{v:!0}};for(var s of t)if(n=r(s))return n.v;return!1}function NP(t){var e=t.parentNode;return!(!e||!da(e))&&e}var kD=[".ph-no-autocapture","[data-ph-no-autocapture]"],DP=["next","previous","prev",">","<"],PD=[...DP,"+","-","−","–"],t4=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,n4=[".ph-no-rageclick",".ph-no-capture"],TD=["","text","search","email","password","url","tel","number"];function jP(t,e){if(!ne||nx(t))return!1;var n,r,s,i,a;if(xr(e)?(n=!!e&&n4,r=void 0,s=!1):(n=(i=e==null?void 0:e.css_selector_ignorelist)!==null&&i!==void 0?i:n4,r=e==null?void 0:e.content_ignorelist,s=(a=e==null?void 0:e.ignore_text_selection)!==null&&a!==void 0&&a),n===!1||s&&(function(c){return!(!c||!da(c))&&(!!ss(c,"textarea")||(ss(c,"input")?Ze(TD,(c.getAttribute("type")||"").toLowerCase()):(function(d){if(d.isContentEditable)return!0;var f=d.getAttribute==null?void 0:d.getAttribute("contenteditable");return f==="true"||f===""})(c)))})(t))return!1;var u=FP(t,!1).targetElementList;return!(function(c,d){if(c===!1||de(c))return!1;var f;if(c===!0)f=DP;else{if(!Ke(c))return!1;if(c.length>10)return ge.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;f=c.map((p=>p.toLowerCase()))}return d.some((p=>{var m=p.safeText,_=p.ariaLabel;return f.some((x=>t4(m,x)||t4(_,x)))}))})(r,u.map((c=>{var d;return{safeText:nf(c).toLowerCase(),ariaLabel:((d=c.getAttribute("aria-label"))==null?void 0:d.toLowerCase().trim())||""}})))&&!n_(u,n)}var nx=t=>!t||ss(t,"html")||!da(t),FP=(t,e)=>{if(!ne||nx(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[t],s=t;s.parentNode&&!ss(s,"body");)if(MP(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=NP(s);if(!i)break;if(e||tx.indexOf(i.tagName.toLowerCase())>-1)n=!0;else try{var a=ne.getComputedStyle(i);a&&a.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function r_(t){for(var e=new Set,n=0,r=t;r.parentNode&&!ss(r,"body");r=r.parentNode){if(n++>=OP||e.has(r))return!1;e.add(r);var s=jm(r);if(Ze(s,"ph-sensitive")||Ze(s,"ph-no-capture"))return!1}if(Ze(jm(t),"ph-include"))return!0;var i=t.type||"";if(ut(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var a=t.name||t.id||"";return!ut(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function VP(t){return!!(ss(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||ss(t,"select")||ss(t,"textarea")||t.getAttribute("contenteditable")==="true")}var r4=new RegExp("^(?:(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}))$"),s4=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,AD=[16,15,14,13],ID=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),i4=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),o4=/[0-9A-Za-z_]/;function RD(t){for(var e=0,n=!1,r=t.length-1;r>=0;r--){var s=t.charCodeAt(r)-48;n&&(s*=2)>9&&(s-=9),e+=s,n=!n}return e%10==0}function Fd(t,e){if(e===void 0&&(e=!0),Qe(t))return!1;if(ut(t)){t=b0(t);var n=e?r4.test((t||"").replace(/[- ]/g,"")):(function(s){var i;for(s4.lastIndex=0;i=s4.exec(s);){var a=i[2];if(a)for(var u=a.replace(/[- ]/g,""),c=0;u.length>c;c++)for(var d of AD){var f=c+d;if(u.length>=f){var p=u.slice(c,f);if(r4.test(p)&&RD(p))return!0}}}return!1})(t);if(n)return!1;var r=e?ID.test(t):(function(s){var i;for(i4.lastIndex=0;i=i4.exec(s);){var a=i[1],u=i[3];if(!(a&&u&&o4.test(a)&&o4.test(u)))return!0}return!1})(t);if(r)return!1}return!0}function a4(t){var e=nf(t);return Fd(e=(e+" "+$P(t)).trim())?e:""}function $P(t){var e="";return t&&t.childNodes&&t.childNodes.length&&_t(t.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=nf(n);e=(e+" "+s).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+$P(n)).trim())}catch(i){ge.error("[AutoCapture]",i)}})),e}function l4(t){return t.replace(/"|\\"/g,'\\"')}function MD(t){var e=t.attr__class;if(e)return Ke(e)?e:ex(e)}var dp=jt("[Dead Clicks]"),OD=()=>!0,LD=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(Z2)),r=t.instance.config.capture_dead_clicks;return xr(r)?r:!!bt(r)||n};class u4{get lazyLoadedDeadClicksAutocapture(){return this.Ms}constructor(e,n,r){this.instance=e,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(e){if(e.ok){var n=e.config;"captureDeadClicks"in n&&(this.instance.persistence&&this.instance.persistence.register({[Z2]:n.captureDeadClicks}),this.startIfEnabledOrStop())}}startIfEnabledOrStop(){this.isEnabled(this)?this.Es((()=>{this.Is()})):this.stop()}Es(e){var n,r;(n=Re.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(r=Re.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(s=>{s?dp.error("failed to load script",s):e()}))}Is(){var e;if(fe){if(!this.Ms&&(e=Re.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=bt(this.instance.config.capture_dead_clicks)?ue({},this.instance.config.capture_dead_clicks):{};n.__onCapture=this.onCapture,this.onCapture&&(n.capture_dead_swipes=!1),this.Ms=Re.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Ms.start(fe),dp.info("starting...")}}else dp.error("`document` not found. Cannot start.")}stop(){this.Ms&&(this.Ms.stop(),this.Ms=void 0,dp.info("stopping..."))}}var Kg=jt("[SegmentIntegration]"),zP="posthog-js";function HP(t,e){var n=e===void 0?{}:e,r=n.organization,s=n.projectId,i=n.prefix,a=n.severityAllowList,u=a===void 0?["error"]:a,c=n.sendExceptionsToPostHog,d=c===void 0||c;return f=>{var p,m,_,x,y;if(u!=="*"&&!u.includes(f.level)||!t.__loaded)return f;f.tags||(f.tags={});var w=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());f.tags["PostHog Person URL"]=w,t.sessionRecordingStarted()&&(f.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var b,C=((p=f.exception)==null?void 0:p.values)||[],P=C.map((A=>ue({},A,{stacktrace:A.stacktrace?ue({},A.stacktrace,{type:"raw",frames:(A.stacktrace.frames||[]).map((R=>ue({},R,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((m=C[0])==null?void 0:m.value)||f.message,$exception_type:(_=C[0])==null?void 0:_.type,$exception_level:f.level,$exception_list:P,$sentry_event_id:f.event_id,$sentry_exception:f.exception,$sentry_exception_message:((x=C[0])==null?void 0:x.value)||f.message,$sentry_exception_type:(y=C[0])==null?void 0:y.type,$sentry_tags:f.tags};return r&&s&&(T.$sentry_url=(i||"https://sentry.io/organizations/")+r+"/issues/?project="+s+"&query="+f.event_id),d&&((b=t.exceptions)==null||b.sendExceptionEvent(T)),f}}class ND{constructor(e,n,r,s,i,a){this.name=zP,this.setupOnce=function(u){u(HP(e,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}}class c4{constructor(e){this.Rs=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength||s.crossTabAdoption)&&(ge.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.Ps=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.As()}As(){var e;this.Fs=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.Rs)}destroy(){var e;(e=this.Fs)==null||e.call(this),this.Fs=void 0}doPageView(e,n){var r,s=this.Os(e,n);return this.Ps={pathname:(r=ne==null?void 0:ne.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var n;return this.Os(e,(n=this.Ps)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Ps)==null?void 0:e.pageViewId}}Os(e,n){var r=this.Ps;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var a=i.maxScrollHeight,u=i.lastScrollY,c=i.maxScrollY,d=i.maxContentHeight,f=i.lastContentY,p=i.maxContentY;if(!(de(a)||de(u)||de(c)||de(d)||de(f)||de(p))){a=Math.ceil(a),u=Math.ceil(u),c=Math.ceil(c),d=Math.ceil(d),f=Math.ceil(f),p=Math.ceil(p);var m=a>1?Pi(u/a,0,1,ge):1,_=a>1?Pi(c/a,0,1,ge):1,x=d>1?Pi(f/d,0,1,ge):1,y=d>1?Pi(p/d,0,1,ge):1;s=St(s,{$prev_pageview_last_scroll:u,$prev_pageview_last_scroll_percentage:m,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:_,$prev_pageview_last_content:f,$prev_pageview_last_content_percentage:x,$prev_pageview_max_content:p,$prev_pageview_max_content_percentage:y})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(e.getTime()-r.timestamp.getTime())/1e3),s}}var Zg=["flags","surveys"],DD={[vP]:{exposure:"hidden"},[Cu]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Id]:{exposure:"hidden"},[Fy]:{exposure:"event"},[Vy]:{exposure:"hidden"},[By]:{exposure:"hidden"},[$y]:{exposure:"event"},[zy]:{exposure:"hidden"},[Hy]:{exposure:"event"},[Uy]:{exposure:"event"},[Z2]:{exposure:"event"},[Y2]:{exposure:"hidden"},[Wy]:{exposure:"event"},[ll]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[ku]:{exposure:"hidden"},[X2]:{exposure:"event"},[gP]:{exposure:"event",shouldSkipFromEventProperties:t=>Xn(t)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[ro]:{exposure:"hidden",storageGroup:"flags"},[ul]:{exposure:"hidden",storageGroup:"flags"},[Up]:{exposure:"hidden"},[tf]:{exposure:"hidden",storageGroup:"flags"},[cl]:{exposure:"hidden",storageGroup:"flags"},[Du]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Im]:{exposure:"hidden",storageGroup:"flags"},[pi]:{exposure:"hidden"},[nl]:{exposure:"hidden"},[Ws]:{exposure:"hidden"},[Si]:{exposure:"hidden"},[qy]:{exposure:"hidden",storageGroup:"surveys"},[Rm]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[Gy]:{exposure:"event"},[Bp]:{exposure:"hidden"},[Wp]:{exposure:"hidden"},[Rd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$product_tours_activated_session:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[ao]:{exposure:"hidden"},[Md]:{exposure:"hidden"},[bP]:{exposure:"event"},[ju]:{exposure:"hidden"},[El]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[nt]:{exposure:"hidden"},[Ky]:{exposure:"hidden"},[Zy]:{exposure:"hidden"},[Yy]:{exposure:"hidden"},[Xy]:{exposure:"hidden"},[Mm]:{exposure:"hidden"},[Om]:{exposure:"hidden"},[yP]:{exposure:"event"},[_P]:{exposure:"event"},[xP]:{exposure:"event"},[wP]:{exposure:"event"},[EP]:{exposure:"event"},[CP]:{exposure:"event"},[Qy]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_pending_trigger_conditions:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},jD=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],mi=t=>{var e=DD[t];if(e)return e;for(var n of jD){var r=n[1];if(t.indexOf(n[0])===0)return r}},Pu=(t,e)=>{try{return JSON.stringify(t,((n,r)=>typeof r=="bigint"?r.toString():r),e)}catch{return L6(t)}},uc=t=>{var e=fe==null?void 0:fe.createElement("a");return de(e)?null:(e.href=t,e)},cc=function(t,e){for(var n,r=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var i=r[s].split("=");if(i[0]===e){n=i;break}}if(!Ke(n)||2>n.length)return"";var a=n[1];try{a=decodeURIComponent(a)}catch{ge.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},rf=function(t,e,n){if(!t||!e||!e.length)return t;for(var r=t.split("#"),s=r[1],i=(r[0]||"").split("?"),a=i[1],u=i[0],c=(a||"").split("&"),d=[],f=0;c.length>f;f++){var p=c[f].split("=");Ke(p)&&(e.includes(p[0])?d.push(p[0]+"="+n):d.push(c[f]))}var m=u;return a!=null&&(m+="?"+d.join("&")),s!=null&&(m+="#"+s),m},Fm=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},UP=(t,e)=>t>=e&&R6(),BP=(t,e,n,r)=>{if(t===0){if(R6()){var s=e+1;return s===n&&r(),s}return e}return 0},fp="https?://(.*)",dc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],FD=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...dc],sf="<masked>",VD=["li_fat_id"];function WP(t,e,n){if(!fe)return{};var r,s=e?[...dc,...n||[]]:[],i=qP(rf(fe.URL,s,sf),t),a=(r={},_t(VD,(function(u){var c=kP(u);r[u]=c||null})),r);return St(a,i)}function qP(t,e){var n=FD.concat(e||[]),r={};return _t(n,(function(s){var i=cc(t,s);r[s]=i||null})),r}function GP(t){var e=(function(i){return i?i.search(fp+"google.([^/?]*)")===0?"google":i.search(fp+"bing.com")===0?"bing":i.search(fp+"yahoo.com")===0?"yahoo":i.search(fp+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",r={};if(!Xn(e)){r.$search_engine=e;var s=fe?cc(fe.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function d4(){return navigator.language||navigator.userLanguage}var Vm="$direct";function KP(){return(fe==null?void 0:fe.referrer)||Vm}function ZP(t,e,n){n===void 0&&(n=!1);var r=t?[...dc,...e||[]]:[],s=n?ca(zt==null?void 0:zt.href):zt==null?void 0:zt.href,i=s==null?void 0:s.substring(0,1e3);return{r:KP().substring(0,1e3),u:i?rf(i,r,sf):void 0}}function YP(t,e){var n;e===void 0&&(e=!1);var r=t.r,s=t.u,i=e?ca(s):s,a={$referrer:r,$referring_domain:r==null?void 0:r==Vm?Vm:(n=uc(r))==null?void 0:n.host};if(i){a.$current_url=i;var u=uc(i);a.$host=u==null?void 0:u.host,a.$pathname=u==null?void 0:u.pathname;var c=qP(i);St(a,c)}if(r){var d=GP(r);St(a,d)}return a}function XP(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function $D(){try{return new Date().getTimezoneOffset()}catch{return}}var zD={flags:El,surveys:Rm},HD=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],hp=t=>t+"_cookie_identity_change_pending",Bo="main",f4=(t,e)=>{_t(t,((n,r)=>{var s=mi(r);s&&s.exposure!=="event"||{}.hasOwnProperty.call(e,r)||delete t[r]}))};class Yg{constructor(e,n,r){if(r===void 0&&(r=!0),this.Ls={},this.Ds=!1,this.$s=!1,this.Ns=!1,this.qs=!1,this.zi=e,this.js=r,this.props={},this.Bs=void 0,this.Hs=(i=>{var a="";return i.token&&(a=i.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),i.persistence_name?"ph_"+i.persistence_name:"ph_"+a+"_posthog"})(e),this.xs=this.Us(e),this.$s=this.zs(e),this.load(),e.debug&&ge.info("Persistence loaded",e.persistence,ue({},this.props)),this.update_config(e,e,n),this.save(),ne){var s=()=>this.flush();At(ne,"beforeunload",s,{capture:!1}),At(ne,"pagehide",s,{capture:!1})}}Ws(){var e,n=(e=this.zi)==null?void 0:e.persistence_save_debounce_ms;return sn(n)&&n>0?n:0}Vs(e){if(this.zi.cookieWinsOnConflict&&this.zi.persistence.toLowerCase()==="localstorage+cookie")if(e)try{var n=qg(e,this.zi.cookie_persisted_properties||[]),r=XE(n,this.zi.cookie_persisted_properties||[]),s=JSON.stringify(n)+"|"+JSON.stringify(r),i=yn.$r(this.Hs)||void 0;i&&Gg(this.Hs,i)===s&&(this.Gs=s,this.Zs=i)}catch{}else try{var a=yn.$r(this.Hs)||void 0;this.Gs=a?Gg(this.Hs,a):void 0,this.Zs=a}catch{}}syncCookieProperties(){return this.Qs(this.zi)}Qs(e,n){if(n===void 0&&(n=!1),this.Js&&!n||this.qs||!e.cookieWinsOnConflict||e.persistence.toLowerCase()!=="localstorage+cookie")return!1;var r;try{r=yn.$r(this.Hs)||void 0}catch{}if(!r||r===this.Zs)return!1;var s,i=Gg(this.Hs,r);try{s=Wg(JSON.parse(r))}catch{return!1}if((yn.$r(this.Hs)||void 0)!==r)return!1;this.Gs=i,this.Zs=r;var a=QE(this.Hs,r),u=[...sl,...a.properties],c={};if(Object.keys(s).forEach((y=>{var w=s[y];(de(w)||Xn(w)||w===""||y===nt&&w!==dn&&w!==Zn)&&(c[y]=!0,delete s[y])})),Zs(s))return!1;var d=gr in s||s[nt]===dn||s[nt]===Zn,f=this.props[gr],p=this.props[nt],m=St({},this.props);[...sl,...e.cookie_persisted_properties||[]].forEach((y=>{if(u.indexOf(y)!==-1&&!(y in s)&&!c[y]&&(d||y!==gr&&y!==nt)){var w=m[y];!a.isValid&&sl.indexOf(y)!==-1&&(w===!1||w===0)||delete m[y]}})),this.props=St(m,s),!d||nt in s||nt in this.props||this.Ks(nt,dn);var _=this.props[gr],x=this.props[nt];return!d||_===f&&x===p||(this.Ns=!0,Et.Ur(hp(this.Hs),!0),this.Ys(Ws),this.Ys(ul),this.Ys(ro),this.Ys(tf),this.Ys(cl),this.Ys(Du),this.Ys(El),this.Ys(ju),this.Ys(ao),x===dn&&(p===Zn||s[nt]===dn||!de(f)&&_!==f)&&(f4(this.props,s),this.Ys(Si)),x===Zn?this.props.$user_id=_:delete this.props.$user_id,this.Ys(Cu)),!0}consumeCookieIdentityChange(){var e=hp(this.Hs),n=this.Ns||!!Et.$r(e);return this.Ns=!1,n&&Et.Wr(e),n}Xs(e){return e===void 0&&(e=!1),!(this.qs||this.Js&&!e||!this.zi.cookieWinsOnConflict||this.zi.persistence.toLowerCase()!=="localstorage+cookie"||(this.qs=!0,0))}ta(){this.qs&&(de(this.ea)||(clearTimeout(this.ea),this.ea=void 0),delete this.Ls[Bo],this.ia(!0))}ra(e){if(e===void 0&&(e=!0),this.qs)try{e?this.ta():de(this.ea)||(clearTimeout(this.ea),this.ea=void 0)}finally{this.qs=!1}}isDisabled(){return!!this.Js}Us(e){HD.indexOf(e.persistence.toLowerCase())===-1&&(ge.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,r=(function(a,u){a===void 0&&(a=[]),u===void 0&&(u=!1);var c=[...sl,...a];return ue({},wt,{Vr(d){try{var f,p={};try{f=yn.$r(d)||void 0,p=f?Wg(JSON.parse(f)):{}}catch{}var m,_=JSON.parse(wt.$r(d)||"{}");if(u){var x=QE(d,f),y=[...sl,...x.properties],w={};Object.keys(p).forEach((A=>{var R=p[A];Xn(R)||R===""||A===nt&&R!==dn&&R!==Zn||(w[A]=R)}));var b=gr in w||w[nt]===dn||w[nt]===Zn;if(Object.keys(w).length>0){var C,P=_[gr],T=(C=_[nt])!==null&&C!==void 0?C:dn;c.forEach((A=>{if(y.indexOf(A)!==-1&&!(A in p)&&(b||A!==gr&&A!==nt)){var R=_[A];!x.isValid&&sl.indexOf(A)!==-1&&(R===!1||R===0)||delete _[A]}})),!b||nt in p||nt in _||(_[nt]=dn),!b||(gr in w?w[gr]:_[gr])===P&&(nt in w?w[nt]:_[nt])===T||(Bg.forEach((A=>delete _[A])),w[nt]===Zn&&gr in w?_.$user_id=w[gr]:delete _.$user_id,w[nt]!==Zn&&(delete _[bP],delete _[Si]),delete _.__alias)}m=St(_,w)}else m=St(p,_);return wt.Ur(d,m),m}catch{}return null},Ur(d,f,p,m,_,x){var y=wt.Ur(d,f,void 0,void 0,x);try{var w=qg(f,a);if(Object.keys(w).length){if(u){var b=Dm(d),C=XE(w,a);if(yn.Ur(b,C,p,m,_,x),yn.$r(b)!==JSON.stringify(C)){yn.Wr(b,m);var P=qg(f);return yn.Ur(d,P,p,m,_,x),y}}yn.Ur(d,w,p,m,_,x)}}catch(T){wt.zr(T)}return y},Wr(d,f){try{ne==null||ne.localStorage.removeItem(d),yn.Wr(d,f),yn.Wr(Dm(d),f)}catch(p){wt.zr(p)}}})})(e.cookie_persisted_properties||[],e.cookieWinsOnConflict),s=!1,i=e.persistence.toLowerCase();return i==="localstorage"&&wt.Hr()?(n=wt,s=!0):i==="localstorage+cookie"&&r.Hr()?(n=r,s=!0):i==="sessionstorage"&&Et.Hr()?n=Et:i==="memory"?n=wD:i==="cookie"?n=yn:r.Hr()?(n=r,s=!0):n=yn,this.Ds=s,n}na(e){return this.Hs+"__"+e}zs(e){return this.Ds&&!!e.split_storage}properties(){var e={};return _t(this.props,((n,r)=>{var s=mi(r);if(!s||s.exposure==="event"){if(s!=null&&s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n))return;e[r]=n}})),e}load(e){if(e===void 0&&(e=!1),!this.Js||e){var n=this.zi.cookieWinsOnConflict&&this.zi.persistence.toLowerCase()==="localstorage+cookie",r=n?wt.Vr(this.Hs):null,s={};if(n)try{_t(s=Wg(yn.Vr(this.Hs)),((x,y)=>{(de(x)||Xn(x)||x==="")&&delete s[y]}))}catch{}var i=this.xs.Vr(this.Hs);if(i&&(this.props=St({},i)),this.$s&&this.sa(),n&&i){var a,u,c=r==null?void 0:r[gr],d=(a=r==null?void 0:r[nt])!==null&&a!==void 0?a:dn,f=i[gr],p=(u=i[nt])!==null&&u!==void 0?u:dn;if(f!==c||p!==d){this.Ns=!0,Et.Ur(hp(this.Hs),!0);var m=St({},this.props);Bg.forEach((x=>delete m[x])),p===dn&&(d===Zn||s[nt]===dn||!de(c)&&f!==c)&&(f4(m,s),delete m[Si]),this.props=m;var _=new Set;Bg.forEach((x=>{var y,w=(y=mi(x))==null?void 0:y.storageGroup;w&&_.add(w)})),_.forEach((x=>{var y={};_t(this.props,((w,b)=>{var C;((C=mi(b))==null?void 0:C.storageGroup)===x&&(y[b]=w)})),Zs(y)?(wt.Wr(this.na(x)),this.Ls[x]={}):wt.Ur(this.na(x),y)&&(this.Ls[x]={persisted:!0,fingerprint:this.aa(y,x)})}))}}Et.$r(hp(this.Hs))&&(this.Ns=!0)}}sa(){for(var e of Zg){var n=wt.Vr(this.na(e));if(n&&!Zs(n)){var r=this.oa(e);r.persisted=!0,this.la(e)||(r.fingerprint=this.aa(n,e)),this.ua(e,n)||St(this.props,n)}}}la(e){return Object.keys(this.props).some((n=>{var r;return((r=mi(n))==null?void 0:r.storageGroup)===e}))}ua(e,n){var r=zD[e];if(!r)return!1;var s=n[r],i=this.props[r];return sn(s)&&sn(i)&&i>s}refreshKey(e){var n;if(!this.Js){var r=this.$s?(n=mi(e))==null?void 0:n.storageGroup:void 0,s=r?wt.Vr(this.na(r)):this.xs.Vr(this.Hs);if(s&&e in s)this.Ks(e,s[e]);else{if(r){var i=this.xs.Vr(this.Hs);if(i&&e in i)return void this.Ks(e,i[e])}this.Ys(e)}}}save(){if(!this.Js){var e=this.Ws();e>0?de(this.ea)&&(this.ea=setTimeout((()=>{this.ea=void 0,this.ia()}),e)):this.ia()}}flush(){de(this.ea)||(clearTimeout(this.ea),this.ea=void 0,this.ia())}ia(e){e===void 0&&(e=!1),this.Js||this.qs&&!e||(e||this.syncCookieProperties(),this.$s?this.ha():this.da(this.xs,this.Hs,this.props,Bo)&&this.Vs(this.props))}ha(){var e=this.va(),n=e.main,r=e.groups;for(var s of(this.da(this.xs,this.Hs,n,Bo)&&this.Vs(n),Zg)){var i,a=r[s];(!Zs(a)||(i=this.Ls[s])!=null&&i.persisted)&&this.da(wt,this.na(s),a,s)}}va(){var e={},n={flags:{},surveys:{}};return _t(this.props,((r,s)=>{var i,a=(i=mi(s))==null?void 0:i.storageGroup;a?n[a][s]=r:e[s]=r})),{main:e,groups:n}}aa(e,n){if(n===Bo)return JSON.stringify(e)+"|"+this.ca+"|"+this.fa+"|"+this.pa;var r={};return _t(e,((s,i)=>{var a;r[i]=(a=mi(i))!=null&&a.volatile?"__volatile__":s})),JSON.stringify(r)}da(e,n,r,s){var i,a=this.oa(s);if(s!==Bo&&!a.dirty&&!de(a.fingerprint))return!1;try{if((i=this.aa(r,s))===a.fingerprint)return a.dirty=!1,!1}catch{i=void 0}return e.Ur(n,r,this.ca,this.fa,this.pa,this.zi.debug)?(a.dirty=!1,s!==Bo&&(a.persisted=!0),de(i)||(a.fingerprint=i),!0):(this.zi.debug&&ge.warn('failed to persist storage entry "'+n+'"; will retry on next save'),!1)}remove(e){var n=(e===void 0?{}:e).keepGroupEntries,r=n!==void 0&&n;if(de(this.ea)||(clearTimeout(this.ea),this.ea=void 0),this.xs.Wr(this.Hs,!1),this.xs.Wr(this.Hs,!0),!r&&this.js)for(var s of Zg)wt.Wr(this.na(s));r?delete this.Ls[Bo]:this.Ls={},this.Gs=void 0,this.Zs=void 0}clear(){this.remove(),this.props={}}register_once(e,n,r){if(bt(e)){this.syncCookieProperties(),de(n)&&(n="None"),this.ca=de(r)?this.ga:r;var s=!1;if(_t(e,((i,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==n||(this.Ks(a,i),s=!0)})),s)return this.save(),!0}return!1}register(e,n){if(bt(e)){this.syncCookieProperties(),this.ca=de(n)?this.ga:n;var r=!1;if(_t(e,((s,i)=>{e.hasOwnProperty(i)&&(this.props[i]!==s||bt(s)||Ke(s))&&(this.Ks(i,s),r=!0)})),r)return this.save(),!0}return!1}unregister(e){this.syncCookieProperties();var n=typeof e=="string"?[e]:e,r=!1;for(var s of n)s in this.props&&(this.Ys(s),r=!0);r&&this.save()}update_campaign_params(){var e=fe==null?void 0:fe.URL;if(e!==this.Bs){var n=WP(this.zi.custom_campaign_params,this.zi.mask_personal_data_properties,this.zi.custom_personal_data_properties);Zs(J2(n))||this.register(n),this.Bs=e}}update_search_keyword(){var e;this.register((e=fe==null?void 0:fe.referrer)?GP(e):{})}update_referrer_info(){var e;this.register_once({$referrer:KP(),$referring_domain:fe!=null&&fe.referrer&&((e=uc(fe.referrer))==null?void 0:e.host)||Vm},void 0)}set_initial_person_info(){this.props[Yy]||this.props[Xy]||this.register_once({[Mm]:ZP(this.zi.mask_personal_data_properties,this.zi.custom_personal_data_properties,this.zi.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};_t([Xy,Yy],(s=>{var i=this.props[s];i&&_t(i,(function(a,u){e["$initial_"+Iy(u)]=a}))}));var n=this.props[Mm];if(n){var r=(function(s,i){i===void 0&&(i=!1);var a=YP(s,i),u={};return _t(a,(function(c,d){u["$initial_"+Iy(d)]=c})),u})(n,this.zi.disable_capture_url_hashes);St(e,r)}return e}safe_merge(e){return _t(this.props,(function(n,r){r in e||(e[r]=n)})),e}update_config(e,n,r){var s=e.persistence!==n.persistence,i=!((y,w)=>{if(y.length!==w.length)return!1;var b=[...y].sort(),C=[...w].sort();return b.every(((P,T)=>P===C[T]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),a=s||i,u=e.cookieWinsOnConflict!==n.cookieWinsOnConflict,c=e.disable_persistence||!!r,d=!!this.Js&&!c;c||this.Qs(n,d),this.zi=e,!c&&(s||i||u)&&(this.Gs=void 0,this.Zs=void 0,this.Qs(ue({},e,{cookie_persisted_properties:n.cookie_persisted_properties}),d));var f=a||u?this.Us(e):this.xs,p=this.zs(e),m=a||p!==this.$s,_=!c&&(m||e.cross_subdomain_cookie!==this.fa||e.secure_cookie!==this.pa)&&this.Xs(d);try{if(this.ga=this.ca=e.cookie_expiration,this.set_disabled(c),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),m){var x=this.props;this.clear(),this.xs=f,this.$s=p,this.props=x,this.save()}else u&&(this.xs=f,c||(delete this.Ls[Bo],this.ia()))}finally{_&&this.ra()}}set_disabled(e){this.Js=e,this.Js?this.remove():this.save()}set_cross_subdomain(e){e!==this.fa&&(this.fa=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.pa&&(this.pa=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var r=this.props[Id]||{};r[e]=n,this.Ks(Id,r),this.save()}remove_event_timer(e){var n=this.props[Id]||{},r=n[e];return de(r)||(delete n[e],this.Ks(Id,n),this.save()),r}get_property(e){return this.props[e]}set_property(e,n){this.Ks(e,n),this.save()}Ks(e,n){var r;this.props[e]=n,(r=mi(e))!=null&&r.volatile||this.ma(e)}Ys(e){delete this.props[e],this.ma(e)}ma(e){var n,r=(n=mi(e))==null?void 0:n.storageGroup;r&&(this.oa(r).dirty=!0)}oa(e){return this.Ls[e]||(this.Ls[e]={})}}function pp(t){var e=!0;return{dispose(){if(e){e=!1;var n=t();n&&ar(n.then)&&n.then(void 0,(()=>{}))}}}}var es={GZipJS:"gzip-js",Base64:"base64"},gd={Activation:"events",Cancellation:"cancelEvents"},Xg={Popover:"popover",API:"api",Widget:"widget"},uo={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Qg={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},s_={Popover:"popover",Inline:"inline"},UD={SHOWN:"product tour shown"},h4={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},p4=jt("[RateLimiter]");class BD{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((s=>{p4.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4}))}catch(s){return void p4.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:r})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var n,r,s;e===void 0&&(e=!1);var i=this.captureEventsBurstLimit,a=this.captureEventsPerSecond,u=new Date().getTime(),c=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Zy))!==null&&n!==void 0?n:{tokens:i,last:u};c.tokens+=(u-c.last)/1e3*a,c.last=u,c.tokens>i&&(c.tokens=i);var d=1>c.tokens;if(d||e||(c.tokens=Math.max(0,c.tokens-1)),d&&!e){var f=(sn(c.dropped)?c.dropped:0)+1;c.dropped=f,!this.lastEventRateLimited&&this.ya(f)&&(c.dropped=0)}return this.lastEventRateLimited=d,(s=this.instance.persistence)==null||s.set_property(Zy,c),{isRateLimited:d,remainingTokens:c.tokens}}ba(e){var n=this.instance.config.property_denylist;return!Ke(n)||!n.includes(e)}_a(){var e;if(this.ba("$current_url")&&this.ba("$pathname")&&zt!=null&&zt.pathname)return""+((e=zt.origin)!==null&&e!==void 0?e:"")+zt.pathname}ya(e){var n,r,s=this.captureEventsBurstLimit,i=this.captureEventsPerSecond,a=this._a(),u=this.ba("$session_id")?(n=(r=this.instance).get_session_id)==null?void 0:n.call(r):void 0,c=[e+" event(s) dropped since the last warning",a?"triggered on "+a:void 0,u?"session "+u:void 0].filter(Boolean).join(", ");return!!this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited: "+c+". Config is set to "+i+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0})}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Wo=jt("[RemoteConfig]");class QP{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Re._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}wa(e){var n,r;(n=Re.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Re.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}ka(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:e})}load(){try{if(this.remoteConfig)return Wo.info("Using preloaded remote config",this.remoteConfig),void this.Sa(this.remoteConfig);if(this._instance.xa())return void Wo.warn("Remote config is disabled. Falling back to local config.");this.wa((e=>{if(!e)return Wo.info("No config found after loading remote JS config. Falling back to JSON."),void this.ka((n=>{this.Sa(n.json,n)}));this.Sa(e)}))}catch(e){Wo.error("Error loading remote config",e),this.Sa()}}Sa(e,n){!e&&n&&(n.statusCode===0?n.error||Wo.warn("Failed to fetch remote config from PostHog."):Wo.error("Failed to fetch remote config from PostHog."));try{this._instance.Sa(e?{ok:!0,config:e}:{ok:!1})}catch(s){Wo.error("Error applying remote config",s)}if((e==null?void 0:e.hasFeatureFlags)!==!1&&!this._instance.config.advanced_disable_feature_flags_on_first_load)try{var r;(r=this._instance.featureFlags)==null||r.ensureFlagsLoaded()}catch(s){Wo.error("Error loading feature flags",s)}}}var Rs=Uint8Array,$r=Uint16Array,fc=Uint32Array,rx=new Rs([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]),sx=new Rs([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]),m4=new Rs([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),JP=function(t,e){for(var n=new $r(31),r=0;31>r;++r)n[r]=e+=1<<t[r-1];var s=new fc(n[30]);for(r=1;30>r;++r)for(var i=n[r];n[r+1]>i;++i)s[i]=i-n[r]<<5|r;return[n,s]},e3=JP(rx,2),i_=e3[1];e3[0][28]=258,i_[258]=28;for(var v4=JP(sx,0)[1],t3=new $r(32768),Ut=0;32768>Ut;++Ut){var du=(43690&Ut)>>>1|(21845&Ut)<<1;t3[Ut]=((65280&(du=(61680&(du=(52428&du)>>>2|(13107&du)<<2))>>>4|(3855&du)<<4))>>>8|(255&du)<<8)>>>1}var Vd=function(t,e,n){for(var r=t.length,s=0,i=new $r(e);r>s;++s)++i[t[s]-1];var a,u=new $r(e);for(s=0;e>s;++s)u[s]=u[s-1]+i[s-1]<<1;for(a=new $r(r),s=0;r>s;++s)a[s]=t3[u[t[s]-1]++]>>>15-t[s];return a},Rl=new Rs(288);for(Ut=0;144>Ut;++Ut)Rl[Ut]=8;for(Ut=144;256>Ut;++Ut)Rl[Ut]=9;for(Ut=256;280>Ut;++Ut)Rl[Ut]=7;for(Ut=280;288>Ut;++Ut)Rl[Ut]=8;var $m=new Rs(32);for(Ut=0;32>Ut;++Ut)$m[Ut]=5;var WD=Vd(Rl,9),qD=Vd($m,5),n3=function(t){return(t/8>>0)+(7&t&&1)},r3=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof $r?$r:t instanceof fc?fc:Rs)(n-e);return r.set(t.subarray(e,n)),r},Gi=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8},yd=function(t,e,n){var r=e/8>>0;t[r]|=n<<=7&e,t[r+1]|=n>>>8,t[r+2]|=n>>>16},Jg=function(t,e){for(var n=[],r=0;t.length>r;++r)t[r]&&n.push({s:r,f:t[r]});var s=n.length,i=n.slice();if(!s)return[new Rs(0),0];if(s==1){var a=new Rs(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(A,R){return A.f-R.f})),n.push({s:-1,f:25001});var u=n[0],c=n[1],d=0,f=1,p=2;for(n[0]={s:-1,f:u.f+c.f,l:u,r:c};f!=s-1;)u=n[n[p].f>n[d].f?d++:p++],c=n[d!=f&&n[p].f>n[d].f?d++:p++],n[f++]={s:-1,f:u.f+c.f,l:u,r:c};var m=i[0].s;for(r=1;s>r;++r)i[r].s>m&&(m=i[r].s);var _=new $r(m+1),x=o_(n[f-1],_,0);if(x>e){r=0;var y=0,w=x-e,b=1<<w;for(i.sort((function(A,R){return _[R.s]-_[A.s]||A.f-R.f}));s>r;++r){var C=i[r].s;if(e>=_[C])break;y+=b-(1<<x-_[C]),_[C]=e}for(y>>>=w;y>0;){var P=i[r].s;e>_[P]?y-=1<<e-_[P]++-1:++r}for(;r>=0&&y;--r){var T=i[r].s;_[T]==e&&(--_[T],++y)}x=e}return[new Rs(_),x]},o_=function(t,e,n){return t.s==-1?Math.max(o_(t.l,e,n+1),o_(t.r,e,n+1)):e[t.s]=n},g4=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new $r(++e),r=0,s=t[0],i=1,a=function(c){n[r++]=c},u=1;e>=u;++u)if(t[u]==s&&u!=e)++i;else{if(!s&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(s),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(s);i=1,s=t[u]}return[n.subarray(0,r),e]},_d=function(t,e){for(var n=0,r=0;e.length>r;++r)n+=t[r]*e[r];return n},a_=function(t,e,n){var r=n.length,s=n3(e+2);t[s]=255&r,t[s+1]=r>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var i=0;r>i;++i)t[s+i+4]=n[i];return 8*(s+4+r)},y4=function(t,e,n,r,s,i,a,u,c,d,f){Gi(e,f++,n),++s[256];for(var p=Jg(s,15),m=p[0],_=p[1],x=Jg(i,15),y=x[0],w=x[1],b=g4(m),C=b[0],P=b[1],T=g4(y),A=T[0],R=T[1],L=new $r(19),I=0;C.length>I;++I)L[31&C[I]]++;for(I=0;A.length>I;++I)L[31&A[I]]++;for(var O=Jg(L,7),N=O[0],j=O[1],F=19;F>4&&!N[m4[F-1]];--F);var G,Q,Z,W,q=d+5<<3,z=_d(s,Rl)+_d(i,$m)+a,X=_d(s,m)+_d(i,y)+a+14+3*F+_d(L,N)+(2*L[16]+3*L[17]+7*L[18]);if(z>=q&&X>=q)return a_(e,f,t.subarray(c,c+d));if(Gi(e,f,1+(z>X)),f+=2,z>X){G=Vd(m,_),Q=m,Z=Vd(y,w),W=y;var H=Vd(N,j);for(Gi(e,f,P-257),Gi(e,f+5,R-1),Gi(e,f+10,F-4),f+=14,I=0;F>I;++I)Gi(e,f+3*I,N[m4[I]]);f+=3*F;for(var D=[C,A],Y=0;2>Y;++Y){var oe=D[Y];for(I=0;oe.length>I;++I)Gi(e,f,H[J=31&oe[I]]),f+=N[J],J>15&&(Gi(e,f,oe[I]>>>5&127),f+=oe[I]>>>12)}}else G=WD,Q=Rl,Z=qD,W=$m;for(I=0;u>I;++I)if(r[I]>255){var J;yd(e,f,G[257+(J=r[I]>>>18&31)]),f+=Q[J+257],J>7&&(Gi(e,f,r[I]>>>23&31),f+=rx[J]);var se=31&r[I];yd(e,f,Z[se]),f+=W[se],se>3&&(yd(e,f,r[I]>>>5&8191),f+=sx[se])}else yd(e,f,G[r[I]]),f+=Q[r[I]];return yd(e,f,G[256]),f+Q[256]},GD=new fc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),KD=(function(){for(var t=new fc(256),e=0;256>e;++e){for(var n=e,r=9;--r;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),e1=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function ZD(t,e){e===void 0&&(e={});var n=(function(){var p=4294967295;return{p(m){for(var _=p,x=0;m.length>x;++x)_=KD[255&_^m[x]]^_>>>8;p=_},d(){return 4294967295^p}}})(),r=t.length;n.p(t);var s,i,a,u,c,d=(u=10+((s=e).filename&&s.filename.length+1||0),c=8,(function(p,m,_,x,y,w){var b=p.length,C=new Rs(x+b+5*(1+Math.floor(b/7e3))+y),P=C.subarray(x,C.length-y),T=0;if(!m||8>b)for(var A=0;b>=A;A+=65535){var R=A+65535;b>R?T=a_(P,T,p.subarray(A,R)):(P[A]=!0,T=a_(P,T,p.subarray(A,b)))}else{for(var L=GD[m-1],I=L>>>13,O=8191&L,N=(1<<_)-1,j=new $r(32768),F=new $r(N+1),G=Math.ceil(_/3),Q=2*G,Z=function(on){return(p[on]^p[on+1]<<G^p[on+2]<<Q)&N},W=new fc(25e3),q=new $r(288),z=new $r(32),X=0,H=0,D=(A=0,0),Y=0,oe=0;b>A;++A){var J=Z(A),se=32767&A,pe=F[J];if(j[se]=pe,F[J]=se,A>=Y){var Se=b-A;if((X>7e3||D>24576)&&Se>423){T=y4(p,P,0,W,q,z,H,D,oe,A-oe,T),D=X=H=0,oe=A;for(var ce=0;286>ce;++ce)q[ce]=0;for(ce=0;30>ce;++ce)z[ce]=0}var ae=2,$e=0,We=O,ze=se-pe&32767;if(Se>2&&J==Z(A-ze))for(var Fe=Math.min(I,Se)-1,ct=Math.min(32767,A),Kt=Math.min(258,Se);ct>=ze&&--We&&se!=pe;){if(p[A+ae]==p[A+ae-ze]){for(var rt=0;Kt>rt&&p[A+rt]==p[A+rt-ze];++rt);if(rt>ae){if(ae=rt,$e=ze,rt>Fe)break;var Ve=Math.min(ze,rt-2),Ne=0;for(ce=0;Ve>ce;++ce){var Je=A-ze+ce+32768&32767,Ct=Je-j[Je]+32768&32767;Ct>Ne&&(Ne=Ct,pe=Je)}}}ze+=(se=pe)-(pe=j[se])+32768&32767}if($e){W[D++]=268435456|i_[ae]<<18|v4[$e];var vt=31&i_[ae],xe=31&v4[$e];H+=rx[vt]+sx[xe],++q[257+vt],++z[xe],Y=A+ae,++X}else W[D++]=p[A],++q[p[A]]}}T=y4(p,P,!0,W,q,z,H,D,oe,A-oe,T)}return r3(C,0,x+n3(T)+y)})(i=t,(a=e).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+a.mem,u,c)),f=d.length;return(function(p,m){var _=m.filename;if(p[0]=31,p[1]=139,p[2]=8,p[8]=2>m.level?4:m.level==9?2:0,p[9]=3,m.mtime!=0&&e1(p,4,Math.floor(new Date(m.mtime||Date.now())/1e3)),_){p[3]=8;for(var x=0;_.length>=x;++x)p[x+10]=_.charCodeAt(x)}})(d,e),e1(d,f-8,n.d()),e1(d,f-4,r),d}var YD=!!Py||!!z2,s3="text/plain",Gp=!1,i3=(t,e)=>{var n=t.split("#"),r=n[1],s=n[0].split("?"),i=s[0],a=s[1];if(!a)return t;var u=a.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return i+(u?"?"+u:"")+(r?"#"+r:"")},jf=function(t,e,n){var r;n===void 0&&(n=!0);var s=t.split("?"),i=s[0],a=s[1],u=ue({},e),c=(r=a==null?void 0:a.split("&").map((f=>{var p,m=f.split("="),_=m[0],x=n&&(p=u[_])!==null&&p!==void 0?p:m[1];return delete u[_],_+"="+x})))!==null&&r!==void 0?r:[],d=(function(f,p){var m,_;p===void 0&&(p="&");var x=[];return _t(f,(function(y,w){de(y)||de(w)||w==="undefined"||(m=encodeURIComponent((b=>b instanceof File)(y)?y.name:y.toString()),_=encodeURIComponent(w),x[x.length]=_+"="+m)})),x.join(p)})(u);return d&&c.push(d),c.length>0?i+"?"+c.join("&"):i},t1=t=>{if(t.Ca)return t.Ca;var e=t.data,n=t.compression;if(e){if(n===es.GZipJS){var r=ZD((function(u,c){var d=u.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(u);for(var f=new Rs(u.length+(u.length>>>1)),p=0,m=function(w){f[p++]=w},_=0;d>_;++_){if(p+5>f.length){var x=new Rs(p+8+(d-_<<1));x.set(f),f=x}var y=u.charCodeAt(_);128>y?m(y):2048>y?(m(192|y>>>6),m(128|63&y)):y>55295&&57344>y?(m(240|(y=65536+(1047552&y)|1023&u.charCodeAt(++_))>>>18),m(128|y>>>12&63),m(128|y>>>6&63),m(128|63&y)):(m(224|y>>>12),m(128|y>>>6&63),m(128|63&y))}return r3(f,0,p)})(Pu(e)),{mtime:0});return{contentType:s3,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===es.Base64){var s=(function(u){return u&&btoa(encodeURIComponent(u).replace(/%([0-9A-F]{2})/g,((c,d)=>String.fromCharCode(parseInt(d,16)))))})(Pu(e)),i=(u=>"data="+encodeURIComponent(typeof u=="string"?u:Pu(u)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var a=Pu(e);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},o3=t=>{var e,n,r=()=>t.transport==="sendBeacon"?{url:jf(t.url,{compression:es.Base64}),encodedBody:t1(ue({},t,{compression:es.Base64,Ca:void 0}))}:{url:i3(t.url,"compression"),encodedBody:t1(ue({},t,{compression:void 0,Ca:void 0}))};try{e=t1(t)}catch(s){if($E(t.compression,cc(t.url,"compression")))return ge.error("Failed to gzip request body, sending uncompressed payload",s),r();throw s}return e&&$E(t.compression,cc(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?Ny(new Uint8Array(n)):ArrayBuffer.isView(n)&&Ny(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(Gp=!0,r()):{url:t.url,encodedBody:e}},a3=t=>{try{return o3(t)}catch(e){return ge.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},XD=(function(){var t=Tt((function*(e){var n=Pu(e.data),r=yield(function(i,a,u){return Dy.apply(this,arguments)})(n,Pt.DEBUG,{rethrow:!0});if(!r)return e;var s=yield r.arrayBuffer();return ue({},e,{Ca:{contentType:s3,body:s,estimatedSize:s.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),QD=/Failed to fetch|NetworkError|Load failed/i,l3=t=>(t==null?void 0:t.name)==="TypeError"&&QD.test((t==null?void 0:t.message)||""),u3=t=>{var e=a3(t);if(e){var n=e.url,r=e.encodedBody,s=r??{},i=s.contentType,a=s.body,u=s.estimatedSize,c=new Headers;_t(t.headers,(function(x,y){c.append(y,x)})),i&&c.append("Content-Type",i);var d=null,f=!1;if(AE){var p=new AE;d={signal:p.signal,timeout:setTimeout((()=>{var x;f=!0,p.abort(oP("AbortError","PostHog request timed out"+((x=t.timeout)?" after "+x+"ms":"")))}),t.timeout)}}var m=x=>{f&&(x==null?void 0:x.name)==="AbortError"||l3(x)?ge.warn(x):ge.error(x),t.callback==null||t.callback({statusCode:0,error:x})};try{var _;z2(n,ue({method:(t==null?void 0:t.method)||"GET",headers:c,keepalive:t.method==="POST"&&!t.Ta&&52428.8>(u||0),body:a,signal:(_=d)==null?void 0:_.signal},t.fetchOptions)).then((x=>x.text().then((y=>{var w={statusCode:x.status,text:y};if(x.status===200)try{w.json=JSON.parse(y)}catch(b){ge.error(b)}t.callback==null||t.callback(w)})))).catch(m).finally((()=>d?clearTimeout(d.timeout):null))}catch(x){d&&clearTimeout(d.timeout),m(x)}}},l_=t=>{try{var e,n=o3(t),r=n.url,s=n.encodedBody,i=s??{},a=i.body,u=i.estimatedSize;if(!a)return;var c=a instanceof Blob?a:new Blob([a],{type:i.contentType});if(wr.sendBeacon(r,c))return;var d=Ke(t.data)?t.data:(e=t.data)==null?void 0:e.batch;if(Ke(d)&&d.length>1&&(u??0)>16384){var f=Math.ceil(d.length/2),p=m=>Ke(t.data)?m:ue({},t.data,{batch:m});return l_(ue({},t,{data:p(d.slice(0,f))})),void l_(ue({},t,{data:p(d.slice(f))}))}ge.warn("Beacon of ~"+(u??0)+" bytes was rejected by the browser, falling back to fetch"),u3(ue({},t,{Ta:!0}))}catch(m){ge.warn("Beacon send failed",m)}},_4=(t,e,n,r)=>{var s=r==="query"?e==="POST"?"sent_at":"_":void 0;return jf(n===es.GZipJS?i3(t,"compression"):t,ue({},s?{[s]:Date.now().toString()}:{},n===es.GZipJS?{}:{compression:n}))},Kp=[];z2&&Kp.push({transport:"fetch",method:u3}),Py&&Kp.push({transport:"XHR",method(t){var e=a3(t);if(e){var n=new Py,r=e.encodedBody;n.open(t.method||"GET",e.url,!0);var s=r??{},i=s.contentType,a=s.body;_t(t.headers,(function(u,c){n.setRequestHeader(c,u)})),i&&n.setRequestHeader("Content-Type",i),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var u={statusCode:n.status,text:n.responseText};if(n.status===200)try{u.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(u)}},n.send(a)}}}),wr!=null&&wr.sendBeacon&&Kp.push({transport:"sendBeacon",method:l_});var u_=3e3;class JD{constructor(e,n){this.Ma=!0,this.Ea=[],this.Ia=Pi((n==null?void 0:n.flush_interval_ms)||u_,250,5e3,ge.createLogger("flush interval"),u_),this.Ra=e}enqueue(e){this.Ea.push(e),this.Pa||this.Aa()}unload(){this.Fa();var e=this.Ea.length>0?this.Oa():{},n=Object.values(e);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.La(ue({},r,{transport:"sendBeacon"}))}))}enable(){this.Ma=!1,this.Aa()}Aa(){var e=this;this.Ma||(this.Pa=setTimeout((()=>{if(this.Fa(),this.Ea.length>0){var n=this.Oa(),r=function(){var i=n[s],a=new Date().getTime();i.data&&Ke(i.data)&&_t(i.data,(u=>{u.offset=Math.abs(u.timestamp-a),delete u.timestamp})),e.La(i)};for(var s in n)r()}}),this.Ia))}La(e){try{this.Ra(e)}catch(n){ge.error(n)}}Fa(){clearTimeout(this.Pa),this.Pa=void 0}Oa(){var e={};return _t(this.Ea,(n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;de(e[i])&&(e[i]=ue({},s,{data:[]})),(r=e[i].data)==null||r.push(s.data)})),this.Ea=[],e}}var e9=["retriesPerformedSoFar"];class t9{constructor(e){this.Da=!1,this.$a=3e3,this.Ea=[],this._instance=e,this.Ea=[],this.Na=!0,!de(ne)&&"onLine"in ne.navigator&&(this.Na=ne.navigator.onLine,this.qa=()=>{this.Na=!0,this.ja()},this.Ba=()=>{this.Na=!1},At(ne,"online",this.qa),At(ne,"offline",this.Ba))}get length(){return this.Ea.length}retriableRequest(e){var n=e.retriesPerformedSoFar,r=M6(e,e9);Ji(n)&&(r.url=jf(r.url,{retry_count:n})),this._instance._send_request(ue({},r,{callback:s=>{if(s.statusCode!==200&&(400>s.statusCode||s.statusCode>=500)){if((s.statusCode===0?3:10)>(n??0))return void this.An(ue({retriesPerformedSoFar:n},r));s.statusCode===0&&ge.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(s)}}))}An(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var r=(function(a){var u=3e3*Math.pow(2,a),c=u/2,d=Math.min(18e5,u),f=Math.random()-.5;return Math.ceil(d+f*(d-c))})(n),s=Date.now()+r;this.Ea.push({retryAt:s,requestOptions:e});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),ge.warn(i),this.Da||(this.Da=!0,this.Ha())}Ha(){if(this.Ua&&clearTimeout(this.Ua),this.Ea.length===0)return this.Da=!1,void(this.Ua=void 0);this.Ua=setTimeout((()=>{this.Na&&this.Ea.length>0&&this.ja(),this.Ha()}),this.$a)}ja(){var e=Date.now(),n=[],r=this.Ea.filter((i=>e>i.retryAt||(n.push(i),!1)));if(this.Ea=n,r.length>0)for(var s of r)this.retriableRequest(s.requestOptions)}unload(){for(var e of(this.Ua&&(clearTimeout(this.Ua),this.Ua=void 0),this.Da=!1,de(ne)||(this.qa&&(ne.removeEventListener("online",this.qa),this.qa=void 0),this.Ba&&(ne.removeEventListener("offline",this.Ba),this.Ba=void 0)),this.Ea)){var n=e.requestOptions;try{this._instance._send_request(ue({},n,{transport:"sendBeacon"}))}catch(r){ge.error(r)}}this.Ea=[]}}class n9{constructor(e){this.za=()=>{var n,r,s,i;this.Wa||(this.Wa={});var a=this.scrollElement(),u=this.scrollY(),c=a?Math.max(0,a.scrollHeight-a.clientHeight):0,d=u+((a==null?void 0:a.clientHeight)||0),f=(a==null?void 0:a.scrollHeight)||0;this.Wa.lastScrollY=Math.ceil(u),this.Wa.maxScrollY=Math.max(u,(n=this.Wa.maxScrollY)!==null&&n!==void 0?n:0),this.Wa.maxScrollHeight=Math.max(c,(r=this.Wa.maxScrollHeight)!==null&&r!==void 0?r:0),this.Wa.lastContentY=d,this.Wa.maxContentY=Math.max(d,(s=this.Wa.maxContentY)!==null&&s!==void 0?s:0),this.Wa.maxContentHeight=Math.max(f,(i=this.Wa.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=e}get Va(){return this._instance.config.scroll_root_selector}getContext(){return this.Wa}resetContext(){var e=this.Wa;return setTimeout(this.za,0),e}startMeasuringScrollPosition(){At(ne,"scroll",this.za,{capture:!0}),At(ne,"scrollend",this.za,{capture:!0}),At(ne,"resize",this.za)}scrollElement(){if(!this.Va)return ne==null?void 0:ne.document.documentElement;var e=Ke(this.Va)?this.Va:[this.Va];for(var n of e){var r=ne==null?void 0:ne.document.querySelector(n);if(r)return r}}Ga(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.Va){var r=this.scrollElement();return r&&r[n]||0}return ne?e==="y"?ne.scrollY||ne.pageYOffset||ne.document.documentElement.scrollTop||0:ne.scrollX||ne.pageXOffset||ne.document.documentElement.scrollLeft||0:0}scrollY(){return this.Ga("y")}scrollX(){return this.Ga("x")}}var r9=t=>ZP(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties,t==null?void 0:t.config.disable_capture_url_hashes);class x4{constructor(e,n,r,s){this.ut=i=>{var a=this.Za();if(!a||a.sessionId!==i){var u={sessionId:i,props:this.Qa(this._instance)};this.Ja.register({[Ky]:u})}},this._instance=e,this.Ka=n,this.Ja=r,this.Qa=s||r9,this.Ka.onSessionId(this.ut)}Za(){return this.Ja.props[Ky]}getSetOnceProps(){var e,n=(e=this.Za())==null?void 0:e.props;return n?"r"in n?YP(n,this._instance.config.disable_capture_url_hashes):{$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 _t(J2(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),e["$session_entry_"+Iy(r)]=n})),e}}class zm{on(e,n){return this.Ya[e]||(this.Ya[e]=[]),this.Ya[e].push(n),()=>{this.Ya[e]=this.Ya[e].filter((r=>r!==n))}}emit(e,n){for(var r of this.Ya[e]||[])r(n);for(var s of this.Ya["*"]||[])s(e,n)}constructor(){this.Ya={}}}var fu=jt("[SessionId]"),w4=864e5;class b4{on(e,n){return this.Xa.on(e,n)}constructor(e,n,r){var s;if(this.eo=null,this.io=null,this.ro=[],this.no=void 0,this.so=!1,this.Xa=new zm,this.ao=(c,d)=>!(!Ji(c)||!Ji(d))&&Math.abs(c-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===lo)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.zi=e.config,this.Ja=e.persistence,this.ct=void 0,this._e=void 0,this._sessionStartTimestamp=null,this.oo=void 0,this._sessionActivityTimestamp=null,this.lo=n||yi,this.uo=r||yi;var i=this.zi.persistence_name||this.zi.token;if(this._sessionTimeoutMs=1e3*Pi(this.zi.session_idle_timeout_seconds||1800,60,36e3,fu.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ho(),this.do="ph_"+i+"_window_id",this.vo="ph_"+i+"_primary_window_exists",this.co()){var a=Et.Vr(this.do),u=Et.Vr(this.vo);a&&!u?this.ct=a:Et.Wr(this.do),Et.Ur(this.vo,!0)}(s=this.zi.bootstrap)!=null&&s.sessionID&&this.setBootstrapSessionId(this.zi.bootstrap.sessionID),this.fo()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return de(this.ro)&&(this.ro=[]),this.ro.push(e),this._e&&e(this._e,this.ct),()=>{this.ro=this.ro.filter((n=>n!==e))}}co(){return this.zi.persistence!=="memory"&&!this.Ja.Js&&Et.Hr()}po(e){e!==this.ct&&(this.ct=e,this.co()&&Et.Ur(this.do,e))}mo(){return this.ct?this.ct:this.co()?Et.Vr(this.do):null}yo(e){var n=this.eo;return!Xn(n)&&!Xn(e)&&5e3>Math.abs(e-n)}bo(e,n,r){var s=n!==this._sessionActivityTimestamp,i=!(e!==this._e||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this._e=e,i&&!s||i&&this.yo(n)||(this.eo=n,this.Ja.register({[ku]:[n,e,r]}))}_o(){var e,n=(e=this.zi)==null?void 0:e.persistence_save_debounce_ms;return Ji(n)&&n>0}wo(){this._o()?this.Ja.refreshKey(ku):(this.Ja.flush(),this.Ja.load())}ko(){var e;if(!Xn(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.eo){this.wo();var n=this.So();n[1]===this._e&&n[2]===this._sessionStartTimestamp&&(this.eo=this._sessionActivityTimestamp,this.Ja.register({[ku]:[this._sessionActivityTimestamp,(e=this._e)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.Ja.flush())}}xo(){var e=this.So()[0],n=Ji(e)?e:0,r=Ji(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}Co(e){return this.wo(),this.ao(e,this.xo())}So(){var e=this.Ja.props[ku];return Ke(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.eo=null,this.oo=void 0,clearTimeout(this.To),this.To=void 0,this.bo(null,null,null)}setBootstrapSessionId(e,n){n===void 0&&(n=!1);var r=(function(s,i){i===void 0&&(i=new Date().getTime());try{var a=(u=>{var c=u.replace(/-/g,"");if(c.length!==32)throw new Error("Not a valid UUID");if(c[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(c.substring(0,12),16)})(s);return a>i+6e4?void fu.error("Bootstrap sessionID cannot be in the future"):a}catch(u){return void fu.error("Invalid sessionID in bootstrap",u)}})(e);return!de(r)&&(n?this.oo={sessionId:e,sessionStartTimestamp:r}:this.bo(e,new Date().getTime(),r),!0)}destroy(){this.so=!0,this.ko(),clearTimeout(this.To),this.To=void 0,this.no&&ne&&(ne.removeEventListener(Lm,this.no,{capture:!1}),this.no=void 0),this.ro=[]}fo(){this.no=()=>{this.ko(),this.co()&&Et.Wr(this.vo)},At(ne,Lm,this.no,{capture:!1})}checkAndGetSessionAndWindowId(e,n,r){if(e===void 0&&(e=!1),n===void 0&&(n=null),r===void 0&&(r=!1),this.zi.cookieless_mode===lo)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var s=n||new Date().getTime(),i=this._e;if(r)this.io=s;else if(Xn(this.io)||this.io>s||s-this.io>=1e3){var a,u;(a=(u=this.Ja).syncCookieProperties)==null||a.call(u),this.io=s}var c=this.So(),d=c[1],f=c[2],p=!de(i)&&d!==i,m=this.xo(),_=this.mo(),x=this.oo,y=!!x&&(x.sessionStartTimestamp>s+6e4||s-x.sessionStartTimestamp>w4),w=x?y:Ji(f)&&Math.abs(s-f)>w4,b=!1,C=p,P=!d||!!x,T=d,A=!P&&!e&&this.ao(s,m);if(A){(A=this.Co(s))||fu.info("cross-tab refresh kept the session alive",{sessionId:d});var R=this.So();d=R[1],f=R[2]}if(P||A||w){C=!1;var L=x&&!y;d=L?x.sessionId:this.lo(),_=this.uo(),fu.info("new session ID assigned",{sessionId:d,windowId:_,bootstrapped:!!L,changeReason:{noSessionId:P,activityTimeout:A,sessionPastMaximumLength:w}}),f=L?x.sessionStartTimestamp:s,this.oo=void 0,b=!0}else _||(_=this.uo(),b=!0),(C=C||d!==T)&&(fu.info("adopted cross-tab session id",{sessionId:d,windowId:_}),b=!0);var I=Ji(m)&&e&&!w?m:s,O=Ji(f)?f:new Date().getTime();this.po(_),this.bo(d,I,O),e||this.ho();var N={noSessionId:P,activityTimeout:A,sessionPastMaximumLength:w,crossTabAdoption:C};return b&&this.ro.forEach((j=>j(d,_,N))),{sessionId:d,windowId:_,sessionStartTimestamp:O,changeReason:b?N:void 0,lastActivityTimestamp:m}}ho(){this.so||(clearTimeout(this.To),this.To=setTimeout((()=>{if(!this.so)if(this.Co(new Date().getTime())){var e=this._e;this.resetSessionId(),this.Xa.emit("forcedIdleReset",{idleSessionId:e})}else this.ho()}),1.1*this.sessionTimeoutMs))}}var c3=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&LE(n,e))return!0;try{var r=t==null?void 0:t.userAgentData;if(r!=null&&r.brands&&r.brands.some((s=>LE(s==null?void 0:s.brand,e))))return!0}catch{}return!!t.webdriver};function d3(){return(d3=Tt((function*(){var t=wr==null?void 0:wr.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e==null?void 0:e.model;return ut(n)&&n.length>0?n:void 0}catch(r){return void ge.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}}))).apply(this,arguments)}function f3(t){var e;return!((e=t.conditions)==null||(e=e.events)==null||(e=e.values)==null||!e.length)}var Hm=(t,e)=>{if(!(n=>{try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}},mp=t=>t.toLowerCase(),h3={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=>Hm(n,r))))),not_regex:(t,e)=>e.every((n=>t.every((r=>!Hm(n,r))))),icontains:(t,e)=>e.map(mp).some((n=>t.map(mp).some((r=>n.includes(r))))),not_icontains:(t,e)=>e.map(mp).every((n=>t.map(mp).every((r=>!n.includes(r))))),gt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r>parseFloat(s)))})),lt:(t,e)=>e.some((n=>{var r=parseFloat(n);return!isNaN(r)&&t.some((s=>r<parseFloat(s)))}))};function p3(t,e){return!t||Object.entries(t).every((n=>{var r=n[1],s=e==null?void 0:e[n[0]];if(s==null)return!1;var i=h3[r.operator];return!!i&&i(r.values,[String(s)])}))}function n1(t,e,n){return Pu({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var c_="custom",S4="i.posthog.com",s9=/^\/static\//,i9=["/s/","/e/","/i/"];class o9{constructor(e){this.Mo={},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 flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,n=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+S4,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Mo[this.apiHost]||(this.Mo[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":c_),this.Mo[this.apiHost]}Eo(e){if(s9.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}Io(e){var n=uc(e);return n?n.protocol+"//"+n.host+n.pathname:void 0}Ro(e,n,r){if(e==="ui")return r;var s=r,i=this.instance.config.rewriteRequestPath;if(i){var a,u=((a=uc(r))==null?void 0:a.href)||r;s=i(new URL(u)).toString()}if(i&&e==="api"&&i9.some((m=>n.indexOf(m)===0))){var c=this.Io(s);if(c){var d,f=this.apiHost,p=this.Po;((d=p)==null?void 0:d.apiHost)===f&&p.rewriteRequestPath===i||(p={apiHost:f,rewriteRequestPath:i,urls:new Set},this.Po=p),p.urls.add(c)}}return s}isIngestionEndpoint(e){var n=this.Po,r=this.Io(e);return(n==null?void 0:n.apiHost)===this.apiHost&&n.rewriteRequestPath===this.instance.config.rewriteRequestPath&&!!r&&n.urls.has(r)}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.Ro(e,n,this.uiHost+n);if(e==="flags")return this.Ro(e,n,this.flagsApiHost+n);if(e==="assets"){var r=this.Eo(n);if(r)return this.Ro(e,n,""+r+n)}if(this.region===c_)return this.Ro(e,n,this.apiHost+n);var s=S4+n;switch(e){case"assets":return this.Ro(e,n,"https://"+this.region+"-assets."+s);case"api":return this.Ro(e,n,"https://"+this.region+"."+s)}}}var pt=jt("[Surveys]"),m3="seenSurvey_",v3=t=>{try{var e=(n=>((r,s)=>""+m3+(function(i){return i.current_iteration&&i.current_iteration>0?i.id+"_"+i.current_iteration:i.id})(s))(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){pt.error("Failed to persist survey seen state",n)}},a9=[Xg.Popover,Xg.Widget,Xg.API],l9={ignoreConditions:!1,ignoreDelay:!1,displayType:s_.Popover},u9=jt("[PostHog ExternalIntegrations]"),c9={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class d9{constructor(e){this._instance=e}Es(e,n){var r;(r=Re.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,e,(s=>{if(s)return u9.error("failed to load script",s);n()}))}startIfEnabledOrStop(){var e=this,n=function(){var i,a,u,c=r[0],d=r[1];!d||(i=Re.__PosthogExtensions__)!=null&&(i=i.integrations)!=null&&i[c]||e.Es(c9[c],(()=>{var f;(f=Re.__PosthogExtensions__)==null||(f=f.integrations)==null||(f=f[c])==null||f.start(e._instance)})),!d&&(a=Re.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[c]&&((u=Re.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[c])==null||u.stop())};for(var r of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n()}}}class f9{constructor(e,n){this.I=e,this.cs=n,this.Ao=new Map,this.us=!1}add(e){var n=this;return Tt((function*(){if(n.us)throw new Error("Cannot add an extension to a disposed ExtensionRuntime");if(n.Ao.has(e.name))throw new Error('Browser extension "'+e.name+'" is already registered');n.Ao.set(e.name,e);try{var r=e.setup(n.cs);r&&(yield r)}catch(i){var s=n.Ao.get(e.name)===e;s&&n.Ao.delete(e.name),n.I.error('Failed to set up browser extension "'+e.name+'"',i),s&&n.Fo(e)}}))()}getExtension(e){return this.Ao.get(e)}dispose(){if(!this.us){this.us=!0;var e=Array.from(this.Ao.values()).reverse();for(var n of(this.Ao.clear(),e))this.Fo(n)}}Fo(e){try{var n=e.dispose==null?void 0:e.dispose();n&&ar(n.then)&&n.then(void 0,(r=>{this.I.error('Failed to dispose browser extension "'+e.name+'"',r)}))}catch(r){this.I.error('Failed to dispose browser extension "'+e.name+'"',r)}}}class h9{constructor(e){this._instance=e}initialize(){}get(e){var n=this._instance.persistence;if(typeof e=="string")return n==null?void 0:n.get_property(e);var r={};for(var s of e){var i=n==null?void 0:n.get_property(s);de(i)||(r[s]=i)}return r}set(e,n){var r;(r=this._instance.persistence)==null||r.register(typeof e=="string"?{[e]:n}:e)}remove(e){var n;(n=this._instance.persistence)==null||n.unregister(e)}}var E4="extensionsRemoteConfig";class p9{constructor(e){this.us=!1,this.instance=e,this.I=ge,this.Oo=e.Lo,this.kv=new h9(e),this.onEvent=n=>pp(this.instance.on("eventCaptured",(r=>{try{n({event:r.event,properties:r.properties})}catch(s){this.I.error("Browser extension event listener failed",s)}}))),this.onRemoteConfig=n=>{if(this.us)return pp((()=>{}));var r=i=>{try{n(i)}catch(a){this.I.error("Browser extension remote config listener failed",a)}},s=this.instance.Do.on(E4,r);return this.Oo&&r(this.Oo),pp(s)},this.$o=new f9(ge.createLogger("[BrowserExtensions]"),this)}get logger(){return this.I}get distinctId(){return this.instance.get_distinct_id()}get anonymousId(){var e;return(e=this.instance.get_property(ef))!==null&&e!==void 0?e:this.distinctId}get deviceId(){var e=this.instance.get_property(ef);return typeof e=="string"?e:void 0}get library(){return{name:Pt.LIB_NAME,version:Pt.LIB_VERSION}}get initialPersonProperties(){var e,n;return(e=(n=this.instance.persistence)==null?void 0:n.get_initial_props())!==null&&e!==void 0?e:{}}get groups(){return this.instance.getGroups()}get session(){try{var e,n,r,s,i=(e=this.instance.sessionManager)==null?void 0:e.checkAndGetSessionAndWindowId(!0);return{sessionId:(n=i==null?void 0:i.sessionId)!==null&&n!==void 0?n:"",windowId:(r=i==null?void 0:i.windowId)!==null&&r!==void 0?r:"",sessionStartTimestamp:(s=i==null?void 0:i.sessionStartTimestamp)!==null&&s!==void 0?s:0}}catch{return{sessionId:"",windowId:"",sessionStartTimestamp:0}}}get canCapture(){return this.instance.is_capturing()}get projectToken(){return this.instance.config.token}add(e){return this.$o.add(e)}getExtension(e){return this.$o.getExtension(e)}capture(e,n,r){var s=this;return Tt((function*(){r?s.instance.capture(e,n,{timestamp:r.timestamp,uuid:r.uuid,$set:r.set,$set_once:r.setOnce}):s.instance.capture(e,n)}))()}registerDynamicEventProperties(e){return pp(this.instance.No(e))}handleRemoteConfig(e){this.us||(this.Oo=e,this.instance.Do.emit(E4,e))}sendRequest(e,n){var r=this;return Tt((function*(){var s;n===void 0&&(n={});var i=r.instance.requestRouter.endpointFor((s=n.target)!==null&&s!==void 0?s:"api",e),a={method:n.method,url:n.query?jf(i,n.query):i,data:n.body,headers:n.headers,timeout:n.timeoutMs,fireCallbackOnDrop:!0,transport:n.transport,compression:n.compression,compressionFallback:n.target==="flags"&&n.compression==="best-available"?Ty.Base64:void 0,timestampMode:n.sentAt};return n.transport==="sendBeacon"?(r.instance._send_request(a),{statusCode:202}):new Promise((u=>{a.callback=u,r.instance._send_request(a)}))}))()}dispose(){this.us||(this.us=!0,this.$o.dispose())}}var $d={},r1=0,Um=()=>{},C4='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',xd="Surveys module not available",k4="sanitize_properties is deprecated. Use before_send instead",g3="Invalid value for property_denylist config: ",m9=["token","distinct_id",SP],bu="posthog",y3=!YD&&(Dr==null?void 0:Dr.indexOf("MSIE"))===-1&&(Dr==null?void 0:Dr.indexOf("Mozilla"))===-1,v9=t=>{var e={};return t&&t!=="unset"&&("2025-11-30">t||(e.strictMinimumDuration=!0),"2026-05-30">t||(e.canvasCapture={resolutionScale:.6}),"2026-06-25">t||(e.streamNetworkBody=!0),"2026-08-30">t||(e.captureJsonLd=!0)),e},s1=t=>{var e;return ue({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:mD(fe==null?void 0:fe.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Um,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:zt&&ut(zt==null?void 0:zt.search)&&zt.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_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:"fallback",enable_recording_console_log:void 0,secure_cookie:(ne==null||(e=ne.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,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_feature_flags_dedup_per_session:!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){ge.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Jy,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:u_},error_tracking:{},_onCapture:Um},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:PD,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:v9(n),external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n),cookieWinsOnConflict:!(!n||n==="unset"||"2026-08-29">n)}))(t))},g9=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"],["__preview_cookie_wins_on_conflict","cookieWinsOnConflict"]],P4=t=>{var e={};for(var n of g9){var r=n[0],s=n[1];de(t[r])||(e[s]=t[r])}var i=St({},e,t),a=t.__preview_external_dependency_versioned_paths;return de(a)||(de(t.strict_script_versioning)&&(i.strict_script_versioning=!!a),ut(a)&&de(t.asset_host)&&(i.asset_host=a)),Ke(t.property_blacklist)&&(de(t.property_denylist)?i.property_denylist=t.property_blacklist:Ke(t.property_denylist)?i.property_denylist=[...t.property_blacklist,...t.property_denylist]:ge.error(g3+t.property_denylist)),i};class y9{constructor(){this.__forceAllowLocalhost=!1}get qo(){return this.__forceAllowLocalhost}set qo(e){ge.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class ts{jo(e,n){if(e){var r=this.Ao.indexOf(e);r!==-1&&this.Ao.splice(r,1)}return this.Ao.push(n),n.initialize==null||n.initialize(),n}Bo(){return this.config.cookieless_mode===lo||this.config.cookieless_mode===rl&&this.consent.isRejected()}Ho(){if(!this.Bo()&&this.get_distinct_id()===cu){var e=this.persistence;if(e){this.Uo()||e.load(!0);var n=this.get_distinct_id();if(!n||n===cu){var r=this.config.get_device_id(yi());this.register({distinct_id:r,$device_id:r}),e.set_property(nt,dn)}this.zo()}}}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(){var e;this.webPerformance=new y9,this.Wo=!1,this.version=Pt.LIB_VERSION,this.Vo=new Set,this.Go="",this.Do=new zm,this.Ao=[],this.Zo=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=s1(),this.SentryIntegration=ND,this.sentryIntegration=r=>(function(s,i){var a=HP(s,i);return{name:zP,processEvent:u=>a(u)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Qo=!1,this.Jo=null,this.Ko=null,this.Yo=null,this.scrollManager=new n9(this),this.pageViewManager=new c4(this),this.rateLimiter=new BD(this),this.requestRouter=new o9(this),this.consent=new bD(this),this.externalIntegrations=new d9(this);var n=(e=ts.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.metrics=n.metrics&&new n.metrics(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,s,i)=>{var a=ut(r)?{[r]:s}:r;this.setPersonProperties(a),i==null||i({})},set_once:(r,s,i)=>{var a=ut(r)?{[r]:s}:r;this.setPersonProperties(void 0,a),i==null||i({})}},this.on("eventCaptured",(r=>ge.info('send "'+(r==null?void 0:r.event)+'"',r)))}init(e,n,r){if(r&&r!==bu){var s,i=(s=$d[r])!==null&&s!==void 0?s:new ts;return i._init(e,n,r),$d[r]=i,$d[bu][r]=i,i}return this._init(e,n,r)}_init(e,n,r){var s,i;n===void 0&&(n={});var a,u=ut(e)?e.trim():"";if(!u)return ge.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 u!==((a=this.config)==null?void 0:a.token)?console.warn("[PostHog.js]","You have already initialized PostHog with a different project token! Re-initializing is a no-op, so events will keep going to the project this instance was initialized with. To capture into a second project, load PostHog once, then initialize a named instance after the SDK has loaded, e.g. posthog.init('"+u+"', { ... }, 'project2')"):console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config=s1(n.defaults),n.debug=this.Xo(n.debug),this.tl=n,this.el=[],n.person_profiles?this.Ko=n.person_profiles:n.process_person&&(this.Ko=n.process_person);var c=s1(n.defaults),d=P4(n),f=St({},c,d,{name:r,token:u});bt(c.rageclick)&&bt(d.rageclick)&&(f.rageclick=St({},c.rageclick,d.rageclick)),bt(c.session_recording)&&bt(d.session_recording)&&(f.session_recording=St({},c.session_recording,d.session_recording)),this.set_config(f),this.config.on_xhr_error&&ge.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:es.GZipJS;var p=this.Uo();if(this.persistence=new Yg(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Yg(ue({},this.config,{persistence:"sessionStorage"}),p,!1),this.Go="ph_"+(this.config.persistence_name||this.config.token)+"_session_registered_properties",this.config.persistence!=="memory"&&!p&&Et.Hr()){var m=Et.Vr(this.Go);Ke(m)&&m.forEach((R=>{ut(R)&&this.Vo.add(R)}))}else Et.Wr(this.Go);var _=ue({},this.persistence.props),x=ue({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.il=new JD((R=>this.rl(R)),this.config.request_queue_config),this.nl=new t9(this),this.__request_queue=[];var y=this.Bo();if(y||(this.sessionManager=new b4(this),this.sessionPropsManager=new x4(this,this.sessionManager,this.persistence),this.sessionManager.onSessionId(((R,L,I)=>{(I!=null&&I.activityTimeout||I!=null&&I.sessionPastMaximumLength||I!=null&&I.crossTabAdoption)&&this.sl()}))),this.al(),this.config.__preview_deferred_init_extensions?(ge.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.ol(y)}),0)):(ge.info("Initializing extensions synchronously"),this.ol(y)),Pt.DEBUG=Pt.DEBUG||this.config.debug,Pt.DEBUG&&ge.info("Starting in debug mode",{this:this,config:n,thisC:ue({},this.config),p:_,s:x}),!this.config.identity_distinct_id||(s=n.bootstrap)!=null&&s.distinctID||(n.bootstrap=ue({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var w=n.bootstrap.distinctID,b=this.get_distinct_id(),C=this.persistence.get_property(nt);if(n.bootstrap.isIdentifiedID&&b!=null&&b!==w&&C===dn)this.identify(w);else if(n.bootstrap.isIdentifiedID&&b!=null&&b!==w&&C===Zn)ge.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var P=this.config.get_device_id(yi()),T=n.bootstrap.isIdentifiedID?P:w;this.persistence.set_property(nt,n.bootstrap.isIdentifiedID?Zn:dn),this.register({distinct_id:w,$device_id:T})}}if(y)this.register_once({distinct_id:cu,$device_id:null},"");else if(!this.get_distinct_id()){var A=this.config.get_device_id(yi());this.register_once({distinct_id:A,$device_id:A},""),this.persistence.set_property(nt,dn)}return At(ne,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(R,L){var I=R.config.segment;if(!I)return L();(function(O,N){var j=O.config.segment;if(!j)return N();var F=Q=>{var Z=()=>Q.anonymousId()||yi();O.config.get_device_id=Z,Q.id()&&(O.register({distinct_id:Q.id(),$device_id:Z()}),O.persistence.set_property(nt,Zn)),N()},G=j.user();"then"in G&&ar(G.then)?G.then(F):F(G)})(R,(()=>{I.register((O=>{typeof Promise<"u"&&Promise.resolve||Kg.warn("This browser does not have Promise support, and can not use the segment integration");var N=(j,F)=>{if(!F)return j;j.event.userId||j.event.anonymousId===O.get_distinct_id()||(Kg.info("No userId set, resetting PostHog"),O.reset()),j.event.userId&&j.event.userId!==O.get_distinct_id()&&(Kg.info("UserId set, identifying with PostHog"),O.identify(j.event.userId));var G=O.calculateEventProperties(F,j.event.properties);return j.event.properties=Object.assign({},G,j.event.properties),j};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:j=>N(j,j.event.event),page:j=>N(j,wu),identify:j=>N(j,Hg),screen:j=>N(j,"$screen")}})(R)).then((()=>{L()}))}))})(this,(()=>this.ll())):this.ll(),ar(this.config._onCapture)&&this.config._onCapture!==Um&&(ge.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(R=>this.config._onCapture(R.event,R)))),this.config.ip&&ge.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.config.disableDeviceModel||(function(){return d3.apply(this,arguments)})().then((R=>{R&&this.register({[$g]:R})})).catch(Um),this}ul(e){var n=e;return ut(n.name)&&ar(n.setup)}hl(e,n){this.ul(e)?n.push((()=>{this.dl().add(e).catch((()=>e.dispose==null?void 0:e.dispose())).catch((r=>{ge.error('Failed to dispose browser extension "'+e.name+'"',r)}))})):this.Ao.push(e)}al(){var e,n,r,s,i,a,u=(e=(n=this.config.__extensionClasses)==null?void 0:n.featureFlags)!==null&&e!==void 0?e:(r=ts.__defaultExtensionClasses)==null?void 0:r.featureFlags;u&&(this.featureFlags&&this.featureFlags instanceof u||((s=this.vl)==null||s.call(this),this.vl=void 0,this.featureFlags=new u(this)),ar(this.featureFlags.onReloading)&&ar(this.featureFlags.setup)?this.vl||(this.vl=this.featureFlags.onReloading((()=>{this.Do.emit("featureFlagsReloading",!0)})),this.dl().add(this.featureFlags)):(i=(a=this.featureFlags).initialize)==null||i.call(a))}ol(e){var n,r,s,i,a,u,c,d=performance.now(),f=ue({},ts.__defaultExtensionClasses,this.config.__extensionClasses),p=[];f.exceptions&&this.Ao.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new f.exceptions(this)),f.historyAutocapture&&this.Ao.push(this.historyAutocapture=new f.historyAutocapture(this)),f.tracingHeaders&&this.Ao.push(this.tracingHeaders=new f.tracingHeaders(this)),f.siteApps&&this.Ao.push(this.siteApps=new f.siteApps(this)),f.sessionRecording&&!e&&this.Ao.push(this.sessionRecording=new f.sessionRecording(this)),this.config.disable_scroll_properties||p.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),f.autocapture&&this.hl(this.autocapture=new f.autocapture(this),p),f.surveys&&this.hl(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new f.surveys(this),p),f.logs&&this.hl(this.logs=(s=this.logs)!==null&&s!==void 0?s:new f.logs(this),p),f.metrics&&this.Ao.push(this.metrics=(i=this.metrics)!==null&&i!==void 0?i:new f.metrics(this)),f.conversations&&this.Ao.push(this.conversations=(a=this.conversations)!==null&&a!==void 0?a:new f.conversations(this)),f.productTours&&this.Ao.push(this.productTours=new f.productTours(this)),f.heatmaps&&this.Ao.push(this.heatmaps=new f.heatmaps(this)),f.webVitalsAutocapture&&this.Ao.push(this.webVitalsAutocapture=new f.webVitalsAutocapture(this)),f.exceptionObserver&&this.Ao.push(this.exceptionObserver=new f.exceptionObserver(this)),f.deadClicksAutocapture&&this.Ao.push(this.deadClicksAutocapture=new f.deadClicksAutocapture(this,LD)),f.toolbar&&this.Ao.push(this.toolbar=(u=this.toolbar)!==null&&u!==void 0?u:new f.toolbar(this)),f.experiments&&this.Ao.push(this.experiments=(c=this.experiments)!==null&&c!==void 0?c:new f.experiments(this)),this.Ao.forEach((m=>{m.initialize&&p.push((()=>{m.initialize==null||m.initialize()}))})),p.push((()=>{if(this.cl){var m=this.cl;this.cl=void 0,this.Ao.forEach((_=>_.onRemoteConfig==null?void 0:_.onRemoteConfig(m)))}})),this.fl(p,d)}fl(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.fl(e,n)}),0);var r=e.shift();if(r)try{r()}catch(i){ge.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({[EP]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[CP]:s}),this.config.__preview_deferred_init_extensions&&ge.info("PostHog extensions initialized ("+s+"ms)")}Sa(e){var n;if(!fe||!fe.body)return ge.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Sa(e)}),500);if(this.config.__preview_deferred_init_extensions&&(this.cl=e),this.Lo=e,this.compression=void 0,e.ok){var r,s=e.config;s.supportedCompression&&!this.config.disable_compression&&(this.compression=Ze(s.supportedCompression,es.GZipJS)?es.GZipJS:Ze(s.supportedCompression,es.Base64)?es.Base64:void 0),(r=s.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=s.analytics.endpoint)}this.set_config({person_profiles:this.Ko?this.Ko:Jy}),(n=this.pl)==null||n.handleRemoteConfig(e),this.Ao.forEach((i=>i.onRemoteConfig==null?void 0:i.onRemoteConfig(e)))}ll(){try{this.config.loaded(this)}catch(r){ge.critical("`loaded` function failed",r)}if(this.gl(),this.config.internal_or_test_user_hostname&&zt!=null&&zt.hostname){var e=zt.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?e===n:n.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Bo())&&this.ml()}),1),this.yl=new QP(this),this.yl.load()}gl(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.il)==null||e.enable())}_dom_loaded(){this.is_capturing()&&up(this.__request_queue,(e=>this.rl(e))),this.__request_queue=[],this.gl()}_handle_unload(){var e,n,r,s,i;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),(n=this.metrics)==null||n.flush("sendBeacon"),this.config.request_batching?(this.bl()&&this.capture(zg),(r=this.logs)==null||r.flushLogs("sendBeacon"),(s=this.il)==null||s.unload(),(i=this.nl)==null||i.unload()):this.bl()&&this.capture(zg,null,{transport:"sendBeacon"})}_send_request(e){var n;this.__loaded?y3?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)?e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:429})):(e.transport=e.transport||this.config.api_transport,e.headers=ue({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?(n=this.compression)!==null&&n!==void 0?n:e.compressionFallback:e.compression,(de(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(r=>{var s,i,a,u=ue({},r);u.timeout=u.timeout||6e4;var c,d,f,p,m,_=(s=u.transport)!==null&&s!==void 0?s:"fetch";_==="sendBeacon"&&de(u.compression)&&u.data&&(u.compression=es.Base64),u.method==="POST"&&u.data&&(u.timestampMode==="capture-body"?u.data={api_key:(d=(m=(p=(Ke(c=u.data)?c:[c]).map((b=>ue({},b,b.timestamp instanceof Date&&!isNaN(b.timestamp.getTime())?{timestamp:b.timestamp.toISOString()}:{}))))[0])==null||(f=m.properties)==null?void 0:f.token)!==null&&d!==void 0?d:m==null?void 0:m.token,batch:p,sent_at:new Date().toISOString()}:u.timestampMode==="body"&&(u.data=(function(b,C){return C===void 0&&(C=new Date().toISOString()),Ke(b)?b.map((P=>ue({},P,{sent_at:C}))):ue({},b,{sent_at:C})})(u.data))),u.url=_4(u.url,u.method,u.compression,u.timestampMode);var x=Kp.filter((b=>!u.disableTransport||!b.transport||!u.disableTransport.includes(b.transport))),y=(i=(a=(function(b,C){for(var P=0;b.length>P;P++)if(b[P].transport===_)return b[P]})(x))==null?void 0:a.method)!==null&&i!==void 0?i:x[0].method;if(!y)throw new Error("No available transport method");var w=b=>{try{y(b)}catch(C){l3(C)?ge.warn(C):ge.error(C),u.callback==null||u.callback({statusCode:0,error:C})}};_!=="sendBeacon"&&u.data&&u.compression===es.GZipJS&&dN&&typeof Promise<"u"&&!Gp?XD(u).then((b=>{w(b)})).catch((b=>{if(zE(b))return Gp=!0,void w(ue({},u,{compression:void 0,url:_4(r.url,r.method,void 0,r.timestampMode)}));(C=>{if(!C||typeof C!="object")return!1;var P="name"in C?String(C.name):"";return zE(C)||P===lP})(b)&&(Gp=!0),w(u)})):y(u)})(ue({},e,{callback:r=>{var s,i;this.rateLimiter.checkForLimiting(r),400>r.statusCode||(s=(i=this.config).on_request_error)==null||s.call(i,r),e.callback==null||e.callback(r)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}rl(e){this.nl?this.nl.retriableRequest(e):this._send_request(e)}_execute_array(e){r1++;try{var n,r=[],s=[],i=[];up(e,(u=>{if(u)if(Ke(n=u[0]))i.push(u);else if(ar(u))try{u.call(this)}catch(c){ge.error("Error executing queued PostHog call",u,c)}else Ke(u)&&n==="alias"?r.push(u):Ke(u)&&n.indexOf("capture")!==-1&&ar(this[n])?i.push(u):s.push(u)}));var a=function(u,c){up(u,(function(d){try{if(Ke(d[0])){var f=c;_t(d,(function(p){f=f[p[0]].apply(f,p.slice(1))}))}else c[d[0]].apply(c,d.slice(1))}catch(p){ge.error("Error executing queued PostHog call",d,p)}}))};a(r,this),a(s,this),a(i,this)}finally{r1--}}push(e){if(r1>0&&Ke(e)&&ut(e[0])){var n=ts.prototype[e[0]];ar(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,r){var s,i,a,u,c;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.il){if(this.is_capturing())if(!de(e)&&ut(e)){this.Ho();var d=!this.config.opt_out_useragent_filter&&this._is_bot();if(!d||this.config.__preview_capture_bot_pageviews){var f=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(f==null||!f.isRateLimited){n!=null&&n.$current_url&&!ut(n==null?void 0:n.$current_url)&&(ge.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),e!=="$exception"||r!=null&&r._l||ge.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),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 p=new Date,m=(r==null?void 0:r.timestamp)||p,_=FE(r==null?void 0:r.uuid,yi),x={uuid:_,event:e,properties:this.calculateEventProperties(e,n||{},m,_)};e===wu&&this.config.__preview_capture_bot_pageviews&&d&&(x.event="$bot_pageview",x.properties.$browser_type="bot"),f&&(x.properties.$lib_rate_limit_remaining_tokens=f.remainingTokens);var y=e==="$feature_flag_called"&&x.properties.$feature_flag_has_experiment===!1&&this.get_property(Im)===!0;r!=null&&r.$set&&!y&&(x.$set=r==null?void 0:r.$set);var w=r==null?void 0:r.$unset;w&&(x.$unset=w);var b,C,P,T=y?void 0:this.wl(r==null?void 0:r.$set_once,e!==KE,e===Hg);if(T&&(x.$set_once=T),r!=null&&r._noTruncate||(i=this.config.properties_string_max_length,a=x,u=F=>ut(F)?F.slice(0,i):F,c=new Set,x=(function F(G,Q){if(G!==Object(G))return u?u(G):G;if(!c.has(G)){var Z;if(c.add(G),Ke(G))Z=[],up(G,(q=>{Z.push(F(q))}));else{var W={};_t(G,((q,z)=>{c.has(q)||(W[z]=F(q))})),Z=W}return Z}})(a)),x.timestamp=m,de(r==null?void 0:r.timestamp)||(x.properties.$event_time_override_provided=!0,x.properties.$event_time_override_system_time=p),y&&(x.properties=(function(F,G){G===void 0&&(G=[]);var Q={},Z=W=>{F[W]!==void 0&&(Q[W]=F[W])};return fN.forEach(Z),G.forEach(Z),Q})(x.properties,m9)),e===uo.DISMISSED||e===uo.SENT){var A=n==null?void 0:n[Qg.SURVEY_ID],R=n==null?void 0:n[Qg.SURVEY_ITERATION];v3({id:A,current_iteration:R}),x.$set=ue({},x.$set,{[(b={id:A,current_iteration:R},C=e===uo.SENT?"responded":"dismissed",P="$survey_"+C+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(P="$survey_"+C+"/"+b.id+"/"+b.current_iteration),P)]:!0})}else e===uo.SHOWN&&(x.$set=ue({},x.$set,{[Qg.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===UD.SHOWN){var L=n==null?void 0:n[h4.TOUR_TYPE];L&&(x.$set=ue({},x.$set,{[h4.TOUR_LAST_SEEN_DATE+"/"+L]:new Date().toISOString()}))}var I=ue({},x.properties.$set,x.$set);if(Zs(I)||this.setPersonPropertiesForFlags(I),!Qe(this.config.before_send)){var O=this.Rn(x);if(!O)return;(x=O).uuid=FE(x.uuid,yi)}this.Do.emit("eventCaptured",x);var N=(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),j={method:"POST",url:N,data:x,compression:"best-available",timestampMode:(r==null?void 0:r._batchKey)==="recordings"||/\/s\/(?:\?|$)/.test(N)?"body":"capture-body",batchKey:r==null?void 0:r._batchKey,transport:r==null?void 0:r.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.rl(j):this.il.enqueue(j),x}ge.critical("This capture call is ignored due to client rate limiting.")}}else ge.error("No event name provided to posthog.capture")}else ge.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}getExtension(e){var n;return(n=this.pl)==null?void 0:n.getExtension(e)}dl(){var e;return(e=this.pl)!==null&&e!==void 0?e:this.pl=new p9(this)}No(e){this.Zo.push(e);var n=!0;return()=>{if(n){n=!1;var r=this.Zo.indexOf(e);r!==-1&&this.Zo.splice(r,1)}}}kl(e){var n,r,s;return e===void 0&&(e=!0),!((n=this.persistence)==null||!n.consumeCookieIdentityChange())&&(this.Yo=null,this.persistence.get_property(nt)===dn&&((s=this.sessionPersistence)==null||s.clear(),this.Vo.clear(),this.Sl()),(r=this.featureFlags)==null||r.reset(),e&&this.reloadFeatureFlags(),!0)}calculateEventProperties(e,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;this.persistence.syncCookieProperties(),this.kl();var a=i?void 0:this.persistence.remove_event_timer(e),u=ue({},n);if(u.token=this.config.token,u.$config_defaults=this.config.defaults,this.Bo()&&(u[SP]=!0),e==="$snapshot"){var c=ue({},this.persistence.properties(),this.sessionPersistence.properties());return u.distinct_id=c.distinct_id,(!ut(u.distinct_id)&&!sn(u.distinct_id)||_m(u.distinct_id))&&ge.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),u}var d,f=(function(A,R,L,I){var O,N,j,F;if(I===void 0&&(I=!1),!Dr)return{};var G,Q=A?[...dc,...R||[]]:[],Z=(function(Kt){for(var rt=0;DE.length>rt;rt++){var Ve=DE[rt],Ne=Ve[1],Je=Ve[0].exec(Kt),Ct=Je&&(ar(Ne)?Ne(Je,Kt):Ne);if(Ct)return Ct}return["",""]})(Dr),W=Z[0],q=Z[1],z=(G=typeof navigator<"u"?navigator:void 0)!=null&&G.brave?{brave:!0}:{},X={};de(L)||(X.detectGoogleSearchApp=L);var H={},D=(O=navigator)==null||(O=O.userAgentData)==null?void 0:O.platform,Y=(N=navigator)==null?void 0:N.maxTouchPoints,oe=ne==null||(j=ne.screen)==null?void 0:j.width,J=ne==null||(F=ne.screen)==null?void 0:F.height,se=ne==null?void 0:ne.devicePixelRatio;de(D)||(H.userAgentDataPlatform=D),de(Y)||(H.maxTouchPoints=Y),de(oe)||(H.screenWidth=oe),de(J)||(H.screenHeight=J),de(se)||(H.devicePixelRatio=se);var pe,Se,ce,ae,$e,We,ze,Fe,ct=St(J2({$os:W,$os_version:q,$browser:iP(Dr,navigator.vendor,z,X),$device:jE(Dr),$device_type:(Se=Dr,ce=H,Fe=jE(Se),Fe===z6||Fe===$6||Fe==="Kobo"||Fe==="Kindle Fire"||Fe===eP?ic:Fe===Qd||Fe===Nu||Fe===Jd||Fe===My?"Console":Fe===U6?"Wearable":Fe?as:(ce==null?void 0:ce.userAgentDataPlatform)==="Android"&&((ae=ce==null?void 0:ce.maxTouchPoints)!==null&&ae!==void 0?ae:0)>0?600>Math.min(($e=ce==null?void 0:ce.screenWidth)!==null&&$e!==void 0?$e:0,(We=ce==null?void 0:ce.screenHeight)!==null&&We!==void 0?We:0)/((ze=ce==null?void 0:ce.devicePixelRatio)!==null&&ze!==void 0?ze:1)?as:ic:"Desktop"),$timezone:XP(),$timezone_offset:$D()}),{$current_url:rf(I?ca(zt==null?void 0:zt.href):zt==null?void 0:zt.href,Q,sf),$host:zt==null?void 0:zt.host,$pathname:zt==null?void 0:zt.pathname,$raw_user_agent:Dr.length>1e3?Dr.substring(0,997)+"...":Dr,$browser_version:LN(Dr,navigator.vendor,z,X),$browser_language:d4(),$browser_language_prefix:(pe=d4(),typeof pe=="string"?pe.split("-")[0]:void 0),$screen_height:ne==null?void 0:ne.screen.height,$screen_width:ne==null?void 0:ne.screen.width,$viewport_height:ne==null?void 0:ne.innerHeight,$viewport_width:ne==null?void 0:ne.innerWidth,$lib:Pt.LIB_NAME,$lib_version:Pt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return Pt.SDK_DIST_CHANNEL&&(ct.$sdk_dist_channel=Pt.SDK_DIST_CHANNEL),ct})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes);if(this.sessionManager){var p=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime(),!0),m=p.windowId;u.$session_id=p.sessionId,u.$window_id=m}this.sessionPropsManager&&St(u,this.sessionPropsManager.getSessionProps());try{var _;this.sessionRecording&&St(u,this.sessionRecording.sdkDebugProperties),u.$sdk_debug_retry_queue_size=(_=this.nl)==null?void 0:_.length}catch(A){u.$sdk_debug_error_capturing_properties=String(A)}if(this.requestRouter.region===c_&&(u.$lib_custom_api_host=this.config.api_host),d=e!==wu||i?e!==zg||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),u=St(u,d),e===wu&&fe&&(u.title=fe.title),!de(a)){var x=r.getTime()-a;u.$duration=parseFloat((x/1e3).toFixed(3))}Dr&&this.config.opt_out_useragent_filter&&(u.$browser_type=this._is_bot()?"bot":"browser");var y=this.persistence.properties(),w=this.sessionPersistence.properties();_t(["$referrer","$referring_domain"],(A=>{A in y&&delete w[A]}));var b={};if(this.Zo.length>0)for(var C of this.Zo.slice())try{St(b,C())}catch(A){ge.error("Failed to produce browser extension event properties",A)}(u=St({},f,y,w,ue({},b,u))).$is_identified=this._isIdentified(),Ke(this.config.property_denylist)?_t(this.config.property_denylist,(function(A){delete u[A]})):ge.error(g3+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var P=this.config.sanitize_properties;P&&(ge.error(k4),u=P(u,e));var T=this.xl();return u.$process_person_profile=T,T&&!i&&this.Cl("_calculate_event_properties"),u}wl(e,n,r){var s;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.xl()||this.Wo&&!r)return e;var i=this.persistence.get_initial_props(),a=(s=this.sessionPropsManager)==null?void 0:s.getSetOnceProps(),u=St({},i,a||{},e||{}),c=this.config.sanitize_properties;return c&&(ge.error(k4),u=c(u,"$set_once")),n&&(this.Wo=!0),Zs(u)?void 0:u}register(e,n){var r;(r=this.persistence)==null||r.register(e,n)}register_once(e,n,r){var s;(s=this.persistence)==null||s.register_once(e,n,r)}register_for_session(e){var n,r;(n=this.persistence)==null||n.syncCookieProperties(),this.kl(),(r=this.sessionPersistence)==null||r.register(e),Object.keys(e).forEach((s=>this.Vo.add(s))),this.Sl()}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e),this.Vo.delete(e),this.Sl()}Tl(e,n){this.register({[e]:n})}sl(){this.Vo.forEach((e=>{var n;(n=this.sessionPersistence)==null||n.unregister(e)})),this.Vo.clear(),this.Sl()}Sl(){var e;if(this.Go)if(this.config.persistence==="memory"||(e=this.sessionPersistence)!=null&&e.Js||!Et.Hr())Et.Wr(this.Go);else{var n=[];this.Vo.forEach((r=>n.push(r))),n.length>0?Et.Ur(this.Go,n):Et.Wr(this.Go)}}getFeatureFlag(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(e,n)}getAllFeatureFlags(){var e,n;return(e=(n=this.featureFlags)==null?void 0:n.getAllFeatureFlags())!==null&&e!==void 0?e:[]}isFeatureEnabled(e,n){var r,s;return(r=(s=this.featureFlags)==null?void 0:s.isFeatureEnabled(e,n))!==null&&r!==void 0?r:n==null?void 0:n.defaultValue}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,r){var s;(s=this.featureFlags)==null||s.updateFlags(e,n,r)}updateEarlyAccessFeatureEnrollment(e,n,r){var s;(s=this.featureFlags)==null||s.updateEarlyAccessFeatureEnrollment(e,n,r)}getEarlyAccessFeatures(e,n,r){var s;return n===void 0&&(n=!1),(s=this.featureFlags)==null?void 0:s.getEarlyAccessFeatures(e,n,r)}on(e,n){return this.Do.on(e,n)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:xd}),()=>{})}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?this.surveys.getSurveys(e,n):e([],{isLoaded:!1,error:xd})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:xd})}renderSurvey(e,n){var r;(r=this.surveys)==null||r.renderSurvey(e,n)}displaySurvey(e,n){var r;n===void 0&&(n=l9),(r=this.surveys)==null||r.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:xd}}canRenderSurveyAsync(e,n){var r,s;return n===void 0&&(n=!1),(r=(s=this.surveys)==null?void 0:s.canRenderSurveyAsync(e,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:xd})}Ml(e){return!e||_m(e)?(ge.critical("Unique user id has not been set in posthog.identify"),!1):e===cu?(ge.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(ge.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.'),!1)}identify(e,n,r){if(!this.__loaded||!this.persistence)return ge.uninitializedWarning("posthog.identify");if(sn(e)&&(e=e.toString(),ge.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Ml(e)&&this.Cl("posthog.identify")){this.Ho();var s=this.get_distinct_id(),i=this.persistence.syncCookieProperties()&&this.get_distinct_id()!==s,a=this.kl(!1),u=this.persistence.Xs(),c=!1;try{var d=this.get_distinct_id();this.register({$user_id:e}),this.get_property(ef)||this.register_once({$had_persisted_distinct_id:!0,$device_id:d},""),e!==d&&e!==this.get_property(Cu)&&(this.unregister(Cu),this.register({distinct_id:e}));var f,p=(this.persistence.get_property(nt)||dn)===dn,m=e!==d,_=!m&&p;if(m&&p)this.persistence.set_property(nt,Zn),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.config.cookieWinsOnConflict&&this.persistence.ta(),this.capture(Hg,{distinct_id:e,$anon_distinct_id:d},{$set:n||{},$set_once:r||{}}),this.Yo=n1(e,n,r),(f=this.featureFlags)==null||f.setAnonymousDistinctId(d);else if(_){this.persistence.set_property(nt,Zn);var x=n||{},y=r||{};this.setPersonPropertiesForFlags({$set:x,$set_once:y},!1),this.config.cookieWinsOnConflict&&this.persistence.ta(),this.capture("$set",{$set:x,$set_once:y}),this.Yo=n1(e,n,r)}else(n||r)&&this.setPersonProperties(n,r);m||i||a?(this.reloadFeatureFlags(),this.featureFlags?this.featureFlags.resetFlagCallReported():this.unregister(ao)):_&&(n||r)&&this.reloadFeatureFlags(),c=!0}finally{u&&this.persistence.ra(c)}}}setPersonProperties(e,n){if((e||n)&&this.Cl("posthog.setPersonProperties")){var r=n1(this.get_distinct_id(),e,n);this.Yo!==r?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Yo=r):ge.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,r=(Ke(e)?e:[e]).filter((s=>ut(s)&&s.length>0));r.length!==0&&this.Cl("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.Yo=null)}group(e,n,r){var s;if(e&&n){(s=this.persistence)==null||s.syncCookieProperties(),this.kl();var i=this.getGroups(),a=i[e]!==n;if(a&&this.resetGroupPropertiesForFlags(e),this.register({$groups:ue({},i,{[e]:n})}),a||r){var u={$group_type:e,$group_key:n};r&&(u.$group_set=r),this.capture(KE,u)}r&&this.setGroupPropertiesForFlags({[e]:r}),a&&!r&&this.reloadFeatureFlags()}else ge.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var r;n===void 0&&(n=!0),this.Cl("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n=xr(e)?e:e==null?void 0:e.resetDeviceID,r=xr(e)||e==null?void 0:e.bootstrap;this.El(n,!1,r)}El(e,n,r){var s,i,a;if(n===void 0&&(n=!1),ge.info("reset"),!this.__loaded)return ge.uninitializedWarning("posthog.reset");var u=r==null?void 0:r.sessionID;this.config.bootstrap=r||((s=this.tl)==null?void 0:s.bootstrap)||{},(i=this.featureFlags)==null||i.updateConfig==null||i.updateConfig(this.config,this.xa());var c=this.get_property(ef),d=this.get_property($g),f=this.get_property(ll),p=this.is_capturing();this.consent.reset(),n||!p||this.is_capturing()||console.warn("[PostHog.js]","reset() cleared the stored consent, and capturing is now off because of `opt_out_capturing_by_default`. Call opt_in_capturing() again, and prefer calling reset() before opting in rather than after.");var m=(a=this.persistence)==null||a.Xs==null?void 0:a.Xs(),_=!1;try{var x,y,w,b,C,P,T,A,R,L,I,O,N;if((x=this.persistence)==null||x.clear(),(y=this.sessionPersistence)==null||y.clear(),this.Vo.clear(),this.Sl(),de(f)||(L=this.persistence)==null||L.register({[ll]:f}),(w=this.surveys)==null||w.reset(),(b=this.featureFlags)==null||b.reset(),(C=this.conversations)==null||C.reset(),(P=this.logs)==null||P.reset(),(T=this.metrics)==null||T.reset(),(A=this.persistence)==null||A.set_property(nt,dn),(R=this.sessionManager)==null||R.resetSessionId(),this.Yo=null,this.config.cookieless_mode===lo)this.register_once({distinct_id:cu,$device_id:null},"");else{var j=this.config.get_device_id(yi());this.register_once({distinct_id:j,$device_id:e?j:c},""),e||de(d)||this.register({[$g]:d})}if(this.register({$last_posthog_reset:new Date().toISOString()},1),r&&(r.distinctID===void 0||this.Bo()||((N=this.persistence)==null||N.set_property(nt,r.isIdentifiedID?Zn:dn),this.register({distinct_id:r.distinctID})),(I=this.featureFlags)==null||I.initialize(),!(de(u)||(O=this.sessionManager)!=null&&O.setBootstrapSessionId(u,!0)))){var F=ue({},r);delete F.sessionID,this.config.bootstrap=F}delete this.config.identity_distinct_id,delete this.config.identity_hash,_=!0}finally{var G;m&&((G=this.persistence)==null||G.ra==null||G.ra(_))}this.reloadFeatureFlags()}shutdown(e){var n=this;return Tt((function*(){var r,s,i,a,u;if(n.__loaded){n.dl().dispose(),(r=n.sessionRecording)==null||r.dispose(),(s=n.logs)==null||s.flushLogs("sendBeacon"),(i=n.metrics)==null||i.flush("sendBeacon"),(a=n.il)==null||a.unload(),(u=n.nl)==null||u.unload();try{var c;(c=n.featureFlags)==null||c.destroy()}catch(d){ge.error("Error while destroying feature flags",d)}}else ge.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var r;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(r=this.conversations)==null||r.Il()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.Rl()}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 n=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.sessionStartTimestamp,s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n.sessionId);if(e!=null&&e.withTimestamp&&r){var i,a=(i=e.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0)}return s}alias(e,n){return e===this.get_property(vP)?(ge.critical("Attempting to create alias for existing People user - aborting."),-2):this.Cl("posthog.alias")?(de(n)&&(n=this.get_distinct_id()),e!==n?(this.Tl(Cu,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(ge.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=ue({},this.config);if(bt(e)){var r,s,i,a,u,c,d,f,p,m,_,x;St(this.config,P4(e));var y=this.Uo();(r=this.persistence)==null||r.update_config(this.config,n,y),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Yg(ue({},this.config,{persistence:"sessionStorage"}),y,!1);var w,b=this.Xo(this.config.debug);xr(b)&&(this.config.debug=b),xr(this.config.debug)&&(this.config.debug?(Pt.DEBUG=!0,wt.Hr()&&wt.Ur("ph_debug",!0),ge.info("set_config",{config:e,oldConfig:n,newConfig:ue({},this.config)})):(Pt.DEBUG=!1,wt.Hr()&&wt.Wr("ph_debug"))),(s=this.featureFlags)==null||s.updateConfig==null||s.updateConfig(this.config,this.xa()),(i=this.exceptionObserver)==null||i.onConfigChange(),(a=this.exceptions)==null||a.onConfigChange(),(u=this.sessionRecording)==null||u.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(d=this.autocapture)==null||d.startIfEnabled(),(f=this.heatmaps)==null||f.startIfEnabled(),("capture_pageview"in e||"disable_capture_url_hashes"in e)&&((w=this.historyAutocapture)==null||w.startIfEnabledOrStop()),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(_=this.surveys)==null||_.loadIfEnabled(),this.zo(),(x=this.externalIntegrations)==null||x.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){Pt.LIB_NAME=e,Pt.LIB_VERSION=n}startSessionRecording(e){var n,r,s,i,a,u=e===!0,c={sampling:u||!(e==null||!e.sampling),linked_flag:u||!(e==null||!e.linked_flag),url_trigger:u||!(e==null||!e.url_trigger),event_trigger:u||!(e==null||!e.event_trigger)};Object.values(c).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),c.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),c.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),c.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),c.event_trigger&&((a=this.sessionRecording)==null||a.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){if(this.exceptions){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(ue({},s,n))}}addExceptionStep(e,n){var r;(r=this.exceptions)==null||r.addExceptionStep(e,n)}captureLog(e){var n;(n=this.logs)==null||n.captureLog(e)}get logger(){var e,n;return(e=(n=this.logs)==null?void 0:n.logger)!==null&&e!==void 0?e:ts.Pl}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(e))!==null&&n!==void 0&&n}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:bu;return n!==bu&&(n=bu+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(nt))===Zn||((n=this.sessionPersistence)==null?void 0:n.get_property(nt))===Zn}xl(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===Jy&&!this._isIdentified()&&Zs(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[Cu])&&((n=this.persistence)==null||(n=n.props)==null||!n[Om]))}bl(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&!!this.config.capture_pageview}createPersonProfile(){this.xl()||this.Cl("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Cl("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Cl(e){return this.config.person_profiles==="never"?(ge.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Tl(Om,!0),!0)}Uo(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==rl)}zo(){var e,n,r,s,i,a=this.Uo();return this.is_capturing()||(r=this.logs)==null||r.Al(),((e=this.persistence)==null?void 0:e.Js)!==a&&((s=this.persistence)==null||s.set_disabled(a)),((n=this.sessionPersistence)==null?void 0:n.Js)!==a&&((i=this.sessionPersistence)==null||i.set_disabled(a)),a&&(this.Vo.clear(),this.Sl()),a}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==lo){if(this.Bo()){var r,s,i,a,u;this.El(!0,!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=new b4(this),this.pageViewManager=new c4(this),this.persistence&&(this.sessionPropsManager=new x4(this,this.sessionManager,this.persistence));var c,d=(i=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&i!==void 0?i:(u=ts.__defaultExtensionClasses)==null?void 0:u.sessionRecording;d&&(this.sessionRecording=this.jo(this.sessionRecording,new d(this)),this.Lo&&((c=this.sessionRecording)==null||c.onRemoteConfig==null||c.onRemoteConfig(this.Lo)))}var f,p;this.consent.optInOut(!0),this.zo(),this.gl(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==rl&&((f=this.surveys)==null||f.loadIfEnabled()),(de(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((p=e==null?void 0:e.captureEventName)!==null&&p!==void 0?p:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.ml()}else ge.warn(C4)}opt_out_capturing(){var e,n,r;this.config.cookieless_mode!==lo?(this.config.cookieless_mode===rl&&this.consent.isOptedIn()&&this.El(!0,!0),this.consent.optInOut(!1),this.zo(),this.config.cookieless_mode===rl&&(this.register({distinct_id:cu,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.ml(),this.gl())):ge.warn(C4)}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===1?"granted":e===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===lo||(this.config.cookieless_mode===rl?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.zo()}_is_bot(){return wr?c3(wr,this.config.custom_blocked_useragents):void 0}ml(){fe&&(fe.visibilityState==="visible"?this.Qo||(this.Qo=!0,this.capture(wu,{title:fe.title},{send_instantly:!0}),this.Jo&&(fe.removeEventListener(lc,this.Jo),this.Jo=null)):this.Jo||(this.Jo=this.ml.bind(this),At(fe,lc,this.Jo)))}debug(e){e===!1?(ne==null||ne.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(ne==null||ne.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)`."),this.set_config({debug:!0}))}xa(){var e=this.tl||{};return"advanced_disable_flags"in e?!!e.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ge.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):(function(n,r,s,i,a){var u=r in n&&!Qe(n[r]),c=s in n&&!Qe(n[s]);return u?n[r]:!!c&&(a&&a.warn("Config field '"+s+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),n[s])})(e,"advanced_disable_flags","advanced_disable_decide",0,ge)}Rn(e){var n;if(Qe(this.config.before_send))return e;var r=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(bN),s=Ke(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var a of s)try{if(i=a(i),Qe(i)){var u="Event '"+e.event+"' was rejected in beforeSend function";return wN(e.event)?ge.warn(u+". This can cause unexpected behavior."):ge.info(u),null}i.properties&&!Zs(i.properties)||ge.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}catch(d){return ge.error("Error in beforeSend function for event '"+e.event+"':",d),null}for(var c of r)if(i.properties&&Qe(i.properties[c]))return ge.warn("Event '"+e.event+"' had its '"+c+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return i}getPageViewId(){var e;return(e=this.pageViewManager.Ps)==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)})}Xo(e){var n=xr(e)&&!e,r=wt.Hr()&&wt.$r("ph_debug")==="true";return!n&&(!!r||e)}}ts.__defaultExtensionClasses={},ts.Pl=(()=>{var t=()=>{};return{trace:t,debug:t,info:t,warn:t,error:t,fatal:t}})(),(function(t,e){for(var n=0;e.length>n;n++)t.prototype[e[n]]=hD(t.prototype[e[n]])})(ts,["identify"]);class _3{constructor(e){this.disabled=e===!1;var n=bt(e)?e:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(e,n,r){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(n-s.y)<this.thresholdPx&&this.timeoutMs>r-s.timestamp){if(this.clicks.push({x:e,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:r}];return!1}}var i1="$copy_autocapture",vp=jt("[AutoCapture]");function o1(t,e){return e.length>t?e.slice(0,t)+"...":e}function _9(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!da(e));return e}function x9(t,e){var n,r,s=e.e,i=e.maskAllElementAttributes,a=e.maskAllText,u=e.elementAttributeIgnoreList,c=e.elementsChainAsString,d=e.disableCaptureUrlHashes;if(!da(t))return{props:{}};for(var f=[t],p=new Set([t]),m=t;m.parentNode&&!ss(m,"body")&&OP>f.length;)if(MP(m.parentNode)){var _=m.parentNode.host;if(p.has(_))break;p.add(_),f.push(_),m=_}else{if(!da(m.parentNode)||p.has(m.parentNode))break;p.add(m.parentNode),f.push(m.parentNode),m=m.parentNode}var x,y,w=[],b={},C=!1,P=!1;if(_t(f,(I=>{var O=r_(I);if(ss(I,"a")){var N=I.getAttribute("href");C=!!(O&&N&&Fd(N))&&(d?ca(N):N)}Ze(jm(I),"ph-no-capture")&&(P=!0),w.push((function(F,G,Q,Z,W){W===void 0&&(W=!1);var q=F.tagName.toLowerCase(),z={tag_name:q};tx.indexOf(q)>-1&&!Q&&(z.$el_text=q.toLowerCase()==="a"||q.toLowerCase()==="button"?o1(1024,a4(F)):o1(1024,nf(F)));var X=jm(F);X.length>0&&(z.classes=X.filter((function(oe){return oe!==""}))),_t(F.attributes,(function(oe){var J;if((!VP(F)||["name","id","class","aria-label"].indexOf(oe.name)!==-1)&&(Z==null||!Z.includes(oe.name))&&!G&&Fd(oe.value)&&(!ut(J=oe.name)||J.substring(0,10)!=="_ngcontent"&&J.substring(0,7)!=="_nghost")){var se=oe.value;oe.name==="class"&&(se=ex(se).join(" ")),z["attr__"+oe.name]=o1(1024,oe.name==="href"&&W?ca(se):se)}}));for(var H=1,D=1,Y=F;Y=_9(Y);)H++,Y.tagName===F.tagName&&D++;return z.nth_child=H,z.nth_of_type=D,z})(I,i,a,u,d));var j=(function(F){if(!r_(F))return{};var G={};return _t(F.attributes,(function(Q){if(Q.name&&Q.name.indexOf("data-ph-capture-attribute")===0){var Z=Q.name.replace("data-ph-capture-attribute-",""),W=Q.value;Z&&W&&Fd(W)&&(G[Z]=W)}})),G})(I);St(b,j)})),P)return{props:{},explicitNoCapture:P};if(a||(w[0].$el_text=ss(t,"a")||ss(t,"button")?a4(t):nf(t)),C){var T,A;w[0].attr__href=C;var R=(T=uc(C))==null?void 0:T.host,L=ne==null||(A=ne.location)==null?void 0:A.host;R&&L&&R!==L&&(x=C)}return{props:St({$event_type:s.type,$ce_version:1},c?{}:{$elements:w},{$elements_chain:(y=w,(function(I){return I.map((O=>{var N,j,F="";if(O.tag_name&&(F+=O.tag_name),O.attr_class)for(var G of(O.attr_class.sort(),O.attr_class))F+="."+G.replace(/"/g,"");var Q=ue({},O.text?{text:O.text}:{},{"nth-child":(N=O.nth_child)!==null&&N!==void 0?N:0,"nth-of-type":(j=O.nth_of_type)!==null&&j!==void 0?j:0},O.href?{href:O.href}:{},O.attr_id?{attr_id:O.attr_id}:{},O.attributes),Z={};return qp(Q).sort(((W,q)=>W[0].localeCompare(q[0]))).forEach((W=>{var q=W[1];return Z[l4(W[0].toString())]=l4(q.toString())})),(F+=":")+qp(Z).map((W=>W[0]+'="'+W[1]+'"')).join("")})).join(";")})((function(I){return I.map((O=>{var N,j,F={text:(N=O.$el_text)==null?void 0:N.slice(0,400),tag_name:O.tag_name,href:(j=O.attr__href)==null?void 0:j.slice(0,2048),attr_class:MD(O),attr_id:O.attr__id,nth_child:O.nth_child,nth_of_type:O.nth_of_type,attributes:{}};return qp(O).filter((G=>G[0].indexOf("attr__")===0)).forEach((G=>F.attributes[G[0]]=G[1])),F}))})(y)))},(n=w[0])!=null&&n.$el_text?{$el_text:(r=w[0])==null?void 0:r.$el_text}:{},x&&s.type==="click"?{$external_click_url:x}:{},b)}}class w9{constructor(e){this.name="autocapture",this.ns=!1,this.ss=null,this.os=!1,this.ls=!1,this.zi={enabled:!1,rageclick:!1,maskAllElementAttributes:!1,maskAllText:!1,disableCaptureUrlHashes:!1,remoteRequestsDisabled:!1},this.us=!1,this.hs=e,this.hs.refresh(this.zi),this.rageclicks=new _3(this.zi.rageclick),this.ds=null}setup(e){this.vs(),this.cs=e;var n=e.onRemoteConfig(this.onRemoteConfig.bind(this));this.us?n.dispose():(this.fs=n,this.startIfEnabled())}dispose(){var e;this.us||(this.us=!0,this.cs=void 0,(e=this.fs)==null||e.dispose(),this.fs=void 0,this.ps())}gs(){return this.hs.refresh(this.zi),this.zi}vs(){var e,n;return this.gs(),this.zi.url_allowlist=(e=this.zi.url_allowlist)==null?void 0:e.map((r=>new RegExp(r))),this.zi.url_ignorelist=(n=this.zi.url_ignorelist)==null?void 0:n.map((r=>new RegExp(r))),this.zi}ys(){if(this.isBrowserSupported()){if(ne&&fe){var e=this.bs=r=>{r=r||(ne==null?void 0:ne.event);try{this._s(r)}catch(s){vp.error("Failed to capture event",s)}};if(At(fe,"submit",e,{capture:!0}),At(fe,"change",e,{capture:!0}),At(fe,"click",e,{capture:!0}),this.gs().capture_copied_text){var n=this.ws=r=>{r=r||(ne==null?void 0:ne.event);try{this._s(r,i1)}catch(s){vp.error("Failed to capture clipboard event",s)}};At(fe,"copy",n,{capture:!0}),At(fe,"cut",n,{capture:!0}),At(fe,"paste",n,{capture:!0})}}}else vp.info("Disabling Automatic Event Collection because this browser is not supported")}ps(){this.bs&&(fe==null||fe.removeEventListener("submit",this.bs,!0),fe==null||fe.removeEventListener("change",this.bs,!0),fe==null||fe.removeEventListener("click",this.bs,!0),this.bs=void 0),this.ws&&(fe==null||fe.removeEventListener("copy",this.ws,!0),fe==null||fe.removeEventListener("cut",this.ws,!0),fe==null||fe.removeEventListener("paste",this.ws,!0),this.ws=void 0),this.ns=!1}startIfEnabled(){!this.us&&this.cs&&this.isEnabled&&!this.ns&&(this.ys(),this.ns=!0)}onRemoteConfig(e){if(!this.us)if(this.os=!0,e.ok){var n=e.config;n.elementsChainAsString&&(this.ls=n.elementsChainAsString);var r,s=n.autocapture_opt_out;xr(s)&&((r=this.cs)==null||r.kv.set(Fy,s),this.ss=s),this.startIfEnabled()}else this.startIfEnabled()}setElementSelectors(e){this.ds=e}getElementSelectors(e){var n,r=[];return(n=this.ds)==null||n.forEach((s=>{var i=fe==null?void 0:fe.querySelectorAll(s);i==null||i.forEach((a=>{e===a&&r.push(s)}))})),r}get isEnabled(){var e,n;if(this.us)return!1;var r=(e=this.cs)==null?void 0:e.kv.get(Fy),s=this.ss,i=this.gs(),a=i.remoteRequestsDisabled&&!this.os;if(Xn(s)&&!xr(r)&&!a)return!1;var u=(n=this.ss)!==null&&n!==void 0?n:!!r;return!!i.enabled&&!u}_s(e,n){if(n===void 0&&(n="$autocapture"),this.isEnabled){var r=t_(e);RP(r)&&(r=r.parentNode||null);var s,i=this.vs();n==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&i.rageclick&&(s=this.rageclicks)!=null&&s.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&jP(r,i.rageclick)&&this._s(e,"$rageclick");var a=n===i1,u=a?ue({},i,{dom_event_allowlist:void 0}):i;if(r&&(function(b,C,P,T,A,R){var L;if(!ne||nx(b)||P!=null&&P.url_allowlist&&!e4(P.url_allowlist,R)||P!=null&&P.url_ignorelist&&e4(P.url_ignorelist,R))return!1;if(P!=null&&P.dom_event_allowlist){var I=P.dom_event_allowlist;if(I&&!I.some((Q=>C.type===Q)))return!1}var O=FP(b,T),N=O.parentIsUsefulElement,j=O.targetElementList;if(!(function(Q,Z){var W=Z==null?void 0:Z.element_allowlist;if(de(W))return!0;var q,z=function(H){if(W.some((D=>H.tagName.toLowerCase()===D)))return{v:!0}};for(var X of Q)if(q=z(X))return q.v;return!1})(j,P)||!n_(j,P==null?void 0:P.css_selector_allowlist)||n_(j,(L=P==null?void 0:P.css_selector_ignorelist)!==null&&L!==void 0?L:kD))return!1;try{var F=ne.getComputedStyle(b);if(F&&F.getPropertyValue("cursor")==="pointer"&&C.type==="click")return!0}catch{}var G=b.tagName.toLowerCase();switch(G){case"html":return!1;case"form":return(A||["submit"]).indexOf(C.type)>=0;case"input":case"select":case"textarea":return(A||["change","click"]).indexOf(C.type)>=0;default:return N?(A||["click"]).indexOf(C.type)>=0:(A||["click"]).indexOf(C.type)>=0&&(tx.indexOf(G)>-1||b.getAttribute("contenteditable")==="true")}})(r,e,u,a,a?["copy","cut","paste"]:void 0,{config:{get_current_url:i.getCurrentUrl}})){var c,d=x9(r,{e,maskAllElementAttributes:i.maskAllElementAttributes,maskAllText:i.maskAllText,elementAttributeIgnoreList:i.element_attribute_ignorelist,elementsChainAsString:this.ls,disableCaptureUrlHashes:i.disableCaptureUrlHashes}),f=d.props;if(d.explicitNoCapture)return!1;var p=this.getElementSelectors(r);if(p&&p.length>0&&(f.$element_selectors=p),n===i1){var m=e.type||"clipboard";if(m!=="paste"){var _,x,y=ne==null||(_=ne.getSelection())==null?void 0:_.toString(),w=LP(y);if(!w)return!1;f.$selected_content=w,f.$clipboard_text_length=(x=y==null?void 0:y.length)!==null&&x!==void 0?x:0}f.$copy_type=m}return(c=this.cs)==null||c.capture(n,f).catch((b=>vp.error("Failed to capture event",b))),!0}}}isBrowserSupported(){return ar(fe==null?void 0:fe.querySelectorAll)}}class b9{constructor(e){this._instance=e}refresh(e){var n=this._instance.config,r=bt(n.autocapture)?n.autocapture:void 0;e.enabled=!!n.autocapture,e.rageclick=n.rageclick,e.maskAllElementAttributes=n.mask_all_element_attributes,e.maskAllText=n.mask_all_text,e.disableCaptureUrlHashes=n.disable_capture_url_hashes,e.getCurrentUrl=n.get_current_url,e.remoteRequestsDisabled=this._instance.xa(),e.url_allowlist=r==null?void 0:r.url_allowlist,e.url_ignorelist=r==null?void 0:r.url_ignorelist,e.dom_event_allowlist=r==null?void 0:r.dom_event_allowlist,e.element_allowlist=r==null?void 0:r.element_allowlist,e.css_selector_allowlist=r==null?void 0:r.css_selector_allowlist,e.css_selector_ignorelist=r==null?void 0:r.css_selector_ignorelist,e.element_attribute_ignorelist=r==null?void 0:r.element_attribute_ignorelist,e.capture_copied_text=r==null?void 0:r.capture_copied_text}}var wd=jt("[ExceptionAutocapture]"),T4=()=>{},A4=t=>{var e;if(ar(t))return(e=t.__posthog_layer__)!==null&&e!==void 0?e:t.__rrweb_layer__};function x3(t,e,n){try{if(!(e in t))return T4;var r={next:t[e]},s=n((function(){for(var i=arguments.length,a=new Array(i),u=0;i>u;u++)a[u]=arguments[u];return r.next.apply(this,a)}));return ar(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:r}})),t[e]=s,()=>{if(t[e]!==s)for(var i=t[e],a=A4(i);a;){if(a.next===s)return void(a.next=r.next);a=A4(i=a.next)}else t[e]=r.next}}catch{return T4}}var S9=jt("[TracingHeaders]"),Ba=jt("[Web Vitals]"),I4=9e5,R4=["CLS","FCP","INP","LCP"],E9=["INP","LCP"],C9=["interactionTarget","interactionType","inputDelay","processingDuration","presentationDelay","loadState","target","url","timeToFirstByte","resourceLoadDelay","resourceLoadDuration","elementRenderDelay","largestShiftTarget","largestShiftTime","largestShiftValue","firstByteToFCP"],M4="disabled",O4="lazy_loading",bd="awaiting_config",gp="missing_config";jt("[SessionRecording]"),jt("[SessionRecording]");var d_="[SessionRecording]",Ki=jt(d_),k9=jt("[Heatmaps]");function a1(t){return bt(t)&&"clientX"in t&&"clientY"in t&&sn(t.clientX)&&sn(t.clientY)}var yp=jt("[Product Tours]"),l1=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(Y2))},P9=["$set_once","$set"],ui=jt("[SiteApps]"),L4="Error while initializing PostHog app with config id ",w3=(t,e)=>t!=null&&t.then?t.then(e):e(t),hu="SDK is not enabled or survey functionality is not yet loaded",N4="Disabled. Not loading surveys.";class T9{constructor(e,n){this.name="surveys",this._surveyEventReceiver=null,this._surveyManager=null,this.Fl=!1,this.Ol=[],this.Ll=null,this.Dl=null,this.us=!1,this.$l=new Set,this.onRemoteConfig=r=>{if(!this.us&&!this.zi.disableSurveys){if(!r.ok)return pt.warn("Remote config unavailable. Not loading surveys.");var s=r.config.surveys;if(Qe(s))return pt.warn("Flags not loaded yet. Not loading surveys.");this.Nl=xr(s)?s:s.length>0,pt.info("flags response received, isSurveysEnabled: "+this.Nl),this.loadIfEnabled()}},this.hs=e,this.ql=n}setup(e){if(!this.us)return this.jl=e,w3(e.kv.initialize(),(()=>{if(this.jl===e&&!this.us){this.jl=void 0,this.cs=e;var n=e.onRemoteConfig(this.onRemoteConfig);this.us?n.dispose():(this.fs=n,this.loadIfEnabled())}}))}dispose(){var e,n,r;this.us||(this.us=!0,this.jl=void 0,this.cs=void 0,(e=this.fs)==null||e.dispose(),this.fs=void 0,(n=this._surveyEventReceiver)==null||n.dispose(),this._surveyEventReceiver=null,(r=this._surveyManager)==null||r.dispose==null||r.dispose(),this._surveyManager=null,this.Ol=[],this.Ll=null,this.$l.forEach((s=>clearTimeout(s))),this.$l.clear())}get zi(){return this.hs.get()}initialize(){this.loadIfEnabled()}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var n=[],r=0;r<localStorage.length;r++){var s=localStorage.key(r);(s!=null&&s.startsWith(m3)||s!=null&&s.startsWith("inProgressSurvey_"))&&n.push(s)}n.forEach((i=>localStorage.removeItem(i)))}catch{}}loadIfEnabled(){if(!this.us&&this.cs){var e=this.zi;if(!this._surveyManager)if(this.Fl)pt.info("Already initializing surveys, skipping...");else if(e.disableSurveys)pt.info(N4);else if(e.cookielessMode&&this.hs.isOptedOut())pt.info("Not loading surveys in cookieless mode without consent.");else{var n=this.hs.getExtensions();if(n){if(!de(this.Nl)||e.advancedEnableSurveys){var r=this.Nl||e.advancedEnableSurveys;this.Fl=!0;try{var s=n.generateSurveys;if(s)return this.Bl(s,r),void(this.Fl=!1);var i=n.loadExternalDependency;if(!i)return this.Hl(Q2),void(this.Fl=!1);i((a=>{try{if(this.us)return;var u=this.hs.getExtensions();a||u==null||!u.generateSurveys?this.Hl("Could not load surveys script",a):this.Bl(u.generateSurveys,r)}finally{this.Fl=!1}}))}catch(a){throw this.Fl=!1,this.Hl("Error initializing surveys",a),a}}}else pt.error("PostHog Extensions not found.")}}}Bl(e,n){this.us||(this._surveyManager=e(n),this._surveyEventReceiver=this.hs.createEventReceiver(),pt.info("Surveys loaded successfully"),this.Ul({isLoaded:!0}))}Hl(e,n){pt.error(e,n),this.Ul({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Ol.push(e),this._surveyManager&&this.Ul({isLoaded:!0}),()=>{this.Ol=this.Ol.filter((n=>n!==e))}}getSurveys(e,n){var r;n===void 0&&(n=!1);var s=(r=this.cs)!==null&&r!==void 0?r:this.ql;if(s&&!this.us){if(this.zi.disableSurveys)return pt.info(N4),e([]);var i=s.kv.get(qy);if(i&&!n)return e(i,{isLoaded:!0}),void(this.zl()&&this.getSurveys((()=>{}),!0));if(this.Ll)this.Ll.then((c=>{this.us||e(c.surveys,c.context)})).catch((c=>pt.error("Error in survey callback",c)));else{var a=this.Wl("/api/surveys/",{method:"GET",query:{token:s.projectToken},sentAt:"query",timeoutMs:this.zi.requestTimeoutMs}).then((c=>{try{return this.Vl(s,c)}catch(d){return pt.error("Error processing surveys response",d),this.Vl(s,{statusCode:0,error:d})}}),(c=>this.Vl(s,{statusCode:0,error:c})));this.Ll=a;var u=()=>{this.Ll===a&&(this.Ll=null)};a.then((c=>{u(),this.us||e(c.surveys,c.context)}),u).catch((c=>pt.error("Error in survey callback",c)))}}}Wl(e,n){var r=this.cs;return r?r.sendRequest(e,n):new Promise((s=>s({statusCode:0,error:new Error(hu)})))}Vl(e,n){if(this.us)return{surveys:[],context:{isLoaded:!1,error:hu}};var r=n.statusCode;if(r!==200||!n.json){var s="Surveys API could not be loaded, status: "+r;return r!==0?pt.error(s):n.error||pt.warn(s),this.Dl=Date.now(),{surveys:[],context:{isLoaded:!1,error:s}}}this.Dl=null;var i,a=n.json.surveys||[],u=a.filter((c=>(function(d){return!(!d.start_date||d.end_date)})(c)&&(f3(c)||(function(d){var f;return!((f=d.conditions)==null||(f=f.actions)==null||(f=f.values)==null||!f.length)})(c))));return u.length>0&&((i=this._surveyEventReceiver)==null||i.register(u)),e.kv.set({[qy]:a,[Rm]:Date.now()}),{surveys:a,context:{isLoaded:!0}}}zl(){return this.Gl()&&!this.Ll&&!this.Zl()}Gl(){var e,n,r=(e=(n=this.cs)!==null&&n!==void 0?n:this.ql)==null?void 0:e.kv.get(Rm);return sn(r)&&Date.now()-r>3e5}Zl(){return sn(this.Dl)&&3e5>Date.now()-this.Dl}markSurveyAsSeen(e,n){var r,s={id:e,current_iteration:(r=n==null?void 0:n.iteration)!==null&&r!==void 0?r:null};v3(s);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}Ul(e){for(var n of this.Ol)try{if(!e.isLoaded)return n([],e);this.getSurveys(n)}catch(r){pt.error("Error in survey callback",r)}}getActiveMatchingSurveys(e,n){if(n===void 0&&(n=!1),!Qe(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,n);pt.warn("init was not called")}Ql(e){var n=null;return this.getSurveys((r=>{var s;n=(s=r.find((i=>i.id===e)))!==null&&s!==void 0?s:null})),n}Jl(e){if(Qe(this._surveyManager))return{eligible:!1,reason:hu};var n=typeof e=="string"?this.Ql(e):e;return n?this._surveyManager.checkSurveyEligibility(n):{eligible:!1,reason:"Survey not found"}}Kl(e){if(Qe(this._surveyManager))return{eligible:!1,reason:hu};var n=typeof e=="string"?this.Ql(e):e;return n?this._surveyManager.checkSurveyRenderability(n):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Qe(this._surveyManager))return pt.warn("init was not called"),{visible:!1,disabledReason:hu};var n=this.Kl(e);return{visible:n.eligible,disabledReason:n.reason}}canRenderSurveyAsync(e,n){return Qe(this._surveyManager)?(pt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:hu})):new Promise((r=>{this.getSurveys((s=>{var i,a=(i=s.find((c=>c.id===e)))!==null&&i!==void 0?i:null;if(a){var u=this.Kl(a);r({visible:u.eligible,disabledReason:u.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),n)}))}renderSurvey(e,n,r){var s;if(Qe(this._surveyManager))pt.warn("init was not called");else{var i=typeof e=="string"?this.Ql(e):e;if(i!=null&&i.id)if(a9.includes(i.type)){var a=fe==null?void 0:fe.querySelector(n);if(a)if((s=i.appearance)!=null&&s.surveyPopupDelaySeconds){pt.info("Rendering survey "+i.id+" with delay of "+i.appearance.surveyPopupDelaySeconds+" seconds");var u=setTimeout((()=>{var c,d;this.$l.delete(u),this.us||(pt.info("Rendering survey "+i.id+" with delay of "+((c=i.appearance)==null?void 0:c.surveyPopupDelaySeconds)+" seconds"),(d=this._surveyManager)==null||d.renderSurvey(i,a,r),pt.info("Survey "+i.id+" rendered"))}),1e3*i.appearance.surveyPopupDelaySeconds);this.$l.add(u)}else this._surveyManager.renderSurvey(i,a,r);else pt.warn("Survey element not found")}else pt.warn("Surveys of type "+i.type+" cannot be rendered in the app");else pt.warn("Survey not found")}}displaySurvey(e,n){var r;if(Qe(this._surveyManager))pt.warn("init was not called");else{var s=this.Ql(e);if(s){var i=s;if((r=s.appearance)!=null&&r.surveyPopupDelaySeconds&&n.ignoreDelay&&(i=ue({},s,{appearance:ue({},s.appearance,{surveyPopupDelaySeconds:0})})),n.displayType!==s_.Popover&&n.initialResponses&&pt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),n.ignoreConditions===!1){var a=this.Jl(s);if(!a.eligible)return void pt.warn("Survey is not eligible to be displayed: ",a.reason)}n.displayType!==s_.Inline?this._surveyManager.handlePopoverSurvey(i,n):this.renderSurvey(i,n.selector,n.properties)}else pt.warn("Survey not found")}}cancelPendingSurvey(e){Qe(this._surveyManager)?pt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload==null||e.handlePageUnload()}}function pu(t,e,n){if(Qe(t))return!1;switch(n){case"exact":return t===e;case"contains":var r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}let A9=class{constructor(e){this.Yl=new Set,this.Xl=new Set,this.tu=new zm,this.eu=(n,r)=>this.iu(n,r)&&this.ru(n,r)&&this.nu(n,r)&&this.su(n,r),this.iu=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=e}init(){var e,n;de((e=this._instance)==null?void 0:e._addCaptureHook)||(this.au=(n=this._instance)==null?void 0:n._addCaptureHook(((r,s)=>{this.on(r,s)})))}dispose(){var e;(e=this.au)==null||e.call(this),this.au=void 0,this.tu=new zm}register(e){var n,r;if(!de((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((i=>{var a;this.Yl.add(i),(a=i.steps)==null||a.forEach((u=>{this.Xl.add((u==null?void 0:u.event)||"")}))})),(r=this._instance)!=null&&r.autocapture)){var s=new Set;this.Yl.forEach((i=>{var a;(a=i.steps)==null||a.forEach((u=>{u!=null&&u.selector&&s.add(u.selector)}))})),this._instance.autocapture.setElementSelectors(s)}}replace(e){this.Yl.clear(),this.Xl.clear(),this.register(e)}on(e,n){n!=null&&e.length!=0&&(this.Xl.has(e)||this.Xl.has(n.event))&&this.Yl.forEach((r=>{this.ou(n,r)&&this.tu.emit("actionCaptured",r.name)}))}lu(e){this.onAction("actionCaptured",(n=>e(n)))}ou(e,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.eu(e,r))return!0;return!1}onAction(e,n){return this.tu.on(e,n)}ru(e,n){if(n!=null&&n.url){var r,s=e==null||(r=e.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!pu(s,n.url,n.url_matching||"contains"))return!1}return!0}nu(e,n){return!!this.uu(e,n)&&!!this.hu(e,n)&&!!this.du(e,n)}uu(e,n){var r;if(n==null||!n.href)return!0;var s=this.vu(e);if(s.length>0)return s.some((u=>pu(u.href,n.href,n.href_matching||"exact")));var i,a=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!a&&pu((i=a.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}hu(e,n){var r;if(n==null||!n.text)return!0;var s=this.vu(e);if(s.length>0)return s.some((d=>pu(d.text,n.text,n.text_matching||"exact")||pu(d.$el_text,n.text,n.text_matching||"exact")));var i,a,u,c=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";return!!c&&(i=(function(d){for(var f,p=[],m=/(?::|")text="(.*?)"/g;!Qe(f=m.exec(d));)p.includes(f[1])||p.push(f[1]);return p})(c),a=n.text,u=n.text_matching||"exact",i.some((d=>pu(d,a,u))))}du(e,n){var r,s;if(n==null||!n.selector)return!0;var i=e==null||(r=e.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var a=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&a)try{return new RegExp(n.selector_regex).test(a)}catch{return!1}return!1}vu(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e==null?void 0:e.properties.$elements}su(e,n){return n==null||!n.properties||n.properties.length===0||p3(n.properties.reduce(((r,s)=>{var i=Ke(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r}),{}),e==null?void 0:e.properties)}};class I9{constructor(e){var n;this.cu=[],this._instance=e,this.fu=new Map,this.pu=new Map,this.gu=new Map,this.mu=(n=this._instance)==null||n.onSessionId==null?void 0:n.onSessionId((r=>this.yu(r)))}bu(e){return!1}_u(){return null}wu(e){}ku(){}Su(e,n){return!!e&&p3(e.propertyFilters,n==null?void 0:n.properties)}xu(e,n){var r=new Map;return e.forEach((s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach((a=>{if(a!=null&&a.name){var u=r.get(a.name)||[];u.push(s.id),r.set(a.name,u)}}))})),r}Cu(e,n,r){var s=(r===gd.Activation?this.fu:this.pu).get(e),i=[];return this.Tu((a=>{i=a.filter((u=>s==null?void 0:s.includes(u.id)))})),i.filter((a=>{var u,c=(u=a.conditions)==null||(u=u[r])==null||(u=u.values)==null?void 0:u.find((d=>d.name===e));return this.Su(c,n)}))}register(e){this.Mu(e,!1)}replace(e){this.Mu(e,!0)}Mu(e,n){var r;de((r=this._instance)==null?void 0:r._addCaptureHook)||(this.Eu(e,n),this.Iu(e,n))}Iu(e,n){var r=e.filter((a=>{var u;return(u=a.conditions)==null||(u=u.actions)==null||(u=u.values)==null?void 0:u.length}));if(n&&this.gu.clear(),r.length!==0){this.Ru||(this.Ru=new A9(this._instance),this.Ru.init(),this.Ru.lu((a=>this.onAction(a))));var s=[];r.forEach((a=>{var u;(u=a.conditions)==null||(u=u.actions)==null||u.values.forEach((c=>{if(s.push(c),c.name){var d,f=(d=this.gu.get(c.name))!==null&&d!==void 0?d:[];f.includes(a.id)||f.push(a.id),this.gu.set(c.name,f)}}))})),n?this.Ru.replace(s):this.Ru.register(s)}else{var i;n&&((i=this.Ru)==null||i.replace([]))}}Pu(e,n){n.forEach(((r,s)=>{var i,a=(i=e.get(s))!==null&&i!==void 0?i:[];r.forEach((u=>{a.includes(u)||a.push(u)})),e.set(s,a)}))}Eu(e,n){var r,s,i=e.filter((d=>{var f,p;return((f=d.conditions)==null?void 0:f.events)&&((p=d.conditions)==null||(p=p.events)==null||(p=p.values)==null?void 0:p.length)>0})),a=e.filter((d=>{var f,p;return((f=d.conditions)==null?void 0:f.cancelEvents)&&((p=d.conditions)==null||(p=p.cancelEvents)==null||(p=p.values)==null?void 0:p.length)>0})),u=this.xu(e,gd.Activation),c=this.xu(e,gd.Cancellation);n?(this.fu=u,this.pu=c):(this.Pu(this.fu,u),this.Pu(this.pu,c)),(i.length!==0||a.length!==0)&&((r=this.au)!==null&&r!==void 0||(this.au=(s=this._instance)==null?void 0:s._addCaptureHook(((d,f)=>{this.onEvent(d,f)}))))}onEvent(e,n){var r,s,i=this.Au(),a=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(s=n.properties)==null?void 0:s.$product_tour_id);if(a&&this.getActivatedIds().includes(a)){var u=this.Fu(e,a);if(u==="consume")return i.info("event consumed activated item, removing it",{event:e,itemId:a}),void this.Ou([a]);if(u==="persist")return i.info("shown item promoted to persisted activation",{event:e,itemId:a}),this.Lu(a),void this.Du([a])}if(this.pu.has(e)){var c=this.Cu(e,n,gd.Cancellation);c.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:c.map((f=>f.id))}),this.Ou(c.map((f=>f.id))),c.forEach((f=>this.$u(f.id))))}if(this.fu.has(e)){i.info("event name matched",{event:e,eventPayload:n,items:this.fu.get(e)});var d=this.Cu(e,n,gd.Activation);this.Nu(d.map((f=>f.id)))}}onAction(e){this.gu.has(e)&&this.Nu(this.gu.get(e)||[])}Nu(e){var n;if(e.length!==0){var r=!((n=this._instance)==null||n.get_session_id==null||!n.get_session_id()),s=[];for(var i of e)r&&this.bu(i)?this.Lu(i)&&this.qu(i):s.push(i);s.length>0&&(this.cu=[...new Set([...this.cu,...s])]),this.Au().info("updating activated items",{activatedItems:this.getActivatedIds()})}}Lu(e){this.cu=this.cu.filter((r=>r!==e));var n=this.ju();return!n.includes(e)&&(this.Bu([...n,e]),this.Hu(),!0)}Ou(e){var n=new Set(e);this.cu=this.cu.filter((i=>!n.has(i)));var r=this.Uu(),s=r.filter((i=>!n.has(i)));s.length!==r.length&&(this.Bu(s),s.length===0&&this.zu()),this.Du(e)}Wu(){var e,n=this._u();if(!n)return{};var r=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n];return r&&typeof r=="object"?r:{}}qu(e){if(this._u()){var n=this.Wu();this.wu(ue({},n,{[e]:Date.now()}))}}Du(e){if(this._u()){var n=this.Wu(),r={},s=!1;for(var i of Object.entries(n)){var a=i[0],u=i[1];e.includes(a)?s=!0:r[a]=u}s&&(Zs(r)?this.ku():this.wu(r))}}Vu(){this._u()&&this.ku()}getActivationTimestamp(e){if(this.ju().includes(e)){var n=this.Wu()[e];return sn(n)?n:void 0}}Uu(){var e,n=this.Gu();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}ju(){var e,n,r=this.Uu();if(r.length===0)return[];var s=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[this.Zu()],i=(n=this._instance)==null||n.get_session_id==null?void 0:n.get_session_id();return i&&s===i?r:[]}Hu(){var e,n=(e=this._instance)==null||e.get_session_id==null?void 0:e.get_session_id();n&&this.Qu(n)}zu(){this.Ju()}yu(e){var n,r=(n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[this.Zu()];if(r&&r!==e){var s=this.Uu(),i=this.Wu();s.length>0&&(this.Bu([]),s.filter((a=>sn(i[a]))).forEach((a=>this.$u(a)))),this.zu(),this.Vu()}}getActivatedIds(){return[...new Set([...this.ju(),...this.cu])].filter((e=>!this.Ku(e)))}dispose(){var e,n,r;(e=this.mu)==null||e.call(this),this.mu=void 0,(n=this.au)==null||n.call(this),this.au=void 0,(r=this.Ru)==null||r.dispose(),this.Ru=void 0}reset(){this.cu=[],this.Uu().length>0&&this.Bu([]),this.zu(),this.Vu()}getEventToItemsMap(){return this.fu}Yu(){return this.Ru}}class R9 extends I9{constructor(e){super(e)}Gu(){return Gy}Zu(){return Bp}_u(){return Wp}wu(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Wp]:e})}ku(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(Wp)}bu(e){var n,r;this.Tu((i=>{r=i.find((a=>a.id===e))}));var s=(n=r)==null||(n=n.appearance)==null?void 0:n.surveyPopupDelaySeconds;return sn(s)&&s>0}Xu(){return uo.SHOWN}Tu(e){var n;(n=this._instance)==null||n.getSurveys(e)}$u(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}Au(){return pt}Bu(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Gy]:e})}Qu(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Bp]:e})}Ju(){var e;(e=this._instance)==null||(e=e.persistence)==null||e.unregister(Bp)}Ku(){return!1}Fu(e,n){var r;this.Tu((i=>{r=i.find((a=>a.id===n))}));var s=!r||(function(i){var a;return f3(i)&&!((a=i.conditions)==null||(a=a.events)==null||!a.repeatedActivation)||i.schedule==="always"})(r);return s?e===uo.SHOWN?"consume":"ignore":e===uo.SHOWN?"persist":e===uo.DISMISSED||e===uo.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}class M9{constructor(e){this._instance=e}initialize(){}get(e){if(typeof e=="string")return this._instance.get_property(e);var n={};for(var r of e){var s=this._instance.get_property(r);de(s)||(n[r]=s)}return n}set(e,n){this._instance.register(typeof e=="string"?{[e]:n}:e)}remove(e){typeof e!="string"?e.forEach((n=>this._instance.unregister(n))):this._instance.unregister(e)}}class O9{constructor(e){this._instance=e}get(){var e=this._instance.config;return{disableSurveys:e.disable_surveys,cookielessMode:!!e.cookieless_mode,advancedEnableSurveys:e.advanced_enable_surveys,requestTimeoutMs:e.surveys_request_timeout_ms}}isOptedOut(){return this._instance.consent.isOptedOut()}getExtensions(){var e=Re==null?void 0:Re.__PosthogExtensions__;if(e){var n=e.generateSurveys,r=e.loadExternalDependency;return{generateSurveys:n?s=>n(this._instance,s):void 0,loadExternalDependency:r?s=>r(this._instance,"surveys",s):void 0}}}createEventReceiver(){return new R9(this._instance)}}var L9=ne!=null&&ne.location?Fm(ne.location.hash,"__posthog")||Fm(location.hash,"state"):null,D4="_postHogToolbarParams",j4=jt("[Toolbar]"),F4=jt("[FeatureFlags]");class N9{constructor(e,n){n===void 0&&(n=!1),this.th=!1,this.update(e,n)}update(e,n){this.eh=((r,s)=>{var i,a,u,c,d;return{bootstrap:{featureFlags:(i=r.bootstrap)==null?void 0:i.featureFlags,featureFlagPayloads:(a=r.bootstrap)==null?void 0:a.featureFlagPayloads},remoteRequestsDisabled:s,featureFlagsDisabled:!!r.advanced_disable_feature_flags,onlyEvaluateSurveyFeatureFlags:!!r.advanced_only_evaluate_survey_feature_flags,deduplicateCallsPerSession:!!r.advanced_feature_flags_dedup_per_session,cacheTtlMs:r.feature_flag_cache_ttl_ms,refreshIntervalMs:(u=r.remote_config_refresh_interval_ms)!==null&&u!==void 0?u:3e5,requestTimeoutMs:r.feature_flag_request_timeout_ms,compression:r.disable_compression?void 0:"best-available",evaluationContexts:(c=(d=r.evaluation_contexts)!==null&&d!==void 0?d:r.evaluation_environments)!==null&&c!==void 0?c:[],flagKeys:Ke(r.flag_keys)?r.flag_keys:void 0}})(e,n),!e.evaluation_environments||e.evaluation_contexts||this.th||(F4.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.th=!0),de(e.flag_keys)||Ke(e.flag_keys)||F4.error("Invalid flag_keys found:",e.flag_keys,"Expected array of non-empty strings")}get(){return this.eh}}var V4=jt("[FeatureFlags]"),Wa=jt("[FeatureFlags]",{debugEnabled:!0}),u1=`" failed. Feature flags didn't load in time.`,$4="connection_error",z4=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},H4=t=>{var e={};for(var n of qp(t||{})){var r=n[1];r&&(e[n[0]]=r)}return e},zs=jt("[Error tracking]"),D9=["chrome-extension://","moz-extension://","safari-extension:","safari-web-extension:"],j9=["__firefox__","__gCrWeb"],U4="Refusing to render web experiment since the viewer is a likely bot",F9={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>Hm(e,t),not_regex:(t,e)=>!Hm(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class ir{get zi(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((s=>{ir.ih("retrieved web experiments from the server"),n.rh=new Map,s.forEach((i=>{if(i.feature_flag_key){var a;n.rh&&(ir.ih("setting flag key ",i.feature_flag_key," to web experiment ",i),(a=n.rh)==null||a.set(i.feature_flag_key,i));var u=n._instance.getFeatureFlag(i.feature_flag_key);ut(u)&&i.variants[u]&&n.nh(i.name,u,i.variants[u].transforms)}else if(i.variants)for(var c in i.variants){var d=i.variants[c];ir.sh(d,n._instance)&&n.nh(i.name,c,d.transforms)}}))}),r)},this._instance=e,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())ir.ih(U4);else if(!this.zi.disable_web_experiments){if(Qe(this.rh))return this.rh=new Map,this.loadIfEnabled(),void this.previewWebExperiment();ir.ih("applying feature flags",e),e.forEach((n=>{var r;if(this.rh&&(r=this.rh)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),a=(s=this.rh)==null?void 0:s.get(n);i&&a!=null&&a.variants[i]&&this.nh(a.name,i,a.variants[i].transforms)}}))}}previewWebExperiment(){var e=ir.getWindowLocation();if(e!=null&&e.search){var n=cc(e==null?void 0:e.search,"__experiment_id"),r=cc(e==null?void 0:e.search,"__experiment_variant");n&&r&&(ir.ih("previewing web experiments "+n+" && "+r),this.getWebExperiments((s=>{this.ah(parseInt(n),r,s)}),!1,!0))}}loadIfEnabled(){this.zi.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,r){if(this.zi.disable_web_experiments&&!r)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.zi.token),method:"GET",timestampMode:"query",callback:i=>e(i.statusCode===200&&i.json&&i.json.experiments||[])})}ah(e,n,r){var s=r.filter((i=>i.id===e));s&&s.length>0&&(ir.ih("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.nh(s[0].name,n,s[0].variants[n].transforms))}static sh(e,n){return!Qe(e.conditions)&&ir.oh(e,n)&&ir.lh(e)}static oh(e,n){var r;if(Qe(e.conditions)||Qe((r=e.conditions)==null?void 0:r.url))return!0;var s=ir.getWindowLocation();if(s){var i,a,u,c=AP(n,s.href);return(i=e.conditions)==null||!i.url||F9[(a=(u=e.conditions)==null?void 0:u.urlMatchType)!==null&&a!==void 0?a:"icontains"](e.conditions.url,c)}return!1}static getWindowLocation(){return ne==null?void 0:ne.location}static lh(e){var n;if(Qe(e.conditions)||Qe((n=e.conditions)==null?void 0:n.utm))return!0;var r=WP();if(r.utm_source){var s,i,a,u,c,d,f,p,m=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=e.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,_=(a=e.conditions)==null||(a=a.utm)==null||!a.utm_source||((u=e.conditions)==null||(u=u.utm)==null?void 0:u.utm_source)==r.utm_source,x=(c=e.conditions)==null||(c=c.utm)==null||!c.utm_medium||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_medium)==r.utm_medium,y=(f=e.conditions)==null||(f=f.utm)==null||!f.utm_term||((p=e.conditions)==null||(p=p.utm)==null?void 0:p.utm_term)==r.utm_term;return m&&x&&y&&_}return!1}static ih(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;n>s;s++)r[s-1]=arguments[s];ge.info("[WebExperiments] "+e,r)}nh(e,n,r){this._is_bot()?ir.ih(U4):n!=="control"?r.forEach((s=>{if(s.selector){var i;ir.ih("applying transform of variant "+n+" for experiment "+e+" ",s);var a=(i=document)==null?void 0:i.querySelectorAll(s.selector);a==null||a.forEach((u=>{var c=u;s.html&&(c.innerHTML=s.html),s.css&&c.setAttribute("style",s.css)}))}})):ir.ih("Control variants leave the page unmodified.")}_is_bot(){return wr&&this._instance?c3(wr,this.zi.custom_blocked_useragents):void 0}}var Es=jt("[Conversations]"),qa="Conversations not available yet.";function B4(t,e){var n,r,s,i,a,u,c,d=(n=t==null?void 0:t.flushIntervalMs)!==null&&n!==void 0?n:3e3,f=(r=t==null?void 0:t.maxBufferSize)!==null&&r!==void 0?r:100,p=e!=null&&e.consoleCapture?void 0:(s=t==null?void 0:t.maxLogsPerInterval)!==null&&s!==void 0?s:1e3,m=de(p)?Math.max(f,2048):Math.max(f,p),_=t==null?void 0:t.resourceAttributes;return{serviceName:(i=(a=_==null?void 0:_["service.name"])!==null&&a!==void 0?a:t==null?void 0:t.serviceName)!==null&&i!==void 0?i:e==null?void 0:e.serviceNameDefault,serviceVersion:(u=_==null?void 0:_["service.version"])!==null&&u!==void 0?u:t==null?void 0:t.serviceVersion,environment:(c=_==null?void 0:_["deployment.environment"])!==null&&c!==void 0?c:t==null?void 0:t.environment,resourceAttributes:_,beforeSend:t==null?void 0:t.beforeSend,flushIntervalMs:d,maxBufferSize:f,maxQueueSize:m,maxBatchRecordsPerPost:100,rateCapWindowMs:d,maxLogsPerInterval:p,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}var V9=["debug","log","warn","error","info"],W4="console",b3="__posthogHandledLogsRequestError",c1=(t,e)=>{var n=t instanceof Error?t:new Error(e);return n[b3]=!0,n},q4=t=>!!t&&typeof t=="object"&&t[b3]===!0,E0={featureFlags:class{constructor(t){this.name="featureFlags",this.uh=!1,this.featureFlagEventHandlers=[],this.I=V4,this.hh={},this.dh={},this.fh=[],this.ph=!1,this.gh=!1,this.mh=0,this.yh=!1,this.bh=!1,this._h=!1,this.wh=!1,this.kh=0,this.Et=()=>{var e=this.Sh();this.kh=0,e&&this.reloadFeatureFlags()},this.xh=()=>{var e,n=this.Ch;de(n)||this.zi.remoteRequestsDisabled||!fe||fe.visibilityState==="hidden"||Date.now()-((e=this.Th)!==null&&e!==void 0?e:0)<n||(this.reloadFeatureFlags(),this.Mh())},this.At=()=>{(fe==null?void 0:fe.visibilityState)==="visible"&&this.xh()},"get"in t?this.hs=t:(this.Eh=new N9(t.config,t.xa()),this.hs=this.Eh)}updateConfig(t,e){var n;(n=this.Eh)==null||n.update(t,e),this.cs&&this.Ih()}setup(t){return this.jl=t,this.I=t.logger.createLogger("[FeatureFlags]"),w3(t.kv.initialize(),(()=>{this.jl===t&&(this.jl=void 0,this.cs=t,this.Rh(t))}))}Rh(t){if(this.cs===t)return ne&&At(ne,"online",this.Et),this.Ih(),this.Ph=t.registerDynamicEventProperties((()=>this.Ah()?this.hh:this.dh)),this.Fh(),this.initialize()}Ih(){var t=this.zi.refreshIntervalMs,e=!this.zi.remoteRequestsDisabled&&fe&&!de(t)&&t>0?t:void 0;e!==this.Ch&&(this.Oh(),de(e)||(this.Ch=e,this.Mh(),fe!=null&&fe.addEventListener&&At(fe,lc,this.At)))}Mh(){de(this.Ch)||(de(this.Lh)||clearInterval(this.Lh),this.Th=Date.now(),this.Lh=setInterval(this.xh,this.Ch))}Oh(){de(this.Lh)||(clearInterval(this.Lh),this.Lh=void 0,fe==null||fe.removeEventListener==null||fe.removeEventListener(lc,this.At)),this.Ch=void 0,this.Th=void 0}destroy(){this.Dh()}dispose(){this.Dh()}Dh(){var t;this.Oh(),this.mh++,this.bh=!1,this.jl=void 0,this.cs&&(this.$h(),(t=this.Ph)==null||t.dispose(),this.Ph=void 0,this.fh=[],ne==null||ne.removeEventListener("online",this.Et),this.cs=void 0)}get zi(){return this.hs.get()}Nh(t){var e;return(e=this.cs)==null?void 0:e.kv.get(t)}Ur(t){this.qh((()=>{var e;return(e=this.cs)==null?void 0:e.kv.set(t)}))}Wr(t){this.qh((()=>{var e;return(e=this.cs)==null?void 0:e.kv.remove(t)}))}qh(t){try{t()}catch(e){this.I.error("Failed to update feature flag persistence",e)}}Fh(){var t={};for(var e of[ul,cl,Du,pi]){var n=this.Nh(e);de(n)||(t[e]=n)}this.hh=t;var r=ue({},t),s=this.Nh(ro);if(s)for(var i of Object.entries(s))r["$feature/"+i[0]]=i[1];this.dh=r}Ah(){var t=this.zi.cacheTtlMs;if(!t||0>=t)return!1;var e=this.Nh(El);return typeof e!="number"||Date.now()-e>t}jh(){return!!this.Ah()&&(this.wh||this.gh||(this.wh=!0,this.I.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Bh(){var t=this.zi.evaluationContexts;return t!=null&&t.length?t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||this.I.error("Invalid evaluation context found:",e,"Expected non-empty string"),n})):[]}Hh(){var t=this.zi.flagKeys;if(!de(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||this.I.error("Invalid flag key found:",e,"Expected non-empty string"),n}))}initialize(){var t,e,n=this.zi,r=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(r).length){var s,i,a=(s=(i=n.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&s!==void 0?s:{},u=Object.keys(r).filter((d=>!!r[d])).reduce(((d,f)=>(d[f]=r[f]||!1,d)),{}),c=Object.keys(a).filter((d=>u[d])).reduce(((d,f)=>(d[f]=a[f],d)),{});return this.Uh({featureFlags:u,featureFlagPayloads:c})}}updateFlags(t,e,n){var r,s,i=n!=null&&n.merge&&(r=this.Nh(ro))!==null&&r!==void 0?r:{},a=n!=null&&n.merge&&(s=this.Nh(cl))!==null&&s!==void 0?s:{},u=ue({},i,t),c=ue({},a,e),d={};for(var f of Object.entries(u)){var p=f[0],m=f[1];d[p]={key:p,enabled:ME(m),variant:OE(m),reason:void 0,metadata:de(c==null?void 0:c[p])?void 0:{id:0,version:void 0,description:void 0,payload:c[p]}}}this.Uh({flags:d})}get hasLoadedFlags(){return this.ph}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.Nh(tf),e=this.Nh(pi),n=this.Nh(nl);if(!n&&!e)return t||{};var r=St({},t||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var i of s){var a,u,c=r[i],d=e==null?void 0:e[i],f=de(d)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!d,p=de(d)?c==null?void 0:c.variant:typeof d=="string"?d:void 0,m=n==null?void 0:n[i],_=ue({},c,{enabled:f,variant:f?p??(c==null?void 0:c.variant):void 0});f!==(c==null?void 0:c.enabled)&&(_.original_enabled=c==null?void 0:c.enabled),p!==(c==null?void 0:c.variant)&&(_.original_variant=c==null?void 0:c.variant),m&&(_.metadata=ue({},c==null?void 0:c.metadata,{payload:m,original_payload:c==null||(u=c.metadata)==null?void 0:u.payload})),r[i]=_}return this.uh||(this.I.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:r}),this.uh=!0),r}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var r=t[n];return{key:n,enabled:ME(r),variant:OE(r),payload:RE(e[n])}}))}getFlagVariants(){var t=this.Nh(ro),e=this.Nh(pi);if(!e)return t||{};for(var n=St({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.uh||(this.I.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.uh=!0),n}getFlagPayloads(){var t=this.Nh(cl),e=this.Nh(nl);if(!e)return t||{};for(var n=St({},t||{}),r=Object.keys(e),s=0;r.length>s;s++)n[r[s]]=e[r[s]];return this.uh||(this.I.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.uh=!0),n}reloadFeatureFlags(){this.yh||this.zi.featureFlagsDisabled||this.Sh()||this.zh||(this.fh.slice().forEach((t=>{try{t()}catch(e){this.I.error("Error while running feature flags reloading callback",e)}})),this.zh=setTimeout((()=>{this.Wh()}),5))}$h(){clearTimeout(this.zh),this.zh=void 0}onReloading(t){return this.fh.push(t),()=>{this.fh=this.fh.filter((e=>e!==t))}}ensureFlagsLoaded(){this.ph||this.gh||this.zh||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.yh=t}resetFlagCallReported(){this.Wr(ao)}Wh(t){this.$h();var e=this.cs;if(e&&!this.zi.remoteRequestsDisabled&&!this.Sh())if(this.gh)this.bh=!0;else{var n={token:e.projectToken,distinct_id:e.distinctId,groups:e.groups,$anon_distinct_id:this.$anon_distinct_id,person_properties:ue({},e.initialPersonProperties,this.Nh(Ws)||{},{$lib:e.library.name,$lib_version:e.library.version}),group_properties:this.Nh(Si),timezone:XP()};de(e.deviceId)||(n.$device_id=e.deviceId),(t!=null&&t.disableFlags||this.zi.featureFlagsDisabled)&&(n.disable_flags=!0);var r=this.Bh();r.length&&(n.evaluation_contexts=r);var s=this.Hh();de(s)||(n.flag_keys=s);var i=this.zi.onlyEvaluateSurveyFeatureFlags,a="/flags/?v=2"+(i?"&only_evaluate_survey_feature_flags=true":""),u=this.mh;this.gh=!0;var c=()=>{this.bh&&(this.bh=!1,this.Wh())},d=f=>{this.gh=!1,u===this.mh&&(this.Ur({[ju]:[$4]}),this.I.error("Feature flag request failed",f)),c()};try{e.sendRequest(a,{target:"flags",method:"POST",body:n,compression:this.zi.compression,sentAt:"body",timeoutMs:this.zi.requestTimeoutMs}).then((f=>{var p,m,_=(p=f.json)!==null&&p!==void 0?p:{},x=f.statusCode!==200;if(this.gh=!1,u===this.mh){if(this.Vh(f.statusCode),x||this.bh||(this.$anon_distinct_id=void 0),!n.disable_flags||this.bh){this._h=!x;var y=[];f.error?y.push(f.error instanceof Error&&f.error.name==="AbortError"?"timeout":f.error instanceof Error?$4:"unknown_error"):f.statusCode!==200&&y.push("api_error_"+f.statusCode),_.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var w=!((m=_.quotaLimited)==null||!m.includes("feature_flags"));w&&y.push("quota_limited"),this.Ur({[ju]:y}),w?this.I.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."):n.disable_flags||this.Uh(_,x,{partialResponse:i}),c()}}else c()})).catch(d)}catch(f){d(f)}}}Sh(){return UP(this.kh,3)}Vh(t){this.kh=BP(t,this.kh,3,(()=>this.I.warn("Feature flag requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped refreshing feature flags; will try again when connectivity changes.")))}getFeatureFlag(t,e){var n;if(e===void 0&&(e={}),!e.fresh||this._h)if(this.ph||this.getFlags()&&this.getFlags().length>0){if(!this.jh()){var r=this.getFeatureFlagResult(t,e);return(n=r==null?void 0:r.variant)!==null&&n!==void 0?n:r==null?void 0:r.enabled}}else this.I.warn('getFeatureFlag for key "'+t+u1)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this._h)if(this.ph||this.getFlags()&&this.getFlags().length>0){if(!this.jh()){var n,r=this.getFlagVariants(),s=t in r,i=r[t],a=this.getFlagPayloads()[t],u=String(i),c=this.Nh(Du)||void 0,d=this.Nh(El)||void 0,f=this.Nh(ao)||{};if(this.zi.deduplicateCallsPerSession){var p,m=(p=this.cs)==null?void 0:p.session.sessionId,_=this.Nh(Md);m&&m!==_&&(f={},n=m)}if(e.send_event||!("send_event"in e))if(t in f&&f[t].includes(u))n&&this.Ur({[ao]:f,[Md]:n});else{var x,y,w,b,C,P,T,A,R,L,I,O;Ke(f[t])?f[t].push(u):f[t]=[u],this.Ur(ue({[ao]:f},n?{[Md]:n}:{}));var N=this.getFeatureFlagDetails(t),j=[...(x=this.Nh(ju))!==null&&x!==void 0?x:[]];de(i)&&j.push("flag_missing");var F={$feature_flag:t,$feature_flag_response:i,$feature_flag_payload:a??null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:(y=(w=this.zi.bootstrap)==null||(w=w.featureFlags)==null?void 0:w[t])!==null&&y!==void 0?y:null,$feature_flag_bootstrapped_payload:(b=(C=this.zi.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[t])!==null&&b!==void 0?b:null,$used_bootstrap_value:!this._h};de(N==null||(P=N.metadata)==null?void 0:P.has_experiment)||(F.$feature_flag_has_experiment=N.metadata.has_experiment),de(N==null||(T=N.metadata)==null?void 0:T.version)||(F.$feature_flag_version=N.metadata.version);var G,Q=(A=N==null||(R=N.reason)==null?void 0:R.description)!==null&&A!==void 0?A:N==null||(L=N.reason)==null?void 0:L.code;Q&&(F.$feature_flag_reason=Q),N!=null&&(I=N.metadata)!=null&&I.id&&(F.$feature_flag_id=N.metadata.id),de(N==null?void 0:N.original_variant)&&de(N==null?void 0:N.original_enabled)||(F.$feature_flag_original_response=de(N.original_variant)?N.original_enabled:N.original_variant),N!=null&&(O=N.metadata)!=null&&O.original_payload&&(F.$feature_flag_original_payload=N==null||(G=N.metadata)==null?void 0:G.original_payload),j.length&&(F.$feature_flag_error=j.join(",")),this.Gh(F)}else n&&this.Ur({[ao]:f,[Md]:n});if(s)return{key:t,enabled:!!i,variant:typeof i=="string"?i:void 0,payload:RE(a)}}}else this.I.warn('getFeatureFlagResult for key "'+t+u1)}Gh(t){try{var e;(e=this.cs)==null||e.capture("$feature_flag_called",t).catch((n=>{this.I.error("Failed to capture feature flag call",n)}))}catch(n){this.I.error("Failed to capture feature flag call",n)}}getRemoteConfigPayload(t,e){this.Zh(t,e)}Zh(t,e){var n=this;return Tt((function*(){var r=n.cs;if(r){var s={distinct_id:r.distinctId,token:r.projectToken,person_properties:{$lib:r.library.name,$lib_version:r.library.version}},i=n.Bh();i.length&&(s.evaluation_contexts=i);var a,u=n.Hh();de(u)||(s.flag_keys=u);try{var c,d=(c=(yield r.sendRequest("/flags/?v=2",{target:"flags",method:"POST",body:s,compression:n.zi.compression,sentAt:"body",timeoutMs:n.zi.requestTimeoutMs})).json)==null?void 0:c.featureFlagPayloads;a=(d==null?void 0:d[t])||void 0}catch(f){return void n.I.error("Remote config feature flag request failed",f)}try{e(a)}catch(f){n.I.error("Remote config feature flag callback failed",f)}}}))()}isFeatureEnabled(t,e){if(e===void 0&&(e={}),e.fresh&&!this._h)return e.defaultValue;if(!(this.ph||this.getFlags()&&this.getFlags().length>0))return this.I.warn('isFeatureEnabled for key "'+t+u1),e.defaultValue;var n=this.getFeatureFlag(t,e);return de(n)?e.defaultValue:!!n}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){this.Uh(t,e,n)}Uh(t,e,n){if(this.cs){this.ph=!0;var r=(function(s,i,a,u,c,d){i===void 0&&(i={}),a===void 0&&(a={}),u===void 0&&(u={}),d===void 0&&(d=V4);var f=((R,L)=>{var I=R.flags;return I?ue({},R,{featureFlags:Object.fromEntries(Object.keys(I).map((O=>{var N;return[O,(N=I[O].variant)!==null&&N!==void 0?N:I[O].enabled]}))),featureFlagPayloads:Object.fromEntries(Object.keys(I).filter((O=>I[O].enabled)).filter((O=>{var N;return(N=I[O].metadata)==null?void 0:N.payload})).map((O=>{var N;return[O,(N=I[O].metadata)==null?void 0:N.payload]})))}):(R.featureFlags&&L.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),R)})(s,d),p=f.flags,m=f.featureFlags,_=f.featureFlagPayloads;if(m){var x=s.requestId,y=s.evaluatedAt;if(Ke(m)){d.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var w={};if(m)for(var b=0;m.length>b;b++)w[m[b]]=!0;return{[ul]:m,[ro]:w,[Im]:!1}}var C=m,P=_,T=p;if(c!=null&&c.partialResponse)C=ue({},i,C),P=ue({},a,P),T=ue({},u,T);else if(s.errorsWhileComputingFlags)if(p){var A=new Set(Object.keys(p).filter((R=>{var L;return!((L=p[R])!=null&&L.failed)})));C=ue({},i,Object.fromEntries(Object.entries(C).filter((R=>A.has(R[0]))))),P=ue({},a,Object.fromEntries(Object.entries(P||{}).filter((R=>A.has(R[0]))))),T=ue({},u,Object.fromEntries(Object.entries(T||{}).filter((R=>A.has(R[0])))))}else C=ue({},i,C),P=ue({},a,P),T=ue({},u,T);return ue({[ul]:Object.keys(H4(C)),[ro]:C||{},[cl]:P||{},[tf]:T||{},[Im]:s.minimalFlagCalledEvents===!0},x?{[Du]:x}:{},y?{[El]:y}:{})}})(t,this.getFlagVariants(),this.getFlagPayloads(),this.getFlagsWithDetails(),n,this.I);r&&this.Ur(r),e||(this.wh=!1),this.Qh(e)}}override(t,e){e===void 0&&(e=!1),this.I.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){this.Jh(t)}Jh(t){if(this.cs){if(t===!1)return this.Wr([pi,nl]),this.Qh(),void Wa.info("All overrides cleared");if(Ke(t))return this.Ur({[pi]:z4(t)}),this.Qh(),void Wa.info("Flag overrides set",{flags:t});if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var e,n=t;this.uh=!!((e=n.suppressWarning)!==null&&e!==void 0&&e);var r={},s=n.flags,i=n.payloads;return s&&(r[pi]=Ke(s)?z4(s):s),i&&(r[nl]=i),Object.keys(r).length&&this.Ur(r),s===!1&&i===!1?this.Wr([pi,nl]):s===!1?this.Wr(pi):i===!1&&this.Wr(nl),this.Qh(),s===!1?Wa.info("Flag overrides cleared"):s&&Wa.info("Flag overrides set",{flags:s}),void(i===!1?Wa.info("Payload overrides cleared"):i&&Wa.info("Payload overrides set",{payloads:i}))}if(t&&typeof t=="object")return this.Ur({[pi]:t}),this.Qh(),void Wa.info("Flag overrides set",{flags:t});this.I.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}else this.I.warn("posthog.featureFlags.overrideFeatureFlags called before feature flags were ready")}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.ph){var e=this.Kh(),n=e.flags,r=e.flagVariants;try{t(n,r)}catch(s){this.I.error("Error while running feature flags callback",s)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var r=(this.Nh(Up)||[]).find((c=>c.flagKey===t)),s={["$feature_enrollment/"+t]:e},i={$feature_flag:t,$feature_enrollment:e,$set:s};r&&(i.$early_access_feature_name=r.name),n&&(i.$feature_enrollment_stage=n);var a=ue({},this.getFlagVariants(),{[t]:e});this.Ur({[ul]:Object.keys(H4(a)),[ro]:a,[Ws]:ue({},this.Nh(Ws)||{},s)}),this.Qh();try{var u;(u=this.cs)==null||u.capture("$feature_enrollment_update",i).catch((c=>{this.I.error("Failed to capture early access feature enrollment",c)}))}catch(c){this.I.error("Failed to capture early access feature enrollment",c)}}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var r=this.Nh(Up);!r||e?this.Yh(t,n):t(r)}Yh(t,e){var n=this;return Tt((function*(){var r=n.cs;if(r){var s,i=e?"&"+e.map((u=>"stage="+u)).join("&"):"";try{var a=yield r.sendRequest("/api/early_access_features/?token="+r.projectToken+i,{target:"api",method:"GET",sentAt:"query"});if(!a.json)return;n.Ur({[Up]:s=a.json.earlyAccessFeatures})}catch(u){return void n.I.error("Early access feature request failed",u)}try{t(s)}catch(u){n.I.error("Early access feature callback failed",u)}}}))()}Kh(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,r)=>(n[r]=e[r],n)),{})}}Qh(t){this.Fh();var e=this.Kh(),n=e.flags,r=e.flagVariants;this.featureFlagEventHandlers.forEach((s=>{try{s(n,r,{errorsLoading:t})}catch(i){this.I.error("Error while running feature flags callback",i)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0),this.Xh(t,e)}Xh(t,e){e===void 0&&(e=!0);var n=this.Nh(Ws)||{},r=(t==null?void 0:t.$set)||(t!=null&&t.$set_once?{}:t),s=t==null?void 0:t.$set_once,i={};if(s)for(var a in s)({}).hasOwnProperty.call(s,a)&&(a in n||(i[a]=s[a]));this.Ur({[Ws]:ue({},n,i,r)}),e&&this.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=ue({},this.Nh(Ws)||{});t.forEach((r=>{delete n[r]})),this.Ur({[Ws]:n}),e&&this.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this.Wr(Ws),t&&this.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.Nh(Si)||{},r=ue({},n);for(var s of Object.keys(t))r[s]=ue({},n[s],t[s]);this.Ur({[Si]:r}),e&&this.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.Nh(Si)||{};this.Ur({[Si]:ue({},e,{[t]:{}})})}else this.Wr(Si)}reset(){this.mh++,this.bh=!1,this.hh={},this.dh={},this.ph=!1,this.yh=!1,this._h=!1,this.$anon_distinct_id=void 0,this.$h(),this.uh=!1,this.kh=0}}},$9={sessionRecording:class{get zi(){return this._instance.config}get Ja(){return this._instance.persistence}get started(){var t;return!((t=this.td)==null||!t.isStarted)}get status(){var t,e;return this.ed===bd||this.ed===gp?this.ed:(t=(e=this.td)==null?void 0:e.status)!==null&&t!==void 0?t:this.ed}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ed=M4,this.rd=void 0,this.nd=!1,this.St=(()=>{var e;if(fe==null||!fe.visibilityState||fe.visibilityState==="visible")return!0;var n=ne==null||(e=ne.performance)==null||e.getEntriesByType==null?void 0:e.getEntriesByType("visibility-state");return!(n!=null&&n.length)||n.some((r=>r.name==="visible"))})(),this.At=()=>{var e;(fe==null?void 0:fe.visibilityState)==="visible"&&(this.St=!0,(e=this.td)==null||e.setDocumentWasEverVisible==null||e.setDocumentWasEverVisible(!0))},this._instance=t,!this._instance.sessionManager)throw Ki.error("started without valid sessionManager"),new Error(d_+" started without valid sessionManager. This is a bug.");if(this.zi.cookieless_mode===lo)throw new Error(d_+' cannot be used with cookieless_mode="always"');fe!=null&&fe.addEventListener&&At(fe,"visibilitychange",this.At)}initialize(){this.startIfEnabledOrStop()}dispose(){this.nd=!0,fe==null||fe.removeEventListener==null||fe.removeEventListener("visibilitychange",this.At),this.stopRecording()}get sd(){var t,e=!((t=this._instance.get_property(ll))==null||!t.enabled),n=!this.zi.disable_session_recording,r=this.zi.disable_session_recording||this._instance.consent.isOptedOut();return ne&&e&&n&&!r}startIfEnabledOrStop(t){var e;if(!(this.nd||this.sd&&(e=this.td)!=null&&e.isStarted)){var n=!de(Object.assign)&&!de(Array.from);this.sd&&n?(this.ad(t),Ki.info("starting")):(this.ed=M4,this.stopRecording())}}ad(t){var e,n,r;this.sd&&(this.ed!==bd&&this.ed!==gp&&(this.ed=O4),Re!=null&&(e=Re.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=Re.__PosthogExtensions__)!=null&&n.initSessionRecording?this.od(t):(r=Re.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.ld,(s=>{if(s)return this._instance.register_for_session({[Qy]:!0}),Ki.error("could not load recorder",s);this.od(t)})))}stopRecording(){var t,e;(t=this.rd)==null||t.call(this),this.rd=void 0,(e=this.td)==null||e.stop()}ud(){var t,e;(t=this.rd)==null||t.call(this),this.rd=void 0,(e=this.td)==null||e.discard()}hd(){var t,e;(t=this.Ja)==null||t.unregister(X2),(e=this.Ja)==null||e.unregister(gP)}dd(t,e){if(Qe(t))return null;var n,r=sn(t)?t:parseFloat(t);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(Ki.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):r}vd(t){if(this.Ja){var e,n,r=this.Ja,s=()=>{var i,a=t.sessionRecording===!1?void 0:t.sessionRecording,u=this.dd((i=this.zi.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),c=this.dd(a==null?void 0:a.sampleRate,"remote config sampleRate"),d=u??c;Qe(d)&&this.hd();var f=a==null?void 0:a.minimumDurationMilliseconds;r.register({[ll]:ue({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:ue({capturePerformance:t.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:d,minimumDurationMilliseconds:de(f)?null:f,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};s(),(e=this.rd)==null||e.call(this),this.rd=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(t){var e=t.ok?t.config:void 0;return e&&"sessionRecording"in e?e.sessionRecording===!1?(this.vd(e),void this.ud()):(this.vd(e),void this.startIfEnabledOrStop()):(this.ed===bd&&(this.ed=gp,Ki.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var n;e===void 0&&(e="log"),(n=this.td)!=null&&n.log?this.td.log(t,e):Ki.warn("log called before recorder was ready")}get ld(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ll);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}fd(){var t,e=this._instance.get_property(ll);if(!e)return!1;try{t=typeof e=="object"?e:JSON.parse(e)}catch(n){return Ki.warn("persisted remote config for session recording is invalid and will be ignored",n),!1}return!Qe(t.cache_timestamp)&&36e5>=Date.now()-t.cache_timestamp}od(t){var e,n,r;if(!this.nd){if((e=Re.__PosthogExtensions__)==null||!e.initSessionRecording)return Ki.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[Qy]:!0});var s;if(this.td||(this.td=(s=Re.__PosthogExtensions__)==null?void 0:s.initSessionRecording(this._instance,this.St),this.td._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.fd())return this.ed===gp||this.ed===bd?void 0:(this.ed=bd,Ki.info("persisted remote config is stale, requesting fresh config before starting"),void new QP(this._instance).load());this.ed=O4,(n=(r=this.td).setDocumentWasEverVisible)==null||n.call(r,this.St),this.td.start(t)}}onRRwebEmit(t){var e;(e=this.td)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.td||(e=this.Ja)==null||e.register({[_P]:!0}),(t=this.td)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.td||(e=this.Ja)==null||e.register({[yP]:!0}),(t=this.td)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.td||(n=this.Ja)==null||n.register({[t==="url"?xP:wP]:!0}),(e=this.td)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.td)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.td)==null||!n.tryAddCustomEvent(t,e))}}},z9={autocapture:class extends w9{constructor(t){super(new b9(t)),this.instance=t}},historyAutocapture:class{constructor(t){this._instance=t,this.pd=this.gd()}initialize(){this.startIfEnabled()}get isEnabled(){var t=this.md();return!!(t.path||t.search||this.yd(t))}startIfEnabled(){this.isEnabled&&(ge.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}startIfEnabledOrStop(){this.stop(),this.pd=this.gd(),this.startIfEnabled()}stop(){this.bd&&this.bd(),this.bd=void 0,this._d&&this._d(),this._d=void 0,ge.info("History API monitoring stopped")}monitorHistoryChanges(){ne&&ne.history&&(this.wd("pushState"),this.wd("replaceState"),this.kd(),this.yd()&&this.Sd())}wd(t){var e;if(ne&&((e=ne.history[t])==null||!e.__posthog_wrapped__)){var n=this;x3(ne.history,t,(r=>function(s,i,a){r.call(this,s,i,a),n.xd(t)}))}}gd(){var t=ne==null?void 0:ne.location;if(t!=null&&t.pathname)return{pathname:t.pathname,search:t.search,hash:t.hash}}md(){var t=this._instance.config.capture_pageview;return t==="history_change"?{path:!0}:bt(t)?t:{}}yd(t){return t===void 0&&(t=this.md()),!!t.hash&&!this._instance.config.disable_capture_url_hashes}Cd(t){var e=this.md(),n=this.pd;return!(!n||!(e.path&&t.pathname!==n.pathname||e.search&&t.search!==n.search||this.yd(e)&&t.hash!==n.hash))}xd(t){try{var e=this.gd();if(!e)return;this.Cd(e)&&this._instance.capture(wu,{navigation_type:t}),this.pd=e}catch(n){ge.error("Error capturing "+t+" pageview",n)}}kd(){if(!this.bd){var t=()=>{this.xd("popstate")};At(ne,"popstate",t),this.bd=()=>{ne&&ne.removeEventListener("popstate",t)}}}Sd(){if(!this._d){var t=()=>{this.xd("hashchange")};At(ne,"hashchange",t),this._d=()=>{ne&&ne.removeEventListener("hashchange",t)}}}},heatmaps:class{get zi(){return this.instance.config}constructor(t){var e;this.Td=!1,this.ns=!1,this.Md=null,this.instance=t,this.Td=!((e=this.instance.persistence)==null||!e.props[Vy]),this.rageclicks=new _3(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return bt(this.zi.capture_heatmaps)&&this.zi.capture_heatmaps.flush_interval_milliseconds&&(t=this.zi.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Qe(this.zi.capture_heatmaps)?Qe(this.zi.enable_heatmaps)?this.Td:this.zi.enable_heatmaps:this.zi.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.ns)return;k9.info("starting..."),this.Ed(),this.At()}else{var t;clearInterval((t=this.Md)!==null&&t!==void 0?t:void 0),this.Id(),this.getAndClearBuffer()}}onRemoteConfig(t){if(t.ok){var e=t.config;if("heatmaps"in e){var n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Vy]:n}),this.Td=n,this.startIfEnabled()}}}getAndClearBuffer(){var t=this.bt;return this.bt=void 0,t}Rd(t){a1(t.originalEvent)&&this.Ei(t.originalEvent,"deadclick")}At(){this.Md&&clearInterval(this.Md),this.Md=(fe==null?void 0:fe.visibilityState)==="visible"?setInterval(this.ja.bind(this),this.flushIntervalMilliseconds):null}Ed(){ne&&fe&&(this.Pd=this.ja.bind(this),At(ne,Lm,this.Pd),this.Ad=t=>this.Ei(t||(ne==null?void 0:ne.event)),At(fe,"click",this.Ad,{capture:!0}),this.Fd=t=>this.Od(t||(ne==null?void 0:ne.event)),At(fe,"mousemove",this.Fd,{capture:!0}),this.Ld=new u4(this.instance,OD,this.Rd.bind(this)),this.Ld.startIfEnabledOrStop(),this.Dd=this.At.bind(this),At(fe,lc,this.Dd),this.ns=!0)}Id(){var t;ne&&fe&&(this.Pd&&ne.removeEventListener(Lm,this.Pd),this.Ad&&fe.removeEventListener("click",this.Ad,{capture:!0}),this.Fd&&fe.removeEventListener("mousemove",this.Fd,{capture:!0}),this.Dd&&fe.removeEventListener(lc,this.Dd),clearTimeout(this.$d),(t=this.Ld)==null||t.stop(),this.ns=!1)}Nd(t,e){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=(function(a,u,c){for(var d=a;d&&da(d)&&!ss(d,"body");){if(d===c)return!1;var f=void 0;try{var p,m,_;f=(p=(m=(_=d.ownerDocument)==null?void 0:_.defaultView)!==null&&m!==void 0?m:ne)==null?void 0:p.getComputedStyle(d).position}catch{return!1}if(Ze(u,f))return!0;d=NP(d)}return!1})(t_(t),["fixed","sticky"],s);return{x:t.clientX+(i?0:r),y:t.clientY+(i?0:n),target_fixed:i,type:e}}Ei(t,e){var n;if(e===void 0&&(e="click"),!JE(t.target)&&a1(t)){var r=this.Nd(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&jP(t_(t),this.instance.config.rageclick)&&this.Vn(ue({},r,{type:"rageclick"})),this.Vn(r)}}Od(t){!JE(t.target)&&a1(t)&&(clearTimeout(this.$d),this.$d=setTimeout((()=>{this.Vn(this.Nd(t,"mousemove"))}),500))}Vn(t){if(ne){var e=this.zi.disable_capture_url_hashes?ca(ne.location.href):ne.location.href,n=this.zi.custom_personal_data_properties,r=this.zi.mask_personal_data_properties?[...dc,...n||[]]:[],s=rf(e,r,sf);this.bt=this.bt||{},this.bt[s]||(this.bt[s]=[]),this.bt[s].push(t)}}ja(){this.bt&&!Zs(this.bt)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:u4,webVitalsAutocapture:class{constructor(t){var e;this.Td=!1,this.ns=!1,this.bt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},this.qd=()=>{clearTimeout(this.jd),this.jd=void 0,this.bt.metrics.length!==0&&(this._instance.capture("$web_vitals",ue({$current_url:this.bt.url},this.bt.metrics.reduce(((n,r)=>ue({},n,{["$web_vitals_"+r.name+"_event"]:ue({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{}))),this.bt={navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Bd=n=>{var r;if(this.bt=this.bt||{navigationKey:void 0,url:void 0,metrics:[],firstMetricTimestamp:void 0},Qe(n==null?void 0:n.name)||Qe(n==null?void 0:n.value))Ba.error("Invalid metric received",n);else{var s=typeof n.navigationURL=="string"?n.navigationURL:void 0,i=this.Hd(s);if(!de(i)){var a=sn(n.navigationId)||typeof n.navigationId=="string"?"navigation:"+n.navigationId:"url:"+i;if(!this.Ud||this.Ud>n.value){this.bt.navigationKey!==a&&(this.qd(),this.jd=setTimeout(this.qd,this.flushToCaptureTimeoutMs)),de(this.bt.navigationKey)&&(this.bt.navigationKey=a,this.bt.url=i),this.bt.firstMetricTimestamp=de(this.bt.firstMetricTimestamp)?Date.now():this.bt.firstMetricTimestamp;var u=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),c=ue({},n,s?{navigationURL:i}:{},{$current_url:i,timestamp:Date.now()});if(delete c.entries,bt(n.attribution)&&this.attributionMetrics.indexOf(n.name)>-1){var d={};for(var f of C9){var p=f==="url"&&typeof n.attribution[f]=="string"?this.Hd(n.attribution[f]):n.attribution[f];de(p)||(d[f]=p)}c.attribution=d}else delete c.attribution;de(u)||(c.$session_id=u.sessionId,c.$window_id=u.windowId),this.bt.metrics.push(c),this.bt.metrics.length===this.allowedMetrics.length&&this.qd()}else Ba.error("Ignoring metric with value >= "+this.Ud,n)}}},this.zd=()=>{if(!this.ns){var n,r,s,i,a=!1,u=Re.__PosthogExtensions__,c=u==null?void 0:u.postHogWebVitalsCallbacksByFlavor,d=(c==null?void 0:c[this.Wd])||(this.Wd==="web-vitals"&&de(c)?u==null?void 0:u.postHogWebVitalsCallbacks:void 0);if(!de(d)){var f=d.withoutAttribution,p=this.attributionMetrics;a=!de(f),n=p.indexOf("LCP")>-1?d.onLCP:(f==null?void 0:f.onLCP)||d.onLCP,r=p.indexOf("CLS")>-1?d.onCLS:(f==null?void 0:f.onCLS)||d.onCLS,s=p.indexOf("FCP")>-1?d.onFCP:(f==null?void 0:f.onFCP)||d.onFCP,i=p.indexOf("INP")>-1?d.onINP:(f==null?void 0:f.onINP)||d.onINP}if(n&&r&&s&&i){var m={reportSoftNavs:this.useSoftNavs},_=a&&this.attributionMetrics.indexOf("INP")>-1?ue({},m,{includeProcessedEventEntries:!1}):m;this.allowedMetrics.indexOf("LCP")>-1&&n(this.Bd.bind(this),m),this.allowedMetrics.indexOf("CLS")>-1&&r(this.Bd.bind(this),m),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Bd.bind(this),m),this.allowedMetrics.indexOf("INP")>-1&&i(this.Bd.bind(this),_),this.ns=!0}else Ba.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Td=!((e=this._instance.persistence)==null||!e.props[Uy]),this.startIfEnabled()}get Vd(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=bt(this.Vd)?(t=this.Vd)==null?void 0:t.web_vitals_allowed_metrics:void 0;return Qe(n)?((e=this._instance.persistence)==null?void 0:e.props[Wy])||R4:n}get flushToCaptureTimeoutMs(){return(bt(this.Vd)?this.Vd.web_vitals_delayed_flush_ms:void 0)||5e3}get attributionMetrics(){var t=bt(this.Vd)?this.Vd.web_vitals_attribution:void 0;return xr(t)?t?R4:[]:Ke(t)?t:E9}get useAttribution(){return this.attributionMetrics.length>0}get useSoftNavs(){var t=bt(this.Vd)?this.Vd.__preview_web_vitals_soft_navs:void 0;return t!=null&&t}get Ud(){var t=bt(this.Vd)&&sn(this.Vd.__web_vitals_max_value)?this.Vd.__web_vitals_max_value:I4;return t>0&&6e4>=t?I4:t}get isEnabled(){var t=zt==null?void 0:zt.protocol;if(t!=="http:"&&t!=="https:")return Ba.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=bt(this.Vd)?this.Vd.web_vitals:xr(this.Vd)?this.Vd:void 0;return xr(e)?e:this.Td}startIfEnabled(){this.isEnabled&&!this.ns&&(Ba.info("enabled, starting..."),this.Es(this.zd))}onRemoteConfig(t){if(t.ok){var e=t.config;if("capturePerformance"in e){var n=bt(e.capturePerformance)&&!!e.capturePerformance.web_vitals,r=bt(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[Uy]:n}),this._instance.persistence.register({[Wy]:r})),this.Td=n,this.startIfEnabled()}}}get Wd(){return this.useSoftNavs?this.useAttribution?"web-vitals-with-attribution-soft-navs":"web-vitals-soft-navs":this.useAttribution?"web-vitals-with-attribution":"web-vitals"}Es(t){var e=Re.__PosthogExtensions__,n=this.Wd,r=e==null?void 0:e.postHogWebVitalsCallbacksByFlavor;r!=null&&r[n]||n==="web-vitals"&&de(r)&&e!=null&&e.postHogWebVitalsCallbacks?t():e==null||e.loadExternalDependency==null||e.loadExternalDependency(this._instance,n,(s=>{s?Ba.error("failed to load script",s):t()}))}Hd(t){var e=t||(ne==null?void 0:ne.location.href);if(e){var n=this._instance.config.disable_capture_url_hashes?ca(e):e,r=this._instance.config.custom_personal_data_properties,s=this._instance.config.mask_personal_data_properties?[...dc,...r||[]]:[];return rf(n,s,sf)}Ba.error("Could not determine current URL")}}},H9={exceptionObserver:class{constructor(t){var e;this.zd=()=>{var n;if(ne&&this.isEnabled&&(n=Re.__PosthogExtensions__)!=null&&n.errorWrappingFunctions){var r=Re.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,s=Re.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,i=Re.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Gd&&this.zi.capture_unhandled_errors&&(this.Gd=r(this.captureException.bind(this))),!this.Zd&&this.zi.capture_unhandled_rejections&&(this.Zd=s(this.captureException.bind(this))),!this.Qd&&this.zi.capture_console_errors&&(this.Qd=i(this.captureException.bind(this)))}catch(a){wd.error("failed to start",a),this.Jd()}}},this._instance=t,this.Kd=!((e=this._instance.persistence)==null||!e.props[$y]),this.oe=new CN(ue({},(function(n){var r,s,i,a;return n===void 0&&(n={}),{refillRate:(r=(s=n.exceptionRateLimiterRefillRate)!==null&&s!==void 0?s:n.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(i=(a=n.exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:n.__exceptionRateLimiterBucketSize)!==null&&i!==void 0?i:10}})(this._instance.config.error_tracking),{refillInterval:1e4,I:wd})),this.zi=this.Yd(),this.startIfEnabledOrStop()}Yd(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return bt(t)?e=ue({},e,t):(de(t)?this.Kd:t)&&(e=ue({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.zi.capture_console_errors||this.zi.capture_unhandled_errors||this.zi.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(wd.info("enabled"),this.Jd(),this.Es(this.zd)):this.Jd()}Es(t){var e,n;(e=Re.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=Re.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return wd.error("failed to load script",r);t()}))}Jd(){var t,e,n;(t=this.Gd)==null||t.call(this),this.Gd=void 0,(e=this.Zd)==null||e.call(this),this.Zd=void 0,(n=this.Qd)==null||n.call(this),this.Qd=void 0}onRemoteConfig(t){if(t.ok){var e=t.config;"autocaptureExceptions"in e&&(this.Kd=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[$y]:this.Kd}),this.zi=this.Yd(),this.startIfEnabledOrStop())}}onConfigChange(){this.zi=this.Yd()}captureException(t){var e,n,r,s=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.oe.consumeRateLimit(s)?wd.info("Skipping exception capture because of client rate limiting.",{exception:s}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.Xd=[],this.tv=new WN([new JN,new lD,new tD,new eD,new oD,new iD,new rD,new aD],(function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;s>a;a++)i[a-1]=arguments[a];return function(u,c){c===void 0&&(c=0);for(var d=[],f=u.split(`
|
|
19
|
-
`),p=c;f.length>p;p++){var m=f[p];if(1024>=m.length){var _=qE.test(m)?m.replace(qE,"$1"):m;if(!_.match(/\S*Error: /)){for(var x of i){var y=x(_,r);if(y){d.push(y);break}}if(d.length>=50)break}}}return(function(w){if(!w.length)return[];var b=Array.from(w);return b.reverse(),b.slice(0,50).map((C=>{return ue({},C,{filename:C.filename||(P=b,P[P.length-1]||{}).filename,function:C.function||ac});var P}))})(d)}})("web:javascript",ZN,QN)),this._instance=t,this.Xd=(e=(n=this._instance.persistence)==null?void 0:n.get_property(zy))!==null&&e!==void 0?e:[],this.ev=Tm(this.iv()),this.rv=new cD(this.ev)}onConfigChange(){this.ev=Tm(this.iv()),this.rv.setConfig(this.ev)}onRemoteConfig(t){var e,n,r;if(t.ok){var s=t.config;if("errorTracking"in s){var i=(e=(n=s.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],a=(r=s.errorTracking)==null?void 0:r.captureExtensionExceptions;this.Xd=i,this._instance.persistence&&this._instance.persistence.register({[zy]:this.Xd,[Hy]:a})}}}get nv(){var t,e=!!this._instance.get_property(Hy),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.tv.buildFromUnknown(t,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}addExceptionStep(t,e){if(this.ev.enabled)try{if(!ut(t)||t.trim().length===0)return void zs.warn("Ignoring exception step because message must be a non-empty string");var n=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var a=[];return{sanitizedProperties:Object.keys(i).reduce(((u,c)=>uD.has(c)?(a.push(c),u):(u[c]=i[c],u)),{}),droppedKeys:a}})(this.sv(e)),r=n.sanitizedProperties,s=n.droppedKeys;s.length>0&&zs.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this.rv.add(ue({[km]:t,[Pm]:new Date().toISOString()},r))}catch(i){zs.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.av(e)){if(this.ov(e))return this.lv("Exception dropped: matched a suppression rule"),void zs.info("Skipping exception capture because a suppression rule matched");if(!this.nv&&this.uv(e))return this.lv("Exception dropped: thrown by a browser extension"),void zs.info("Skipping exception capture because it was thrown by an extension");if(!this.nv&&this.hv(e))return this.lv("Exception dropped: thrown by an injected browser script"),void zs.info("Skipping exception capture because it was thrown by an injected browser script");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.dv(e))return this.lv("Exception dropped: thrown by the PostHog SDK"),void zs.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.ev.enabled&&Qe(t.$exception_steps)?this.vv(t):t,r=typeof(i=globalThis._posthogReleaseId)=="string"&&i.length>0?i:void 0;r&&(n.$release_id=r);try{var s=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",_l:!0});return s&&this.rv.clear(),s}catch(a){return zs.error("Failed to capture exception event. Dropping this exception.",a),void this.rv.clear()}}catch(a){return void zs.error("Failed to process exception event. Ignoring this exception.",a)}var i}vv(t){try{var e=this.rv.getAttachable();return e.length===0?t:ue({},t,{$exception_steps:e})}catch(n){return zs.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}lv(t){this.ev.enabled&&this.rv.add({[km]:t,[Pm]:new Date().toISOString()})}sv(t){return bt(t)?ue({},t):{}}iv(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}ov(t){if(t.length===0)return!1;try{var e=t.reduce(((n,r)=>{var s=r.type,i=r.value;return ut(s)&&s.length>0&&n.$exception_types.push(s),ut(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.Xd.some((n=>{var r=n.values.map((s=>{var i=h3[s.operator],a=e[s.key];if(!i||!a)return!1;var u=Ke(s.value)?s.value:[s.value];return u.length>0&&i(u,a)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}catch(n){return zs.warn("Failed to evaluate suppression rules. Capturing the exception.",n),!1}}uv(t){return t.flatMap((e=>{var n,r;return(n=(r=e.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((e=>{var n=e.filename;return!!n&&D9.some((r=>n.startsWith(r)))}))}hv(t){return t.some((e=>{var n=e.value;return ut(n)&&j9.some((r=>n.includes(r)))}))}dv(t){if(t.length>0){var e,n,r,s,i=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],a=i[i.length-1];return(r=a==null||(s=a.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}av(t){return!Qe(t)&&Ke(t)}}},U9=ue({productTours:class{get Ja(){return this._instance.persistence}constructor(t){this.fv=null,this.pv=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(t.ok){var e=t.config;if("productTours"in e){var n,r;if(this.Ja&&this.Ja.register({[Y2]:!!e.productTours}),!l1(this._instance))return!this.fv&&Qe((n=this.Ja)==null?void 0:n.props[Rd])||yp.info("product tours disabled; stopping and clearing cached tours"),(r=this.fv)==null||r.stop(),this.fv=null,void this.clearCache();this.loadIfEnabled()}}}loadIfEnabled(){!this.fv&&l1(this._instance)&&this.Es((()=>this.gv()))}Es(t){var e,n;(e=Re.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=Re.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?yp.error("Could not load product tours script",r):t()}))}gv(){var t;!this.fv&&(t=Re.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.fv=Re.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!Ke(this.pv)||e){var n=this.Ja;if(n){var r=n.props[Rd];if(Ke(r)&&!e)return this.pv=r,void t(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",timestampMode:"query",callback:s=>{if(l1(this._instance)){var i=s.statusCode;if(i!==200||!s.json){var a="Product Tours API could not be loaded, status: "+i;return i===0?s.error||yp.warn(a):yp.error(a),void t([],{isLoaded:!1,error:a})}var u=Ke(s.json.product_tours)?s.json.product_tours:[];this.pv=u,n&&n.register({[Rd]:u}),t(u,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.pv,{isLoaded:!0})}getActiveProductTours(t){Qe(this.fv)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.fv.getActiveProductTours(t)}showProductTour(t){var e;(e=this.fv)==null||e.showTourById(t)}previewTour(t){this.fv?this.fv.previewTour(t):this.Es((()=>{var e;this.gv(),(e=this.fv)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.fv)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.fv)==null||t.nextStep()}previousStep(){var t;(t=this.fv)==null||t.previousStep()}clearCache(){var t;this.pv=null,(t=this.Ja)==null||t.unregister(Rd)}resetTour(t){var e;(e=this.fv)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.fv)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.fv)==null||e.cancelPendingTour(t)}}},E0),B9={siteApps:class{constructor(t){this.mv=0,this._instance=t,this.yv=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}bv(t,e){if(e){var n=this.globalsForEvent(e);this.yv.push(n),this.yv.length>1e3&&(this.yv=this.yv.slice(10))}}get siteAppLoaders(){var t;return(t=Re._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}initialize(){if(this.isEnabled){var t=this._instance._addCaptureHook(this.bv.bind(this));this._v=()=>{t(),this.yv=[],this._v=void 0}}}globalsForEvent(t){var e,n,r,s,i,a,u;if(!t)throw new Error("Event payload is required");var c={},d=this._instance.get_property("$groups")||[],f=this._instance.get_property("$stored_group_properties")||{};for(var p of Object.entries(f)){var m=p[0];c[m]={id:d[m],type:m,properties:p[1]}}var _=t.$set_once,x=t.$set;return{event:ue({},M6(t,P9),{properties:ue({},t.properties,x?{$set:ue({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},x)}:{},_?{$set_once:ue({},(r=(s=t.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},_)}:{}),elements_chain:(i=(a=t.properties)==null?void 0:a.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(u=t.properties)==null?void 0:u.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}wv(t){var e,n=(e=t.tagName)==null?void 0:e.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(t)||(ui.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(t)||(ui.error("prepare_external_dependency_script returned null"),null):t}Sv(){var t,e,n,r,s,i,a,u;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var c=fe==null?void 0:fe.defaultView,d=c==null||(t=c.Node)==null?void 0:t.prototype;if(!c||!d)return()=>{};if(this.mv++,this.xv)return this.Cv();var f=[],p=this,m=new WeakSet,_=(w,b,C)=>{if(w!=null&&w[b]){var P=w[b];w[b]=C(P),f.push((()=>{w[b]=P}))}},x=w=>{if(m.has(w))return w;var b=p.wv(w);return b&&m.add(b),b},y=w=>w.map((b=>typeof b=="string"?b:x(b))).filter((b=>!Xn(b)));return _(d,"appendChild",(w=>function(b){var C=x(b);return C?w.call(this,C):b})),_(d,"insertBefore",(w=>function(b,C){var P=x(b);return P?w.call(this,P,C):b})),_(d,"replaceChild",(w=>function(b,C){var P=x(b);return P?w.call(this,P,C):C})),[(e=c.Element)==null?void 0:e.prototype,(n=c.Document)==null?void 0:n.prototype,(r=c.DocumentFragment)==null?void 0:r.prototype].forEach((w=>{_(w,"append",(b=>function(){for(var C=arguments.length,P=new Array(C),T=0;C>T;T++)P[T]=arguments[T];return b.apply(this,y(P))})),_(w,"prepend",(b=>function(){for(var C=arguments.length,P=new Array(C),T=0;C>T;T++)P[T]=arguments[T];return b.apply(this,y(P))}))})),[(s=c.Element)==null?void 0:s.prototype,(i=c.CharacterData)==null?void 0:i.prototype,(a=c.DocumentType)==null?void 0:a.prototype].forEach((w=>{_(w,"before",(b=>function(){for(var C=arguments.length,P=new Array(C),T=0;C>T;T++)P[T]=arguments[T];return b.apply(this,y(P))})),_(w,"after",(b=>function(){for(var C=arguments.length,P=new Array(C),T=0;C>T;T++)P[T]=arguments[T];return b.apply(this,y(P))})),_(w,"replaceWith",(b=>function(){for(var C=arguments.length,P=new Array(C),T=0;C>T;T++)P[T]=arguments[T];var A=y(P);return P.length&&!A.length?void 0:b.apply(this,A)}))})),_((u=c.Element)==null?void 0:u.prototype,"insertAdjacentElement",(w=>function(b,C){var P=x(C);return P?w.call(this,b,P):null})),this.xv=()=>{f.forEach((w=>w())),this.xv=void 0},this.Cv()}Cv(){var t=!1;return()=>{var e;t||(t=!0,this.mv--,this.mv===0&&((e=this.xv)==null||e.call(this)))}}Tv(t,e){e===void 0&&(e=!0);var n=this.Sv();try{var r=t(n);return e&&n(),r}catch(s){throw n(),s}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var a;!e.errored&&this.yv.length&&(ui.info("Processing "+this.yv.length+" events for site app with id "+t.id),this.yv.forEach((u=>this.Tv((()=>e.processEvent==null?void 0:e.processEvent(u))))),e.processedBuffer=!0),Object.values(this.apps).every((u=>u.processedBuffer||u.errored))&&((a=this._v)==null||a.call(this))},r=!1,s=a=>{e.errored=!a,e.loaded=!0,ui.info("Site app with id "+t.id+" "+(a?"loaded":"errored")),r&&n()};try{var i=this.Tv((a=>t.init({posthog:this._instance,callback(u){a(),s(u)}})),!1).processEvent;i&&(e.processEvent=i),r=!0}catch(a){ui.error(L4+t.id,a),s(!1)}if(r&&e.loaded)try{n()}catch(a){ui.error("Error while processing buffered events PostHog app with config id "+t.id,a),e.errored=!0}}Mv(){var t=this.siteAppLoaders||[];for(var e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}Ev(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),r=function(i){try{e.Tv((()=>i.processEvent==null?void 0:i.processEvent(n)))}catch(a){ui.error("Error while processing event "+t.event+" for site app "+i.id,a)}};for(var s of Object.values(this.apps))r(s)}}onRemoteConfig(t){var e,n,r,s=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Mv(),void this._instance.on("eventCaptured",(c=>this.Ev(c)))):void ui.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this._v)==null||n.call(this),t.ok){var i=t.config;if((r=i.siteApps)!=null&&r.length)if(this.isEnabled){var a=function(){var c,d=u.id,f=u.url;Re["__$$ph_site_app_"+d]=s._instance,(c=Re.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,f,(p=>{if(p)return ui.error(L4+d,p)}))};for(var u of i.siteApps)a()}else ui.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}},W9={tracingHeaders:class{constructor(t){this.Iv=void 0,this.Rv=void 0,this.Pv=void 0,this.zd=()=>{var e,n,r=this.Av();r?(de(this.Iv)&&(this.Iv=(e=Re.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),de(this.Rv)&&(this.Rv=(n=Re.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.Jd()},this._instance=t}initialize(){this.startIfEnabledOrStop()}Es(t){var e,n;(e=Re.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=Re.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return S9.error("failed to load script",r);t()}))}Fv(){var t,e;return(t=(e=this._instance.config.tracing_headers)!==null&&e!==void 0?e:this._instance.config.addTracingHeaders)!==null&&t!==void 0?t:this._instance.config.__add_tracing_headers}Av(){var t=this.Fv();return Ke(t)?(Ke(this.Pv)?this.Pv.splice(0,this.Pv.length,...t):this.Pv=[...t],t.length>0?this.Pv:void 0):(Ke(this.Pv)&&this.Pv.splice(0),this.Pv=t||void 0,this.Pv)}Jd(){var t,e;(t=this.Iv)==null||t.call(this),(e=this.Rv)==null||e.call(this),this.Iv=void 0,this.Rv=void 0}startIfEnabledOrStop(){this.Av()?this.Es(this.zd):this.Jd()}}},q9=ue({surveys:class extends T9{constructor(t){var e;super(new O9(t),{get projectToken(){return e.config.token},kv:new M9(e=t)}),this._instance=t}Wl(t,e){var n=e.query?jf(t,e.query):t;return new Promise((r=>{var s;this._instance._send_request({method:e.method,url:this._instance.requestRouter.endpointFor((s=e.target)!==null&&s!==void 0?s:"api",n),data:e.body,headers:e.headers,timeout:e.timeoutMs,fireCallbackOnDrop:!0,transport:e.transport,compression:e.compression,timestampMode:e.sentAt,callback:r})}))}}},E0),G9={toolbar:class{constructor(t){this.instance=t}Ov(t){Re.ph_toolbar_state=t}Lv(){var t;return(t=Re.ph_toolbar_state)!==null&&t!==void 0?t:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t,e,n){if(t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),e_(this.instance.config)||!ne||!fe)return!1;t=t??ne.location,n=n??ne.history;try{if(!e){try{ne.localStorage.setItem("test","test"),ne.localStorage.removeItem("test")}catch{return!1}e=ne==null?void 0:ne.localStorage}var r,s=L9||Fm(t.hash,"__posthog")||Fm(t.hash,"state"),i=s?ZE((()=>JSON.parse(atob(decodeURIComponent(s)))))||ZE((()=>JSON.parse(decodeURIComponent(s)))):null;return i&&i.action==="ph_authorize"?((r=i).source="url",r&&Object.keys(r).length>0&&(i.desiredHash?t.hash=i.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((r=JSON.parse(e.getItem(D4)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Dv(t){var e=Re.ph_load_toolbar||Re.ph_load_editor;!Qe(e)&&ar(e)?e(t,this.instance):j4.warn("No toolbar load function found")}loadToolbar(t){var e=!(fe==null||!fe.getElementById(IP));if(!ne||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=ue({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(ne.localStorage.setItem(D4,JSON.stringify(ue({},r,{source:void 0}))),this.Lv()===2)this.Dv(r);else if(this.Lv()===0){var s;this.Ov(1),(s=Re.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return j4.error("[Toolbar] Failed to load",i),void this.Ov(0);this.Ov(2),this.Dv(r)})),At(ne,"turbolinks:load",(()=>{this.Ov(0),this.loadToolbar(r)}))}return!0}$v(t){return this.loadToolbar(t)}maybeLoadEditor(t,e,n){return t===void 0&&(t=void 0),e===void 0&&(e=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,e,n)}}},K9=ue({experiments:ir},E0),Z9={conversations:class{constructor(t){this.Nv=void 0,this._conversationsManager=null,this.qv=!1,this.Me=null,this.jv=!1,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations&&(this.Bv=t.ok,t.ok)){var e=t.config.conversations;Qe(e)||(xr(e)?this.Nv=e:(this.Nv=e.enabled,this.Me=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Nv=void 0,this.Me=null,this.Bv=void 0,this.jv=!1}loadIfEnabled(){if(!(this._conversationsManager||this.qv||this._instance.config.disable_conversations||e_(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Re==null?void 0:Re.__PosthogExtensions__;if(t&&!de(this.Nv)&&this.Nv)if(this.Me&&this.Me.token){this.qv=!0;try{var e=t.initConversations;if(e)return this.Hv(e),void(this.qv=!1);var n=t.loadExternalDependency;if(!n)return void this.Uv(Q2);n(this._instance,"conversations",(r=>{r||!t.initConversations?this.Uv("Could not load conversations script",r):this.Hv(t.initConversations),this.qv=!1}))}catch(r){this.Uv("Error initializing conversations",r),this.qv=!1}}else Es.error("Conversations enabled but missing token in remote config.")}}Hv(t){if(this.Me)try{this._conversationsManager=t(this.Me,this._instance),this.jv=!1,Es.info("Conversations loaded successfully")}catch(e){this.Uv("Error completing conversations initialization",e)}else Es.error("Cannot complete initialization: remote config is null")}Uv(t,e){Es.error(t,e),this._conversationsManager=null,this.qv=!1,this.jv=!0}show(){this._conversationsManager?this._conversationsManager.show():Es.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Nv===!0&&!Xn(this._conversationsManager)}getUnavailableReason(){return this.isAvailable()?null:this._instance.config.disable_conversations?"disabled_by_config":e_(this._instance.config)?"disabled_for_toolbar":this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut()?"consent_opted_out":this.Bv===!1?"remote_config_failed":de(this.Nv)?this.Bv?"disabled_in_project":"remote_config_pending":this.Nv?Qe(this.Me)||!this.Me.token?"missing_token":Re!=null&&Re.__PosthogExtensions__?this.qv?"initializing":this.jv?"load_failed":"not_loaded":"extensions_unavailable":"disabled_in_project"}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var r=this;return Tt((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(t,e,n):(Es.warn(qa),null)}))()}getMessages(t,e){var n=this;return Tt((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(Es.warn(qa),null)}))()}markAsRead(t){var e=this;return Tt((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(Es.warn(qa),null)}))()}getTickets(t){var e=this;return Tt((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(Es.warn(qa),null)}))()}requestRestoreLink(t){var e=this;return Tt((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(Es.warn(qa),null)}))()}restoreFromToken(t){var e=this;return Tt((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(Es.warn(qa),null)}))()}restoreFromUrlToken(){var t=this;return Tt((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(Es.warn(qa),null)}))()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}Il(){var t;(t=this._conversationsManager)==null||t.setIdentity()}Rl(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},Y9={logs:class{constructor(t){var e,n=this;this.name="logs",this.zv=!1,this.Wv=!1,this.Vv=!1,this.I=jt("[logs]"),this.Gv=ue({},this.I,{error(){for(var r=arguments.length,s=new Array(r),i=0;r>i;i++)s[i]=arguments[i];s.some(q4)||n.I.error(...s)}}),this.Ea=[],this.Zv=[],this.kh=0,this.us=!1,this.Qv=[],this.Jv=[],this.Kv=!1,this.Yv=!1,this.Xv=()=>{var r,s;this.us||(this.kh=0,(r=this.tc)==null||r.onReconnect(),(s=this.ec)==null||s.onReconnect())},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.zv=!0),ne&&At(ne,"online",this.Xv)}ic(t,e,n,r){var s,i=B4((s=this._instance)==null||(s=s.config)==null?void 0:s.logs,n);return[new HN(this.rc(t,e),i,this.Gv,(()=>this.nc()),(a=>a()),void 0,r),i]}sc(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.tc||this.ac!==e){var n;(n=this.tc)==null||n.reset(),this.ac=e;var r=this.ic((()=>this.Ea),(s=>{this.Ea=s}));this.tc=r[0],this.oc=r[1]}return this.tc}lc(){var t,e=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;if(!this.ec||this.uc!==e){var n;(n=this.ec)==null||n.reset(),this.uc=e;var r=this.ic((()=>this.Zv),(s=>{this.Zv=s}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},W4);this.ec=r[0],this.hc=r[1]}return this.ec}setup(t){var e;if(!this.us){this.cs=t,(e=this._instance)!=null&&(e=e.config)!=null&&(e=e.logs)!=null&&e.captureConsoleLogs&&(this.zv=!0),(this.zv||this.dc()&&this.vc())&&this.cc();var n=!1,r=t.onRemoteConfig((s=>{var i;n=s.ok&&((i=s.config.logs)==null?void 0:i.captureConsoleLogs)===!0,this.onRemoteConfig(s)}));this.us?r.dispose():(this.fs=r,n||this.loadIfEnabled())}}dispose(){var t,e,n,r;this.us||(this.us=!0,this.fc(),(t=this.fs)==null||t.dispose(),this.fs=void 0,this.cs=void 0,this.Vv=!1,ne==null||ne.removeEventListener("online",this.Xv),(e=this.gc)==null||e.call(this),this.gc=void 0,(n=this.tc)==null||n.reset(),(r=this.ec)==null||r.reset())}onRemoteConfig(t){var e,n;if(!this.us){var r=t.ok?(e=t.config.logs)==null?void 0:e.captureConsoleLogs:void 0;Qe(r)?this.mc():((n=this._instance)==null||(n=n.persistence)==null||n.register({[By]:!!r}),r?(this.zv=!0,this.Wv||this.cc(),this.loadIfEnabled()):this.mc())}}reset(){var t,e,n,r;this.fc(),(t=this.tc)==null||t.clearQueue(),this.Ea=[],(e=this.tc)==null||e.reset(),(n=this.ec)==null||n.clearQueue(),this.Zv=[],(r=this.ec)==null||r.reset(),this.kh=0}captureLog(t){this.us||this.sc().captureLog(t)}captureConsoleLog(t){this.us||this.lc().captureLog(t)}captureBufferedConsoleLog(t,e,n){this.us||this.lc().captureLog(t,{context:e,occurredAtMs:n})}vc(){var t;return!((t=this._instance)==null||(t=t.persistence)==null||(t=t.props)==null||!t[By])}dc(){var t,e;return(t=this._instance)==null||t.xa==null||!t.xa()||!((e=Re._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null||!e.config)}Al(){var t;this.fc(),(t=this.ec)==null||t.clearQueue(),this.Zv=[]}mc(){this.zv||this.fc()}cc(){var t,e=this;if(!this.Kv&&Re!=null&&Re.console){var n=B4((t=this._instance)==null||(t=t.config)==null?void 0:t.logs).maxBufferSize,r=function(i){var a;try{a=(u=>{for(;(c=u)!=null&&c.__rrweb_original__;){var c;u=u.__rrweb_original__}return u})(Re.console[i])}catch{return 0}if(!a)return 0;e.Jv.push(x3(Re.console,i,(u=>{var c=function(){for(var d=arguments.length,f=new Array(d),p=0;d>p;p++)f[p]=arguments[p];try{e.yc(i,f,n)}catch{}return u.apply(Re.console,f)};return c.__rrweb_original__=a,c})))};for(var s of V9)r(s);this.Kv=!0,this.bc=setTimeout((()=>{this.fc()}),3e4)}}yc(t,e,n){var r;if(this.Kv&&!this.Yv&&e.length!==0)if((r=this._instance)!=null&&r.is_capturing()){if(n>this.Qv.length){this.Yv=!0;try{this.Qv.push({level:t,args:e,occurredAtMs:Date.now(),context:this.nc()})}finally{this.Yv=!1}}}else this.fc()}fc(){if(this.Qv=[],this.Kv){for(var t of(this.Kv=!1,this.bc&&(clearTimeout(this.bc),this.bc=void 0),this.Jv))t();this.Jv=[]}}_c(){var t=this.Qv;return this.fc(),t}get logger(){return this.wc||(this.wc={trace:(t,e)=>this.captureLog({body:t,level:"trace",attributes:e}),debug:(t,e)=>this.captureLog({body:t,level:"debug",attributes:e}),info:(t,e)=>this.captureLog({body:t,level:"info",attributes:e}),warn:(t,e)=>this.captureLog({body:t,level:"warn",attributes:e}),error:(t,e)=>this.captureLog({body:t,level:"error",attributes:e}),fatal:(t,e)=>this.captureLog({body:t,level:"fatal",attributes:e})}),this.wc}flushLogs(t){t?this.kc(t):(this.tc&&this.tc.flush().catch((e=>this.Sc(e))),this.ec&&this.ec.flush().catch((e=>this.Sc(e))))}Sc(t){q4(t)||this.I.error("PostHog logs flush failed:",t)}loadIfEnabled(){if(!this.us&&this.zv&&!this.Wv&&!this.Vv){var t=Re==null?void 0:Re.__PosthogExtensions__;if(!t)return this.I.error("PostHog Extensions not found."),void this.fc();var e=t.loadExternalDependency;if(!e)return this.I.error(Q2),void this.fc();this.Vv=!0;try{e(this._instance,"logs",(n=>{if(this.Vv=!1,!this.us&&this.zv){var r=t.logs;if(n||r==null||!r.initializeLogs)this.I.error("Could not load logs script",n),this.fc();else{var s,i,a=this._c();this.gc=r.initializeLogs((s=this.cs)!==null&&s!==void 0?s:this._instance),this.Wv=!0,a.length>0&&(r.replayConsoleBuffer==null||r.replayConsoleBuffer((i=this.cs)!==null&&i!==void 0?i:this._instance,a))}}}))}catch(n){throw this.Vv=!1,n}}}rc(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===vi.LogsQueue?t():void 0,setPersistedProperty(r,s){var i;r===vi.LogsQueue&&e((i=s)!==null&&i!==void 0?i:[])},Ln:r=>this.Ln(r),getLibraryId:()=>Pt.LIB_NAME,getLibraryVersion:()=>Pt.LIB_VERSION}}Ln(t){return new Promise((e=>{if(UP(this.kh,3))e({kind:"fatal",error:c1(void 0,"logs endpoint is unreachable, dropping batch")});else{var n=!1,r=i=>{n||(n=!0,clearTimeout(s),e(i))},s=setTimeout((()=>{this.I.warn("Logs request timed out before receiving a response"),r({kind:"retry-later",error:c1(void 0,"logs request timed out")})}),9e4);this._instance._send_request({method:"POST",url:this.xc(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:i=>{var a=i.statusCode;if(this.Cc(a),a>=200&&300>a)r({kind:"ok"});else if(a===413)r({kind:"too-large"});else if(a!==0&&a!==408&&a!==429&&500>a)r({kind:"fatal",error:new Error("logs request failed with status "+a)});else{var u;a===0?(i.error||this.I.warn("Logs request failed before receiving an HTTP response"),r({kind:"retry-later",error:c1(i.error,"logs request failed before receiving an HTTP response")})):r({kind:"retry-later",error:(u=i.error)!==null&&u!==void 0?u:new Error("logs request failed with status "+a)})}}})}}))}Cc(t){(t!==0||this._instance.__loaded)&&(this.kh=BP(t,this.kh,3,(()=>this.I.warn("Log requests are failing before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped sending logs; will try again when connectivity changes."))))}kc(t){this.Ea.length>0&&this.Tc(t,this.Ea,this.oc,Pt.LIB_NAME,(e=>{this.Ea=e})),this.Zv.length>0&&this.Tc(t,this.Zv,this.hc,W4,(e=>{this.Zv=e}))}Tc(t,e,n,r,s){if(e.length!==0){var i=e.map((u=>u.record));s([]);var a=fP(i,dP(n,Pt.LIB_NAME,Pt.LIB_VERSION),r,Pt.LIB_VERSION);this._instance._send_request({method:"POST",url:this.xc(),data:a,compression:"best-available",batchKey:"logs",transport:t})}}xc(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}nc(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0),r=n.windowId,s=n.sessionStartTimestamp,i=n.lastActivityTimestamp;e.sessionId=n.sessionId,e.windowId=r,Qe(s)||(e.sessionStartTimestamp=s),Qe(i)||(e.lastActivityTimestamp=i)}if(Re!=null&&(t=Re.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?ca(Re.location.href):Re.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(e.activeFeatureFlags=a)}return e}}},X9={metrics:class{constructor(t){this.I=jt("[metrics]"),this._instance=t}initialize(){}sc(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.metrics;return this.tc&&this.ac===n||((e=this.tc)==null||e.reset(),this.ac=n,this.tc=new UN(this.rc(),(function(r){var s,i,a,u,c,d=r==null?void 0:r.resourceAttributes;return{serviceName:(s=d==null?void 0:d["service.name"])!==null&&s!==void 0?s:r==null?void 0:r.serviceName,serviceVersion:(i=d==null?void 0:d["service.version"])!==null&&i!==void 0?i:r==null?void 0:r.serviceVersion,environment:(a=d==null?void 0:d["deployment.environment"])!==null&&a!==void 0?a:r==null?void 0:r.environment,resourceAttributes:d,beforeSend:r==null?void 0:r.beforeSend,flushIntervalMs:(u=r==null?void 0:r.flushIntervalMs)!==null&&u!==void 0?u:1e4,maxSeriesPerFlush:(c=r==null?void 0:r.maxSeriesPerFlush)!==null&&c!==void 0?c:1e3}})(n),this.I)),this.tc}count(t,e,n){e===void 0&&(e=1),this.sc().count(t,e,n)}gauge(t,e,n){this.sc().gauge(t,e,n)}histogram(t,e,n){this.sc().histogram(t,e,n)}flush(t){if(!this.tc)return Promise.resolve();if(t){var e=this.tc.drainWindow();return e&&this.Kn(e,t),Promise.resolve()}return this.tc.flush().catch((n=>this.I.error("PostHog metrics flush failed:",n)))}reset(){var t;(t=this.tc)==null||t.reset()}rc(){var t=this._instance,e=this;return{get isDisabled(){return!1},get optedOut(){return!t.is_capturing()},Kn:n=>e.Kn(n),getLibraryId:()=>Pt.LIB_NAME,getLibraryVersion:()=>Pt.LIB_VERSION}}Kn(t,e){return new Promise((n=>{var r=!1,s=a=>{r||(r=!0,clearTimeout(i),n(a))},i=setTimeout((()=>s({kind:"retry-later",error:new Error("metrics request timed out")})),9e4);this._instance._send_request(ue({method:"POST",url:this.Mc(),data:t,compression:"best-available",batchKey:"metrics"},e&&{transport:e},{fireCallbackOnDrop:!0,callback(a){var u=a.statusCode;if(u>=200&&300>u)s({kind:"ok"});else if(u===413)s({kind:"too-large"});else if(u!==0&&u!==408&&u!==429&&500>u)s({kind:"fatal",error:new Error("metrics request failed with status "+u)});else{var c;s({kind:"retry-later",error:(c=a.error)!==null&&c!==void 0?c:new Error("metrics request failed with status "+u)})}}}))}))}Mc(){return this._instance.requestRouter.endpointFor("api","/i/v1/metrics")+"?token="+encodeURIComponent(this._instance.config.token)}}},Q9=ue({},E0,$9,z9,H9,U9,B9,q9,W9,G9,K9,Z9,Y9,X9);ts.__defaultExtensionClasses=ue({},Q9);var Ee=(function(){Pt.SDK_DIST_CHANNEL="npm";var t=$d[bu]=new ts;return(function(){function e(){e.done||(e.done=!0,y3=!1,_t($d,(function(n){n._dom_loaded()})))}fe!=null&&fe.addEventListener?fe.readyState==="complete"?e():At(fe,"DOMContentLoaded",e,{capture:!1}):ne&&ge.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})(),S3;function J9(t){S3=t}function f_(){return S3}var ix=v.createContext({get client(){return f_()},bootstrap:void 0});function E3(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),s=Object.keys(e);if(r.length!==s.length)return!1;for(var i=0,a=r;i<a.length;i++){var u=a[i];if(!s.includes(u)||!E3(t[u],e[u],n))return!1}return!0}function e7(t){var e,n,r=t.children,s=t.client,i=t.apiKey,a=t.options,u=v.useRef(null),c=v.useMemo(function(){if(s)return i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),s;var d=f_();return i||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."),d},[s,i,JSON.stringify(a)]);return v.useEffect(function(){if(!(s||!i)){var d=f_(),f=u.current;f?(i!==f.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."),a&&!E3(a,f.options)&&d.set_config(a),u.current={apiKey:i,options:a??{}}):(d.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),d.init(i,a),u.current={apiKey:i,options:a??{}})}},[s,i,JSON.stringify(a)]),we.createElement(ix.Provider,{value:{client:c,bootstrap:(e=a==null?void 0:a.bootstrap)!==null&&e!==void 0?e:(n=s==null?void 0:s.config)===null||n===void 0?void 0:n.bootstrap}},r)}var d1=function(t){return typeof t=="function"},t7=function(t){return t===void 0},Ff=function(){var t=v.useContext(ix).client;return t},h_=function(t,e){return h_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])},h_(t,e)};function n7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");h_(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Zp=function(t){var e=Object.prototype.toString.call(t);return t instanceof Error||e==="[object Error]"||e==="[object Exception]"||e==="[object DOMException]"||e==="[object DOMError]"},r7=function(t,e){for(var n=new WeakSet,r=t;!n.has(r);){if(n.add(r),!Zp(r.cause)){t7(r.cause)||(e.cause=r.cause),r.cause=e;return}r=r.cause}},s7=function(t,e){if(!e)return t;var n=new Error(Zp(t)?t.message:"Primitive value captured as exception: ".concat(String(t)));return n.name="React ErrorBoundary ".concat(Zp(t)?t.name:"Error"),n.stack=e,Zp(t)?(r7(t,n),t):n},i7={componentStack:null,exceptionEvent:null,error:null},o7={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."},a7=(function(t){n7(e,t);function e(n){var r=t.call(this,n)||this;return r.state=i7,r}return e.prototype.componentDidCatch=function(n,r){var s=this.props.additionalProperties,i;d1(s)?i=s(n,r):typeof s=="object"&&(i=s);var a=this.context.client,u=r.componentStack,c=a.captureException(s7(n,u),i);this.setState({error:n,componentStack:u??null,exceptionEvent:c})},e.prototype.render=function(){var n=this.props,r=n.children,s=n.fallback,i=this.state;if(i.componentStack==null)return d1(r)?r():r;var a=d1(s)?we.createElement(s,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):s;return we.isValidElement(a)?a:(console.warn(o7.INVALID_FALLBACK),we.createElement(we.Fragment,null))},e.contextType=ix,e})(we.Component);J9(Ee);var _p={},f1={exports:{}},Nr={},h1={exports:{}},p1={};/**
|
|
20
|
-
* @license React
|
|
21
|
-
* scheduler.production.min.js
|
|
22
|
-
*
|
|
23
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
-
*
|
|
25
|
-
* This source code is licensed under the MIT license found in the
|
|
26
|
-
* LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var G4;function l7(){return G4||(G4=1,(function(t){function e(z,X){var H=z.length;z.push(X);e:for(;0<H;){var D=H-1>>>1,Y=z[D];if(0<s(Y,X))z[D]=X,z[H]=Y,H=D;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var X=z[0],H=z.pop();if(H!==X){z[0]=H;e:for(var D=0,Y=z.length,oe=Y>>>1;D<oe;){var J=2*(D+1)-1,se=z[J],pe=J+1,Se=z[pe];if(0>s(se,H))pe<Y&&0>s(Se,se)?(z[D]=Se,z[pe]=H,D=pe):(z[D]=se,z[J]=H,D=J);else if(pe<Y&&0>s(Se,H))z[D]=Se,z[pe]=H,D=pe;else break e}}return X}function s(z,X){var H=z.sortIndex-X.sortIndex;return H!==0?H:z.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],d=[],f=1,p=null,m=3,_=!1,x=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(z){for(var X=n(d);X!==null;){if(X.callback===null)r(d);else if(X.startTime<=z)r(d),X.sortIndex=X.expirationTime,e(c,X);else break;X=n(d)}}function T(z){if(y=!1,P(z),!x)if(n(c)!==null)x=!0,W(A);else{var X=n(d);X!==null&&q(T,X.startTime-z)}}function A(z,X){x=!1,y&&(y=!1,b(I),I=-1),_=!0;var H=m;try{for(P(X),p=n(c);p!==null&&(!(p.expirationTime>X)||z&&!j());){var D=p.callback;if(typeof D=="function"){p.callback=null,m=p.priorityLevel;var Y=D(p.expirationTime<=X);X=t.unstable_now(),typeof Y=="function"?p.callback=Y:p===n(c)&&r(c),P(X)}else r(c);p=n(c)}if(p!==null)var oe=!0;else{var J=n(d);J!==null&&q(T,J.startTime-X),oe=!1}return oe}finally{p=null,m=H,_=!1}}var R=!1,L=null,I=-1,O=5,N=-1;function j(){return!(t.unstable_now()-N<O)}function F(){if(L!==null){var z=t.unstable_now();N=z;var X=!0;try{X=L(!0,z)}finally{X?G():(R=!1,L=null)}}else R=!1}var G;if(typeof C=="function")G=function(){C(F)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,Z=Q.port2;Q.port1.onmessage=F,G=function(){Z.postMessage(null)}}else G=function(){w(F,0)};function W(z){L=z,R||(R=!0,G())}function q(z,X){I=w(function(){z(t.unstable_now())},X)}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(z){z.callback=null},t.unstable_continueExecution=function(){x||_||(x=!0,W(A))},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(z){switch(m){case 1:case 2:case 3:var X=3;break;default:X=m}var H=m;m=X;try{return z()}finally{m=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(z,X){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var H=m;m=z;try{return X()}finally{m=H}},t.unstable_scheduleCallback=function(z,X,H){var D=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?D+H:D):H=D,z){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=H+Y,z={id:f++,callback:X,priorityLevel:z,startTime:H,expirationTime:Y,sortIndex:-1},H>D?(z.sortIndex=H,e(d,z),n(c)===null&&z===n(d)&&(y?(b(I),I=-1):y=!0,q(T,H-D))):(z.sortIndex=Y,e(c,z),x||_||(x=!0,W(A))),z},t.unstable_shouldYield=j,t.unstable_wrapCallback=function(z){var X=m;return function(){var H=m;m=X;try{return z.apply(this,arguments)}finally{m=H}}}})(p1)),p1}var K4;function u7(){return K4||(K4=1,h1.exports=l7()),h1.exports}/**
|
|
28
|
-
* @license React
|
|
29
|
-
* react-dom.production.min.js
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var Z4;function c7(){if(Z4)return Nr;Z4=1;var t=N2(),e=u7();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,h=1;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function i(o,l){a(o,l),a(o+"Capture",l)}function a(o,l){for(s[o]=l,o=0;o<l.length;o++)r.add(l[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function m(o){return c.call(p,o)?!0:c.call(f,o)?!1:d.test(o)?p[o]=!0:(f[o]=!0,!1)}function _(o,l,h,g){if(h!==null&&h.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return g?!1:h!==null?!h.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function x(o,l,h,g){if(l===null||typeof l>"u"||_(o,l,h,g))return!0;if(g)return!1;if(h!==null)switch(h.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function y(o,l,h,g,S,k,M){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=g,this.attributeNamespace=S,this.mustUseProperty=h,this.propertyName=o,this.type=l,this.sanitizeURL=k,this.removeEmptyString=M}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){w[o]=new y(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];w[l]=new y(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){w[o]=new y(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){w[o]=new y(o,2,!1,o,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(o){w[o]=new y(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){w[o]=new y(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){w[o]=new y(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){w[o]=new y(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){w[o]=new y(o,5,!1,o.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function C(o){return o[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(o){var l=o.replace(b,C);w[l]=new y(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(b,C);w[l]=new y(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(b,C);w[l]=new y(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!0,!0)});function P(o,l,h,g){var S=w.hasOwnProperty(l)?w[l]:null;(S!==null?S.type!==0:g||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(x(l,h,S,g)&&(h=null),g||S===null?m(l)&&(h===null?o.removeAttribute(l):o.setAttribute(l,""+h)):S.mustUseProperty?o[S.propertyName]=h===null?S.type===3?!1:"":h:(l=S.attributeName,g=S.attributeNamespace,h===null?o.removeAttribute(l):(S=S.type,h=S===3||S===4&&h===!0?"":""+h,g?o.setAttributeNS(g,l,h):o.setAttribute(l,h))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),R=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),j=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),z=Symbol.iterator;function X(o){return o===null||typeof o!="object"?null:(o=z&&o[z]||o["@@iterator"],typeof o=="function"?o:null)}var H=Object.assign,D;function Y(o){if(D===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);D=l&&l[1]||""}return`
|
|
36
|
-
`+D+o}var oe=!1;function J(o,l){if(!o||oe)return"";oe=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(re){var g=re}Reflect.construct(o,[],l)}else{try{l.call()}catch(re){g=re}o.call(l.prototype)}else{try{throw Error()}catch(re){g=re}o()}}catch(re){if(re&&g&&typeof re.stack=="string"){for(var S=re.stack.split(`
|
|
37
|
-
`),k=g.stack.split(`
|
|
38
|
-
`),M=S.length-1,$=k.length-1;1<=M&&0<=$&&S[M]!==k[$];)$--;for(;1<=M&&0<=$;M--,$--)if(S[M]!==k[$]){if(M!==1||$!==1)do if(M--,$--,0>$||S[M]!==k[$]){var B=`
|
|
39
|
-
`+S[M].replace(" at new "," at ");return o.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",o.displayName)),B}while(1<=M&&0<=$);break}}}finally{oe=!1,Error.prepareStackTrace=h}return(o=o?o.displayName||o.name:"")?Y(o):""}function se(o){switch(o.tag){case 5:return Y(o.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return o=J(o.type,!1),o;case 11:return o=J(o.type.render,!1),o;case 1:return o=J(o.type,!0),o;default:return""}}function pe(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case L:return"Fragment";case R:return"Portal";case O:return"Profiler";case I:return"StrictMode";case G:return"Suspense";case Q:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case j:return(o.displayName||"Context")+".Consumer";case N:return(o._context.displayName||"Context")+".Provider";case F:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case Z:return l=o.displayName||null,l!==null?l:pe(o.type)||"Memo";case W:l=o._payload,o=o._init;try{return pe(o(l))}catch{}}return null}function Se(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(l);case 8:return l===I?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ce(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ae(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function $e(o){var l=ae(o)?"checked":"value",h=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),g=""+o[l];if(!o.hasOwnProperty(l)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var S=h.get,k=h.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return S.call(this)},set:function(M){g=""+M,k.call(this,M)}}),Object.defineProperty(o,l,{enumerable:h.enumerable}),{getValue:function(){return g},setValue:function(M){g=""+M},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function We(o){o._valueTracker||(o._valueTracker=$e(o))}function ze(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var h=l.getValue(),g="";return o&&(g=ae(o)?o.checked?"true":"false":o.value),o=g,o!==h?(l.setValue(o),!0):!1}function Fe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function ct(o,l){var h=l.checked;return H({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??o._wrapperState.initialChecked})}function Kt(o,l){var h=l.defaultValue==null?"":l.defaultValue,g=l.checked!=null?l.checked:l.defaultChecked;h=ce(l.value!=null?l.value:h),o._wrapperState={initialChecked:g,initialValue:h,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function rt(o,l){l=l.checked,l!=null&&P(o,"checked",l,!1)}function Ve(o,l){rt(o,l);var h=ce(l.value),g=l.type;if(h!=null)g==="number"?(h===0&&o.value===""||o.value!=h)&&(o.value=""+h):o.value!==""+h&&(o.value=""+h);else if(g==="submit"||g==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Je(o,l.type,h):l.hasOwnProperty("defaultValue")&&Je(o,l.type,ce(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function Ne(o,l,h){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var g=l.type;if(!(g!=="submit"&&g!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,h||l===o.value||(o.value=l),o.defaultValue=l}h=o.name,h!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,h!==""&&(o.name=h)}function Je(o,l,h){(l!=="number"||Fe(o.ownerDocument)!==o)&&(h==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+h&&(o.defaultValue=""+h))}var Ct=Array.isArray;function vt(o,l,h,g){if(o=o.options,l){l={};for(var S=0;S<h.length;S++)l["$"+h[S]]=!0;for(h=0;h<o.length;h++)S=l.hasOwnProperty("$"+o[h].value),o[h].selected!==S&&(o[h].selected=S),S&&g&&(o[h].defaultSelected=!0)}else{for(h=""+ce(h),l=null,S=0;S<o.length;S++){if(o[S].value===h){o[S].selected=!0,g&&(o[S].defaultSelected=!0);return}l!==null||o[S].disabled||(l=o[S])}l!==null&&(l.selected=!0)}}function xe(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return H({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function on(o,l){var h=l.value;if(h==null){if(h=l.children,l=l.defaultValue,h!=null){if(l!=null)throw Error(n(92));if(Ct(h)){if(1<h.length)throw Error(n(93));h=h[0]}l=h}l==null&&(l=""),h=l}o._wrapperState={initialValue:ce(h)}}function Lt(o,l){var h=ce(l.value),g=ce(l.defaultValue);h!=null&&(h=""+h,h!==o.value&&(o.value=h),l.defaultValue==null&&o.defaultValue!==h&&(o.defaultValue=h)),g!=null&&(o.defaultValue=""+g)}function Kr(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function Pa(o){switch(o){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 an(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?Pa(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var wn,Ta=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,h,g,S){MSApp.execUnsafeLocalFunction(function(){return o(l,h,g,S)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(wn=wn||document.createElement("div"),wn.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=wn.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function fr(o,l){if(l){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=l;return}}o.textContent=l}var ln={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},Eo=["Webkit","ms","Moz","O"];Object.keys(ln).forEach(function(o){Eo.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),ln[l]=ln[o]})});function Un(o,l,h){return l==null||typeof l=="boolean"||l===""?"":h||typeof l!="number"||l===0||ln.hasOwnProperty(o)&&ln[o]?(""+l).trim():l+"px"}function ti(o,l){o=o.style;for(var h in l)if(l.hasOwnProperty(h)){var g=h.indexOf("--")===0,S=Un(h,l[h],g);h==="float"&&(h="cssFloat"),g?o.setProperty(h,S):o[h]=S}}var hs=H({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 ps(o,l){if(l){if(hs[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Co(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 er=null;function Ln(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ls=null,bn=null,Cr=null;function ji(o){if(o=Qc(o)){if(typeof Ls!="function")throw Error(n(280));var l=o.stateNode;l&&(l=xh(l),Ls(o.stateNode,o.type,l))}}function ni(o){bn?Cr?Cr.push(o):Cr=[o]:bn=o}function ms(){if(bn){var o=bn,l=Cr;if(Cr=bn=null,ji(o),l)for(o=0;o<l.length;o++)ji(l[o])}}function Ge(o,l){return o(l)}function Nt(){}var Zt=!1;function mn(o,l,h){if(Zt)return o(l,h);Zt=!0;try{return Ge(o,l,h)}finally{Zt=!1,(bn!==null||Cr!==null)&&(Nt(),ms())}}function hr(o,l){var h=o.stateNode;if(h===null)return null;var g=xh(h);if(g===null)return null;h=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(n(231,l,typeof h));return h}var Ft=!1;if(u)try{var un={};Object.defineProperty(un,"passive",{get:function(){Ft=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{Ft=!1}function kr(o,l,h,g,S,k,M,$,B){var re=Array.prototype.slice.call(arguments,3);try{l.apply(h,re)}catch(ve){this.onError(ve)}}var Pr=!1,Bn=null,ri=!1,Pc=null,Tc={onError:function(o){Pr=!0,Bn=o}};function Ac(o,l,h,g,S,k,M,$,B){Pr=!1,Bn=null,kr.apply(Tc,arguments)}function Xf(o,l,h,g,S,k,M,$,B){if(Ac.apply(this,arguments),Pr){if(Pr){var re=Bn;Pr=!1,Bn=null}else throw Error(n(198));ri||(ri=!0,Pc=re)}}function Fi(o){var l=o,h=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(h=l.return),o=l.return;while(o)}return l.tag===3?h:null}function Qf(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function Ic(o){if(Fi(o)!==o)throw Error(n(188))}function Q0(o){var l=o.alternate;if(!l){if(l=Fi(o),l===null)throw Error(n(188));return l!==o?null:o}for(var h=o,g=l;;){var S=h.return;if(S===null)break;var k=S.alternate;if(k===null){if(g=S.return,g!==null){h=g;continue}break}if(S.child===k.child){for(k=S.child;k;){if(k===h)return Ic(S),o;if(k===g)return Ic(S),l;k=k.sibling}throw Error(n(188))}if(h.return!==g.return)h=S,g=k;else{for(var M=!1,$=S.child;$;){if($===h){M=!0,h=S,g=k;break}if($===g){M=!0,g=S,h=k;break}$=$.sibling}if(!M){for($=k.child;$;){if($===h){M=!0,h=k,g=S;break}if($===g){M=!0,g=k,h=S;break}$=$.sibling}if(!M)throw Error(n(189))}}if(h.alternate!==g)throw Error(n(190))}if(h.tag!==3)throw Error(n(188));return h.stateNode.current===h?o:l}function Jf(o){return o=Q0(o),o!==null?jl(o):null}function jl(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=jl(o);if(l!==null)return l;o=o.sibling}return null}var eh=e.unstable_scheduleCallback,th=e.unstable_cancelCallback,J0=e.unstable_shouldYield,ev=e.unstable_requestPaint,Yt=e.unstable_now,Rc=e.unstable_getCurrentPriorityLevel,Mc=e.unstable_ImmediatePriority,nh=e.unstable_UserBlockingPriority,Fl=e.unstable_NormalPriority,Oc=e.unstable_LowPriority,Vl=e.unstable_IdlePriority,Aa=null,vs=null;function Xw(o){if(vs&&typeof vs.onCommitFiberRoot=="function")try{vs.onCommitFiberRoot(Aa,o,void 0,(o.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:tv,rh=Math.log,Lc=Math.LN2;function tv(o){return o>>>=0,o===0?32:31-(rh(o)/Lc|0)|0}var $l=64,Ia=4194304;function si(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function ko(o,l){var h=o.pendingLanes;if(h===0)return 0;var g=0,S=o.suspendedLanes,k=o.pingedLanes,M=h&268435455;if(M!==0){var $=M&~S;$!==0?g=si($):(k&=M,k!==0&&(g=si(k)))}else M=h&~S,M!==0?g=si(M):k!==0&&(g=si(k));if(g===0)return 0;if(l!==0&&l!==g&&(l&S)===0&&(S=g&-g,k=l&-l,S>=k||S===16&&(k&4194240)!==0))return l;if((g&4)!==0&&(g|=h&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=g;0<l;)h=31-Nn(l),S=1<<h,g|=o[h],l&=~S;return g}function sh(o,l){switch(o){case 1:case 2:case 4:return l+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 l+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 ih(o,l){for(var h=o.suspendedLanes,g=o.pingedLanes,S=o.expirationTimes,k=o.pendingLanes;0<k;){var M=31-Nn(k),$=1<<M,B=S[M];B===-1?(($&h)===0||($&g)!==0)&&(S[M]=sh($,l)):B<=l&&(o.expiredLanes|=$),k&=~$}}function zl(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Nc(){var o=$l;return $l<<=1,($l&4194240)===0&&($l=64),o}function V(o){for(var l=[],h=0;31>h;h++)l.push(o);return l}function ie(o,l,h){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-Nn(l),o[l]=h}function Ce(o,l){var h=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var g=o.eventTimes;for(o=o.expirationTimes;0<h;){var S=31-Nn(h),k=1<<S;l[S]=0,g[S]=-1,o[S]=-1,h&=~k}}function he(o,l){var h=o.entangledLanes|=l;for(o=o.entanglements;h;){var g=31-Nn(h),S=1<<g;S&l|o[g]&l&&(o[g]|=l),h&=~S}}var le=0;function ye(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var qe,De,Xt,Sn,Tr,gs=!1,pr=[],Ye=null,kt=null,Ar=null,Dc=new Map,jc=new Map,Po=[],UM="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 Qw(o,l){switch(o){case"focusin":case"focusout":Ye=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":Dc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":jc.delete(l.pointerId)}}function Fc(o,l,h,g,S,k){return o===null||o.nativeEvent!==k?(o={blockedOn:l,domEventName:h,eventSystemFlags:g,nativeEvent:k,targetContainers:[S]},l!==null&&(l=Qc(l),l!==null&&De(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,S!==null&&l.indexOf(S)===-1&&l.push(S),o)}function BM(o,l,h,g,S){switch(l){case"focusin":return Ye=Fc(Ye,o,l,h,g,S),!0;case"dragenter":return kt=Fc(kt,o,l,h,g,S),!0;case"mouseover":return Ar=Fc(Ar,o,l,h,g,S),!0;case"pointerover":var k=S.pointerId;return Dc.set(k,Fc(Dc.get(k)||null,o,l,h,g,S)),!0;case"gotpointercapture":return k=S.pointerId,jc.set(k,Fc(jc.get(k)||null,o,l,h,g,S)),!0}return!1}function Jw(o){var l=Ra(o.target);if(l!==null){var h=Fi(l);if(h!==null){if(l=h.tag,l===13){if(l=Qf(h),l!==null){o.blockedOn=l,Tr(o.priority,function(){Xt(h)});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function oh(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var h=rv(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(h===null){h=o.nativeEvent;var g=new h.constructor(h.type,h);er=g,h.target.dispatchEvent(g),er=null}else return l=Qc(h),l!==null&&De(l),o.blockedOn=h,!1;l.shift()}return!0}function eb(o,l,h){oh(o)&&h.delete(l)}function WM(){gs=!1,Ye!==null&&oh(Ye)&&(Ye=null),kt!==null&&oh(kt)&&(kt=null),Ar!==null&&oh(Ar)&&(Ar=null),Dc.forEach(eb),jc.forEach(eb)}function Vc(o,l){o.blockedOn===l&&(o.blockedOn=null,gs||(gs=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,WM)))}function $c(o){function l(S){return Vc(S,o)}if(0<pr.length){Vc(pr[0],o);for(var h=1;h<pr.length;h++){var g=pr[h];g.blockedOn===o&&(g.blockedOn=null)}}for(Ye!==null&&Vc(Ye,o),kt!==null&&Vc(kt,o),Ar!==null&&Vc(Ar,o),Dc.forEach(l),jc.forEach(l),h=0;h<Po.length;h++)g=Po[h],g.blockedOn===o&&(g.blockedOn=null);for(;0<Po.length&&(h=Po[0],h.blockedOn===null);)Jw(h),h.blockedOn===null&&Po.shift()}var Hl=T.ReactCurrentBatchConfig,ah=!0;function qM(o,l,h,g){var S=le,k=Hl.transition;Hl.transition=null;try{le=1,nv(o,l,h,g)}finally{le=S,Hl.transition=k}}function GM(o,l,h,g){var S=le,k=Hl.transition;Hl.transition=null;try{le=4,nv(o,l,h,g)}finally{le=S,Hl.transition=k}}function nv(o,l,h,g){if(ah){var S=rv(o,l,h,g);if(S===null)xv(o,l,g,lh,h),Qw(o,g);else if(BM(S,o,l,h,g))g.stopPropagation();else if(Qw(o,g),l&4&&-1<UM.indexOf(o)){for(;S!==null;){var k=Qc(S);if(k!==null&&qe(k),k=rv(o,l,h,g),k===null&&xv(o,l,g,lh,h),k===S)break;S=k}S!==null&&g.stopPropagation()}else xv(o,l,g,null,h)}}var lh=null;function rv(o,l,h,g){if(lh=null,o=Ln(g),o=Ra(o),o!==null)if(l=Fi(o),l===null)o=null;else if(h=l.tag,h===13){if(o=Qf(l),o!==null)return o;o=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return lh=o,null}function tb(o){switch(o){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(Rc()){case Mc:return 1;case nh:return 4;case Fl:case Oc:return 16;case Vl:return 536870912;default:return 16}default:return 16}}var To=null,sv=null,uh=null;function nb(){if(uh)return uh;var o,l=sv,h=l.length,g,S="value"in To?To.value:To.textContent,k=S.length;for(o=0;o<h&&l[o]===S[o];o++);var M=h-o;for(g=1;g<=M&&l[h-g]===S[k-g];g++);return uh=S.slice(o,1<g?1-g:void 0)}function ch(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function dh(){return!0}function rb(){return!1}function Zr(o){function l(h,g,S,k,M){this._reactName=h,this._targetInst=S,this.type=g,this.nativeEvent=k,this.target=M,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(h=o[$],this[$]=h?h(k):k[$]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?dh:rb,this.isPropagationStopped=rb,this}return H(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=dh)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=dh)},persist:function(){},isPersistent:dh}),l}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iv=Zr(Ul),zc=H({},Ul,{view:0,detail:0}),KM=Zr(zc),ov,av,Hc,fh=H({},zc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uv,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Hc&&(Hc&&o.type==="mousemove"?(ov=o.screenX-Hc.screenX,av=o.screenY-Hc.screenY):av=ov=0,Hc=o),ov)},movementY:function(o){return"movementY"in o?o.movementY:av}}),sb=Zr(fh),ZM=H({},fh,{dataTransfer:0}),YM=Zr(ZM),XM=H({},zc,{relatedTarget:0}),lv=Zr(XM),QM=H({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),JM=Zr(QM),eO=H({},Ul,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),tO=Zr(eO),nO=H({},Ul,{data:0}),ib=Zr(nO),rO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sO={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"},iO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oO(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=iO[o])?!!l[o]:!1}function uv(){return oO}var aO=H({},zc,{key:function(o){if(o.key){var l=rO[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=ch(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?sO[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uv,charCode:function(o){return o.type==="keypress"?ch(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?ch(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),lO=Zr(aO),uO=H({},fh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ob=Zr(uO),cO=H({},zc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uv}),dO=Zr(cO),fO=H({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),hO=Zr(fO),pO=H({},fh,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),mO=Zr(pO),vO=[9,13,27,32],cv=u&&"CompositionEvent"in window,Uc=null;u&&"documentMode"in document&&(Uc=document.documentMode);var gO=u&&"TextEvent"in window&&!Uc,ab=u&&(!cv||Uc&&8<Uc&&11>=Uc),lb=" ",ub=!1;function cb(o,l){switch(o){case"keyup":return vO.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function db(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Bl=!1;function yO(o,l){switch(o){case"compositionend":return db(l);case"keypress":return l.which!==32?null:(ub=!0,lb);case"textInput":return o=l.data,o===lb&&ub?null:o;default:return null}}function _O(o,l){if(Bl)return o==="compositionend"||!cv&&cb(o,l)?(o=nb(),uh=sv=To=null,Bl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return ab&&l.locale!=="ko"?null:l.data;default:return null}}var xO={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 fb(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!xO[o.type]:l==="textarea"}function hb(o,l,h,g){ni(g),l=gh(l,"onChange"),0<l.length&&(h=new iv("onChange","change",null,h,g),o.push({event:h,listeners:l}))}var Bc=null,Wc=null;function wO(o){Rb(o,0)}function hh(o){var l=Zl(o);if(ze(l))return o}function bO(o,l){if(o==="change")return l}var pb=!1;if(u){var dv;if(u){var fv="oninput"in document;if(!fv){var mb=document.createElement("div");mb.setAttribute("oninput","return;"),fv=typeof mb.oninput=="function"}dv=fv}else dv=!1;pb=dv&&(!document.documentMode||9<document.documentMode)}function vb(){Bc&&(Bc.detachEvent("onpropertychange",gb),Wc=Bc=null)}function gb(o){if(o.propertyName==="value"&&hh(Wc)){var l=[];hb(l,Wc,o,Ln(o)),mn(wO,l)}}function SO(o,l,h){o==="focusin"?(vb(),Bc=l,Wc=h,Bc.attachEvent("onpropertychange",gb)):o==="focusout"&&vb()}function EO(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return hh(Wc)}function CO(o,l){if(o==="click")return hh(l)}function kO(o,l){if(o==="input"||o==="change")return hh(l)}function PO(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Ns=typeof Object.is=="function"?Object.is:PO;function qc(o,l){if(Ns(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),g=Object.keys(l);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var S=h[g];if(!c.call(l,S)||!Ns(o[S],l[S]))return!1}return!0}function yb(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function _b(o,l){var h=yb(o);o=0;for(var g;h;){if(h.nodeType===3){if(g=o+h.textContent.length,o<=l&&g>=l)return{node:h,offset:l-o};o=g}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=yb(h)}}function xb(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?xb(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function wb(){for(var o=window,l=Fe();l instanceof o.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)o=l.contentWindow;else break;l=Fe(o.document)}return l}function hv(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function TO(o){var l=wb(),h=o.focusedElem,g=o.selectionRange;if(l!==h&&h&&h.ownerDocument&&xb(h.ownerDocument.documentElement,h)){if(g!==null&&hv(h)){if(l=g.start,o=g.end,o===void 0&&(o=l),"selectionStart"in h)h.selectionStart=l,h.selectionEnd=Math.min(o,h.value.length);else if(o=(l=h.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var S=h.textContent.length,k=Math.min(g.start,S);g=g.end===void 0?k:Math.min(g.end,S),!o.extend&&k>g&&(S=g,g=k,k=S),S=_b(h,k);var M=_b(h,g);S&&M&&(o.rangeCount!==1||o.anchorNode!==S.node||o.anchorOffset!==S.offset||o.focusNode!==M.node||o.focusOffset!==M.offset)&&(l=l.createRange(),l.setStart(S.node,S.offset),o.removeAllRanges(),k>g?(o.addRange(l),o.extend(M.node,M.offset)):(l.setEnd(M.node,M.offset),o.addRange(l)))}}for(l=[],o=h;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<l.length;h++)o=l[h],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var AO=u&&"documentMode"in document&&11>=document.documentMode,Wl=null,pv=null,Gc=null,mv=!1;function bb(o,l,h){var g=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;mv||Wl==null||Wl!==Fe(g)||(g=Wl,"selectionStart"in g&&hv(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Gc&&qc(Gc,g)||(Gc=g,g=gh(pv,"onSelect"),0<g.length&&(l=new iv("onSelect","select",null,l,h),o.push({event:l,listeners:g}),l.target=Wl)))}function ph(o,l){var h={};return h[o.toLowerCase()]=l.toLowerCase(),h["Webkit"+o]="webkit"+l,h["Moz"+o]="moz"+l,h}var ql={animationend:ph("Animation","AnimationEnd"),animationiteration:ph("Animation","AnimationIteration"),animationstart:ph("Animation","AnimationStart"),transitionend:ph("Transition","TransitionEnd")},vv={},Sb={};u&&(Sb=document.createElement("div").style,"AnimationEvent"in window||(delete ql.animationend.animation,delete ql.animationiteration.animation,delete ql.animationstart.animation),"TransitionEvent"in window||delete ql.transitionend.transition);function mh(o){if(vv[o])return vv[o];if(!ql[o])return o;var l=ql[o],h;for(h in l)if(l.hasOwnProperty(h)&&h in Sb)return vv[o]=l[h];return o}var Eb=mh("animationend"),Cb=mh("animationiteration"),kb=mh("animationstart"),Pb=mh("transitionend"),Tb=new Map,Ab="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 Ao(o,l){Tb.set(o,l),i(l,[o])}for(var gv=0;gv<Ab.length;gv++){var yv=Ab[gv],IO=yv.toLowerCase(),RO=yv[0].toUpperCase()+yv.slice(1);Ao(IO,"on"+RO)}Ao(Eb,"onAnimationEnd"),Ao(Cb,"onAnimationIteration"),Ao(kb,"onAnimationStart"),Ao("dblclick","onDoubleClick"),Ao("focusin","onFocus"),Ao("focusout","onBlur"),Ao(Pb,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kc="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(" "),MO=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kc));function Ib(o,l,h){var g=o.type||"unknown-event";o.currentTarget=h,Xf(g,l,void 0,o),o.currentTarget=null}function Rb(o,l){l=(l&4)!==0;for(var h=0;h<o.length;h++){var g=o[h],S=g.event;g=g.listeners;e:{var k=void 0;if(l)for(var M=g.length-1;0<=M;M--){var $=g[M],B=$.instance,re=$.currentTarget;if($=$.listener,B!==k&&S.isPropagationStopped())break e;Ib(S,$,re),k=B}else for(M=0;M<g.length;M++){if($=g[M],B=$.instance,re=$.currentTarget,$=$.listener,B!==k&&S.isPropagationStopped())break e;Ib(S,$,re),k=B}}}if(ri)throw o=Pc,ri=!1,Pc=null,o}function Vt(o,l){var h=l[kv];h===void 0&&(h=l[kv]=new Set);var g=o+"__bubble";h.has(g)||(Mb(l,o,2,!1),h.add(g))}function _v(o,l,h){var g=0;l&&(g|=4),Mb(h,o,g,l)}var vh="_reactListening"+Math.random().toString(36).slice(2);function Zc(o){if(!o[vh]){o[vh]=!0,r.forEach(function(h){h!=="selectionchange"&&(MO.has(h)||_v(h,!1,o),_v(h,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[vh]||(l[vh]=!0,_v("selectionchange",!1,l))}}function Mb(o,l,h,g){switch(tb(l)){case 1:var S=qM;break;case 4:S=GM;break;default:S=nv}h=S.bind(null,l,h,o),S=void 0,!Ft||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(S=!0),g?S!==void 0?o.addEventListener(l,h,{capture:!0,passive:S}):o.addEventListener(l,h,!0):S!==void 0?o.addEventListener(l,h,{passive:S}):o.addEventListener(l,h,!1)}function xv(o,l,h,g,S){var k=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var M=g.tag;if(M===3||M===4){var $=g.stateNode.containerInfo;if($===S||$.nodeType===8&&$.parentNode===S)break;if(M===4)for(M=g.return;M!==null;){var B=M.tag;if((B===3||B===4)&&(B=M.stateNode.containerInfo,B===S||B.nodeType===8&&B.parentNode===S))return;M=M.return}for(;$!==null;){if(M=Ra($),M===null)return;if(B=M.tag,B===5||B===6){g=k=M;continue e}$=$.parentNode}}g=g.return}mn(function(){var re=k,ve=Ln(h),_e=[];e:{var me=Tb.get(o);if(me!==void 0){var Pe=iv,Me=o;switch(o){case"keypress":if(ch(h)===0)break e;case"keydown":case"keyup":Pe=lO;break;case"focusin":Me="focus",Pe=lv;break;case"focusout":Me="blur",Pe=lv;break;case"beforeblur":case"afterblur":Pe=lv;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Pe=sb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=YM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=dO;break;case Eb:case Cb:case kb:Pe=JM;break;case Pb:Pe=hO;break;case"scroll":Pe=KM;break;case"wheel":Pe=mO;break;case"copy":case"cut":case"paste":Pe=tO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=ob}var Le=(l&4)!==0,vn=!Le&&o==="scroll",ee=Le?me!==null?me+"Capture":null:me;Le=[];for(var K=re,te;K!==null;){te=K;var be=te.stateNode;if(te.tag===5&&be!==null&&(te=be,ee!==null&&(be=hr(K,ee),be!=null&&Le.push(Yc(K,be,te)))),vn)break;K=K.return}0<Le.length&&(me=new Pe(me,Me,null,h,ve),_e.push({event:me,listeners:Le}))}}if((l&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",Pe=o==="mouseout"||o==="pointerout",me&&h!==er&&(Me=h.relatedTarget||h.fromElement)&&(Ra(Me)||Me[Vi]))break e;if((Pe||me)&&(me=ve.window===ve?ve:(me=ve.ownerDocument)?me.defaultView||me.parentWindow:window,Pe?(Me=h.relatedTarget||h.toElement,Pe=re,Me=Me?Ra(Me):null,Me!==null&&(vn=Fi(Me),Me!==vn||Me.tag!==5&&Me.tag!==6)&&(Me=null)):(Pe=null,Me=re),Pe!==Me)){if(Le=sb,be="onMouseLeave",ee="onMouseEnter",K="mouse",(o==="pointerout"||o==="pointerover")&&(Le=ob,be="onPointerLeave",ee="onPointerEnter",K="pointer"),vn=Pe==null?me:Zl(Pe),te=Me==null?me:Zl(Me),me=new Le(be,K+"leave",Pe,h,ve),me.target=vn,me.relatedTarget=te,be=null,Ra(ve)===re&&(Le=new Le(ee,K+"enter",Me,h,ve),Le.target=te,Le.relatedTarget=vn,be=Le),vn=be,Pe&&Me)t:{for(Le=Pe,ee=Me,K=0,te=Le;te;te=Gl(te))K++;for(te=0,be=ee;be;be=Gl(be))te++;for(;0<K-te;)Le=Gl(Le),K--;for(;0<te-K;)ee=Gl(ee),te--;for(;K--;){if(Le===ee||ee!==null&&Le===ee.alternate)break t;Le=Gl(Le),ee=Gl(ee)}Le=null}else Le=null;Pe!==null&&Ob(_e,me,Pe,Le,!1),Me!==null&&vn!==null&&Ob(_e,vn,Me,Le,!0)}}e:{if(me=re?Zl(re):window,Pe=me.nodeName&&me.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&me.type==="file")var je=bO;else if(fb(me))if(pb)je=kO;else{je=EO;var He=SO}else(Pe=me.nodeName)&&Pe.toLowerCase()==="input"&&(me.type==="checkbox"||me.type==="radio")&&(je=CO);if(je&&(je=je(o,re))){hb(_e,je,h,ve);break e}He&&He(o,me,re),o==="focusout"&&(He=me._wrapperState)&&He.controlled&&me.type==="number"&&Je(me,"number",me.value)}switch(He=re?Zl(re):window,o){case"focusin":(fb(He)||He.contentEditable==="true")&&(Wl=He,pv=re,Gc=null);break;case"focusout":Gc=pv=Wl=null;break;case"mousedown":mv=!0;break;case"contextmenu":case"mouseup":case"dragend":mv=!1,bb(_e,h,ve);break;case"selectionchange":if(AO)break;case"keydown":case"keyup":bb(_e,h,ve)}var Ue;if(cv)e:{switch(o){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Bl?cb(o,h)&&(Xe="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(Xe="onCompositionStart");Xe&&(ab&&h.locale!=="ko"&&(Bl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Bl&&(Ue=nb()):(To=ve,sv="value"in To?To.value:To.textContent,Bl=!0)),He=gh(re,Xe),0<He.length&&(Xe=new ib(Xe,o,null,h,ve),_e.push({event:Xe,listeners:He}),Ue?Xe.data=Ue:(Ue=db(h),Ue!==null&&(Xe.data=Ue)))),(Ue=gO?yO(o,h):_O(o,h))&&(re=gh(re,"onBeforeInput"),0<re.length&&(ve=new ib("onBeforeInput","beforeinput",null,h,ve),_e.push({event:ve,listeners:re}),ve.data=Ue))}Rb(_e,l)})}function Yc(o,l,h){return{instance:o,listener:l,currentTarget:h}}function gh(o,l){for(var h=l+"Capture",g=[];o!==null;){var S=o,k=S.stateNode;S.tag===5&&k!==null&&(S=k,k=hr(o,h),k!=null&&g.unshift(Yc(o,k,S)),k=hr(o,l),k!=null&&g.push(Yc(o,k,S))),o=o.return}return g}function Gl(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function Ob(o,l,h,g,S){for(var k=l._reactName,M=[];h!==null&&h!==g;){var $=h,B=$.alternate,re=$.stateNode;if(B!==null&&B===g)break;$.tag===5&&re!==null&&($=re,S?(B=hr(h,k),B!=null&&M.unshift(Yc(h,B,$))):S||(B=hr(h,k),B!=null&&M.push(Yc(h,B,$)))),h=h.return}M.length!==0&&o.push({event:l,listeners:M})}var OO=/\r\n?/g,LO=/\u0000|\uFFFD/g;function Lb(o){return(typeof o=="string"?o:""+o).replace(OO,`
|
|
40
|
-
`).replace(LO,"")}function yh(o,l,h){if(l=Lb(l),Lb(o)!==l&&h)throw Error(n(425))}function _h(){}var wv=null,bv=null;function Sv(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ev=typeof setTimeout=="function"?setTimeout:void 0,NO=typeof clearTimeout=="function"?clearTimeout:void 0,Nb=typeof Promise=="function"?Promise:void 0,DO=typeof queueMicrotask=="function"?queueMicrotask:typeof Nb<"u"?function(o){return Nb.resolve(null).then(o).catch(jO)}:Ev;function jO(o){setTimeout(function(){throw o})}function Cv(o,l){var h=l,g=0;do{var S=h.nextSibling;if(o.removeChild(h),S&&S.nodeType===8)if(h=S.data,h==="/$"){if(g===0){o.removeChild(S),$c(l);return}g--}else h!=="$"&&h!=="$?"&&h!=="$!"||g++;h=S}while(h);$c(l)}function Io(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function Db(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"){if(l===0)return o;l--}else h==="/$"&&l++}o=o.previousSibling}return null}var Kl=Math.random().toString(36).slice(2),ii="__reactFiber$"+Kl,Xc="__reactProps$"+Kl,Vi="__reactContainer$"+Kl,kv="__reactEvents$"+Kl,FO="__reactListeners$"+Kl,VO="__reactHandles$"+Kl;function Ra(o){var l=o[ii];if(l)return l;for(var h=o.parentNode;h;){if(l=h[Vi]||h[ii]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(o=Db(o);o!==null;){if(h=o[ii])return h;o=Db(o)}return l}o=h,h=o.parentNode}return null}function Qc(o){return o=o[ii]||o[Vi],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function Zl(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function xh(o){return o[Xc]||null}var Pv=[],Yl=-1;function Ro(o){return{current:o}}function $t(o){0>Yl||(o.current=Pv[Yl],Pv[Yl]=null,Yl--)}function Dt(o,l){Yl++,Pv[Yl]=o.current,o.current=l}var Mo={},tr=Ro(Mo),Ir=Ro(!1),Ma=Mo;function Xl(o,l){var h=o.type.contextTypes;if(!h)return Mo;var g=o.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===l)return g.__reactInternalMemoizedMaskedChildContext;var S={},k;for(k in h)S[k]=l[k];return g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=S),S}function Rr(o){return o=o.childContextTypes,o!=null}function wh(){$t(Ir),$t(tr)}function jb(o,l,h){if(tr.current!==Mo)throw Error(n(168));Dt(tr,l),Dt(Ir,h)}function Fb(o,l,h){var g=o.stateNode;if(l=l.childContextTypes,typeof g.getChildContext!="function")return h;g=g.getChildContext();for(var S in g)if(!(S in l))throw Error(n(108,Se(o)||"Unknown",S));return H({},h,g)}function bh(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Mo,Ma=tr.current,Dt(tr,o),Dt(Ir,Ir.current),!0}function Vb(o,l,h){var g=o.stateNode;if(!g)throw Error(n(169));h?(o=Fb(o,l,Ma),g.__reactInternalMemoizedMergedChildContext=o,$t(Ir),$t(tr),Dt(tr,o)):$t(Ir),Dt(Ir,h)}var $i=null,Sh=!1,Tv=!1;function $b(o){$i===null?$i=[o]:$i.push(o)}function $O(o){Sh=!0,$b(o)}function Oo(){if(!Tv&&$i!==null){Tv=!0;var o=0,l=le;try{var h=$i;for(le=1;o<h.length;o++){var g=h[o];do g=g(!0);while(g!==null)}$i=null,Sh=!1}catch(S){throw $i!==null&&($i=$i.slice(o+1)),eh(Mc,Oo),S}finally{le=l,Tv=!1}}return null}var Ql=[],Jl=0,Eh=null,Ch=0,ys=[],_s=0,Oa=null,zi=1,Hi="";function La(o,l){Ql[Jl++]=Ch,Ql[Jl++]=Eh,Eh=o,Ch=l}function zb(o,l,h){ys[_s++]=zi,ys[_s++]=Hi,ys[_s++]=Oa,Oa=o;var g=zi;o=Hi;var S=32-Nn(g)-1;g&=~(1<<S),h+=1;var k=32-Nn(l)+S;if(30<k){var M=S-S%5;k=(g&(1<<M)-1).toString(32),g>>=M,S-=M,zi=1<<32-Nn(l)+S|h<<S|g,Hi=k+o}else zi=1<<k|h<<S|g,Hi=o}function Av(o){o.return!==null&&(La(o,1),zb(o,1,0))}function Iv(o){for(;o===Eh;)Eh=Ql[--Jl],Ql[Jl]=null,Ch=Ql[--Jl],Ql[Jl]=null;for(;o===Oa;)Oa=ys[--_s],ys[_s]=null,Hi=ys[--_s],ys[_s]=null,zi=ys[--_s],ys[_s]=null}var Yr=null,Xr=null,Wt=!1,Ds=null;function Hb(o,l){var h=Ss(5,null,null,0);h.elementType="DELETED",h.stateNode=l,h.return=o,l=o.deletions,l===null?(o.deletions=[h],o.flags|=16):l.push(h)}function Ub(o,l){switch(o.tag){case 5:var h=o.type;return l=l.nodeType!==1||h.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Yr=o,Xr=Io(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Yr=o,Xr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(h=Oa!==null?{id:zi,overflow:Hi}:null,o.memoizedState={dehydrated:l,treeContext:h,retryLane:1073741824},h=Ss(18,null,null,0),h.stateNode=l,h.return=o,o.child=h,Yr=o,Xr=null,!0):!1;default:return!1}}function Rv(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Mv(o){if(Wt){var l=Xr;if(l){var h=l;if(!Ub(o,l)){if(Rv(o))throw Error(n(418));l=Io(h.nextSibling);var g=Yr;l&&Ub(o,l)?Hb(g,h):(o.flags=o.flags&-4097|2,Wt=!1,Yr=o)}}else{if(Rv(o))throw Error(n(418));o.flags=o.flags&-4097|2,Wt=!1,Yr=o}}}function Bb(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Yr=o}function kh(o){if(o!==Yr)return!1;if(!Wt)return Bb(o),Wt=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Sv(o.type,o.memoizedProps)),l&&(l=Xr)){if(Rv(o))throw Wb(),Error(n(418));for(;l;)Hb(o,l),l=Io(l.nextSibling)}if(Bb(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"){if(l===0){Xr=Io(o.nextSibling);break e}l--}else h!=="$"&&h!=="$!"&&h!=="$?"||l++}o=o.nextSibling}Xr=null}}else Xr=Yr?Io(o.stateNode.nextSibling):null;return!0}function Wb(){for(var o=Xr;o;)o=Io(o.nextSibling)}function eu(){Xr=Yr=null,Wt=!1}function Ov(o){Ds===null?Ds=[o]:Ds.push(o)}var zO=T.ReactCurrentBatchConfig;function Jc(o,l,h){if(o=h.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(n(309));var g=h.stateNode}if(!g)throw Error(n(147,o));var S=g,k=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===k?l.ref:(l=function(M){var $=S.refs;M===null?delete $[k]:$[k]=M},l._stringRef=k,l)}if(typeof o!="string")throw Error(n(284));if(!h._owner)throw Error(n(290,o))}return o}function Ph(o,l){throw o=Object.prototype.toString.call(l),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function qb(o){var l=o._init;return l(o._payload)}function Gb(o){function l(ee,K){if(o){var te=ee.deletions;te===null?(ee.deletions=[K],ee.flags|=16):te.push(K)}}function h(ee,K){if(!o)return null;for(;K!==null;)l(ee,K),K=K.sibling;return null}function g(ee,K){for(ee=new Map;K!==null;)K.key!==null?ee.set(K.key,K):ee.set(K.index,K),K=K.sibling;return ee}function S(ee,K){return ee=zo(ee,K),ee.index=0,ee.sibling=null,ee}function k(ee,K,te){return ee.index=te,o?(te=ee.alternate,te!==null?(te=te.index,te<K?(ee.flags|=2,K):te):(ee.flags|=2,K)):(ee.flags|=1048576,K)}function M(ee){return o&&ee.alternate===null&&(ee.flags|=2),ee}function $(ee,K,te,be){return K===null||K.tag!==6?(K=Eg(te,ee.mode,be),K.return=ee,K):(K=S(K,te),K.return=ee,K)}function B(ee,K,te,be){var je=te.type;return je===L?ve(ee,K,te.props.children,be,te.key):K!==null&&(K.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===W&&qb(je)===K.type)?(be=S(K,te.props),be.ref=Jc(ee,K,te),be.return=ee,be):(be=Xh(te.type,te.key,te.props,null,ee.mode,be),be.ref=Jc(ee,K,te),be.return=ee,be)}function re(ee,K,te,be){return K===null||K.tag!==4||K.stateNode.containerInfo!==te.containerInfo||K.stateNode.implementation!==te.implementation?(K=Cg(te,ee.mode,be),K.return=ee,K):(K=S(K,te.children||[]),K.return=ee,K)}function ve(ee,K,te,be,je){return K===null||K.tag!==7?(K=Ha(te,ee.mode,be,je),K.return=ee,K):(K=S(K,te),K.return=ee,K)}function _e(ee,K,te){if(typeof K=="string"&&K!==""||typeof K=="number")return K=Eg(""+K,ee.mode,te),K.return=ee,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case A:return te=Xh(K.type,K.key,K.props,null,ee.mode,te),te.ref=Jc(ee,null,K),te.return=ee,te;case R:return K=Cg(K,ee.mode,te),K.return=ee,K;case W:var be=K._init;return _e(ee,be(K._payload),te)}if(Ct(K)||X(K))return K=Ha(K,ee.mode,te,null),K.return=ee,K;Ph(ee,K)}return null}function me(ee,K,te,be){var je=K!==null?K.key:null;if(typeof te=="string"&&te!==""||typeof te=="number")return je!==null?null:$(ee,K,""+te,be);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case A:return te.key===je?B(ee,K,te,be):null;case R:return te.key===je?re(ee,K,te,be):null;case W:return je=te._init,me(ee,K,je(te._payload),be)}if(Ct(te)||X(te))return je!==null?null:ve(ee,K,te,be,null);Ph(ee,te)}return null}function Pe(ee,K,te,be,je){if(typeof be=="string"&&be!==""||typeof be=="number")return ee=ee.get(te)||null,$(K,ee,""+be,je);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case A:return ee=ee.get(be.key===null?te:be.key)||null,B(K,ee,be,je);case R:return ee=ee.get(be.key===null?te:be.key)||null,re(K,ee,be,je);case W:var He=be._init;return Pe(ee,K,te,He(be._payload),je)}if(Ct(be)||X(be))return ee=ee.get(te)||null,ve(K,ee,be,je,null);Ph(K,be)}return null}function Me(ee,K,te,be){for(var je=null,He=null,Ue=K,Xe=K=0,Fn=null;Ue!==null&&Xe<te.length;Xe++){Ue.index>Xe?(Fn=Ue,Ue=null):Fn=Ue.sibling;var gt=me(ee,Ue,te[Xe],be);if(gt===null){Ue===null&&(Ue=Fn);break}o&&Ue&>.alternate===null&&l(ee,Ue),K=k(gt,K,Xe),He===null?je=gt:He.sibling=gt,He=gt,Ue=Fn}if(Xe===te.length)return h(ee,Ue),Wt&&La(ee,Xe),je;if(Ue===null){for(;Xe<te.length;Xe++)Ue=_e(ee,te[Xe],be),Ue!==null&&(K=k(Ue,K,Xe),He===null?je=Ue:He.sibling=Ue,He=Ue);return Wt&&La(ee,Xe),je}for(Ue=g(ee,Ue);Xe<te.length;Xe++)Fn=Pe(Ue,ee,Xe,te[Xe],be),Fn!==null&&(o&&Fn.alternate!==null&&Ue.delete(Fn.key===null?Xe:Fn.key),K=k(Fn,K,Xe),He===null?je=Fn:He.sibling=Fn,He=Fn);return o&&Ue.forEach(function(Ho){return l(ee,Ho)}),Wt&&La(ee,Xe),je}function Le(ee,K,te,be){var je=X(te);if(typeof je!="function")throw Error(n(150));if(te=je.call(te),te==null)throw Error(n(151));for(var He=je=null,Ue=K,Xe=K=0,Fn=null,gt=te.next();Ue!==null&&!gt.done;Xe++,gt=te.next()){Ue.index>Xe?(Fn=Ue,Ue=null):Fn=Ue.sibling;var Ho=me(ee,Ue,gt.value,be);if(Ho===null){Ue===null&&(Ue=Fn);break}o&&Ue&&Ho.alternate===null&&l(ee,Ue),K=k(Ho,K,Xe),He===null?je=Ho:He.sibling=Ho,He=Ho,Ue=Fn}if(gt.done)return h(ee,Ue),Wt&&La(ee,Xe),je;if(Ue===null){for(;!gt.done;Xe++,gt=te.next())gt=_e(ee,gt.value,be),gt!==null&&(K=k(gt,K,Xe),He===null?je=gt:He.sibling=gt,He=gt);return Wt&&La(ee,Xe),je}for(Ue=g(ee,Ue);!gt.done;Xe++,gt=te.next())gt=Pe(Ue,ee,Xe,gt.value,be),gt!==null&&(o&>.alternate!==null&&Ue.delete(gt.key===null?Xe:gt.key),K=k(gt,K,Xe),He===null?je=gt:He.sibling=gt,He=gt);return o&&Ue.forEach(function(xL){return l(ee,xL)}),Wt&&La(ee,Xe),je}function vn(ee,K,te,be){if(typeof te=="object"&&te!==null&&te.type===L&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case A:e:{for(var je=te.key,He=K;He!==null;){if(He.key===je){if(je=te.type,je===L){if(He.tag===7){h(ee,He.sibling),K=S(He,te.props.children),K.return=ee,ee=K;break e}}else if(He.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===W&&qb(je)===He.type){h(ee,He.sibling),K=S(He,te.props),K.ref=Jc(ee,He,te),K.return=ee,ee=K;break e}h(ee,He);break}else l(ee,He);He=He.sibling}te.type===L?(K=Ha(te.props.children,ee.mode,be,te.key),K.return=ee,ee=K):(be=Xh(te.type,te.key,te.props,null,ee.mode,be),be.ref=Jc(ee,K,te),be.return=ee,ee=be)}return M(ee);case R:e:{for(He=te.key;K!==null;){if(K.key===He)if(K.tag===4&&K.stateNode.containerInfo===te.containerInfo&&K.stateNode.implementation===te.implementation){h(ee,K.sibling),K=S(K,te.children||[]),K.return=ee,ee=K;break e}else{h(ee,K);break}else l(ee,K);K=K.sibling}K=Cg(te,ee.mode,be),K.return=ee,ee=K}return M(ee);case W:return He=te._init,vn(ee,K,He(te._payload),be)}if(Ct(te))return Me(ee,K,te,be);if(X(te))return Le(ee,K,te,be);Ph(ee,te)}return typeof te=="string"&&te!==""||typeof te=="number"?(te=""+te,K!==null&&K.tag===6?(h(ee,K.sibling),K=S(K,te),K.return=ee,ee=K):(h(ee,K),K=Eg(te,ee.mode,be),K.return=ee,ee=K),M(ee)):h(ee,K)}return vn}var tu=Gb(!0),Kb=Gb(!1),Th=Ro(null),Ah=null,nu=null,Lv=null;function Nv(){Lv=nu=Ah=null}function Dv(o){var l=Th.current;$t(Th),o._currentValue=l}function jv(o,l,h){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===h)break;o=o.return}}function ru(o,l){Ah=o,Lv=nu=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(Mr=!0),o.firstContext=null)}function xs(o){var l=o._currentValue;if(Lv!==o)if(o={context:o,memoizedValue:l,next:null},nu===null){if(Ah===null)throw Error(n(308));nu=o,Ah.dependencies={lanes:0,firstContext:o}}else nu=nu.next=o;return l}var Na=null;function Fv(o){Na===null?Na=[o]:Na.push(o)}function Zb(o,l,h,g){var S=l.interleaved;return S===null?(h.next=h,Fv(l)):(h.next=S.next,S.next=h),l.interleaved=h,Ui(o,g)}function Ui(o,l){o.lanes|=l;var h=o.alternate;for(h!==null&&(h.lanes|=l),h=o,o=o.return;o!==null;)o.childLanes|=l,h=o.alternate,h!==null&&(h.childLanes|=l),h=o,o=o.return;return h.tag===3?h.stateNode:null}var Lo=!1;function Vv(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yb(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Bi(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function No(o,l,h){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(ht&2)!==0){var S=g.pending;return S===null?l.next=l:(l.next=S.next,S.next=l),g.pending=l,Ui(o,h)}return S=g.interleaved,S===null?(l.next=l,Fv(g)):(l.next=S.next,S.next=l),g.interleaved=l,Ui(o,h)}function Ih(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194240)!==0)){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,he(o,h)}}function Xb(o,l){var h=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var S=null,k=null;if(h=h.firstBaseUpdate,h!==null){do{var M={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};k===null?S=k=M:k=k.next=M,h=h.next}while(h!==null);k===null?S=k=l:k=k.next=l}else S=k=l;h={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:k,shared:g.shared,effects:g.effects},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}function Rh(o,l,h,g){var S=o.updateQueue;Lo=!1;var k=S.firstBaseUpdate,M=S.lastBaseUpdate,$=S.shared.pending;if($!==null){S.shared.pending=null;var B=$,re=B.next;B.next=null,M===null?k=re:M.next=re,M=B;var ve=o.alternate;ve!==null&&(ve=ve.updateQueue,$=ve.lastBaseUpdate,$!==M&&($===null?ve.firstBaseUpdate=re:$.next=re,ve.lastBaseUpdate=B))}if(k!==null){var _e=S.baseState;M=0,ve=re=B=null,$=k;do{var me=$.lane,Pe=$.eventTime;if((g&me)===me){ve!==null&&(ve=ve.next={eventTime:Pe,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Me=o,Le=$;switch(me=l,Pe=h,Le.tag){case 1:if(Me=Le.payload,typeof Me=="function"){_e=Me.call(Pe,_e,me);break e}_e=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Le.payload,me=typeof Me=="function"?Me.call(Pe,_e,me):Me,me==null)break e;_e=H({},_e,me);break e;case 2:Lo=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,me=S.effects,me===null?S.effects=[$]:me.push($))}else Pe={eventTime:Pe,lane:me,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ve===null?(re=ve=Pe,B=_e):ve=ve.next=Pe,M|=me;if($=$.next,$===null){if($=S.shared.pending,$===null)break;me=$,$=me.next,me.next=null,S.lastBaseUpdate=me,S.shared.pending=null}}while(!0);if(ve===null&&(B=_e),S.baseState=B,S.firstBaseUpdate=re,S.lastBaseUpdate=ve,l=S.shared.interleaved,l!==null){S=l;do M|=S.lane,S=S.next;while(S!==l)}else k===null&&(S.shared.lanes=0);Fa|=M,o.lanes=M,o.memoizedState=_e}}function Qb(o,l,h){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var g=o[l],S=g.callback;if(S!==null){if(g.callback=null,g=h,typeof S!="function")throw Error(n(191,S));S.call(g)}}}var ed={},oi=Ro(ed),td=Ro(ed),nd=Ro(ed);function Da(o){if(o===ed)throw Error(n(174));return o}function $v(o,l){switch(Dt(nd,l),Dt(td,o),Dt(oi,ed),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:an(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=an(l,o)}$t(oi),Dt(oi,l)}function su(){$t(oi),$t(td),$t(nd)}function Jb(o){Da(nd.current);var l=Da(oi.current),h=an(l,o.type);l!==h&&(Dt(td,o),Dt(oi,h))}function zv(o){td.current===o&&($t(oi),$t(td))}var Qt=Ro(0);function Mh(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Hv=[];function Uv(){for(var o=0;o<Hv.length;o++)Hv[o]._workInProgressVersionPrimary=null;Hv.length=0}var Oh=T.ReactCurrentDispatcher,Bv=T.ReactCurrentBatchConfig,ja=0,Jt=null,Tn=null,Dn=null,Lh=!1,rd=!1,sd=0,HO=0;function nr(){throw Error(n(321))}function Wv(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!Ns(o[h],l[h]))return!1;return!0}function qv(o,l,h,g,S,k){if(ja=k,Jt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Oh.current=o===null||o.memoizedState===null?qO:GO,o=h(g,S),rd){k=0;do{if(rd=!1,sd=0,25<=k)throw Error(n(301));k+=1,Dn=Tn=null,l.updateQueue=null,Oh.current=KO,o=h(g,S)}while(rd)}if(Oh.current=jh,l=Tn!==null&&Tn.next!==null,ja=0,Dn=Tn=Jt=null,Lh=!1,l)throw Error(n(300));return o}function Gv(){var o=sd!==0;return sd=0,o}function ai(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dn===null?Jt.memoizedState=Dn=o:Dn=Dn.next=o,Dn}function ws(){if(Tn===null){var o=Jt.alternate;o=o!==null?o.memoizedState:null}else o=Tn.next;var l=Dn===null?Jt.memoizedState:Dn.next;if(l!==null)Dn=l,Tn=o;else{if(o===null)throw Error(n(310));Tn=o,o={memoizedState:Tn.memoizedState,baseState:Tn.baseState,baseQueue:Tn.baseQueue,queue:Tn.queue,next:null},Dn===null?Jt.memoizedState=Dn=o:Dn=Dn.next=o}return Dn}function id(o,l){return typeof l=="function"?l(o):l}function Kv(o){var l=ws(),h=l.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=o;var g=Tn,S=g.baseQueue,k=h.pending;if(k!==null){if(S!==null){var M=S.next;S.next=k.next,k.next=M}g.baseQueue=S=k,h.pending=null}if(S!==null){k=S.next,g=g.baseState;var $=M=null,B=null,re=k;do{var ve=re.lane;if((ja&ve)===ve)B!==null&&(B=B.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),g=re.hasEagerState?re.eagerState:o(g,re.action);else{var _e={lane:ve,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};B===null?($=B=_e,M=g):B=B.next=_e,Jt.lanes|=ve,Fa|=ve}re=re.next}while(re!==null&&re!==k);B===null?M=g:B.next=$,Ns(g,l.memoizedState)||(Mr=!0),l.memoizedState=g,l.baseState=M,l.baseQueue=B,h.lastRenderedState=g}if(o=h.interleaved,o!==null){S=o;do k=S.lane,Jt.lanes|=k,Fa|=k,S=S.next;while(S!==o)}else S===null&&(h.lanes=0);return[l.memoizedState,h.dispatch]}function Zv(o){var l=ws(),h=l.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=o;var g=h.dispatch,S=h.pending,k=l.memoizedState;if(S!==null){h.pending=null;var M=S=S.next;do k=o(k,M.action),M=M.next;while(M!==S);Ns(k,l.memoizedState)||(Mr=!0),l.memoizedState=k,l.baseQueue===null&&(l.baseState=k),h.lastRenderedState=k}return[k,g]}function eS(){}function tS(o,l){var h=Jt,g=ws(),S=l(),k=!Ns(g.memoizedState,S);if(k&&(g.memoizedState=S,Mr=!0),g=g.queue,Yv(sS.bind(null,h,g,o),[o]),g.getSnapshot!==l||k||Dn!==null&&Dn.memoizedState.tag&1){if(h.flags|=2048,od(9,rS.bind(null,h,g,S,l),void 0,null),jn===null)throw Error(n(349));(ja&30)!==0||nS(h,l,S)}return S}function nS(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=Jt.updateQueue,l===null?(l={lastEffect:null,stores:null},Jt.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function rS(o,l,h,g){l.value=h,l.getSnapshot=g,iS(l)&&oS(o)}function sS(o,l,h){return h(function(){iS(l)&&oS(o)})}function iS(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!Ns(o,h)}catch{return!0}}function oS(o){var l=Ui(o,1);l!==null&&$s(l,o,1,-1)}function aS(o){var l=ai();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:id,lastRenderedState:o},l.queue=o,o=o.dispatch=WO.bind(null,Jt,o),[l.memoizedState,o]}function od(o,l,h,g){return o={tag:o,create:l,destroy:h,deps:g,next:null},l=Jt.updateQueue,l===null?(l={lastEffect:null,stores:null},Jt.updateQueue=l,l.lastEffect=o.next=o):(h=l.lastEffect,h===null?l.lastEffect=o.next=o:(g=h.next,h.next=o,o.next=g,l.lastEffect=o)),o}function lS(){return ws().memoizedState}function Nh(o,l,h,g){var S=ai();Jt.flags|=o,S.memoizedState=od(1|l,h,void 0,g===void 0?null:g)}function Dh(o,l,h,g){var S=ws();g=g===void 0?null:g;var k=void 0;if(Tn!==null){var M=Tn.memoizedState;if(k=M.destroy,g!==null&&Wv(g,M.deps)){S.memoizedState=od(l,h,k,g);return}}Jt.flags|=o,S.memoizedState=od(1|l,h,k,g)}function uS(o,l){return Nh(8390656,8,o,l)}function Yv(o,l){return Dh(2048,8,o,l)}function cS(o,l){return Dh(4,2,o,l)}function dS(o,l){return Dh(4,4,o,l)}function fS(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function hS(o,l,h){return h=h!=null?h.concat([o]):null,Dh(4,4,fS.bind(null,l,o),h)}function Xv(){}function pS(o,l){var h=ws();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&Wv(l,g[1])?g[0]:(h.memoizedState=[o,l],o)}function mS(o,l){var h=ws();l=l===void 0?null:l;var g=h.memoizedState;return g!==null&&l!==null&&Wv(l,g[1])?g[0]:(o=o(),h.memoizedState=[o,l],o)}function vS(o,l,h){return(ja&21)===0?(o.baseState&&(o.baseState=!1,Mr=!0),o.memoizedState=h):(Ns(h,l)||(h=Nc(),Jt.lanes|=h,Fa|=h,o.baseState=!0),l)}function UO(o,l){var h=le;le=h!==0&&4>h?h:4,o(!0);var g=Bv.transition;Bv.transition={};try{o(!1),l()}finally{le=h,Bv.transition=g}}function gS(){return ws().memoizedState}function BO(o,l,h){var g=Vo(o);if(h={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null},yS(o))_S(l,h);else if(h=Zb(o,l,h,g),h!==null){var S=vr();$s(h,o,g,S),xS(h,l,g)}}function WO(o,l,h){var g=Vo(o),S={lane:g,action:h,hasEagerState:!1,eagerState:null,next:null};if(yS(o))_S(l,S);else{var k=o.alternate;if(o.lanes===0&&(k===null||k.lanes===0)&&(k=l.lastRenderedReducer,k!==null))try{var M=l.lastRenderedState,$=k(M,h);if(S.hasEagerState=!0,S.eagerState=$,Ns($,M)){var B=l.interleaved;B===null?(S.next=S,Fv(l)):(S.next=B.next,B.next=S),l.interleaved=S;return}}catch{}finally{}h=Zb(o,l,S,g),h!==null&&(S=vr(),$s(h,o,g,S),xS(h,l,g))}}function yS(o){var l=o.alternate;return o===Jt||l!==null&&l===Jt}function _S(o,l){rd=Lh=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function xS(o,l,h){if((h&4194240)!==0){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,he(o,h)}}var jh={readContext:xs,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},qO={readContext:xs,useCallback:function(o,l){return ai().memoizedState=[o,l===void 0?null:l],o},useContext:xs,useEffect:uS,useImperativeHandle:function(o,l,h){return h=h!=null?h.concat([o]):null,Nh(4194308,4,fS.bind(null,l,o),h)},useLayoutEffect:function(o,l){return Nh(4194308,4,o,l)},useInsertionEffect:function(o,l){return Nh(4,2,o,l)},useMemo:function(o,l){var h=ai();return l=l===void 0?null:l,o=o(),h.memoizedState=[o,l],o},useReducer:function(o,l,h){var g=ai();return l=h!==void 0?h(l):l,g.memoizedState=g.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},g.queue=o,o=o.dispatch=BO.bind(null,Jt,o),[g.memoizedState,o]},useRef:function(o){var l=ai();return o={current:o},l.memoizedState=o},useState:aS,useDebugValue:Xv,useDeferredValue:function(o){return ai().memoizedState=o},useTransition:function(){var o=aS(!1),l=o[0];return o=UO.bind(null,o[1]),ai().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,h){var g=Jt,S=ai();if(Wt){if(h===void 0)throw Error(n(407));h=h()}else{if(h=l(),jn===null)throw Error(n(349));(ja&30)!==0||nS(g,l,h)}S.memoizedState=h;var k={value:h,getSnapshot:l};return S.queue=k,uS(sS.bind(null,g,k,o),[o]),g.flags|=2048,od(9,rS.bind(null,g,k,h,l),void 0,null),h},useId:function(){var o=ai(),l=jn.identifierPrefix;if(Wt){var h=Hi,g=zi;h=(g&~(1<<32-Nn(g)-1)).toString(32)+h,l=":"+l+"R"+h,h=sd++,0<h&&(l+="H"+h.toString(32)),l+=":"}else h=HO++,l=":"+l+"r"+h.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},GO={readContext:xs,useCallback:pS,useContext:xs,useEffect:Yv,useImperativeHandle:hS,useInsertionEffect:cS,useLayoutEffect:dS,useMemo:mS,useReducer:Kv,useRef:lS,useState:function(){return Kv(id)},useDebugValue:Xv,useDeferredValue:function(o){var l=ws();return vS(l,Tn.memoizedState,o)},useTransition:function(){var o=Kv(id)[0],l=ws().memoizedState;return[o,l]},useMutableSource:eS,useSyncExternalStore:tS,useId:gS,unstable_isNewReconciler:!1},KO={readContext:xs,useCallback:pS,useContext:xs,useEffect:Yv,useImperativeHandle:hS,useInsertionEffect:cS,useLayoutEffect:dS,useMemo:mS,useReducer:Zv,useRef:lS,useState:function(){return Zv(id)},useDebugValue:Xv,useDeferredValue:function(o){var l=ws();return Tn===null?l.memoizedState=o:vS(l,Tn.memoizedState,o)},useTransition:function(){var o=Zv(id)[0],l=ws().memoizedState;return[o,l]},useMutableSource:eS,useSyncExternalStore:tS,useId:gS,unstable_isNewReconciler:!1};function js(o,l){if(o&&o.defaultProps){l=H({},l),o=o.defaultProps;for(var h in o)l[h]===void 0&&(l[h]=o[h]);return l}return l}function Qv(o,l,h,g){l=o.memoizedState,h=h(g,l),h=h==null?l:H({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var Fh={isMounted:function(o){return(o=o._reactInternals)?Fi(o)===o:!1},enqueueSetState:function(o,l,h){o=o._reactInternals;var g=vr(),S=Vo(o),k=Bi(g,S);k.payload=l,h!=null&&(k.callback=h),l=No(o,k,S),l!==null&&($s(l,o,S,g),Ih(l,o,S))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var g=vr(),S=Vo(o),k=Bi(g,S);k.tag=1,k.payload=l,h!=null&&(k.callback=h),l=No(o,k,S),l!==null&&($s(l,o,S,g),Ih(l,o,S))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=vr(),g=Vo(o),S=Bi(h,g);S.tag=2,l!=null&&(S.callback=l),l=No(o,S,g),l!==null&&($s(l,o,g,h),Ih(l,o,g))}};function wS(o,l,h,g,S,k,M){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,k,M):l.prototype&&l.prototype.isPureReactComponent?!qc(h,g)||!qc(S,k):!0}function bS(o,l,h){var g=!1,S=Mo,k=l.contextType;return typeof k=="object"&&k!==null?k=xs(k):(S=Rr(l)?Ma:tr.current,g=l.contextTypes,k=(g=g!=null)?Xl(o,S):Mo),l=new l(h,k),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Fh,o.stateNode=l,l._reactInternals=o,g&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=S,o.__reactInternalMemoizedMaskedChildContext=k),l}function SS(o,l,h,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,g),l.state!==o&&Fh.enqueueReplaceState(l,l.state,null)}function Jv(o,l,h,g){var S=o.stateNode;S.props=h,S.state=o.memoizedState,S.refs={},Vv(o);var k=l.contextType;typeof k=="object"&&k!==null?S.context=xs(k):(k=Rr(l)?Ma:tr.current,S.context=Xl(o,k)),S.state=o.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(Qv(o,l,k,h),S.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(l=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),l!==S.state&&Fh.enqueueReplaceState(S,S.state,null),Rh(o,h,S,g),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4194308)}function iu(o,l){try{var h="",g=l;do h+=se(g),g=g.return;while(g);var S=h}catch(k){S=`
|
|
41
|
-
Error generating stack: `+k.message+`
|
|
42
|
-
`+k.stack}return{value:o,source:l,stack:S,digest:null}}function eg(o,l,h){return{value:o,source:null,stack:h??null,digest:l??null}}function tg(o,l){try{console.error(l.value)}catch(h){setTimeout(function(){throw h})}}var ZO=typeof WeakMap=="function"?WeakMap:Map;function ES(o,l,h){h=Bi(-1,h),h.tag=3,h.payload={element:null};var g=l.value;return h.callback=function(){Wh||(Wh=!0,vg=g),tg(o,l)},h}function CS(o,l,h){h=Bi(-1,h),h.tag=3;var g=o.type.getDerivedStateFromError;if(typeof g=="function"){var S=l.value;h.payload=function(){return g(S)},h.callback=function(){tg(o,l)}}var k=o.stateNode;return k!==null&&typeof k.componentDidCatch=="function"&&(h.callback=function(){tg(o,l),typeof g!="function"&&(jo===null?jo=new Set([this]):jo.add(this));var M=l.stack;this.componentDidCatch(l.value,{componentStack:M!==null?M:""})}),h}function kS(o,l,h){var g=o.pingCache;if(g===null){g=o.pingCache=new ZO;var S=new Set;g.set(l,S)}else S=g.get(l),S===void 0&&(S=new Set,g.set(l,S));S.has(h)||(S.add(h),o=uL.bind(null,o,l,h),l.then(o,o))}function PS(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function TS(o,l,h,g,S){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(l=Bi(-1,1),l.tag=2,No(h,l,1))),h.lanes|=1),o):(o.flags|=65536,o.lanes=S,o)}var YO=T.ReactCurrentOwner,Mr=!1;function mr(o,l,h,g){l.child=o===null?Kb(l,null,h,g):tu(l,o.child,h,g)}function AS(o,l,h,g,S){h=h.render;var k=l.ref;return ru(l,S),g=qv(o,l,h,g,k,S),h=Gv(),o!==null&&!Mr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~S,Wi(o,l,S)):(Wt&&h&&Av(l),l.flags|=1,mr(o,l,g,S),l.child)}function IS(o,l,h,g,S){if(o===null){var k=h.type;return typeof k=="function"&&!Sg(k)&&k.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(l.tag=15,l.type=k,RS(o,l,k,g,S)):(o=Xh(h.type,null,g,l,l.mode,S),o.ref=l.ref,o.return=l,l.child=o)}if(k=o.child,(o.lanes&S)===0){var M=k.memoizedProps;if(h=h.compare,h=h!==null?h:qc,h(M,g)&&o.ref===l.ref)return Wi(o,l,S)}return l.flags|=1,o=zo(k,g),o.ref=l.ref,o.return=l,l.child=o}function RS(o,l,h,g,S){if(o!==null){var k=o.memoizedProps;if(qc(k,g)&&o.ref===l.ref)if(Mr=!1,l.pendingProps=g=k,(o.lanes&S)!==0)(o.flags&131072)!==0&&(Mr=!0);else return l.lanes=o.lanes,Wi(o,l,S)}return ng(o,l,h,g,S)}function MS(o,l,h){var g=l.pendingProps,S=g.children,k=o!==null?o.memoizedState:null;if(g.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt(au,Qr),Qr|=h;else{if((h&1073741824)===0)return o=k!==null?k.baseLanes|h:h,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,Dt(au,Qr),Qr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=k!==null?k.baseLanes:h,Dt(au,Qr),Qr|=g}else k!==null?(g=k.baseLanes|h,l.memoizedState=null):g=h,Dt(au,Qr),Qr|=g;return mr(o,l,S,h),l.child}function OS(o,l){var h=l.ref;(o===null&&h!==null||o!==null&&o.ref!==h)&&(l.flags|=512,l.flags|=2097152)}function ng(o,l,h,g,S){var k=Rr(h)?Ma:tr.current;return k=Xl(l,k),ru(l,S),h=qv(o,l,h,g,k,S),g=Gv(),o!==null&&!Mr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~S,Wi(o,l,S)):(Wt&&g&&Av(l),l.flags|=1,mr(o,l,h,S),l.child)}function LS(o,l,h,g,S){if(Rr(h)){var k=!0;bh(l)}else k=!1;if(ru(l,S),l.stateNode===null)$h(o,l),bS(l,h,g),Jv(l,h,g,S),g=!0;else if(o===null){var M=l.stateNode,$=l.memoizedProps;M.props=$;var B=M.context,re=h.contextType;typeof re=="object"&&re!==null?re=xs(re):(re=Rr(h)?Ma:tr.current,re=Xl(l,re));var ve=h.getDerivedStateFromProps,_e=typeof ve=="function"||typeof M.getSnapshotBeforeUpdate=="function";_e||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||($!==g||B!==re)&&SS(l,M,g,re),Lo=!1;var me=l.memoizedState;M.state=me,Rh(l,g,M,S),B=l.memoizedState,$!==g||me!==B||Ir.current||Lo?(typeof ve=="function"&&(Qv(l,h,ve,g),B=l.memoizedState),($=Lo||wS(l,h,$,g,me,B,re))?(_e||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(l.flags|=4194308)):(typeof M.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=B),M.props=g,M.state=B,M.context=re,g=$):(typeof M.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{M=l.stateNode,Yb(o,l),$=l.memoizedProps,re=l.type===l.elementType?$:js(l.type,$),M.props=re,_e=l.pendingProps,me=M.context,B=h.contextType,typeof B=="object"&&B!==null?B=xs(B):(B=Rr(h)?Ma:tr.current,B=Xl(l,B));var Pe=h.getDerivedStateFromProps;(ve=typeof Pe=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||($!==_e||me!==B)&&SS(l,M,g,B),Lo=!1,me=l.memoizedState,M.state=me,Rh(l,g,M,S);var Me=l.memoizedState;$!==_e||me!==Me||Ir.current||Lo?(typeof Pe=="function"&&(Qv(l,h,Pe,g),Me=l.memoizedState),(re=Lo||wS(l,h,re,g,me,Me,B)||!1)?(ve||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(g,Me,B),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(g,Me,B)),typeof M.componentDidUpdate=="function"&&(l.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof M.componentDidUpdate!="function"||$===o.memoizedProps&&me===o.memoizedState||(l.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&me===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=Me),M.props=g,M.state=Me,M.context=B,g=re):(typeof M.componentDidUpdate!="function"||$===o.memoizedProps&&me===o.memoizedState||(l.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&me===o.memoizedState||(l.flags|=1024),g=!1)}return rg(o,l,h,g,k,S)}function rg(o,l,h,g,S,k){OS(o,l);var M=(l.flags&128)!==0;if(!g&&!M)return S&&Vb(l,h,!1),Wi(o,l,k);g=l.stateNode,YO.current=l;var $=M&&typeof h.getDerivedStateFromError!="function"?null:g.render();return l.flags|=1,o!==null&&M?(l.child=tu(l,o.child,null,k),l.child=tu(l,null,$,k)):mr(o,l,$,k),l.memoizedState=g.state,S&&Vb(l,h,!0),l.child}function NS(o){var l=o.stateNode;l.pendingContext?jb(o,l.pendingContext,l.pendingContext!==l.context):l.context&&jb(o,l.context,!1),$v(o,l.containerInfo)}function DS(o,l,h,g,S){return eu(),Ov(S),l.flags|=256,mr(o,l,h,g),l.child}var sg={dehydrated:null,treeContext:null,retryLane:0};function ig(o){return{baseLanes:o,cachePool:null,transitions:null}}function jS(o,l,h){var g=l.pendingProps,S=Qt.current,k=!1,M=(l.flags&128)!==0,$;if(($=M)||($=o!==null&&o.memoizedState===null?!1:(S&2)!==0),$?(k=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(S|=1),Dt(Qt,S&1),o===null)return Mv(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(M=g.children,o=g.fallback,k?(g=l.mode,k=l.child,M={mode:"hidden",children:M},(g&1)===0&&k!==null?(k.childLanes=0,k.pendingProps=M):k=Qh(M,g,0,null),o=Ha(o,g,h,null),k.return=l,o.return=l,k.sibling=o,l.child=k,l.child.memoizedState=ig(h),l.memoizedState=sg,o):og(l,M));if(S=o.memoizedState,S!==null&&($=S.dehydrated,$!==null))return XO(o,l,M,g,$,S,h);if(k){k=g.fallback,M=l.mode,S=o.child,$=S.sibling;var B={mode:"hidden",children:g.children};return(M&1)===0&&l.child!==S?(g=l.child,g.childLanes=0,g.pendingProps=B,l.deletions=null):(g=zo(S,B),g.subtreeFlags=S.subtreeFlags&14680064),$!==null?k=zo($,k):(k=Ha(k,M,h,null),k.flags|=2),k.return=l,g.return=l,g.sibling=k,l.child=g,g=k,k=l.child,M=o.child.memoizedState,M=M===null?ig(h):{baseLanes:M.baseLanes|h,cachePool:null,transitions:M.transitions},k.memoizedState=M,k.childLanes=o.childLanes&~h,l.memoizedState=sg,g}return k=o.child,o=k.sibling,g=zo(k,{mode:"visible",children:g.children}),(l.mode&1)===0&&(g.lanes=h),g.return=l,g.sibling=null,o!==null&&(h=l.deletions,h===null?(l.deletions=[o],l.flags|=16):h.push(o)),l.child=g,l.memoizedState=null,g}function og(o,l){return l=Qh({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Vh(o,l,h,g){return g!==null&&Ov(g),tu(l,o.child,null,h),o=og(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function XO(o,l,h,g,S,k,M){if(h)return l.flags&256?(l.flags&=-257,g=eg(Error(n(422))),Vh(o,l,M,g)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(k=g.fallback,S=l.mode,g=Qh({mode:"visible",children:g.children},S,0,null),k=Ha(k,S,M,null),k.flags|=2,g.return=l,k.return=l,g.sibling=k,l.child=g,(l.mode&1)!==0&&tu(l,o.child,null,M),l.child.memoizedState=ig(M),l.memoizedState=sg,k);if((l.mode&1)===0)return Vh(o,l,M,null);if(S.data==="$!"){if(g=S.nextSibling&&S.nextSibling.dataset,g)var $=g.dgst;return g=$,k=Error(n(419)),g=eg(k,g,void 0),Vh(o,l,M,g)}if($=(M&o.childLanes)!==0,Mr||$){if(g=jn,g!==null){switch(M&-M){case 4:S=2;break;case 16:S=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:S=32;break;case 536870912:S=268435456;break;default:S=0}S=(S&(g.suspendedLanes|M))!==0?0:S,S!==0&&S!==k.retryLane&&(k.retryLane=S,Ui(o,S),$s(g,o,S,-1))}return bg(),g=eg(Error(n(421))),Vh(o,l,M,g)}return S.data==="$?"?(l.flags|=128,l.child=o.child,l=cL.bind(null,o),S._reactRetry=l,null):(o=k.treeContext,Xr=Io(S.nextSibling),Yr=l,Wt=!0,Ds=null,o!==null&&(ys[_s++]=zi,ys[_s++]=Hi,ys[_s++]=Oa,zi=o.id,Hi=o.overflow,Oa=l),l=og(l,g.children),l.flags|=4096,l)}function FS(o,l,h){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),jv(o.return,l,h)}function ag(o,l,h,g,S){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:S}:(k.isBackwards=l,k.rendering=null,k.renderingStartTime=0,k.last=g,k.tail=h,k.tailMode=S)}function VS(o,l,h){var g=l.pendingProps,S=g.revealOrder,k=g.tail;if(mr(o,l,g.children,h),g=Qt.current,(g&2)!==0)g=g&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&FS(o,h,l);else if(o.tag===19)FS(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}g&=1}if(Dt(Qt,g),(l.mode&1)===0)l.memoizedState=null;else switch(S){case"forwards":for(h=l.child,S=null;h!==null;)o=h.alternate,o!==null&&Mh(o)===null&&(S=h),h=h.sibling;h=S,h===null?(S=l.child,l.child=null):(S=h.sibling,h.sibling=null),ag(l,!1,S,h,k);break;case"backwards":for(h=null,S=l.child,l.child=null;S!==null;){if(o=S.alternate,o!==null&&Mh(o)===null){l.child=S;break}o=S.sibling,S.sibling=h,h=S,S=o}ag(l,!0,h,null,k);break;case"together":ag(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function $h(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Wi(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),Fa|=l.lanes,(h&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,h=zo(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=zo(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function QO(o,l,h){switch(l.tag){case 3:NS(l),eu();break;case 5:Jb(l);break;case 1:Rr(l.type)&&bh(l);break;case 4:$v(l,l.stateNode.containerInfo);break;case 10:var g=l.type._context,S=l.memoizedProps.value;Dt(Th,g._currentValue),g._currentValue=S;break;case 13:if(g=l.memoizedState,g!==null)return g.dehydrated!==null?(Dt(Qt,Qt.current&1),l.flags|=128,null):(h&l.child.childLanes)!==0?jS(o,l,h):(Dt(Qt,Qt.current&1),o=Wi(o,l,h),o!==null?o.sibling:null);Dt(Qt,Qt.current&1);break;case 19:if(g=(h&l.childLanes)!==0,(o.flags&128)!==0){if(g)return VS(o,l,h);l.flags|=128}if(S=l.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),Dt(Qt,Qt.current),g)break;return null;case 22:case 23:return l.lanes=0,MS(o,l,h)}return Wi(o,l,h)}var $S,lg,zS,HS;$S=function(o,l){for(var h=l.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===l)break;for(;h.sibling===null;){if(h.return===null||h.return===l)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},lg=function(){},zS=function(o,l,h,g){var S=o.memoizedProps;if(S!==g){o=l.stateNode,Da(oi.current);var k=null;switch(h){case"input":S=ct(o,S),g=ct(o,g),k=[];break;case"select":S=H({},S,{value:void 0}),g=H({},g,{value:void 0}),k=[];break;case"textarea":S=xe(o,S),g=xe(o,g),k=[];break;default:typeof S.onClick!="function"&&typeof g.onClick=="function"&&(o.onclick=_h)}ps(h,g);var M;h=null;for(re in S)if(!g.hasOwnProperty(re)&&S.hasOwnProperty(re)&&S[re]!=null)if(re==="style"){var $=S[re];for(M in $)$.hasOwnProperty(M)&&(h||(h={}),h[M]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(s.hasOwnProperty(re)?k||(k=[]):(k=k||[]).push(re,null));for(re in g){var B=g[re];if($=S!=null?S[re]:void 0,g.hasOwnProperty(re)&&B!==$&&(B!=null||$!=null))if(re==="style")if($){for(M in $)!$.hasOwnProperty(M)||B&&B.hasOwnProperty(M)||(h||(h={}),h[M]="");for(M in B)B.hasOwnProperty(M)&&$[M]!==B[M]&&(h||(h={}),h[M]=B[M])}else h||(k||(k=[]),k.push(re,h)),h=B;else re==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,$=$?$.__html:void 0,B!=null&&$!==B&&(k=k||[]).push(re,B)):re==="children"?typeof B!="string"&&typeof B!="number"||(k=k||[]).push(re,""+B):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(s.hasOwnProperty(re)?(B!=null&&re==="onScroll"&&Vt("scroll",o),k||$===B||(k=[])):(k=k||[]).push(re,B))}h&&(k=k||[]).push("style",h);var re=k;(l.updateQueue=re)&&(l.flags|=4)}},HS=function(o,l,h,g){h!==g&&(l.flags|=4)};function ad(o,l){if(!Wt)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function rr(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,g=0;if(l)for(var S=o.child;S!==null;)h|=S.lanes|S.childLanes,g|=S.subtreeFlags&14680064,g|=S.flags&14680064,S.return=o,S=S.sibling;else for(S=o.child;S!==null;)h|=S.lanes|S.childLanes,g|=S.subtreeFlags,g|=S.flags,S.return=o,S=S.sibling;return o.subtreeFlags|=g,o.childLanes=h,l}function JO(o,l,h){var g=l.pendingProps;switch(Iv(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rr(l),null;case 1:return Rr(l.type)&&wh(),rr(l),null;case 3:return g=l.stateNode,su(),$t(Ir),$t(tr),Uv(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(o===null||o.child===null)&&(kh(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Ds!==null&&(_g(Ds),Ds=null))),lg(o,l),rr(l),null;case 5:zv(l);var S=Da(nd.current);if(h=l.type,o!==null&&l.stateNode!=null)zS(o,l,h,g,S),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!g){if(l.stateNode===null)throw Error(n(166));return rr(l),null}if(o=Da(oi.current),kh(l)){g=l.stateNode,h=l.type;var k=l.memoizedProps;switch(g[ii]=l,g[Xc]=k,o=(l.mode&1)!==0,h){case"dialog":Vt("cancel",g),Vt("close",g);break;case"iframe":case"object":case"embed":Vt("load",g);break;case"video":case"audio":for(S=0;S<Kc.length;S++)Vt(Kc[S],g);break;case"source":Vt("error",g);break;case"img":case"image":case"link":Vt("error",g),Vt("load",g);break;case"details":Vt("toggle",g);break;case"input":Kt(g,k),Vt("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!k.multiple},Vt("invalid",g);break;case"textarea":on(g,k),Vt("invalid",g)}ps(h,k),S=null;for(var M in k)if(k.hasOwnProperty(M)){var $=k[M];M==="children"?typeof $=="string"?g.textContent!==$&&(k.suppressHydrationWarning!==!0&&yh(g.textContent,$,o),S=["children",$]):typeof $=="number"&&g.textContent!==""+$&&(k.suppressHydrationWarning!==!0&&yh(g.textContent,$,o),S=["children",""+$]):s.hasOwnProperty(M)&&$!=null&&M==="onScroll"&&Vt("scroll",g)}switch(h){case"input":We(g),Ne(g,k,!0);break;case"textarea":We(g),Kr(g);break;case"select":case"option":break;default:typeof k.onClick=="function"&&(g.onclick=_h)}g=S,l.updateQueue=g,g!==null&&(l.flags|=4)}else{M=S.nodeType===9?S:S.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=Pa(h)),o==="http://www.w3.org/1999/xhtml"?h==="script"?(o=M.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof g.is=="string"?o=M.createElement(h,{is:g.is}):(o=M.createElement(h),h==="select"&&(M=o,g.multiple?M.multiple=!0:g.size&&(M.size=g.size))):o=M.createElementNS(o,h),o[ii]=l,o[Xc]=g,$S(o,l,!1,!1),l.stateNode=o;e:{switch(M=Co(h,g),h){case"dialog":Vt("cancel",o),Vt("close",o),S=g;break;case"iframe":case"object":case"embed":Vt("load",o),S=g;break;case"video":case"audio":for(S=0;S<Kc.length;S++)Vt(Kc[S],o);S=g;break;case"source":Vt("error",o),S=g;break;case"img":case"image":case"link":Vt("error",o),Vt("load",o),S=g;break;case"details":Vt("toggle",o),S=g;break;case"input":Kt(o,g),S=ct(o,g),Vt("invalid",o);break;case"option":S=g;break;case"select":o._wrapperState={wasMultiple:!!g.multiple},S=H({},g,{value:void 0}),Vt("invalid",o);break;case"textarea":on(o,g),S=xe(o,g),Vt("invalid",o);break;default:S=g}ps(h,S),$=S;for(k in $)if($.hasOwnProperty(k)){var B=$[k];k==="style"?ti(o,B):k==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&Ta(o,B)):k==="children"?typeof B=="string"?(h!=="textarea"||B!=="")&&fr(o,B):typeof B=="number"&&fr(o,""+B):k!=="suppressContentEditableWarning"&&k!=="suppressHydrationWarning"&&k!=="autoFocus"&&(s.hasOwnProperty(k)?B!=null&&k==="onScroll"&&Vt("scroll",o):B!=null&&P(o,k,B,M))}switch(h){case"input":We(o),Ne(o,g,!1);break;case"textarea":We(o),Kr(o);break;case"option":g.value!=null&&o.setAttribute("value",""+ce(g.value));break;case"select":o.multiple=!!g.multiple,k=g.value,k!=null?vt(o,!!g.multiple,k,!1):g.defaultValue!=null&&vt(o,!!g.multiple,g.defaultValue,!0);break;default:typeof S.onClick=="function"&&(o.onclick=_h)}switch(h){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return rr(l),null;case 6:if(o&&l.stateNode!=null)HS(o,l,o.memoizedProps,g);else{if(typeof g!="string"&&l.stateNode===null)throw Error(n(166));if(h=Da(nd.current),Da(oi.current),kh(l)){if(g=l.stateNode,h=l.memoizedProps,g[ii]=l,(k=g.nodeValue!==h)&&(o=Yr,o!==null))switch(o.tag){case 3:yh(g.nodeValue,h,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&yh(g.nodeValue,h,(o.mode&1)!==0)}k&&(l.flags|=4)}else g=(h.nodeType===9?h:h.ownerDocument).createTextNode(g),g[ii]=l,l.stateNode=g}return rr(l),null;case 13:if($t(Qt),g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(Wt&&Xr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)Wb(),eu(),l.flags|=98560,k=!1;else if(k=kh(l),g!==null&&g.dehydrated!==null){if(o===null){if(!k)throw Error(n(318));if(k=l.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[ii]=l}else eu(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;rr(l),k=!1}else Ds!==null&&(_g(Ds),Ds=null),k=!0;if(!k)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=h,l):(g=g!==null,g!==(o!==null&&o.memoizedState!==null)&&g&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(Qt.current&1)!==0?An===0&&(An=3):bg())),l.updateQueue!==null&&(l.flags|=4),rr(l),null);case 4:return su(),lg(o,l),o===null&&Zc(l.stateNode.containerInfo),rr(l),null;case 10:return Dv(l.type._context),rr(l),null;case 17:return Rr(l.type)&&wh(),rr(l),null;case 19:if($t(Qt),k=l.memoizedState,k===null)return rr(l),null;if(g=(l.flags&128)!==0,M=k.rendering,M===null)if(g)ad(k,!1);else{if(An!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(M=Mh(o),M!==null){for(l.flags|=128,ad(k,!1),g=M.updateQueue,g!==null&&(l.updateQueue=g,l.flags|=4),l.subtreeFlags=0,g=h,h=l.child;h!==null;)k=h,o=g,k.flags&=14680066,M=k.alternate,M===null?(k.childLanes=0,k.lanes=o,k.child=null,k.subtreeFlags=0,k.memoizedProps=null,k.memoizedState=null,k.updateQueue=null,k.dependencies=null,k.stateNode=null):(k.childLanes=M.childLanes,k.lanes=M.lanes,k.child=M.child,k.subtreeFlags=0,k.deletions=null,k.memoizedProps=M.memoizedProps,k.memoizedState=M.memoizedState,k.updateQueue=M.updateQueue,k.type=M.type,o=M.dependencies,k.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),h=h.sibling;return Dt(Qt,Qt.current&1|2),l.child}o=o.sibling}k.tail!==null&&Yt()>lu&&(l.flags|=128,g=!0,ad(k,!1),l.lanes=4194304)}else{if(!g)if(o=Mh(M),o!==null){if(l.flags|=128,g=!0,h=o.updateQueue,h!==null&&(l.updateQueue=h,l.flags|=4),ad(k,!0),k.tail===null&&k.tailMode==="hidden"&&!M.alternate&&!Wt)return rr(l),null}else 2*Yt()-k.renderingStartTime>lu&&h!==1073741824&&(l.flags|=128,g=!0,ad(k,!1),l.lanes=4194304);k.isBackwards?(M.sibling=l.child,l.child=M):(h=k.last,h!==null?h.sibling=M:l.child=M,k.last=M)}return k.tail!==null?(l=k.tail,k.rendering=l,k.tail=l.sibling,k.renderingStartTime=Yt(),l.sibling=null,h=Qt.current,Dt(Qt,g?h&1|2:h&1),l):(rr(l),null);case 22:case 23:return wg(),g=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==g&&(l.flags|=8192),g&&(l.mode&1)!==0?(Qr&1073741824)!==0&&(rr(l),l.subtreeFlags&6&&(l.flags|=8192)):rr(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function eL(o,l){switch(Iv(l),l.tag){case 1:return Rr(l.type)&&wh(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return su(),$t(Ir),$t(tr),Uv(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return zv(l),null;case 13:if($t(Qt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));eu()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return $t(Qt),null;case 4:return su(),null;case 10:return Dv(l.type._context),null;case 22:case 23:return wg(),null;case 24:return null;default:return null}}var zh=!1,sr=!1,tL=typeof WeakSet=="function"?WeakSet:Set,Ae=null;function ou(o,l){var h=o.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(g){cn(o,l,g)}else h.current=null}function ug(o,l,h){try{h()}catch(g){cn(o,l,g)}}var US=!1;function nL(o,l){if(wv=ah,o=wb(),hv(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var g=h.getSelection&&h.getSelection();if(g&&g.rangeCount!==0){h=g.anchorNode;var S=g.anchorOffset,k=g.focusNode;g=g.focusOffset;try{h.nodeType,k.nodeType}catch{h=null;break e}var M=0,$=-1,B=-1,re=0,ve=0,_e=o,me=null;t:for(;;){for(var Pe;_e!==h||S!==0&&_e.nodeType!==3||($=M+S),_e!==k||g!==0&&_e.nodeType!==3||(B=M+g),_e.nodeType===3&&(M+=_e.nodeValue.length),(Pe=_e.firstChild)!==null;)me=_e,_e=Pe;for(;;){if(_e===o)break t;if(me===h&&++re===S&&($=M),me===k&&++ve===g&&(B=M),(Pe=_e.nextSibling)!==null)break;_e=me,me=_e.parentNode}_e=Pe}h=$===-1||B===-1?null:{start:$,end:B}}else h=null}h=h||{start:0,end:0}}else h=null;for(bv={focusedElem:o,selectionRange:h},ah=!1,Ae=l;Ae!==null;)if(l=Ae,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Ae=o;else for(;Ae!==null;){l=Ae;try{var Me=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var Le=Me.memoizedProps,vn=Me.memoizedState,ee=l.stateNode,K=ee.getSnapshotBeforeUpdate(l.elementType===l.type?Le:js(l.type,Le),vn);ee.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var te=l.stateNode.containerInfo;te.nodeType===1?te.textContent="":te.nodeType===9&&te.documentElement&&te.removeChild(te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(be){cn(l,l.return,be)}if(o=l.sibling,o!==null){o.return=l.return,Ae=o;break}Ae=l.return}return Me=US,US=!1,Me}function ld(o,l,h){var g=l.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var S=g=g.next;do{if((S.tag&o)===o){var k=S.destroy;S.destroy=void 0,k!==void 0&&ug(l,h,k)}S=S.next}while(S!==g)}}function Hh(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var h=l=l.next;do{if((h.tag&o)===o){var g=h.create;h.destroy=g()}h=h.next}while(h!==l)}}function cg(o){var l=o.ref;if(l!==null){var h=o.stateNode;switch(o.tag){case 5:o=h;break;default:o=h}typeof l=="function"?l(o):l.current=o}}function BS(o){var l=o.alternate;l!==null&&(o.alternate=null,BS(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[ii],delete l[Xc],delete l[kv],delete l[FO],delete l[VO])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function WS(o){return o.tag===5||o.tag===3||o.tag===4}function qS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||WS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function dg(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?h.nodeType===8?h.parentNode.insertBefore(o,l):h.insertBefore(o,l):(h.nodeType===8?(l=h.parentNode,l.insertBefore(o,h)):(l=h,l.appendChild(o)),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=_h));else if(g!==4&&(o=o.child,o!==null))for(dg(o,l,h),o=o.sibling;o!==null;)dg(o,l,h),o=o.sibling}function fg(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?h.insertBefore(o,l):h.appendChild(o);else if(g!==4&&(o=o.child,o!==null))for(fg(o,l,h),o=o.sibling;o!==null;)fg(o,l,h),o=o.sibling}var Wn=null,Fs=!1;function Do(o,l,h){for(h=h.child;h!==null;)GS(o,l,h),h=h.sibling}function GS(o,l,h){if(vs&&typeof vs.onCommitFiberUnmount=="function")try{vs.onCommitFiberUnmount(Aa,h)}catch{}switch(h.tag){case 5:sr||ou(h,l);case 6:var g=Wn,S=Fs;Wn=null,Do(o,l,h),Wn=g,Fs=S,Wn!==null&&(Fs?(o=Wn,h=h.stateNode,o.nodeType===8?o.parentNode.removeChild(h):o.removeChild(h)):Wn.removeChild(h.stateNode));break;case 18:Wn!==null&&(Fs?(o=Wn,h=h.stateNode,o.nodeType===8?Cv(o.parentNode,h):o.nodeType===1&&Cv(o,h),$c(o)):Cv(Wn,h.stateNode));break;case 4:g=Wn,S=Fs,Wn=h.stateNode.containerInfo,Fs=!0,Do(o,l,h),Wn=g,Fs=S;break;case 0:case 11:case 14:case 15:if(!sr&&(g=h.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){S=g=g.next;do{var k=S,M=k.destroy;k=k.tag,M!==void 0&&((k&2)!==0||(k&4)!==0)&&ug(h,l,M),S=S.next}while(S!==g)}Do(o,l,h);break;case 1:if(!sr&&(ou(h,l),g=h.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=h.memoizedProps,g.state=h.memoizedState,g.componentWillUnmount()}catch($){cn(h,l,$)}Do(o,l,h);break;case 21:Do(o,l,h);break;case 22:h.mode&1?(sr=(g=sr)||h.memoizedState!==null,Do(o,l,h),sr=g):Do(o,l,h);break;default:Do(o,l,h)}}function KS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var h=o.stateNode;h===null&&(h=o.stateNode=new tL),l.forEach(function(g){var S=dL.bind(null,o,g);h.has(g)||(h.add(g),g.then(S,S))})}}function Vs(o,l){var h=l.deletions;if(h!==null)for(var g=0;g<h.length;g++){var S=h[g];try{var k=o,M=l,$=M;e:for(;$!==null;){switch($.tag){case 5:Wn=$.stateNode,Fs=!1;break e;case 3:Wn=$.stateNode.containerInfo,Fs=!0;break e;case 4:Wn=$.stateNode.containerInfo,Fs=!0;break e}$=$.return}if(Wn===null)throw Error(n(160));GS(k,M,S),Wn=null,Fs=!1;var B=S.alternate;B!==null&&(B.return=null),S.return=null}catch(re){cn(S,l,re)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)ZS(l,o),l=l.sibling}function ZS(o,l){var h=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Vs(l,o),li(o),g&4){try{ld(3,o,o.return),Hh(3,o)}catch(Le){cn(o,o.return,Le)}try{ld(5,o,o.return)}catch(Le){cn(o,o.return,Le)}}break;case 1:Vs(l,o),li(o),g&512&&h!==null&&ou(h,h.return);break;case 5:if(Vs(l,o),li(o),g&512&&h!==null&&ou(h,h.return),o.flags&32){var S=o.stateNode;try{fr(S,"")}catch(Le){cn(o,o.return,Le)}}if(g&4&&(S=o.stateNode,S!=null)){var k=o.memoizedProps,M=h!==null?h.memoizedProps:k,$=o.type,B=o.updateQueue;if(o.updateQueue=null,B!==null)try{$==="input"&&k.type==="radio"&&k.name!=null&&rt(S,k),Co($,M);var re=Co($,k);for(M=0;M<B.length;M+=2){var ve=B[M],_e=B[M+1];ve==="style"?ti(S,_e):ve==="dangerouslySetInnerHTML"?Ta(S,_e):ve==="children"?fr(S,_e):P(S,ve,_e,re)}switch($){case"input":Ve(S,k);break;case"textarea":Lt(S,k);break;case"select":var me=S._wrapperState.wasMultiple;S._wrapperState.wasMultiple=!!k.multiple;var Pe=k.value;Pe!=null?vt(S,!!k.multiple,Pe,!1):me!==!!k.multiple&&(k.defaultValue!=null?vt(S,!!k.multiple,k.defaultValue,!0):vt(S,!!k.multiple,k.multiple?[]:"",!1))}S[Xc]=k}catch(Le){cn(o,o.return,Le)}}break;case 6:if(Vs(l,o),li(o),g&4){if(o.stateNode===null)throw Error(n(162));S=o.stateNode,k=o.memoizedProps;try{S.nodeValue=k}catch(Le){cn(o,o.return,Le)}}break;case 3:if(Vs(l,o),li(o),g&4&&h!==null&&h.memoizedState.isDehydrated)try{$c(l.containerInfo)}catch(Le){cn(o,o.return,Le)}break;case 4:Vs(l,o),li(o);break;case 13:Vs(l,o),li(o),S=o.child,S.flags&8192&&(k=S.memoizedState!==null,S.stateNode.isHidden=k,!k||S.alternate!==null&&S.alternate.memoizedState!==null||(mg=Yt())),g&4&&KS(o);break;case 22:if(ve=h!==null&&h.memoizedState!==null,o.mode&1?(sr=(re=sr)||ve,Vs(l,o),sr=re):Vs(l,o),li(o),g&8192){if(re=o.memoizedState!==null,(o.stateNode.isHidden=re)&&!ve&&(o.mode&1)!==0)for(Ae=o,ve=o.child;ve!==null;){for(_e=Ae=ve;Ae!==null;){switch(me=Ae,Pe=me.child,me.tag){case 0:case 11:case 14:case 15:ld(4,me,me.return);break;case 1:ou(me,me.return);var Me=me.stateNode;if(typeof Me.componentWillUnmount=="function"){g=me,h=me.return;try{l=g,Me.props=l.memoizedProps,Me.state=l.memoizedState,Me.componentWillUnmount()}catch(Le){cn(g,h,Le)}}break;case 5:ou(me,me.return);break;case 22:if(me.memoizedState!==null){QS(_e);continue}}Pe!==null?(Pe.return=me,Ae=Pe):QS(_e)}ve=ve.sibling}e:for(ve=null,_e=o;;){if(_e.tag===5){if(ve===null){ve=_e;try{S=_e.stateNode,re?(k=S.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none"):($=_e.stateNode,B=_e.memoizedProps.style,M=B!=null&&B.hasOwnProperty("display")?B.display:null,$.style.display=Un("display",M))}catch(Le){cn(o,o.return,Le)}}}else if(_e.tag===6){if(ve===null)try{_e.stateNode.nodeValue=re?"":_e.memoizedProps}catch(Le){cn(o,o.return,Le)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===o)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===o)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===o)break e;ve===_e&&(ve=null),_e=_e.return}ve===_e&&(ve=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Vs(l,o),li(o),g&4&&KS(o);break;case 21:break;default:Vs(l,o),li(o)}}function li(o){var l=o.flags;if(l&2){try{e:{for(var h=o.return;h!==null;){if(WS(h)){var g=h;break e}h=h.return}throw Error(n(160))}switch(g.tag){case 5:var S=g.stateNode;g.flags&32&&(fr(S,""),g.flags&=-33);var k=qS(o);fg(o,k,S);break;case 3:case 4:var M=g.stateNode.containerInfo,$=qS(o);dg(o,$,M);break;default:throw Error(n(161))}}catch(B){cn(o,o.return,B)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function rL(o,l,h){Ae=o,YS(o)}function YS(o,l,h){for(var g=(o.mode&1)!==0;Ae!==null;){var S=Ae,k=S.child;if(S.tag===22&&g){var M=S.memoizedState!==null||zh;if(!M){var $=S.alternate,B=$!==null&&$.memoizedState!==null||sr;$=zh;var re=sr;if(zh=M,(sr=B)&&!re)for(Ae=S;Ae!==null;)M=Ae,B=M.child,M.tag===22&&M.memoizedState!==null?JS(S):B!==null?(B.return=M,Ae=B):JS(S);for(;k!==null;)Ae=k,YS(k),k=k.sibling;Ae=S,zh=$,sr=re}XS(o)}else(S.subtreeFlags&8772)!==0&&k!==null?(k.return=S,Ae=k):XS(o)}}function XS(o){for(;Ae!==null;){var l=Ae;if((l.flags&8772)!==0){var h=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:sr||Hh(5,l);break;case 1:var g=l.stateNode;if(l.flags&4&&!sr)if(h===null)g.componentDidMount();else{var S=l.elementType===l.type?h.memoizedProps:js(l.type,h.memoizedProps);g.componentDidUpdate(S,h.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var k=l.updateQueue;k!==null&&Qb(l,k,g);break;case 3:var M=l.updateQueue;if(M!==null){if(h=null,l.child!==null)switch(l.child.tag){case 5:h=l.child.stateNode;break;case 1:h=l.child.stateNode}Qb(l,M,h)}break;case 5:var $=l.stateNode;if(h===null&&l.flags&4){h=$;var B=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&h.focus();break;case"img":B.src&&(h.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var re=l.alternate;if(re!==null){var ve=re.memoizedState;if(ve!==null){var _e=ve.dehydrated;_e!==null&&$c(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}sr||l.flags&512&&cg(l)}catch(me){cn(l,l.return,me)}}if(l===o){Ae=null;break}if(h=l.sibling,h!==null){h.return=l.return,Ae=h;break}Ae=l.return}}function QS(o){for(;Ae!==null;){var l=Ae;if(l===o){Ae=null;break}var h=l.sibling;if(h!==null){h.return=l.return,Ae=h;break}Ae=l.return}}function JS(o){for(;Ae!==null;){var l=Ae;try{switch(l.tag){case 0:case 11:case 15:var h=l.return;try{Hh(4,l)}catch(B){cn(l,h,B)}break;case 1:var g=l.stateNode;if(typeof g.componentDidMount=="function"){var S=l.return;try{g.componentDidMount()}catch(B){cn(l,S,B)}}var k=l.return;try{cg(l)}catch(B){cn(l,k,B)}break;case 5:var M=l.return;try{cg(l)}catch(B){cn(l,M,B)}}}catch(B){cn(l,l.return,B)}if(l===o){Ae=null;break}var $=l.sibling;if($!==null){$.return=l.return,Ae=$;break}Ae=l.return}}var sL=Math.ceil,Uh=T.ReactCurrentDispatcher,hg=T.ReactCurrentOwner,bs=T.ReactCurrentBatchConfig,ht=0,jn=null,En=null,qn=0,Qr=0,au=Ro(0),An=0,ud=null,Fa=0,Bh=0,pg=0,cd=null,Or=null,mg=0,lu=1/0,qi=null,Wh=!1,vg=null,jo=null,qh=!1,Fo=null,Gh=0,dd=0,gg=null,Kh=-1,Zh=0;function vr(){return(ht&6)!==0?Yt():Kh!==-1?Kh:Kh=Yt()}function Vo(o){return(o.mode&1)===0?1:(ht&2)!==0&&qn!==0?qn&-qn:zO.transition!==null?(Zh===0&&(Zh=Nc()),Zh):(o=le,o!==0||(o=window.event,o=o===void 0?16:tb(o.type)),o)}function $s(o,l,h,g){if(50<dd)throw dd=0,gg=null,Error(n(185));ie(o,h,g),((ht&2)===0||o!==jn)&&(o===jn&&((ht&2)===0&&(Bh|=h),An===4&&$o(o,qn)),Lr(o,g),h===1&&ht===0&&(l.mode&1)===0&&(lu=Yt()+500,Sh&&Oo()))}function Lr(o,l){var h=o.callbackNode;ih(o,l);var g=ko(o,o===jn?qn:0);if(g===0)h!==null&&th(h),o.callbackNode=null,o.callbackPriority=0;else if(l=g&-g,o.callbackPriority!==l){if(h!=null&&th(h),l===1)o.tag===0?$O(tE.bind(null,o)):$b(tE.bind(null,o)),DO(function(){(ht&6)===0&&Oo()}),h=null;else{switch(ye(g)){case 1:h=Mc;break;case 4:h=nh;break;case 16:h=Fl;break;case 536870912:h=Vl;break;default:h=Fl}h=uE(h,eE.bind(null,o))}o.callbackPriority=l,o.callbackNode=h}}function eE(o,l){if(Kh=-1,Zh=0,(ht&6)!==0)throw Error(n(327));var h=o.callbackNode;if(uu()&&o.callbackNode!==h)return null;var g=ko(o,o===jn?qn:0);if(g===0)return null;if((g&30)!==0||(g&o.expiredLanes)!==0||l)l=Yh(o,g);else{l=g;var S=ht;ht|=2;var k=rE();(jn!==o||qn!==l)&&(qi=null,lu=Yt()+500,$a(o,l));do try{aL();break}catch($){nE(o,$)}while(!0);Nv(),Uh.current=k,ht=S,En!==null?l=0:(jn=null,qn=0,l=An)}if(l!==0){if(l===2&&(S=zl(o),S!==0&&(g=S,l=yg(o,S))),l===1)throw h=ud,$a(o,0),$o(o,g),Lr(o,Yt()),h;if(l===6)$o(o,g);else{if(S=o.current.alternate,(g&30)===0&&!iL(S)&&(l=Yh(o,g),l===2&&(k=zl(o),k!==0&&(g=k,l=yg(o,k))),l===1))throw h=ud,$a(o,0),$o(o,g),Lr(o,Yt()),h;switch(o.finishedWork=S,o.finishedLanes=g,l){case 0:case 1:throw Error(n(345));case 2:za(o,Or,qi);break;case 3:if($o(o,g),(g&130023424)===g&&(l=mg+500-Yt(),10<l)){if(ko(o,0)!==0)break;if(S=o.suspendedLanes,(S&g)!==g){vr(),o.pingedLanes|=o.suspendedLanes&S;break}o.timeoutHandle=Ev(za.bind(null,o,Or,qi),l);break}za(o,Or,qi);break;case 4:if($o(o,g),(g&4194240)===g)break;for(l=o.eventTimes,S=-1;0<g;){var M=31-Nn(g);k=1<<M,M=l[M],M>S&&(S=M),g&=~k}if(g=S,g=Yt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*sL(g/1960))-g,10<g){o.timeoutHandle=Ev(za.bind(null,o,Or,qi),g);break}za(o,Or,qi);break;case 5:za(o,Or,qi);break;default:throw Error(n(329))}}}return Lr(o,Yt()),o.callbackNode===h?eE.bind(null,o):null}function yg(o,l){var h=cd;return o.current.memoizedState.isDehydrated&&($a(o,l).flags|=256),o=Yh(o,l),o!==2&&(l=Or,Or=h,l!==null&&_g(l)),o}function _g(o){Or===null?Or=o:Or.push.apply(Or,o)}function iL(o){for(var l=o;;){if(l.flags&16384){var h=l.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var g=0;g<h.length;g++){var S=h[g],k=S.getSnapshot;S=S.value;try{if(!Ns(k(),S))return!1}catch{return!1}}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function $o(o,l){for(l&=~pg,l&=~Bh,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var h=31-Nn(l),g=1<<h;o[h]=-1,l&=~g}}function tE(o){if((ht&6)!==0)throw Error(n(327));uu();var l=ko(o,0);if((l&1)===0)return Lr(o,Yt()),null;var h=Yh(o,l);if(o.tag!==0&&h===2){var g=zl(o);g!==0&&(l=g,h=yg(o,g))}if(h===1)throw h=ud,$a(o,0),$o(o,l),Lr(o,Yt()),h;if(h===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,za(o,Or,qi),Lr(o,Yt()),null}function xg(o,l){var h=ht;ht|=1;try{return o(l)}finally{ht=h,ht===0&&(lu=Yt()+500,Sh&&Oo())}}function Va(o){Fo!==null&&Fo.tag===0&&(ht&6)===0&&uu();var l=ht;ht|=1;var h=bs.transition,g=le;try{if(bs.transition=null,le=1,o)return o()}finally{le=g,bs.transition=h,ht=l,(ht&6)===0&&Oo()}}function wg(){Qr=au.current,$t(au)}function $a(o,l){o.finishedWork=null,o.finishedLanes=0;var h=o.timeoutHandle;if(h!==-1&&(o.timeoutHandle=-1,NO(h)),En!==null)for(h=En.return;h!==null;){var g=h;switch(Iv(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&wh();break;case 3:su(),$t(Ir),$t(tr),Uv();break;case 5:zv(g);break;case 4:su();break;case 13:$t(Qt);break;case 19:$t(Qt);break;case 10:Dv(g.type._context);break;case 22:case 23:wg()}h=h.return}if(jn=o,En=o=zo(o.current,null),qn=Qr=l,An=0,ud=null,pg=Bh=Fa=0,Or=cd=null,Na!==null){for(l=0;l<Na.length;l++)if(h=Na[l],g=h.interleaved,g!==null){h.interleaved=null;var S=g.next,k=h.pending;if(k!==null){var M=k.next;k.next=S,g.next=M}h.pending=g}Na=null}return o}function nE(o,l){do{var h=En;try{if(Nv(),Oh.current=jh,Lh){for(var g=Jt.memoizedState;g!==null;){var S=g.queue;S!==null&&(S.pending=null),g=g.next}Lh=!1}if(ja=0,Dn=Tn=Jt=null,rd=!1,sd=0,hg.current=null,h===null||h.return===null){An=1,ud=l,En=null;break}e:{var k=o,M=h.return,$=h,B=l;if(l=qn,$.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var re=B,ve=$,_e=ve.tag;if((ve.mode&1)===0&&(_e===0||_e===11||_e===15)){var me=ve.alternate;me?(ve.updateQueue=me.updateQueue,ve.memoizedState=me.memoizedState,ve.lanes=me.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var Pe=PS(M);if(Pe!==null){Pe.flags&=-257,TS(Pe,M,$,k,l),Pe.mode&1&&kS(k,re,l),l=Pe,B=re;var Me=l.updateQueue;if(Me===null){var Le=new Set;Le.add(B),l.updateQueue=Le}else Me.add(B);break e}else{if((l&1)===0){kS(k,re,l),bg();break e}B=Error(n(426))}}else if(Wt&&$.mode&1){var vn=PS(M);if(vn!==null){(vn.flags&65536)===0&&(vn.flags|=256),TS(vn,M,$,k,l),Ov(iu(B,$));break e}}k=B=iu(B,$),An!==4&&(An=2),cd===null?cd=[k]:cd.push(k),k=M;do{switch(k.tag){case 3:k.flags|=65536,l&=-l,k.lanes|=l;var ee=ES(k,B,l);Xb(k,ee);break e;case 1:$=B;var K=k.type,te=k.stateNode;if((k.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||te!==null&&typeof te.componentDidCatch=="function"&&(jo===null||!jo.has(te)))){k.flags|=65536,l&=-l,k.lanes|=l;var be=CS(k,$,l);Xb(k,be);break e}}k=k.return}while(k!==null)}iE(h)}catch(je){l=je,En===h&&h!==null&&(En=h=h.return);continue}break}while(!0)}function rE(){var o=Uh.current;return Uh.current=jh,o===null?jh:o}function bg(){(An===0||An===3||An===2)&&(An=4),jn===null||(Fa&268435455)===0&&(Bh&268435455)===0||$o(jn,qn)}function Yh(o,l){var h=ht;ht|=2;var g=rE();(jn!==o||qn!==l)&&(qi=null,$a(o,l));do try{oL();break}catch(S){nE(o,S)}while(!0);if(Nv(),ht=h,Uh.current=g,En!==null)throw Error(n(261));return jn=null,qn=0,An}function oL(){for(;En!==null;)sE(En)}function aL(){for(;En!==null&&!J0();)sE(En)}function sE(o){var l=lE(o.alternate,o,Qr);o.memoizedProps=o.pendingProps,l===null?iE(o):En=l,hg.current=null}function iE(o){var l=o;do{var h=l.alternate;if(o=l.return,(l.flags&32768)===0){if(h=JO(h,l,Qr),h!==null){En=h;return}}else{if(h=eL(h,l),h!==null){h.flags&=32767,En=h;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{An=6,En=null;return}}if(l=l.sibling,l!==null){En=l;return}En=l=o}while(l!==null);An===0&&(An=5)}function za(o,l,h){var g=le,S=bs.transition;try{bs.transition=null,le=1,lL(o,l,h,g)}finally{bs.transition=S,le=g}return null}function lL(o,l,h,g){do uu();while(Fo!==null);if((ht&6)!==0)throw Error(n(327));h=o.finishedWork;var S=o.finishedLanes;if(h===null)return null;if(o.finishedWork=null,o.finishedLanes=0,h===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var k=h.lanes|h.childLanes;if(Ce(o,k),o===jn&&(En=jn=null,qn=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||qh||(qh=!0,uE(Fl,function(){return uu(),null})),k=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||k){k=bs.transition,bs.transition=null;var M=le;le=1;var $=ht;ht|=4,hg.current=null,nL(o,h),ZS(h,o),TO(bv),ah=!!wv,bv=wv=null,o.current=h,rL(h),ev(),ht=$,le=M,bs.transition=k}else o.current=h;if(qh&&(qh=!1,Fo=o,Gh=S),k=o.pendingLanes,k===0&&(jo=null),Xw(h.stateNode),Lr(o,Yt()),l!==null)for(g=o.onRecoverableError,h=0;h<l.length;h++)S=l[h],g(S.value,{componentStack:S.stack,digest:S.digest});if(Wh)throw Wh=!1,o=vg,vg=null,o;return(Gh&1)!==0&&o.tag!==0&&uu(),k=o.pendingLanes,(k&1)!==0?o===gg?dd++:(dd=0,gg=o):dd=0,Oo(),null}function uu(){if(Fo!==null){var o=ye(Gh),l=bs.transition,h=le;try{if(bs.transition=null,le=16>o?16:o,Fo===null)var g=!1;else{if(o=Fo,Fo=null,Gh=0,(ht&6)!==0)throw Error(n(331));var S=ht;for(ht|=4,Ae=o.current;Ae!==null;){var k=Ae,M=k.child;if((Ae.flags&16)!==0){var $=k.deletions;if($!==null){for(var B=0;B<$.length;B++){var re=$[B];for(Ae=re;Ae!==null;){var ve=Ae;switch(ve.tag){case 0:case 11:case 15:ld(8,ve,k)}var _e=ve.child;if(_e!==null)_e.return=ve,Ae=_e;else for(;Ae!==null;){ve=Ae;var me=ve.sibling,Pe=ve.return;if(BS(ve),ve===re){Ae=null;break}if(me!==null){me.return=Pe,Ae=me;break}Ae=Pe}}}var Me=k.alternate;if(Me!==null){var Le=Me.child;if(Le!==null){Me.child=null;do{var vn=Le.sibling;Le.sibling=null,Le=vn}while(Le!==null)}}Ae=k}}if((k.subtreeFlags&2064)!==0&&M!==null)M.return=k,Ae=M;else e:for(;Ae!==null;){if(k=Ae,(k.flags&2048)!==0)switch(k.tag){case 0:case 11:case 15:ld(9,k,k.return)}var ee=k.sibling;if(ee!==null){ee.return=k.return,Ae=ee;break e}Ae=k.return}}var K=o.current;for(Ae=K;Ae!==null;){M=Ae;var te=M.child;if((M.subtreeFlags&2064)!==0&&te!==null)te.return=M,Ae=te;else e:for(M=K;Ae!==null;){if($=Ae,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Hh(9,$)}}catch(je){cn($,$.return,je)}if($===M){Ae=null;break e}var be=$.sibling;if(be!==null){be.return=$.return,Ae=be;break e}Ae=$.return}}if(ht=S,Oo(),vs&&typeof vs.onPostCommitFiberRoot=="function")try{vs.onPostCommitFiberRoot(Aa,o)}catch{}g=!0}return g}finally{le=h,bs.transition=l}}return!1}function oE(o,l,h){l=iu(h,l),l=ES(o,l,1),o=No(o,l,1),l=vr(),o!==null&&(ie(o,1,l),Lr(o,l))}function cn(o,l,h){if(o.tag===3)oE(o,o,h);else for(;l!==null;){if(l.tag===3){oE(l,o,h);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(jo===null||!jo.has(g))){o=iu(h,o),o=CS(l,o,1),l=No(l,o,1),o=vr(),l!==null&&(ie(l,1,o),Lr(l,o));break}}l=l.return}}function uL(o,l,h){var g=o.pingCache;g!==null&&g.delete(l),l=vr(),o.pingedLanes|=o.suspendedLanes&h,jn===o&&(qn&h)===h&&(An===4||An===3&&(qn&130023424)===qn&&500>Yt()-mg?$a(o,0):pg|=h),Lr(o,l)}function aE(o,l){l===0&&((o.mode&1)===0?l=1:(l=Ia,Ia<<=1,(Ia&130023424)===0&&(Ia=4194304)));var h=vr();o=Ui(o,l),o!==null&&(ie(o,l,h),Lr(o,h))}function cL(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),aE(o,h)}function dL(o,l){var h=0;switch(o.tag){case 13:var g=o.stateNode,S=o.memoizedState;S!==null&&(h=S.retryLane);break;case 19:g=o.stateNode;break;default:throw Error(n(314))}g!==null&&g.delete(l),aE(o,h)}var lE;lE=function(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps||Ir.current)Mr=!0;else{if((o.lanes&h)===0&&(l.flags&128)===0)return Mr=!1,QO(o,l,h);Mr=(o.flags&131072)!==0}else Mr=!1,Wt&&(l.flags&1048576)!==0&&zb(l,Ch,l.index);switch(l.lanes=0,l.tag){case 2:var g=l.type;$h(o,l),o=l.pendingProps;var S=Xl(l,tr.current);ru(l,h),S=qv(null,l,g,o,S,h);var k=Gv();return l.flags|=1,typeof S=="object"&&S!==null&&typeof S.render=="function"&&S.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Rr(g)?(k=!0,bh(l)):k=!1,l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,Vv(l),S.updater=Fh,l.stateNode=S,S._reactInternals=l,Jv(l,g,o,h),l=rg(null,l,g,!0,k,h)):(l.tag=0,Wt&&k&&Av(l),mr(null,l,S,h),l=l.child),l;case 16:g=l.elementType;e:{switch($h(o,l),o=l.pendingProps,S=g._init,g=S(g._payload),l.type=g,S=l.tag=hL(g),o=js(g,o),S){case 0:l=ng(null,l,g,o,h);break e;case 1:l=LS(null,l,g,o,h);break e;case 11:l=AS(null,l,g,o,h);break e;case 14:l=IS(null,l,g,js(g.type,o),h);break e}throw Error(n(306,g,""))}return l;case 0:return g=l.type,S=l.pendingProps,S=l.elementType===g?S:js(g,S),ng(o,l,g,S,h);case 1:return g=l.type,S=l.pendingProps,S=l.elementType===g?S:js(g,S),LS(o,l,g,S,h);case 3:e:{if(NS(l),o===null)throw Error(n(387));g=l.pendingProps,k=l.memoizedState,S=k.element,Yb(o,l),Rh(l,g,null,h);var M=l.memoizedState;if(g=M.element,k.isDehydrated)if(k={element:g,isDehydrated:!1,cache:M.cache,pendingSuspenseBoundaries:M.pendingSuspenseBoundaries,transitions:M.transitions},l.updateQueue.baseState=k,l.memoizedState=k,l.flags&256){S=iu(Error(n(423)),l),l=DS(o,l,g,h,S);break e}else if(g!==S){S=iu(Error(n(424)),l),l=DS(o,l,g,h,S);break e}else for(Xr=Io(l.stateNode.containerInfo.firstChild),Yr=l,Wt=!0,Ds=null,h=Kb(l,null,g,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(eu(),g===S){l=Wi(o,l,h);break e}mr(o,l,g,h)}l=l.child}return l;case 5:return Jb(l),o===null&&Mv(l),g=l.type,S=l.pendingProps,k=o!==null?o.memoizedProps:null,M=S.children,Sv(g,S)?M=null:k!==null&&Sv(g,k)&&(l.flags|=32),OS(o,l),mr(o,l,M,h),l.child;case 6:return o===null&&Mv(l),null;case 13:return jS(o,l,h);case 4:return $v(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=tu(l,null,g,h):mr(o,l,g,h),l.child;case 11:return g=l.type,S=l.pendingProps,S=l.elementType===g?S:js(g,S),AS(o,l,g,S,h);case 7:return mr(o,l,l.pendingProps,h),l.child;case 8:return mr(o,l,l.pendingProps.children,h),l.child;case 12:return mr(o,l,l.pendingProps.children,h),l.child;case 10:e:{if(g=l.type._context,S=l.pendingProps,k=l.memoizedProps,M=S.value,Dt(Th,g._currentValue),g._currentValue=M,k!==null)if(Ns(k.value,M)){if(k.children===S.children&&!Ir.current){l=Wi(o,l,h);break e}}else for(k=l.child,k!==null&&(k.return=l);k!==null;){var $=k.dependencies;if($!==null){M=k.child;for(var B=$.firstContext;B!==null;){if(B.context===g){if(k.tag===1){B=Bi(-1,h&-h),B.tag=2;var re=k.updateQueue;if(re!==null){re=re.shared;var ve=re.pending;ve===null?B.next=B:(B.next=ve.next,ve.next=B),re.pending=B}}k.lanes|=h,B=k.alternate,B!==null&&(B.lanes|=h),jv(k.return,h,l),$.lanes|=h;break}B=B.next}}else if(k.tag===10)M=k.type===l.type?null:k.child;else if(k.tag===18){if(M=k.return,M===null)throw Error(n(341));M.lanes|=h,$=M.alternate,$!==null&&($.lanes|=h),jv(M,h,l),M=k.sibling}else M=k.child;if(M!==null)M.return=k;else for(M=k;M!==null;){if(M===l){M=null;break}if(k=M.sibling,k!==null){k.return=M.return,M=k;break}M=M.return}k=M}mr(o,l,S.children,h),l=l.child}return l;case 9:return S=l.type,g=l.pendingProps.children,ru(l,h),S=xs(S),g=g(S),l.flags|=1,mr(o,l,g,h),l.child;case 14:return g=l.type,S=js(g,l.pendingProps),S=js(g.type,S),IS(o,l,g,S,h);case 15:return RS(o,l,l.type,l.pendingProps,h);case 17:return g=l.type,S=l.pendingProps,S=l.elementType===g?S:js(g,S),$h(o,l),l.tag=1,Rr(g)?(o=!0,bh(l)):o=!1,ru(l,h),bS(l,g,S),Jv(l,g,S,h),rg(null,l,g,!0,o,h);case 19:return VS(o,l,h);case 22:return MS(o,l,h)}throw Error(n(156,l.tag))};function uE(o,l){return eh(o,l)}function fL(o,l,h,g){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ss(o,l,h,g){return new fL(o,l,h,g)}function Sg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function hL(o){if(typeof o=="function")return Sg(o)?1:0;if(o!=null){if(o=o.$$typeof,o===F)return 11;if(o===Z)return 14}return 2}function zo(o,l){var h=o.alternate;return h===null?(h=Ss(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&14680064,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h}function Xh(o,l,h,g,S,k){var M=2;if(g=o,typeof o=="function")Sg(o)&&(M=1);else if(typeof o=="string")M=5;else e:switch(o){case L:return Ha(h.children,S,k,l);case I:M=8,S|=8;break;case O:return o=Ss(12,h,l,S|2),o.elementType=O,o.lanes=k,o;case G:return o=Ss(13,h,l,S),o.elementType=G,o.lanes=k,o;case Q:return o=Ss(19,h,l,S),o.elementType=Q,o.lanes=k,o;case q:return Qh(h,S,k,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case N:M=10;break e;case j:M=9;break e;case F:M=11;break e;case Z:M=14;break e;case W:M=16,g=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=Ss(M,h,l,S),l.elementType=o,l.type=g,l.lanes=k,l}function Ha(o,l,h,g){return o=Ss(7,o,g,l),o.lanes=h,o}function Qh(o,l,h,g){return o=Ss(22,o,g,l),o.elementType=q,o.lanes=h,o.stateNode={isHidden:!1},o}function Eg(o,l,h){return o=Ss(6,o,null,l),o.lanes=h,o}function Cg(o,l,h){return l=Ss(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function pL(o,l,h,g,S){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=V(0),this.expirationTimes=V(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=V(0),this.identifierPrefix=g,this.onRecoverableError=S,this.mutableSourceEagerHydrationData=null}function kg(o,l,h,g,S,k,M,$,B){return o=new pL(o,l,h,$,B),l===1?(l=1,k===!0&&(l|=8)):l=0,k=Ss(3,null,null,l),o.current=k,k.stateNode=o,k.memoizedState={element:g,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vv(k),o}function mL(o,l,h){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:g==null?null:""+g,children:o,containerInfo:l,implementation:h}}function cE(o){if(!o)return Mo;o=o._reactInternals;e:{if(Fi(o)!==o||o.tag!==1)throw Error(n(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Rr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(o.tag===1){var h=o.type;if(Rr(h))return Fb(o,h,l)}return l}function dE(o,l,h,g,S,k,M,$,B){return o=kg(h,g,!0,o,S,k,M,$,B),o.context=cE(null),h=o.current,g=vr(),S=Vo(h),k=Bi(g,S),k.callback=l??null,No(h,k,S),o.current.lanes=S,ie(o,S,g),Lr(o,g),o}function Jh(o,l,h,g){var S=l.current,k=vr(),M=Vo(S);return h=cE(h),l.context===null?l.context=h:l.pendingContext=h,l=Bi(k,M),l.payload={element:o},g=g===void 0?null:g,g!==null&&(l.callback=g),o=No(S,l,M),o!==null&&($s(o,S,M,k),Ih(o,S,M)),M}function ep(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function fE(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function Pg(o,l){fE(o,l),(o=o.alternate)&&fE(o,l)}function vL(){return null}var hE=typeof reportError=="function"?reportError:function(o){console.error(o)};function Tg(o){this._internalRoot=o}tp.prototype.render=Tg.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(n(409));Jh(o,l,null,null)},tp.prototype.unmount=Tg.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Va(function(){Jh(null,o,null,null)}),l[Vi]=null}};function tp(o){this._internalRoot=o}tp.prototype.unstable_scheduleHydration=function(o){if(o){var l=Sn();o={blockedOn:null,target:o,priority:l};for(var h=0;h<Po.length&&l!==0&&l<Po[h].priority;h++);Po.splice(h,0,o),h===0&&Jw(o)}};function Ag(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function np(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function pE(){}function gL(o,l,h,g,S){if(S){if(typeof g=="function"){var k=g;g=function(){var re=ep(M);k.call(re)}}var M=dE(l,g,o,0,null,!1,!1,"",pE);return o._reactRootContainer=M,o[Vi]=M.current,Zc(o.nodeType===8?o.parentNode:o),Va(),M}for(;S=o.lastChild;)o.removeChild(S);if(typeof g=="function"){var $=g;g=function(){var re=ep(B);$.call(re)}}var B=kg(o,0,!1,null,null,!1,!1,"",pE);return o._reactRootContainer=B,o[Vi]=B.current,Zc(o.nodeType===8?o.parentNode:o),Va(function(){Jh(l,B,h,g)}),B}function rp(o,l,h,g,S){var k=h._reactRootContainer;if(k){var M=k;if(typeof S=="function"){var $=S;S=function(){var B=ep(M);$.call(B)}}Jh(l,M,o,S)}else M=gL(h,l,o,S,g);return ep(M)}qe=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var h=si(l.pendingLanes);h!==0&&(he(l,h|1),Lr(l,Yt()),(ht&6)===0&&(lu=Yt()+500,Oo()))}break;case 13:Va(function(){var g=Ui(o,1);if(g!==null){var S=vr();$s(g,o,1,S)}}),Pg(o,1)}},De=function(o){if(o.tag===13){var l=Ui(o,134217728);if(l!==null){var h=vr();$s(l,o,134217728,h)}Pg(o,134217728)}},Xt=function(o){if(o.tag===13){var l=Vo(o),h=Ui(o,l);if(h!==null){var g=vr();$s(h,o,l,g)}Pg(o,l)}},Sn=function(){return le},Tr=function(o,l){var h=le;try{return le=o,l()}finally{le=h}},Ls=function(o,l,h){switch(l){case"input":if(Ve(o,h),l=h.name,h.type==="radio"&&l!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<h.length;l++){var g=h[l];if(g!==o&&g.form===o.form){var S=xh(g);if(!S)throw Error(n(90));ze(g),Ve(g,S)}}}break;case"textarea":Lt(o,h);break;case"select":l=h.value,l!=null&&vt(o,!!h.multiple,l,!1)}},Ge=xg,Nt=Va;var yL={usingClientEntryPoint:!1,Events:[Qc,Zl,xh,ni,ms,xg]},fd={findFiberByHostInstance:Ra,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_L={bundleType:fd.bundleType,version:fd.version,rendererPackageName:fd.rendererPackageName,rendererConfig:fd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=Jf(o),o===null?null:o.stateNode},findFiberByHostInstance:fd.findFiberByHostInstance||vL,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 sp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sp.isDisabled&&sp.supportsFiber)try{Aa=sp.inject(_L),vs=sp}catch{}}return Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yL,Nr.createPortal=function(o,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ag(l))throw Error(n(200));return mL(o,l,null,h)},Nr.createRoot=function(o,l){if(!Ag(o))throw Error(n(299));var h=!1,g="",S=hE;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),l=kg(o,1,!1,null,null,h,!1,g,S),o[Vi]=l.current,Zc(o.nodeType===8?o.parentNode:o),new Tg(l)},Nr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=Jf(l),o=o===null?null:o.stateNode,o},Nr.flushSync=function(o){return Va(o)},Nr.hydrate=function(o,l,h){if(!np(l))throw Error(n(200));return rp(null,o,l,!0,h)},Nr.hydrateRoot=function(o,l,h){if(!Ag(o))throw Error(n(405));var g=h!=null&&h.hydratedSources||null,S=!1,k="",M=hE;if(h!=null&&(h.unstable_strictMode===!0&&(S=!0),h.identifierPrefix!==void 0&&(k=h.identifierPrefix),h.onRecoverableError!==void 0&&(M=h.onRecoverableError)),l=dE(l,null,o,1,h??null,S,!1,k,M),o[Vi]=l.current,Zc(o),g)for(o=0;o<g.length;o++)h=g[o],S=h._getVersion,S=S(h._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[h,S]:l.mutableSourceEagerHydrationData.push(h,S);return new tp(l)},Nr.render=function(o,l,h){if(!np(l))throw Error(n(200));return rp(null,o,l,!1,h)},Nr.unmountComponentAtNode=function(o){if(!np(o))throw Error(n(40));return o._reactRootContainer?(Va(function(){rp(null,null,o,!1,function(){o._reactRootContainer=null,o[Vi]=null})}),!0):!1},Nr.unstable_batchedUpdates=xg,Nr.unstable_renderSubtreeIntoContainer=function(o,l,h,g){if(!np(h))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return rp(o,l,h,!1,g)},Nr.version="18.3.1-next-f1338f8080-20240426",Nr}var Y4;function C3(){if(Y4)return f1.exports;Y4=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),f1.exports=c7(),f1.exports}var X4;function d7(){if(X4)return _p;X4=1;var t=C3();return _p.createRoot=t.createRoot,_p.hydrateRoot=t.hydrateRoot,_p}var f7=d7();const h7=x0(f7),co={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function k3(t){return"init"in t}function p_(t){return typeof t.write=="function"}function p7(t){return!!t.onMount}function Q4(t){return"v"in t||"e"in t}function Bm(t){if("e"in t)throw t.e;if((co?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v}function Wm(t){return typeof(t==null?void 0:t.then)=="function"}function m7(t){if(!(t instanceof Error))return!1;const e=t.name,n=t.message.toLowerCase();return(e==="RangeError"||e==="InternalError")&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}function P3(t,e,n){if(!n.p.has(t)){n.p.add(t);const r=()=>n.p.delete(t);e.then(r,r)}}function T3(t,e,n){const r=n.get(t),s=r==null?void 0:r.t,i=e.p;if(!(s!=null&&s.size))return i;if(!i.size)return s;const a=new Set(s);for(const u of i)a.add(u);return a}function v7(t){return!!t.INTERNAL_onInit}const g7=(t,e,n,...r)=>n.read(...r),y7=(t,e,n,...r)=>n.write(...r),_7=(t,e,n)=>n.INTERNAL_onInit(e),x7=(t,e,n,r)=>{var s;return(s=n.onMount)==null?void 0:s.call(n,r)},w7=(t,e,n)=>{var r;const s=t[0];let i=s.get(n);if(!i){const a=t[6],u=t[9];i={d:new Map,p:new Set,n:0},s.set(n,i),(r=a.i)==null||r.call(a,n),v7(n)&&u(t,e,n)}return i},b7=(t,e)=>{var n;const r=t[1],s=t[3],i=t[4],a=t[5],u=t[6],c=t[13];if(!u.f&&!s.size&&!i.size&&!a.size)return;const d=[],f=p=>{try{p()}catch(m){d.push(m)}};do{u.f&&f(u.f);const p=new Set;for(const m of s){const _=(n=r.get(m))==null?void 0:n.l;if(_)for(const x of _)p.add(x)}s.clear();for(const m of a)p.add(m);a.clear();for(const m of i)p.add(m);i.clear();for(const m of p)f(m);s.size&&c(t,e)}while(s.size||a.size||i.size);if(d.length)throw new AggregateError(d)},S7=(t,e)=>{const n=t[1],r=t[2],s=t[3],i=t[11],a=t[14],u=t[17];if(!s.size)return;const c=[],d=[],f=new WeakSet,p=new WeakSet,m=[],_=[];for(const x of s)m.push(x),_.push(i(t,e,x));for(;m.length;){const x=m.length-1,y=m[x],w=_[x];if(p.has(y)){m.pop(),_.pop();continue}if(f.has(y)){if(r.get(y)===w.n)c.push(y),d.push(w);else if((co?"production":void 0)!=="production"&&r.has(y))throw new Error("[Bug] invalidated atom exists");p.add(y),m.pop(),_.pop();continue}f.add(y);for(const b of T3(y,w,n))f.has(b)||(m.push(b),_.push(i(t,e,b)))}for(let x=c.length-1;x>=0;--x){const y=c[x],w=d[x];let b=!1;for(const C of w.d.keys())if(C!==y&&s.has(C)){b=!0;break}b&&(r.set(y,w.n),a(t,e,y),u(t,e,y)),r.delete(y)}},m_=new WeakSet,E7=(t,e,n)=>{var r,s;const i=t[1],a=t[2],u=t[3],c=t[6],d=t[7],f=t[11],p=t[12],m=t[13],_=t[14],x=t[16],y=t[17],w=t[20],b=t[26],C=t[28],P=f(t,e,n),T=C[0];if(Q4(P)){if(i.has(n)&&a.get(n)!==P.n||P.m===T)return P.m=T,P;let Z=!1;for(const[W,q]of P.d)if(_(t,e,W).n!==q){Z=!0;break}if(!Z)return P.m=T,P}let A=!0;const R=new Set(P.d.keys()),L=()=>{for(const Z of R)P.d.delete(Z)},I=()=>{if(i.has(n)){const Z=!u.size;y(t,e,n),Z&&(m(t,e),p(t,e))}},O=Z=>{var W;if(Z===n){const z=f(t,e,Z);if(!Q4(z))if(k3(Z))w(t,e,Z,Z.init);else throw new Error("no atom init");return Bm(z)}const q=_(t,e,Z);try{return Bm(q)}finally{R.delete(Z),P.d.set(Z,q.n),Wm(P.v)&&P3(n,P.v,q),i.has(n)&&((W=i.get(Z))==null||W.t.add(n)),A||I()}};let N,j;const F={get signal(){return N||(N=new AbortController),N.signal},get setSelf(){return(co?"production":void 0)!=="production"&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),(co?"production":void 0)!=="production"&&!p_(n)&&console.warn("setSelf function cannot be used with read-only atom"),!j&&p_(n)&&(j=(...Z)=>{if((co?"production":void 0)!=="production"&&A&&console.warn("setSelf function cannot be called in sync"),!A)try{return x(t,e,n,Z)}finally{m(t,e),p(t,e)}}),j}},G=P.n,Q=a.get(n)===G;try{(co?"production":void 0)!=="production"&&m_.delete(e);const Z=d(t,e,n,O,F);if((co?"production":void 0)!=="production"&&m_.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),w(t,e,n,Z),Wm(Z)){b(t,e,Z,()=>N==null?void 0:N.abort());const W=()=>{L(),I()};Z.then(W,W)}else L();return(r=c.r)==null||r.call(c,n),P.m=T,P}catch(Z){if(m7(Z))throw Z;return delete P.v,P.e=Z,++P.n,P.m=T,P}finally{A=!1,P.n!==G&&Q&&(a.set(n,P.n),u.add(n),(s=c.c)==null||s.call(c,n))}},C7=(t,e,n)=>{const r=t[1],s=t[2],i=t[11],a=[n];for(;a.length;){const u=a.pop(),c=i(t,e,u);for(const d of T3(u,c,r)){const f=i(t,e,d);s.get(d)!==f.n&&(s.set(d,f.n),a.push(d))}}},k7=(t,e,n,r)=>{const s=t[3],i=t[6],a=t[8],u=t[11],c=t[12],d=t[13],f=t[14],p=t[15],m=t[16],_=t[17],x=t[20],y=t[28];let w=!0;const b=P=>Bm(f(t,e,P)),C=(P,...T)=>{var A;const R=u(t,e,P);try{if(P===n){if(!k3(P))throw new Error("atom not writable");(co?"production":void 0)!=="production"&&m_.add(e);const L=R.n,I=T[0];x(t,e,P,I),_(t,e,P),L!==R.n&&(++y[0],s.add(P),p(t,e,P),(A=i.c)==null||A.call(i,P));return}else return m(t,e,P,T)}finally{w||(d(t,e),c(t,e))}};try{return a(t,e,n,b,C,...r)}finally{w=!1}},P7=(t,e,n)=>{var r;const s=t[1],i=t[3],a=t[6],u=t[11],c=t[15],d=t[18],f=t[19],p=u(t,e,n),m=s.get(n);if(m&&p.d.size>0){for(const[_,x]of p.d)if(!m.d.has(_)){const y=u(t,e,_);d(t,e,_).t.add(n),m.d.add(_),x!==y.n&&(i.add(_),c(t,e,_),(r=a.c)==null||r.call(a,_))}for(const _ of m.d)if(!p.d.has(_)){m.d.delete(_);const x=f(t,e,_);x==null||x.t.delete(n)}}},T7=(t,e,n)=>{var r;const s=t[1],i=t[4],a=t[6],u=t[10],c=t[11],d=t[12],f=t[13],p=t[14],m=t[16],_=t[18],x=c(t,e,n);let y=s.get(n);if(!y){p(t,e,n);for(const w of x.d.keys())_(t,e,w).t.add(n);if(y={l:new Set,d:new Set(x.d.keys()),t:new Set},s.set(n,y),p_(n)&&p7(n)){const w=()=>{let b=!0;const C=(...P)=>{try{return m(t,e,n,P)}finally{b||(f(t,e),d(t,e))}};try{const P=u(t,e,n,C);P&&(y.u=()=>{b=!0;try{P()}finally{b=!1}})}finally{b=!1}};i.add(w)}(r=a.m)==null||r.call(a,n)}return y},A7=(t,e,n)=>{var r,s;const i=t[1],a=t[5],u=t[6],c=t[11],d=t[19],f=c(t,e,n);let p=i.get(n);if(!p||p.l.size)return p;let m=!1;for(const _ of p.t)if((r=i.get(_))!=null&&r.d.has(n)){m=!0;break}if(!m){p.u&&a.add(p.u),p=void 0,i.delete(n);for(const _ of f.d.keys()){const x=d(t,e,_);x==null||x.t.delete(n)}(s=u.u)==null||s.call(u,n);return}return p},I7=(t,e,n,r)=>{const s=t[11],i=t[27],a=s(t,e,n),u="v"in a,c=a.v;if(Wm(r))for(const d of a.d.keys())P3(n,r,s(t,e,d));a.v=r,delete a.e,(!u||!Object.is(c,a.v))&&(++a.n,Wm(c)&&i(t,e,c))},R7=(t,e,n)=>{const r=t[14];return Bm(r(t,e,n))},M7=(t,e,n,...r)=>{const s=t[3],i=t[12],a=t[13],u=t[16],c=s.size;try{return u(t,e,n,r)}finally{s.size!==c&&(a(t,e),i(t,e))}},O7=(t,e,n,r)=>{const s=t[12],i=t[13],a=t[18],u=t[19],d=a(t,e,n).l;return d.add(r),i(t,e),s(t,e),()=>{d.delete(r),u(t,e,n),i(t,e),s(t,e)}},L7=(t,e,n,r)=>{const s=t[25];let i=s.get(n);if(!i){i=new Set,s.set(n,i);const a=()=>s.delete(n);n.then(a,a)}i.add(r)},N7=(t,e,n)=>{const s=t[25].get(n);s==null||s.forEach(i=>i())},A3=new WeakMap;function D7(t){const e=A3.get(t);if((co?"production":void 0)!=="production"&&!e)throw new Error("Store must be created by buildStore to read its building blocks");const n=e[24];return n?n(e,t):e}function j7(...t){const e={get(a){return r(n,e,a)},set(a,...u){return s(n,e,a,...u)},sub(a,u){return i(n,e,a,u)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},g7,y7,_7,x7,w7,b7,S7,E7,C7,k7,P7,T7,A7,I7,R7,M7,O7,void 0,new WeakMap,L7,N7,[0]].map((a,u)=>t[u]||a);A3.set(e,Object.freeze(n));const r=n[21],s=n[22],i=n[23];return e}const I3={};let F7=0;function st(t,e){const n=`atom${++F7}`,r={toString(){return(I3?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?r.read=t:(r.init=t,r.read=V7,r.write=$7),e&&(r.write=e),r}function V7(t){return t(this)}function $7(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}function z7(){return j7()}let Sd;function H7(){return Sd||(Sd=z7(),(I3?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Sd),globalThis.__JOTAI_DEFAULT_STORE__!==Sd&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Sd}const U7={},B7=v.createContext(void 0);function ox(t){return v.useContext(B7)||H7()}const v_=t=>typeof(t==null?void 0:t.then)=="function",g_=t=>{t.status||(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}))},W7=we.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(g_(t),t)}),m1=new WeakMap,J4=(t,e,n)=>{const r=D7(t),s=r[26];let i=m1.get(e);return i||(i=new Promise((a,u)=>{let c=e;const d=m=>_=>{c===m&&a(_)},f=m=>_=>{c===m&&u(_)},p=()=>{try{const m=n();v_(m)?(m1.set(m,i),c=m,m.then(d(m),f(m)),s(r,t,m,p)):a(m)}catch(m){u(m)}};e.then(d(e),f(e)),s(r,t,e,p)}),m1.set(e,i)),i};function tt(t,e){const{delay:n,unstable_promiseStatus:r=!we.use}={},s=ox(),[[i,a,u],c]=v.useReducer(f=>{const p=s.get(t);return Object.is(f[0],p)&&f[1]===s&&f[2]===t?f:[p,s,t]},void 0,()=>[s.get(t),s,t]);let d=i;if((a!==s||u!==t)&&(c(),d=s.get(t)),v.useEffect(()=>{const f=s.sub(t,()=>{if(r)try{const p=s.get(t);v_(p)&&g_(J4(s,p,()=>s.get(t)))}catch{}if(typeof n=="number"){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
43
|
-
|
|
44
|
-
Migration guide:
|
|
45
|
-
|
|
46
|
-
Create a custom hook like the following.
|
|
47
|
-
|
|
48
|
-
function useAtomValueWithDelay<Value>(
|
|
49
|
-
atom: Atom<Value>,
|
|
50
|
-
options: { delay: number },
|
|
51
|
-
): Value {
|
|
52
|
-
const { delay } = options
|
|
53
|
-
const store = useStore(options)
|
|
54
|
-
const [value, setValue] = useState(() => store.get(atom))
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
const unsub = store.sub(atom, () => {
|
|
57
|
-
setTimeout(() => setValue(store.get(atom)), delay)
|
|
58
|
-
})
|
|
59
|
-
return unsub
|
|
60
|
-
}, [store, atom, delay])
|
|
61
|
-
return value
|
|
62
|
-
}
|
|
63
|
-
`),setTimeout(c,n);return}c()});return c(),f},[s,t,n,r]),v.useDebugValue(d),v_(d)){const f=J4(s,d,()=>s.get(t));return r&&g_(f),W7(f)}return d}function at(t,e){const n=ox();return v.useCallback((...s)=>{if((U7?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...s)},[n,t])}function R3(t,e){return[tt(t),at(t)]}const ax=v.createContext({});function lx(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const q7=typeof window<"u",ux=q7?v.useLayoutEffect:v.useEffect,C0=v.createContext(null);function cx(t,e){t.indexOf(e)===-1&&t.push(e)}function qm(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Ri=(t,e,n)=>n>e?e:n<t?t:n;let k0=()=>{};const fa={},M3=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),O3=t=>typeof t=="object"&&t!==null,L3=t=>/^0[^.\s]+$/u.test(t);function N3(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ms=t=>t,Vf=(...t)=>t.reduce((e,n)=>r=>n(e(r))),of=(t,e,n)=>{const r=e-t;return r?(n-t)/r:1};class dx{constructor(){this.subscriptions=[]}add(e){return cx(this.subscriptions,e),()=>qm(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ls=t=>t*1e3,Ts=t=>t/1e3,D3=(t,e)=>e?t*(1e3/e):0,j3=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,G7=1e-7,K7=12;function Z7(t,e,n,r,s){let i,a,u=0;do a=e+(n-e)/2,i=j3(a,r,s)-t,i>0?n=a:e=a;while(Math.abs(i)>G7&&++u<K7);return a}function $f(t,e,n,r){if(t===e&&n===r)return Ms;const s=i=>Z7(i,0,1,t,n);return i=>i===0||i===1?i:j3(s(i),e,r)}const F3=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,V3=t=>e=>1-t(1-e),$3=$f(.33,1.53,.69,.99),fx=V3($3),z3=F3(fx),H3=t=>t>=1?1:(t*=2)<1?.5*fx(t):.5*(2-Math.pow(2,-10*(t-1))),hx=t=>1-Math.sin(Math.acos(t)),U3=V3(hx),B3=F3(hx),Y7=$f(.42,0,1,1),X7=$f(0,0,.58,1),W3=$f(.42,0,.58,1),Q7=t=>Array.isArray(t)&&typeof t[0]!="number",q3=t=>Array.isArray(t)&&typeof t[0]=="number",J7={linear:Ms,easeIn:Y7,easeInOut:W3,easeOut:X7,circIn:hx,circInOut:B3,circOut:U3,backIn:fx,backInOut:z3,backOut:$3,anticipate:H3},ej=t=>typeof t=="string",eC=t=>{if(q3(t)){k0(t.length===4);const[e,n,r,s]=t;return $f(e,n,r,s)}else if(ej(t))return J7[t];return t},xp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tj(t){let e=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(d){i.has(d)&&(c.schedule(d),t()),d(a)}const c={schedule:(d,f=!1,p=!1)=>{const _=p&&r?e:n;return f&&i.add(d),_.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(a=d,r){s=!0;return}r=!0;const f=e;e=n,n=f,e.forEach(u),e.clear(),r=!1,s&&(s=!1,c.process(d))}};return c}const nj=40;function G3(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=xp.reduce((P,T)=>(P[T]=tj(i),P),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:f,update:p,preRender:m,render:_,postRender:x}=a,y=()=>{const P=fa.useManualTiming,T=P?s.timestamp:performance.now();n=!1,P||(s.delta=r?1e3/60:Math.max(Math.min(T-s.timestamp,nj),1)),s.timestamp=T,s.isProcessing=!0,u.process(s),c.process(s),d.process(s),f.process(s),p.process(s),m.process(s),_.process(s),x.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(y))},w=()=>{n=!0,r=!0,s.isProcessing||t(y)};return{schedule:xp.reduce((P,T)=>{const A=a[T];return P[T]=(R,L=!1,I=!1)=>(n||w(),A.schedule(R,L,I)),P},{}),cancel:P=>{for(let T=0;T<xp.length;T++)a[xp[T]].cancel(P)},state:s,steps:a}}const{schedule:Ot,cancel:ha,state:Kn,steps:v1}=G3(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ms,!0);let Yp;function rj(){Yp=void 0}const br={now:()=>(Yp===void 0&&br.set(Kn.isProcessing||fa.useManualTiming?Kn.timestamp:performance.now()),Yp),set:t=>{Yp=t,queueMicrotask(rj)}},K3=t=>e=>typeof e=="string"&&e.startsWith(t),Z3=K3("--"),sj=K3("var(--"),px=t=>sj(t)?ij.test(t.split("/*")[0].trim()):!1,ij=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function tC(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const xc={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},af={...xc,transform:t=>Ri(0,1,t)},wp={...xc,default:1},zd=t=>Math.round(t*1e5)/1e5,mx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oj(t){return t==null}const aj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vx=(t,e)=>n=>!!(typeof n=="string"&&aj.test(n)&&n.startsWith(t)||e&&!oj(n)&&Object.prototype.hasOwnProperty.call(n,e)),Y3=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,u]=r.match(mx);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},lj=t=>Ri(0,255,t),g1={...xc,transform:t=>Math.round(lj(t))},dl={test:vx("rgb","red"),parse:Y3("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+g1.transform(t)+", "+g1.transform(e)+", "+g1.transform(n)+", "+zd(af.transform(r))+")"};function uj(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const y_={test:vx("#"),parse:uj,transform:dl.transform},zf=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),eo=zf("deg"),Ii=zf("%"),Oe=zf("px"),cj=zf("vh"),dj=zf("vw"),nC={...Ii,parse:t=>Ii.parse(t)/100,transform:t=>Ii.transform(t*100)},Tu={test:vx("hsl","hue"),parse:Y3("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Ii.transform(zd(e))+", "+Ii.transform(zd(n))+", "+zd(af.transform(r))+")"},kn={test:t=>dl.test(t)||y_.test(t)||Tu.test(t),parse:t=>dl.test(t)?dl.parse(t):Tu.test(t)?Tu.parse(t):y_.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?dl.transform(t):Tu.transform(t),getAnimatableNone:t=>{const e=kn.parse(t);return e.alpha=0,kn.transform(e)}},fj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hj(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(mx))==null?void 0:e.length)||0)+(((n=t.match(fj))==null?void 0:n.length)||0)>0}const X3="number",Q3="color",pj="var",mj="var(",rC="${}",vj=/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 hc(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const u=e.replace(vj,c=>(kn.test(c)?(r.color.push(i),s.push(Q3),n.push(kn.parse(c))):c.startsWith(mj)?(r.var.push(i),s.push(pj),n.push(c)):(r.number.push(i),s.push(X3),n.push(parseFloat(c))),++i,rC)).split(rC);return{values:n,split:u,indexes:r,types:s}}function gj(t){return hc(t).values}function J3({split:t,types:e}){const n=t.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=t[i],r[i]!==void 0){const a=e[i];a===X3?s+=zd(r[i]):a===Q3?s+=kn.transform(r[i]):s+=r[i]}return s}}function yj(t){return J3(hc(t))}const _j=t=>typeof t=="number"?0:kn.test(t)?kn.getAnimatableNone(t):t,xj=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:_j(t);function wj(t){const e=hc(t);return J3(e)(e.values.map((r,s)=>xj(r,e.split[s])))}const Xs={test:hj,parse:gj,createTransformer:yj,getAnimatableNone:wj};function y1(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 bj({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,a=0;if(!e)s=i=a=n;else{const u=n<.5?n*(1+e):n+e-n*e,c=2*n-u;s=y1(c,u,t+1/3),i=y1(c,u,t),a=y1(c,u,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function Gm(t,e){return n=>n>0?e:t}const Mt=(t,e,n)=>t+(e-t)*n,_1=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},Sj=[y_,dl,Tu],Ej=t=>Sj.find(e=>e.test(t));function sC(t){const e=Ej(t);if(!e)return!1;let n=e.parse(t);return e===Tu&&(n=bj(n)),n}const iC=(t,e)=>{const n=sC(t),r=sC(e);if(!n||!r)return Gm(t,e);const s={...n};return i=>(s.red=_1(n.red,r.red,i),s.green=_1(n.green,r.green,i),s.blue=_1(n.blue,r.blue,i),s.alpha=Mt(n.alpha,r.alpha,i),dl.transform(s))},__=new Set(["none","hidden"]);function Cj(t,e){return __.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function kj(t,e){return n=>Mt(t,e,n)}function gx(t){return typeof t=="number"?kj:typeof t=="string"?px(t)?Gm:kn.test(t)?iC:Aj:Array.isArray(t)?eT:typeof t=="object"?kn.test(t)?iC:Pj:Gm}function eT(t,e){const n=[...t],r=n.length,s=t.map((i,a)=>gx(i)(i,e[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function Pj(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=gx(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function Tj(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],a=t.indexes[i][r[i]],u=t.values[a]??0;n[s]=u,r[i]++}return n}const Aj=(t,e)=>{const n=Xs.createTransformer(e),r=hc(t),s=hc(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?__.has(t)&&!s.values.length||__.has(e)&&!r.values.length?Cj(t,e):Vf(eT(Tj(r,s),s.values),n):Gm(t,e)};function tT(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Mt(t,e,n):gx(t)(t,e)}const Ij=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ot.update(e,n),stop:()=>ha(e),now:()=>Kn.isProcessing?Kn.timestamp:br.now()}},nT=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Km=2e4;function yx(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Km;)e+=n,r=t.next(e);return e>=Km?1/0:e}function Rj(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(yx(r),Km);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Ts(s)}}const hn={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};function x_(t,e){return t*Math.sqrt(1-e*e)}const Mj=12;function Oj(t,e,n){let r=n;for(let s=1;s<Mj;s++)r=r-t(r)/e(r);return r}const x1=.001;function Lj({duration:t=hn.duration,bounce:e=hn.bounce,velocity:n=hn.velocity,mass:r=hn.mass}){let s,i,a=1-e;a=Ri(hn.minDamping,hn.maxDamping,a),t=Ri(hn.minDuration,hn.maxDuration,Ts(t)),a<1?(s=d=>{const f=d*a,p=f*t,m=f-n,_=x_(d,a),x=Math.exp(-p);return x1-m/_*x},i=d=>{const p=d*a*t,m=p*n+n,_=Math.pow(a,2)*Math.pow(d,2)*t,x=Math.exp(-p),y=x_(Math.pow(d,2),a);return(-s(d)+x1>0?-1:1)*((m-_)*x)/y}):(s=d=>{const f=Math.exp(-d*t),p=(d-n)*t+1;return-x1+f*p},i=d=>{const f=Math.exp(-d*t),p=(n-d)*(t*t);return f*p});const u=5/t,c=Oj(s,i,u);if(t=ls(t),isNaN(c))return{stiffness:hn.stiffness,damping:hn.damping,duration:t};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:t}}}const Nj=["duration","bounce"],Dj=["stiffness","damping","mass"];function oC(t,e){return e.some(n=>t[n]!==void 0)}function jj(t){let e={velocity:hn.velocity,stiffness:hn.stiffness,damping:hn.damping,mass:hn.mass,isResolvedFromDuration:!1,...t};if(!oC(t,Dj)&&oC(t,Nj))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Ri(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:hn.mass,stiffness:s,damping:i}}else{const n=Lj({...t,velocity:0});e={...e,...n,mass:hn.mass},e.isResolvedFromDuration=!0}return e}function Zm(t=hn.visualDuration,e=hn.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:c,damping:d,mass:f,duration:p,velocity:m,isResolvedFromDuration:_}=jj({...n,velocity:-Ts(n.velocity||0)}),x=m||0,y=d/(2*Math.sqrt(c*f)),w=a-i,b=Ts(Math.sqrt(c/f)),C=Math.abs(w)<5;r||(r=C?hn.restSpeed.granular:hn.restSpeed.default),s||(s=C?hn.restDelta.granular:hn.restDelta.default);let P,T,A,R,L,I;if(y<1)A=x_(b,y),R=(x+y*b*w)/A,P=N=>{const j=Math.exp(-y*b*N);return a-j*(R*Math.sin(A*N)+w*Math.cos(A*N))},L=y*b*R+w*A,I=y*b*w-R*A,T=N=>Math.exp(-y*b*N)*(L*Math.sin(A*N)+I*Math.cos(A*N));else if(y===1){P=j=>a-Math.exp(-b*j)*(w+(x+b*w)*j);const N=x+b*w;T=j=>Math.exp(-b*j)*(b*N*j-x)}else{const N=b*Math.sqrt(y*y-1);P=Q=>{const Z=Math.exp(-y*b*Q),W=Math.min(N*Q,300);return a-Z*((x+y*b*w)*Math.sinh(W)+N*w*Math.cosh(W))/N};const j=(x+y*b*w)/N,F=y*b*j-w*N,G=y*b*w-j*N;T=Q=>{const Z=Math.exp(-y*b*Q),W=Math.min(N*Q,300);return Z*(F*Math.sinh(W)+G*Math.cosh(W))}}const O={calculatedDuration:_&&p||null,velocity:N=>ls(T(N)),next:N=>{if(!_&&y<1){const F=Math.exp(-y*b*N),G=Math.sin(A*N),Q=Math.cos(A*N),Z=a-F*(R*G+w*Q),W=ls(F*(L*G+I*Q));return u.done=Math.abs(W)<=r&&Math.abs(a-Z)<=s,u.value=u.done?a:Z,u}const j=P(N);if(_)u.done=N>=p;else{const F=ls(T(N));u.done=Math.abs(F)<=r&&Math.abs(a-j)<=s}return u.value=u.done?a:j,u},toString:()=>{const N=Math.min(yx(O),Km),j=nT(F=>O.next(N*F).value,N,30);return N+"ms "+j},toTransition:()=>{}};return O}Zm.applyToOptions=t=>{const e=Rj(t,100,Zm);return t.ease=e.ease,t.duration=ls(e.duration),t.type="keyframes",t};const Fj=5;function rT(t,e,n){const r=Math.max(e-Fj,0);return D3(n-t(r),e-r)}function w_({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:u,max:c,restDelta:d=.5,restSpeed:f}){const p=t[0],m={done:!1,value:p},_=I=>u!==void 0&&I<u||c!==void 0&&I>c,x=I=>u===void 0?c:c===void 0||Math.abs(u-I)<Math.abs(c-I)?u:c;let y=n*e;const w=p+y,b=a===void 0?w:a(w);b!==w&&(y=b-p);const C=I=>-y*Math.exp(-I/r),P=I=>b+C(I),T=I=>{const O=C(I),N=P(I);m.done=Math.abs(O)<=d,m.value=m.done?b:N};let A,R;const L=I=>{_(m.value)&&(A=I,R=Zm({keyframes:[m.value,x(m.value)],velocity:rT(P,I,m.value),damping:s,stiffness:i,restDelta:d,restSpeed:f}))};return L(0),{calculatedDuration:null,next:I=>{let O=!1;return!R&&A===void 0&&(O=!0,T(I),L(I)),A!==void 0&&I>=A?R.next(I-A):(!O&&T(I),m)}}}function Vj(t,e,n){const r=[],s=n||fa.mix||tT,i=t.length-1;for(let a=0;a<i;a++){let u=s(t[a],t[a+1]);if(e){const c=Array.isArray(e)?e[a]||Ms:e;u=Vf(c,u)}r.push(u)}return r}function $j(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(k0(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=Vj(e,r,s),c=u.length,d=f=>{if(a&&f<t[0])return e[0];let p=0;if(c>1)for(;p<t.length-2&&!(f<t[p+1]);p++);const m=of(t[p],t[p+1],f);return u[p](m)};return n?f=>d(Ri(t[0],t[i-1],f)):d}function zj(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=of(0,e,r);t.push(Mt(n,1,s))}}function Hj(t){const e=[0];return zj(e,t.length-1),e}function Uj(t,e){return t.map(n=>n*e)}function Bj(t,e){return t.map(()=>e||W3).splice(0,t.length-1)}function Hd({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=Q7(r)?r.map(eC):eC(r),i={done:!1,value:e[0]},a=Uj(n&&n.length===e.length?n:Hj(e),t),u=$j(a,e,{ease:Array.isArray(s)?s:Bj(e,s)});return{calculatedDuration:t,next:c=>(i.value=u(c),i.done=c>=t,i)}}const Wj=t=>t!==null;function P0(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(Wj),u=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!u||r===void 0?i[u]:r}const qj={decay:w_,inertia:w_,tween:Hd,keyframes:Hd,spring:Zm};function sT(t){typeof t.type=="string"&&(t.type=qj[t.type])}class _x{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 Gj=t=>t/100;class Ym extends _x{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==br.now()&&this.tick(br.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;sT(e);const{type:n=Hd,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=e;let{keyframes:u}=e;const c=n||Hd;c!==Hd&&typeof u[0]!="number"&&(this.mixKeyframes=Vf(Gj,tT(u[0],u[1])),u=[0,100]);const d=c({...e,keyframes:u});i==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...u].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=yx(d));const{calculatedDuration:f}=d;this.calculatedDuration=f,this.resolvedDuration=f+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}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:s,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:u,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:f,repeat:p,repeatType:m,repeatDelay:_,type:x,onUpdate:y,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-d*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let P=this.currentTime,T=r;if(p){const I=Math.min(this.currentTime,s)/u;let O=Math.floor(I),N=I%1;!N&&I>=1&&(N=1),N===1&&O--,O=Math.min(O,p+1),!!(O%2)&&(m==="reverse"?(N=1-N,_&&(N-=_/u)):m==="mirror"&&(T=a)),P=Ri(0,1,N)*u}let A;C?(this.delayState.value=f[0],A=this.delayState):A=T.next(P),i&&!C&&(A.value=i(A.value));let{done:R}=A;!C&&c!==null&&(R=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return L&&x!==w_&&(A.value=P0(f,this.options,w,this.speed)),y&&y(A.value),L&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return Ts(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ts(e)}get time(){return Ts(this.currentTime)}set time(e){e=ls(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return rT(r=>this.generator.next(r).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(br.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=Ts(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=Ij,startTime:n}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(i=(s=this.options).onPlay)==null||i.call(s);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(br.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 Kj(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const fl=t=>t*180/Math.PI,b_=t=>{const e=fl(Math.atan2(t[1],t[0]));return S_(e)},Zj={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:b_,rotateZ:b_,skewX:t=>fl(Math.atan(t[1])),skewY:t=>fl(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},S_=t=>(t=t%360,t<0&&(t+=360),t),aC=b_,lC=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),uC=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Yj={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:lC,scaleY:uC,scale:t=>(lC(t)+uC(t))/2,rotateX:t=>S_(fl(Math.atan2(t[6],t[5]))),rotateY:t=>S_(fl(Math.atan2(-t[2],t[0]))),rotateZ:aC,rotate:aC,skewX:t=>fl(Math.atan(t[4])),skewY:t=>fl(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function E_(t){return t.includes("scale")?1:0}function C_(t,e){if(!t||t==="none")return E_(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Yj,s=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Zj,s=u}if(!s)return E_(e);const i=r[e],a=s[1].split(",").map(Qj);return typeof i=="function"?i(a):a[i]}const Xj=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return C_(n,e)};function Qj(t){return parseFloat(t.trim())}const wc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bc=new Set([...wc,"pathRotation"]),cC=t=>t===xc||t===Oe,Jj=new Set(["x","y","z"]),eF=wc.filter(t=>!Jj.has(t));function tF(t){const e=[];return eF.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const na={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:r})=>{const s=t.max-t.min;return r==="border-box"?s:s-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})=>C_(e,"x"),y:(t,{transform:e})=>C_(e,"y")};na.translateX=na.x;na.translateY=na.y;const Cl=new Set;let k_=!1,P_=!1,T_=!1;function iT(){if(P_){const t=Array.from(Cl).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=tF(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,a])=>{var u;(u=r.getValue(i))==null||u.set(a)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}P_=!1,k_=!1,Cl.forEach(t=>t.complete(T_)),Cl.clear()}function oT(){Cl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(P_=!0)})}function nF(){T_=!0,oT(),iT(),T_=!1}class xx{constructor(e,n,r,s,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Cl.add(this),k_||(k_=!0,Ot.read(oT),Ot.resolveKeyframes(iT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const u=r.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),s&&i===void 0&&s.set(e[0])}Kj(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Cl.delete(this)}cancel(){this.state==="scheduled"&&(Cl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const rF=t=>t.startsWith("--");function aT(t,e,n){rF(e)?t.style.setProperty(e,n):t.style[e]=n}const sF={};function lT(t,e){const n=N3(t);return()=>sF[e]??n()}const iF=lT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),uT=lT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Od=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,dC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Od([0,.65,.55,1]),circOut:Od([.55,0,1,.45]),backIn:Od([.31,.01,.66,-.59]),backOut:Od([.33,1.53,.69,.99])};function cT(t,e){if(t)return typeof t=="function"?uT()?nT(t,e):"ease-out":q3(t)?Od(t):Array.isArray(t)?t.map(n=>cT(n,e)||dC.easeOut):dC[t]}function oF(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const f={[e]:n};c&&(f.offset=c);const p=cT(u,s);Array.isArray(p)&&(f.easing=p);const m={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),t.animate(f,m)}function dT(t){return typeof t=="function"&&"applyToOptions"in t}function aF({type:t,...e}){return dT(t)&&uT()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class fT extends _x{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,k0(typeof e.type!="string");const d=aF(e);this.animation=oF(n,r,s,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const f=P0(s,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(f),aT(n,r,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}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 Ts(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ts(e)}get time(){return Ts(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ls(e),n&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&iF()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ms):s(this)}}const hT={anticipate:H3,backInOut:z3,circInOut:B3};function lF(t){return t in hT}function uF(t){typeof t.ease=="string"&&lF(t.ease)&&(t.ease=hT[t.ease])}const w1=10;class cF extends fT{constructor(e){uF(e),sT(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...a}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const u=new Ym({...a,autoplay:!1}),c=Math.max(w1,br.now()-this.startTime),d=Ri(0,w1,c-w1),f=u.sample(c).value,{name:p}=this.options;i&&p&&aT(i,p,f),n.setWithVelocity(u.sample(Math.max(0,c-d)).value,f,d),u.stop()}}const fC=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Xs.test(t)||t==="0")&&!t.startsWith("url("));function dF(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 fF(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],a=fC(s,e),u=fC(i,e);return!a||!u?!1:dF(t)||(n==="spring"||dT(n))&&r}function A_(t){t.duration=0,t.type="keyframes"}const pT=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),hF=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function pF(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&hF.test(t[e]))return!0;return!1}const mF=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),vF=N3(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gF(t){var p;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:a,keyframes:u}=t,c=(p=e==null?void 0:e.owner)==null?void 0:p.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;const{onUpdate:d,transformTemplate:f}=e.owner.getProps();return vF()&&n&&(pT.has(n)||mF.has(n)&&pF(u))&&(n!=="transform"||!f)&&!d&&!r&&s!=="mirror"&&i!==0&&a!=="inertia"}const yF=40;class _F extends _x{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",keyframes:u,name:c,motionValue:d,element:f,...p}){var x;super(),this.stop=()=>{var y,w;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=br.now();const m={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,name:c,motionValue:d,element:f,...p},_=(f==null?void 0:f.KeyframeResolver)||xx;this.keyframeResolver=new _(u,(y,w,b)=>this.onKeyframesResolved(y,w,m,!b),c,d,f),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(e,n,r,s){var b,C;this.keyframeResolver=void 0;const{name:i,type:a,velocity:u,delay:c,isHandoff:d,onUpdate:f}=r;this.resolvedAt=br.now();let p=!0;fF(e,i,a,u)||(p=!1,(fa.instantAnimations||!c)&&(f==null||f(P0(e,r,n))),e[0]=e[e.length-1],A_(r),r.repeat=0);const _={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>yF?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},x=p&&!d&&gF(_),y=(C=(b=_.motionValue)==null?void 0:b.owner)==null?void 0:C.current;let w;if(x)try{w=new cF({..._,element:y})}catch{w=new Ym(_)}else w=new Ym(_);w.finished.then(()=>{this.notifyFinished()}).catch(Ms),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}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(),nF()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function mT(t,e,n,r=0,s=1){const i=Array.from(t).sort((d,f)=>d.sortNodePosition(f)).indexOf(e),a=t.size,u=(a-1)*r;return typeof n=="function"?n(i,a):s===1?i*r:u-i*r}const hC=30,xF=t=>!isNaN(parseFloat(t));class wF{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=br.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=br.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xF(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 dx);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ot.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=br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>hC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hC);return D3(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 pc(t,e){return new wF(t,e)}function vT(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function wx(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?vT(n,t):n}const bF={type:"spring",stiffness:500,damping:25,restSpeed:10},SF=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),EF={type:"keyframes",duration:.8},CF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kF=(t,{keyframes:e})=>e.length>2?EF:bc.has(t)?t.startsWith("scale")?SF(e[1]):bF:CF,PF=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function TF(t){for(const e in t)if(!PF.has(e))return!0;return!1}const bx=(t,e,n,r={},s,i)=>a=>{const u=wx(r,t)||{},c=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-ls(c);const f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-d,onUpdate:m=>{e.set(m),u.onUpdate&&u.onUpdate(m)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:i?void 0:s};TF(u)||Object.assign(f,kF(t,f)),f.duration&&(f.duration=ls(f.duration)),f.repeatDelay&&(f.repeatDelay=ls(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let p=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(A_(f),f.delay===0&&(p=!0)),(fa.instantAnimations||fa.skipAnimations||s!=null&&s.shouldSkipAnimations||u.skipAnimations)&&(p=!0,A_(f),f.delay=0),f.allowFlatten=!u.type&&!u.ease,p&&!i&&e.get()!==void 0){const m=P0(f.keyframes,u);if(m!==void 0){Ot.update(()=>{f.onUpdate(m),f.onComplete()});return}}return u.isSync?new Ym(f):new _F(f)},AF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function IF(t){const e=AF.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}function gT(t,e,n=1){const[r,s]=IF(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const a=i.trim();return M3(a)?parseFloat(a):a}return px(s)?gT(s,e,n+1):s}function pC(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Sx(t,e,n,r){if(typeof e=="function"){const[s,i]=pC(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=pC(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function kl(t,e,n){const r=t.getProps();return Sx(r,e,n!==void 0?n:r.custom,t)}const yT=new Set(["width","height","top","left","right","bottom",...wc]),I_=t=>Array.isArray(t);function RF(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pc(n))}function MF(t){return I_(t)?t[t.length-1]||0:t}function OF(t,e){const n=kl(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const u=MF(i[a]);RF(t,a,u)}}const Qn=t=>!!(t&&t.getVelocity);function LF(t){return!!(Qn(t)&&t.add)}function R_(t,e){const n=t.getValue("willChange");if(LF(n))return n.add(e);if(!n&&fa.WillChange){const r=new fa.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ex(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const NF="framerAppearId",_T="data-"+Ex(NF);function xT(t){return t.props[_T]}function DF({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function wT(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:a,...u}=e;const c=t.getDefaultTransition();i=i?vT(i,c):c;const d=i==null?void 0:i.reduceMotion,f=i==null?void 0:i.skipAnimations;r&&(i=r);const p=[],m=s&&t.animationState&&t.animationState.getState()[s],_=i==null?void 0:i.path;_&&_.animateVisualElement(t,u,i,n,p);for(const x in u){const y=t.getValue(x,t.latestValues[x]??null),w=u[x];if(w===void 0||m&&DF(m,x))continue;const b={delay:n,...wx(i||{},x)};f&&(b.skipAnimations=!0);const C=y.get();if(C!==void 0&&!y.isAnimating()&&!Array.isArray(w)&&w===C&&!b.velocity){Ot.update(()=>y.set(w));continue}let P=!1;if(window.MotionHandoffAnimation){const R=xT(t);if(R){const L=window.MotionHandoffAnimation(R,x,Ot);L!==null&&(b.startTime=L,P=!0)}}R_(t,x);const T=d??t.shouldReduceMotion;y.start(bx(x,y,w,T&&yT.has(x)?{type:!1}:b,t,P));const A=y.animation;A&&p.push(A)}if(a){const x=()=>Ot.update(()=>{a&&OF(t,a)});p.length?Promise.all(p).then(x):x()}return p}function M_(t,e,n={}){var c;const r=kl(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(wT(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:m}=s;return jF(t,e,d,f,p,m,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[d,f]=u==="beforeChildren"?[i,a]:[a,i];return d().then(()=>f())}else return Promise.all([i(),a(n.delay)])}function jF(t,e,n=0,r=0,s=0,i=1,a){const u=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),u.push(M_(c,e,{...a,delay:n+(typeof r=="function"?0:r)+mT(t.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(u)}function FF(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>M_(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=M_(t,e,n);else{const s=typeof e=="function"?kl(t,e,n.custom):e;r=Promise.all(wT(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const VF={test:t=>t==="auto",parse:t=>t},bT=t=>e=>e.test(t),ST=[xc,Oe,Ii,eo,dj,cj,VF],mC=t=>ST.find(bT(t));function $F(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||L3(t):!0}const zF=new Set(["brightness","contrast","saturate","opacity"]);function HF(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(mx)||[];if(!r)return t;const s=n.replace(r,"");let i=zF.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const UF=/\b([a-z-]*)\(.*?\)/gu,O_={...Xs,getAnimatableNone:t=>{const e=t.match(UF);return e?e.map(HF).join(" "):t}},L_={...Xs,getAnimatableNone:t=>{const e=Xs.parse(t);return Xs.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},vC={...xc,transform:Math.round},BF={rotate:eo,pathRotation:eo,rotateX:eo,rotateY:eo,rotateZ:eo,scale:wp,scaleX:wp,scaleY:wp,scaleZ:wp,skew:eo,skewX:eo,skewY:eo,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:af,originX:nC,originY:nC,originZ:Oe},Xm={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,inset:Oe,insetBlock:Oe,insetBlockStart:Oe,insetBlockEnd:Oe,insetInline:Oe,insetInlineStart:Oe,insetInlineEnd:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,paddingBlock:Oe,paddingBlockStart:Oe,paddingBlockEnd:Oe,paddingInline:Oe,paddingInlineStart:Oe,paddingInlineEnd:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,marginBlock:Oe,marginBlockStart:Oe,marginBlockEnd:Oe,marginInline:Oe,marginInlineStart:Oe,marginInlineEnd:Oe,fontSize:Oe,backgroundPositionX:Oe,backgroundPositionY:Oe,...BF,zIndex:vC,fillOpacity:af,strokeOpacity:af,numOctaves:vC},WF={...Xm,color:kn,backgroundColor:kn,outlineColor:kn,fill:kn,stroke:kn,borderColor:kn,borderTopColor:kn,borderRightColor:kn,borderBottomColor:kn,borderLeftColor:kn,filter:O_,WebkitFilter:O_,mask:L_,WebkitMask:L_},ET=t=>WF[t],qF=new Set([O_,L_]);function CT(t,e){let n=ET(t);return qF.has(n)||(n=Xs),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const GF=new Set(["auto","none","0"]);function KF(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!GF.has(i)&&hc(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=CT(n,s)}class ZF extends xx{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f<e.length;f++){let p=e[f];if(typeof p=="string"&&(p=p.trim(),px(p))){const m=gT(p,n.current);m!==void 0&&(e[f]=m),f===e.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!yT.has(r)||e.length!==2)return;const[s,i]=e,a=mC(s),u=mC(i),c=tC(s),d=tC(i);if(c!==d&&na[r]){this.needsMeasurement=!0;return}if(a!==u)if(cC(a)&&cC(u))for(let f=0;f<e.length;f++){const p=e[f];typeof p=="string"&&(e[f]=parseFloat(p))}else na[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||$F(e[s]))&&r.push(s);r.length&&KF(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=na[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=na[n](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([c,d])=>{e.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const Cx=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function kT(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;const s=(n==null?void 0:n[t])??r.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const N_=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Xp(t){return O3(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:kx}=G3(queueMicrotask,!1),Bs={x:!1,y:!1};function PT(){return Bs.x||Bs.y}function YF(t){return t==="x"||t==="y"?Bs[t]?null:(Bs[t]=!0,()=>{Bs[t]=!1}):Bs.x||Bs.y?null:(Bs.x=Bs.y=!0,()=>{Bs.x=Bs.y=!1})}function TT(t,e){const n=kT(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function XF(t){return!(t.pointerType==="touch"||PT())}function QF(t,e,n={}){const[r,s,i]=TT(t,n);return r.forEach(a=>{let u=!1,c=!1,d;const f=()=>{a.removeEventListener("pointerleave",x)},p=w=>{d&&(d(w),d=void 0),f()},m=w=>{u=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,p(w))},_=()=>{u=!0,window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",m,s)},x=w=>{if(w.pointerType!=="touch"){if(u){c=!0;return}p(w)}},y=w=>{if(!XF(w))return;c=!1;const b=e(a,w);typeof b=="function"&&(d=b,a.addEventListener("pointerleave",x,s))};a.addEventListener("pointerenter",y,s),a.addEventListener("pointerdown",_,s)}),i}const AT=(t,e)=>e?t===e?!0:AT(t,e.parentElement):!1,Px=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,JF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eV(t){return JF.has(t.tagName)||t.isContentEditable===!0}const tV=new Set(["INPUT","SELECT","TEXTAREA"]);function nV(t){return tV.has(t.tagName)||t.isContentEditable===!0}const Qp=new WeakSet;function gC(t){return e=>{e.key==="Enter"&&t(e)}}function b1(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const rV=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=gC(()=>{if(Qp.has(n))return;b1(n,"down");const s=gC(()=>{b1(n,"up")}),i=()=>b1(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function yC(t){return Px(t)&&!PT()}const _C=new WeakSet;function sV(t,e,n={}){const[r,s,i]=TT(t,n),a=u=>{const c=u.currentTarget;if(!yC(u)||_C.has(u))return;Qp.add(c),n.stopPropagation&&_C.add(u);const d=e(c,u),f={...s,capture:!0},p=(x,y)=>{window.removeEventListener("pointerup",m,f),window.removeEventListener("pointercancel",_,f),Qp.has(c)&&Qp.delete(c),yC(x)&&typeof d=="function"&&d(x,{success:y})},m=x=>{p(x,c===window||c===document||n.useGlobalTarget||AT(c,x.target))},_=x=>{p(x,!1)};window.addEventListener("pointerup",m,f),window.addEventListener("pointercancel",_,f)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",a,s),Xp(u)&&(u.addEventListener("focus",d=>rV(d,s)),!eV(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),i}function Tx(t){return O3(t)&&"ownerSVGElement"in t}const Jp=new WeakMap;let Ko;const IT=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:Tx(r)&&"getBBox"in r?r.getBBox()[e]:r[n],iV=IT("inline","width","offsetWidth"),oV=IT("block","height","offsetHeight");function aV({target:t,borderBoxSize:e}){var n;(n=Jp.get(t))==null||n.forEach(r=>{r(t,{get width(){return iV(t,e)},get height(){return oV(t,e)}})})}function lV(t){t.forEach(aV)}function uV(){typeof ResizeObserver>"u"||(Ko=new ResizeObserver(lV))}function cV(t,e){Ko||uV();const n=kT(t);return n.forEach(r=>{let s=Jp.get(r);s||(s=new Set,Jp.set(r,s)),s.add(e),Ko==null||Ko.observe(r)}),()=>{n.forEach(r=>{const s=Jp.get(r);s==null||s.delete(e),s!=null&&s.size||Ko==null||Ko.unobserve(r)})}}const em=new Set;let Au;function dV(){Au=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};em.forEach(e=>e(t))},window.addEventListener("resize",Au)}function fV(t){return em.add(t),Au||dV(),()=>{em.delete(t),!em.size&&typeof Au=="function"&&(window.removeEventListener("resize",Au),Au=void 0)}}function xC(t,e){return typeof t=="function"?fV(t):cV(t,e)}function hV(t){return Tx(t)&&t.tagName==="svg"}const pV=[...ST,kn,Xs],mV=t=>pV.find(bT(t)),wC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Iu=()=>({x:wC(),y:wC()}),bC=()=>({min:0,max:0}),Mn=()=>({x:bC(),y:bC()}),vV=new WeakMap;function T0(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lf(t){return typeof t=="string"||Array.isArray(t)}const Ax=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ix=["initial",...Ax];function A0(t){return T0(t.animate)||Ix.some(e=>lf(t[e]))}function RT(t){return!!(A0(t)||t.variants)}function gV(t,e,n){for(const r in e){const s=e[r],i=n[r];if(Qn(s))t.addValue(r,s);else if(Qn(i))t.addValue(r,pc(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const a=t.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=t.getStaticValue(r);t.addValue(r,pc(a!==void 0?a:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Qm={current:null},Rx={current:!1},yV=typeof window<"u";function MT(){if(Rx.current=!0,!!yV)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Qm.current=t.matches;t.addEventListener("change",e),e()}else Qm.current=!1}const SC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jm={};function OT(t){Jm=t}function _V(){return Jm}class xV{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 _=br.now();this.renderScheduledAt<_&&(this.renderScheduledAt=_,Ot.render(this.render,!1,!0))};const{latestValues:d,renderState:f}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=f,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=A0(n),this.isVariantNode=RT(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const _ in m){const x=m[_];d[_]!==void 0&&Qn(x)&&x.set(d[_])}}mount(e){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,vV.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((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Rx.current||MT(),this.shouldReduceMotion=Qm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),ha(this.notifyUpdate),ha(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){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&pT.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:f}=n.accelerate,p=new fT({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:ls(f)}),m=a(p);this.valueSubscriptions.set(e,()=>{m(),p.cancel()});return}const r=bc.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&Ot.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i()})}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 Jm){const n=Jm[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mn()}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<SC.length;r++){const s=SC[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=e[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=gV(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=pc(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"&&(M3(r)||L3(r))?r=parseFloat(r):!mV(r)&&Xs.test(n)&&(r=CT(e,n)),this.setBaseTarget(e,Qn(r)?r.get():r)),Qn(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=Sx(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);a&&(r=a[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Qn(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new dx),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){kx.render(this.render)}}class LT extends xV{constructor(){super(...arguments),this.KeyframeResolver=ZF}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[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;Qn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class xa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function NT({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function wV({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function bV(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 S1(t){return t===void 0||t===1}function D_({scale:t,scaleX:e,scaleY:n}){return!S1(t)||!S1(e)||!S1(n)}function il(t){return D_(t)||DT(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function DT(t){return EC(t.x)||EC(t.y)}function EC(t){return t&&t!=="0%"}function e0(t,e,n){const r=t-n,s=e*r;return n+s}function CC(t,e,n,r,s){return s!==void 0&&(t=e0(t,s,r)),e0(t,n,r)+e}function j_(t,e=0,n=1,r,s){t.min=CC(t.min,e,n,r,s),t.max=CC(t.max,e,n,r,s)}function jT(t,{x:e,y:n}){j_(t.x,e.translate,e.scale,e.originPoint),j_(t.y,n.translate,n.scale,n.originPoint)}const kC=.999999999999,PC=1.0000000000001;function SV(t,e,n,r=!1){var u;const s=n.length;if(!s)return;e.x=e.y=1;let i,a;for(let c=0;c<s;c++){i=n[c],a=i.projectionDelta;const{visualElement:d}=i.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Ei(t.x,-i.scroll.offset.x),Ei(t.y,-i.scroll.offset.y)),a&&(e.x*=a.x.scale,e.y*=a.y.scale,jT(t,a)),r&&il(i.latestValues)&&tm(t,i.latestValues,(u=i.layout)==null?void 0:u.layoutBox))}e.x<PC&&e.x>kC&&(e.x=1),e.y<PC&&e.y>kC&&(e.y=1)}function Ei(t,e){t.min+=e,t.max+=e}function TC(t,e,n,r,s=.5){const i=Mt(t.min,t.max,s);j_(t,e,n,i,r)}function AC(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function tm(t,e,n){const r=n??t;TC(t.x,AC(e.x,r.x),e.scaleX,e.scale,e.originX),TC(t.y,AC(e.y,r.y),e.scaleY,e.scale,e.originY)}function FT(t,e){return NT(bV(t.getBoundingClientRect(),e))}function EV(t,e,n){const r=FT(t,n),{scroll:s}=e;return s&&(Ei(r.x,s.offset.x),Ei(r.y,s.offset.y)),r}const CV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kV=wc.length;function PV(t,e,n){let r="",s=!0;for(let a=0;a<kV;a++){const u=wc[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const f=parseFloat(c);d=u.startsWith("scale")?f===1:f===0}if(!d||n){const f=N_(c,Xm[u]);if(!d){s=!1;const p=CV[u]||u;r+=`${p}(${f}) `}n&&(e[u]=f)}}const i=t.pathRotation;return i&&(s=!1,r+=`rotate(${N_(i,Xm.pathRotation)}) `),r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function Mx(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(bc.has(c)){a=!0;continue}else if(Z3(c)){s[c]=d;continue}else{const f=N_(d,Xm[c]);c.startsWith("origin")?(u=!0,i[c]=f):r[c]=f}}if(e.transform||(a||n?r.transform=PV(e,t.transform,n):r.transform&&(r.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:f=0}=i;r.transformOrigin=`${c} ${d} ${f}`}}function VT(t,{style:e,vars:n},r,s){const i=t.style;let a;for(a in e)i[a]=e[a];s==null||s.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function IC(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ed={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Oe.test(t))t=parseFloat(t);else return t;const n=IC(t,e.target.x),r=IC(t,e.target.y);return`${n}% ${r}%`}},TV={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=Xs.parse(t);if(s.length>5)return r;const i=Xs.createTransformer(t),a=typeof s[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;s[0+a]/=u,s[1+a]/=c;const d=Mt(u,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),i(s)}},F_={borderRadius:{...Ed,applyTo:[...Cx]},borderTopLeftRadius:Ed,borderTopRightRadius:Ed,borderBottomLeftRadius:Ed,borderBottomRightRadius:Ed,boxShadow:TV};function $T(t,{layout:e,layoutId:n}){return bc.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!F_[t]||t==="opacity")}function Ox(t,e,n){var a;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const u in r)(Qn(r[u])||s&&Qn(s[u])||$T(u,t)||((a=n==null?void 0:n.getValue(u))==null?void 0:a.liveStyle)!==void 0)&&(i[u]=r[u]);return i}function AV(t){return window.getComputedStyle(t)}class IV extends LT{constructor(){super(...arguments),this.type="html",this.renderInstance=VT}mount(e){k0(!!e.style),super.mount(e)}readValueFromInstance(e,n){var r;if(bc.has(n))return(r=this.projection)!=null&&r.isProjecting?E_(n):Xj(e,n);{const s=AV(e),i=(Z3(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return FT(e,n)}build(e,n,r){Mx(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return Ox(e,n,r)}}const RV={offset:"stroke-dashoffset",array:"stroke-dasharray"},MV={offset:"strokeDashoffset",array:"strokeDasharray"};function OV(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?RV:MV;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const LV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zT(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:a=0,...u},c,d,f){if(Mx(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:p,style:m}=t;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete p.transformBox);for(const _ of LV)p[_]!==void 0&&(m[_]=p[_],delete p[_]);e!==void 0&&(p.x=e),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&OV(p,s,i,a,!1)}const HT=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"]),UT=t=>typeof t=="string"&&t.toLowerCase()==="svg";function NV(t,e,n,r){VT(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(HT.has(s)?s:Ex(s),e.attrs[s])}function BT(t,e,n){const r=Ox(t,e,n);for(const s in t)if(Qn(t[s])||Qn(e[s])){const i=wc.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class DV extends LT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Mn}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(bc.has(n)){const r=ET(n);return r&&r.default||0}return n=HT.has(n)?n:Ex(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return BT(e,n,r)}build(e,n,r){zT(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){NV(e,n,r,s)}mount(e){this.isSVGTag=UT(e.tagName),super.mount(e)}}const jV=Ix.length;function WT(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?WT(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<jV;n++){const r=Ix[n],s=t.props[r];(lf(s)||s===!1)&&(e[r]=s)}return e}function qT(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 FV=[...Ax].reverse(),VV=Ax.length;function $V(t){return e=>Promise.all(e.map(({animation:n,options:r})=>FF(t,n,r)))}function zV(t){let e=$V(t),n=RC(),r=!0,s=!1;const i=d=>(f,p)=>{var _;const m=kl(t,p,d==="exit"?(_=t.presenceContext)==null?void 0:_.custom:void 0);if(m){const{transition:x,transitionEnd:y,...w}=m;f={...f,...w,...y}}return f};function a(d){e=d(t)}function u(d){const{props:f}=t,p=WT(t.parent)||{},m=[],_=new Set;let x={},y=1/0;for(let b=0;b<VV;b++){const C=FV[b],P=n[C],T=f[C]!==void 0?f[C]:p[C],A=lf(T),R=C===d?P.isActive:null;R===!1&&(y=b);let L=T===p[C]&&T!==f[C]&&A;if(L&&(r||s)&&t.manuallyAnimateOnMount&&(L=!1),P.protectedKeys={...x},!P.isActive&&R===null||!T&&!P.prevProp||T0(T)||typeof T=="boolean")continue;if(C==="exit"&&P.isActive&&R!==!0){P.prevResolvedValues&&(x={...x,...P.prevResolvedValues});continue}const I=HV(P.prevProp,T);let O=I||C===d&&P.isActive&&!L&&A||b>y&&A,N=!1;const j=Array.isArray(T)?T:[T];let F=j.reduce(i(C),{});R===!1&&(F={});const{prevResolvedValues:G={}}=P,Q={...G,...F},Z=z=>{O=!0,_.has(z)&&(N=!0,_.delete(z)),P.needsAnimating[z]=!0;const X=t.getValue(z);X&&(X.liveStyle=!1)};for(const z in Q){const X=F[z],H=G[z];if(x.hasOwnProperty(z))continue;let D=!1;I_(X)&&I_(H)?D=!qT(X,H)||I:D=X!==H,D?X!=null?Z(z):_.add(z):X!==void 0&&_.has(z)?Z(z):P.protectedKeys[z]=!0}P.prevProp=T,P.prevResolvedValues=F,P.isActive&&(x={...x,...F}),(r||s)&&t.blockInitialAnimation&&(O=!1);const W=L&&I;O&&(!W||N)&&m.push(...j.map(z=>{const X={type:C};if(typeof z=="string"&&(r||s)&&!W&&t.manuallyAnimateOnMount&&t.parent){const{parent:H}=t,D=kl(H,z);if(H.enteringChildren&&D){const{delayChildren:Y}=D.transition||{};X.delay=mT(H.enteringChildren,t,Y)}}return{animation:z,options:X}}))}if(_.size){const b={};if(typeof f.initial!="boolean"){const C=kl(t,Array.isArray(f.initial)?f.initial[0]:f.initial);C&&C.transition&&(b.transition=C.transition)}_.forEach(C=>{const P=t.getBaseTarget(C),T=t.getValue(C);T&&(T.liveStyle=!0),b[C]=P??null}),m.push({animation:b})}let w=!!m.length;return r&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,s=!1,w?e(m):Promise.resolve()}function c(d,f){var m;if(n[d].isActive===f)return Promise.resolve();(m=t.variantChildren)==null||m.forEach(_=>{var x;return(x=_.animationState)==null?void 0:x.setActive(d,f)}),n[d].isActive=f;const p=u(d);for(const _ in n)n[_].protectedKeys={};return p}return{animateChanges:u,setActive:c,setAnimateFunction:a,getState:()=>n,reset:()=>{n=RC(),s=!0}}}function HV(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!qT(e,t):!1}function Ga(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RC(){return{animate:Ga(!0),whileInView:Ga(),whileHover:Ga(),whileTap:Ga(),whileDrag:Ga(),whileFocus:Ga(),exit:Ga()}}function V_(t,e){t.min=e.min,t.max=e.max}function Hs(t,e){V_(t.x,e.x),V_(t.y,e.y)}function MC(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const GT=1e-4,UV=1-GT,BV=1+GT,KT=.01,WV=0-KT,qV=0+KT;function Sr(t){return t.max-t.min}function GV(t,e,n){return Math.abs(t-e)<=n}function OC(t,e,n,r=.5){t.origin=r,t.originPoint=Mt(e.min,e.max,t.origin),t.scale=Sr(n)/Sr(e),t.translate=Mt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=UV&&t.scale<=BV||isNaN(t.scale))&&(t.scale=1),(t.translate>=WV&&t.translate<=qV||isNaN(t.translate))&&(t.translate=0)}function Ud(t,e,n,r){OC(t.x,e.x,n.x,r?r.originX:void 0),OC(t.y,e.y,n.y,r?r.originY:void 0)}function LC(t,e,n,r=0){const s=r?Mt(n.min,n.max,r):n.min;t.min=s+e.min,t.max=t.min+Sr(e)}function KV(t,e,n,r){LC(t.x,e.x,n.x,r==null?void 0:r.x),LC(t.y,e.y,n.y,r==null?void 0:r.y)}function NC(t,e,n,r=0){const s=r?Mt(n.min,n.max,r):n.min;t.min=e.min-s,t.max=t.min+Sr(e)}function t0(t,e,n,r){NC(t.x,e.x,n.x,r==null?void 0:r.x),NC(t.y,e.y,n.y,r==null?void 0:r.y)}function DC(t,e,n,r,s){return t-=e,t=e0(t,1/n,r),s!==void 0&&(t=e0(t,1/s,r)),t}function ZV(t,e=0,n=1,r=.5,s,i=t,a=t){if(Ii.test(e)&&(e=parseFloat(e),e=Mt(a.min,a.max,e/100)-a.min),typeof e!="number")return;let u=Mt(i.min,i.max,r);t===i&&(u-=e),t.min=DC(t.min,e,n,u,s),t.max=DC(t.max,e,n,u,s)}function jC(t,e,[n,r,s],i,a){ZV(t,e[n],e[r],e[s],e.scale,i,a)}const YV=["x","scaleX","originX"],XV=["y","scaleY","originY"];function FC(t,e,n,r){jC(t.x,e,YV,n?n.x:void 0,r?r.x:void 0),jC(t.y,e,XV,n?n.y:void 0,r?r.y:void 0)}function VC(t){return t.translate===0&&t.scale===1}function ZT(t){return VC(t.x)&&VC(t.y)}function $C(t,e){return t.min===e.min&&t.max===e.max}function QV(t,e){return $C(t.x,e.x)&&$C(t.y,e.y)}function zC(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function YT(t,e){return zC(t.x,e.x)&&zC(t.y,e.y)}function HC(t){return Sr(t.x)/Sr(t.y)}function UC(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function gi(t){return[t("x"),t("y")]}function JV(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,a=(n==null?void 0:n.z)||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:d,rotate:f,pathRotation:p,rotateX:m,rotateY:_,skewX:x,skewY:y}=n;d&&(r=`perspective(${d}px) ${r}`),f&&(r+=`rotate(${f}deg) `),p&&(r+=`rotate(${p}deg) `),m&&(r+=`rotateX(${m}deg) `),_&&(r+=`rotateY(${_}deg) `),x&&(r+=`skewX(${x}deg) `),y&&(r+=`skewY(${y}deg) `)}const u=t.x.scale*e.x,c=t.y.scale*e.y;return(u!==1||c!==1)&&(r+=`scale(${u}, ${c})`),r||"none"}const e$=Cx.length,BC=t=>typeof t=="string"?parseFloat(t):t,WC=t=>typeof t=="number"||Oe.test(t);function t$(t,e,n,r,s,i){s?(t.opacity=Mt(0,n.opacity??1,n$(r)),t.opacityExit=Mt(e.opacity??1,0,r$(r))):i&&(t.opacity=Mt(e.opacity??1,n.opacity??1,r));for(let a=0;a<e$;a++){const u=Cx[a];let c=qC(e,u),d=qC(n,u);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||WC(c)===WC(d)?(t[u]=Math.max(Mt(BC(c),BC(d),r),0),(Ii.test(d)||Ii.test(c))&&(t[u]+="%")):t[u]=d}(e.rotate||n.rotate)&&(t.rotate=Mt(e.rotate||0,n.rotate||0,r))}function qC(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const n$=XT(0,.5,U3),r$=XT(.5,.95,Ms);function XT(t,e,n){return r=>r<t?0:r>e?1:n(of(t,e,r))}function s$(t,e,n){const r=Qn(t)?t:pc(t);return r.start(bx("",r,e,n)),r.animation}function uf(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}const i$=(t,e)=>t.depth-e.depth;class o${constructor(){this.children=[],this.isDirty=!1}add(e){cx(this.children,e),this.isDirty=!0}remove(e){qm(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(i$),this.isDirty=!1,this.children.forEach(e)}}function a$(t,e){const n=br.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(ha(r),t(i-e))};return Ot.setup(r,!0),()=>ha(r)}function nm(t){return Qn(t)?t.get():t}class l${constructor(){this.members=[]}add(e){cx(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(qm(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(qm(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){var n;for(let r=this.members.indexOf(e)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(e,n){var s;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:a}=e.options;(i===void 0||i!==a)&&(e.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(s=e.root)!=null&&s.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,r,s,i,a;(r=(n=e.options).onExitComplete)==null||r.call(n),(a=(s=e.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||a.call(i)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const rm={hasAnimatedSinceResize:!0,hasEverUpdated:!1},E1=["","X","Y","Z"],u$=1e3;let c$=0;function C1(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function QT(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=xT(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ot,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&QT(r)}function JT({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},u=e==null?void 0:e()){this.id=c$++,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.layoutVersion=0,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(h$),this.nodes.forEach(_$),this.nodes.forEach(x$),this.nodes.forEach(p$)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new o$)}addEventListener(a,u){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new dx),this.eventHandlers.get(a).add(u)}notifyListeners(a,...u){const c=this.eventHandlers.get(a);c&&c.notify(...u)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Tx(a)&&!hV(a),this.instance=a;const{layoutId:u,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||u)&&(this.isLayoutDirty=!0),t){let f,p=0;const m=()=>this.root.updateBlockedByResize=!1;Ot.read(()=>{p=window.innerWidth}),t(a,()=>{const _=window.innerWidth;_!==p&&(p=_,this.root.updateBlockedByResize=!0,f&&f(),f=a$(m,250),rm.hasAnimatedSinceResize&&(rm.hasAnimatedSinceResize=!1,this.nodes.forEach(ZC)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeLayoutChanged:m,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||C$,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=d.getProps(),b=!this.targetLayout||!YT(this.targetLayout,_),C=!p&&m;if(this.options.layoutRoot||this.resumeFrom||C||p&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const P={...wx(x,"layout"),onPlay:y,onComplete:w};(d.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(f,C,P.path)}else p||ZC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ha(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(w$),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&QT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const p=this.path[f];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:c}=this.options;if(u===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(v$),this.nodes.forEach(GC);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KC);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(g$),this.nodes.forEach(y$),this.nodes.forEach(d$),this.nodes.forEach(f$)):this.nodes.forEach(KC),this.clearAllSnapshots();const u=br.now();Kn.delta=Ri(0,1e3/60,u-Kn.timestamp),Kn.timestamp=u,Kn.isProcessing=!0,v1.update.process(Kn),v1.preRender.process(Kn),v1.render.process(Kn),Kn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(m$),this.sharedNodes.forEach(b$)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sr(this.snapshot.measuredBox.x)&&!Sr(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Mn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(u=!1),u&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!ZT(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,f=d!==this.prevTransformTemplateValue;a&&this.instance&&(u||il(this.latestValues)||f)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const u=this.measurePageBox();let c=this.removeElementScroll(u);return a&&(c=this.removeTransform(c)),k$(c),{animationId:this.root.animationId,measuredBox:u,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:a}=this.options;if(!a)return Mn();const u=a.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(P$))){const{scroll:f}=this.root;f&&(Ei(u.x,f.offset.x),Ei(u.y,f.offset.y))}return u}removeElementScroll(a){var c;const u=Mn();if(Hs(u,a),(c=this.scroll)!=null&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const f=this.path[d],{scroll:p,options:m}=f;f!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&Hs(u,a),Ei(u.x,p.offset.x),Ei(u.y,p.offset.y))}return u}applyTransform(a,u=!1,c){var f,p;const d=c||Mn();Hs(d,a);for(let m=0;m<this.path.length;m++){const _=this.path[m];!u&&_.options.layoutScroll&&_.scroll&&_!==_.root&&(Ei(d.x,-_.scroll.offset.x),Ei(d.y,-_.scroll.offset.y)),il(_.latestValues)&&tm(d,_.latestValues,(f=_.layout)==null?void 0:f.layoutBox)}return il(this.latestValues)&&tm(d,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),d}removeTransform(a){var c;const u=Mn();Hs(u,a);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!il(f.latestValues))continue;let p;f.instance&&(D_(f.latestValues)&&f.updateSnapshot(),p=Mn(),Hs(p,f.measurePageBox())),FC(u,f.latestValues,(c=f.snapshot)==null?void 0:c.layoutBox,p)}return il(this.latestValues)&&FC(u,this.latestValues),u}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.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!==Kn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var _;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==u;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:p}=this.options;if(!this.layout||!(f||p))return;this.resolvedRelativeTargetAt=Kn.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mn(),this.targetWithTransforms=Mn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KV(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Hs(this.target,this.layout.layoutBox),jT(this.target,this.targetDelta)):Hs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||D_(this.parent.latestValues)||DT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,u,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mn(),this.relativeTargetOrigin=Mn(),t0(this.relativeTargetOrigin,u,c,this.options.layoutAnchor||void 0),Hs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const a=this.getLead(),u=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Kn.timestamp&&(c=!1),c)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Hs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,m=this.treeScale.y;SV(this.layoutCorrected,this.treeScale,this.path,u),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Mn());const{target:_}=a;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(MC(this.prevProjectionDelta.x,this.projectionDelta.x),MC(this.prevProjectionDelta.y,this.projectionDelta.y)),Ud(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==m||!UC(this.projectionDelta.x,this.prevProjectionDelta.x)||!UC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Iu(),this.projectionDelta=Iu(),this.projectionDeltaWithTransform=Iu()}setAnimationOrigin(a,u=!1,c){const d=this.snapshot,f=d?d.latestValues:{},p={...this.latestValues},m=Iu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const _=Mn(),x=d?d.source:void 0,y=this.layout?this.layout.source:void 0,w=x!==y,b=this.getStack(),C=!b||b.members.length<=1,P=!!(w&&!C&&this.options.crossfade===!0&&!this.path.some(E$));this.animationProgress=0;let T;const A=c==null?void 0:c.interpolateProjection(a);this.mixTargetDelta=R=>{const L=R/1e3,I=A==null?void 0:A(L);I?(m.x.translate=I.x,m.x.scale=Mt(a.x.scale,1,L),m.x.origin=a.x.origin,m.x.originPoint=a.x.originPoint,m.y.translate=I.y,m.y.scale=Mt(a.y.scale,1,L),m.y.origin=a.y.origin,m.y.originPoint=a.y.originPoint):(YC(m.x,a.x,L),YC(m.y,a.y,L)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(t0(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),S$(this.relativeTarget,this.relativeTargetOrigin,_,L),T&&QV(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Mn()),Hs(T,this.relativeTarget)),w&&(this.animationValues=p,t$(p,f,this.latestValues,L,P,C)),I&&I.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=I.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var u,c,d;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(ha(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ot.update(()=>{rm.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pc(0)),this.motionValue.jump(0,!1),this.currentAnimation=s$(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(u$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:u,target:c,layout:d,latestValues:f}=a;if(!(!u||!c||!d)){if(this!==a&&this.layout&&d&&e5(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Mn();const p=Sr(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const m=Sr(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Hs(u,c),tm(u,f),Ud(this.projectionDeltaWithTransform,this.layoutCorrected,u,f)}}registerSharedNode(a,u){this.sharedNodes.has(a)||this.sharedNodes.set(a,new l$),this.sharedNodes.get(a).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var u;const{layoutId:a}=this.options;return a?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:a}=this.options;return a?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:u,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let u=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(u=!0),!u)return;const d={};c.z&&C1("z",a,d,this.animationValues);for(let f=0;f<E1.length;f++)C1(`rotate${E1[f]}`,a,d,this.animationValues),C1(`skew${E1[f]}`,a,d,this.animationValues);a.render();for(const f in d)a.setStaticValue(f,d[f]),this.animationValues&&(this.animationValues[f]=d[f]);a.scheduleRender()}applyProjectionStyles(a,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=nm(u==null?void 0:u.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=nm(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!il(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const f=d.animationValues||d.latestValues;this.applyTransformsToTarget();let p=JV(this.projectionDeltaWithTransform,this.treeScale,f);c&&(p=c(f,p)),a.transform=p;const{x:m,y:_}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${_.origin*100}% 0`,d.animationValues?a.opacity=d===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:a.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const x in F_){if(f[x]===void 0)continue;const{correct:y,applyTo:w,isCSSVariable:b}=F_[x],C=p==="none"?f[x]:y(f[x],d);if(w){const P=w.length;for(let T=0;T<P;T++)a[w[T]]=C}else b?this.options.visualElement.renderState.vars[x]=C:a[x]=C}this.options.layoutId&&(a.pointerEvents=d===this?nm(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var u;return(u=a.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(GC),this.root.sharedNodes.clear()}}}function d$(t){t.updateLayout()}function f$(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:s}=t.layout,{animationType:i}=t.options,a=e.source!==t.layout.source;if(i==="size")gi(p=>{const m=a?e.measuredBox[p]:e.layoutBox[p],_=Sr(m);m.min=r[p].min,m.max=m.min+_});else if(i==="x"||i==="y"){const p=i==="x"?"y":"x";V_(a?e.measuredBox[p]:e.layoutBox[p],r[p])}else e5(i,e.layoutBox,r)&&gi(p=>{const m=a?e.measuredBox[p]:e.layoutBox[p],_=Sr(r[p]);m.max=m.min+_,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+_)});const u=Iu();Ud(u,r,e.layoutBox);const c=Iu();a?Ud(c,t.applyTransform(s,!0),e.measuredBox):Ud(c,r,e.layoutBox);const d=!ZT(u);let f=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:_}=p;if(m&&_){const x=t.options.layoutAnchor||void 0,y=Mn();t0(y,e.layoutBox,m.layoutBox,x);const w=Mn();t0(w,r,_.layoutBox,x),YT(y,w)||(f=!0),p.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=y,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function h$(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 p$(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function m$(t){t.clearSnapshot()}function GC(t){t.clearMeasurements()}function v$(t){t.isLayoutDirty=!0,t.updateLayout()}function KC(t){t.isLayoutDirty=!1}function g$(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function y$(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ZC(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _$(t){t.resolveTargetDelta()}function x$(t){t.calcProjection()}function w$(t){t.resetSkewAndRotation()}function b$(t){t.removeLeadSnapshot()}function YC(t,e,n){t.translate=Mt(e.translate,0,n),t.scale=Mt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function XC(t,e,n,r){t.min=Mt(e.min,n.min,r),t.max=Mt(e.max,n.max,r)}function S$(t,e,n,r){XC(t.x,e.x,n.x,r),XC(t.y,e.y,n.y,r)}function E$(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const C$={duration:.45,ease:[.4,0,.1,1]},QC=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),JC=QC("applewebkit/")&&!QC("chrome/")?Math.round:Ms;function ek(t){t.min=JC(t.min),t.max=JC(t.max)}function k$(t){ek(t.x),ek(t.y)}function e5(t,e,n){return t==="position"||t==="preserve-aspect"&&!GV(HC(e),HC(n),.2)}function P$(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const T$=JT({attachResizeListener:(t,e)=>uf(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),k1={current:void 0},t5=JT({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!k1.current){const t=new T$({});t.mount(window),t.setOptions({layoutScroll:!0}),k1.current=t}return k1.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Lx=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function tk(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function A$(...t){return e=>{let n=!1;const r=t.map(s=>{const i=tk(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():tk(t[s],null)}}}}function I$(...t){return v.useCallback(A$(...t),t)}class R$ extends v.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Xp(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Xp(r)&&r.offsetWidth||0,i=Xp(r)&&r.offsetHeight||0,a=getComputedStyle(n),u=this.props.sizeRef.current;u.height=parseFloat(a.height),u.width=parseFloat(a.width),u.top=n.offsetTop,u.left=n.offsetLeft,u.right=s-u.width-u.left,u.bottom=i-u.height-u.top,u.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function M$({children:t,isPresent:e,anchorX:n,anchorY:r,root:s,pop:i}){var m;const a=v.useId(),u=v.useRef(null),c=v.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:d}=v.useContext(Lx),f=i!==!1?((m=t.props)==null?void 0:m.ref)??(t==null?void 0:t.ref):void 0,p=I$(u,f);return v.useInsertionEffect(()=>{const{width:_,height:x,top:y,left:w,right:b,bottom:C,direction:P}=c.current;if(e||i===!1||!u.current||!_||!x)return;const T=P==="rtl",A=n==="left"?T?`right: ${b}`:`left: ${w}`:T?`left: ${w}`:`right: ${b}`,R=r==="bottom"?`bottom: ${C}`:`top: ${y}`;u.current.dataset.motionPopId=a;const L=document.createElement("style");d&&(L.nonce=d);const I=s??document.head;return I.appendChild(L),L.sheet&&L.sheet.insertRule(`
|
|
64
|
-
[data-motion-pop-id="${a}"] {
|
|
65
|
-
position: absolute !important;
|
|
66
|
-
width: ${_}px !important;
|
|
67
|
-
height: ${x}px !important;
|
|
68
|
-
${A}px !important;
|
|
69
|
-
${R}px !important;
|
|
70
|
-
}
|
|
71
|
-
`),()=>{var O;(O=u.current)==null||O.removeAttribute("data-motion-pop-id"),I.contains(L)&&I.removeChild(L)}},[e]),E.jsx(R$,{isPresent:e,childRef:u,sizeRef:c,pop:i,children:i===!1?t:v.cloneElement(t,{ref:p})})}const O$=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a,anchorX:u,anchorY:c,root:d})=>{const f=lx(L$),p=v.useId(),m=v.useRef(n),_=v.useRef(r);ux(()=>{m.current=n,_.current=r});let x=!0,y=v.useMemo(()=>(x=!1,{id:p,initial:e,isPresent:n,custom:s,onExitComplete:w=>{f.set(w,!0);for(const b of f.values())if(!b)return;r&&r()},register:w=>(f.set(w,!1),()=>{var b;f.delete(w),!m.current&&!f.size&&((b=_.current)==null||b.call(_))})}),[n,f,r]);return i&&x&&(y={...y}),v.useMemo(()=>{f.forEach((w,b)=>f.set(b,!1))},[n]),v.useEffect(()=>{!n&&!f.size&&r&&r()},[n]),t=E.jsx(M$,{pop:a==="popLayout",isPresent:n,anchorX:u,anchorY:c,root:d,children:t}),E.jsx(C0.Provider,{value:y,children:t})};function L$(){return new Map}function n5(t=!0){const e=v.useContext(C0);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=v.useId();v.useEffect(()=>{if(t)return s(i)},[t]);const a=v.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,a]:[!0]}const bp=t=>t.key||"";function nk(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const Qs=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1,anchorX:u="left",anchorY:c="top",root:d})=>{const[f,p]=n5(a),m=v.useMemo(()=>nk(t),[t]),_=a&&!f?[]:m.map(bp),x=v.useRef(!0),y=v.useRef(m),w=lx(()=>new Map),b=v.useRef(new Set),[C,P]=v.useState(m),[T,A]=v.useState(m);ux(()=>{x.current=!1,y.current=m;for(let I=0;I<T.length;I++){const O=bp(T[I]);_.includes(O)?(w.delete(O),b.current.delete(O)):w.get(O)!==!0&&w.set(O,!1)}},[T,_.length,_.join("-")]);const R=[];if(m!==C){let I=[...m];for(let O=0;O<T.length;O++){const N=T[O],j=bp(N);_.includes(j)||(I.splice(O,0,N),R.push(N))}return i==="wait"&&R.length&&(I=R),A(nk(I)),P(m),null}const{forceRender:L}=v.useContext(ax);return E.jsx(E.Fragment,{children:T.map(I=>{const O=bp(I),N=a&&!f?!1:m===T||_.includes(O),j=()=>{if(b.current.has(O))return;if(w.has(O))b.current.add(O),w.set(O,!0);else return;let F=!0;w.forEach(G=>{G||(F=!1)}),F&&(L==null||L(),A(y.current),a&&(p==null||p()),r&&r())};return E.jsx(O$,{isPresent:N,initial:!x.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:d,onExitComplete:N?void 0:j,anchorX:u,anchorY:c,children:I},O)})})},r5=v.createContext({strict:!1}),rk={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"]};let sk=!1;function N$(){if(sk)return;const t={};for(const e in rk)t[e]={isEnabled:n=>rk[e].some(r=>!!n[r])};OT(t),sk=!0}function s5(){return N$(),_V()}function D$(t){const e=s5();for(const n in t)e[n]={...e[n],...t[n]};OT(e)}const j$=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","propagate","ignoreStrict","viewport"]);function n0(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||j$.has(t)}let i5=t=>!n0(t);function F$(t){typeof t=="function"&&(i5=e=>e.startsWith("on")?!n0(e):t(e))}try{F$(require("@emotion/is-prop-valid").default)}catch{}function V$(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||Qn(t[s])||(i5(s)||n===!0&&n0(s)||!e&&!n0(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const I0=v.createContext({});function $$(t,e){if(A0(t)){const{initial:n,animate:r}=t;return{initial:n===!1||lf(n)?n:void 0,animate:lf(r)?r:void 0}}return t.inherit!==!1?e:{}}function z$(t){const{initial:e,animate:n}=$$(t,v.useContext(I0));return v.useMemo(()=>({initial:e,animate:n}),[ik(e),ik(n)])}function ik(t){return Array.isArray(t)?t.join(" "):t}const Nx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o5(t,e,n){for(const r in e)!Qn(e[r])&&!$T(r,n)&&(t[r]=e[r])}function H$({transformTemplate:t},e){return v.useMemo(()=>{const n=Nx();return Mx(n,e,t),Object.assign({},n.vars,n.style)},[e])}function U$(t,e){const n=t.style||{},r={};return o5(r,n,t),Object.assign(r,H$(t,e)),r}function B$(t,e){const n={},r=U$(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 a5=()=>({...Nx(),attrs:{}});function W$(t,e,n,r){const s=v.useMemo(()=>{const i=a5();return zT(i,e,UT(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};o5(i,t.style,t),s.style={...i,...s.style}}return s}const q$=["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 Dx(t){return typeof t!="string"||t.includes("-")?!1:!!(q$.indexOf(t)>-1||/[A-Z]/u.test(t))}function G$(t,e,n,{latestValues:r},s,i=!1,a){const c=(a??Dx(t)?W$:B$)(e,r,s,t),d=V$(e,typeof t=="string",i),f=t!==v.Fragment?{...d,...c,ref:n}:{},{children:p}=e,m=v.useMemo(()=>Qn(p)?p.get():p,[p]);return v.createElement(t,{...f,children:m})}function K$({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:Z$(n,r,s,t),renderState:e()}}function Z$(t,e,n,r){const s={},i=r(t,{});for(const m in i)s[m]=nm(i[m]);let{initial:a,animate:u}=t;const c=A0(t),d=RT(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const p=f?u:a;if(p&&typeof p!="boolean"&&!T0(p)){const m=Array.isArray(p)?p:[p];for(let _=0;_<m.length;_++){const x=Sx(t,m[_]);if(x){const{transitionEnd:y,transition:w,...b}=x;for(const C in b){let P=b[C];if(Array.isArray(P)){const T=f?P.length-1:0;P=P[T]}P!==null&&(s[C]=P)}for(const C in y)s[C]=y[C]}}}return s}const l5=t=>(e,n)=>{const r=v.useContext(I0),s=v.useContext(C0),i=()=>K$(t,e,r,s);return n?i():lx(i)},Y$=l5({scrapeMotionValuesFromProps:Ox,createRenderState:Nx}),X$=l5({scrapeMotionValuesFromProps:BT,createRenderState:a5}),Q$=Symbol.for("motionComponentSymbol");function J$(t,e,n){const r=v.useRef(n);v.useInsertionEffect(()=>{r.current=n});const s=v.useRef(null);return v.useCallback(i=>{var u;i&&((u=t.onMount)==null||u.call(t,i)),e&&(i?e.mount(i):e.unmount());const a=r.current;if(typeof a=="function")if(i){const c=a(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(i);else a&&(a.current=i)},[e])}const u5=v.createContext({});function Su(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function ez(t,e,n,r,s,i){var P,T;const{visualElement:a}=v.useContext(I0),u=v.useContext(r5),c=v.useContext(C0),d=v.useContext(Lx),f=d.reducedMotion,p=d.skipAnimations,m=v.useRef(null),_=v.useRef(!1);r=r||u.renderer,!m.current&&r&&(m.current=r(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:p,isSVG:i}),_.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const x=m.current,y=v.useContext(u5);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&tz(m.current,n,s,y);const w=v.useRef(!1);v.useInsertionEffect(()=>{x&&w.current&&x.update(n,c)});const b=n[_T],C=v.useRef(!!b&&typeof window<"u"&&!((P=window.MotionHandoffIsComplete)!=null&&P.call(window,b))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,b)));return ux(()=>{_.current=!0,x&&(w.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),C.current&&x.animationState&&x.animationState.animateChanges())}),v.useEffect(()=>{x&&(!C.current&&x.animationState&&x.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,b)}),C.current=!1),x.enteringChildren=void 0)}),x}function tz(t,e,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:f,layoutCrossfade:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:c5(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||u&&Su(u),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:p,layoutScroll:c,layoutRoot:d,layoutAnchor:f})}function c5(t){if(t)return t.options.allowProjection!==!1?t.projection:c5(t.parent)}function P1(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&D$(r);const i=n?n==="svg":Dx(t),a=i?X$:Y$;function u(d,f){let p;const m={...v.useContext(Lx),...d,layoutId:nz(d)},{isStatic:_}=m,x=z$(d),y=a(d,_);if(!_&&typeof window<"u"){rz();const w=sz(m);p=w.MeasureLayout,x.visualElement=ez(t,y,m,s,w.ProjectionNode,i)}return E.jsxs(I0.Provider,{value:x,children:[p&&x.visualElement?E.jsx(p,{visualElement:x.visualElement,...m}):null,G$(t,d,J$(y,x.visualElement,f),y,_,e,i)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=v.forwardRef(u);return c[Q$]=t,c}function nz({layoutId:t}){const e=v.useContext(ax).id;return e&&t!==void 0?e+"-"+t:t}function rz(t,e){v.useContext(r5).strict}function sz(t){const e=s5(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function iz(t,e){if(typeof Proxy>"u")return P1;const n=new Map,r=(i,a)=>P1(i,a,t,e),s=(i,a)=>r(i,a);return new Proxy(s,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,P1(a,void 0,t,e)),n.get(a))})}const oz=(t,e)=>e.isSVG??Dx(t)?new DV(e):new IV(e,{allowProjection:t!==v.Fragment});class az extends xa{constructor(e){super(e),e.animationState||(e.animationState=zV(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();T0(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 lz=0;class uz extends xa{constructor(){super(...arguments),this.id=lz++,this.isExitComplete=!1}update(){var i;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;if(e&&r===!1){if(this.isExitComplete){const{initial:a,custom:u}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){const c=kl(this.node,a,u);if(c){const{transition:d,transitionEnd:f,...p}=c;for(const m in p)(i=this.node.getValue(m))==null||i.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const cz={animation:{Feature:az},exit:{Feature:uz}};function Hf(t){return{point:{x:t.pageX,y:t.pageY}}}const dz=t=>e=>Px(e)&&t(e,Hf(e));function Bd(t,e,n,r){return uf(t,e,dz(n),r)}const d5=({current:t})=>t?t.ownerDocument.defaultView:null,ok=(t,e)=>Math.abs(t-e);function fz(t,e){const n=ok(t.x,e.x),r=ok(t.y,e.y);return Math.sqrt(n**2+r**2)}const ak=new Set(["auto","scroll"]);class f5{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Sp(this.lastRawMoveEventInfo,this.transformPagePoint));const x=T1(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,w=fz(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!w)return;const{point:b}=x,{timestamp:C}=Kn;this.history.push({...b,timestamp:C});const{onStart:P,onMove:T}=this.handlers;y||(P&&P(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,x)},this.handlePointerMove=(x,y)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=Sp(y,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(x,y)=>{this.end();const{onEnd:w,onSessionEnd:b,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const P=T1(x.type==="pointercancel"?this.lastMoveEventInfo:Sp(y,this.transformPagePoint),this.history);this.startEvent&&w&&w(x,P),b&&b(x,P)},!Px(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=s||window;const c=Hf(e),d=Sp(c,this.transformPagePoint),{point:f}=d,{timestamp:p}=Kn;this.history=[{...f,timestamp:p}];const{onSessionStart:m}=n;m&&m(e,T1(d,this.history));const _={passive:!0,capture:!0};this.removeListeners=Vf(Bd(this.contextWindow,"pointermove",this.handlePointerMove,_),Bd(this.contextWindow,"pointerup",this.handlePointerUp,_),Bd(this.contextWindow,"pointercancel",this.handlePointerUp,_)),u&&this.startScrollTracking(u)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(ak.has(r.overflowX)||ak.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),Ot.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ha(this.updatePoint)}}function Sp(t,e){return e?{point:e(t.point)}:t}function lk(t,e){return{x:t.x-e.x,y:t.y-e.y}}function T1({point:t},e){return{point:t,delta:lk(t,h5(e)),offset:lk(t,hz(e)),velocity:pz(e,.1)}}function hz(t){return t[0]}function h5(t){return t[t.length-1]}function pz(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=h5(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>ls(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>ls(e)*2&&(r=t[1]);const i=Ts(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function mz(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Mt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Mt(n,t,r.max):Math.min(t,n)),t}function uk(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 vz(t,{top:e,left:n,bottom:r,right:s}){return{x:uk(t.x,n,s),y:uk(t.y,e,r)}}function ck(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 gz(t,e){return{x:ck(t.x,e.x),y:ck(t.y,e.y)}}function yz(t,e){let n=.5;const r=Sr(t),s=Sr(e);return s>r?n=of(e.min,e.max-r,t.min):r>s&&(n=of(t.min,t.max-s,e.min)),Ri(0,1,n)}function _z(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 $_=.35;function xz(t=$_){return t===!1?t=0:t===!0&&(t=$_),{x:dk(t,"left","right"),y:dk(t,"top","bottom")}}function dk(t,e,n){return{min:fk(t,e),max:fk(t,n)}}function fk(t,e){return typeof t=="number"?t:t[e]||0}const wz=new WeakMap;class bz{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=Mn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=p=>{n&&this.snapToCursor(Hf(p).point),this.stopAnimation()},a=(p,m)=>{const{drag:_,dragPropagation:x,onDragStart:y}=this.getProps();if(_&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=YF(_),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gi(b=>{let C=this.getAxisMotionValue(b).get()||0;if(Ii.test(C)){const{projection:P}=this.visualElement;if(P&&P.layout){const T=P.layout.layoutBox[b];T&&(C=Sr(T)*(parseFloat(C)/100))}}this.originPoint[b]=C}),y&&Ot.update(()=>y(p,m),!1,!0),R_(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},u=(p,m)=>{this.latestPointerEvent=p,this.latestPanInfo=m;const{dragPropagation:_,dragDirectionLock:x,onDirectionLock:y,onDrag:w}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:b}=m;if(x&&this.currentDirection===null){this.currentDirection=Ez(b),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",m.point,b),this.updateAxis("y",m.point,b),this.visualElement.render(),w&&Ot.update(()=>w(p,m),!1,!0)},c=(p,m)=>{this.latestPointerEvent=p,this.latestPanInfo=m,this.stop(p,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:f}=this.getProps();this.panSession=new f5(e,{onSessionStart:i,onStart:a,onMove:u,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:r,contextWindow:d5(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:u}=this.getProps();u&&Ot.postRender(()=>u(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!Ep(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(a=mz(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&Su(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=vz(r.layoutBox,e):this.constraints=!1,this.elastic=xz(n),s!==this.constraints&&!Su(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&gi(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_z(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Su(e))return!1;const r=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const i=EV(r,s.root,this.visualElement.getTransformPagePoint());let a=gz(s.layout.layoutBox,i);if(n){const u=n(wV(a));this.hasMutatedConstraints=!!u,u&&(a=NT(u))}return a}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:u}=this.getProps(),c=this.constraints||{},d=gi(f=>{if(!Ep(f,n,this.currentDirection))return;let p=c&&c[f]||{};(a===!0||a===f)&&(p={min:0,max:0});const m=s?200:1e6,_=s?40:1e7,x={type:"inertia",velocity:r?e[f]:0,bounceStiffness:m,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...i,...p};return this.startAxisValueAnimation(f,x)});return Promise.all(d).then(u)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return R_(this.visualElement,e),r.start(bx(e,r,0,n,this.visualElement,!1))}stopAnimation(){gi(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){gi(n=>{const{drag:r}=this.getProps();if(!Ep(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:u}=s.layout.layoutBox[n],c=i.get()||0;i.set(e[n]-Mt(a,u,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Su(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};gi(a=>{const u=this.getAxisMotionValue(a);if(u&&this.constraints!==!1){const c=u.get();s[a]=yz({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),gi(a=>{if(!Ep(a,e,null))return;const u=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];u.set(Mt(c,d,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wz.set(this.visualElement,this);const e=this.visualElement.current,n=Bd(e,"pointerdown",d=>{const{drag:f,dragListener:p=!0}=this.getProps(),m=d.target,_=m!==e&&nV(m);f&&p&&!_&&this.start(d)});let r;const s=()=>{const{dragConstraints:d}=this.getProps();Su(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Sz(e,d.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,a=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ot.read(s);const u=uf(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:f})=>{this.isDragging&&f&&(gi(p=>{const m=this.getAxisMotionValue(p);m&&(this.originPoint[p]+=d[p].translate,m.set(m.get()+d[p].translate))}),this.visualElement.render())}));return()=>{u(),n(),a(),c&&c(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=$_,dragMomentum:u=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:u}}}function hk(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Sz(t,e,n){const r=xC(t,hk(n)),s=xC(e,hk(n));return()=>{r(),s()}}function Ep(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ez(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Cz extends xa{constructor(e){super(e),this.removeGroupControls=Ms,this.removeListeners=Ms,this.controls=new bz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ms}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const A1=t=>(e,n)=>{t&&Ot.update(()=>t(e,n),!1,!0)};class kz extends xa{constructor(){super(...arguments),this.removePointerDownListener=Ms}onPointerDown(e){this.session=new f5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d5(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:A1(e),onStart:A1(n),onMove:A1(r),onEnd:(i,a)=>{delete this.session,s&&Ot.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=Bd(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let I1=!1;class Pz extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),I1&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),rm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,e.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),I1=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Ot.postRender(()=>{const u=a.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),kx.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;I1=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function p5(t){const[e,n]=n5(),r=v.useContext(ax);return E.jsx(Pz,{...t,layoutGroup:r,switchLayoutGroup:v.useContext(u5),isPresent:e,safeToRemove:n})}const Tz={pan:{Feature:kz},drag:{Feature:Cz,ProjectionNode:t5,MeasureLayout:p5}};function pk(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Ot.postRender(()=>i(e,Hf(e)))}class Az extends xa{mount(){const{current:e}=this.node;e&&(this.unmount=QF(e,(n,r)=>(pk(this.node,r,"Start"),s=>pk(this.node,s,"End"))))}unmount(){}}class Iz extends xa{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=Vf(uf(this.node.current,"focus",()=>this.onFocus()),uf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mk(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 s="onTap"+(n==="End"?"":n),i=r[s];i&&Ot.postRender(()=>i(e,Hf(e)))}class Rz extends xa{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=sV(e,(s,i)=>(mk(this.node,i,"Start"),(a,{success:u})=>mk(this.node,a,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const z_=new WeakMap,R1=new WeakMap,Mz=t=>{const e=z_.get(t.target);e&&e(t)},Oz=t=>{t.forEach(Mz)};function Lz({root:t,...e}){const n=t||document;R1.has(n)||R1.set(n,{});const r=R1.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(Oz,{root:t,...e})),r[s]}function Nz(t,e,n){const r=Lz(e);return z_.set(t,n),r.observe(t),()=>{z_.delete(t),r.unobserve(t)}}const Dz={some:0,all:1};class jz extends xa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Dz[s]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,i&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),_=f?p:m;_&&_(d)};this.stopObserver=Nz(this.node.current,a,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Fz(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Fz({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Vz={inView:{Feature:jz},tap:{Feature:Rz},focus:{Feature:Iz},hover:{Feature:Az}},$z={layout:{ProjectionNode:t5,MeasureLayout:p5}},zz={...cz,...Vz,...Tz,...$z},ho=iz(zz,oz);function Hz(){!Rx.current&&MT();const[t]=v.useState(Qm.current);return t}const po=ho;var R0=C3();const Uz=x0(R0);function Bz(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const Wz=t=>{switch(t){case"success":return Kz;case"info":return Yz;case"warning":return Zz;case"error":return Xz;default:return null}},qz=Array(12).fill(0),Gz=({visible:t,className:e})=>we.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},we.createElement("div",{className:"sonner-spinner"},qz.map((n,r)=>we.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Kz=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},we.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Zz=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},we.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Yz=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Xz=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Qz=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},we.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),we.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Jz=()=>{const[t,e]=we.useState(document.hidden);return we.useEffect(()=>{const n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),t};let eH=1;const tH=100,vk=t=>{var e;return typeof(t==null?void 0:t.id)=="number"||(t==null||(e=t.id)==null?void 0:e.length)>0?t.id:eH++};class nH{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(n=>e(n)),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-tH;e<=0||(this.toasts=this.toasts.filter(n=>e>0&&this.dismissedToasts.has(n.id)?(this.dismissedToasts.delete(n.id),e--,!1):!0))},this.create=e=>{const{message:n,...r}=e,s=vk(e),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),u=e.dismissible===void 0?!0:e.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(a?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...e,id:s,title:n}),{...d,...e,id:s,dismissible:u,title:n}):d):this.addToast({title:n,...r,dismissible:u,id:s}),s},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);const n=this.pendingDismissals.get(e);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(r=>r({id:e,dismiss:!0}))})),e},this.message=(e,n)=>this.create({...n,message:e,type:void 0}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(e instanceof Function?e():e);let i=r!==void 0,a;const u=s.then(async d=>{if(a=["resolve",d],we.isValidElement(d))i=!1,this.create({id:r,type:"default",message:d});else if(sH(d)&&!d.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,x=typeof p=="object"&&!we.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(d instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(d):n.error,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!we.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(d):n.success,m=typeof n.description=="function"?await n.description(d):n.description,x=typeof p=="object"&&!we.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:m,...x})}}).catch(async d=>{if(a=["reject",d],n.error!==void 0){i=!1;const f=typeof n.error=="function"?await n.error(d):n.error,p=typeof n.description=="function"?await n.description(d):n.description,_=typeof f=="object"&&!we.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,..._})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,f)=>u.then(()=>a[0]==="reject"?f(a[1]):d(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,n)=>{const r=vk(n);return this.create({...n,jsx:e(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const jr=new nH,rH=(t,e)=>jr.message(t,e),sH=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",iH=rH,oH=()=>jr.toasts,aH=()=>jr.getActiveToasts(),mt=Object.assign(iH,{success:jr.success,info:jr.info,warning:jr.warning,error:jr.error,custom:jr.custom,message:jr.message,promise:jr.promise,dismiss:jr.dismiss,loading:jr.loading},{getHistory:oH,getToasts:aH});Bz("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Cp(t){return t.label!==void 0}const lH=3,uH="24px",cH="16px",gk=4e3,dH=356,fH=14,hH=45,pH=200;function ci(...t){return t.filter(Boolean).join(" ")}function mH(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}const vH=t=>{var e,n,r,s,i,a,u,c,d;const{invert:f,toast:p,unstyled:m,interacting:_,setHeights:x,visibleToasts:y,heights:w,index:b,toasts:C,expanded:P,removeToast:T,defaultRichColors:A,closeButton:R,style:L,cancelButtonStyle:I,actionButtonStyle:O,className:N="",descriptionClassName:j="",duration:F,position:G,gap:Q,expandByDefault:Z,classNames:W,icons:q,closeButtonAriaLabel:z="Close toast"}=t,[X,H]=we.useState(null),[D,Y]=we.useState(null),[oe,J]=we.useState(!1),[se,pe]=we.useState(!1),[Se,ce]=we.useState(!1),[ae,$e]=we.useState(!1),[We,ze]=we.useState(!1),[Fe,ct]=we.useState(0),[Kt,rt]=we.useState(0),Ve=we.useRef(p.duration||F||gk),Ne=we.useRef(null),Je=we.useRef(null),Ct=b===0,vt=b+1<=y,xe=p.type,on=xe??"default",Lt=p.dismissible!==!1,Kr=p.className||"",Pa=p.descriptionClassName||"",an=we.useMemo(()=>w.findIndex(Ge=>Ge.toastId===p.id)||0,[w,p.id]),wn=we.useMemo(()=>{var Ge;return(Ge=p.closeButton)!=null?Ge:R},[p.closeButton,R]),Ta=we.useMemo(()=>p.duration||F||gk,[p.duration,F]),fr=we.useRef(0),ln=we.useRef(0),Eo=we.useRef(0),Un=we.useRef(null),[ti,hs]=G.split("-"),ps=we.useMemo(()=>w.reduce((Ge,Nt,Zt)=>Zt>=an?Ge:Ge+Nt.height,0),[w,an]),Co=Jz(),er=we.useMemo(()=>{var Ge;return(Ge=t.swipeDirections)!=null?Ge:mH(G)},[t.swipeDirections,G]),Ln=p.invert||f,Ls=xe==="loading";ln.current=we.useMemo(()=>an*Q+ps,[an,ps]),we.useEffect(()=>{Ve.current=Ta},[Ta]),we.useEffect(()=>{J(!0)},[]),we.useEffect(()=>{const Ge=Je.current;if(Ge){const Nt=Ge.getBoundingClientRect().height;return rt(Nt),x(Zt=>[{toastId:p.id,height:Nt,position:p.position},...Zt]),()=>x(Zt=>Zt.filter(mn=>mn.toastId!==p.id))}},[x,p.id]),we.useLayoutEffect(()=>{if(!oe)return;const Ge=Je.current,Nt=Ge.style.height;Ge.style.height="auto";const Zt=Ge.getBoundingClientRect().height;Ge.style.height=Nt,rt(Zt),x(mn=>mn.find(Ft=>Ft.toastId===p.id)?mn.map(Ft=>Ft.toastId===p.id?{...Ft,height:Zt}:Ft):[{toastId:p.id,height:Zt,position:p.position},...mn])},[oe,p.title,p.description,x,p.id,p.jsx,p.action,p.cancel]);const bn=we.useCallback(()=>{pe(!0),ct(ln.current),x(Ge=>Ge.filter(Nt=>Nt.toastId!==p.id)),setTimeout(()=>{T(p)},pH)},[p,T,x,ln]);we.useEffect(()=>{if(p.promise&&xe==="loading"||p.duration===1/0||p.type==="loading")return;let Ge;return P||_||Co?(()=>{if(Eo.current<fr.current){const mn=new Date().getTime()-fr.current;Ve.current=Ve.current-mn}Eo.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(fr.current=new Date().getTime(),Ge=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),bn()},Ve.current))})(),()=>clearTimeout(Ge)},[P,_,p,xe,Co,bn]),we.useEffect(()=>{p.delete&&(bn(),p.onDismiss==null||p.onDismiss.call(p,p))},[bn,p.delete]);function Cr(){var Ge;if(q!=null&&q.loading){var Nt;return we.createElement("div",{className:ci(W==null?void 0:W.loader,p==null||(Nt=p.classNames)==null?void 0:Nt.loader,"sonner-loader"),"data-visible":xe==="loading"},q.loading)}return we.createElement(Gz,{className:ci(W==null?void 0:W.loader,p==null||(Ge=p.classNames)==null?void 0:Ge.loader),visible:xe==="loading"})}const ji=p.icon||(q==null?void 0:q[xe])||Wz(xe);var ni,ms;return we.createElement("li",{tabIndex:0,ref:Je,className:ci(N,Kr,W==null?void 0:W.toast,p==null||(e=p.classNames)==null?void 0:e.toast,W==null?void 0:W[on],p==null||(n=p.classNames)==null?void 0:n[on]),"data-sonner-toast":"","data-rich-colors":(ni=p.richColors)!=null?ni:A,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":oe,"data-promise":!!p.promise,"data-swiped":We,"data-removed":se,"data-visible":vt,"data-y-position":ti,"data-x-position":hs,"data-index":b,"data-front":Ct,"data-swiping":Se,"data-dismissible":Lt,"data-type":xe,"data-invert":Ln,"data-swipe-out":ae,"data-swipe-direction":D,"data-expanded":!!(P||Z&&oe),"data-testid":p.testId,style:{"--index":b,"--toasts-before":b,"--z-index":C.length-b,"--offset":`${se?Fe:ln.current}px`,"--initial-height":Z?"auto":`${Kt}px`,...L,...p.style},onDragEnd:()=>{ce(!1),H(null),Un.current=null},onPointerDown:Ge=>{Ge.button!==2&&(Ls||!Lt||(Ne.current=new Date,ct(ln.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(ce(!0),Un.current={x:Ge.clientX,y:Ge.clientY})))},onPointerUp:()=>{var Ge,Nt,Zt;if(ae||!Lt)return;Un.current=null;const mn=Number(((Ge=Je.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),hr=Number(((Nt=Je.current)==null?void 0:Nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ft=new Date().getTime()-((Zt=Ne.current)==null?void 0:Zt.getTime()),un=X==="x"?mn:hr,kr=Math.abs(un)/Ft;if((X==="x"?er.includes(mn>0?"right":"left"):er.includes(hr>0?"bottom":"top"))&&(Math.abs(un)>=hH||kr>.11)){ct(ln.current),p.onDismiss==null||p.onDismiss.call(p,p),Y(X==="x"?mn>0?"right":"left":hr>0?"down":"up"),bn(),$e(!0);return}else{var Bn,ri;(Bn=Je.current)==null||Bn.style.setProperty("--swipe-amount-x","0px"),(ri=Je.current)==null||ri.style.setProperty("--swipe-amount-y","0px")}ze(!1),ce(!1),H(null)},onPointerMove:Ge=>{var Nt,Zt,mn;if(!Un.current||!Lt||((Nt=window.getSelection())==null?void 0:Nt.toString().length)>0)return;const Ft=Ge.clientY-Un.current.y,un=Ge.clientX-Un.current.x;!X&&(Math.abs(un)>1||Math.abs(Ft)>1)&&H(Math.abs(un)>Math.abs(Ft)?"x":"y");let kr={x:0,y:0};const Pr=Bn=>1/(1.5+Math.abs(Bn)/20);if(X==="y"){if(er.includes("top")||er.includes("bottom"))if(er.includes("top")&&Ft<0||er.includes("bottom")&&Ft>0)kr.y=Ft;else{const Bn=Ft*Pr(Ft);kr.y=Math.abs(Bn)<Math.abs(Ft)?Bn:Ft}}else if(X==="x"&&(er.includes("left")||er.includes("right")))if(er.includes("left")&&un<0||er.includes("right")&&un>0)kr.x=un;else{const Bn=un*Pr(un);kr.x=Math.abs(Bn)<Math.abs(un)?Bn:un}(Math.abs(kr.x)>0||Math.abs(kr.y)>0)&&ze(!0),(Zt=Je.current)==null||Zt.style.setProperty("--swipe-amount-x",`${kr.x}px`),(mn=Je.current)==null||mn.style.setProperty("--swipe-amount-y",`${kr.y}px`)}},wn&&!p.jsx&&xe!=="loading"?we.createElement("button",{"aria-label":z,"data-disabled":Ls,"data-close-button":!0,onClick:Ls||!Lt?()=>{}:()=>{bn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ci(W==null?void 0:W.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(ms=q==null?void 0:q.close)!=null?ms:Qz):null,(xe||p.icon||p.promise)&&p.icon!==null&&((q==null?void 0:q[xe])!==null||p.icon)?we.createElement("div",{"data-icon":"",className:ci(W==null?void 0:W.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},xe==="loading"?p.icon||Cr():p.promise?Cr():null,xe!=="loading"?ji:null):null,we.createElement("div",{"data-content":"",className:ci(W==null?void 0:W.content,p==null||(i=p.classNames)==null?void 0:i.content)},we.createElement("div",{"data-title":"",className:ci(W==null?void 0:W.title,p==null||(a=p.classNames)==null?void 0:a.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?we.createElement("div",{"data-description":"",className:ci(j,Pa,W==null?void 0:W.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),we.isValidElement(p.cancel)?p.cancel:p.cancel&&Cp(p.cancel)?we.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||I,onClick:Ge=>{Cp(p.cancel)&&Lt&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ge),bn())},className:ci(W==null?void 0:W.cancelButton,p==null||(c=p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,we.isValidElement(p.action)?p.action:p.action&&Cp(p.action)?we.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||O,onClick:Ge=>{Cp(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ge),!Ge.defaultPrevented&&bn())},className:ci(W==null?void 0:W.actionButton,p==null||(d=p.classNames)==null?void 0:d.actionButton)},p.action.label):null)};function yk(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function gH(t,e){const n={};return[t,e].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",u=i?cH:uH;function c(d){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${a}-${d}`]=u:n[`${a}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(u)}),n}const yH=we.forwardRef(function(e,n){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:u,closeButton:c,className:d,offset:f,mobileOffset:p,theme:m="light",richColors:_,duration:x,style:y,visibleToasts:w=lH,toastOptions:b,dir:C=yk(),gap:P=fH,icons:T,customAriaLabel:A,containerAriaLabel:R="Notifications"}=e,[L,I]=we.useState([]),O=we.useMemo(()=>r?L.filter(J=>J.toasterId===r):L.filter(J=>!J.toasterId),[L,r]),N=we.useMemo(()=>Array.from(new Set([i].concat(O.filter(J=>J.position).map(J=>J.position)))),[O,i]),[j,F]=we.useState([]),[G,Q]=we.useState(!1),[Z,W]=we.useState(!1),[q,z]=we.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=we.useRef(null),H=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=we.useRef(null),Y=we.useRef(!1),oe=we.useCallback(J=>{I(se=>{var pe;return(pe=se.find(Se=>Se.id===J.id))!=null&&pe.delete||jr.dismiss(J.id),se.filter(({id:Se})=>Se!==J.id)})},[]);return we.useEffect(()=>jr.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{I(se=>se.map(pe=>pe.id===J.id?{...pe,delete:!0}:pe))});return}setTimeout(()=>{Uz.flushSync(()=>{I(se=>{const pe=se.findIndex(Se=>Se.id===J.id);return pe!==-1?[...se.slice(0,pe),{...se[pe],...J},...se.slice(pe+1)]:[J,...se]})})})}),[]),we.useEffect(()=>{if(m!=="system"){z(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:se})=>{z(se?"dark":"light")})}catch{J.addListener(({matches:pe})=>{try{z(pe?"dark":"light")}catch(Se){console.error(Se)}})}},[m]),we.useEffect(()=>{L.length<=1&&Q(!1)},[L]),we.useEffect(()=>{const J=se=>{var pe;if(a.length>0&&a.every(ae=>se[ae]||se.code===ae)){var ce;Q(!0),(ce=X.current)==null||ce.focus()}se.code==="Escape"&&(document.activeElement===X.current||(pe=X.current)!=null&&pe.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[a]),we.useEffect(()=>{if(X.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,Y.current=!1)}},[X.current]),we.createElement("section",{ref:n,"aria-label":A??`${R} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},N.map((J,se)=>{var pe;const[Se,ce]=J.split("-");return O.length?we.createElement("ol",{key:J,dir:C==="auto"?yk():C,tabIndex:-1,ref:X,className:d,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":Se,"data-x-position":ce,style:{"--front-toast-height":`${((pe=j[0])==null?void 0:pe.height)||0}px`,"--width":`${dH}px`,"--gap":`${P}px`,...y,...gH(f,p)},onBlur:ae=>{Y.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(Y.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,D.current=ae.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{Z||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},O.filter(ae=>!ae.position&&se===0||ae.position===J).map((ae,$e)=>{var We,ze;return we.createElement(vH,{key:ae.id,icons:T,index:$e,toast:ae,defaultRichColors:_,duration:(We=b==null?void 0:b.duration)!=null?We:x,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:w,closeButton:(ze=b==null?void 0:b.closeButton)!=null?ze:c,interacting:Z,position:J,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:oe,toasts:O.filter(Fe=>Fe.position==ae.position),heights:j.filter(Fe=>Fe.position==ae.position),setHeights:F,expandByDefault:u,gap:P,expanded:G,swipeDirections:e.swipeDirections})})):null}))});var _H=Object.defineProperty,Sc=(t,e)=>_H(t,"name",{value:e,configurable:!0}),m5=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ht(t,e,{checkForDefaultPrevented:n=!0}={}){return Sc(function(s){if(t==null||t(s),n===!1||!s||!s.defaultPrevented)return e==null?void 0:e(s)},"handleEvent")}Sc(Ht,"composeEventHandlers");function xH(t){var e;if(!m5)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}Sc(xH,"getOwnerWindow");function H_(t){if(!m5)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}Sc(H_,"getOwnerDocument");function v5(t,e=!1){const{activeElement:n}=H_(t);if(!(n!=null&&n.nodeName))return null;if(g5(n)&&n.contentDocument)return v5(n.contentDocument.body,e);if(e){const r=n.getAttribute("aria-activedescendant");if(r){const s=H_(n).getElementById(r);if(s)return s}}return n}Sc(v5,"getActiveElement");function g5(t){return t.tagName==="IFRAME"}Sc(g5,"isFrame");var wH=Object.defineProperty,jx=(t,e)=>wH(t,"name",{value:e,configurable:!0});function U_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}jx(U_,"setRef");function y5(...t){return e=>{let n=!1;const r=t.map(s=>{const i=U_(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():U_(t[s],null)}}}}jx(y5,"composeRefs");function Bt(...t){return v.useCallback(y5(...t),t)}jx(Bt,"useComposedRefs");var bH=Object.defineProperty,Ps=(t,e)=>bH(t,"name",{value:e,configurable:!0});function SH(t,e){const n=v.createContext(e);n.displayName=t+"Context";const r=Ps(i=>{const{children:a,...u}=i,c=v.useMemo(()=>u,Object.values(u));return E.jsx(n.Provider,{value:c,children:a})},"Provider");r.displayName=t+"Provider";function s(i,a={}){const{optional:u=!1}=a,c=v.useContext(n);if(c)return c;if(e!==void 0)return e;if(!u)throw new Error(`\`${i}\` must be used within \`${t}\``)}return Ps(s,"useContext"),[r,s]}Ps(SH,"createContext");function Ni(t,e=[]){let n=[];function r(i,a){const u=v.createContext(a);u.displayName=i+"Context";const c=n.length;n=[...n,a];const d=Ps(p=>{var b;const{scope:m,children:_,...x}=p,y=((b=m==null?void 0:m[t])==null?void 0:b[c])||u,w=v.useMemo(()=>x,Object.values(x));return E.jsx(y.Provider,{value:w,children:_})},"Provider");d.displayName=i+"Provider";function f(p,m,_={}){var b;const{optional:x=!1}=_,y=((b=m==null?void 0:m[t])==null?void 0:b[c])||u,w=v.useContext(y);if(w)return w;if(a!==void 0)return a;if(!x)throw new Error(`\`${p}\` must be used within \`${i}\``)}return Ps(f,"useContext"),[d,f]}Ps(r,"createContext");const s=Ps(()=>{const i=n.map(a=>v.createContext(a));return Ps(function(u){const c=(u==null?void 0:u[t])||i;return v.useMemo(()=>({[`__scope${t}`]:{...u,[t]:c}}),[u,c])},"useScope")},"createScope");return s.scopeName=t,[r,_5(s,...e)]}Ps(Ni,"createContextScope");function _5(...t){const e=t[0];if(t.length===1)return e;const n=Ps(()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return Ps(function(i){const a=r.reduce((u,{useScope:c,scopeName:d})=>{const p=c(i)[`__scope${d}`];return{...u,...p}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}Ps(_5,"composeContextScopes");var zr=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},EH=Object.defineProperty,CH=(t,e)=>EH(t,"name",{value:e,configurable:!0}),kH=Nf[" useId ".trim().toString()]||(()=>{}),PH=0;function oa(t){const[e,n]=v.useState(kH());return zr(()=>{t||n(r=>r??String(PH++))},[t]),t||(e?`radix-${e}`:"")}CH(oa,"useId");var TH=Object.defineProperty,AH=(t,e)=>TH(t,"name",{value:e,configurable:!0}),_k=Nf[" useEffectEvent ".trim().toString()],xk=Nf[" useInsertionEffect ".trim().toString()];function x5(t){if(typeof _k=="function")return _k(t);const e=v.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof xk=="function"?xk(()=>{e.current=t}):zr(()=>{e.current=t}),v.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}AH(x5,"useEffectEvent");var IH=Object.defineProperty,Uf=(t,e)=>IH(t,"name",{value:e,configurable:!0}),RH=Nf[" useInsertionEffect ".trim().toString()]||zr;function wa({prop:t,defaultProp:e,onChange:n=Uf(()=>{},"onChange"),caller:r}){const[s,i,a]=w5({defaultProp:e,onChange:n}),u=t!==void 0,c=u?t:s,d=v.useCallback(f=>{var p;if(u){const m=b5(f)?f(t):f;m!==t&&((p=a.current)==null||p.call(a,m))}else i(f)},[u,t,i,a]);return[c,d]}Uf(wa,"useControllableState");function w5({defaultProp:t,onChange:e}){const[n,r]=v.useState(t),s=v.useRef(n),i=v.useRef(e);return RH(()=>{i.current=e},[e]),v.useEffect(()=>{var a;s.current!==n&&((a=i.current)==null||a.call(i,n),s.current=n)},[n,s]),[n,r,i]}Uf(w5,"useUncontrolledState");function b5(t){return typeof t=="function"}Uf(b5,"isFunction");var wk=Symbol("RADIX:SYNC_STATE");function MH(t,e,n,r){const{prop:s,defaultProp:i,onChange:a,caller:u}=e,c=s!==void 0,d=x5(a),f=[{...n,state:i}];r&&f.push(r);const[p,m]=v.useReducer((w,b)=>{if(b.type===wk)return{...w,state:b.state};const C=t(w,b);return c&&!Object.is(C.state,w.state)&&d(C.state),C},...f),_=p.state,x=v.useRef(_);v.useEffect(()=>{x.current!==_&&(x.current=_,c||d(_))},[_,x,c]);const y=v.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return v.useEffect(()=>{c&&!Object.is(s,p.state)&&m({type:wk,state:s})},[s,p.state,c]),[y,m]}Uf(MH,"useControllableStateReducer");var OH=Object.defineProperty,Js=(t,e)=>OH(t,"name",{value:e,configurable:!0});function pa(t){const e=v.forwardRef((n,r)=>{let{children:s,...i}=n,a=null,u=!1;const c=[];B_(s)&&typeof kp=="function"&&(s=kp(s._payload)),v.Children.forEach(s,m=>{var _;if(P5(m)){u=!0;const x=m;let y="child"in x.props?x.props.child:x.props.children;B_(y)&&typeof kp=="function"&&(y=kp(y._payload)),a=LH(x,y),c.push((_=a==null?void 0:a.props)==null?void 0:_.children)}else c.push(m)}),a?a=v.cloneElement(a,void 0,c):!u&&v.Children.count(s)===1&&v.isValidElement(s)&&(a=s);const d=a?k5(a):void 0,f=Bt(r,d);if(!a){if(s||s===0)throw new Error(u?jH(t):DH(t));return s}const p=C5(i,a.props??{});return a.type!==v.Fragment&&(p.ref=r?f:d),v.cloneElement(a,p)});return e.displayName=`${t}.Slot`,e}Js(pa,"createSlot");var S5=Symbol.for("radix.slottable");function E5(t){const e=Js(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=S5,e}Js(E5,"createSlottable");var LH=Js((t,e)=>{if("child"in t.props){const n=t.props.child;return v.isValidElement(n)?v.cloneElement(n,void 0,t.props.children(n.props.children)):null}return v.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function C5(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...u)=>{const c=i(...u);return s(...u),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}Js(C5,"mergeProps");function k5(t){var r,s;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=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Js(k5,"getElementRef");function P5(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===S5}Js(P5,"isSlottable");var NH=Symbol.for("react.lazy");function B_(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===NH&&"_payload"in t&&T5(t._payload)}Js(B_,"isLazyComponent");function T5(t){return typeof t=="object"&&t!==null&&"then"in t}Js(T5,"isPromiseLike");var DH=Js(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),jH=Js(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),kp=Nf[" use ".trim().toString()],FH=Object.defineProperty,VH=(t,e)=>FH(t,"name",{value:e,configurable:!0}),$H=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xn=$H.reduce((t,e)=>{const n=pa(`Primitive.${e}`),r=v.forwardRef((s,i)=>{const{asChild:a,...u}=s,c=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(c,{...u,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function A5(t,e){t&&R0.flushSync(()=>t.dispatchEvent(e))}VH(A5,"dispatchDiscreteCustomEvent");var zH=Object.defineProperty,HH=(t,e)=>zH(t,"name",{value:e,configurable:!0});function Ml(t){const e=v.useRef(t);return v.useEffect(()=>{e.current=t}),v.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}HH(Ml,"useCallbackRef");var UH=Object.defineProperty,Vn=(t,e)=>UH(t,"name",{value:e,configurable:!0}),W_="dismissableLayer.update",BH="dismissableLayer.pointerDownOutside",WH="dismissableLayer.focusOutside",bk,I5=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Fx=v.forwardRef(Vn(function(e,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:c,onDismiss:d,...f}=e,p=v.useContext(I5),[m,_]=v.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),w=Bt(n,_),b=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),P=C?b.indexOf(C):-1,T=m?b.indexOf(m):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,R=T>=P,L=v.useRef(!1),I=M5(F=>{a==null||a(F),c==null||c(F),F.defaultPrevented||d==null||d()},{ownerDocument:x,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(F=>{if(!(F instanceof Node))return!1;const G=[...p.branches].some(Q=>Q.contains(F));return R&&!G},[p.branches,R])}),O=O5(F=>{if(s&&L.current)return;const G=F.target;[...p.branches].some(Z=>Z.contains(G))||(u==null||u(F),c==null||c(F),F.defaultPrevented||d==null||d())},x),N=m?T===b.length-1:!1,j=Ml(F=>{F.key==="Escape"&&(i==null||i(F),!F.defaultPrevented&&d&&(F.preventDefault(),d()))});return v.useEffect(()=>{if(N)return x.addEventListener("keydown",j,{capture:!0}),()=>x.removeEventListener("keydown",j,{capture:!0})},[x,N,j]),v.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(bk=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),q_(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=bk))}},[m,x,r,p]),v.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),q_())},[m,p]),v.useEffect(()=>{const F=Vn(()=>y({}),"handleUpdate");return document.addEventListener(W_,F),()=>document.removeEventListener(W_,F)},[]),E.jsx(xn.div,{...f,ref:w,style:{pointerEvents:A?R?"auto":"none":void 0,...e.style},onFocusCapture:Ht(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ht(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ht(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function R5(){const t=v.useContext(I5),[e,n]=v.useState(null);return v.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}Vn(R5,"useDismissableLayerSurface");var qH=Vn(()=>!0,"IS_TRUE");function M5(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:i,shouldHandlePointerDownOutside:a=qH}=e,u=Ml(t),c=v.useRef(!1),d=v.useRef(!1),f=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function m(){d.current=!1,s.current=!1,f.current.clear()}Vn(m,"resetOutsideInteraction");function _(){return Array.from(f.current.values()).some(Boolean)}Vn(_,"isOutsideInteractionIntercepted");function x(P){if(!d.current)return;const T=P.target;T instanceof Node&&[...i].some(R=>R.contains(T))||f.current.set(P.type,!0),P.type==="click"&&window.setTimeout(()=>{d.current&&p.current()},0)}Vn(x,"handleInteractionCapture");function y(P){d.current&&f.current.set(P.type,!1)}Vn(y,"handleInteractionBubble");const w=Vn(P=>{if(P.target&&!c.current){let T=function(){n.removeEventListener("click",p.current);const R=_();m(),R||Vx(BH,u,A,{discrete:!0})};if(Vn(T,"handleAndDispatchPointerDownOutsideEvent"),!a(P.target)){n.removeEventListener("click",p.current),m(),c.current=!1;return}const A={originalEvent:P};d.current=!0,s.current=r&&P.button===0,f.current.clear(),!r||P.button!==0?T():(n.removeEventListener("click",p.current),p.current=T,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},"handlePointerDown"),b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const P of b)n.addEventListener(P,x,!0),n.addEventListener(P,y);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",w),n.removeEventListener("click",p.current);for(const P of b)n.removeEventListener(P,x,!0),n.removeEventListener(P,y)}},[n,u,r,s,i,a]),{onPointerDownCapture:Vn(()=>c.current=!0,"onPointerDownCapture")}}Vn(M5,"usePointerDownOutside");function O5(t,e=globalThis==null?void 0:globalThis.document){const n=Ml(t),r=v.useRef(!1);return v.useEffect(()=>{const s=Vn(i=>{i.target&&!r.current&&Vx(WH,n,{originalEvent:i},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:Vn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Vn(()=>r.current=!1,"onBlurCapture")}}Vn(O5,"useFocusOutside");function q_(){const t=new CustomEvent(W_);document.dispatchEvent(t)}Vn(q_,"dispatchUpdate");function Vx(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?A5(s,i):s.dispatchEvent(i)}Vn(Vx,"handleAndDispatchCustomEvent");var GH=Object.defineProperty,Er=(t,e)=>GH(t,"name",{value:e,configurable:!0}),M1="focusScope.autoFocusOnMount",O1="focusScope.autoFocusOnUnmount",Sk={bubbles:!1,cancelable:!0},L5=v.forwardRef(Er(function(e,n){const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...u}=e,[c,d]=v.useState(null),f=Ml(i),p=Ml(a),m=v.useRef(null),_=Bt(n,d),x=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(s){let w=function(T){if(x.paused||!c)return;const A=T.target;c.contains(A)?m.current=A:to(m.current,{select:!0})},b=function(T){if(x.paused||!c)return;const A=T.relatedTarget;A!==null&&(c.contains(A)||to(m.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const R of T)R.removedNodes.length>0&&to(c)};Er(w,"handleFocusIn"),Er(b,"handleFocusOut"),Er(C,"handleMutations"),document.addEventListener("focusin",w),document.addEventListener("focusout",b);const P=new MutationObserver(C);return c&&P.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",b),P.disconnect()}}},[s,c,x.paused]),v.useEffect(()=>{if(c){Ek.add(x);const w=document.activeElement;if(!c.contains(w)){const C=new CustomEvent(M1,Sk);c.addEventListener(M1,f),c.dispatchEvent(C),C.defaultPrevented||(N5($5($x(c)),{select:!0}),document.activeElement===w&&to(c))}return()=>{c.removeEventListener(M1,f),setTimeout(()=>{const C=new CustomEvent(O1,Sk);c.addEventListener(O1,p),c.dispatchEvent(C),C.defaultPrevented||to(w??document.body,{select:!0}),c.removeEventListener(O1,p),Ek.remove(x)},0)}}},[c,f,p,x]);const y=v.useCallback(w=>{if(!r&&!s||x.paused)return;const b=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,C=document.activeElement;if(b&&C){const P=w.currentTarget,[T,A]=D5(P);T&&A?!w.shiftKey&&C===A?(w.preventDefault(),r&&to(T,{select:!0})):w.shiftKey&&C===T&&(w.preventDefault(),r&&to(A,{select:!0})):C===P&&w.preventDefault()}},[r,s,x.paused]);return E.jsx(xn.div,{tabIndex:-1,...u,ref:_,onKeyDown:y})},"FocusScope"));function N5(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(to(r,{select:e}),document.activeElement!==n)return}Er(N5,"focusFirst");function D5(t){const e=$x(t),n=G_(e,t),r=G_(e.reverse(),t);return[n,r]}Er(D5,"getTabbableEdges");function $x(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Er(r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)e.push(n.currentNode);return e}Er($x,"getTabbableCandidates");function G_(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const r of t)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):j5(r,{upTo:e})))return r}Er(G_,"findVisible");function j5(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Er(j5,"isHidden");function F5(t){return t instanceof HTMLInputElement&&"select"in t}Er(F5,"isSelectableInput");function to(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&F5(t)&&e&&t.select()}}Er(to,"focus");var Ek=V5();function V5(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=K_(t,e),t.unshift(e)},remove(e){var n;t=K_(t,e),(n=t[0])==null||n.resume()}}}Er(V5,"createFocusScopesStack");function K_(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}Er(K_,"arrayRemove");function $5(t){return t.filter(e=>e.tagName!=="A")}Er($5,"removeLinks");var KH=Object.defineProperty,ZH=(t,e)=>KH(t,"name",{value:e,configurable:!0}),zx=v.forwardRef(ZH(function(e,n){var c;const{container:r,...s}=e,[i,a]=v.useState(!1);zr(()=>a(!0),[]);const u=r||i&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?R0.createPortal(E.jsx(xn.div,{...s,ref:n}),u):null},"Portal")),YH=Object.defineProperty,go=(t,e)=>YH(t,"name",{value:e,configurable:!0});function z5(t,e){return v.useReducer((n,r)=>e[n][r]??n,t)}go(z5,"useStateMachine");var ba=go(t=>{const{present:e,children:n}=t,r=H5(e),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=U5(r.ref,B5(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:i}):null},"Presence");function H5(t){const[e,n]=v.useState(),r=v.useRef(null),s=v.useRef(t),i=v.useRef("none"),a=v.useRef(void 0),u=t?"mounted":"unmounted",[c,d]=z5(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{c==="mounted"?(i.current=a.current??Eu(r.current),a.current=void 0):i.current="none"},[c]),zr(()=>{const f=r.current,p=s.current;if(p!==t){const _=i.current,x=Eu(f);t?(a.current=x,d("MOUNT")):x==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(p&&_!==x?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,d]),zr(()=>{if(e){let f;const p=e.ownerDocument.defaultView??window,m=go(x=>{const w=Eu(r.current).includes(CSS.escape(x.animationName));if(x.target===e&&w&&(d("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",f=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},"handleAnimationEnd"),_=go(x=>{x.target===e&&(i.current=Eu(r.current))},"handleAnimationStart");return e.addEventListener("animationstart",_),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(f),e.removeEventListener("animationstart",_),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(f=>{if(f){const p=getComputedStyle(f);r.current=p,a.current=Eu(p)}else r.current=null;n(f)},[])}}go(H5,"usePresence");function Z_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}go(Z_,"setRef");function U5(...t){const e=v.useRef(t);return e.current=t,v.useCallback(n=>{const r=e.current;let s=!1;const i=r.map(a=>{const u=Z_(a,n);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a<i.length;a++){const u=i[a];typeof u=="function"?u():Z_(r[a],null)}}},[])}go(U5,"useStableComposedRefs");function Eu(t){return(t==null?void 0:t.animationName)||"none"}go(Eu,"getAnimationName");function B5(t){var r,s;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=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}go(B5,"getElementRef");var XH=Object.defineProperty,Hx=(t,e)=>XH(t,"name",{value:e,configurable:!0}),Pp=0,di=null;function QH(t){return M0(),t.children}Hx(QH,"FocusGuards");function M0(){v.useEffect(()=>{di||(di={start:Y_(),end:Y_()});const{start:t,end:e}=di;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Pp++,()=>{Pp===1&&(di==null||di.start.remove(),di==null||di.end.remove(),di=null),Pp=Math.max(0,Pp-1)}},[])}Hx(M0,"useFocusGuards");function Y_(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}Hx(Y_,"createFocusGuard");var Ci=function(){return Ci=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ci.apply(this,arguments)};function W5(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function JH(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var sm="right-scroll-bar-position",im="width-before-scroll-bar",eU="with-scroll-bars-hidden",tU="--removed-body-scroll-bar-size";function L1(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function nU(t,e){var n=v.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var rU=typeof window<"u"?v.useLayoutEffect:v.useEffect,Ck=new WeakMap;function sU(t,e){var n=nU(null,function(r){return t.forEach(function(s){return L1(s,r)})});return rU(function(){var r=Ck.get(n);if(r){var s=new Set(r),i=new Set(t),a=n.current;s.forEach(function(u){i.has(u)||L1(u,null)}),i.forEach(function(u){s.has(u)||L1(u,a)})}Ck.set(n,t)},[t]),n}function iU(t){return t}function oU(t,e){e===void 0&&(e=iU);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var a=e(i,r);return n.push(a),function(){n=n.filter(function(u){return u!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var u=n;n=[],u.forEach(i),a=n}var c=function(){var f=a;a=[],f.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),n}}}};return s}function aU(t){t===void 0&&(t={});var e=oU(null);return e.options=Ci({async:!0,ssr:!1},t),e}var q5=function(t){var e=t.sideCar,n=W5(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ci({},n))};q5.isSideCarExport=!0;function lU(t,e){return t.useMedium(e),q5}var G5=aU(),N1=function(){},O0=v.forwardRef(function(t,e){var n=v.useRef(null),r=v.useState({onScrollCapture:N1,onWheelCapture:N1,onTouchMoveCapture:N1}),s=r[0],i=r[1],a=t.forwardProps,u=t.children,c=t.className,d=t.removeScrollBar,f=t.enabled,p=t.shards,m=t.sideCar,_=t.noRelative,x=t.noIsolation,y=t.inert,w=t.allowPinchZoom,b=t.as,C=b===void 0?"div":b,P=t.gapMode,T=W5(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=m,R=sU([n,e]),L=Ci(Ci({},T),s);return v.createElement(v.Fragment,null,f&&v.createElement(A,{sideCar:G5,removeScrollBar:d,shards:p,noRelative:_,noIsolation:x,inert:y,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:P}),a?v.cloneElement(v.Children.only(u),Ci(Ci({},L),{ref:R})):v.createElement(C,Ci({},L,{className:c,ref:R}),u))});O0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};O0.classNames={fullWidth:im,zeroRight:sm};var uU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cU(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=uU();return e&&t.setAttribute("nonce",e),t}function dU(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function fU(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var hU=function(){var t=0,e=null;return{add:function(n){t==0&&(e=cU())&&(dU(e,n),fU(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},pU=function(){var t=hU();return function(e,n){v.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},K5=function(){var t=pU(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},mU={left:0,top:0,right:0,gap:0},D1=function(t){return parseInt(t||"",10)||0},vU=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[D1(n),D1(r),D1(s)]},gU=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return mU;var e=vU(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},yU=K5(),Fu="data-scroll-locked",_U=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,u=t.gap;return n===void 0&&(n="margin"),`
|
|
72
|
-
.`.concat(eU,` {
|
|
73
|
-
overflow: hidden `).concat(r,`;
|
|
74
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
75
|
-
}
|
|
76
|
-
body[`).concat(Fu,`] {
|
|
77
|
-
overflow: hidden `).concat(r,`;
|
|
78
|
-
overscroll-behavior: contain;
|
|
79
|
-
`).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
80
|
-
padding-left: `.concat(s,`px;
|
|
81
|
-
padding-top: `).concat(i,`px;
|
|
82
|
-
padding-right: `).concat(a,`px;
|
|
83
|
-
margin-left:0;
|
|
84
|
-
margin-top:0;
|
|
85
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
86
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.`).concat(sm,` {
|
|
90
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.`).concat(im,` {
|
|
94
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.`).concat(sm," .").concat(sm,` {
|
|
98
|
-
right: 0 `).concat(r,`;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.`).concat(im," .").concat(im,` {
|
|
102
|
-
margin-right: 0 `).concat(r,`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
body[`).concat(Fu,`] {
|
|
106
|
-
`).concat(tU,": ").concat(u,`px;
|
|
107
|
-
}
|
|
108
|
-
`)},kk=function(){var t=parseInt(document.body.getAttribute(Fu)||"0",10);return isFinite(t)?t:0},xU=function(){v.useEffect(function(){return document.body.setAttribute(Fu,(kk()+1).toString()),function(){var t=kk()-1;t<=0?document.body.removeAttribute(Fu):document.body.setAttribute(Fu,t.toString())}},[])},wU=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;xU();var i=v.useMemo(function(){return gU(s)},[s]);return v.createElement(yU,{styles:_U(i,!e,s,n?"":"!important")})},X_=!1;if(typeof window<"u")try{var Tp=Object.defineProperty({},"passive",{get:function(){return X_=!0,!0}});window.addEventListener("test",Tp,Tp),window.removeEventListener("test",Tp,Tp)}catch{X_=!1}var mu=X_?{passive:!1}:!1,bU=function(t){return t.tagName==="TEXTAREA"},Z5=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!bU(t)&&n[e]==="visible")},SU=function(t){return Z5(t,"overflowY")},EU=function(t){return Z5(t,"overflowX")},Pk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Y5(t,r);if(s){var i=X5(t,r),a=i[1],u=i[2];if(a>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},CU=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},kU=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},Y5=function(t,e){return t==="v"?SU(e):EU(e)},X5=function(t,e){return t==="v"?CU(e):kU(e)},PU=function(t,e){return t==="h"&&e==="rtl"?-1:1},TU=function(t,e,n,r,s){var i=PU(t,window.getComputedStyle(e).direction),a=i*r,u=n.target,c=e.contains(u),d=!1,f=a>0,p=0,m=0;do{if(!u)break;var _=X5(t,u),x=_[0],y=_[1],w=_[2],b=y-w-i*x;(x||b)&&Y5(t,u)&&(p+=b,m+=x);var C=u.parentNode;u=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&u!==document.body||c&&(e.contains(u)||e===u));return(f&&Math.abs(p)<1||!f&&Math.abs(m)<1)&&(d=!0),d},Ap=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Tk=function(t){return[t.deltaX,t.deltaY]},Ak=function(t){return t&&"current"in t?t.current:t},AU=function(t,e){return t[0]===e[0]&&t[1]===e[1]},IU=function(t){return`
|
|
109
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
110
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
111
|
-
`)},RU=0,vu=[];function MU(t){var e=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),s=v.useState(RU++)[0],i=v.useState(K5)[0],a=v.useRef(t);v.useEffect(function(){a.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=JH([t.lockRef.current],(t.shards||[]).map(Ak),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var u=v.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!a.current.allowPinchZoom;var b=Ap(y),C=n.current,P="deltaX"in y?y.deltaX:C[0]-b[0],T="deltaY"in y?y.deltaY:C[1]-b[1],A,R=y.target,L=Math.abs(P)>Math.abs(T)?"h":"v";if("touches"in y&&L==="h"&&R.type==="range")return!1;var I=window.getSelection(),O=I&&I.anchorNode,N=O?O===R||O.contains(R):!1;if(N)return!1;var j=Pk(L,R);if(!j)return!0;if(j?A=L:(A=L==="v"?"h":"v",j=Pk(L,R)),!j)return!1;if(!r.current&&"changedTouches"in y&&(P||T)&&(r.current=A),!A)return!0;var F=r.current||A;return TU(F,w,y,F==="h"?P:T)},[]),c=v.useCallback(function(y){var w=y;if(!(!vu.length||vu[vu.length-1]!==i)){var b="deltaY"in w?Tk(w):Ap(w),C=e.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&AU(A.delta,b)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var P=(a.current.shards||[]).map(Ak).filter(Boolean).filter(function(A){return A.contains(w.target)}),T=P.length>0?u(w,P[0]):!a.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),d=v.useCallback(function(y,w,b,C){var P={name:y,delta:w,target:b,should:C,shadowParent:OU(b)};e.current.push(P),setTimeout(function(){e.current=e.current.filter(function(T){return T!==P})},1)},[]),f=v.useCallback(function(y){n.current=Ap(y),r.current=void 0},[]),p=v.useCallback(function(y){d(y.type,Tk(y),y.target,u(y,t.lockRef.current))},[]),m=v.useCallback(function(y){d(y.type,Ap(y),y.target,u(y,t.lockRef.current))},[]);v.useEffect(function(){return vu.push(i),t.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",c,mu),document.addEventListener("touchmove",c,mu),document.addEventListener("touchstart",f,mu),function(){vu=vu.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,mu),document.removeEventListener("touchmove",c,mu),document.removeEventListener("touchstart",f,mu)}},[]);var _=t.removeScrollBar,x=t.inert;return v.createElement(v.Fragment,null,x?v.createElement(i,{styles:IU(s)}):null,_?v.createElement(wU,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function OU(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const LU=lU(G5,MU);var Ux=v.forwardRef(function(t,e){return v.createElement(O0,Ci({},t,{ref:e,sideCar:LU}))});Ux.classNames=O0.classNames;var NU=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},gu=new WeakMap,Ip=new WeakMap,Rp={},j1=0,Q5=function(t){return t&&(t.host||Q5(t.parentNode))},DU=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Q5(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},jU=function(t,e,n,r){var s=DU(e,Array.isArray(t)?t:[t]);Rp[n]||(Rp[n]=new WeakMap);var i=Rp[n],a=[],u=new Set,c=new Set(s),d=function(p){!p||u.has(p)||(u.add(p),d(p.parentNode))};s.forEach(d);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(u.has(m))f(m);else try{var _=m.getAttribute(r),x=_!==null&&_!=="false",y=(gu.get(m)||0)+1,w=(i.get(m)||0)+1;gu.set(m,y),i.set(m,w),a.push(m),y===1&&x&&Ip.set(m,!0),w===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(e),u.clear(),j1++,function(){a.forEach(function(p){var m=gu.get(p)-1,_=i.get(p)-1;gu.set(p,m),i.set(p,_),m||(Ip.has(p)||p.removeAttribute(r),Ip.delete(p)),_||p.removeAttribute(n)}),j1--,j1||(gu=new WeakMap,gu=new WeakMap,Ip=new WeakMap,Rp={})}},J5=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=NU(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),jU(r,s,n,"aria-hidden")):function(){return null}},FU=Object.defineProperty,ei=(t,e)=>FU(t,"name",{value:e,configurable:!0}),Bx="Dialog",[eA,dte]=Ni(Bx),[VU,bo]=eA(Bx),Wx=ei(t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,u=v.useRef(null),c=v.useRef(null),[d,f]=wa({prop:r,defaultProp:s??!1,onChange:i,caller:Bx}),[p,m]=v.useState(0),[_,x]=v.useState(0);return E.jsx(VU,{scope:e,triggerRef:u,contentRef:c,contentId:oa(),titleId:oa(),descriptionId:oa(),titlePresent:p>0,descriptionPresent:_>0,setTitleCount:m,setDescriptionCount:x,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(y=>!y),[f]),modal:a,children:n})},"Dialog"),tA="DialogPortal",[$U,nA]=eA(tA,{forceMount:void 0}),qx=ei(t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=bo(tA,e);return E.jsx($U,{scope:e,forceMount:n,children:v.Children.map(r,a=>E.jsx(ba,{present:n||i.open,children:E.jsx(zx,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),Q_="DialogOverlay",Gx=v.forwardRef(ei(function(e,n){const r=nA(Q_,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=bo(Q_,e.__scopeDialog);return a.modal?E.jsx(ba,{present:s||a.open,children:E.jsx(HU,{...i,ref:n})}):null},"DialogOverlay")),zU=pa("DialogOverlay.RemoveScroll"),HU=v.forwardRef(ei(function(e,n){const{__scopeDialog:r,...s}=e,i=bo(Q_,r),a=R5(),u=Bt(n,a);return E.jsx(Ux,{as:zU,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(xn.div,{"data-state":Xx(i.open),...s,ref:u,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),cf="DialogContent",Kx=v.forwardRef(ei(function(e,n){const r=nA(cf,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,a=bo(cf,e.__scopeDialog);return E.jsx(ba,{present:s||a.open,children:a.modal?E.jsx(UU,{...i,ref:n}):E.jsx(BU,{...i,ref:n})})},"DialogContent")),UU=v.forwardRef(ei(function(e,n){const r=bo(cf,e.__scopeDialog),s=v.useRef(null),i=Bt(n,r.contentRef,s);return v.useEffect(()=>{const a=s.current;if(a)return J5(a)},[]),E.jsx(rA,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:Ht(e.onCloseAutoFocus,a=>{var u;a.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Ht(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,c=u.button===0&&u.ctrlKey===!0;(u.button===2||c)&&a.preventDefault()}),onFocusOutside:Ht(e.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),BU=v.forwardRef(ei(function(e,n){const r=bo(cf,e.__scopeDialog),s=v.useRef(!1),i=v.useRef(!1);return E.jsx(rA,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(s.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=a.target;((f=r.triggerRef.current)==null?void 0:f.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"DialogContentNonModal")),rA=v.forwardRef(ei(function(e,n){const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,...u}=e,c=bo(cf,r);return M0(),E.jsx(E.Fragment,{children:E.jsx(L5,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Fx,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":Xx(c.open),...u,ref:n,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),WU="DialogTitle",Zx=v.forwardRef(ei(function(e,n){const{__scopeDialog:r,...s}=e,i=bo(WU,r),{setTitleCount:a}=i;return zr(()=>(a(u=>u+1),()=>a(u=>u-1)),[a]),E.jsx(xn.h2,{id:i.titleId,...s,ref:n})},"DialogTitle")),qU="DialogDescription",Yx=v.forwardRef(ei(function(e,n){const{__scopeDialog:r,...s}=e,i=bo(qU,r),{setDescriptionCount:a}=i;return zr(()=>(a(u=>u+1),()=>a(u=>u-1)),[a]),E.jsx(xn.p,{id:i.descriptionId,...s,ref:n})},"DialogDescription"));function Xx(t){return t?"open":"closed"}ei(Xx,"getState");const GU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),v.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),KU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z",opacity:"0.2"}),v.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z"}))]]),ZU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),v.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),YU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),v.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),XU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,20A108,108,0,0,0,31.85,177.23L21,209.66A20,20,0,0,0,46.34,235l32.43-10.81A108,108,0,1,0,128,20Zm0,192a84,84,0,0,1-42.06-11.27,12,12,0,0,0-6-1.62,12.1,12.1,0,0,0-3.8.62l-29.79,9.93,9.93-29.79a12,12,0,0,0-1-9.81A84,84,0,1,1,128,212Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z",opacity:"0.2"}),v.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232,128A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,26A102,102,0,0,0,38.35,176.69L26.73,211.56a14,14,0,0,0,17.71,17.71l34.87-11.62A102,102,0,1,0,128,26Zm0,192a90,90,0,0,1-45.06-12.08,6.09,6.09,0,0,0-3-.81,6.2,6.2,0,0,0-1.9.31L40.65,217.88a2,2,0,0,1-2.53-2.53L50.58,178a6,6,0,0,0-.5-4.91A90,90,0,1,1,128,218Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,28A100,100,0,0,0,40.53,176.5l-11.9,35.69a12,12,0,0,0,15.18,15.18l35.69-11.9A100,100,0,1,0,128,28Zm0,192a92,92,0,0,1-46.07-12.35,4.05,4.05,0,0,0-2-.54,3.93,3.93,0,0,0-1.27.21L41.28,219.78a4,4,0,0,1-5.06-5.06l12.46-37.38a4,4,0,0,0-.33-3.27A92,92,0,1,1,128,220Z"}))]]),QU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),v.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),JU=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),v.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z"}))]]),eB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),v.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),tB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z",opacity:"0.2"}),v.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z"}))]]),nB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),v.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),rB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),v.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),sB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),v.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),iB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),v.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"}))]]),oB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z",opacity:"0.2"}),v.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"}))]]),aB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z",opacity:"0.2"}),v.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z"}))]]),lB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M242.79,149.32,223.7,97.11A20,20,0,0,0,198.12,85.2l-61.31,22.22L147.7,45.18A20,20,0,0,0,131.55,22L76.87,12.31A19.94,19.94,0,0,0,53.76,28.55l-25,143.13A48,48,0,0,0,67.4,227.26a51.19,51.19,0,0,0,8.7.74H224a20,20,0,0,0,20-20V156.19A21.74,21.74,0,0,0,242.79,149.32ZM99,184.18a23.84,23.84,0,0,1-9.86,15.56,23.28,23.28,0,0,1-17.56,3.89,24,24,0,0,1-19.23-27.82L76.71,36.66,123.37,45,99,184.18Zm23.64,4.13,9.39-53.64,70.49-25.54,16.3,44.59-96.23,34.87C122.62,188.5,122.65,188.41,122.66,188.31ZM220,204H150.52L220,178.82ZM89.22,174.07l-1.4,8A12,12,0,0,1,76,192a12.35,12.35,0,0,1-2.08-.18,12,12,0,0,1-9.75-13.89l1.4-8a12,12,0,0,1,23.64,4.14Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M135.88,43.11l-25,143.14a35.71,35.71,0,0,1-41.34,29.2h0a36,36,0,0,1-28.95-41.71l25-143.13a8,8,0,0,1,9.19-6.49l54.67,9.73A8,8,0,0,1,135.88,43.11Z",opacity:"0.2"}),v.createElement("path",{d:"M88,180a12,12,0,1,1-12-12A12,12,0,0,1,88,180Zm152-23.81V208a16,16,0,0,1-16,16H76a46.36,46.36,0,0,1-7.94-.68,44,44,0,0,1-35.43-50.95l25-143.13a15.94,15.94,0,0,1,18.47-13L130.84,26a16,16,0,0,1,12.92,18.52l-12.08,69L199.49,89a16,16,0,0,1,20.45,9.52L239,150.69A18.35,18.35,0,0,1,240,156.19ZM103,184.87,128,41.74,73.46,32l-25,143.1A28,28,0,0,0,70.9,207.57,27.29,27.29,0,0,0,91.46,203,27.84,27.84,0,0,0,103,184.87ZM116.78,195,224,156.11,204.92,104,128.5,131.7l-9.78,55.92A44.63,44.63,0,0,1,116.78,195ZM224,173.12,127.74,208H224Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M240,155.91a16,16,0,0,0-1-5.22L219.94,98.48A16,16,0,0,0,199.49,89l-67.81,24.57,12.08-69A16,16,0,0,0,130.84,26L76.17,16.25a15.94,15.94,0,0,0-18.47,13l-25,143.12A43.82,43.82,0,0,0,75.78,224H224a16,16,0,0,0,16-16ZM76,196a16,16,0,1,1,16-16A16,16,0,0,1,76,196Zm42.72-8.38,9.78-55.92L204.92,104,224,156.11,116.78,195A44.89,44.89,0,0,0,118.72,187.62ZM224,208H127.74L224,173.11Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M86,180a10,10,0,1,1-10-10A10,10,0,0,1,86,180Zm152-23.81V208a14,14,0,0,1-14,14H76a44.18,44.18,0,0,1-7.58-.65,42,42,0,0,1-33.81-48.64l25-143.13A13.94,13.94,0,0,1,75.82,18.22l54.67,9.72a14,14,0,0,1,11.3,16.21l-12.67,72.44,71-25.75a14,14,0,0,1,17.89,8.32l19.09,52.22A15.66,15.66,0,0,1,238,156.19Zm-133.07,29L130,42.08a2,2,0,0,0-1.58-2.32L73.72,30l-.34,0a1.84,1.84,0,0,0-1.07.35,2,2,0,0,0-.82,1.3l-25,143.13a30,30,0,0,0,24.09,34.76,29.25,29.25,0,0,0,22-4.89,29.81,29.81,0,0,0,12.33-19.44Zm8.25,13.17L224.71,158a2,2,0,0,0,1.11-1,1.86,1.86,0,0,0,.06-1.46l-19.09-52.21a2,2,0,0,0-2.53-1.17l-77.53,28.09-10,57.07A41.9,41.9,0,0,1,113.18,198.38ZM226,170.27,116.35,210H224a2,2,0,0,0,2-2Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M88,180a12,12,0,1,1-12-12A12,12,0,0,1,88,180Zm152-23.81V208a16,16,0,0,1-16,16H76a46.36,46.36,0,0,1-7.94-.68,44,44,0,0,1-35.43-50.95l25-143.13a15.94,15.94,0,0,1,18.47-13L130.84,26a16,16,0,0,1,12.92,18.52l-12.08,69L199.49,89a16,16,0,0,1,20.45,9.52L239,150.69A18.35,18.35,0,0,1,240,156.19ZM103,184.87,128,41.74,73.46,32l-25,143.1A28,28,0,0,0,70.9,207.57,27.29,27.29,0,0,0,91.46,203,27.84,27.84,0,0,0,103,184.87ZM116.78,195,224,156.11,204.92,104,128.5,131.7l-9.78,55.92A44.63,44.63,0,0,1,116.78,195ZM224,173.12,127.74,208H224Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M235.27,152.07,216.19,99.85a12,12,0,0,0-15.34-7.13l-74.3,26.92,13.27-75.83a12,12,0,0,0-9.68-13.9L75.47,20.19a11.75,11.75,0,0,0-8.89,2,11.9,11.9,0,0,0-4.94,7.77l-25,143.13A40,40,0,0,0,68.8,219.39,42.68,42.68,0,0,0,76,220H224a12,12,0,0,0,12-12V156.19A14,14,0,0,0,235.27,152.07Zm-31.7-51.83a4,4,0,0,1,5.1,2.36l19.09,52.21a3.9,3.9,0,0,1-.13,3,3.94,3.94,0,0,1-2.24,2L108.78,202.11a40,40,0,0,0,6-15.17L125,128.73ZM93.75,206.29a31.25,31.25,0,0,1-23.55,5.22,32,32,0,0,1-25.71-37.08l25-143.13a4,4,0,0,1,1.64-2.59A3.85,3.85,0,0,1,73.38,28a4,4,0,0,1,.69.06l54.67,9.73a4,4,0,0,1,3.2,4.64l-25,143.13h0A31.79,31.79,0,0,1,93.75,206.29ZM228,208a4,4,0,0,1-4,4H105l123-44.59ZM84,180a8,8,0,1,1-8-8A8,8,0,0,1,84,180Z"}))]]),uB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),v.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),cB=new Map([["bold",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",v.createElement(v.Fragment,null,v.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),v.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",v.createElement(v.Fragment,null,v.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",v.createElement(v.Fragment,null,v.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",v.createElement(v.Fragment,null,v.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",v.createElement(v.Fragment,null,v.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),dB=v.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),On=v.forwardRef((t,e)=>{const{alt:n,color:r,size:s,weight:i,mirrored:a,children:u,weights:c,...d}=t,{color:f="currentColor",size:p,weight:m="regular",mirrored:_=!1,...x}=v.useContext(dB);return v.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:s??p,height:s??p,fill:r??f,viewBox:"0 0 256 256",transform:a||_?"scale(-1, 1)":void 0,...x,...d},!!n&&v.createElement("title",null,n),u,c.get(i??m))});On.displayName="IconBase";const sA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:GU}));sA.displayName="ArrowLeftIcon";const fB=sA,iA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:KU}));iA.displayName="ArrowSquareOutIcon";const hB=iA,oA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:ZU}));oA.displayName="ArrowUpIcon";const pB=oA,aA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:YU}));aA.displayName="CaretDownIcon";const mB=aA,lA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:XU}));lA.displayName="ChatCircleIcon";const vB=lA,uA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:QU}));uA.displayName="CheckIcon";const cA=uA,dA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:JU}));dA.displayName="CircleNotchIcon";const L0=dA,fA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:eB}));fA.displayName="CopyIcon";const df=fA,hA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:tB}));hA.displayName="FolderOpenIcon";const gB=hA,pA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:nB}));pA.displayName="FolderSimpleIcon";const yB=pA,mA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:rB}));mA.displayName="MagnifyingGlassIcon";const _B=mA,vA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:sB}));vA.displayName="PencilSimpleIcon";const gA=vA,yA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:iB}));yA.displayName="SidebarSimpleIcon";const xB=yA,_A=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:oB}));_A.displayName="SignOutIcon";const wB=_A,xA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:aB}));xA.displayName="SparkleIcon";const F1=xA,wA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:lB}));wA.displayName="SwatchesIcon";const bA=wA,SA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:uB}));SA.displayName="TrashIcon";const EA=SA,CA=v.forwardRef((t,e)=>v.createElement(On,{ref:e,...t,weights:cB}));CA.displayName="XIcon";const kA=CA;function PA(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=PA(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function bB(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=PA(t))&&(r&&(r+=" "),r+=e);return r}const SB=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},EB=(t,e)=>({classGroupId:t,validator:e}),TA=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),r0="-",Ik=[],CB="arbitrary..",kB=t=>{const e=TB(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return PB(a);const u=a.split(r0),c=u[0]===""&&u.length>1?1:0;return AA(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],d=n[a];return c?d?SB(d,c):c:d||Ik}return n[a]||Ik}}},AA=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const s=t[e],i=n.nextPart.get(s);if(i){const d=AA(t,e+1,i);if(d)return d}const a=n.validators;if(a===null)return;const u=e===0?t.join(r0):t.slice(e).join(r0),c=a.length;for(let d=0;d<c;d++){const f=a[d];if(f.validator(u))return f.classGroupId}},PB=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?CB+r:void 0})(),TB=t=>{const{theme:e,classGroups:n}=t;return AB(n,e)},AB=(t,e)=>{const n=TA();for(const r in t){const s=t[r];Qx(s,n,r,e)}return n},Qx=(t,e,n,r)=>{const s=t.length;for(let i=0;i<s;i++){const a=t[i];IB(a,e,n,r)}},IB=(t,e,n,r)=>{if(typeof t=="string"){RB(t,e,n);return}if(typeof t=="function"){MB(t,e,n,r);return}OB(t,e,n,r)},RB=(t,e,n)=>{const r=t===""?e:IA(e,t);r.classGroupId=n},MB=(t,e,n,r)=>{if(LB(t)){Qx(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(EB(n,t))},OB=(t,e,n,r)=>{const s=Object.entries(t),i=s.length;for(let a=0;a<i;a++){const[u,c]=s[a];Qx(c,IA(e,u),n,r)}},IA=(t,e)=>{let n=t;const r=e.split(r0),s=r.length;for(let i=0;i<s;i++){const a=r[i];let u=n.nextPart.get(a);u||(u=TA(),n.nextPart.set(a,u)),n=u}return n},LB=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,NB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const s=(i,a)=>{n[i]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in n?n[i]=a:s(i,a)}}},J_="!",Rk=":",DB=[],Mk=(t,e,n,r,s)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),jB=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=s=>{const i=[];let a=0,u=0,c=0,d;const f=s.length;for(let y=0;y<f;y++){const w=s[y];if(a===0&&u===0){if(w===Rk){i.push(s.slice(c,y)),c=y+1;continue}if(w==="/"){d=y;continue}}w==="["?a++:w==="]"?a--:w==="("?u++:w===")"&&u--}const p=i.length===0?s:s.slice(c);let m=p,_=!1;p.endsWith(J_)?(m=p.slice(0,-1),_=!0):p.startsWith(J_)&&(m=p.slice(1),_=!0);const x=d&&d>c?d-c:void 0;return Mk(i,_,m,x)};if(e){const s=e+Rk,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Mk(DB,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},FB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const a=n[i],u=a[0]==="[",c=e.has(a);u||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},VB=t=>({cache:NB(t.cacheSize),parseClassName:jB(t),sortModifiers:FB(t),postfixLookupClassGroupIds:$B(t),...kB(t)}),$B=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},zB=/\s+/,HB=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split(zB);let d="";for(let f=c.length-1;f>=0;f-=1){const p=c[f],{isExternal:m,modifiers:_,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:w}=n(p);if(m){d=p+(d.length>0?" "+d:d);continue}let b=!!w,C;if(b){const L=y.substring(0,w);C=r(L);const I=C&&a[C]?r(y):void 0;I&&I!==C&&(C=I,b=!1)}else C=r(y);if(!C){if(!b){d=p+(d.length>0?" "+d:d);continue}if(C=r(y),!C){d=p+(d.length>0?" "+d:d);continue}b=!1}const P=_.length===0?"":_.length===1?_[0]:i(_).join(":"),T=x?P+J_:P,A=T+C;if(u.indexOf(A)>-1)continue;u.push(A);const R=s(C,b);for(let L=0;L<R.length;++L){const I=R[L];u.push(T+I)}d=p+(d.length>0?" "+d:d)}return d},UB=(...t)=>{let e=0,n,r,s="";for(;e<t.length;)(n=t[e++])&&(r=RA(n))&&(s&&(s+=" "),s+=r);return s},RA=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=RA(t[r]))&&(n&&(n+=" "),n+=e);return n},BB=(t,...e)=>{let n,r,s,i;const a=c=>{const d=e.reduce((f,p)=>p(f),t());return n=VB(d),r=n.cache.get,s=n.cache.set,i=u,u(c)},u=c=>{const d=r(c);if(d)return d;const f=HB(c,n);return s(c,f),f};return i=a,(...c)=>i(UB(...c))},WB=[],In=t=>{const e=n=>n[t]||WB;return e.isThemeGetter=!0,e},MA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,GB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KB=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ZB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qo=t=>qB.test(t),it=t=>!!t&&!Number.isNaN(Number(t)),fi=t=>!!t&&Number.isInteger(Number(t)),V1=t=>t.endsWith("%")&&it(t.slice(0,-1)),Zi=t=>GB.test(t),LA=()=>!0,QB=t=>KB.test(t)&&!ZB.test(t),Jx=()=>!1,JB=t=>YB.test(t),eW=t=>XB.test(t),tW=t=>!Te(t)&&!Ie(t),nW=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),rW=t=>Sa(t,jA,Jx),Te=t=>MA.test(t),Ka=t=>Sa(t,FA,QB),Ok=t=>Sa(t,dW,it),sW=t=>Sa(t,$A,LA),iW=t=>Sa(t,VA,Jx),Lk=t=>Sa(t,NA,Jx),oW=t=>Sa(t,DA,eW),Mp=t=>Sa(t,zA,JB),Ie=t=>OA.test(t),Cd=t=>Nl(t,FA),aW=t=>Nl(t,VA),Nk=t=>Nl(t,NA),lW=t=>Nl(t,jA),uW=t=>Nl(t,DA),Op=t=>Nl(t,zA,!0),cW=t=>Nl(t,$A,!0),Sa=(t,e,n)=>{const r=MA.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Nl=(t,e,n=!1)=>{const r=OA.exec(t);return r?r[1]?e(r[1]):n:!1},NA=t=>t==="position"||t==="percentage",DA=t=>t==="image"||t==="url",jA=t=>t==="length"||t==="size"||t==="bg-size",FA=t=>t==="length",dW=t=>t==="number",VA=t=>t==="family-name",$A=t=>t==="number"||t==="weight",zA=t=>t==="shadow",fW=()=>{const t=In("color"),e=In("font"),n=In("text"),r=In("font-weight"),s=In("tracking"),i=In("leading"),a=In("breakpoint"),u=In("container"),c=In("spacing"),d=In("radius"),f=In("shadow"),p=In("inset-shadow"),m=In("text-shadow"),_=In("drop-shadow"),x=In("blur"),y=In("perspective"),w=In("aspect"),b=In("ease"),C=In("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),Ie,Te],R=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],I=()=>[Ie,Te,c],O=()=>[qo,"full","auto",...I()],N=()=>[fi,"none","subgrid",Ie,Te],j=()=>["auto",{span:["full",fi,Ie,Te]},fi,Ie,Te],F=()=>[fi,"auto",Ie,Te],G=()=>["auto","min","max","fr",Ie,Te],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...I()],q=()=>[qo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],z=()=>[qo,"screen","full","dvw","lvw","svw","min","max","fit",...I()],X=()=>[qo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],H=()=>[t,Ie,Te],D=()=>[...T(),Nk,Lk,{position:[Ie,Te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],oe=()=>["auto","cover","contain",lW,rW,{size:[Ie,Te]}],J=()=>[V1,Cd,Ka],se=()=>["","none","full",d,Ie,Te],pe=()=>["",it,Cd,Ka],Se=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[it,V1,Nk,Lk],$e=()=>["","none",x,Ie,Te],We=()=>["none",it,Ie,Te],ze=()=>["none",it,Ie,Te],Fe=()=>[it,Ie,Te],ct=()=>[qo,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zi],breakpoint:[Zi],color:[LA],container:[Zi],"drop-shadow":[Zi],ease:["in","out","in-out"],font:[tW],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zi],shadow:[Zi],spacing:["px",it],text:[Zi],"text-shadow":[Zi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qo,Te,Ie,w]}],container:["container"],"container-type":[{"@container":["","normal","size",Ie,Te]}],"container-named":[nW],columns:[{columns:[it,Te,Ie,u]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{"inset-s":O(),start:O()}],end:[{"inset-e":O(),end:O()}],"inset-bs":[{"inset-bs":O()}],"inset-be":[{"inset-be":O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",Ie,Te]}],basis:[{basis:[qo,"full","auto",u,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,qo,"auto","initial","none",Te]}],grow:[{grow:["",it,Ie,Te]}],shrink:[{shrink:["",it,Ie,Te]}],order:[{order:[fi,"first","last","none",Ie,Te]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...z()]}],"min-inline-size":[{"min-inline":["auto",...z()]}],"max-inline-size":[{"max-inline":["none",...z()]}],"block-size":[{block:["auto",...X()]}],"min-block-size":[{"min-block":["auto",...X()]}],"max-block-size":[{"max-block":["none",...X()]}],w:[{w:[u,"screen",...q()]}],"min-w":[{"min-w":[u,"screen","none",...q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Cd,Ka]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,cW,sW]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",V1,Te]}],"font-family":[{font:[aW,iW,e]}],"font-features":[{"font-features":[Te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Ie,Te]}],"line-clamp":[{"line-clamp":[it,"none",Ie,Ok]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",Ie,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",Ie,Ka]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[it,"auto",Ie,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"tab-size":[{tab:[fi,Ie,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,Ie,Te],radial:["",Ie,Te],conic:[fi,Ie,Te]},uW,oW]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,Ie,Te]}],"outline-w":[{outline:["",it,Cd,Ka]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,Op,Mp]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",p,Op,Mp]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[it,Ka]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",m,Op,Mp]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[it,Ie,Te]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[it]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Ie,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Te]}],filter:[{filter:["","none",Ie,Te]}],blur:[{blur:$e()}],brightness:[{brightness:[it,Ie,Te]}],contrast:[{contrast:[it,Ie,Te]}],"drop-shadow":[{"drop-shadow":["","none",_,Op,Mp]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",it,Ie,Te]}],"hue-rotate":[{"hue-rotate":[it,Ie,Te]}],invert:[{invert:["",it,Ie,Te]}],saturate:[{saturate:[it,Ie,Te]}],sepia:[{sepia:["",it,Ie,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Te]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[it,Ie,Te]}],"backdrop-contrast":[{"backdrop-contrast":[it,Ie,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Ie,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Ie,Te]}],"backdrop-invert":[{"backdrop-invert":["",it,Ie,Te]}],"backdrop-opacity":[{"backdrop-opacity":[it,Ie,Te]}],"backdrop-saturate":[{"backdrop-saturate":[it,Ie,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Ie,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Ie,Te]}],ease:[{ease:["linear","initial",b,Ie,Te]}],delay:[{delay:[it,Ie,Te]}],animate:[{animate:["none",C,Ie,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Ie,Te]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:We()}],"rotate-x":[{"rotate-x":We()}],"rotate-y":[{"rotate-y":We()}],"rotate-z":[{"rotate-z":We()}],scale:[{scale:ze()}],"scale-x":[{"scale-x":ze()}],"scale-y":[{"scale-y":ze()}],"scale-z":[{"scale-z":ze()}],"scale-3d":["scale-3d"],skew:[{skew:Fe()}],"skew-x":[{"skew-x":Fe()}],"skew-y":[{"skew-y":Fe()}],transform:[{transform:[Ie,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ct()}],"translate-x":[{"translate-x":ct()}],"translate-y":[{"translate-y":ct()}],"translate-z":[{"translate-z":ct()}],"translate-none":["translate-none"],zoom:[{zoom:[fi,Ie,Te]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Te]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[it,Cd,Ka,Ok]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},hW=BB(fW);function cr(...t){return hW(bB(t))}const ff={fast:{type:"spring",duration:.08,bounce:0},moderate:{type:"spring",duration:.16,bounce:.15}},pW="data-hover-dead-zone";function HA(t,e={}){const{axis:n="y"}=e,r=v.useRef(new Map),[s,i]=v.useState(null),[a,u]=v.useState([]),c=v.useRef([]),d=v.useRef(0),f=v.useRef(null),p=v.useRef(null),m=v.useCallback(()=>{if(!t.current)return;const C=[];r.current.forEach((P,T)=>{C[T]={top:P.offsetTop,height:P.offsetHeight,left:P.offsetLeft,width:P.offsetWidth}}),c.current=C,u(C)},[t]),_=v.useCallback((b,C)=>{C?r.current.set(b,C):r.current.delete(b),p.current!==null&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(()=>{p.current=null,m()})},[m]),x=v.useCallback(b=>{const C=b.clientX,P=b.clientY,T=b.target instanceof Element&&b.target.closest(`[${pW}]`)!==null;f.current!==null&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>{f.current=null;const A=t.current;if(!A)return;if(T){i(null);return}const R=A.getBoundingClientRect(),L=n==="x"?C:P;let I=null,O=1/0,N=null;const j=c.current,F=n==="x"?A.scrollLeft:A.scrollTop,G=n==="x"?A.clientLeft:A.clientTop,Q=n==="x"?R.left:R.top,Z=n==="x"?A.offsetWidth:A.offsetHeight,W=n==="x"?R.width:R.height,q=Z>0?W/Z:1;for(let z=0;z<j.length;z++){const X=j[z];if(!X)continue;const H=n==="x"?X.left:X.top,D=Q+(G+H-F)*q,Y=(n==="x"?X.width:X.height)*q,oe=D+Y;L>=D&&L<=oe&&(N=z);const J=D+Y/2,se=Math.abs(L-J);se<O&&(O=se,I=z)}i(N??I)})},[n,t]),y=v.useCallback(()=>{d.current+=1,m()},[m]),w=v.useCallback(()=>{f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),i(null)},[]);return v.useEffect(()=>()=>{f.current!==null&&cancelAnimationFrame(f.current),p.current!==null&&cancelAnimationFrame(p.current)},[]),{activeIndex:s,setActiveIndex:i,itemRects:a,sessionRef:d,handlers:{onMouseMove:x,onMouseEnter:y,onMouseLeave:w},registerItem:_,measureItems:m}}function mW(t,e,n){v.useEffect(()=>(t(e,n.current),()=>t(e,null)),[e,t,n])}const UA=(t,e)=>`style:${t}:${e}`,BA=t=>`text:${t}`,WA=t=>{const e=[t.rivetId,t.xpath,t.cssSelector].filter(n=>!!n).map(n=>n.trim()).filter(Boolean);return e.length>0?[...new Set(e)]:["unknown"]},qA=t=>WA(t)[0],Lp=(t,e)=>WA(t).includes(e),vW=t=>{const e=qA(t.elementId),n=t.batchId?`:${t.batchId}`:"";return t.type==="style"?`${UA(e,t.property)}${n}`:`${BA(e)}${n}`},Gn=[];for(let t=0;t<256;++t)Gn.push((t+256).toString(16).slice(1));function gW(t,e=0){return(Gn[t[e+0]]+Gn[t[e+1]]+Gn[t[e+2]]+Gn[t[e+3]]+"-"+Gn[t[e+4]]+Gn[t[e+5]]+"-"+Gn[t[e+6]]+Gn[t[e+7]]+"-"+Gn[t[e+8]]+Gn[t[e+9]]+"-"+Gn[t[e+10]]+Gn[t[e+11]]+Gn[t[e+12]]+Gn[t[e+13]]+Gn[t[e+14]]+Gn[t[e+15]]).toLowerCase()}const yW=new Uint8Array(16);function _W(){return crypto.getRandomValues(yW)}function Dk(t,e,n){return crypto.randomUUID?crypto.randomUUID():xW(t)}function xW(t,e,n){var s;t=t||{};const r=t.random??((s=t.rng)==null?void 0:s.call(t))??_W();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,gW(r)}const wW=300;class bW{constructor(){Uo(this,"history",{current:new Map,past:[],future:[]});Uo(this,"pendingChanges",new Map);Uo(this,"currentBatchId",null);Uo(this,"debounceTimer",null);Uo(this,"onChangeCallbacks",[]);Uo(this,"stateBeforePending",null);Uo(this,"transactionDepth",0)}recordChange(e){this.pendingChanges.size===0&&(this.currentBatchId=Dk(),this.stateBeforePending=new Map(this.history.current)),this.currentBatchId&&(e.batchId=this.currentBatchId);const n=qA(e.elementId),r=e.type==="style"?UA(n,e.property):BA(n),s=Array.from(this.history.current.entries()).find(([a])=>a===r||a.startsWith(`${r}:`));if(s){const a=s[1];e.type==="style"&&a.type==="style"?e.oldValue=a.oldValue:e.type==="text"&&a.type==="text"&&(e.oldText=a.oldText)}const i=vW(e);this.history.current.set(i,e),this.pendingChanges.set(i,e),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.commitPending()},wW),this.notifyChange()}flushPending(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.commitPending()}removeChange(e){const n=this.history.current.get(e)??this.pendingChanges.get(e)??null,r=this.history.current.has(e),s=this.pendingChanges.has(e);return!r&&!s?null:(r&&this.history.current.delete(e),s&&this.pendingChanges.delete(e),n&&this.stateBeforePending&&(this.stateBeforePending=this.removeChangeFromSnapshotById(this.stateBeforePending,n.id)),s&&this.pendingChanges.size===0&&(this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.stateBeforePending=null,this.currentBatchId=null),r&&(this.history.future=[]),n&&(this.history.past=this.history.past.map(i=>this.removeChangeFromSnapshotById(i,n.id)).filter(i=>i.size>0)),this.notifyChange(),n)}removeChangeById(e){const n=Array.from(this.history.current.entries()).find(([,s])=>s.id===e);if(n)return this.removeChange(n[0]);const r=Array.from(this.pendingChanges.entries()).find(([,s])=>s.id===e);return r?this.removeChange(r[0]):null}removeChangeFromSnapshotById(e,n){return new Map(Array.from(e.entries()).filter(([,r])=>r.id!==n))}commitPending(){this.pendingChanges.size===0||!this.stateBeforePending||this.transactionDepth>0||(this.history.past.push(this.stateBeforePending),this.history.future=[],this.pendingChanges.clear(),this.stateBeforePending=null,this.currentBatchId=null,this.notifyChange())}undo(){if(this.pendingChanges.size>0&&this.commitPending(),this.history.past.length===0)return null;const e=new Map(this.history.current);this.history.future.push(e),this.history.current=this.history.past.pop(),this.notifyChange();const n=[];for(const[r,s]of e)this.history.current.has(r)||n.push(s);return n}redo(){if(this.history.future.length===0)return null;const e=new Map(this.history.current);this.history.past.push(e),this.history.current=this.history.future.pop(),this.notifyChange();const n=[];for(const[r,s]of this.history.current)e.has(r)||n.push(s);return n}getChanges(){return Array.from(this.history.current.values())}getStyleChanges(){return Array.from(this.history.current.values()).filter(e=>e.type==="style")}getTextChanges(){return Array.from(this.history.current.values()).filter(e=>e.type==="text")}getChangeCount(){return this.getUniqueBatchCount(this.history.current.values())}getStyleBatchCount(){return this.getUniqueBatchCount(Array.from(this.history.current.values()).filter(e=>e.type==="style"))}getTextBatchCount(){return this.getUniqueBatchCount(Array.from(this.history.current.values()).filter(e=>e.type==="text"))}getUniqueBatchCount(e){const n=new Set;for(const r of e)r.batchId?n.add(r.batchId):n.add(r.id);return n.size}canUndo(){return this.history.past.length>0||this.pendingChanges.size>0}canRedo(){return this.history.future.length>0}clear(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.history={current:new Map,past:[],future:[]},this.pendingChanges.clear(),this.stateBeforePending=null,this.currentBatchId=null,this.notifyChange()}getStyleChange(e,n){return Array.from(this.history.current.values()).filter(s=>s.type==="style"&&Lp(s.elementId,e)&&s.property===n).sort((s,i)=>i.timestamp-s.timestamp)[0]}getTextChange(e){return Array.from(this.history.current.values()).filter(r=>r.type==="text"&&Lp(r.elementId,e)).sort((r,s)=>s.timestamp-r.timestamp)[0]}hasChanges(e){return Array.from(this.history.current.values()).some(n=>Lp(n.elementId,e))}getChangesForElement(e){return Array.from(this.history.current.values()).filter(n=>Lp(n.elementId,e))}onChange(e){return this.onChangeCallbacks.push(e),()=>{const n=this.onChangeCallbacks.indexOf(e);n!==-1&&this.onChangeCallbacks.splice(n,1)}}notifyChange(){this.onChangeCallbacks.forEach(e=>e())}export(){return{current:Array.from(this.history.current.entries()),past:this.history.past.map(e=>Array.from(e.entries())),future:this.history.future.map(e=>Array.from(e.entries()))}}import(e){this.history={current:new Map(e.current),past:e.past.map(n=>new Map(n)),future:e.future.map(n=>new Map(n))},this.notifyChange()}async transaction(e){const n=this.pendingChanges.size===0;n&&(this.currentBatchId=Dk(),this.stateBeforePending=new Map(this.history.current)),this.transactionDepth++;try{await e()}catch(r){throw n&&this.stateBeforePending&&(this.history.current=new Map(this.stateBeforePending),this.pendingChanges.clear(),this.currentBatchId=null,this.stateBeforePending=null),r}finally{this.transactionDepth--,n&&this.transactionDepth===0&&this.flushPending()}}}const s0={kind:"base"};function hf(t){return t.kind==="base"?"base":`variant:${t.sessionId}:${t.variantId}`}function SW(t,e){return t.kind==="base"&&e.kind,t.kind==="variant"&&e.kind==="variant"?t.sessionId===e.sessionId&&t.variantId===e.variantId:!1}const EW={resize:{default:!1},variants:{default:!1},designSystemEditor:{default:!1},branchDiff:{default:!1},gitUi:{default:!0},createProject:{default:!1},desktopForceUpgrade:{default:!1},deployPrototype:{default:!1},canvasShare:{default:!1},variantSend:{default:!1},generativeControls:{default:!1},refineMode:{default:!1},designContextViewer:{default:!1},variantReferences:{default:!1},inspectorUndoRedo:{default:!1}},GA=Object.fromEntries(Object.entries(EW).map(([t,e])=>[t,{isEnabled:e.default}]));st("view");const KA=st(!0),ZA=st(null),CW=st("chat"),YA=st(0),XA=st({name:null,email:null}),jk=st(s0);st(null);const pf=new Map,kW=t=>{const e=hf(t);let n=pf.get(e);return n||(n=new bW,pf.set(e,n)),n};st(t=>kW(t(jk)),(t,e,n)=>{pf.set(hf(t(jk)),n)});const PW=t=>{for(const e of[...pf.keys()])e==="base"||t.has(e)||pf.delete(e)},mf=st(new Map),Fk=st(null);st(null);const e2=st(0),i0=st(null),t2=st(!1),n2=st(null),QA=st(!1),JA=st(!1),r2=st(null),s2=st(null),vf=st(null),ew=st(null),yo=st(null),Bf=st({active:!1}),eI=st([]),Vk=st(null),TW=(t,e,n)=>{let r=!1;const s=new Map(t);for(const[i,a]of t)a.target&&SW(a.target,e)&&(s.set(i,{...a,target:n}),r=!0);return r?s:t},AW=st(null,(t,e,n)=>{const r=c=>{const d=c??s0;return d.kind==="variant"&&!n.has(hf(d))},s=t(mf);let i=null;for(const[c,d]of s)r(d.target)&&(i??(i=new Set)).add(c);if(i){const c=new Map(s);for(const d of i)c.delete(d);e(mf,c)}const a=t(Fk);a&&r(a.target)&&(e(Fk,null),e(OW,!1));const u=t(Vk);u&&(i!=null&&i.has(u.commentId))&&e(Vk,null),PW(n)}),i2=st(GA),IW=st(!1),tI=st(null),Wf=st(!0),nI=st(!1),rI=st(!1),sI=st(null),RW=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},N0=st(RW()),MW=st(null),OW=st(!1);st(0);st(0);var om={exports:{}},LW=om.exports,$k;function NW(){return $k||($k=1,(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(LW,function(){var e=function(){},n="undefined",r=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],i={},a=null;function u(y,w){var b=y[w];if(typeof b.bind=="function")return b.bind(y);try{return Function.prototype.bind.call(b,y)}catch{return function(){return Function.prototype.apply.apply(b,[y,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(y){return y==="debug"&&(y="log"),typeof console===n?!1:y==="trace"&&r?c:console[y]!==void 0?u(console,y):console.log!==void 0?u(console,"log"):e}function f(){for(var y=this.getLevel(),w=0;w<s.length;w++){var b=s[w];this[b]=w<y?e:this.methodFactory(b,y,this.name)}if(this.log=this.debug,typeof console===n&&y<this.levels.SILENT)return"No console available for logging"}function p(y){return function(){typeof console!==n&&(f.call(this),this[y].apply(this,arguments))}}function m(y,w,b){return d(y)||p.apply(this,arguments)}function _(y,w){var b=this,C,P,T,A="loglevel";typeof y=="string"?A+=":"+y:typeof y=="symbol"&&(A=void 0);function R(j){var F=(s[j]||"silent").toUpperCase();if(!(typeof window===n||!A)){try{window.localStorage[A]=F;return}catch{}try{window.document.cookie=encodeURIComponent(A)+"="+F+";"}catch{}}}function L(){var j;if(!(typeof window===n||!A)){try{j=window.localStorage[A]}catch{}if(typeof j===n)try{var F=window.document.cookie,G=encodeURIComponent(A),Q=F.indexOf(G+"=");Q!==-1&&(j=/^([^;]+)/.exec(F.slice(Q+G.length+1))[1])}catch{}return b.levels[j]===void 0&&(j=void 0),j}}function I(){if(!(typeof window===n||!A)){try{window.localStorage.removeItem(A)}catch{}try{window.document.cookie=encodeURIComponent(A)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function O(j){var F=j;if(typeof F=="string"&&b.levels[F.toUpperCase()]!==void 0&&(F=b.levels[F.toUpperCase()]),typeof F=="number"&&F>=0&&F<=b.levels.SILENT)return F;throw new TypeError("log.setLevel() called with invalid level: "+j)}b.name=y,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=w||m,b.getLevel=function(){return T??P??C},b.setLevel=function(j,F){return T=O(j),F!==!1&&R(T),f.call(b)},b.setDefaultLevel=function(j){P=O(j),L()||b.setLevel(j,!1)},b.resetLevel=function(){T=null,I(),f.call(b)},b.enableAll=function(j){b.setLevel(b.levels.TRACE,j)},b.disableAll=function(j){b.setLevel(b.levels.SILENT,j)},b.rebuild=function(){if(a!==b&&(C=O(a.getLevel())),f.call(b),a===b)for(var j in i)i[j].rebuild()},C=O(a?a.getLevel():"WARN");var N=L();N!=null&&(T=O(N)),f.call(b)}a=new _,a.getLogger=function(w){if(typeof w!="symbol"&&typeof w!="string"||w==="")throw new TypeError("You must supply a name when creating a logger.");var b=i[w];return b||(b=i[w]=new _(w,a.methodFactory)),b};var x=typeof window!==n?window.log:void 0;return a.noConflict=function(){return typeof window!==n&&window.log===a&&(window.log=x),a},a.getLoggers=function(){return i},a.default=a,a})})(om)),om.exports}var DW=NW();const qs=x0(DW),jW="INFO",FW=jW.toUpperCase();qs.setLevel(qs.levels[FW]||qs.levels.INFO);const Os=t=>{const e=t?`[${t}] `:"";return{trace:(n,...r)=>qs.trace(`${e}${n}`,...r),debug:(n,...r)=>qs.debug(`${e}${n}`,...r),info:(n,...r)=>qs.info(`${e}${n}`,...r),warn:(n,...r)=>qs.warn(`${e}${n}`,...r),error:(n,...r)=>{qs.error(`${e}${n}`,...r);try{const i=r.map(u=>u instanceof Error?u.message:String(u)).join(" ").slice(0,512),a={source:"ui",error_message:n,service:t??"unknown",error_type:"logged_error",url:window.location.pathname,error_args_count:r.length,...i?{error_detail:i}:{}};Ee.capture("logger_error",a)}catch(s){console.error("[logger] Failed to send logger_error to PostHog:",s)}},api:(n,...r)=>qs.info(`${e}API: ${n}`,...r),hook:(n,...r)=>qs.debug(`${e}Hook: ${n}`,...r),mount:(n,...r)=>qs.debug(`${e}Mount: ${n}`,...r)}};let am=0;const VW=()=>{am+=1;let t=!1;return()=>{t||(t=!0,am=Math.max(0,am-1))}},$W=()=>am>0;function zW(t){return t==="cursor"?"Cursor":t==="codex"?"Codex":t==="claude-desktop"?"Claude":"Claude Code"}const HW=["⡡⠊⢔⠡","⠊⡰⡡⡘","⢔⢅⠈⢢","⡁⢂⠆⡍","⢔⠨⢑⢐","⠨⡑⡠⠊"],tw=({className:t,"data-testid":e}={})=>E.jsx("div",{className:`rivet-sparkle relative overflow-hidden font-mono leading-none ${t??"text-base text-primary"}`,style:{height:"1em",width:"4ch"},"aria-hidden":"true","data-testid":e,children:E.jsx("div",{className:"rivet-sparkle-strip",children:HW.map((n,r)=>E.jsx("span",{className:"block",style:{height:"1em",lineHeight:"1em"},children:n},r))})}),UW=["top","right","bottom","left"],ma=Math.min,mo=Math.max,o0=Math.round,Np=Math.floor,vo=t=>({x:t,y:t}),BW={left:"right",right:"left",bottom:"top",top:"bottom"};function iI(t,e,n){return mo(t,ma(e,n))}function _o(t,e){return typeof t=="function"?t(e):t}function va(t){return t.split("-")[0]}function Ec(t){return t.split("-")[1]}function nw(t){return t==="x"?"y":"x"}function rw(t){return t==="y"?"height":"width"}function Ti(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function sw(t){return nw(Ti(t))}function WW(t,e,n){n===void 0&&(n=!1);const r=Ec(t),s=sw(t),i=rw(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=a0(a)),[a,a0(a)]}function qW(t){const e=a0(t);return[o2(t),e,o2(e)]}function o2(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const zk=["left","right"],Hk=["right","left"],GW=["top","bottom"],KW=["bottom","top"];function ZW(t,e,n){switch(t){case"top":case"bottom":return n?e?Hk:zk:e?zk:Hk;case"left":case"right":return e?GW:KW;default:return[]}}function YW(t,e,n,r){const s=Ec(t);let i=ZW(va(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(o2)))),i}function a0(t){const e=va(t);return BW[e]+t.slice(e.length)}function XW(t){var e,n,r,s;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(r=t.bottom)!=null?r:0,left:(s=t.left)!=null?s:0}}function oI(t){return typeof t!="number"?XW(t):{top:t,right:t,bottom:t,left:t}}function l0(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Uk(t,e,n){let{reference:r,floating:s}=t;const i=Ti(e),a=sw(e),u=rw(a),c=va(e),d=i==="y",f=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,m=r[u]/2-s[u]/2;let _;switch(c){case"top":_={x:f,y:r.y-s.height};break;case"bottom":_={x:f,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:p};break;case"left":_={x:r.x-s.width,y:p};break;default:_={x:r.x,y:r.y}}const x=Ec(e);return x&&(_[a]+=m*(x==="end"?1:-1)*(n&&d?-1:1)),_}async function QW(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:a,elements:u,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:_=0}=_o(e,t),x=oI(_),w=u[m?p==="floating"?"reference":"floating":p],b=l0(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:d,rootBoundary:f,strategy:c})),C=p==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(P))&&await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1},A=l0(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:C,offsetParent:P,strategy:c}):C);return{top:(b.top-A.top+x.top)/T.y,bottom:(A.bottom-b.bottom+x.bottom)/T.y,left:(b.left-A.left+x.left)/T.x,right:(A.right-b.right+x.right)/T.x}}const JW=50,eq=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:QW},c=await(a.isRTL==null?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:p}=Uk(d,r,c),m=r,_=0;const x={};for(let y=0;y<i.length;y++){const w=i[y];if(!w)continue;const{name:b,fn:C}=w,{x:P,y:T,data:A,reset:R}=await C({x:f,y:p,initialPlacement:r,placement:m,strategy:s,middlewareData:x,rects:d,platform:u,elements:{reference:t,floating:e}});f=P??f,p=T??p,x[b]={...x[b],...A},R&&_<JW&&(_++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:s}):R.rects),{x:f,y:p}=Uk(d,m,c)),y=-1)}return{x:f,y:p,placement:m,strategy:s,middlewareData:x}},tq=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:u,middlewareData:c}=e,{element:d,padding:f=0}=_o(t,e)||{};if(d==null)return{};const p=oI(f),m={x:n,y:r},_=sw(s),x=rw(_),y=await a.getDimensions(d),w=_==="y",b=w?"top":"left",C=w?"bottom":"right",P=w?"clientHeight":"clientWidth",T=i.reference[x]+i.reference[_]-m[_]-i.floating[x],A=m[_]-i.reference[_],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let L=R?R[P]:0;(!L||!await(a.isElement==null?void 0:a.isElement(R)))&&(L=u.floating[P]||i.floating[x]);const I=T/2-A/2,O=L/2-y[x]/2-1,N=ma(p[b],O),j=ma(p[C],O),F=L-y[x]-j,G=L/2-y[x]/2+I,Q=iI(N,G,F),Z=!c.arrow&&Ec(s)!=null&&G!==Q&&i.reference[x]/2-(G<N?N:j)-y[x]/2<0,W=Z?G<N?G-N:G-F:0;return{[_]:m[_]+W,data:{[_]:Q,centerOffset:G-Q-W,...Z&&{alignmentOffset:W}},reset:Z}}}),nq=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:a,initialPlacement:u,platform:c,elements:d}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...w}=_o(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=va(s),C=Ti(u),P=va(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=m||(P||!y?[a0(u)]:qW(u)),R=x!=="none";!m&&R&&A.push(...YW(u,y,x,T));const L=[u,...A],I=await c.detectOverflow(e,w),O=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&O.push(I[b]),p){const Q=WW(s,a,T);O.push(I[Q[0]],I[Q[1]])}if(N=[...N,{placement:s,overflows:O}],!O.every(Q=>Q<=0)){var j,F;const Q=(((j=i.flip)==null?void 0:j.index)||0)+1,Z=L[Q];if(Z&&(!(p==="alignment"?C!==Ti(Z):!1)||N.every(z=>Ti(z.placement)===C?z.overflows[0]>0:!0)))return{data:{index:Q,overflows:N},reset:{placement:Z}};let W=(F=N.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:F.placement;if(!W)switch(_){case"bestFit":{var G;const q=(G=N.filter(z=>{if(R){const X=Ti(z.placement);return X===C||X==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(X=>X>0).reduce((X,H)=>X+H,0)]).sort((z,X)=>z[1]-X[1])[0])==null?void 0:G[0];q&&(W=q);break}case"initialPlacement":W=u;break}if(s!==W)return{reset:{placement:W}}}return{}}}};function Bk(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wk(t){return UW.some(e=>t[e]>=0)}const rq=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...i}=_o(t,e);switch(s){case"referenceHidden":{const a=await r.detectOverflow(e,{...i,elementContext:"reference"}),u=Bk(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Wk(u)}}}case"escaped":{const a=await r.detectOverflow(e,{...i,altBoundary:!0}),u=Bk(a,n.floating);return{data:{escapedOffsets:u,escaped:Wk(u)}}}default:return{}}}}},aI=new Set(["left","top"]);async function sq(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=va(n),u=Ec(n),c=Ti(n)==="y",d=aI.has(a)?-1:1,f=i&&c?-1:1,p=_o(e,t);let{mainAxis:m,crossAxis:_,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof x=="number"&&(_=u==="end"?x*-1:x),c?{x:_*f,y:m*d}:{x:m*d,y:_*f}}const iq=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:u}=e,c=await sq(e,t);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},oq=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:i}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:C=>{let{x:P,y:T}=C;return{x:P,y:T}}},...d}=_o(t,e),f={x:n,y:r},p=await i.detectOverflow(e,d),m=Ti(s),_=nw(m);let x=f[_],y=f[m];const w=(C,P)=>iI(P+p[C==="y"?"top":"left"],P,P-p[C==="y"?"bottom":"right"]);a&&(x=w(_,x)),u&&(y=w(m,y));const b=c.fn({...e,[_]:x,[m]:y});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[_]:a,[m]:u}}}}}},aq=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,r;const{x:s,y:i,placement:a,rects:u,middlewareData:c}=e,{offset:d=0,mainAxis:f=!0,crossAxis:p=!0}=_o(t,e),m={x:s,y:i},_=Ti(a),x=nw(_);let y=m[x],w=m[_];const b=_o(d,e),C=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:(n=b.mainAxis)!=null?n:0,crossAxis:(r=b.crossAxis)!=null?r:0};if(f){const A=x==="y"?"height":"width",R=u.reference[x]-u.floating[A]+C.mainAxis,L=u.reference[x]+u.reference[A]-C.mainAxis;y<R?y=R:y>L&&(y=L)}if(p){var P,T;const A=x==="y"?"width":"height",R=aI.has(va(a)),L=u.reference[_]-u.floating[A]+(R&&((P=c.offset)==null?void 0:P[_])||0)+(R?0:C.crossAxis),I=u.reference[_]+u.reference[A]+(R?0:((T=c.offset)==null?void 0:T[_])||0)-(R?C.crossAxis:0);w<L?w=L:w>I&&(w=I)}return{[x]:y,[_]:w}}}},lq=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:a=()=>{},...u}=_o(t,e),c=await s.detectOverflow(e,u),d=va(n),f=Ec(n),p=Ti(n)==="y",{width:m,height:_}=r.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=d,x=f==="end"?"top":"bottom");const w=_-c.top-c.bottom,b=m-c.left-c.right,C=ma(_-c[x],w),P=ma(m-c[y],b),T=e.middlewareData.shift,A=!T;let R=C,L=P;T!=null&&T.enabled.x&&(L=b),T!=null&&T.enabled.y&&(R=w),A&&!f&&(p?L=m-2*mo(c.left,c.right):R=_-2*mo(c.top,c.bottom)),await a({...e,availableWidth:L,availableHeight:R});const I=await s.getDimensions(i.floating);return m!==I.width||_!==I.height?{reset:{rects:!0}}:{}}}};function D0(){return typeof window<"u"}function Cc(t){return lI(t)?(t.nodeName||"").toLowerCase():"#document"}function Hr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function So(t){var e;return(e=(lI(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lI(t){return D0()?t instanceof Node||t instanceof Hr(t).Node:!1}function Mi(t){return D0()?t instanceof Element||t instanceof Hr(t).Element:!1}function Ea(t){return D0()?t instanceof HTMLElement||t instanceof Hr(t).HTMLElement:!1}function qk(t){return!D0()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hr(t).ShadowRoot}function j0(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Oi(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&s!=="inline"&&s!=="contents"}function uq(t){return/^(table|td|th)$/.test(Cc(t))}function F0(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const cq=/transform|translate|scale|rotate|perspective|filter/,dq=/paint|layout|strict|content/,Za=t=>!!t&&t!=="none";let $1;function iw(t){const e=Mi(t)?Oi(t):t;return Za(e.transform)||Za(e.translate)||Za(e.scale)||Za(e.rotate)||Za(e.perspective)||!ow()&&(Za(e.backdropFilter)||Za(e.filter))||cq.test(e.willChange||"")||dq.test(e.contain||"")}function fq(t){let e=Ol(t);for(;Ea(e)&&!gf(e);){if(iw(e))return e;if(F0(e))return null;e=Ol(e)}return null}function ow(){return $1==null&&($1=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$1}function gf(t){return/^(html|body|#document)$/.test(Cc(t))}function Oi(t){return Hr(t).getComputedStyle(t)}function V0(t){return Mi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ol(t){if(Cc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||qk(t)&&t.host||So(t);return qk(e)?e.host:e}function uI(t){const e=Ol(t);return gf(e)?(t.ownerDocument||t).body:Ea(e)&&j0(e)?e:uI(e)}function yf(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=uI(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=Hr(s);if(i){const u=a2(a);return e.concat(a,a.visualViewport||[],j0(s)?s:[],u&&n?yf(u):[])}else return e.concat(s,yf(s,[],n))}function a2(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function cI(t){const e=Oi(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Ea(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,u=o0(n)!==i||o0(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function aw(t){return Mi(t)?t:t.contextElement}function Vu(t){const e=aw(t);if(!Ea(e))return vo(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=cI(e);let a=(i?o0(n.width):n.width)/r,u=(i?o0(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const hq=vo(0);function dI(t){const e=Hr(t);return!ow()||!e.visualViewport?hq:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pq(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Hr(t)}function Ll(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=aw(t);let a=vo(1);e&&(r?Mi(r)&&(a=Vu(r)):a=Vu(t));const u=pq(i,n,r)?dI(i):vo(0);let c=(s.left+u.x)/a.x,d=(s.top+u.y)/a.y,f=s.width/a.x,p=s.height/a.y;if(i&&r){const m=Hr(i),_=Mi(r)?Hr(r):r;let x=m,y=a2(x);for(;y&&_!==x;){const w=Vu(y),b=y.getBoundingClientRect(),C=Oi(y),P=b.left+(y.clientLeft+parseFloat(C.paddingLeft))*w.x,T=b.top+(y.clientTop+parseFloat(C.paddingTop))*w.y;c*=w.x,d*=w.y,f*=w.x,p*=w.y,c+=P,d+=T,x=Hr(y),y=a2(x)}}return l0({width:f,height:p,x:c,y:d})}function $0(t,e){const n=V0(t).scrollLeft;return e?e.left+n:Ll(So(t)).left+n}function fI(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-$0(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function mq(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=So(r),u=e?F0(e.floating):!1;if(r===a||u&&i)return n;let c={scrollLeft:0,scrollTop:0},d=vo(1);const f=vo(0),p=Ea(r);if((p||!i)&&((Cc(r)!=="body"||j0(a))&&(c=V0(r)),p)){const _=Ll(r);d=Vu(r),f.x=_.x+r.clientLeft,f.y=_.y+r.clientTop}const m=a&&!p&&!i?fI(a,c):vo(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+m.x,y:n.y*d.y-c.scrollTop*d.y+f.y+m.y}}function vq(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function gq(t){const e=V0(t),n=t.ownerDocument.body,r=mo(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=mo(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+$0(t);const a=-e.scrollTop;return Oi(n).direction==="rtl"&&(i+=mo(t.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:a}}const yq=25;function _q(t,e,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=Hr(t),i=So(t),a=s.visualViewport;let u=i.clientWidth,c=i.clientHeight,d=0,f=0;if(a){const m=!ow()||e==="fixed";r?m||(d=-a.offsetLeft,f=-a.offsetTop):(u=a.width,c=a.height,m&&(d=a.offsetLeft,f=a.offsetTop))}if($0(i)<=0){const m=i.ownerDocument,_=m.body,x=getComputedStyle(_),y=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(i.clientWidth-_.clientWidth-y),b=getComputedStyle(i).scrollbarGutter==="stable both-edges"?w/2:w;b<=yq&&(u-=b)}return{width:u,height:c,x:d,y:f}}function xq(t,e){const n=Ll(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Vu(t),a=t.clientWidth*i.x,u=t.clientHeight*i.y,c=s*i.x,d=r*i.y;return{width:a,height:u,x:c,y:d}}function Gk(t,e,n){let r;if(e==="viewport"||e==="layoutViewport")r=_q(t,n,e);else if(e==="document")r=gq(So(t));else if(Mi(e))r=xq(e,n);else{const s=dI(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return l0(r)}function wq(t,e){const n=e.get(t);if(n)return n;let r=yf(t,[],!1).filter(u=>Mi(u)&&Cc(u)!=="body"),s=null;const i=Oi(t).position==="fixed";let a=i?Ol(t):t;for(;Mi(a)&&!gf(a);){const u=Oi(a),c=iw(a),d=s?s.position:i?"fixed":"";!c&&(d==="fixed"||d==="absolute"&&u.position==="static")?r=r.filter(p=>p!==a):s=u,a=Ol(a)}return e.set(t,r),r}function bq(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?F0(e)?[]:wq(e,this._c):[].concat(n),r],u=Gk(e,a[0],s);let c=u.top,d=u.right,f=u.bottom,p=u.left;for(let m=1;m<a.length;m++){const _=Gk(e,a[m],s);c=mo(_.top,c),d=ma(_.right,d),f=ma(_.bottom,f),p=mo(_.left,p)}return{width:d-p,height:f-c,x:p,y:c}}function Sq(t){const{width:e,height:n}=cI(t);return{width:e,height:n}}function Eq(t,e,n){const r=Ea(e),s=So(e),i=n==="fixed",a=Ll(t,!0,i,e);let u={scrollLeft:0,scrollTop:0};const c=vo(0);if((r||!i)&&((Cc(e)!=="body"||j0(s))&&(u=V0(e)),r)){const m=Ll(e,!0,i,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}!r&&s&&(c.x=$0(s));const d=s&&!r&&!i?fI(s,u):vo(0),f=a.left+u.scrollLeft-c.x-d.x,p=a.top+u.scrollTop-c.y-d.y;return{x:f,y:p,width:a.width,height:a.height}}function z1(t){return Oi(t).position==="static"}function Kk(t,e){if(!Ea(t)||Oi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return So(t)===n&&(n=n.ownerDocument.body),n}function hI(t,e){const n=Hr(t);if(F0(t))return n;if(!Ea(t)){let s=Ol(t);for(;s&&!gf(s);){if(Mi(s)&&!z1(s))return s;s=Ol(s)}return n}let r=Kk(t,e);for(;r&&uq(r)&&z1(r);)r=Kk(r,e);return r&&gf(r)&&z1(r)&&!iw(r)?n:r||fq(t)||n}const Cq=async function(t){const e=this.getOffsetParent||hI,n=this.getDimensions,r=await n(t.floating);return{reference:Eq(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kq(t){return Oi(t).direction==="rtl"}const Pq={convertOffsetParentRelativeRectToViewportRelativeRect:mq,getDocumentElement:So,getClippingRect:bq,getOffsetParent:hI,getElementRects:Cq,getClientRects:vq,getDimensions:Sq,getScale:Vu,isElement:Mi,isRTL:kq};function pI(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Tq(t,e,n){let r=null,s;const i=So(t);function a(){var f;clearTimeout(s),(f=r)==null||f.disconnect(),r=null}function u(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),a();const m=t.getBoundingClientRect(),{left:_,top:x,width:y,height:w}=m;if(f||e(),!y||!w)return;const b=Np(x),C=Np(i.clientWidth-(_+y)),P=Np(i.clientHeight-(x+w)),T=Np(_),R={rootMargin:-b+"px "+-C+"px "+-P+"px "+-T+"px",threshold:mo(0,ma(1,p))||1};let L=!0;function I(O){const N=O[0].intersectionRatio;if(!pI(m,t.getBoundingClientRect()))return u();if(N!==p){if(!L)return u();N?u(!1,N):s=setTimeout(()=>{u(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(I,{...R,root:i.ownerDocument})}catch{r=new IntersectionObserver(I,R)}r.observe(t)}const c=Hr(t),d=()=>u(n);return c.addEventListener("resize",d),u(!0),()=>{c.removeEventListener("resize",d),a()}}function Aq(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=aw(t),f=s||i?[...d?yf(d):[],...e?yf(e):[]]:[];f.forEach(b=>{s&&b.addEventListener("scroll",n),i&&b.addEventListener("resize",n)});const p=d&&u?Tq(d,n,i):null;let m=-1,_=null;a&&(_=new ResizeObserver(b=>{let[C]=b;C&&C.target===d&&_&&e&&(_.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var P;(P=_)==null||P.observe(e)})),n()}),d&&!c&&_.observe(d),e&&_.observe(e));let x,y=c?Ll(t):null;c&&w();function w(){const b=Ll(t);y&&!pI(y,b)&&n(),y=b,x=requestAnimationFrame(w)}return n(),()=>{var b;f.forEach(C=>{s&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p==null||p(),(b=_)==null||b.disconnect(),_=null,c&&cancelAnimationFrame(x)}}const Iq=iq,Rq=oq,Mq=nq,Oq=lq,Lq=rq,Zk=tq,Nq=aq,Dq=(t,e,n)=>{const r=new Map,s=n??{},i={...Pq,...s.platform,_c:r};return eq(t,e,{...s,platform:i})};var jq=typeof document<"u",Fq=function(){},lm=jq?v.useLayoutEffect:Fq;function u0(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!u0(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!u0(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function mI(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Yk(t,e){const n=mI(t);return Math.round(e*n)/n}function H1(t){const e=v.useRef(t);return lm(()=>{e.current=t}),e}function Vq(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:u=!0,whileElementsMounted:c,open:d}=t,[f,p]=v.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,_]=v.useState(r);u0(m,r)||_(r);const[x,y]=v.useState(null),[w,b]=v.useState(null),C=v.useCallback(z=>{z!==R.current&&(R.current=z,y(z))},[]),P=v.useCallback(z=>{z!==L.current&&(L.current=z,b(z))},[]),T=i||x,A=a||w,R=v.useRef(null),L=v.useRef(null),I=v.useRef(f),O=c!=null,N=H1(c),j=H1(s),F=H1(d),G=v.useCallback(()=>{if(!R.current||!L.current)return;const z={placement:e,strategy:n,middleware:m};j.current&&(z.platform=j.current),Dq(R.current,L.current,z).then(X=>{const H={...X,isPositioned:F.current!==!1};Q.current&&!u0(I.current,H)&&(I.current=H,R0.flushSync(()=>{p(H)}))})},[m,e,n,j,F]);lm(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(z=>({...z,isPositioned:!1})))},[d]);const Q=v.useRef(!1);lm(()=>(Q.current=!0,()=>{Q.current=!1}),[]),lm(()=>{if(T&&(R.current=T),A&&(L.current=A),T&&A){if(N.current)return N.current(T,A,G);G()}},[T,A,G,N,O]);const Z=v.useMemo(()=>({reference:R,floating:L,setReference:C,setFloating:P}),[C,P]),W=v.useMemo(()=>({reference:T,floating:A}),[T,A]),q=v.useMemo(()=>{const z={position:n,left:0,top:0};if(!W.floating)return z;const X=Yk(W.floating,f.x),H=Yk(W.floating,f.y);return u?{...z,transform:"translate("+X+"px, "+H+"px)",...mI(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:H}},[n,u,W.floating,f.x,f.y]);return v.useMemo(()=>({...f,update:G,refs:Z,elements:W,floatingStyles:q}),[f,G,Z,W,q])}const $q=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Zk({element:r.current,padding:s}).fn(n):{}:r?Zk({element:r,padding:s}).fn(n):{}}}},zq=(t,e)=>{const n=Iq(t);return{name:n.name,fn:n.fn,options:[t,e]}},Hq=(t,e)=>{const n=Rq(t);return{name:n.name,fn:n.fn,options:[t,e]}},Uq=(t,e)=>({fn:Nq(t).fn,options:[t,e]}),Bq=(t,e)=>{const n=Mq(t);return{name:n.name,fn:n.fn,options:[t,e]}},Wq=(t,e)=>{const n=Oq(t);return{name:n.name,fn:n.fn,options:[t,e]}},qq=(t,e)=>{const n=Lq(t);return{name:n.name,fn:n.fn,options:[t,e]}},Gq=(t,e)=>{const n=$q(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Kq=Object.defineProperty,Zq=(t,e)=>Kq(t,"name",{value:e,configurable:!0});function lw(t){const[e,n]=v.useState(void 0);return zr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,u;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,u=d.blockSize}else a=t.offsetWidth,u=t.offsetHeight;n({width:a,height:u})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}Zq(lw,"useSize");var Yq=Object.defineProperty,aa=(t,e)=>Yq(t,"name",{value:e,configurable:!0}),vI="Popper",[gI,z0]=Ni(vI),[Xq,yI]=gI(vI),Qq=aa(t=>{const{__scopePopper:e,children:n}=t,[r,s]=v.useState(null),[i,a]=v.useState(void 0);return E.jsx(Xq,{scope:e,anchor:r,onAnchorChange:s,placementState:i,setPlacementState:a,children:n})},"Popper"),Jq="PopperAnchor",eG=v.forwardRef(aa(function(e,n){const{__scopePopper:r,virtualRef:s,...i}=e,a=yI(Jq,r),u=v.useRef(null),c=a.onAnchorChange,d=v.useCallback(y=>{u.current=y,y&&c(y)},[c]),f=Bt(n,d),p=v.useRef(null);v.useEffect(()=>{if(!s)return;const y=p.current;p.current=s.current,y!==p.current&&c(p.current)});const m=a.placementState&&H0(a.placementState),_=m==null?void 0:m[0],x=m==null?void 0:m[1];return s?null:E.jsx(xn.div,{"data-radix-popper-side":_,"data-radix-popper-align":x,...i,ref:f})},"PopperAnchor")),_I="PopperContent",[tG,fte]=gI(_I),nG=v.forwardRef(aa(function(e,n){var ae,$e,We,ze,Fe,ct,Kt;const{__scopePopper:r,side:s="bottom",sideOffset:i=0,align:a="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:_=!1,updatePositionStrategy:x="optimized",onPlaced:y,...w}=e,b=yI(_I,r),[C,P]=v.useState(null),T=Bt(n,P),[A,R]=v.useState(null),L=lw(A),I=(L==null?void 0:L.width)??0,O=(L==null?void 0:L.height)??0,N=s+(a!=="center"?"-"+a:""),j=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(f)?f:[f],G=F.length>0,Q={padding:j,boundary:F.filter(xI),altBoundary:G},{refs:Z,floatingStyles:W,placement:q,isPositioned:z,middlewareData:X}=Vq({strategy:"fixed",placement:N,whileElementsMounted:aa((...rt)=>Aq(...rt,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[zq({mainAxis:i+O,alignmentAxis:u}),d&&Hq({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Uq():void 0,...Q}),d&&Bq({...Q}),Wq({...Q,apply:aa(({elements:rt,rects:Ve,availableWidth:Ne,availableHeight:Je})=>{const{width:Ct,height:vt}=Ve.reference,xe=rt.floating.style;xe.setProperty("--radix-popper-available-width",`${Ne}px`),xe.setProperty("--radix-popper-available-height",`${Je}px`),xe.setProperty("--radix-popper-anchor-width",`${Ct}px`),xe.setProperty("--radix-popper-anchor-height",`${vt}px`)},"apply")}),A&&Gq({element:A,padding:c}),rG({arrowWidth:I,arrowHeight:O}),_&&qq({strategy:"referenceHidden",...Q,boundary:G?Q.boundary:void 0})]}),H=b.setPlacementState;zr(()=>(H(q),()=>{H(void 0)}),[q,H]);const[D,Y]=H0(q),oe=Ml(y);zr(()=>{z&&(oe==null||oe())},[z,oe]);const J=(ae=X.arrow)==null?void 0:ae.x,se=($e=X.arrow)==null?void 0:$e.y,pe=((We=X.arrow)==null?void 0:We.centerOffset)!==0,[Se,ce]=v.useState();return zr(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),E.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:z?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[(ze=X.transformOrigin)==null?void 0:ze.x,(Fe=X.transformOrigin)==null?void 0:Fe.y].join(" "),...((ct=X.hide)==null?void 0:ct.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(tG,{scope:r,placedSide:D,placedAlign:Y,onArrowChange:R,arrowX:J,arrowY:se,shouldHideArrow:pe,children:E.jsx(xn.div,{"data-side":D,"data-align":Y,...w,ref:T,style:{...w.style,animation:z?(Kt=w.style)==null?void 0:Kt.animation:"none"}})})})},"PopperContent"));function xI(t){return t!==null}aa(xI,"isNotNull");var rG=aa(t=>({name:"transformOrigin",options:t,fn(e){var w,b,C;const{placement:n,rects:r,middlewareData:s}=e,a=((w=s.arrow)==null?void 0:w.centerOffset)!==0,u=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[d,f]=H0(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=s.arrow)==null?void 0:b.x)??0)+u/2,_=(((C=s.arrow)==null?void 0:C.y)??0)+c/2;let x="",y="";return d==="bottom"?(x=a?p:`${m}px`,y=`${-c}px`):d==="top"?(x=a?p:`${m}px`,y=`${r.floating.height+c}px`):d==="right"?(x=`${-c}px`,y=a?p:`${_}px`):d==="left"&&(x=`${r.floating.width+c}px`,y=a?p:`${_}px`),{data:{x,y}}}}),"transformOrigin");function H0(t){const[e,n="center"]=t.split("-");return[e,n]}aa(H0,"getSideAndAlignFromPlacement");var wI=Qq,bI=eG,SI=nG,sG=Object.defineProperty,Ca=(t,e)=>sG(t,"name",{value:e,configurable:!0}),uw="Popover",[EI,hte]=Ni(uw,[z0]),cw=z0(),[iG,kc]=EI(uw),oG=Ca(t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!1}=t,u=cw(e),c=v.useRef(null),[d,f]=v.useState(!1),[p,m]=wa({prop:r,defaultProp:s??!1,onChange:i,caller:uw});return E.jsx(wI,{...u,children:E.jsx(iG,{scope:e,contentId:oa(),triggerRef:c,open:p,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(_=>!_),[m]),hasCustomAnchor:d,onCustomAnchorAdd:v.useCallback(()=>f(!0),[]),onCustomAnchorRemove:v.useCallback(()=>f(!1),[]),modal:a,children:n})})},"Popover"),aG="PopoverTrigger",lG=v.forwardRef(Ca(function(e,n){const{__scopePopover:r,...s}=e,i=kc(aG,r),a=cw(r),u=Bt(n,i.triggerRef),c=E.jsx(xn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":dw(i.open),...s,ref:u,onClick:Ht(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?c:E.jsx(bI,{asChild:!0,...a,children:c})},"PopoverTrigger")),CI="PopoverPortal",[uG,cG]=EI(CI,{forceMount:void 0}),dG=Ca(t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=kc(CI,e);return E.jsx(uG,{scope:e,forceMount:n,children:E.jsx(ba,{present:n||i.open,children:E.jsx(zx,{asChild:!0,container:s,children:r})})})},"PopoverPortal"),_f="PopoverContent",fG=v.forwardRef(Ca(function(e,n){const r=cG(_f,e.__scopePopover),{forceMount:s=r.forceMount,...i}=e,a=kc(_f,e.__scopePopover);return E.jsx(ba,{present:s||a.open,children:a.modal?E.jsx(pG,{...i,ref:n}):E.jsx(mG,{...i,ref:n})})},"PopoverContent")),hG=pa("PopoverContent.RemoveScroll"),pG=v.forwardRef(Ca(function(e,n){const r=kc(_f,e.__scopePopover),s=v.useRef(null),i=Bt(n,s),a=v.useRef(!1);return v.useEffect(()=>{const u=s.current;if(u)return J5(u)},[]),E.jsx(Ux,{as:hG,allowPinchZoom:!0,children:E.jsx(kI,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ht(e.onCloseAutoFocus,u=>{var c;u.preventDefault(),a.current||(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Ht(e.onPointerDownOutside,u=>{const c=u.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,f=c.button===2||d;a.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Ht(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),mG=v.forwardRef(Ca(function(e,n){const r=kc(_f,e.__scopePopover),s=v.useRef(!1),i=v.useRef(!1);return E.jsx(kI,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var u,c;(u=e.onCloseAutoFocus)==null||u.call(e,a),a.defaultPrevented||(s.current||(c=r.triggerRef.current)==null||c.focus(),a.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:a=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=a.target;((f=r.triggerRef.current)==null?void 0:f.contains(u))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})},"PopoverContentNonModal")),kI=v.forwardRef(Ca(function(e,n){const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,...m}=e,_=kc(_f,r),x=cw(r);return M0(),E.jsx(L5,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Fx,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:p,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onDismiss:()=>_.onOpenChange(!1),deferPointerDownOutside:!0,children:E.jsx(SI,{"data-state":dw(_.open),role:"dialog",id:_.contentId,...x,...m,ref:n,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function dw(t){return t?"open":"closed"}Ca(dw,"getState");var PI=oG,TI=lG,AI=dG,II=fG;const RI=({primaryLabel:t,primaryIcon:e,primaryAction:n,isDisabled:r=!1,isDropdownDisabled:s=!1,isLoading:i=!1,loadingLabel:a,dropdownAriaLabel:u="More actions",dropdownItems:c})=>{const[d,f]=v.useState(!1),p=i?a??t:t,m=c.length>0;return E.jsxs("div",{className:"flex items-stretch",children:[E.jsxs("button",{onClick:n,disabled:r||i,className:`bg-main-hover hover:bg-main-input flex h-7 shrink-0 items-center gap-1.5 px-3 text-xs font-medium text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${m?"rounded-l-md":"rounded-md"}`,children:[e?E.jsx(e,{className:"h-3.5 w-3.5",weight:"bold"}):null,p]}),m?E.jsxs(PI,{open:d,onOpenChange:f,children:[E.jsx(TI,{asChild:!0,children:E.jsx("button",{"aria-label":u,disabled:s||i,title:u,className:"bg-main-hover hover:bg-main-input h-7 shrink-0 rounded-r-md border-l border-white/20 px-1.5 text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:E.jsx(mB,{className:"h-3.5 w-3.5",weight:"bold"})})}),E.jsx(AI,{children:E.jsx(II,{className:"border-divider bg-main z-[60] min-w-[140px] rounded-lg border p-1 shadow-lg",sideOffset:5,align:"end",children:c.map(_=>{const x=_.icon;return E.jsxs("button",{onClick:()=>{_.isDisabled||(_.onClick(),f(!1))},disabled:_.isDisabled,className:"text-content hover:bg-hover flex w-full items-center gap-2 rounded px-3 py-1.5 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[x?E.jsx(x,{className:"h-3.5 w-3.5",weight:"bold"}):null,_.label]},_.label)})})})]}):null]})};var vG=Object.defineProperty,gG=(t,e)=>vG(t,"name",{value:e,configurable:!0}),yG=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"}),_G=v.forwardRef(gG(function(e,n){return E.jsx(xn.span,{...e,ref:n,style:{...yG,...e.style}})},"VisuallyHidden")),xG=_G,wG=Object.defineProperty,zn=(t,e)=>wG(t,"name",{value:e,configurable:!0}),[fw,pte]=Ni("Tooltip",[z0]),hw=z0(),bG="TooltipProvider",SG=700,l2="tooltip.open",[EG,pw]=fw(bG),CG=zn(t=>{const{__scopeTooltip:e,delayDuration:n=SG,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,a=v.useRef(!0),u=v.useRef(!1),c=v.useRef(0);return v.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),E.jsx(EG,{scope:e,isOpenDelayedRef:a,delayDuration:n,onOpen:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),a.current=!1)},[r]),onClose:v.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,r))},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:i})},"TooltipProvider"),u2="Tooltip",[kG,qf]=fw(u2),PG=zn(t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:a,delayDuration:u}=t,c=pw(u2,t.__scopeTooltip),d=hw(e),[f,p]=v.useState(null),[m,_]=v.useState(void 0),x=oa(),y=v.useRef(0),w=a??c.disableHoverableContent,b=u??c.delayDuration,C=v.useRef(!1),[P,T]=wa({prop:r,defaultProp:s??!1,onChange:zn(N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(l2))):c.onClose(),i==null||i(N)},"onChange"),caller:u2}),A=v.useMemo(()=>P?C.current?"delayed-open":"instant-open":"closed",[P]),R=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,T(!0)},[T]),L=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,T(!1)},[T]),I=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,T(!0),y.current=0},b)},[b,T]);v.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]);const O=m??x;return E.jsx(wI,{...d,children:E.jsx(kG,{scope:e,contentId:O,setContentId:_,open:P,stateAttribute:A,trigger:f,onTriggerChange:p,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayedRef.current?I():R()},[c.isOpenDelayedRef,I,R]),onTriggerLeave:v.useCallback(()=>{w?L():(window.clearTimeout(y.current),y.current=0)},[L,w]),onOpen:R,onClose:L,disableHoverableContent:w,children:n})})},"Tooltip"),Xk="TooltipTrigger",TG=v.forwardRef(zn(function(e,n){const{__scopeTooltip:r,...s}=e,i=qf(Xk,r),a=pw(Xk,r),u=hw(r),c=v.useRef(null),d=Bt(n,c,i.onTriggerChange),f=v.useRef(!1),p=v.useRef(!1),m=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),E.jsx(bI,{asChild:!0,...u,children:E.jsx(xn.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...s,ref:d,onPointerMove:Ht(e.onPointerMove,_=>{_.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ht(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:Ht(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ht(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Ht(e.onBlur,i.onClose),onClick:Ht(e.onClick,i.onClose)})})},"TooltipTrigger")),MI="TooltipPortal",[AG,IG]=fw(MI,{forceMount:void 0}),RG=zn(t=>{const{__scopeTooltip:e,forceMount:n,children:r,container:s}=t,i=qf(MI,e);return E.jsx(AG,{scope:e,forceMount:n,children:E.jsx(ba,{present:n||i.open,children:E.jsx(zx,{asChild:!0,container:s,children:r})})})},"TooltipPortal"),xf="TooltipContent",MG=v.forwardRef(zn(function(e,n){const r=IG(xf,e.__scopeTooltip),{forceMount:s=r.forceMount,side:i="top",...a}=e,u=qf(xf,e.__scopeTooltip);return E.jsx(ba,{present:s||u.open,children:u.disableHoverableContent?E.jsx(OI,{side:i,...a,ref:n}):E.jsx(OG,{side:i,...a,ref:n})})},"TooltipContent")),OG=v.forwardRef(zn(function(e,n){const r=qf(xf,e.__scopeTooltip),s=pw(xf,e.__scopeTooltip),i=v.useRef(null),a=Bt(n,i),[u,c]=v.useState(null),{trigger:d,onClose:f}=r,p=i.current,{onPointerInTransitChange:m}=s,_=v.useCallback(()=>{c(null),m(!1)},[m]),x=v.useCallback((y,w)=>{const b=y.currentTarget,C={x:y.clientX,y:y.clientY},P=LI(C,b.getBoundingClientRect()),T=NI(C,P),A=DI(w.getBoundingClientRect()),R=FI([...T,...A]);c(R),m(!0)},[m]);return v.useEffect(()=>()=>_(),[_]),v.useEffect(()=>{if(d&&p){const y=zn(b=>x(b,p),"handleTriggerLeave"),w=zn(b=>x(b,d),"handleContentLeave");return d.addEventListener("pointerleave",y),p.addEventListener("pointerleave",w),()=>{d.removeEventListener("pointerleave",y),p.removeEventListener("pointerleave",w)}}},[d,p,x,_]),v.useEffect(()=>{if(u){const y=zn(w=>{const b=w.target,C={x:w.clientX,y:w.clientY},P=(d==null?void 0:d.contains(b))||(p==null?void 0:p.contains(b)),T=!jI(C,u);P?_():T&&(_(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[d,p,u,f,_]),E.jsx(OI,{...e,ref:a})},"TooltipContentHoverable")),LG=E5("TooltipContent"),OI=v.forwardRef(zn(function(e,n){const{__scopeTooltip:r,children:s,"aria-label":i,id:a,onEscapeKeyDown:u,onPointerDownOutside:c,...d}=e,f=qf(xf,r),p=hw(r),{onClose:m}=f;v.useEffect(()=>(document.addEventListener(l2,m),()=>document.removeEventListener(l2,m)),[m]),v.useEffect(()=>{if(f.trigger){const x=zn(y=>{y.target instanceof Node&&y.target.contains(f.trigger)&&m()},"handleScroll");return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[f.trigger,m]);const{setContentId:_}=f;return zr(()=>(_(a),()=>{_(void 0)}),[a,_]),E.jsx(Fx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:m,children:E.jsxs(SI,{"data-state":f.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:f.contentId,...p,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(LG,{children:s}),i?E.jsx(xG,{id:f.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl"));function LI(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}zn(LI,"getExitSideFromRect");function NI(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}zn(NI,"getPaddedExitPoints");function DI(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}zn(DI,"getPointsFromRect");function jI(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;i<e.length;a=i++){const u=e[i],c=e[a],d=u.x,f=u.y,p=c.x,m=c.y;f>r!=m>r&&n<(p-d)*(r-f)/(m-f)+d&&(s=!s)}return s}zn(jI,"isPointInPolygon");function FI(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),VI(e)}zn(FI,"getHull");function VI(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}zn(VI,"getHullPresorted");var NG=CG,DG=PG,jG=TG,FG=RG,VG=MG;const Wd={normal:"'wght' 400",medium:"'wght' 450",semibold:"'wght' 550"},$I={pill:{item:"rounded-[20px]",bg:"rounded-[20px]",focusRing:"rounded-[22px]",mergedBg:"rounded-2xl",container:"rounded-3xl",button:"rounded-[20px]",input:"rounded-[20px]"},rounded:{item:"rounded-lg",bg:"rounded-lg",focusRing:"rounded-[10px]",mergedBg:"rounded-lg",container:"rounded-xl",button:"rounded-lg",input:"rounded-lg"}},zI=v.createContext(null);function U0(){const t=v.useContext(zI);return t?t.classes:$I.pill}function $G(t){const e=document.documentElement;e.classList.add("transitioning"),e.offsetHeight,t(),setTimeout(()=>e.classList.remove("transitioning"),200)}function zG({children:t,defaultShape:e="pill"}){const[n,r]=v.useState(e),s=v.useCallback(i=>{$G(()=>r(i))},[]);return E.jsx(zI.Provider,{value:{shape:n,setShape:s,classes:$I[n]},children:t})}const HI=v.createContext(null);function UI({value:t,children:e}){return E.jsx(HI.Provider,{value:t,children:e})}function HG(t){switch(t){case"top":return{y:4};case"bottom":return{y:-4};case"left":return{x:4};case"right":return{x:-4}}}function mw({content:t,children:e,side:n="top",sideOffset:r=8,delayDuration:s=200,className:i,forceOpen:a,onOpenChange:u}){const[c,d]=v.useState(!1),f=a!==void 0?a:c,[p,m]=v.useState(!1),_=U0(),x=v.useContext(HI);v.useEffect(()=>{f&&m(!0)},[f]);const y=()=>{f||m(!1)},w=HG(n);return E.jsx(NG,{delayDuration:s,children:E.jsxs(DG,{open:f,onOpenChange:b=>{d(b),u==null||u(b)},children:[E.jsx(jG,{asChild:!0,children:e}),p&&E.jsx(FG,{forceMount:!0,container:x??void 0,children:E.jsx(VG,{side:n,sideOffset:r,forceMount:!0,className:"z-tooltip",children:E.jsx(ho.div,{className:cr("bg-neutral-900 text-white text-[12px] px-2 py-1 border border-white/10 shadow-lg",_.bg,i),style:{fontVariationSettings:Wd.medium},initial:{opacity:0,scale:.8,...w},animate:{opacity:f?1:0,scale:f?1:.9,x:0,y:0},transition:f?{type:"spring",duration:.34,bounce:.55}:{duration:.1},onAnimationComplete:y,children:t})})})]})})}const Ys=({label:t,children:e,side:n="top",sideOffset:r=8,delayDuration:s=300,disabled:i=!1,forceOpen:a})=>i?E.jsx(E.Fragment,{children:e}):E.jsx(mw,{content:t,side:n,sideOffset:r,delayDuration:s,forceOpen:a,children:e}),B0="/__rivet/preview",Qk=`${B0}/variant/`,Jk=`${B0}/history/`,BI=t=>t?t.startsWith("/")?t:`/${t}`:"/",UG=t=>`${B0}/variant/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${BI(t.routePath)}`,BG=t=>`${B0}/history/${encodeURIComponent(t.sessionId)}/${encodeURIComponent(t.variantId)}${BI(t.routePath)}`,WG=t=>{try{const e=new URL(t,"http://localhost");return e.pathname.startsWith(Qk)||e.pathname.startsWith(Jk)}catch{return t.startsWith(Qk)||t.startsWith(Jk)}},e8=t=>{var s,i,a,u;const{sessionId:e,variant:n,projectContext:r}=t;return n.status!=="succeeded"?null:((s=n.preview)==null?void 0:s.kind)==="static_artifact"?n.preview.url:e&&(((i=n.preview)==null?void 0:i.kind)==="dev_server"||typeof n.port=="number")?UG({sessionId:e,variantId:n.workItemId,routePath:t.routePath}):e&&(r==null?void 0:r.kind)==="fresh"&&((a=r.executionPlan)==null?void 0:a.mode)!=="vite_app"&&((u=n.preview)==null?void 0:u.kind)!=="dev_server"?`/api/variants/${e}/static/${n.workItemId}`:null},t8="/rivet/",WI=t=>{if(!t.startsWith(t8))return null;const e=t.slice(t8.length);return!e||e==="/"?null:`/${e}`},wf=(t,e=fetch)=>{if((t==null?void 0:t.source)!=="history-dev-server")return;const n=new URLSearchParams({sessionId:t.sessionId,variantId:t.variantId});e(`/api/variants/history/replay/stop?${n.toString()}`,{method:"POST"}).catch(()=>{})},qG=(t,e=fetch)=>{const n=new Set;for(const r of[t==null?void 0:t.left,t==null?void 0:t.right]){if((r==null?void 0:r.source)!=="history-dev-server")continue;const s=`${r.sessionId}:${r.variantId}`;n.has(s)||(n.add(s),wf(r,e))}},c0=(t,e)=>{const n=e==null?void 0:e.left,r=e==null?void 0:e.right;return{event:`visual_editor_variant_compare_${t}`,properties:{bound_side_count:+!!n+ +!!r,is_cross_session:!!(n&&r&&n.sessionId!==r.sessionId),left_session_id:n==null?void 0:n.sessionId,left_source:n==null?void 0:n.source,left_variant_id:n==null?void 0:n.variantId,right_session_id:r==null?void 0:r.sessionId,right_source:r==null?void 0:r.source,right_variant_id:r==null?void 0:r.variantId}}},n8=6,qI="original",vw="Original",GI="The original state of your app before any variants were generated.",r8=200,GG=[.33,1,.68,1],KG=.22,gn=Os("AgentVariantsPanel"),U1=()=>{var t;(t=window.getSelection())==null||t.removeAllRanges()},yu=t=>{var e;return!!t.hasTree&&((e=t.serve)==null?void 0:e.kind)==="dev-server"},ZG=t=>{var e;return t?t.kind==="existing"?!0:((e=t.executionPlan)==null?void 0:e.mode)==="vite_app":!1};function B1(t,...e){return t?e.some(n=>(n??"").toLowerCase().includes(t)):!0}const YG=(t,e)=>{if(t.kind==="original")return null;const n=t.kind==="active"?t.variant.runLabel:t.entry.runLabel,r=n==null?void 0:n.trim();return r?t.kind==="active"?e?{label:r,run:t.variant.requestId?{sessionId:e,requestId:t.variant.requestId}:{sessionId:e,runLabel:r}}:null:{label:r,run:t.entry.requestId?{sessionId:t.entry.sessionId,requestId:t.entry.requestId}:{sessionId:t.entry.sessionId,runLabel:r}}:null},KI=t=>{const e="requestId"in t?["request",t.requestId]:["label",t.runLabel];return`run:${JSON.stringify([t.sessionId,...e])}`},XG="original";function ZI(t){return`rivet:collapsedRuns:${t}`}function Dp(t){try{const e=window.localStorage.getItem(ZI(t)),n=e?JSON.parse(e):null;return Array.isArray(n)?new Set(n.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function W1(t,e){try{window.localStorage.setItem(ZI(t),JSON.stringify([...e]))}catch{}}const s8=(t,e)=>{const n=[],r=new Map;for(const s of t){const i=YG(s,e);let a="";s.kind==="original"?a=XG:i&&(a=KI(i.run));let u=r.get(a);u||(u={key:a,label:(i==null?void 0:i.label)??null,run:(i==null?void 0:i.run)??null,rows:[]},r.set(a,u),n.push(u)),u.rows.push(s)}return n};async function hi(t){try{const e=await t.json();return{message:typeof e.message=="string"?e.message:null,errorCode:typeof e.errorCode=="string"?e.errorCode:null}}catch{return{message:null,errorCode:null}}}const QG=t=>{var n,r;const e=((r=(n=t.actions)==null?void 0:n.commit)==null?void 0:r.enabled)??t.status==="succeeded";return t.status==="succeeded"&&e},qd=t=>{var e,n;return t.status!=="succeeded"?!1:((n=(e=t.actions)==null?void 0:e.view)==null?void 0:n.enabled)??(!!t.preview||typeof t.port=="number")},YI=t=>{var e;return((e=t.previewUnavailable)==null?void 0:e.reason)==="idle_timeout"},JG=t=>t.status==="succeeded"&&!qd(t)&&(!t.previewUnavailable||YI(t)),q1=t=>{var e,n;return((e=t.preview)==null?void 0:e.kind)==="static_artifact"?"static_artifact":((n=t.preview)==null?void 0:n.kind)==="dev_server"||typeof t.port=="number"?"dev_server":"none"},i8=(t,e,n)=>{const r=t.includes("?")?"&":"?";return`${t}${r}${encodeURIComponent(e)}=${encodeURIComponent(n)}`},eK=t=>{var e;return QG(t)&&((e=t.preview)==null?void 0:e.kind)==="static_artifact"},o8=(t,e)=>t.map(n=>`${n.workItemId}:${e[n.workItemId]??""}`).join("|"),tK=(t,e)=>t.length===e.length&&t.every((n,r)=>{var i,a;const s=e[r];return n.sessionId===s.sessionId&&n.variantId===s.variantId&&n.requestId===s.requestId&&n.label===s.label&&n.brief===s.brief&&n.runLabel===s.runLabel&&n.createdAt===s.createdAt&&((i=n.serve)==null?void 0:i.kind)===((a=s.serve)==null?void 0:a.kind)&&n.hasTree===s.hasTree}),nK=()=>{var sh,ih,zl,Nc;const t=tt(Bf),e=tt(eI),n=tt(tI),r=tt(Wf),s=tt(i2),i=((sh=s.deployPrototype)==null?void 0:sh.isEnabled)??!1,a=((ih=s.canvasShare)==null?void 0:ih.isEnabled)??!1,u=((zl=s.variantSend)==null?void 0:zl.isEnabled)??!1,c=((Nc=s.designContextViewer)==null?void 0:Nc.isEnabled)??!1,d=tt(rI),f=tt(sI),p=at(e2),m=at(i0),_=at(t2),x=at(n2),y=at(QA),w=at(JA),b=at(vf),C=at(ew),P=at(ZA);v.useEffect(()=>(P("Directions"),()=>P(null)),[P]);const T=tt(yo),A=at(yo),R=v.useCallback((V=!1)=>{if(qG(T),A(null),V&&T){const ie=c0("ended",T);Ee.capture(ie.event,ie.properties)}},[A,T]),L=tt(r2),I=at(r2),O=tt(s2),N=at(s2),j=O?`${O.sessionId}:${O.variantId}`:null,[F,G]=v.useState(""),[Q,Z]=v.useReducer(V=>V+1,0),W=v.useMemo(()=>n!==null?Dp(n):new Set,[n,Q]),q=v.useCallback(V=>{if(n===null)return;const ie=new Set(Dp(n));ie.delete(V)||ie.add(V),W1(n,ie),Z()},[n]),[z,X]=v.useState(null),[H,D]=v.useState(null),[Y,oe]=v.useState(!1),[J,se]=v.useState({}),[pe,Se]=v.useState(null),[ce,ae]=v.useState({}),[$e,We]=v.useState(null),[ze,Fe]=v.useState([]),ct=v.useRef([]);ct.current=ze;const[Kt,rt]=v.useState(!1),Ve=v.useRef(!1);Ve.current=O!==null||L!==null||Kt;const Ne=v.useMemo(()=>t.active?t.variants:[],[t]),Je=v.useMemo(()=>Ne.filter(eK),[Ne]),Ct=v.useMemo(()=>o8(Je,J),[Je,J]),vt=(pe==null?void 0:pe.key)===Ct?pe.shareUrl:null,xe=t.active?t.sessionId:null,on=v.useMemo(()=>{const V=new Set;for(const ie of Ne)ie.adoptedSource&&V.add(`${ie.adoptedSource.sessionId}:${ie.adoptedSource.variantId}`);return V},[Ne]),Lt=v.useMemo(()=>[...ze.filter(ie=>ie.sessionId!==xe&&!on.has(`${ie.sessionId}:${ie.variantId}`))].sort((ie,Ce)=>{const he=new Date(ie.createdAt).getTime(),le=new Date(Ce.createdAt).getTime();return(Number.isNaN(le)?0:le)-(Number.isNaN(he)?0:he)}),[on,ze,xe]),Kr=v.useMemo(()=>O?Ne.find(V=>{var ie,Ce;return((ie=V.adoptedSource)==null?void 0:ie.sessionId)===O.sessionId&&((Ce=V.adoptedSource)==null?void 0:Ce.variantId)===O.variantId})??null:null,[O,Ne]),Pa=v.useMemo(()=>O?Lt.find(V=>V.sessionId===O.sessionId&&V.variantId===O.variantId)??null:null,[O,Lt]),an=t.active?t.projectContext:null,wn=(an==null?void 0:an.kind)==="fresh"?an.workspacePath:n,Ta=!t.active&&Lt.length>0&&Lt.every(V=>V.projectKind==="fresh"),fr=t.active?ZG(an):!!n&&!Ta,ln=v.useMemo(()=>wn?`?projectPath=${encodeURIComponent(wn)}`:"",[wn]),Eo=v.useRef(null),Un=v.useRef(null),ti=typeof window>"u"?"/":WI(window.location.pathname)??"/",hs=v.useRef(null),ps=v.useRef(!1),Co=v.useCallback((V,ie)=>{ie.button!==0&&ie.pointerType==="mouse"||(ie.preventDefault(),U1(),hs.current={kind:"live",variantId:V,startX:ie.clientX,startY:ie.clientY,committed:!1})},[]),er=v.useCallback((V,ie)=>{ie.button!==0&&ie.pointerType==="mouse"||(ie.preventDefault(),U1(),hs.current={kind:"past",entry:V,startX:ie.clientX,startY:ie.clientY,committed:!1})},[]);v.useEffect(()=>{const V=he=>{const le=hs.current;if(!le)return;const ye=he.clientX-le.startX,qe=he.clientY-le.startY;if(!le.committed){if(ye*ye+qe*qe<n8*n8)return;if(U1(),le.kind==="live"){const De=Ne.find(Sn=>Sn.workItemId===le.variantId);if(!De||De.status!=="succeeded"){hs.current=null;return}const Xt=e8({sessionId:xe,variant:De,projectContext:an,routePath:ti});b({sessionId:xe??"",variantId:De.workItemId,label:De.label||"Direction",url:Xt,source:"live",runLabel:De.runLabel,description:De.description})}else{const{entry:De}=le,Xt=yu(De),Sn=Xt?BG({sessionId:De.sessionId,variantId:De.variantId,routePath:ti}):`/api/variants/history/${encodeURIComponent(De.sessionId)}/${encodeURIComponent(De.variantId)}/preview${ln}`;if(b({sessionId:De.sessionId,variantId:De.variantId,label:De.label||"Direction",url:Sn,source:Xt?"history-dev-server":"history-static",runLabel:De.runLabel,description:De.brief}),Xt){const Tr=i8(`/api/variants/history/${encodeURIComponent(De.sessionId)}/${encodeURIComponent(De.variantId)}/run${ln}`,"targetAddressed","1");(async()=>{try{if(!(await fetch(Tr,{method:"POST"})).ok)return;const pr=i8(Sn,"replay",String(Date.now()));b(Ye=>!Ye||Ye.sessionId!==De.sessionId||Ye.variantId!==De.variantId||Ye.source!=="history-dev-server"?Ye:{...Ye,url:pr}),A(Ye=>{if(!Ye)return Ye;const kt=Ar=>!Ar||Ar.sessionId!==De.sessionId||Ar.variantId!==De.variantId?Ar:{...Ar,url:pr};return{...Ye,left:kt(Ye.left),right:kt(Ye.right)}})}catch(gs){gn.warn("history replay drag boot failed",gs)}})()}}le.committed=!0}C({x:he.clientX,y:he.clientY})},ie=()=>{const he=hs.current;he!=null&&he.committed&&(ps.current=!0),hs.current=null,C(null)},Ce=he=>{if(he.key!=="Escape")return;const le=hs.current;le!=null&&le.committed&&(le.kind==="past"&&yu(le.entry)&&wf({sessionId:le.entry.sessionId,variantId:le.entry.variantId,source:"history-dev-server"}),hs.current=null,b(null),C(null))};return window.addEventListener("pointermove",V),window.addEventListener("pointerup",ie),window.addEventListener("pointercancel",ie),window.addEventListener("keydown",Ce),()=>{window.removeEventListener("pointermove",V),window.removeEventListener("pointerup",ie),window.removeEventListener("pointercancel",ie),window.removeEventListener("keydown",Ce)}},[Ne,xe,an,ti,ln,b,C,A]);const Ln=v.useMemo(()=>{var ie;if(Kt||j)return null;const V=L?Ne.find(Ce=>Ce.workItemId===L):null;return L&&!V?null:V?qd(V)?V.workItemId:null:t.active?((ie=Ne.find(Ce=>{var he,le;return qd(Ce)&&(((he=Ce.preview)==null?void 0:he.kind)==="static_artifact"||((le=Ce.preview)==null?void 0:le.kind)==="dev_server")}))==null?void 0:ie.workItemId)??null:null},[L,j,Kt,t,Ne]),Ls=Kt||fr&&L===null&&j===null&&Ln===null,bn=v.useCallback(async V=>{var Ce,he,le,ye;if(!xe)return;const ie=(V==null?void 0:V.workItemId)??null;X({kind:"switch",variantId:ie??void 0});try{if(((Ce=V==null?void 0:V.preview)==null?void 0:Ce.kind)==="static_artifact"){if(_(!1),x(null),((he=V.refinement)==null?void 0:he.status)==="succeeded"){const De=V.preview.url.includes("?")?"&":"?";m(`${V.preview.url}${De}refinement=${encodeURIComponent(V.refinement.workItemId)}`)}else m(V.preview.url);p(De=>De+1);return}if(ie&&xe&&t.active&&t.projectContext.kind==="fresh"&&((le=t.projectContext.executionPlan)==null?void 0:le.mode)!=="vite_app"&&((ye=V==null?void 0:V.preview)==null?void 0:ye.kind)!=="dev_server"){_(!1),x(null),m(`/api/variants/${xe}/static/${ie}`),p(De=>De+1);return}const qe=V&&ie?e8({sessionId:xe,variant:V,projectContext:t.active?t.projectContext:null,routePath:ti}):null;if(qe){_(!1),x(null),m(qe),p(De=>De+1);return}Ee.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:ie,previewKind:V?q1(V):"none",hasPreview:!!(V!=null&&V.preview),hasPort:typeof(V==null?void 0:V.port)=="number",errorMessage:"No addressable dev-server preview URL"}),_(!1),x(null)}catch(qe){gn.warn("preview display failed",qe),Ee.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:ie,previewKind:V?q1(V):"none",hasPreview:!!(V!=null&&V.preview),hasPort:typeof(V==null?void 0:V.port)=="number",errorMessage:qe instanceof Error?qe.message:String(qe)}),_(!1),x(null)}finally{X(null)}},[xe,t,ti,p,m,_,x]),Cr=v.useRef(!1),ji=v.useRef(null),ni=v.useRef(0),ms=v.useCallback(()=>{if(ni.current++,y(!1),w(!1),!Cr.current)return;const V=ji.current;Cr.current=!1,ji.current=null;const ie=V?new URLSearchParams({sessionId:V.sessionId,variantId:V.variantId}):null,Ce=ie?`/api/variants/history/replay/stop?${ie.toString()}`:"/api/variants/history/replay/stop";fetch(Ce,{method:"POST"}).catch(he=>gn.warn("history replay stop failed",he))},[y,w]),Ge=v.useCallback(async V=>{if(xe){X({kind:"switch",variantId:V.workItemId});try{const ie=await fetch(`/api/variants/${xe}/preview-port`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variantId:V.workItemId})});if(!ie.ok){const Ce=await hi(ie);throw new Error(Ce.message??`Preview restoration failed (${ie.status})`)}}catch(ie){gn.warn("preview restoration failed",ie),Ee.capture("variants_panel.preview_display_failed",{sessionId:xe,variantId:V.workItemId,previewKind:"dev_server",hasPreview:!1,hasPort:!1,errorMessage:ie instanceof Error?ie.message:String(ie)})}finally{X(null)}}},[xe]),Nt=v.useCallback(V=>{var ye,qe,De,Xt,Sn;if(ps.current){ps.current=!1;return}const ie=qd(V),Ce=V.status==="pending"||V.status==="running"||JG(V);ms();const he=q1(V),le=Ne.find(Tr=>Tr.workItemId===L);Ee.capture("variants_panel.preview_requested",{sessionId:xe,fromVariantId:le==null?void 0:le.workItemId,toVariantId:V.workItemId,variantStatus:V.status,isPreviewReady:ie,isArmed:Ce,previewKind:he,hasPreview:!!V.preview,hasPort:typeof V.port=="number",viewEnabled:((qe=(ye=V.actions)==null?void 0:ye.view)==null?void 0:qe.enabled)??null,previewUnavailableReason:((De=V.previewUnavailable)==null?void 0:De.reason)??null}),I(V.workItemId),N(null),ie?(Un.current=V.workItemId,rt(!1),R(!0),bn(V)):(Un.current=null,rt(!1),m(null),_(!1),Ce&&Ee.capture("variants_panel.preview_armed",{sessionId:xe,fromVariantId:le==null?void 0:le.workItemId,toVariantId:V.workItemId,variantStatus:V.status,previewKind:he,hasPreview:!!V.preview,hasPort:typeof V.port=="number",viewEnabled:((Sn=(Xt=V.actions)==null?void 0:Xt.view)==null?void 0:Sn.enabled)??null}),YI(V)&&Ge(V)),Ee.capture("variants_panel.preview_switched",{sessionId:xe,fromVariantId:le==null?void 0:le.workItemId,toVariantId:V.workItemId,armed:Ce})},[L,xe,R,I,N,ms,Ge,bn,Ne,m,_]),Zt=t.active?`${t.sessionId}:${t.stage}`:"inactive",mn=v.useRef(!1);v.useEffect(()=>{if(r)return;let V=!1;return(async()=>{try{const ie=await fetch(`/api/variants/history${ln}`,{credentials:"same-origin"});if(!ie.ok)return;const Ce=await ie.json();if(V)return;const he=(Ce.variants??[]).filter(le=>{var ye,qe;return((ye=le.preview)==null?void 0:ye.kind)==="static"||((qe=le.serve)==null?void 0:qe.kind)==="static"||yu(le)});if(!mn.current&&!Ve.current&&Zt==="inactive"&&he.length>0&&he.every(le=>le.projectKind==="fresh")){const le=[...he].sort((ye,qe)=>new Date(qe.createdAt).getTime()-new Date(ye.createdAt).getTime()).find(ye=>!yu(ye));le&&(mn.current=!0,N({sessionId:le.sessionId,variantId:le.variantId,previewKind:"static"}),rt(!1),m(`/api/variants/history/${encodeURIComponent(le.sessionId)}/${encodeURIComponent(le.variantId)}/preview${ln}`))}if(tK(ct.current,he))return;ct.current=he,Fe(he)}catch(ie){gn.warn("Failed to load past variants",ie)}})(),()=>{V=!0}},[r,Zt,ln]);const hr=v.useCallback(()=>{Cr.current=!1,ji.current=null,y(!1),w(!1),N(null),I(null),rt(!0),_(!1),x(null),m(null),p(V=>V+1)},[I,y,w,p,m,x,N,_]),Ft=v.useCallback(V=>{if(ps.current){ps.current=!1;return}if(R(!0),N({sessionId:V.sessionId,variantId:V.variantId,previewKind:yu(V)?"dev_server":"static"}),I(null),rt(!1),yu(V)){const ie=++ni.current;Cr.current=!0,ji.current={sessionId:V.sessionId,variantId:V.variantId},y(!0),w(!0),(async()=>{X({kind:"switch"}),Ee.capture("variants_panel.history_replay_started",{sessionId:V.sessionId,variantId:V.variantId});const Ce=he=>Ee.capture("variants_panel.history_replay_failed",{sessionId:V.sessionId,variantId:V.variantId,...he});try{const he=await fetch(`/api/variants/history/${encodeURIComponent(V.sessionId)}/${encodeURIComponent(V.variantId)}/run${ln}`,{method:"POST"});if(ie!==ni.current)return;if(!he.ok){const{errorCode:le}=await hi(he);gn.warn(`history replay failed: HTTP ${he.status} ${le??""}`),Ce({httpStatus:he.status,errorCode:le}),hr();return}w(!1),_(!0),x(null),m(null),p(le=>le+1),Ee.capture("variants_panel.history_replay_ready",{sessionId:V.sessionId,variantId:V.variantId})}catch(he){if(ie!==ni.current)return;gn.warn("history replay failed",he),Ce({errorMessage:he instanceof Error?he.message:String(he)}),hr()}finally{X(null)}})();return}ms(),_(!1),x(null),m(`/api/variants/history/${encodeURIComponent(V.sessionId)}/${encodeURIComponent(V.variantId)}/preview${ln}`)},[hr,X,y,w,p,N,I,m,x,R,_,ms,ln]),un=v.useCallback(async()=>{ms();const V=()=>{R(!0),I(null),N(null),rt(!0),Un.current=null,_(!1),x(null),m(null),p(ie=>ie+1)};if(!xe){V();return}X({kind:"switch"});try{const ie=await fetch(`/api/variants/${xe}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})});if(!ie.ok){gn.warn(`switch to original failed: HTTP ${ie.status}`);return}V(),_(!0),Ee.capture("variants_panel.preview_switched",{sessionId:xe,fromVariantId:L,toVariantId:null,target:"original",armed:!1})}catch(ie){gn.warn("preview-port original switch failed",ie)}finally{X(null)}},[L,xe,I,N,p,m,x,R,_,ms]),kr=v.useCallback(async V=>{var Ce,he;const ie=((he=(Ce=V.actions)==null?void 0:Ce.commit)==null?void 0:he.enabled)??V.status==="succeeded";if(!(!xe||!ie)){Ee.capture("variants_panel.commit_clicked",{sessionId:xe,variantId:V.workItemId,variantLabel:V.label}),X({kind:"commit",variantId:V.workItemId});try{const le=await fetch(`/api/variants/${xe}/commit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:V.workItemId})});if(!le.ok){const{message:qe,errorCode:De}=await hi(le);gn.warn(`commit failed: HTTP ${le.status} ${De??""} ${qe??""}`),Ee.capture("variants_panel.commit_failed",{sessionId:xe,variantId:V.workItemId,httpStatus:le.status,errorCode:De??null,errorMessage:qe??null}),mt.error("Couldn't send direction",{description:qe??`The server rejected the request (HTTP ${le.status}). Try again, or pick a different direction.`});return}const ye=await le.json().catch(()=>null);Ee.capture("variants_panel.commit_succeeded",{sessionId:xe,variantId:V.workItemId,payloadKind:(ye==null?void 0:ye.payloadKind)??null,duplicate:(ye==null?void 0:ye.duplicate)??!1}),mt.success(`Sent "${V.label}" to your project`,{description:(ye==null?void 0:ye.payloadKind)==="project-created"?`Project created at ${(ye==null?void 0:ye.destinationPath)??"destination"}.`:"Direction diff applied to your working tree (uncommitted)."}),(ye==null?void 0:ye.payloadKind)!=="project-created"&&(m(null),_(!1),p(qe=>qe+1))}catch(le){gn.warn("commit failed",le),Ee.capture("variants_panel.commit_failed",{sessionId:xe,variantId:V.workItemId,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:le instanceof Error?le.message:String(le)}),mt.error("Couldn't send direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{X(null)}}},[xe,p,m,_]),Pr=v.useCallback(async(V,ie,Ce)=>{Ee.capture("variants_panel.deploy_clicked",{sessionId:V,variantId:ie,variantLabel:Ce});try{const he=await fetch(`/api/variants/${V}/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:ie,...n?{projectPath:n}:{}})});if(!he.ok){const{message:qe,errorCode:De}=await hi(he);return gn.warn(`deploy failed: HTTP ${he.status} ${De??""} ${qe??""}`),Ee.capture("variants_panel.deploy_failed",{sessionId:V,variantId:ie,httpStatus:he.status,errorCode:De??null,errorMessage:qe??null}),mt.error("Couldn't deploy this direction",{description:qe??`The server rejected the request (HTTP ${he.status}). Try again.`}),null}const le=await he.json().catch(()=>null),ye=le==null?void 0:le.shareUrl;return ye?(await navigator.clipboard.writeText(ye).catch(()=>{}),Ee.capture("variants_panel.deploy_succeeded",{sessionId:V,variantId:ie}),mt.success(`"${Ce}" is live — link copied`,{action:{label:"Open",onClick:()=>window.open(ye,"_blank","noopener")}}),ye):(mt.error("Couldn't deploy this direction",{description:"The deploy host returned an unexpected response."}),null)}catch(he){return gn.warn("deploy failed",he),Ee.capture("variants_panel.deploy_failed",{sessionId:V,variantId:ie,httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:he instanceof Error?he.message:String(he)}),mt.error("Couldn't deploy this direction",{description:"Network or server error. Check that the Rivet backend is reachable and try again."}),null}},[n]),Bn=v.useCallback(async V=>{if(!xe)return;const ie=J[V.workItemId];if(ie){await navigator.clipboard.writeText(ie).catch(()=>{}),mt.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(ie,"_blank","noopener")}});return}X({kind:"deploy",variantId:V.workItemId});try{const Ce=await Pr(xe,V.workItemId,V.label);Ce&&se(he=>({...he,[V.workItemId]:Ce}))}finally{X(null)}},[xe,J,Pr]),ri=v.useCallback(async()=>{if(!(!xe||Je.length===0)){if(vt){await navigator.clipboard.writeText(vt).catch(()=>{}),mt.success("Canvas link copied",{action:{label:"Open",onClick:()=>window.open(vt,"_blank","noopener")}});return}Ee.capture("variants_panel.deploy_clicked",{sessionId:xe,variantId:"canvas",variantLabel:"Canvas",variantCount:Je.length}),X({kind:"deploy-canvas"});try{const V=await fetch(`/api/variants/${xe}/canvas/deploy`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantIds:Je.map(ye=>ye.workItemId),...n?{projectPath:n}:{}})});if(!V.ok){const{message:ye,errorCode:qe}=await hi(V);gn.warn(`canvas deploy failed: HTTP ${V.status} ${qe??""} ${ye??""}`),Ee.capture("variants_panel.deploy_failed",{sessionId:xe,variantId:"canvas",httpStatus:V.status,errorCode:qe??null,errorMessage:ye??null,variantCount:Je.length}),mt.error("Couldn't share this canvas",{description:ye??`The server rejected the request (HTTP ${V.status}). Try again.`});return}const ie=await V.json().catch(()=>null),Ce=ie==null?void 0:ie.shareUrl;if(!Ce){mt.error("Couldn't share this canvas",{description:"The deploy host returned an unexpected response."});return}const he=Object.fromEntries(((ie==null?void 0:ie.variants)??[]).filter(ye=>typeof ye.variantId=="string"&&typeof ye.shareUrl=="string").map(ye=>[ye.variantId,ye.shareUrl])),le=Object.keys(he).length>0?{...J,...he}:J;le!==J&&se(le),await navigator.clipboard.writeText(Ce).catch(()=>{}),Se({key:o8(Je,le),shareUrl:Ce}),Ee.capture("variants_panel.deploy_succeeded",{sessionId:xe,variantId:"canvas",variantCount:Je.length}),mt.success("Canvas is live — link copied",{action:{label:"Open",onClick:()=>window.open(Ce,"_blank","noopener")}})}catch(V){gn.warn("canvas deploy failed",V),Ee.capture("variants_panel.deploy_failed",{sessionId:xe,variantId:"canvas",httpStatus:null,errorCode:"NETWORK_ERROR",errorMessage:V instanceof Error?V.message:String(V),variantCount:Je.length}),mt.error("Couldn't share this canvas",{description:"Network or server error. Check that the Rivet backend is reachable and try again."})}finally{X(null)}}},[vt,Je,J,n,xe]),Pc=v.useCallback(async V=>{const ie=`${V.sessionId}:${V.variantId}`,Ce=ce[ie];if(Ce){await navigator.clipboard.writeText(Ce).catch(()=>{}),mt.success("Share link copied",{action:{label:"Open",onClick:()=>window.open(Ce,"_blank","noopener")}});return}We(ie);try{const he=await Pr(V.sessionId,V.variantId,V.label);he&&ae(le=>({...le,[ie]:he}))}finally{We(null)}},[ce,Pr]),Tc=v.useCallback(async V=>{if(xe){Ee.capture("variants_panel.remove_clicked",{sessionId:xe,variantId:V.workItemId,variantLabelLength:V.label.length}),X({kind:"remove",variantId:V.workItemId});try{const ie=await fetch(`/api/variants/${xe}/${V.workItemId}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});if(!ie.ok){const{message:Ce}=await hi(ie);gn.warn(`remove failed: HTTP ${ie.status} ${Ce??""}`),mt.error("Couldn't remove direction",{description:Ce??`The server rejected the request (HTTP ${ie.status}). Try again.`});return}(V.workItemId===Ln||V.workItemId===L)&&(I(null),m(null),_(!1),p(Ce=>Ce+1))}catch(ie){gn.warn("remove failed",ie),mt.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{X(null)}}},[xe,L,Ln,I,m,_,p]),Ac=v.useCallback(async V=>{if(!wn){mt.error("Couldn't remove direction",{description:"No project path available."});return}Ee.capture("variants_panel.remove_past_clicked",{sessionId:V.sessionId,variantId:V.variantId});const ie=`${V.sessionId}:${V.variantId}`,Ce=he=>he.sessionId===V.sessionId&&he.variantId===V.variantId;X({kind:"remove",variantId:ie}),Fe(he=>he.filter(le=>!Ce(le))),j===ie&&(N(null),m(null),_(!1),p(he=>he+1));try{const he=await fetch(`/api/variants/history/${encodeURIComponent(V.sessionId)}/${encodeURIComponent(V.variantId)}/remove`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectPath:wn})});if(!he.ok){const{message:le}=await hi(he);Fe(ye=>ye.some(Ce)?ye:[...ye,V]),mt.error("Couldn't remove direction",{description:le??`The server rejected the request (HTTP ${he.status}). Try again.`})}}catch(he){gn.warn("remove past failed",he),Fe(le=>le.some(Ce)?le:[...le,V]),mt.error("Couldn't remove direction",{description:"Network or server error. Try again."})}finally{X(null)}},[wn,j,N,m,_,p]),Xf=v.useCallback(V=>{D(V)},[]),Fi=v.useCallback(V=>{if(!V.label||!V.run)return;const ie=V.rows.flatMap(he=>he.kind==="active"?[he.variant]:[]),Ce=V.rows.flatMap(he=>he.kind==="past"?[he.entry]:[]);ie.length===0&&Ce.length===0||D({kind:"run",label:V.label,variants:ie,entries:Ce})},[]),Qf=v.useCallback(async()=>{if(!(!H||Y)){oe(!0);try{if(H.kind==="active")await Tc(H.variant);else if(H.kind==="past")await Ac(H.entry);else{for(const V of H.variants)await Tc(V);for(const V of H.entries)await Ac(V)}}finally{oe(!1),D(null)}}},[H,Y,Tc,Ac]),[Ic,Q0]=v.useState(null),[Jf,jl]=v.useState(null),eh=v.useCallback(V=>{jl(V)},[]),th=v.useCallback(()=>{jl(null)},[]),J0=v.useCallback(async V=>{const ie=V.trim();if(ie)try{await navigator.clipboard.writeText(ie),mt.success("Copied")}catch{mt.error("Couldn't copy")}},[]),ev=v.useCallback(async(V,ie)=>{jl(null);const Ce=ie.trim();if(!Ce||V.kind==="original")return;if(V.kind==="active"){if(!xe||Ce===V.variant.label)return;Ee.capture("variants_panel.rename",{sessionId:xe,variantId:V.variant.workItemId,labelLength:Ce.length,past:!1});try{const ye=await fetch(`/api/variants/${xe}/${V.variant.workItemId}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Ce})});if(!ye.ok){const{message:qe}=await hi(ye);mt.error("Couldn't rename direction",{description:qe??`The server rejected the request (HTTP ${ye.status}). Try again.`})}}catch(ye){gn.warn("rename failed",ye),mt.error("Couldn't rename direction",{description:"Network or server error. Try again."})}return}const{entry:he}=V;if(Ce===he.label.trim())return;if(!wn){mt.error("Couldn't rename direction",{description:"No project path available."});return}Ee.capture("variants_panel.rename",{sessionId:he.sessionId,variantId:he.variantId,labelLength:Ce.length,past:!0});const le=ye=>ye.sessionId===he.sessionId&&ye.variantId===he.variantId;Fe(ye=>ye.map(qe=>le(qe)?{...qe,label:Ce}:qe));try{const ye=await fetch(`/api/variants/history/${encodeURIComponent(he.sessionId)}/${encodeURIComponent(he.variantId)}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({label:Ce,projectPath:wn})});if(!ye.ok){const{message:qe}=await hi(ye);Fe(De=>De.map(Xt=>le(Xt)?{...Xt,label:he.label}:Xt)),mt.error("Couldn't rename direction",{description:qe??`The server rejected the request (HTTP ${ye.status}). Try again.`})}}catch(ye){gn.warn("rename failed",ye),Fe(qe=>qe.map(De=>le(De)?{...De,label:he.label}:De)),mt.error("Couldn't rename direction",{description:"Network or server error. Try again."})}},[xe,wn]),[Yt,Rc]=v.useState(null),Mc=v.useCallback(V=>{Rc(V)},[]),nh=v.useCallback(()=>{Rc(null)},[]),Fl=v.useCallback(async(V,ie)=>{if(Rc(null),!V.label||!V.run)return;const Ce=V.label,he=ie.trim();if(!he||he===Ce)return;Ee.capture("variants_panel.rename_run",{runLabelLength:he.length});const le="requestId"in V.run?V.run.requestId:void 0,ye=le?V.key:KI({sessionId:V.run.sessionId,runLabel:he}),qe=ye!==V.key;let De=!1,Xt=!1;if(n!==null&&qe){const Ye=Dp(n);De=Ye.has(V.key),Xt=Ye.has(ye),De&&(Ye.add(ye),W1(n,Ye),Z())}const Sn=Ye=>{if(n===null||!qe)return;const kt=Dp(n);Ye?kt.delete(V.key):(De?kt.add(V.key):kt.delete(V.key),Xt?kt.add(ye):kt.delete(ye)),W1(n,kt),Z()},Tr=new Set(V.rows.flatMap(Ye=>Ye.kind==="past"?[`${Ye.entry.sessionId}:${Ye.entry.variantId}`]:[])),gs=Ye=>Tr.has(`${Ye.sessionId}:${Ye.variantId}`);Fe(Ye=>Ye.map(kt=>gs(kt)?{...kt,runLabel:he}:kt));const pr=()=>Fe(Ye=>Ye.map(kt=>gs(kt)?{...kt,runLabel:Ce}:kt));try{const Ye=await fetch("/api/variants/runs/rename",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:V.run.sessionId,...le?{requestId:le}:{},runLabel:Ce,label:he,...wn?{projectPath:wn}:{}})});if(Ye.ok)Sn(!0);else{const{message:kt}=await hi(Ye);pr(),Sn(!1),mt.error("Couldn't rename run",{description:kt??`The server rejected the request (HTTP ${Ye.status}). Try again.`})}}catch(Ye){gn.warn("run rename failed",Ye),pr(),Sn(!1),mt.error("Couldn't rename run",{description:"Network or server error. Try again."})}},[wn,n,Fe]);v.useEffect(()=>{if(Eo.current!==xe){const ie=Eo.current===null;if(Eo.current=xe,Un.current=null,Se(null),m(null),_(!1),x(null),R(),I(null),N(null),rt(!1),mn.current=!1,!ie)return}if(j||Kt||!Ln||t.active!==!0||Un.current===Ln)return;const V=Ne.find(ie=>ie.workItemId===Ln);V&&(Un.current=Ln,R(),bn(V))},[xe,j,Kt,Ln,t,Ne,bn,R,I,N,m,x,_]),v.useEffect(()=>{!O||!Kr||(Un.current=null,N(null),I(Kr.workItemId),rt(!1))},[Kr,O,xe,I,N]),v.useEffect(()=>{!O||Kr||Pa||N(null)},[Kr,O,Pa,xe,N,Lt]),v.useEffect(()=>{const V=F.trim().toLowerCase(),ie=[...Ne.map(ye=>({kind:"active",variant:ye})),...Lt.map(ye=>({kind:"past",entry:ye})),...fr?[{kind:"original"}]:[]],Ce=V?ie.filter(ye=>a8(ye,V)):ie,he=s8(Ce,xe).flatMap(ye=>ye.key!==""&&W.has(ye.key)?[]:ye.rows);if(he.length===0)return;const le=ye=>{if($W())return;if(ye.key==="Enter"){const pr=Ne.find(Ye=>Ye.workItemId===Ic);pr&&(ye.preventDefault(),Nt(pr));return}if(ye.key!=="ArrowUp"&&ye.key!=="ArrowDown")return;ye.preventDefault();const qe=L??Ln;let De=qe?`live:${qe}`:null;j?De=`past:${j}`:Ls&&(De=qI);const Xt=De?he.findIndex(pr=>c2(pr)===De):-1;let Sn;if(Xt===-1?Sn=ye.key==="ArrowDown"?0:he.length-1:ye.key==="ArrowDown"?Sn=Math.min(Xt+1,he.length-1):Sn=Math.max(Xt-1,0),Sn===Xt)return;const Tr=he[Sn];Tr.kind==="active"?Nt(Tr.variant):Tr.kind==="past"?Ft(Tr.entry):un();const gs=document.querySelector(`[data-variant-key="${c2(Tr)}"]`);gs instanceof HTMLElement&&gs.focus({preventScroll:!0})};return window.addEventListener("keydown",le),()=>window.removeEventListener("keydown",le)},[Ne,Lt,F,fr,W,xe,L,j,Ls,Ln,Ic,Nt,Ft,un]);const Oc=Ne.find(V=>V.workItemId===Ln)??null,Vl=j?Lt.find(V=>`${V.sessionId}:${V.variantId}`===j)??null:null,Aa=!!Vl,vs=t.active?t.artifacts??[]:[],Nn=[...(t.active?Ne:[]).map(V=>({kind:"active",variant:V})),...Lt.map(V=>({kind:"past",entry:V})),...fr?[{kind:"original"}]:[]],rh=F.trim().toLowerCase(),Lc=rh?Nn.filter(V=>a8(V,rh)):Nn,tv=s8(Lc,xe),$l=new Set(Ne.map(V=>V.requestId).filter(Boolean)),Ia=e.filter(V=>!$l.has(V.requestId)),si=Ia.length>0,ko=r&&!si&&Nn.length===0;return E.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[Nn.length>0?E.jsx("div",{className:"pt-2 pb-1 pl-3 pr-5",children:E.jsxs("div",{className:"relative",children:[E.jsx(_B,{size:13,className:"text-content-muted pointer-events-none absolute top-1/2 left-2 -translate-y-1/2"}),E.jsx("input",{type:"text",value:F,onChange:V=>G(V.target.value),placeholder:"Search directions…","aria-label":"Search directions",className:"border-main-border bg-main-input/40 text-content placeholder:text-content-muted focus:ring-content-muted/40 w-full rounded-md border py-1.5 pr-2 pl-7 text-xs focus:ring-1 focus:outline-none"})]})}):null,E.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2 [scrollbar-gutter:stable]",children:[si?E.jsx(yK,{groups:Ia}):null,ko?E.jsx(_K,{}):null,t.active&&Nn.length===0&&!si&&!ko?E.jsx(xK,{}):null,!t.active&&!si&&!ko&&Lt.length===0&&!fr?E.jsx(wK,{isMCPSession:d,mcpEditor:f}):null,Nn.length>0&&Lc.length===0?E.jsxs("p",{className:"text-content-muted px-1 py-6 text-center text-xs",children:["No directions match “",F.trim(),"”."]}):null,Lc.length>0?E.jsx(lK,{groups:tv,collapsedRuns:W,onToggleRun:q,activeVariantId:L??Ln,activePastKey:j,isOriginalSelected:Ls,busy:z,editingKey:Jf,onSelectActive:Nt,onSelectPast:Ft,onSelectOriginal:un,onActivePointerDown:Co,onPastPointerDown:er,onHover:Q0,onRemove:V=>Xf({kind:"active",variant:V}),onRemovePast:V=>Xf({kind:"past",entry:V}),onStartRename:eh,onCommitRename:ev,onCancelRename:th,editingRunKey:Yt,onStartRunRename:Mc,onCommitRunRename:Fl,onCancelRunRename:nh,onRemoveRun:Fi,onCopyVariantContext:J0,activeSessionId:t.active?t.sessionId:null,projectPath:wn}):null,t.active&&c?E.jsx(pK,{artifacts:vs}):null]}),Aa&&Vl?E.jsx(dK,{entry:Vl,deploying:$e===j,deployedUrl:j?ce[j]??null:null,onDeploy:Pc,isDeployDisabled:!i}):null,!Aa&&t.active?E.jsx(gK,{selectedVariant:Oc,busy:z,onSend:kr,onDeploy:Bn,onDeployCanvas:ri,canDeploy:i&&(an==null?void 0:an.kind)==="fresh",canDeployCanvas:i&&a&&(an==null?void 0:an.kind)==="fresh",canSendToAgent:u,canvasVariantCount:Je.length,canvasDeployedUrl:vt,deployedUrl:Oc?J[Oc.workItemId]??null:null}):null,E.jsx(sK,{target:H,isConfirming:Y,onCancel:()=>D(null),onConfirm:Qf})]})},rK=t=>t.kind==="active"?t.variant.label.trim()||"this direction":t.kind==="run"?t.label.trim()||"this run":t.entry.label.trim()||"this direction",sK=({target:t,isConfirming:e,onCancel:n,onConfirm:r})=>{if(!t)return null;const s=rK(t),i=t.kind==="run",a=i?t.variants.length+t.entries.length:0,u=i?"Remove run":"Remove direction";return E.jsx(Wx,{open:!0,onOpenChange:c=>{!c&&!e&&n()},children:E.jsxs(qx,{children:[E.jsx(Gx,{className:"z-max fixed inset-0 bg-black/40"}),E.jsx(Kx,{className:"z-max border-main-border bg-main font-main fixed top-1/2 left-1/2 w-[360px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-2xl outline-none",children:E.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[E.jsx(Zx,{className:"text-content text-base font-medium",children:i?"Remove run?":"Remove direction?"}),E.jsx(Yx,{className:"text-content-subtle text-sm leading-5",children:i?`This removes all ${a} directions in “${s}”.`:`This removes “${s}” from the directions list.`}),E.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[E.jsx("button",{type:"button",onClick:n,disabled:e,className:"text-content-subtle hover:bg-main-hover hover:text-content rounded-md px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),E.jsx("button",{type:"button","aria-label":"Confirm remove direction",onClick:r,disabled:e,className:"rounded-md bg-red-500/15 px-3 py-1.5 text-sm font-medium text-red-200 transition-colors hover:bg-red-500/25 disabled:cursor-not-allowed disabled:opacity-50",children:e?"Removing...":u})]})]})})]})})},c2=t=>t.kind==="active"?`live:${t.variant.workItemId}`:t.kind==="past"?`past:${t.entry.sessionId}:${t.entry.variantId}`:qI,a8=(t,e)=>t.kind==="active"?B1(e,t.variant.label,t.variant.runLabel):t.kind==="past"?B1(e,t.entry.label,t.entry.runLabel,t.entry.brief):B1(e,vw,GI),iK=t=>t.length<=r8?t:`${t.slice(0,r8-1)}…`,oK=(t,e)=>t.kind==="active"?e?`${e}:${t.variant.workItemId}`:null:t.kind==="past"?`${t.entry.sessionId}:${t.entry.variantId}`:null,aK=t=>{var i,a;const e=[t.label.trim(),(i=t.description)==null?void 0:i.trim()].filter(u=>!!u).join(`
|
|
112
|
-
`);if(!t.reference)return e;const n=((a=t.projectPath)==null?void 0:a.trim())??"",r=n?` --project '${n.replace(/'/g,"'\\''")}'`:"",s=[`Rivet variant: ${t.reference}`,"To inspect the full variant context, run:",`rivet variants get ${t.reference}${r}`].join(`
|
|
113
|
-
`);return e?`${e}
|
|
114
|
-
|
|
115
|
-
${s}`:s},lK=({groups:t,collapsedRuns:e,onToggleRun:n,activeVariantId:r,activePastKey:s,isOriginalSelected:i,busy:a,editingKey:u,onSelectActive:c,onSelectPast:d,onSelectOriginal:f,onActivePointerDown:p,onPastPointerDown:m,onHover:_,onRemove:x,onRemovePast:y,onStartRename:w,onCommitRename:b,onCancelRename:C,editingRunKey:P,onStartRunRename:T,onCommitRunRename:A,onCancelRunRename:R,onRemoveRun:L,onCopyVariantContext:I,activeSessionId:O,projectPath:N})=>{const j=v.useRef(null),{activeIndex:F,itemRects:G,sessionRef:Q,handlers:Z,registerItem:W}=HA(j),q=F!==null?G[F]:null,z=D=>D.kind==="active"?D.variant.workItemId===r:D.kind==="past"?`${D.entry.sessionId}:${D.entry.variantId}`===s:i,X=(D,Y)=>{const oe=c2(D);return E.jsx(cK,{rowKey:oe,row:D,index:Y,isSelected:z(D),isEditing:u===oe,busy:a,registerItem:W,onSelectActive:c,onSelectPast:d,onSelectOriginal:f,onActivePointerDown:p,onPastPointerDown:m,onHover:_,onRemove:x,onRemovePast:y,onStartRename:w,onCommitRename:b,onCancelRename:C,onCopyVariantContext:I,activeSessionId:O,projectPath:N},oe)};let H=0;return E.jsxs("div",{ref:j,className:"relative",onMouseEnter:Z.onMouseEnter,onMouseMove:Z.onMouseMove,onMouseLeave:Z.onMouseLeave,children:[E.jsx(Qs,{children:q&&E.jsx(po.div,{className:"bg-hover pointer-events-none absolute z-0 rounded-md",initial:{opacity:0,top:q.top,left:q.left,width:q.width,height:q.height},animate:{opacity:1,top:q.top,left:q.left,width:q.width,height:q.height},exit:{opacity:0,transition:{duration:.06}},transition:{...ff.fast,opacity:{duration:.08}}},Q.current)}),E.jsx("ul",{className:"relative flex flex-col gap-2",children:t.map(D=>{if(D.key==="")return D.rows.map(se=>X(se,H++));const Y=e.has(D.key),oe=Y?null:D.rows.map(se=>X(se,H++)),J=D.label;return E.jsx(uK,{label:J??vw,collapsed:Y,onToggle:()=>n(D.key),directionCount:D.rows.length,isEditing:J!==null&&P===D.key,onStartRename:J!==null?()=>T(D.key):void 0,onCommitRename:J!==null?se=>A(D,se):void 0,onCancelRename:R,onRemove:J!==null?()=>L(D):void 0,children:oe},D.key)})})]})},uK=({label:t,collapsed:e,directionCount:n,onToggle:r,isEditing:s=!1,onStartRename:i,onCommitRename:a,onCancelRename:u,onRemove:c,children:d})=>{const f=Ff(),p=e?E.jsx(yB,{size:13,weight:"fill",className:"shrink-0 text-sky-400"}):E.jsx(gB,{size:13,weight:"fill",className:"shrink-0 text-sky-400"});return s&&a&&u?E.jsxs("li",{className:"overflow-hidden rounded-lg bg-white/[0.012]",children:[E.jsxs("div",{"data-hover-dead-zone":"",className:"bg-main-input flex w-full items-center gap-2 px-3 py-2",children:[p,E.jsx("span",{className:"min-w-0 flex-1",children:E.jsx(XI,{initial:t,onCommit:a,onCancel:u})})]}),E.jsx(Qs,{initial:!1,children:!e&&E.jsx(po.ul,{className:"overflow-hidden",children:d},"body")})]}):E.jsxs("li",{className:"overflow-hidden rounded-lg bg-white/[0.012]",children:[E.jsxs("div",{"data-hover-dead-zone":"",className:"group relative",children:[E.jsxs("button",{type:"button",onClick:()=>{f==null||f.capture("variants_panel.folder_toggled",{isCollapsed:!e,directionCount:n}),r()},"aria-expanded":!e,"aria-label":`${e?"Expand":"Collapse"} ${t} directions`,className:"focus-visible:ring-content-muted/40 flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-white/[0.03] focus:outline-none focus-visible:ring-1 focus-visible:ring-inset",children:[p,E.jsx("span",{className:"text-content min-w-0 flex-1 truncate text-sm font-medium",children:t})]}),(i||c)&&E.jsxs("div",{className:cr("absolute top-1.5 right-2 flex items-center gap-0.5 transition-opacity duration-150","pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100"),children:[i&&E.jsx(Ys,{label:"Rename",children:E.jsx("button",{type:"button","aria-label":`Rename ${t} run`,onClick:m=>{m.stopPropagation(),i()},onPointerDown:m=>m.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:E.jsx(gA,{size:13,weight:"bold"})})}),c&&E.jsx(Ys,{label:"Remove",children:E.jsx("button",{type:"button","aria-label":`Remove ${t} run`,onClick:m=>{m.stopPropagation(),c()},onPointerDown:m=>m.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 ml-1 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:E.jsx(EA,{size:13,weight:"bold"})})})]})]}),E.jsx(Qs,{initial:!1,children:!e&&E.jsx(po.ul,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:KG,ease:GG},className:"overflow-hidden",children:d},"body")})]})},cK=({rowKey:t,row:e,index:n,isSelected:r,isEditing:s,busy:i,registerItem:a,onSelectActive:u,onSelectPast:c,onSelectOriginal:d,onActivePointerDown:f,onPastPointerDown:p,onHover:m,onRemove:_,onRemovePast:x,onStartRename:y,onCommitRename:w,onCancelRename:b,onCopyVariantContext:C,activeSessionId:P,projectPath:T})=>{var Y,oe;const A=v.useRef(null);mW(a,n,A);const R=e.kind==="active",L=e.kind==="original",I=e.kind==="active"?e.variant:null,O=e.kind==="past"?e.entry:null,N=R?I.status==="succeeded":!0,j=R?qd(I):!0,F=R&&(I.status==="pending"||I.status==="running"),G=R&&I.status==="failed",Q=R&&I.status==="cancelled",Z=R&&(i==null?void 0:i.kind)==="remove"&&i.variantId===I.workItemId,W=R&&(((Y=I.refinement)==null?void 0:Y.status)==="pending"||((oe=I.refinement)==null?void 0:oe.status)==="running");let q=vw;R?q=I.label||`Direction ${n+1}`:O&&(q=O.label.trim()||"Untitled direction");let z=GI;R?z=I.description:O&&(z=O.brief);const X=z?iK(z):null,H=oK(e,P),D=H?"Copy variant reference":"Copy description";return s?E.jsx("li",{ref:A,"data-proximity-index":n,className:"group relative z-10",children:E.jsx("div",{className:"bg-main-input flex w-full items-start gap-2 rounded-md py-2 pr-3 pl-[33px]",children:E.jsxs("span",{className:"min-w-0 flex-1",children:[E.jsx(XI,{initial:q,onCommit:J=>w(e,J),onCancel:b}),X&&E.jsx("span",{className:"text-content-muted mt-1 line-clamp-2 block text-xs leading-snug",children:X})]})})}):E.jsxs("li",{ref:A,"data-proximity-index":n,className:"group relative z-10",children:[E.jsx("div",{role:"button",tabIndex:0,"data-variant-id":R?I.workItemId:void 0,"data-variant-key":t,onClick:()=>{const J=window.getSelection();J&&!J.isCollapsed||(e.kind==="active"?u(e.variant):e.kind==="past"?c(e.entry):d())},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.stopPropagation(),e.kind==="active"?u(e.variant):e.kind==="past"?c(e.entry):d())},onPointerDown:J=>{e.kind==="active"?j&&f(e.variant.workItemId,J):e.kind==="past"&&p(e.entry,J)},"aria-pressed":r,"aria-disabled":R?!1:void 0,"aria-busy":F||W,onMouseEnter:R?()=>m(I.workItemId):void 0,onMouseLeave:R?()=>m(null):void 0,className:cr("flex w-full items-start gap-2 rounded-md py-2 pr-3 pl-[33px] text-left transition-colors focus:outline-none",r&&"bg-main-input",j&&"cursor-grab active:cursor-grabbing",!j&&"cursor-pointer"),style:j?{touchAction:"none"}:void 0,children:E.jsxs("span",{className:"min-w-0 flex-1",children:[E.jsxs("span",{className:"flex items-center gap-2",children:[(F||W)&&E.jsx(tw,{className:"text-content-muted shrink-0 text-sm","data-testid":W&&!F?"variant-refining":void 0}),E.jsx(Ys,{label:"Double-click to rename",disabled:L,children:E.jsx("span",{onDoubleClick:J=>{J.stopPropagation(),L||y(t)},className:cr("min-w-0 flex-1 truncate text-sm font-medium select-text",L?"cursor-default":"cursor-text",N||r?"text-content":"text-content-muted"),children:q})}),G&&E.jsx(Ys,{label:I.errorMessage??I.errorCode??"Failed",disabled:!I.errorMessage&&!I.errorCode,children:E.jsx("span",{className:"shrink-0",children:E.jsx(l8,{label:"Failed"})})}),Q&&E.jsx(l8,{label:"Cancelled"})]}),X&&E.jsx("span",{className:"text-content-muted mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug select-text",children:X})]})}),E.jsxs("div",{className:cr("absolute top-1.5 right-2 flex items-center gap-0.5 transition-opacity duration-150","pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100"),children:[z||H?E.jsx(Ys,{label:D,children:E.jsx("button",{type:"button","aria-label":D,onClick:J=>{J.stopPropagation(),C(aK({label:q,description:z,reference:H,projectPath:T}))},onPointerDown:J=>J.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:E.jsx(df,{size:13,weight:"bold"})})}):null,!L&&E.jsx(Ys,{label:"Rename",children:E.jsx("button",{type:"button","aria-label":"Rename direction",onClick:J=>{J.stopPropagation(),y(t)},onPointerDown:J=>J.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1",children:E.jsx(gA,{size:13,weight:"bold"})})}),!L&&E.jsx(Ys,{label:"Remove",children:E.jsx("button",{type:"button","data-variant-remove-id":e.kind==="active"?e.variant.workItemId:void 0,"aria-label":"Remove direction",disabled:Z,onClick:J=>{J.stopPropagation(),e.kind==="active"?_(e.variant):x(e.entry)},onPointerDown:J=>J.stopPropagation(),className:"text-content-muted hover:bg-main-hover hover:text-content focus-visible:ring-content-muted/40 ml-1 flex h-6 w-6 items-center justify-center rounded focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",children:E.jsx(EA,{size:13,weight:"bold"})})})]})]})},XI=({initial:t,onCommit:e,onCancel:n})=>{const[r,s]=v.useState(t),i=v.useRef(!1),a=v.useCallback(c=>{c&&(c.focus(),c.select())},[]),u=c=>{i.current||(i.current=!0,c?e(r):n())};return E.jsx("input",{ref:a,type:"text",value:r,maxLength:120,"aria-label":"Rename direction",onChange:c=>s(c.target.value),onKeyDown:c=>{c.stopPropagation(),c.key==="Enter"?(c.preventDefault(),u(!0)):c.key==="Escape"&&(c.preventDefault(),u(!1))},onBlur:()=>u(!0),onClick:c=>c.stopPropagation(),onPointerDown:c=>c.stopPropagation(),className:"border-content-muted/40 bg-main text-content focus:ring-content-muted/50 w-full rounded border px-1.5 py-0.5 text-sm font-medium focus:ring-1 focus:outline-none"})},l8=({label:t})=>E.jsx("span",{className:"bg-main-input text-content-muted shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-medium tracking-wide uppercase",children:t}),dK=({entry:t,deploying:e,deployedUrl:n,onDeploy:r,isDeployDisabled:s=!1})=>{const a=e?"Deploying…":n?"Copy link":"Share";return E.jsxs("div",{className:"border-main-border bg-main-light flex shrink-0 items-center justify-between gap-3 border-t px-3 py-4",children:[E.jsxs("div",{className:"min-w-0",children:[E.jsx("div",{className:"text-content truncate text-sm font-medium",children:t.label.trim()||"Untitled direction"}),n?E.jsx("div",{className:"text-content-muted text-[11px]",children:"Deployed — share link ready"}):null]}),E.jsxs("button",{type:"button",onClick:()=>r(t),disabled:e||s,title:n?`Copy share link (${n})`:"Deploy this direction and get a public link to share",className:"border-main-border text-content hover:bg-main-input flex shrink-0 items-center gap-1 rounded-md border px-2 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:[n&&!e?E.jsx(df,{size:12,weight:"bold"}):null,a]})]})},fK={agent_browser:"Browser extracted",cache:"Cached",static:"Bundled catalog",manual:"Manual"},hK={design_context:"DESIGN.md",source_context:"Source",qa_report:"QA",asset:"Asset"},pK=({artifacts:t})=>{const[e,n]=v.useState(null),r=v.useMemo(()=>e&&t.some(i=>i.id===e)?e:null,[t,e]);if(t.length===0)return null;const s=i=>{n(a=>a===i?null:i)};return E.jsxs("section",{"aria-label":"Directions session artifacts",className:"mt-4",children:[E.jsx("div",{className:"flex shrink-0 items-center px-3 py-2",children:E.jsx("span",{className:"text-content truncate text-sm font-medium",children:"Artifacts"})}),E.jsx("ul",{className:"mt-2 space-y-1 px-1",children:t.map(i=>E.jsx(mK,{artifact:i,isExpanded:i.id===r,onToggle:()=>s(i.id)},i.id))})]})},mK=({artifact:t,isExpanded:e,onToggle:n})=>{const r=hK[t.kind],s=t.source?fK[t.source]:null,i=[t.kind==="design_context"?null:s,t.summary].filter(Boolean).join(" · "),a=t.kind==="design_context"&&!!t.viewUrl,u=`${e?"Hide":"View"} ${r} artifact${t.label?`: ${t.label}`:""}`;return a?E.jsx("li",{className:"border-main-border rounded-md border",children:E.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-xs",children:[E.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"border-content-muted/30 bg-main-input text-content-muted shrink-0 rounded-full border px-2 py-0.5 text-[9px] font-semibold tracking-wide uppercase",children:r}),E.jsx("span",{className:"text-content truncate text-xs font-medium",children:t.label})]}),i?E.jsx("span",{className:"text-content-muted mt-0.5 truncate text-[11px]",children:i}):null]}),E.jsx("a",{href:t.viewUrl,target:"_blank",rel:"noreferrer",onClick:()=>{Ee.capture("visual_editor_design_context_opened",{context_kind:"design_system",artifact_source:t.source})},"aria-label":`Open ${r} artifact${t.label?`: ${t.label}`:""}`,className:"text-content-muted hover:bg-main-input hover:text-content focus-visible:ring-content-muted/40 shrink-0 rounded p-1 transition-colors focus:outline-none focus-visible:ring-1",children:E.jsx(hB,{className:"h-3.5 w-3.5",weight:"bold"})})]})}):E.jsxs("li",{className:"border-main-border rounded-md border",children:[E.jsxs("button",{type:"button",onClick:n,"aria-expanded":e,"aria-label":u,className:"hover:bg-main-input flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-xs transition-colors",children:[E.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"text-content-muted text-[10px] font-semibold tracking-wide uppercase",children:r}),E.jsx("span",{className:"text-content truncate text-xs font-medium",children:t.label})]}),i?E.jsx("span",{className:"text-content-muted mt-0.5 truncate text-[11px]",children:i}):null]}),E.jsx("span",{className:"text-content-muted shrink-0 text-[11px]",children:e?"Hide":"View"})]}),e?E.jsx("div",{className:"border-main-border bg-main-light border-t px-3 py-2",children:E.jsx(vK,{artifact:t})}):null]})},vK=({artifact:t})=>E.jsxs("div",{className:"text-content-muted space-y-1 text-[11px]",children:[t.summary?E.jsx("p",{children:t.summary}):null,t.path?E.jsxs("p",{children:["Stored at ",t.path]}):null,!t.summary&&!t.path?E.jsx("p",{children:"No inline content available for this artifact."}):null]}),gK=({selectedVariant:t,busy:e,onSend:n,onDeploy:r,onDeployCanvas:s,canDeploy:i,canDeployCanvas:a,canSendToAgent:u,canvasVariantCount:c,canvasDeployedUrl:d,deployedUrl:f})=>{var L,I,O,N;const p=t?((I=(L=t.actions)==null?void 0:L.commit)==null?void 0:I.enabled)??t.status==="succeeded":!1,m=p&&e===null,_=(e==null?void 0:e.kind)==="commit"&&e.variantId===(t==null?void 0:t.workItemId),x=(e==null?void 0:e.kind)==="deploy"&&e.variantId===(t==null?void 0:t.workItemId),y=(e==null?void 0:e.kind)==="deploy-canvas",w=!i||!p||e!==null,b=a&&c>0,P=x?"Deploying…":f?"Copy link":"Share",A=y?"Sharing…":d?"Copy canvas link":"Share canvas",R=_?"Applying…":"Apply to project";return E.jsxs("div",{className:"border-main-border bg-main-light flex shrink-0 items-center justify-between gap-3 border-t px-3 py-4",children:[E.jsx("div",{className:"min-w-0",children:t?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"text-content truncate text-sm font-medium",children:t.label.trim()||"Untitled direction"}),f?E.jsx("div",{className:"text-content-muted text-[11px]",children:"Deployed — share link ready"}):null]}):null}),E.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[E.jsx(RI,{primaryLabel:P,primaryIcon:f&&!x?df:void 0,primaryAction:()=>{t&&r(t)},isDisabled:w,isDropdownDisabled:e!==null,isLoading:x,loadingLabel:"Deploying…",dropdownAriaLabel:"More share actions",dropdownItems:b?[{label:A,icon:d&&!y?df:void 0,onClick:s,isDisabled:e!==null}]:[]}),u?E.jsx("button",{type:"button",onClick:()=>{t&&n(t)},disabled:!m,title:(N=(O=t==null?void 0:t.actions)==null?void 0:O.commit)==null?void 0:N.reason,className:"bg-secondary text-secondary-foreground hover:bg-accent rounded-md px-2 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:R}):null]})]})},QI=()=>E.jsx("div",{"data-testid":"direction-skeleton-row","aria-hidden":"true",className:"flex w-full items-start rounded-md px-3 py-2",children:E.jsxs("span",{className:"min-w-0 flex-1",children:[E.jsxs("span",{className:"flex items-center gap-2",children:[E.jsx(tw,{className:"text-content-muted shrink-0 text-sm"}),E.jsx("span",{className:"bg-muted-foreground/15 h-3.5 w-28 animate-pulse rounded"})]}),E.jsx("span",{className:"mt-1.5 flex",children:E.jsx("span",{className:"bg-muted-foreground/10 h-2.5 w-full max-w-[14rem] animate-pulse rounded"})})]})}),yK=({groups:t})=>E.jsx("div",{className:"space-y-0.5",children:t.flatMap(e=>Array.from({length:Math.max(1,e.count)}).map((n,r)=>E.jsx(QI,{},`${e.requestId}-${r}`)))}),_K=()=>E.jsx("div",{"data-testid":"direction-boot-skeletons",className:"space-y-0.5",children:Array.from({length:3}).map((t,e)=>E.jsx(QI,{},e))}),xK=()=>E.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[E.jsx("div",{className:"text-content text-sm",children:"No directions yet"}),E.jsx("div",{className:"text-content-muted text-xs",children:"They’ll appear here as they generate."})]}),u8="Try different ways to create a dropdown that feels fluid and dynamic",wK=({isMCPSession:t=!1,mcpEditor:e=null})=>{const[n,r]=v.useState(!1),s=zW(e),i=t?s:"your coding agent",a=()=>{navigator.clipboard.writeText(u8).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})};return E.jsxs("div",{className:"flex flex-col items-start gap-3 px-2 py-2",children:[E.jsx("p",{className:"text-content text-sm font-medium",children:"Create your first direction"}),E.jsxs("p",{className:"text-content-muted text-xs",children:["Use ",i," to generate directions."]}),E.jsxs("div",{className:"w-full",children:[E.jsx("p",{className:"text-content-muted mb-2 text-xs",children:"Here's a sample prompt to use:"}),E.jsxs("div",{className:"border-main-border bg-main-input relative rounded-md border px-3 py-2.5 pr-8",children:[E.jsxs("p",{className:"text-content-muted text-xs leading-snug",children:["“",u8,"”"]}),E.jsx("button",{type:"button",onClick:a,className:"text-content-muted hover:bg-main-border hover:text-content absolute top-2 right-2 rounded p-0.5 transition-colors",title:"Copy to clipboard",children:n?E.jsx(cA,{className:"h-3.5 w-3.5 text-emerald-500",weight:"bold"}):E.jsx(df,{className:"h-3.5 w-3.5",weight:"bold"})})]})]})]})},bK=({onClose:t})=>{const e=tt(ZA);return t?E.jsxs("div",{className:"z-10 flex flex-shrink-0 items-center justify-between gap-2 border-b border-main-border bg-main-light px-2.5 py-2.5",children:[e?E.jsx("span",{className:"text-content min-w-0 truncate text-sm font-medium",title:e,children:e}):E.jsx("span",{}),E.jsx(Ys,{label:"Close panel",side:"bottom",children:E.jsx("button",{onClick:t,className:"flex h-6 w-6 flex-shrink-0 items-center justify-center rounded p-1 text-content-subtle transition-colors hover:bg-main-input hover:text-content",children:E.jsx(xB,{className:"h-4 w-4",weight:"bold"})})})]}):null},SK='[data-menu-item]:not([disabled]):not([aria-disabled="true"])',EK=({itemSelector:t=SK,loop:e=!1}={})=>{const n=v.useRef(null),r=v.useRef(null),s=v.useCallback(a=>{var u;n.current=a,a?r.current=VW():((u=r.current)==null||u.call(r),r.current=null)},[]),i=v.useCallback(a=>{var x;const{key:u}=a;if(u!=="ArrowDown"&&u!=="ArrowUp"&&u!=="Home"&&u!=="End")return;const c=n.current;if(!c)return;const d=Array.from(c.querySelectorAll(t));if(d.length===0)return;a.preventDefault(),a.stopPropagation();const f=d.indexOf(document.activeElement),p=d.length-1,m=y=>{if(f===-1)return y===1?0:p;const w=f+y;return e?(w+d.length)%d.length:Math.min(Math.max(w,0),p)};let _;u==="Home"?_=0:u==="End"?_=p:u==="ArrowDown"?_=m(1):_=m(-1),(x=d[_])==null||x.focus()},[t,e]);return{containerRef:s,onKeyDown:i}},c8="/assets/arena-Db0j1set.png",CK=Os("useIntegrations"),G1=["integrations"],kK="rivet:connect-result",PK=t=>typeof t=="object"&&t!==null&&t.type===kK,TK=st(null),d8=async()=>{const t=await fetch("/api/integrations");if(!t.ok)throw new Error(`Failed to load integrations (${t.status})`);return(await t.json()).integrations??[]},AK=()=>{const t=x6(),[e,n]=R3(TK),r=ky({queryKey:G1,queryFn:d8,staleTime:1e4}),s=v.useCallback(async()=>(await t.invalidateQueries({queryKey:G1,refetchType:"none"}),t.fetchQuery({queryKey:G1,queryFn:d8})),[t]),i=v.useCallback(async u=>{const c=window.open("","_blank","width=560,height=720");if(!c)throw new Error("Popup blocked. Allow popups to connect.");n(u);try{const d=await fetch(`/api/integrations/${u}/connect`,{method:"POST"}),f=await d.json().catch(()=>({}));if(!d.ok||!f.authUrl)throw c.close(),new Error(f.error||`Could not connect ${u}`);return c.location.href=f.authUrl,await new Promise(p=>{let m=!1,_=null;const x=async(w,b=!1)=>{if(!m){m=!0,window.removeEventListener("message",y),_&&clearInterval(_);try{const P=(await s()).some(T=>T.provider===u&&T.status==="connected");p(b&&P?"connected":w)}catch{p(w)}}},y=w=>{if(PK(w.data)&&w.data.provider===u){if(w.data.status==="error"){CK.warn(`Connect failed for ${u}:`,w.data.message),x("failed");return}x("connected")}};window.addEventListener("message",y),_=setInterval(()=>{c.closed&&x("closed",!0)},500)})}finally{n(null)}},[s,n]),a=v.useCallback(async u=>{n(u);try{const c=await fetch(`/api/integrations/${u}`,{method:"DELETE"});if(!c.ok){const d=await c.json().catch(()=>({}));throw new Error(d.error||`Could not disconnect ${u}`)}await s()}finally{n(null)}},[s,n]);return{integrations:r.data??[],isLoading:r.isPending,error:r.error instanceof Error?r.error.message:null,pendingProvider:e,connect:i,disconnect:a,refetch:s}},$u=({onClick:t,title:e,shortcut:n,children:r,disabled:s=!1,className:i="",type:a="button","data-cy":u})=>{const c=E.jsx("button",{onClick:t,disabled:s,className:i,type:a,"data-cy":u,children:r});return e?E.jsx(mw,{content:E.jsxs("div",{className:"flex flex-row items-center gap-2",children:[E.jsx("span",{children:e}),n?E.jsx("span",{className:"rounded bg-white/15 px-1.5 py-0.5 text-[11px]",children:n}):null]}),children:c}):c},Ya=({action:t,outcome:e,provider:n,entryPoint:r,durationMs:s,failureReason:i})=>({event:`visual_editor_reference_${t==="connect"?"connection":"disconnection"}_${e}`,properties:{provider:n,entry_point:r,...s!==void 0?{duration_ms:s}:{},...i?{failure_reason:i}:{}}}),f8=Os("ConnectorsModal"),IK=()=>E.jsx("svg",{viewBox:"0 0 24 24",className:"h-6 w-6","aria-hidden":"true",children:E.jsx("path",{fill:"currentColor",d:"M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.781c0-1.669.967-2.915 2.171-2.915 1.024 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.132 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.137.893 2.739.098.119.112.223.083.344-.091.379-.293 1.194-.333 1.361-.052.22-.174.266-.401.16-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.36-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146A12.004 12.004 0 0 0 12 24c6.627 0 12-5.373 12-12C24 5.372 18.627 0 12 0z"})}),RK=()=>E.jsx("span",{"aria-hidden":"true",className:"h-6 w-6 bg-[#b1b1b1]",style:{WebkitMaskImage:`url(${c8})`,maskImage:`url(${c8})`,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"}}),MK=[{provider:"pinterest",name:"Pinterest",description:"Pull boards and pins in as visual references.",tileClassName:"bg-[#e60023] text-white",icon:E.jsx(IK,{})},{provider:"arena",name:"Are.na",description:"Connect channels of collected blocks and links.",tileClassName:"bg-[#18181b] text-content",icon:E.jsx(RK,{})}],OK=({meta:t,integration:e,isPending:n,isHighlighted:r,onConnect:s,onDisconnect:i})=>{const a=(e==null?void 0:e.status)==="connected",u=e!=null&&e.externalUsername?`@${e.externalUsername}`:null;return E.jsxs("article",{className:`bg-main-light flex flex-col rounded-xl p-[18px] ${r?"ring-secondary ring-2":""}`,children:[E.jsx("span",{className:`grid h-[52px] w-[52px] flex-none place-items-center rounded-xl ${t.tileClassName}`,"aria-hidden":"true",children:t.icon}),E.jsxs("div",{className:"mt-4 flex-1",children:[E.jsxs("h2",{className:"text-content flex items-center gap-1.5 text-[15px] font-semibold",children:[t.name,a?E.jsx(cA,{className:"h-3.5 w-3.5",weight:"bold","aria-hidden":"true"}):null]}),E.jsx("p",{className:"text-content-subtle mt-1 text-[13px] leading-relaxed",children:t.description}),a&&u?E.jsx("p",{className:"text-content-muted mt-2.5 text-xs font-medium",children:u}):null]}),a?E.jsx("button",{type:"button",onClick:i,disabled:n,className:"active-push bg-main-input text-content-muted mt-[18px] inline-flex min-h-[38px] w-full items-center justify-center rounded-lg px-3.5 text-[13px] font-semibold transition-colors hover:bg-red-500/10 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:n?"Disconnecting…":"Disconnect"}):E.jsx("button",{type:"button",onClick:s,disabled:n,className:"active-push bg-secondary text-secondary-foreground hover:bg-accent mt-[18px] inline-flex min-h-[38px] w-full items-center justify-center rounded-lg px-3.5 text-[13px] font-semibold transition-colors disabled:cursor-not-allowed disabled:opacity-50",children:n?"Connecting…":"Connect"})]})},d2=({isOpen:t,onClose:e,context:n="menu",highlightProvider:r=null})=>{const{integrations:s,isLoading:i,error:a,pendingProvider:u,connect:c,disconnect:d}=AK(),f=Ff(),[p,m]=v.useState(null),_=b=>s.find(C=>C.provider===b),x=v.useCallback(b=>{const C=Date.now(),P=Ya({action:"connect",outcome:"started",provider:b,entryPoint:n});f==null||f.capture(P.event,P.properties),c(b).then(T=>{const A=Date.now()-C;if(T==="connected"){const L=Ya({action:"connect",outcome:"completed",provider:b,entryPoint:n,durationMs:A});f==null||f.capture(L.event,L.properties);return}const R=Ya({action:"connect",outcome:"failed",provider:b,entryPoint:n,durationMs:A,failureReason:T==="closed"?"popup_closed":"provider_failed"});f==null||f.capture(R.event,R.properties)}).catch(T=>{const A=T instanceof Error?T.message:"Could not connect.",R=Ya({action:"connect",outcome:"failed",provider:b,entryPoint:n,durationMs:Date.now()-C,failureReason:A.includes("Popup blocked")?"popup_blocked":"request_failed"});f==null||f.capture(R.event,R.properties),f8.warn(`Connect error for ${b}:`,A),mt.error(A)})},[c,n,f]),y=v.useCallback(b=>{const C=Date.now(),P=Ya({action:"disconnect",outcome:"started",provider:b,entryPoint:n});f==null||f.capture(P.event,P.properties),d(b).then(()=>{const T=Ya({action:"disconnect",outcome:"completed",provider:b,entryPoint:n,durationMs:Date.now()-C});f==null||f.capture(T.event,T.properties)}).catch(T=>{const A=T instanceof Error?T.message:"Could not disconnect.",R=Ya({action:"disconnect",outcome:"failed",provider:b,entryPoint:n,durationMs:Date.now()-C,failureReason:"request_failed"});f==null||f.capture(R.event,R.properties),f8.warn(`Disconnect error for ${b}:`,A),mt.error(A)})},[n,d,f]),w=n==="onboarding";return E.jsx(Wx,{open:t,onOpenChange:b=>!b&&e(),children:E.jsxs(qx,{children:[E.jsx(Gx,{className:"z-max fixed inset-0 bg-black/40"}),E.jsx(Kx,{ref:m,className:"z-max border-main-border bg-main font-main fixed top-1/2 left-1/2 w-[560px] -translate-x-1/2 -translate-y-1/2 rounded-lg border shadow-2xl outline-none",children:E.jsxs(UI,{value:p,children:[E.jsxs("div",{className:"border-main-border bg-main-light flex items-center justify-between rounded-t-lg border-b px-4 py-2",children:[E.jsx(Zx,{className:"text-content text-base font-medium",children:"Connect design references"}),E.jsx($u,{onClick:e,title:"Close",className:"text-content-subtle hover:bg-main-hover hover:text-content rounded p-1 transition-colors",children:E.jsx(kA,{className:"h-4 w-4",weight:"bold"})})]}),E.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[E.jsx(Yx,{className:"text-content-subtle text-sm",children:"Connect your design references to use them with Rivet’s MCP."}),a?E.jsx("p",{className:"rounded-lg bg-red-500/10 px-4 py-3 text-[13px] font-medium text-red-300",children:a}):null,E.jsx("div",{className:"grid grid-cols-2 gap-4",children:MK.map(b=>E.jsx(OK,{meta:b,integration:_(b.provider),isPending:i||u===b.provider,isHighlighted:r===b.provider,onConnect:()=>x(b.provider),onDisconnect:()=>y(b.provider)},b.provider))}),w?E.jsxs("div",{className:"flex items-center justify-between gap-4",children:[E.jsx("p",{className:"text-content-subtle text-xs",children:"You can always do this later from the account menu."}),E.jsx("button",{type:"button",onClick:e,className:"active-push bg-secondary text-secondary-foreground hover:bg-accent flex-none rounded-lg px-3.5 py-2 text-[13px] font-medium transition-colors",children:"Skip for now"})]}):null]})]})})]})})},h8=({className:t=""})=>E.jsx("span",{"aria-hidden":"true",className:`rivet-skeleton block rounded ${t}`.trim()}),LK=Os("SupportTicketModal"),p8=5e3,K1="feedback",NK=t=>{var r;if(!t)return null;const e=(r=t.formErrors)==null?void 0:r[0];if(e)return e;const n=t.fieldErrors??{};for(const s of Object.values(n)){const i=s==null?void 0:s[0];if(i)return i}return null},DK=async t=>{let e;try{e=await t.json()}catch{e=void 0}if(t.status===400){if(typeof(e==null?void 0:e.details)=="string"&&e.details.trim())return e.details;if(typeof(e==null?void 0:e.details)=="object"&&e.details!==null){const n=NK(e.details);if(n)return n}return"Please check your feedback and try again."}return t.status>=500?typeof(e==null?void 0:e.details)=="string"&&e.details.trim()?e.details:"Could not send feedback right now. Please try again later.":typeof(e==null?void 0:e.error)=="string"&&e.error.trim()?e.error:`HTTP ${t.status}`},jK=({isOpen:t,onClose:e,contactEmail:n})=>{const r=Ff(),[s,i]=v.useState(""),[a,u]=v.useState(!1),[c,d]=v.useState(null),f=v.useCallback(()=>{i("")},[]),p=v.useCallback(()=>{a||(f(),e())},[a,e,f]),m=v.useCallback(async()=>{const w=s.trim();if(!(!w||a)){u(!0);try{const b=typeof(r==null?void 0:r.get_session_id)=="function"?r.get_session_id():void 0,C=typeof(r==null?void 0:r.get_distinct_id)=="function"?r.get_distinct_id():void 0,P=n==null?void 0:n.trim(),T=await fetch("/api/support/tickets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:K1,message:w,contactEmail:P||void 0,metadata:{posthogSessionId:b??void 0,posthogDistinctId:C??void 0,appVersion:"0.16.1",appEnvironment:"production",pageUrl:window.location.href,userAgent:navigator.userAgent,submittedAt:new Date().toISOString()}})});if(!T.ok){const A=await DK(T);throw new Error(A)}r==null||r.capture("support_ticket_submitted",{ticket_type:K1,has_posthog_session_id:!!b}),mt.success("Feedback sent",{description:"Thanks for sharing this."}),f(),e()}catch(b){const C=b instanceof Error?b.message:"Failed to send message";r==null||r.capture("support_ticket_submit_failed",{ticket_type:K1,error:C}),LK.error("Failed to submit support ticket:",C),mt.error("Could not send feedback",{description:C})}finally{u(!1)}}},[n,a,s,e,r,f]),_=v.useCallback(w=>{w.key==="Enter"&&(w.metaKey||w.ctrlKey)&&(w.preventDefault(),m())},[m]),x=p8-s.length,y=a||s.trim().length===0;return E.jsx(Wx,{open:t,onOpenChange:w=>!w&&p(),children:E.jsxs(qx,{children:[E.jsx(Gx,{className:"fixed inset-0 z-max bg-black/40"}),E.jsx(Kx,{ref:d,className:"fixed left-1/2 top-1/2 z-max w-[440px] -translate-x-1/2 -translate-y-1/2 rounded-lg border border-main-border bg-main font-main shadow-2xl outline-none",children:E.jsxs(UI,{value:c,children:[E.jsxs("div",{className:"flex items-center justify-between rounded-t-lg border-b border-main-border bg-main-light px-4 py-2",children:[E.jsx(Zx,{className:"text-base font-medium text-content",children:"Send feedback"}),E.jsx($u,{onClick:p,disabled:a,title:"Close",className:"rounded p-1 text-content-subtle transition-colors hover:bg-main-hover hover:text-content disabled:cursor-not-allowed disabled:opacity-50",children:E.jsx(kA,{className:"h-4 w-4",weight:"bold"})})]}),E.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[E.jsx(Yx,{className:"text-sm text-content-subtle",children:"Tell us what happened or what we can improve."}),E.jsxs("div",{className:"rounded-lg bg-main-input outline outline-1 outline-transparent transition-[outline-color] focus-within:outline-white/20",children:[E.jsx("textarea",{id:"support-ticket-message","aria-label":"Your feedback",value:s,onChange:w=>i(w.target.value),onKeyDown:_,maxLength:p8,rows:6,disabled:a,placeholder:"What happened?",className:"max-h-64 w-full resize-none overflow-y-auto bg-transparent pb-1 pl-3 pr-3 pt-3 text-sm text-content placeholder-content-subtle focus:outline-none disabled:opacity-50"}),E.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1",children:[E.jsx("span",{className:"text-xs text-content-subtle",children:"Context details are included automatically."}),E.jsxs("div",{className:"flex items-center gap-2",children:[x<=500&&E.jsx("span",{className:"text-xs text-content-subtle",children:x}),E.jsx($u,{onClick:m,disabled:y,title:"Send feedback",shortcut:"⌘↵",className:"flex items-center justify-center rounded bg-primary p-1 text-content transition-colors hover:bg-primary-hover disabled:cursor-not-allowed disabled:opacity-80",children:a?E.jsx(L0,{className:"h-5 w-5 animate-spin",weight:"bold"}):E.jsx(pB,{className:"h-5 w-5",weight:"bold"})})]})]})]})]})]})})]})})},FK=Os("ProfileAvatar"),JI=(t,e)=>{const n=(t??"").trim();if(n)return n.split(/\s+/).filter(Boolean)[0]??"";const s=((e??"").split("@")[0]??"").split(/[._\-+]/).filter(Boolean)[0]??"";return s?s[0].toUpperCase()+s.slice(1):""},VK=(t,e)=>JI(t,e).charAt(0).toUpperCase(),$K=({className:t="",side:e="bottom",align:n="end"})=>{const{name:r,email:s}=tt(XA),i=tt(nI),[a,u]=v.useState(!1),[c,d]=v.useState(!1),[f,p]=v.useState(!1),[m,_]=v.useState(!1),{containerRef:x,onKeyDown:y}=EK(),w=tt(Wf),b=VK(r,s);if(!b)return w?E.jsxs("span",{"data-testid":"profile-avatar-skeleton","aria-hidden":"true",className:`flex shrink-0 items-center gap-2 ${t}`.trim(),children:[E.jsx(h8,{className:"h-7 w-7 rounded-full"}),E.jsx(h8,{className:"h-3 w-16"})]}):null;const C=JI(r,s),P=(r==null?void 0:r.trim())||null,T=(s==null?void 0:s.trim())||null,A=async()=>{_(!0);try{const R=await fetch("/api/auth/logout",{method:"POST",credentials:"same-origin"});if(!R.ok)throw new Error(`Logout failed: ${R.status}`)}catch(R){FK.warn("Logout request failed",R),mt.error("Could not log out. Please try again."),_(!1);return}window.location.reload()};return E.jsxs(E.Fragment,{children:[E.jsxs(PI,{open:a,onOpenChange:u,children:[E.jsx(TI,{asChild:!0,children:E.jsxs("button",{type:"button","aria-label":"Account",className:`text-content-muted hover:text-content flex shrink-0 items-center gap-2 transition-colors select-none ${t}`,children:[E.jsx("span",{className:"border-main-border bg-main-input flex h-7 w-7 items-center justify-center rounded-full border text-[11px] leading-none font-semibold",children:b}),C?E.jsx("span",{className:"max-w-[8rem] truncate text-xs font-medium",children:C}):null]})}),E.jsx(AI,{children:E.jsxs(II,{ref:x,onKeyDown:y,role:"menu",className:"bg-surface-2 z-[60] min-w-[180px] rounded-lg p-1 shadow-lg",side:e,sideOffset:6,align:n,children:[P||T?E.jsxs("div",{className:"border-main-border border-b px-3 py-2",children:[P?E.jsx("div",{className:"text-content truncate text-xs font-medium",children:P}):null,T?E.jsx("div",{className:"text-content-muted truncate text-[11px]",children:T}):null]}):null,E.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:()=>{u(!1),d(!0)},disabled:!i,className:"text-content hover:bg-hover focus:bg-hover mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:[E.jsx(bA,{className:"h-3.5 w-3.5",weight:"bold"}),"Connect design references"]}),E.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:()=>{u(!1),p(!0)},className:"text-content hover:bg-hover focus:bg-hover mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs transition-colors focus:outline-none",children:[E.jsx(vB,{className:"h-3.5 w-3.5",weight:"bold"}),"Share feedback"]}),E.jsxs("button",{type:"button",role:"menuitem","data-menu-item":!0,onClick:A,disabled:m,className:"text-content hover:bg-hover focus:bg-hover mt-1 flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:[E.jsx(wB,{className:"h-3.5 w-3.5",weight:"bold"}),m?"Logging out…":"Log out"]})]})})]}),E.jsx(d2,{isOpen:c,onClose:()=>d(!1)}),E.jsx(jK,{isOpen:f,onClose:()=>p(!1),contactEmail:s??void 0})]})},zK=({onClose:t})=>E.jsxs("div",{className:"bg-main font-main scrollbar-hide relative flex h-full w-full cursor-auto flex-col overflow-hidden shadow-2xl","data-cy":"element-inspector",children:[E.jsx(bK,{onClose:t}),E.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:E.jsx(nK,{})}),E.jsx("div",{className:"border-main-border bg-main-light flex flex-shrink-0 items-center border-t px-2.5 py-1.5",children:E.jsx($K,{side:"top",align:"start"})})]});async function HK(t,e){const{delaysMs:n,shouldRetry:r,onRetry:s}=e;for(let i=1;;i++)try{return await t(i)}catch(a){const u=n[i-1];if(u===void 0||r&&!r(a))throw a;s==null||s(a,i,u),await new Promise(c=>setTimeout(c,u))}}const m8=Os("useServerConfig"),eR=[250,500,1e3,2e3,4e3],v8=eR.length+1,UK=async()=>{var n;const t=await fetch("/api/health");if(!t.ok)throw new Error(`Failed to fetch config: ${t.status}`);const e=await t.json();if(!e.framework)throw new Error("Server did not return framework information");return{userPort:((n=e.ports)==null?void 0:n.userDevServer)||3e3,framework:e.framework}},BK=()=>{const[t,e]=v.useState(null),[n,r]=v.useState(!0),[s,i]=v.useState(null),a=v.useCallback(async()=>{try{r(!0),i(null);const u=await HK(UK,{delaysMs:eR,onRetry:(c,d,f)=>{m8.warn(`Server config fetch failed (attempt ${d}); retrying in ${f}ms`,c)}});return e(u),u}catch(u){const c=u instanceof Error?u.message:"Failed to fetch server config";throw i(c),m8.warn("Error fetching server config:",u),u}finally{r(!1)}},[]);return{config:t,fetchConfig:a,isLoading:n,error:s}},WK="#1C1C20",Yi=[118,118,124],g8=.85,qK=3,GK=.15,jp=36,KK=4.4,ZK=.7,YK=3.5,XK=.8,y8=9,QK=11,JK=[1.35,1.12,.95,.85],eZ=[0,1.1,2.3,3.1],tZ=[0,.35,.16,.13],nZ=[.9,.5,.4,.35],Xa=3,Z1=[[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.14,y1:.13,x2:.86,y2:.23,level:1},{x1:.14,y1:.28,x2:.3,y2:.87,level:1},{x1:.34,y1:.28,x2:.86,y2:.87,level:1},{x1:.165,y1:.155,x2:.225,y2:.205,level:2},{x1:.7,y1:.155,x2:.755,y2:.205,level:2},{x1:.775,y1:.155,x2:.83,y2:.205,level:2},{x1:.165,y1:.32,x2:.275,y2:.375,level:2},{x1:.165,y1:.415,x2:.275,y2:.47,level:2},{x1:.165,y1:.51,x2:.275,y2:.565,level:2},{x1:.37,y1:.32,x2:.585,y2:.56,level:2},{x1:.615,y1:.32,x2:.83,y2:.56,level:2},{x1:.37,y1:.61,x2:.83,y2:.83,level:2},{hline:!0,x1:.39,x2:.81,y:.685,level:3},{hline:!0,x1:.39,x2:.75,y:.755,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.16,y1:.17,x2:.52,y2:.45,level:1},{x1:.58,y1:.17,x2:.685,y2:.29,level:1},{x1:.715,y1:.17,x2:.84,y2:.29,level:1},{x1:.58,y1:.33,x2:.685,y2:.45,level:1},{x1:.715,y1:.33,x2:.84,y2:.45,level:1},{x1:.16,y1:.55,x2:.84,y2:.85,level:1},{x1:.19,y1:.21,x2:.36,y2:.33,level:2},{hline:!0,x1:.19,x2:.48,y:.37,level:3},{hline:!0,x1:.19,x2:.42,y:.42,level:3},{x1:.19,y1:.6,x2:.49,y2:.8,level:2},{hline:!0,x1:.53,x2:.8,y:.63,level:3},{hline:!0,x1:.53,x2:.76,y:.7,level:3},{hline:!0,x1:.53,x2:.79,y:.77,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.14,y1:.13,x2:.86,y2:.22,level:1},{x1:.14,y1:.28,x2:.36,y2:.87,level:1},{x1:.39,y1:.28,x2:.61,y2:.87,level:1},{x1:.64,y1:.28,x2:.86,y2:.87,level:1},{x1:.165,y1:.15,x2:.225,y2:.2,level:2},{x1:.165,y1:.32,x2:.335,y2:.52,level:2},{x1:.415,y1:.32,x2:.585,y2:.52,level:2},{x1:.665,y1:.32,x2:.835,y2:.52,level:2},{hline:!0,x1:.165,x2:.335,y:.6,level:3},{hline:!0,x1:.165,x2:.3,y:.67,level:3},{hline:!0,x1:.415,x2:.585,y:.6,level:3},{hline:!0,x1:.415,x2:.55,y:.67,level:3},{hline:!0,x1:.665,x2:.835,y:.6,level:3},{hline:!0,x1:.665,x2:.8,y:.67,level:3}],[{x1:.1,y1:.08,x2:.9,y2:.92,level:0},{x1:.3,y1:.22,x2:.7,y2:.74,level:1},{x1:.34,y1:.27,x2:.55,y2:.34,level:2},{hline:!0,x1:.36,x2:.64,y:.42,level:3},{hline:!0,x1:.36,x2:.6,y:.49,level:3},{hline:!0,x1:.36,x2:.62,y:.56,level:3},{x1:.5,y1:.63,x2:.575,y2:.69,level:2},{x1:.595,y1:.63,x2:.66,y2:.69,level:2}]],Fp=t=>{let e=t|0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),e^=e>>>16,(e>>>0)/4294967296},um=t=>{const e=Math.min(1,Math.max(0,t));return e*e*(3-2*e)},Qa=(t,e)=>(Math.round(t/e-.5)+.5)*e,rZ=Math.sin(Math.PI/3),_8=(t,e,n,r,s)=>{if(t.beginPath(),e===0)t.arc(n,r,s,0,Math.PI*2);else if(e===1){const i=s*rZ;t.moveTo(n,r-s),t.lineTo(n+i,r+s/2),t.lineTo(n-i,r+s/2),t.closePath()}else{const i=s*.85;t.rect(n-i,r-i,i*2,i*2)}t.fill()},sZ=(t,e,n)=>{let r;if(n.hline){const s=Math.max(n.x1-t,t-n.x2,0),i=Math.abs(e-n.y1);r=Math.hypot(s,i)-y8}else{const s=Math.max(n.x1-t,t-n.x2,0),i=Math.max(n.y1-e,e-n.y2,0);s===0&&i===0?r=-Math.min(t-n.x1,n.x2-t,e-n.y1,n.y2-e):r=Math.hypot(s,i),r=Math.abs(r)-y8}return um(.5-r/(2*QK))},tR=({className:t="",trackGlobalLoaderCount:e=!0})=>{const n=at(YA),r=v.useRef(null),s=v.useCallback(i=>{var N;if((N=r.current)==null||N.call(r),r.current=null,!i)return;const a=i.getContext("2d");if(!a)return;e&&n(j=>j+1);const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let c=[],d=0,f=0,p=jp,m=jp,_=null,x=null,y=0,w=-1;const b=new Array(33),C=j=>{const F=Math.round(j*32);let G=b[F];if(!G){const Q=F/32,Z=Math.round(Yi[0]+(255-Yi[0])*Q),W=Math.round(Yi[1]+(255-Yi[1])*Q),q=Math.round(Yi[2]+(255-Yi[2])*Q);G=`rgba(${Z}, ${W}, ${q}, ${g8})`,b[F]=G}return G},P=j=>{const F=1-.35*j,G=Math.round(Yi[0]*F),Q=Math.round(Yi[1]*F),Z=Math.round(Yi[2]*F);return`rgba(${G}, ${Q}, ${Z}, ${g8})`},T=j=>{let F=Math.floor(Math.random()*Z1.length);F===w&&(F=(F+1)%Z1.length),w=F;const G=[0,0,0,0],Q=Z1[F].map((D,Y)=>{const oe=D.level,J=G[oe]++,se=eZ[oe]+J*tZ[oe],pe=nZ[oe]+Fp(F*131+Y*17+5)*.2;if(D.hline){const ae=Qa((D.y??0)*f,m);return{hline:!0,x1:Qa(D.x1*d,p),x2:Qa(D.x2*d,p),y1:ae,y2:ae,level:oe,start:se,dur:pe}}const Se=Qa(D.x1*d,p),ce=Qa((D.y1??0)*f,m);return{hline:!1,x1:Se,y1:ce,x2:Math.max(Qa(D.x2*d,p),Se+p),y2:Math.max(Qa((D.y2??0)*f,m),ce+m),level:oe,start:se,dur:pe}}),Z=Q.reduce((D,Y)=>Math.max(D,Y.start+Y.dur),0),W=c.length,q=new Float32Array(W*Xa),z=new Int16Array(W*Xa).fill(-1),X=new Uint8Array(W),H=Q[0];for(let D=0;D<W;D++){const Y=c[D];Y.x>H.x1&&Y.x<H.x2&&Y.y>H.y1&&Y.y<H.y2&&(X[D]=1);const oe=D*Xa;for(let J=0;J<Q.length;J++){const se=sZ(Y.x,Y.y,Q[J]);if(se<=.02)continue;let pe=oe;for(let Se=oe;Se<oe+Xa;Se++){if(z[Se]===-1){pe=Se;break}q[Se]<q[pe]&&(pe=Se)}(z[pe]===-1||se>q[pe])&&(q[pe]=se,z[pe]=J)}}return{startT:j,buildEnd:Z,els:Q,frame:H,cellQ:q,cellEl:z,inFrame:X}},A=()=>{const j=i.getBoundingClientRect();d=Math.max(1,j.width),f=Math.max(1,j.height);const F=Math.min(2,window.devicePixelRatio||1);i.width=Math.round(d*F),i.height=Math.round(f*F),a.setTransform(F,0,0,F,0,0);const G=Math.max(8,Math.round(d/jp)),Q=Math.max(6,Math.round(f/jp));p=d/G,m=f/Q,c=[];for(let Z=0;Z<Q;Z++){const W=Q>1?Z/(Q-1):.5,q=KK*(1+ZK*.4*(W*2-1));for(let z=0;z<G;z++){const X=Z*8191+z*131+1,H={x:(z+.5)*p,y:(Z+.5)*m,size:q,seed:X,phase:Fp(X),kind:0};H.kind=Math.floor(Fp(X*97)*3),c.push(H)}}x=null,_=null},R=new Float32Array(32),L=j=>{a.fillStyle=WK,a.fillRect(0,0,d,f),_||(_=T(j+.2)),j>=_.startT+_.buildEnd+YK&&(x=_,y=j,_=T(j+.2));let F=0;x&&(F=1-um((j-y)/XK),F<=0&&(x=null));const G=_;for(let H=0;H<G.els.length;H++){const D=G.els[H];R[H]=um(Math.min(1,Math.max(0,(j-G.startT-D.start)/D.dur)))}const Q=R[0],Z=P(0),W=P(Q),q=F>0?P(F):Z,z=F>0?P(Math.max(Q,F)):W,X=c.length;for(let H=0;H<X;H++){const D=c[H];let Y=0,oe=0;const J=H*Xa;for(let We=J;We<J+Xa;We++){const ze=G.cellEl[We];if(ze<0)break;const Fe=G.cellQ[We]*R[ze];Fe>Y&&(Y=Fe,oe=G.els[ze].level)}if(x)for(let We=J;We<J+Xa;We++){const ze=x.cellEl[We];if(ze<0)break;const Fe=x.cellQ[We]*F;Fe>Y&&(Y=Fe,oe=x.els[ze].level)}const se=j/qK+D.phase,pe=Math.floor(se),Se=se-pe,ce=um(Math.min(Se,1-Se)/GK),ae=Math.floor(Fp(D.seed*97+pe*7919)*3);ae!==D.kind&&Y<.02&&ce<.05&&(D.kind=ae);const $e=Math.max(ce*(1-Y),Y);if(!($e<.01))if(Y<.02){const We=G.inFrame[H]===1,ze=x?x.inFrame[H]===1:!1;We?a.fillStyle=ze?z:W:a.fillStyle=ze?q:Z;const Fe=Math.max(We?Q:0,ze?F:0);_8(a,D.kind,D.x,D.y,D.size*$e*(1-.2*Fe))}else{a.fillStyle=C(Y);const We=1+(JK[oe]-1)*Y;_8(a,D.kind,D.x,D.y,D.size*$e*We)}}};A();let I=0;if(u)_=T(-100),L(0);else{const j=performance.now(),F=G=>{L((G-j)/1e3),I=requestAnimationFrame(F)};I=requestAnimationFrame(F)}const O=new ResizeObserver(()=>{A(),u&&(_=T(-100),L(0))});O.observe(i),r.current=()=>{cancelAnimationFrame(I),O.disconnect(),e&&n(j=>j-1)}},[e,n]);return E.jsx("canvas",{ref:s,"aria-hidden":"true",className:`h-full w-full ${t}`.trim()})},iZ=async(t=null)=>{if(t)return oZ(t);let e;try{e=await fetch("/api/mcp/status")}catch{return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null}}if(e.status===404||!(e.headers.get("content-type")??"").toLowerCase().includes("application/json"))return Vp();if(!e.ok)return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null};let r;try{r=await e.json()}catch{return Vp()}const s=r.devServerHealth;return s?s.ownership==="none"?{isOk:!1,unavailableReason:"upstream_unreachable",upstreamStatus:null}:s.isReachable===!0?{isOk:!0,unavailableReason:"upstream_unreachable",upstreamStatus:null}:{isOk:!1,unavailableReason:s.reason==="rivet_unreachable"?"rivet_unreachable":"upstream_unreachable",upstreamStatus:null}:Vp()},nR=async t=>{try{const e=await fetch(t);return{isOk:e.status!==502&&e.status!==503,unavailableReason:"upstream_unreachable",upstreamStatus:e.status}}catch{return{isOk:!1,unavailableReason:"rivet_unreachable",upstreamStatus:null}}},oZ=t=>nR(t),Vp=()=>nR("/"),Y1=Os("usePreviewUpstreamHealth"),aZ=500,lZ=4e3,uZ=15e3,cZ=3,dZ=(t,e={})=>{const n=v.useRef(null),r=v.useRef(null),s=e.probeMsWhileDown??aZ,i=e.probeMsWhileUp??lZ,a=e.firstUnreachableCaptureAfterMs??uZ,u=e.rerunProbeImmediatelyOnVersion,c=e.probePath??null,d=e.skip??!1,f=v.useRef(e.onPersistentUpstreamServerErrors);f.current=e.onPersistentUpstreamServerErrors;const[p,m]=v.useState(t==="static"),[_,x]=v.useState(0),[y,w]=v.useState(null),[b,C]=v.useState(0),[P,T]=v.useState(!1),[A,R]=v.useState(!1),[L,I]=v.useState(t==="static"?null:"upstream_unreachable");return v.useEffect(()=>{if(t==="static"){m(!0),w(null),C(0),T(!1),R(!0),I(null);return}if(d){m(!1),w(null),C(0),T(!1),R(!0),I("upstream_unreachable"),n.current=null;return}let O=!0;const N=Date.now();w(N),C(0),T(!1),m(!1),R(!1),I("upstream_unreachable");const j={current:!1},F={current:!1},G={current:!1},Q={current:null},Z={current:!1},W={current:!1},q={current:0},z={current:!1},X={current:null};let H=null;const D=()=>{G.current||(G.current=!0,O&&R(!0))},Y=()=>{H!==null&&(clearTimeout(H),H=null)},oe=(se,pe)=>{Y(),H=setTimeout(pe,se)},J=async()=>{var Fe;if(!O)return;C(ct=>ct+1);const{isOk:se,unavailableReason:pe,upstreamStatus:Se}=await iZ(c);if(!O)return;D(),X.current=Se;const ce=se&&Se!==null&&Se>=500;ce&&W.current?q.current+=1:se&&!ce&&(q.current=0);const ae=q.current>=cZ;if(ae&&!z.current&&Se!==null&&(z.current=!0,Ee==null||Ee.capture("preview_upstream_error_responses",{framework:t,upstream_status:Se,consecutive_count:q.current}),Y1.warn(`Preview upstream is listening but has served ${q.current} consecutive ${Se} responses`),(Fe=f.current)==null||Fe.call(f,{upstreamStatus:Se,consecutiveCount:q.current})),se&&!ae){ce||(W.current=!0,z.current=!1);const ct=!Z.current;Z.current=!0,m(!0),I(null),Q.current=null,F.current=!1,T(!1),j.current?ct&&(Ee==null||Ee.capture("preview_upstream_restored",{framework:t})):(j.current=!0,Ee==null||Ee.capture("preview_dev_server_ready",{framework:t,ready_after_ms:Date.now()-N})),oe(i,J);return}const We=Z.current;Z.current=!1,m(!1),I(pe),Q.current===null&&(Q.current=Date.now(),F.current=!1,T(!1)),We&&(Ee==null||Ee.capture("preview_upstream_lost",{framework:t,upstream_status:Se}),x(ct=>ct+1),Y1.warn("Preview upstream became unavailable after it was ready"));const ze=Date.now()-Q.current;ze>=a&&!F.current&&(F.current=!0,T(!0),Ee==null||Ee.capture("preview_dev_server_unreachable",{framework:t,elapsed_ms:ze,upstream_status:X.current}),Y1.warn("Dev server did not become ready within timeout window")),oe(s,J)};return n.current=()=>oe(0,J),oe(0,J),()=>{O=!1,n.current=null,Y()}},[t,s,i,a,c,d]),v.useEffect(()=>{var N;if(t==="static"||u===void 0)return;const O=r.current;r.current=u,O!==null&&O!==u&&((N=n.current)==null||N.call(n))},[t,u]),{isUpstreamReady:p,iframeRemountKey:_,probeStartedAt:y,probeAttemptCount:b,isFirstUnreachableWindowExceeded:P,initialProbeComplete:A,unavailableReason:L}};function fZ(t){return t.enteringSplit&&t.isExistingSession&&t.hasActiveVariantProxy}const rR=t=>{var e;return t!=="embedded"||typeof window>"u"?"":((e=window.__RIVET_BOOTSTRAP__)==null?void 0:e.previewOrigin)??`${window.location.protocol}//localhost:${window.location.port}`},sR=({agentApplyMode:t,url:e})=>e.startsWith("/")?`${rR(t)}${e}`:e,hZ="allow-scripts allow-same-origin allow-forms allow-popups allow-modals",pZ=t=>hZ,mZ=Os("PreviewSurface"),x8=(t,e)=>t==="about:blank"?"blank":t.includes("/api/variants/")?"static_artifact":e.kind==="variant"?"dev_server":"original",iR=({target:t,src:e,framework:n,remountKey:r})=>(tt(N0),E.jsx("div",{className:"relative h-full w-full",children:E.jsx("iframe",{src:e,className:"h-full w-full border-none",title:"Project Preview",sandbox:pZ(),onLoad:()=>{Ee==null||Ee.capture("preview_iframe_loaded",{framework:n,src:e}),t.kind==="variant"&&(Ee==null||Ee.capture("variants_panel.preview_displayed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:x8(e,t),framework:n}))},onError:()=>{Ee==null||Ee.capture("preview_iframe_load_failed",{framework:n,src:e}),t.kind==="variant"&&(Ee==null||Ee.capture("variants_panel.preview_display_failed",{sessionId:t.sessionId,variantId:t.variantId,renderedTarget:"variant",iframeSrcKind:x8(e,t),framework:n})),mZ.warn("Preview iframe failed to load",{framework:n,src:e})}},r)})),vZ="modulepreload",gZ=function(t){return"/"+t},w8={},yZ=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let a=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=a(n.map(d=>{if(d=gZ(d),d in w8)return;w8[d]=!0;const f=d.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${p}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":vZ,f||(m.as="script"),m.crossOrigin="",m.href=d,c&&m.setAttribute("nonce",c),document.head.appendChild(m),f)return new Promise((_,x)=>{m.addEventListener("load",_),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return s.then(a=>{for(const u of a||[])u.status==="rejected"&&i(u.reason);return e().catch(i)})},_Z=v.lazy(()=>yZ(()=>Promise.resolve().then(()=>tX),void 0)),xZ={surface:"relative flex h-full w-full items-center justify-center bg-main px-6",overlay:"absolute inset-0 z-10 flex items-center justify-center bg-main/90 px-6",page:"relative flex h-screen w-full items-center justify-center bg-main px-6"},wZ={sm:"text-lg font-semibold text-content",md:"text-2xl font-semibold text-content",lg:"text-3xl font-semibold text-content"},bZ={neutral:"rounded-md border border-divider bg-transparent px-5 py-2 text-sm font-medium text-content transition-colors hover:bg-surface-3",ghost:"rounded-md px-5 py-2 text-sm font-medium text-content-muted transition-colors hover:text-content"},zu=({backdrop:t,media:e,title:n,description:r,actions:s,tone:i="neutral",fill:a="surface",size:u="md",children:c,state:d,role:f="status",busy:p=!1,className:m=""})=>{const _=v.useCallback(y=>{y&&d&&(Ee==null||Ee.capture("status_surface_shown",{state:d,tone:i,fill:a}))},[d,i,a]),x=!!(e||n||r||c||s!=null&&s.length);return E.jsxs("div",{ref:_,className:`${xZ[a]} ${m}`.trim(),role:f,"aria-live":"polite","aria-busy":p||void 0,"data-state":d,children:[t?E.jsx("div",{className:"absolute inset-0",children:t}):null,x?E.jsxs("div",{className:"relative z-10 flex max-w-sm flex-col items-center gap-5 text-center",children:[e,n?E.jsx("h2",{className:wZ[u],children:n}):null,r?E.jsx("p",{className:"text-content-muted text-base leading-relaxed",children:r}):null,c,s!=null&&s.length?E.jsx("div",{className:"flex flex-row items-center gap-3",children:s.map(y=>E.jsx("button",{type:"button",onClick:y.onClick,className:bZ[y.variant??"neutral"],children:y.label},y.label))}):null]}):null]})},f2=({loader:t="coalesce",trackGlobalLoaderCount:e,size:n="lg",...r})=>t==="coalesce"?E.jsx(zu,{...r,size:n,busy:!0,backdrop:E.jsx(tR,{trackGlobalLoaderCount:e})}):t==="logo"?E.jsx(zu,{...r,size:n,busy:!0,backdrop:E.jsx(v.Suspense,{fallback:null,children:E.jsx(_Z,{className:"absolute inset-0"})})}):E.jsx(zu,{...r,size:n,busy:!0,media:E.jsx(L0,{"aria-hidden":!0,className:"text-content h-8 w-8 shrink-0 animate-spin",weight:"bold"})}),oR=({icon:t,...e})=>E.jsx(zu,{...e,tone:"neutral",media:t?E.jsx("div",{className:"text-content-muted",children:t}):void 0}),gw=t=>E.jsx(zu,{...t,tone:"error",role:"alert"}),b8="/static/",SZ=t=>{try{return new URL(t,"http://localhost").pathname.endsWith(b8)}catch{return t.endsWith(b8)}},EZ=t=>t==="spawn_error"?"The direction is saved, but its preview process didn’t start.":t==="exited"?"The direction is saved, but its preview stopped before it was ready.":t==="timeout"?"The direction is saved, but its preview took too long to become ready.":t==="missing_dev_script"?"The direction is saved, but Rivet couldn’t find a dev script to preview it.":t==="missing_static_entry"?"The direction is saved, but Rivet couldn’t find an HTML entry to preview it.":"The direction is saved, but Rivet couldn’t prepare its preview.",CZ=t=>t.status==="failed"&&t.errorCode==="VARIANT_VERIFICATION_UNAVAILABLE"?{state:"variant_verification_unavailable",title:"Rivet couldn’t verify this direction",description:"The worker completed, but Rivet couldn’t inspect its generated files.",detail:t.errorMessage??t.errorCode,isError:!0}:t.status==="failed"&&t.errorCode==="VARIANT_QA_FAILED"?{state:"variant_output_integrity_failed",title:"This direction couldn’t be verified",description:"The worker completed, but Rivet found a structural problem in the generated files.",detail:t.errorMessage??t.errorCode,isError:!0}:t.status==="failed"?{state:"variant_worker_failed",title:"This direction didn’t complete",description:"The worker stopped before producing a usable result.",detail:t.errorMessage??t.errorCode,isError:!0}:t.status==="cancelled"?{state:"variant_cancelled",title:"Direction was cancelled",description:"Rivet stopped before a preview was ready. Your other directions are unchanged.",isError:!1}:t.status==="succeeded"&&t.previewUnavailable&&t.previewUnavailable.reason!=="idle_timeout"?{state:"preview_unavailable",title:"Rivet couldn’t preview this direction",description:EZ(t.previewUnavailable.reason),detail:t.previewUnavailable.portInUse?"The preview port was already in use.":void 0,isError:!0}:null,kZ=({issue:t})=>E.jsx(zu,{fill:"overlay",size:"sm",state:t.state,role:t.isError?"alert":"status",tone:t.isError?"error":"neutral",title:t.title,description:t.description,children:t.detail?E.jsx("p",{className:"text-content-subtle text-xs leading-relaxed break-words",children:t.detail}):null}),PZ=({isInteractionDisabled:t=!1,framework:e,userPort:n})=>{const r=tt(e2),s=at(e2),i=tt(i0),a=at(i0),u=tt(Bf),c=tt(N0),d=tt(t2),f=tt(n2),p=tt(QA),m=tt(JA),_=at(n2),x=tt(yo),y=tt(s2),w=at(t2),b=u.active&&u.projectContext.kind==="fresh",C=tt(r2),P=u.active?u.variants.find(Ve=>Ve.workItemId===C&&(Ve.status==="pending"||Ve.status==="running"||Ve.status==="succeeded"&&!Ve.preview&&typeof Ve.port!="number"&&(!Ve.previewUnavailable||Ve.previewUnavailable.reason==="idle_timeout")))??null:null,T=u.active&&u.variants.some(Ve=>Ve.status==="pending"||Ve.status==="running"),A=b||T,R=u.active?u.variants.find(Ve=>Ve.workItemId===C)??null:null,L=R?CZ(R):null,I=e==="static"&&i!==null&&SZ(i);v.useEffect(()=>{u.active||w(!1)},[u.active,w]);const O=v.useRef(!1);v.useEffect(()=>{const Ve=!!(x!=null&&x.left||x!=null&&x.right),Ne=Ve&&!O.current;O.current=Ve;const Je=u.active?u.sessionId:null;!Je||!fZ({enteringSplit:Ne,isExistingSession:u.active&&u.projectContext.kind==="existing",hasActiveVariantProxy:d&&f!==null})||(w(!1),_(null),s(Ct=>Ct+1),fetch(`/api/variants/${encodeURIComponent(Je)}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})}).catch(()=>{}))},[x,u,d,f,w,_,s]);const j=v.useMemo(()=>{var xe;if(d||i&&!I||!u.active)return null;const{stage:Ve,variants:Ne}=u,Je=Ve==="ready"||Ve==="degraded",Ct=Ne.some(on=>{var Lt,Kr;return((Lt=on.refinement)==null?void 0:Lt.status)==="pending"||((Kr=on.refinement)==null?void 0:Kr.status)==="running"});if(!Je&&!Ct)return null;const vt=Ne.find(on=>{var Lt;return on.status==="succeeded"&&((Lt=on.preview)==null?void 0:Lt.kind)==="static_artifact"});return((xe=vt==null?void 0:vt.preview)==null?void 0:xe.kind)==="static_artifact"?vt.preview.url:null},[I,i,d,u])??i,F=v.useMemo(()=>!u.active||!j?null:u.variants.find(Ve=>{var Ne;return((Ne=Ve.preview)==null?void 0:Ne.kind)==="static_artifact"&&j.startsWith(Ve.preview.url)})??null,[j,u]),G=v.useMemo(()=>{if((y==null?void 0:y.previewKind)==="static")return{kind:"variant",sessionId:y.sessionId,variantId:y.variantId};if(!u.active)return s0;if(F)return{kind:"variant",sessionId:u.sessionId,variantId:F.workItemId};if(j){const Ne=j.match(/\/__rivet\/preview\/variant\/([^/]+)\/([^/?#]+)/),Je=Ne!=null&&Ne[1]?decodeURIComponent(Ne[1]):null,Ct=Ne!=null&&Ne[2]?decodeURIComponent(Ne[2]):null;if(Je===u.sessionId&&Ct&&u.variants.some(on=>on.workItemId===Ct))return{kind:"variant",sessionId:u.sessionId,variantId:Ct};const vt=j.match(/\/api\/variants\/[^/]+\/static\/([^/?#]+)/),xe=vt!=null&&vt[1]?decodeURIComponent(vt[1]):null;if(xe&&u.variants.some(on=>on.workItemId===xe))return{kind:"variant",sessionId:u.sessionId,variantId:xe}}const Ve=!!(x!=null&&x.left||x!=null&&x.right);return(!Ve||b)&&!j&&d&&f&&u.variants.some(Ne=>Ne.workItemId===f)?{kind:"variant",sessionId:u.sessionId,variantId:f}:(!Ve||b)&&!j&&C&&u.variants.some(Ne=>Ne.workItemId===C)?{kind:"variant",sessionId:u.sessionId,variantId:C}:s0},[y,F,u,d,f,j,x,b,C]),Q=v.useRef(null);v.useEffect(()=>{var Ct,vt;if(!F||((Ct=F.preview)==null?void 0:Ct.kind)!=="static_artifact"||((vt=F.refinement)==null?void 0:vt.status)!=="succeeded")return;const Ve=`${F.workItemId}:${F.refinement.workItemId}`;if(Q.current===Ve)return;Q.current=Ve;const Ne=F.preview.url.includes("?")?"&":"?",Je=`${F.preview.url}${Ne}refinement=${encodeURIComponent(F.refinement.workItemId)}`;j!==Je&&(a(Je),s(xe=>xe+1))},[j,F,s,a,u]);const Z=j!==null&&WG(j),W=j!==null&&!Z||b&&!d&&!Z,{isUpstreamReady:q,iframeRemountKey:z,probeAttemptCount:X,initialProbeComplete:H}=dZ(e,{rerunProbeImmediatelyOnVersion:r,probePath:Z?j:null,skip:W}),[D,Y]=v.useState(()=>p&&q?r:null),oe=v.useRef(null);v.useEffect(()=>{if(!p){oe.current=null,Y(null);return}if(D===r){oe.current=null;return}const Ve=oe.current;if(!Ve||Ve.remountKey!==r){oe.current={remountKey:r,probeAttemptCount:X};return}q&&X>Ve.probeAttemptCount&&(oe.current=null,Y(r))},[D,r,p,X,q]);const se=j!==null&&!Z||q,Se=m||p&&D!==r||p&&!se,ce=`${z}:${r}`,ae=WI(window.location.pathname),$e=e==="static"?`/static${ae??"/"}`:ae??"/",We=rR(c);let ze=null;j&&(ze=sR({agentApplyMode:c,url:j}));const ct=P||L||Se?"about:blank":(Z&&!se?"about:blank":ze)??(se?`${We}${$e}`:"about:blank"),Kt=!!P||!!L||!se&&H;let rt=null;return Se?rt=E.jsx(f2,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"preview_replay_boot"}):P?rt=E.jsx(f2,{fill:"overlay",loader:"coalesce",trackGlobalLoaderCount:!1,state:"variant_building",children:E.jsx("span",{className:"sr-only",children:"Building your direction"})}):L?rt=E.jsx(kZ,{issue:L}):Kt&&(rt=A?E.jsx(oR,{fill:"overlay",state:"preview_no_selection",title:"Nothing to preview yet",description:"Pick a direction from the panel."}):E.jsx(gw,{fill:"overlay",state:"preview_offline",title:"Preview isn't connected",description:"Rivet lost connection to your project.",actions:[{label:"Reload",onClick:()=>window.location.reload()}]})),E.jsxs("div",{className:"relative h-full w-full",children:[rt,E.jsx(iR,{target:G,src:ct,framework:e,remountKey:ce})]})};function S8({side:t,sessionId:e,variantId:n,url:r,label:s,source:i,isFallback:a=!1}){var P;const u=tt(yo),c=at(yo),d=Ff(),f=tt(Bf),p=tt(N0),m=v.useRef(!1),_=v.useCallback(()=>{m.current||(m.current=!0,wf({source:i,sessionId:e,variantId:n}))},[i,e,n]),x=v.useCallback(()=>{if(a){c(null);const L=c0("ended",u);d==null||d.capture(L.event,L.properties);return}_();const T={...u};delete T[t];const A=T.left||T.right?T:null;c(A);const R=c0(A?"updated":"ended",A??u);d==null||d.capture(R.event,R.properties)},[a,d,c,t,u,_]),y=v.useMemo(()=>({kind:"variant",sessionId:e,variantId:n}),[e,n]),w=v.useMemo(()=>!f.active||f.sessionId!==e?null:f.variants.find(T=>T.workItemId===n)??null,[e,n,f]),b=v.useMemo(()=>{var A,R;let T=r;if(((A=w==null?void 0:w.preview)==null?void 0:A.kind)==="static_artifact"&&((R=w.refinement)==null?void 0:R.status)==="succeeded"){const L=w.preview.url.includes("?")?"&":"?";T=`${w.preview.url}${L}refinement=${encodeURIComponent(w.refinement.workItemId)}`}return sR({agentApplyMode:p,url:T})},[p,w,r]),C=((P=w==null?void 0:w.refinement)==null?void 0:P.status)==="succeeded"?`${n}:${w.refinement.workItemId}`:n;return E.jsxs("div",{className:"variant-split-secondary","data-cy":"variant-split-pane","data-variant-id":n,children:[E.jsxs("div",{className:"variant-split-secondary-toolbar",children:[E.jsx("span",{className:"variant-split-secondary-label",title:s,children:s}),E.jsx(Ys,{label:"Collapse",children:E.jsx("button",{type:"button",className:"variant-split-secondary-close",onClick:x,"aria-label":"Collapse split view",children:E.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true",focusable:"false",children:E.jsx("path",{d:"M2.5 2.5 L9.5 9.5 M9.5 2.5 L2.5 9.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})})})]}),E.jsx("div",{className:"variant-split-secondary-body relative min-h-0 flex-1",children:E.jsx(iR,{target:y,src:b,framework:"static",remountKey:C})})]})}const E8=["#f59e0b","#38bdf8","#34d399","#a78bfa","#fb7185","#22d3ee","#fb923c","#a3e635","#e879f9","#2dd4bf"];function TZ(t){let e=0;for(let r=0;r<t.length;r++)e=e*31+t.charCodeAt(r)|0;const n=E8[Math.abs(e)%E8.length];return{color:n,backgroundColor:`${n}22`}}const C8=240;function AZ(){const t=tt(vf),e=tt(ew),n=v.useRef(null);return v.useEffect(()=>{if(!t||!e||!n.current)return;const r=e.x-C8/2,s=e.y-22;n.current.style.transform=`translate3d(${r}px, ${s}px, 0)`},[t,e]),!t||!e?null:E.jsx("div",{ref:n,"aria-hidden":"true",className:"variant-drag-ghost",style:{width:C8},children:E.jsxs("div",{className:"variant-drag-ghost-body",children:[E.jsxs("div",{className:"variant-drag-ghost-row",children:[E.jsx("div",{className:"variant-drag-ghost-title",children:t.label}),t.runLabel?E.jsx("div",{className:"variant-drag-ghost-tag",style:TZ(t.runLabel),children:t.runLabel}):null]}),t.description?E.jsx("div",{className:"variant-drag-ghost-desc",children:t.description}):null]})})}function IZ(){const t=tt(vf),e=tt(ew),n=tt(yo),r=at(vf),s=at(yo),i=Ff(),a=v.useRef(null),[u,c]=v.useState(null),[d,f]=v.useState("hidden");v.useEffect(()=>{if(!t){f("hidden"),c(null);return}const _=requestAnimationFrame(()=>f("visible"));return()=>cancelAnimationFrame(_)},[t]);const p=v.useCallback((_,x)=>{const y=a.current;if(!y)return null;const w=y.getBoundingClientRect();return _<w.left||_>w.right||x<w.top||x>w.bottom?null:_<(w.left+w.right)/2?"left":"right"},[]);if(v.useEffect(()=>{if(!t||!e)return;const _=p(e.x,e.y);c(x=>x===_?x:_)},[t,e,p]),v.useEffect(()=>{if(!t)return;const _=x=>{const y=p(x.clientX,x.clientY);if(y&&t.url){const w={sessionId:t.sessionId,variantId:t.variantId,label:t.label,url:t.url,source:t.source},b=n==null?void 0:n[y];b&&(b.sessionId!==w.sessionId||b.variantId!==w.variantId)&&wf(b);const C={...n??{},[y]:w};s(C);const P=c0(n?"updated":"started",C);i==null||i.capture(P.event,P.properties),f("exiting"),window.setTimeout(()=>r(null),220)}else wf(t),f("exiting"),window.setTimeout(()=>r(null),220)};return window.addEventListener("pointerup",_),window.addEventListener("pointercancel",_),()=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",_)}},[t,p,i,r,s,n]),!t)return null;const m=["variant-drop-zones",d==="visible"&&"is-visible",d==="exiting"&&"is-exiting"].filter(Boolean).join(" ");return E.jsxs("div",{ref:a,className:m,"aria-hidden":"true",children:[E.jsx(k8,{side:"left",hovered:u==="left",canDrop:!!t.url,label:t.label}),E.jsx(k8,{side:"right",hovered:u==="right",canDrop:!!t.url,label:t.label})]})}function k8({side:t,hovered:e,canDrop:n,label:r}){return E.jsxs("div",{className:["variant-drop-zone",`is-${t}`,e&&"is-hover",!n&&"is-disabled"].filter(Boolean).join(" "),children:[E.jsxs("div",{className:"variant-drop-zone-inner",children:[E.jsx("div",{className:`variant-drop-zone-icon is-${t}`}),E.jsx("div",{className:"variant-drop-zone-caption",children:n?`Add ${t} split`:"Split unavailable for this direction"})]}),E.jsx("div",{className:"variant-drop-zone-preview","aria-hidden":"true",children:E.jsx("div",{className:"variant-drop-zone-preview-label",children:r})}),E.jsx("div",{className:"variant-drop-zone-border"})]})}const aR=(t,e,n)=>{var i,a;if(!t.active||t.sessionId!==e)return null;const r=t.variants.find(u=>u.workItemId===n);if(((i=r==null?void 0:r.preview)==null?void 0:i.kind)!=="static_artifact")return null;if(((a=r.refinement)==null?void 0:a.status)!=="succeeded")return r.preview.url;const s=r.preview.url.includes("?")?"&":"?";return`${r.preview.url}${s}refinement=${encodeURIComponent(r.refinement.workItemId)}`},P8=(t,e)=>{if(!t)return;const n=aR(e,t.sessionId,t.variantId);return!n||n===t.url?t:{...t,url:n}},RZ=()=>E.jsx("div",{"data-testid":"preview-boot-skeleton",role:"status","aria-busy":"true","aria-label":"Loading preview",className:"bg-main flex h-full min-h-0 w-full flex-1 flex-col p-3",children:E.jsx("div",{className:"border-main-border relative min-h-0 flex-1 overflow-hidden rounded-lg border",children:E.jsx(tR,{trackGlobalLoaderCount:!1})})}),MZ=({isLoading:t=!1,isInteractionDisabled:e=!1})=>{const{config:n,fetchConfig:r,isLoading:s,error:i}=BK();return v.useEffect(()=>{r().catch(a=>{Ee==null||Ee.capture("preview_config_load_failed",{message:a instanceof Error?a.message:"unknown_error",attempts:v8})})},[r]),s?E.jsx(RZ,{}):i||!n?E.jsx(gw,{fill:"surface",size:"sm",state:"preview_config_error",title:"Couldn't load preview",description:"We couldn't load the preview configuration.",actions:[{label:"Retry",onClick:()=>{Ee==null||Ee.capture("preview_config_retry_clicked"),r().catch(a=>{Ee==null||Ee.capture("preview_config_load_failed",{message:a instanceof Error?a.message:"unknown_error",attempts:v8})})}}]}):E.jsx(OZ,{isLoading:t,isInteractionDisabled:e,framework:n.framework,userPort:n.userPort})};function OZ(t){const e=tt(yo),n=tt(vf),r=tt(Bf),s=tt(i0),i=e==null?void 0:e.left,a=e==null?void 0:e.right,u=v.useMemo(()=>{var A,R;if(!r.active||r.projectContext.kind!=="fresh"||!(!!i!=!!a))return;const y=(A=i??a)==null?void 0:A.variantId,w=r.variants.filter(L=>{var I;return L.status==="succeeded"&&((I=L.preview)==null?void 0:I.kind)==="static_artifact"&&L.workItemId!==y}),b=s==null?void 0:s.replace(/[?&]refinement=[^&]*$/,""),P=w.find(L=>{var I;return((I=L.preview)==null?void 0:I.kind)==="static_artifact"&&L.preview.url===b})??w[0];if(((R=P==null?void 0:P.preview)==null?void 0:R.kind)!=="static_artifact")return;const T=aR(r,r.sessionId,P.workItemId);if(T)return{sessionId:r.sessionId,variantId:P.workItemId,label:P.label,url:T,source:"live"}},[r,i,a,s]),c=P8(i,r)??(a?u:void 0),d=P8(a,r)??(i?u:void 0),f=!i&&!!c,p=!a&&!!d,m=!!(c||d),_=E.jsx(PZ,{isInteractionDisabled:t.isInteractionDisabled,framework:t.framework,userPort:t.userPort});return E.jsx("div",{className:"relative flex h-full min-h-0 w-full flex-1 flex-col",children:E.jsxs("div",{className:`variant-preview-region relative flex h-full min-h-0 w-full flex-1 flex-col ${n?"is-dragging":""} ${m?"is-split":""}`,children:[E.jsxs("div",{className:"variant-preview-row flex h-full min-h-0 w-full flex-1",children:[c&&E.jsx(S8,{side:"left",sessionId:c.sessionId,variantId:c.variantId,url:c.url,label:c.label,source:c.source,isFallback:f},`left-${c.sessionId}:${c.variantId}:${c.url}`),!(c&&d)&&E.jsx("div",{className:"variant-preview-primary flex h-full min-h-0 flex-1 flex-col",children:_}),d&&E.jsx(S8,{side:"right",sessionId:d.sessionId,variantId:d.variantId,url:d.url,label:d.label,source:d.source,isFallback:p},`right-${d.sessionId}:${d.variantId}:${d.url}`)]}),E.jsx("div",{className:"variant-preview-atmosphere","aria-hidden":"true"}),E.jsx(IZ,{}),E.jsx(AZ,{})]})})}function no(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lR(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
|
|
116
|
-
* GSAP 3.15.0
|
|
117
|
-
* https://gsap.com
|
|
118
|
-
*
|
|
119
|
-
* @license Copyright 2008-2026, GreenSock. All rights reserved.
|
|
120
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
121
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
122
|
-
*/var us={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},bf={duration:.5,overwrite:!1,delay:0},yw,Jn,Gt,As=1e8,Rt=1/As,h2=Math.PI*2,LZ=h2/4,NZ=0,uR=Math.sqrt,DZ=Math.cos,jZ=Math.sin,Hn=function(e){return typeof e=="string"},pn=function(e){return typeof e=="function"},xo=function(e){return typeof e=="number"},_w=function(e){return typeof e>"u"},Li=function(e){return typeof e=="object"},Ur=function(e){return e!==!1},xw=function(){return typeof window<"u"},$p=function(e){return pn(e)||Hn(e)},cR=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},dr=Array.isArray,FZ=/random\([^)]+\)/g,VZ=/,\s*/g,T8=/(?:-?\.?\d|\.)+/gi,dR=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Ru=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,X1=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fR=/[+-]=-?[.\d]+/,$Z=/[^,'"\[\]\s]+/gi,zZ=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,nn,_i,p2,ww,ds={},d0={},hR,pR=function(e){return(d0=mc(e,ds))&&Gr},bw=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},Sf=function(e,n){return!n&&console.warn(e)},mR=function(e,n){return e&&(ds[e]=n)&&d0&&(d0[e]=n)||ds},Ef=function(){return 0},HZ={suppressEvents:!0,isStart:!0,kill:!1},cm={suppressEvents:!0,kill:!1},UZ={suppressEvents:!0},Sw={},la=[],m2={},vR,ns={},Q1={},A8=30,dm=[],Ew="",Cw=function(e){var n=e[0],r,s;if(Li(n)||pn(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(s=dm.length;s--&&!dm[s].targetTest(n););r=dm[s]}for(s=e.length;s--;)e[s]&&(e[s]._gsap||(e[s]._gsap=new FR(e[s],r)))||e.splice(s,1);return e},Pl=function(e){return e._gsap||Cw(Is(e))[0]._gsap},gR=function(e,n,r){return(r=e[n])&&pn(r)?e[n]():_w(r)&&e.getAttribute&&e.getAttribute(n)||r},Br=function(e,n){return(e=e.split(",")).forEach(n)||e},_n=function(e){return Math.round(e*1e5)/1e5||0},tn=function(e){return Math.round(e*1e7)/1e7||0},Hu=function(e,n){var r=n.charAt(0),s=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+s:r==="-"?e-s:r==="*"?e*s:e/s},BZ=function(e,n){for(var r=n.length,s=0;e.indexOf(n[s])<0&&++s<r;);return s<r},f0=function(){var e=la.length,n=la.slice(0),r,s;for(m2={},la.length=0,r=0;r<e;r++)s=n[r],s&&s._lazy&&(s.render(s._lazy[0],s._lazy[1],!0)._lazy=0)},kw=function(e){return!!(e._initted||e._startAt||e.add)},yR=function(e,n,r,s){la.length&&!Jn&&f0(),e.render(n,r,!!(Jn&&n<0&&kw(e))),la.length&&!Jn&&f0()},_R=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match($Z).length<2?n:Hn(e)?e.trim():e},xR=function(e){return e},fs=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},WZ=function(e){return function(n,r){for(var s in r)s in n||s==="duration"&&e||s==="ease"||(n[s]=r[s])}},mc=function(e,n){for(var r in n)e[r]=n[r];return e},I8=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=Li(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},h0=function(e,n){var r={},s;for(s in e)s in n||(r[s]=e[s]);return r},Gd=function(e){var n=e.parent||nn,r=e.keyframes?WZ(dr(e.keyframes)):fs;if(Ur(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},qZ=function(e,n){for(var r=e.length,s=r===n.length;s&&r--&&e[r]===n[r];);return r<0},wR=function(e,n,r,s,i){var a=e[s],u;if(i)for(u=n[i];a&&a[i]>u;)a=a._prev;return a?(n._next=a._next,a._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[s]=n,n._prev=a,n.parent=n._dp=e,n},W0=function(e,n,r,s){r===void 0&&(r="_first"),s===void 0&&(s="_last");var i=n._prev,a=n._next;i?i._next=a:e[r]===n&&(e[r]=a),a?a._prev=i:e[s]===n&&(e[s]=i),n._next=n._prev=n.parent=null},ga=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Tl=function(e,n){if(e&&(!n||n._end>e._dur||n._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},GZ=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},v2=function(e,n,r,s){return e._startAt&&(Jn?e._startAt.revert(cm):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,s))},KZ=function t(e){return!e||e._ts&&t(e.parent)},R8=function(e){return e._repeat?vc(e._tTime,e=e.duration()+e._rDelay)*e:0},vc=function(e,n){var r=Math.floor(e=tn(e/n));return e&&r===e?r-1:r},p0=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},q0=function(e){return e._end=tn(e._start+(e._tDur/Math.abs(e._ts||e._rts||Rt)||0))},G0=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=tn(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),q0(e),r._dirty||Tl(r,e)),e},bR=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=p0(e.rawTime(),n),(!n._dur||Gf(0,n.totalDuration(),r)-n._tTime>Rt)&&n.render(r,!0)),Tl(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-Rt}},ki=function(e,n,r,s){return n.parent&&ga(n),n._start=tn((xo(r)?r:r||e!==nn?Cs(e,r,n):e._time)+n._delay),n._end=tn(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),wR(e,n,"_first","_last",e._sort?"_start":0),g2(n)||(e._recent=n),s||bR(e,n),e._ts<0&&G0(e,e._tTime),e},SR=function(e,n){return(ds.ScrollTrigger||bw("scrollTrigger",n))&&ds.ScrollTrigger.create(n,e)},ER=function(e,n,r,s,i){if(Tw(e,n,i),!e._initted)return 1;if(!r&&e._pt&&!Jn&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&vR!==rs.frame)return la.push(e),e._lazy=[i,s],1},ZZ=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},g2=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},YZ=function(e,n,r,s){var i=e.ratio,a=n<0||!n&&(!e._start&&ZZ(e)&&!(!e._initted&&g2(e))||(e._ts<0||e._dp._ts<0)&&!g2(e))?0:1,u=e._rDelay,c=0,d,f,p;if(u&&e._repeat&&(c=Gf(0,e._tDur,n),f=vc(c,u),e._yoyo&&f&1&&(a=1-a),f!==vc(e._tTime,u)&&(i=1-a,e.vars.repeatRefresh&&e._initted&&e.invalidate())),a!==i||Jn||s||e._zTime===Rt||!n&&e._zTime){if(!e._initted&&ER(e,n,s,r,c))return;for(p=e._zTime,e._zTime=n||(r?Rt:0),r||(r=n&&!p),e.ratio=a,e._from&&(a=1-a),e._time=0,e._tTime=c,d=e._pt;d;)d.r(a,d.d),d=d._next;n<0&&v2(e,n,r,!0),e._onUpdate&&!r&&is(e,"onUpdate"),c&&e._repeat&&!r&&e.parent&&is(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===a&&(a&&ga(e,1),!r&&!Jn&&(is(e,a?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},XZ=function(e,n,r){var s;if(r>n)for(s=e._first;s&&s._start<=r;){if(s.data==="isPause"&&s._start>n)return s;s=s._next}else for(s=e._last;s&&s._start>=r;){if(s.data==="isPause"&&s._start<n)return s;s=s._prev}},gc=function(e,n,r,s){var i=e._repeat,a=tn(n)||0,u=e._tTime/e._tDur;return u&&!s&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:tn(a*(i+1)+e._rDelay*i):a,u>0&&!s&&G0(e,e._tTime=e._tDur*u),e.parent&&q0(e),r||Tl(e.parent,e),e},M8=function(e){return e instanceof Vr?Tl(e):gc(e,e._dur)},QZ={_start:0,endTime:Ef,totalDuration:Ef},Cs=function t(e,n,r){var s=e.labels,i=e._recent||QZ,a=e.duration()>=As?i.endTime(!1):e._dur,u,c,d;return Hn(n)&&(isNaN(n)||n in s)?(c=n.charAt(0),d=n.substr(-1)==="%",u=n.indexOf("="),c==="<"||c===">"?(u>=0&&(n=n.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(n.substr(1))||0)*(d?(u<0?i:r).totalDuration()/100:1)):u<0?(n in s||(s[n]=a),s[n]):(c=parseFloat(n.charAt(u-1)+n.substr(u+1)),d&&r&&(c=c/100*(dr(r)?r[0]:r).totalDuration()),u>1?t(e,n.substr(0,u-1),r)+c:a+c)):n==null?a:+n},Kd=function(e,n,r){var s=xo(n[1]),i=(s?2:1)+(e<2?0:1),a=n[i],u,c;if(s&&(a.duration=n[1]),a.parent=r,e){for(u=a,c=r;c&&!("immediateRender"in u);)u=c.vars.defaults||{},c=Ur(c.vars.inherit)&&c.parent;a.immediateRender=Ur(u.immediateRender),e<2?a.runBackwards=1:a.startAt=n[i-1]}return new Pn(n[0],a,n[i+1])},ka=function(e,n){return e||e===0?n(e):n},Gf=function(e,n,r){return r<e?e:r>n?n:r},lr=function(e,n){return!Hn(e)||!(n=zZ.exec(e))?"":n[1]},JZ=function(e,n,r){return ka(r,function(s){return Gf(e,n,s)})},y2=[].slice,CR=function(e,n){return e&&Li(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&Li(e[0]))&&!e.nodeType&&e!==_i},eY=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(s){var i;return Hn(s)&&!n||CR(s,1)?(i=r).push.apply(i,Is(s)):r.push(s)})||r},Is=function(e,n,r){return Gt&&!n&&Gt.selector?Gt.selector(e):Hn(e)&&!r&&(p2||!yc())?y2.call((n||ww).querySelectorAll(e),0):dr(e)?eY(e,r):CR(e)?y2.call(e,0):e?[e]:[]},_2=function(e){return e=Is(e)[0]||Sf("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return Is(n,r.querySelectorAll?r:r===e?Sf("Invalid scope")||ww.createElement("div"):e)}},kR=function(e){return e.sort(function(){return .5-Math.random()})},PR=function(e){if(pn(e))return e;var n=Li(e)?e:{each:e},r=Al(n.ease),s=n.from||0,i=parseFloat(n.base)||0,a={},u=s>0&&s<1,c=isNaN(s)||u,d=n.axis,f=s,p=s;return Hn(s)?f=p={center:.5,edges:.5,end:1}[s]||0:!u&&c&&(f=s[0],p=s[1]),function(m,_,x){var y=(x||n).length,w=a[y],b,C,P,T,A,R,L,I,O;if(!w){if(O=n.grid==="auto"?0:(n.grid||[1,As])[1],!O){for(L=-As;L<(L=x[O++].getBoundingClientRect().left)&&O<y;);O<y&&O--}for(w=a[y]=[],b=c?Math.min(O,y)*f-.5:s%O,C=O===As?0:c?y*p/O-.5:s/O|0,L=0,I=As,R=0;R<y;R++)P=R%O-b,T=C-(R/O|0),w[R]=A=d?Math.abs(d==="y"?T:P):uR(P*P+T*T),A>L&&(L=A),A<I&&(I=A);s==="random"&&kR(w),w.max=L-I,w.min=I,w.v=y=(parseFloat(n.amount)||parseFloat(n.each)*(O>y?y-1:d?d==="y"?y/O:O:Math.max(O,y/O))||0)*(s==="edges"?-1:1),w.b=y<0?i-y:i,w.u=lr(n.amount||n.each)||0,r=r&&y<0?hY(r):r}return y=(w[m]-w.min)/w.max||0,tn(w.b+(r?r(y):y)*w.v)+w.u}},x2=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var s=tn(Math.round(parseFloat(r)/e)*e*n);return(s-s%1)/n+(xo(r)?0:lr(r))}},TR=function(e,n){var r=dr(e),s,i;return!r&&Li(e)&&(s=r=e.radius||As,e.values?(e=Is(e.values),(i=!xo(e[0]))&&(s*=s)):e=x2(e.increment)),ka(n,r?pn(e)?function(a){return i=e(a),Math.abs(i-a)<=s?i:a}:function(a){for(var u=parseFloat(i?a.x:a),c=parseFloat(i?a.y:0),d=As,f=0,p=e.length,m,_;p--;)i?(m=e[p].x-u,_=e[p].y-c,m=m*m+_*_):m=Math.abs(e[p]-u),m<d&&(d=m,f=p);return f=!s||d<=s?e[f]:a,i||f===a||xo(a)?f:f+lr(a)}:x2(e))},AR=function(e,n,r,s){return ka(dr(e)?!n:r===!0?!!(r=0):!s,function(){return dr(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(s=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*s)/s})},tY=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(s){return n.reduce(function(i,a){return a(i)},s)}},nY=function(e,n){return function(r){return e(parseFloat(r))+(n||lr(r))}},rY=function(e,n,r){return RR(e,n,0,1,r)},IR=function(e,n,r){return ka(r,function(s){return e[~~n(s)]})},sY=function t(e,n,r){var s=n-e;return dr(e)?IR(e,t(0,e.length),n):ka(r,function(i){return(s+(i-e)%s)%s+e})},iY=function t(e,n,r){var s=n-e,i=s*2;return dr(e)?IR(e,t(0,e.length-1),n):ka(r,function(a){return a=(i+(a-e)%i)%i||0,e+(a>s?i-a:a)})},Cf=function(e){return e.replace(FZ,function(n){var r=n.indexOf("[")+1,s=n.substring(r||7,r?n.indexOf("]"):n.length-1).split(VZ);return AR(r?s:+s[0],r?0:+s[1],+s[2]||1e-5)})},RR=function(e,n,r,s,i){var a=n-e,u=s-r;return ka(i,function(c){return r+((c-e)/a*u||0)})},oY=function t(e,n,r,s){var i=isNaN(e+n)?0:function(_){return(1-_)*e+_*n};if(!i){var a=Hn(e),u={},c,d,f,p,m;if(r===!0&&(s=1)&&(r=null),a)e={p:e},n={p:n};else if(dr(e)&&!dr(n)){for(f=[],p=e.length,m=p-2,d=1;d<p;d++)f.push(t(e[d-1],e[d]));p--,i=function(x){x*=p;var y=Math.min(m,~~x);return f[y](x-y)},r=n}else s||(e=mc(dr(e)?[]:{},e));if(!f){for(c in n)Pw.call(u,e,c,"get",n[c]);i=function(x){return Rw(x,u)||(a?e.p:e)}}}return ka(r,i)},O8=function(e,n,r){var s=e.labels,i=As,a,u,c;for(a in s)u=s[a]-n,u<0==!!r&&u&&i>(u=Math.abs(u))&&(c=a,i=u);return c},is=function(e,n,r){var s=e.vars,i=s[n],a=Gt,u=e._ctx,c,d,f;if(i)return c=s[n+"Params"],d=s.callbackScope||e,r&&la.length&&f0(),u&&(Gt=u),f=c?i.apply(d,c):i.call(d),Gt=a,f},Ld=function(e){return ga(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Jn),e.progress()<1&&is(e,"onInterrupt"),e},Mu,MR=[],OR=function(e){if(e)if(e=!e.name&&e.default||e,xw()||e.headless){var n=e.name,r=pn(e),s=n&&!r&&e.init?function(){this._props=[]}:e,i={init:Ef,render:Rw,add:Pw,kill:SY,modifier:bY,rawVars:0},a={targetTest:0,get:0,getSetter:Iw,aliases:{},register:0};if(yc(),e!==s){if(ns[n])return;fs(s,fs(h0(e,i),a)),mc(s.prototype,mc(i,h0(e,a))),ns[s.prop=n]=s,e.targetTest&&(dm.push(s),Sw[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}mR(n,s),e.register&&e.register(Gr,s,Wr)}else MR.push(e)},It=255,Nd={aqua:[0,It,It],lime:[0,It,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,It],navy:[0,0,128],white:[It,It,It],olive:[128,128,0],yellow:[It,It,0],orange:[It,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[It,0,0],pink:[It,192,203],cyan:[0,It,It],transparent:[It,It,It,0]},J1=function(e,n,r){return e+=e<0?1:e>1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3<2?n+(r-n)*(2/3-e)*6:n)*It+.5|0},LR=function(e,n,r){var s=e?xo(e)?[e>>16,e>>8&It,e&It]:0:Nd.black,i,a,u,c,d,f,p,m,_,x;if(!s){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Nd[e])s=Nd[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),a=e.charAt(2),u=e.charAt(3),e="#"+i+i+a+a+u+u+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return s=parseInt(e.substr(1,6),16),[s>>16,s>>8&It,s&It,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),s=[e>>16,e>>8&It,e&It]}else if(e.substr(0,3)==="hsl"){if(s=x=e.match(T8),!n)c=+s[0]%360/360,d=+s[1]/100,f=+s[2]/100,a=f<=.5?f*(d+1):f+d-f*d,i=f*2-a,s.length>3&&(s[3]*=1),s[0]=J1(c+1/3,i,a),s[1]=J1(c,i,a),s[2]=J1(c-1/3,i,a);else if(~e.indexOf("="))return s=e.match(dR),r&&s.length<4&&(s[3]=1),s}else s=e.match(T8)||Nd.transparent;s=s.map(Number)}return n&&!x&&(i=s[0]/It,a=s[1]/It,u=s[2]/It,p=Math.max(i,a,u),m=Math.min(i,a,u),f=(p+m)/2,p===m?c=d=0:(_=p-m,d=f>.5?_/(2-p-m):_/(p+m),c=p===i?(a-u)/_+(a<u?6:0):p===a?(u-i)/_+2:(i-a)/_+4,c*=60),s[0]=~~(c+.5),s[1]=~~(d*100+.5),s[2]=~~(f*100+.5)),r&&s.length<4&&(s[3]=1),s},NR=function(e){var n=[],r=[],s=-1;return e.split(ua).forEach(function(i){var a=i.match(Ru)||[];n.push.apply(n,a),r.push(s+=a.length+1)}),n.c=r,n},L8=function(e,n,r){var s="",i=(e+s).match(ua),a=n?"hsla(":"rgba(",u=0,c,d,f,p;if(!i)return e;if(i=i.map(function(m){return(m=LR(m,n,1))&&a+(n?m[0]+","+m[1]+"%,"+m[2]+"%,"+m[3]:m.join(","))+")"}),r&&(f=NR(e),c=r.c,c.join(s)!==f.c.join(s)))for(d=e.replace(ua,"1").split(Ru),p=d.length-1;u<p;u++)s+=d[u]+(~c.indexOf(u)?i.shift()||a+"0,0,0,0)":(f.length?f:i.length?i:r).shift());if(!d)for(d=e.split(ua),p=d.length-1;u<p;u++)s+=d[u]+i[u];return s+d[p]},ua=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Nd)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),aY=/hsl[a]?\(/,DR=function(e){var n=e.join(" "),r;if(ua.lastIndex=0,ua.test(n))return r=aY.test(n),e[1]=L8(e[1],r),e[0]=L8(e[0],r,NR(e[1])),!0},kf,rs=(function(){var t=Date.now,e=500,n=33,r=t(),s=r,i=1e3/240,a=i,u=[],c,d,f,p,m,_,x=function y(w){var b=t()-s,C=w===!0,P,T,A,R;if((b>e||b<0)&&(r+=b-n),s+=b,A=s-r,P=A-a,(P>0||C)&&(R=++p.frame,m=A-p.time*1e3,p.time=A=A/1e3,a+=P+(P>=i?4:i-P),T=1),C||(c=d(y)),T)for(_=0;_<u.length;_++)u[_](A,m,R,w)};return p={time:0,frame:0,tick:function(){x(!0)},deltaRatio:function(w){return m/(1e3/(w||60))},wake:function(){hR&&(!p2&&xw()&&(_i=p2=window,ww=_i.document||{},ds.gsap=Gr,(_i.gsapVersions||(_i.gsapVersions=[])).push(Gr.version),pR(d0||_i.GreenSockGlobals||!_i.gsap&&_i||{}),MR.forEach(OR)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),d=f||function(w){return setTimeout(w,a-p.time*1e3+1|0)},kf=1,x(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(c),kf=0,d=Ef},lagSmoothing:function(w,b){e=w||1/0,n=Math.min(b||33,e)},fps:function(w){i=1e3/(w||240),a=p.time*1e3+i},add:function(w,b,C){var P=b?function(T,A,R,L){w(T,A,R,L),p.remove(P)}:w;return p.remove(w),u[C?"unshift":"push"](P),yc(),P},remove:function(w,b){~(b=u.indexOf(w))&&u.splice(b,1)&&_>=b&&_--},_listeners:u},p})(),yc=function(){return!kf&&rs.wake()},ft={},lY=/^[\d.\-M][\d.\-,\s]/,uY=/["']/g,cY=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),s=r[0],i=1,a=r.length,u,c,d;i<a;i++)c=r[i],u=i!==a-1?c.lastIndexOf(","):c.length,d=c.substr(0,u),n[s]=isNaN(d)?d.replace(uY,"").trim():+d,s=c.substr(u+1).trim();return n},dY=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),s=e.indexOf("(",n);return e.substring(n,~s&&s<r?e.indexOf(")",r+1):r)},fY=function(e){var n=(e+"").split("("),r=ft[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[cY(n[1])]:dY(e).split(",").map(_R)):ft._CE&&lY.test(e)?ft._CE("",e):r},hY=function(e){return function(n){return 1-e(1-n)}},Al=function(e,n){return e&&(pn(e)?e:ft[e]||fY(e))||n},Dl=function(e,n,r,s){r===void 0&&(r=function(c){return 1-n(1-c)}),s===void 0&&(s=function(c){return c<.5?n(c*2)/2:1-n((1-c)*2)/2});var i={easeIn:n,easeOut:r,easeInOut:s},a;return Br(e,function(u){ft[u]=ds[u]=i,ft[a=u.toLowerCase()]=r;for(var c in i)ft[a+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=ft[u+"."+c]=i[c]}),i},jR=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},ey=function t(e,n,r){var s=n>=1?n:1,i=(r||(e?.3:.45))/(n<1?n:1),a=i/h2*(Math.asin(1/s)||0),u=function(f){return f===1?1:s*Math.pow(2,-10*f)*jZ((f-a)*i)+1},c=e==="out"?u:e==="in"?function(d){return 1-u(1-d)}:jR(u);return i=h2/i,c.config=function(d,f){return t(e,d,f)},c},ty=function t(e,n){n===void 0&&(n=1.70158);var r=function(a){return a?--a*a*((n+1)*a+n)+1:0},s=e==="out"?r:e==="in"?function(i){return 1-r(1-i)}:jR(r);return s.config=function(i){return t(e,i)},s};Br("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Dl(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});ft.Linear.easeNone=ft.none=ft.Linear.easeIn;Dl("Elastic",ey("in"),ey("out"),ey());(function(t,e){var n=1/e,r=2*n,s=2.5*n,i=function(u){return u<n?t*u*u:u<r?t*Math.pow(u-1.5/e,2)+.75:u<s?t*(u-=2.25/e)*u+.9375:t*Math.pow(u-2.625/e,2)+.984375};Dl("Bounce",function(a){return 1-i(1-a)},i)})(7.5625,2.75);Dl("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Dl("Circ",function(t){return-(uR(1-t*t)-1)});Dl("Sine",function(t){return t===1?1:-DZ(t*LZ)+1});Dl("Back",ty("in"),ty("out"),ty());ft.SteppedEase=ft.steps=ds.SteppedEase={config:function(e,n){e===void 0&&(e=1);var r=1/e,s=e+(n?0:1),i=n?1:0,a=1-Rt;return function(u){return((s*Gf(0,a,u)|0)+i)*r}}};bf.ease=ft["quad.out"];Br("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Ew+=t+","+t+"Params,"});var FR=function(e,n){this.id=NZ++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:gR,this.set=n?n.getSetter:Iw},Pf=(function(){function t(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,gc(this,+n.duration,1,1),this.data=n.data,Gt&&(this._ctx=Gt,Gt.data.push(this)),kf||rs.wake()}var e=t.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,gc(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,s){if(yc(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(G0(this,r),!i._dp||i.parent||bR(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&ki(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!s||this._initted&&Math.abs(this._zTime)===Rt||!this._initted&&this._dur&&r||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),yR(this,r,s)),this},e.time=function(r,s){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+R8(this))%(this._dur+this._rDelay)||(r?this._dur:0),s):this._time},e.totalProgress=function(r,s){return arguments.length?this.totalTime(this.totalDuration()*r,s):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,s){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+R8(this),s):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,s){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*i,s):this._repeat?vc(this._tTime,i)+1:1},e.timeScale=function(r,s){if(!arguments.length)return this._rts===-Rt?0:this._rts;if(this._rts===r)return this;var i=this.parent&&this._ts?p0(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-Rt?0:this._rts,this.totalTime(Gf(-Math.abs(this._delay),this.totalDuration(),i),s!==!1),q0(this),GZ(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(yc(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Rt&&(this._tTime-=Rt)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=tn(r);var s=this.parent||this._dp;return s&&(s._sort||!this.parent)&&ki(s,this,this._start-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Ur(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var s=this.parent||this._dp;return s?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?p0(s.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=UZ);var s=Jn;return Jn=r,kw(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),Jn=s,this},e.globalTime=function(r){for(var s=this,i=arguments.length?r:s.rawTime();s;)i=s._start+i/(Math.abs(s._ts)||1),s=s._dp;return!this.parent&&this._sat?this._sat.globalTime(r):i},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,M8(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var s=this._time;return this._rDelay=r,M8(this),s?this.time(s):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,s){return this.totalTime(Cs(this,r),Ur(s))},e.restart=function(r,s){return this.play().totalTime(r?-this._delay:0,Ur(s)),this._dur||(this._zTime=-Rt),this},e.play=function(r,s){return r!=null&&this.seek(r,s),this.reversed(!1).paused(!1)},e.reverse=function(r,s){return r!=null&&this.seek(r||this.totalDuration(),s),this.reversed(!0).paused(!1)},e.pause=function(r,s){return r!=null&&this.seek(r,s),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-Rt:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Rt,this},e.isActive=function(){var r=this.parent||this._dp,s=this._start,i;return!!(!r||this._ts&&this._initted&&r.isActive()&&(i=r.rawTime(!0))>=s&&i<this.endTime(!0)-Rt)},e.eventCallback=function(r,s,i){var a=this.vars;return arguments.length>1?(s?(a[r]=s,i&&(a[r+"Params"]=i),r==="onUpdate"&&(this._onUpdate=s)):delete a[r],this):a[r]},e.then=function(r){var s=this,i=s._prom;return new Promise(function(a){var u=pn(r)?r:xR,c=function(){var f=s.then;s.then=null,i&&i(),pn(u)&&(u=u(s))&&(u.then||u===s)&&(s.then=f),a(u),s.then=f};s._initted&&s.totalProgress()===1&&s._ts>=0||!s._tTime&&s._ts<0?c():s._prom=c})},e.kill=function(){Ld(this)},t})();fs(Pf.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Rt,_prom:0,_ps:!1,_rts:1});var Vr=(function(t){lR(e,t);function e(r,s){var i;return r===void 0&&(r={}),i=t.call(this,r)||this,i.labels={},i.smoothChildTiming=!!r.smoothChildTiming,i.autoRemoveChildren=!!r.autoRemoveChildren,i._sort=Ur(r.sortChildren),nn&&ki(r.parent||nn,no(i),s),r.reversed&&i.reverse(),r.paused&&i.paused(!0),r.scrollTrigger&&SR(no(i),r.scrollTrigger),i}var n=e.prototype;return n.to=function(s,i,a){return Kd(0,arguments,this),this},n.from=function(s,i,a){return Kd(1,arguments,this),this},n.fromTo=function(s,i,a,u){return Kd(2,arguments,this),this},n.set=function(s,i,a){return i.duration=0,i.parent=this,Gd(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new Pn(s,i,Cs(this,a),1),this},n.call=function(s,i,a){return ki(this,Pn.delayedCall(0,s,i),a)},n.staggerTo=function(s,i,a,u,c,d,f){return a.duration=i,a.stagger=a.stagger||u,a.onComplete=d,a.onCompleteParams=f,a.parent=this,new Pn(s,a,Cs(this,c)),this},n.staggerFrom=function(s,i,a,u,c,d,f){return a.runBackwards=1,Gd(a).immediateRender=Ur(a.immediateRender),this.staggerTo(s,i,a,u,c,d,f)},n.staggerFromTo=function(s,i,a,u,c,d,f,p){return u.startAt=a,Gd(u).immediateRender=Ur(u.immediateRender),this.staggerTo(s,i,u,c,d,f,p)},n.render=function(s,i,a){var u=this._time,c=this._dirty?this.totalDuration():this._tDur,d=this._dur,f=s<=0?0:tn(s),p=this._zTime<0!=s<0&&(this._initted||!d),m,_,x,y,w,b,C,P,T,A,R,L;if(this!==nn&&f>c&&s>=0&&(f=c),f!==this._tTime||a||p){if(u!==this._time&&d&&(f+=this._time-u,s+=this._time-u),m=f,T=this._start,P=this._ts,b=!P,p&&(d||(u=this._zTime),(s||!i)&&(this._zTime=s)),this._repeat){if(R=this._yoyo,w=d+this._rDelay,this._repeat<-1&&s<0)return this.totalTime(w*100+s,i,a);if(m=tn(f%w),f===c?(y=this._repeat,m=d):(A=tn(f/w),y=~~A,y&&y===A&&(m=d,y--),m>d&&(m=d)),A=vc(this._tTime,w),!u&&this._tTime&&A!==y&&this._tTime-A*w-this._dur<=0&&(A=y),R&&y&1&&(m=d-m,L=1),y!==A&&!this._lock){var I=R&&A&1,O=I===(R&&y&1);if(y<A&&(I=!I),u=I?0:f%d?d:f,this._lock=1,this.render(u||(L?0:tn(y*w)),i,!d)._lock=0,this._tTime=f,!i&&this.parent&&is(this,"onRepeat"),this.vars.repeatRefresh&&!L&&(this.invalidate()._lock=1,A=y),u&&u!==this._time||b!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(d=this._dur,c=this._tDur,O&&(this._lock=2,u=I?d:-1e-4,this.render(u,!0),this.vars.repeatRefresh&&!L&&this.invalidate()),this._lock=0,!this._ts&&!b)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(C=XZ(this,tn(u),tn(m)),C&&(f-=m-(m=C._start))),this._tTime=f,this._time=m,this._act=!!P,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=s,u=0),!u&&f&&d&&!i&&!A&&(is(this,"onStart"),this._tTime!==f))return this;if(m>=u&&s>=0)for(_=this._first;_;){if(x=_._next,(_._act||m>=_._start)&&_._ts&&C!==_){if(_.parent!==this)return this.render(s,i,a);if(_.render(_._ts>0?(m-_._start)*_._ts:(_._dirty?_.totalDuration():_._tDur)+(m-_._start)*_._ts,i,a),m!==this._time||!this._ts&&!b){C=0,x&&(f+=this._zTime=-Rt);break}}_=x}else{_=this._last;for(var N=s<0?s:m;_;){if(x=_._prev,(_._act||N<=_._end)&&_._ts&&C!==_){if(_.parent!==this)return this.render(s,i,a);if(_.render(_._ts>0?(N-_._start)*_._ts:(_._dirty?_.totalDuration():_._tDur)+(N-_._start)*_._ts,i,a||Jn&&kw(_)),m!==this._time||!this._ts&&!b){C=0,x&&(f+=this._zTime=N?-Rt:Rt);break}}_=x}}if(C&&!i&&(this.pause(),C.render(m>=u?0:-Rt)._zTime=m>=u?1:-1,this._ts))return this._start=T,q0(this),this.render(s,i,a);this._onUpdate&&!i&&is(this,"onUpdate",!0),(f===c&&this._tTime>=this.totalDuration()||!f&&u)&&(T===this._start||Math.abs(P)!==Math.abs(this._ts))&&(this._lock||((s||!d)&&(f===c&&this._ts>0||!f&&this._ts<0)&&ga(this,1),!i&&!(s<0&&!u)&&(f||u||!c)&&(is(this,f===c&&s>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(f<c&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(s,i){var a=this;if(xo(i)||(i=Cs(this,i,s)),!(s instanceof Pf)){if(dr(s))return s.forEach(function(u){return a.add(u,i)}),this;if(Hn(s))return this.addLabel(s,i);if(pn(s))s=Pn.delayedCall(0,s);else return this}return this!==s?ki(this,s,i):this},n.getChildren=function(s,i,a,u){s===void 0&&(s=!0),i===void 0&&(i=!0),a===void 0&&(a=!0),u===void 0&&(u=-As);for(var c=[],d=this._first;d;)d._start>=u&&(d instanceof Pn?i&&c.push(d):(a&&c.push(d),s&&c.push.apply(c,d.getChildren(!0,i,a)))),d=d._next;return c},n.getById=function(s){for(var i=this.getChildren(1,1,1),a=i.length;a--;)if(i[a].vars.id===s)return i[a]},n.remove=function(s){return Hn(s)?this.removeLabel(s):pn(s)?this.killTweensOf(s):(s.parent===this&&W0(this,s),s===this._recent&&(this._recent=this._last),Tl(this))},n.totalTime=function(s,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=tn(rs.time-(this._ts>0?s/this._ts:(this.totalDuration()-s)/-this._ts))),t.prototype.totalTime.call(this,s,i),this._forcing=0,this):this._tTime},n.addLabel=function(s,i){return this.labels[s]=Cs(this,i),this},n.removeLabel=function(s){return delete this.labels[s],this},n.addPause=function(s,i,a){var u=Pn.delayedCall(0,i||Ef,a);return u.data="isPause",this._hasPause=1,ki(this,u,Cs(this,s))},n.removePause=function(s){var i=this._first;for(s=Cs(this,s);i;)i._start===s&&i.data==="isPause"&&ga(i),i=i._next},n.killTweensOf=function(s,i,a){for(var u=this.getTweensOf(s,a),c=u.length;c--;)ra!==u[c]&&u[c].kill(s,i);return this},n.getTweensOf=function(s,i){for(var a=[],u=Is(s),c=this._first,d=xo(i),f;c;)c instanceof Pn?BZ(c._targets,u)&&(d?(!ra||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&a.push(c):(f=c.getTweensOf(u,i)).length&&a.push.apply(a,f),c=c._next;return a},n.tweenTo=function(s,i){i=i||{};var a=this,u=Cs(a,s),c=i,d=c.startAt,f=c.onStart,p=c.onStartParams,m=c.immediateRender,_,x=Pn.to(a,fs({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:u,overwrite:"auto",duration:i.duration||Math.abs((u-(d&&"time"in d?d.time:a._time))/a.timeScale())||Rt,onStart:function(){if(a.pause(),!_){var w=i.duration||Math.abs((u-(d&&"time"in d?d.time:a._time))/a.timeScale());x._dur!==w&&gc(x,w,0,1).render(x._time,!0,!0),_=1}f&&f.apply(x,p||[])}},i));return m?x.render(0):x},n.tweenFromTo=function(s,i,a){return this.tweenTo(i,fs({startAt:{time:Cs(this,s)}},a))},n.recent=function(){return this._recent},n.nextLabel=function(s){return s===void 0&&(s=this._time),O8(this,Cs(this,s))},n.previousLabel=function(s){return s===void 0&&(s=this._time),O8(this,Cs(this,s),1)},n.currentLabel=function(s){return arguments.length?this.seek(s,!0):this.previousLabel(this._time+Rt)},n.shiftChildren=function(s,i,a){a===void 0&&(a=0);var u=this._first,c=this.labels,d;for(s=tn(s);u;)u._start>=a&&(u._start+=s,u._end+=s),u=u._next;if(i)for(d in c)c[d]>=a&&(c[d]+=s);return Tl(this)},n.invalidate=function(s){var i=this._first;for(this._lock=0;i;)i.invalidate(s),i=i._next;return t.prototype.invalidate.call(this,s)},n.clear=function(s){s===void 0&&(s=!0);for(var i=this._first,a;i;)a=i._next,this.remove(i),i=a;return this._dp&&(this._time=this._tTime=this._pTime=0),s&&(this.labels={}),Tl(this)},n.totalDuration=function(s){var i=0,a=this,u=a._last,c=As,d,f,p;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-s:s));if(a._dirty){for(p=a.parent;u;)d=u._prev,u._dirty&&u.totalDuration(),f=u._start,f>c&&a._sort&&u._ts&&!a._lock?(a._lock=1,ki(a,u,f-u._delay,1)._lock=0):c=f,f<0&&u._ts&&(i-=f,(!p&&!a._dp||p&&p.smoothChildTiming)&&(a._start+=tn(f/a._ts),a._time-=f,a._tTime-=f),a.shiftChildren(-f,!1,-1/0),c=0),u._end>i&&u._ts&&(i=u._end),u=d;gc(a,a===nn&&a._time>i?a._time:i,1,1),a._dirty=0}return a._tDur},e.updateRoot=function(s){if(nn._ts&&(yR(nn,p0(s,nn)),vR=rs.frame),rs.frame>=A8){A8+=us.autoSleep||120;var i=nn._first;if((!i||!i._ts)&&us.autoSleep&&rs._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||rs.sleep()}}},e})(Pf);fs(Vr.prototype,{_lock:0,_hasPause:0,_forcing:0});var pY=function(e,n,r,s,i,a,u){var c=new Wr(this._pt,e,n,0,1,BR,null,i),d=0,f=0,p,m,_,x,y,w,b,C;for(c.b=r,c.e=s,r+="",s+="",(b=~s.indexOf("random("))&&(s=Cf(s)),a&&(C=[r,s],a(C,e,n),r=C[0],s=C[1]),m=r.match(X1)||[];p=X1.exec(s);)x=p[0],y=s.substring(d,p.index),_?_=(_+1)%5:y.substr(-5)==="rgba("&&(_=1),x!==m[f++]&&(w=parseFloat(m[f-1])||0,c._pt={_next:c._pt,p:y||f===1?y:",",s:w,c:x.charAt(1)==="="?Hu(w,x)-w:parseFloat(x)-w,m:_&&_<4?Math.round:0},d=X1.lastIndex);return c.c=d<s.length?s.substring(d,s.length):"",c.fp=u,(fR.test(s)||b)&&(c.e=0),this._pt=c,c},Pw=function(e,n,r,s,i,a,u,c,d,f){pn(s)&&(s=s(i||0,e,a));var p=e[n],m=r!=="get"?r:pn(p)?d?e[n.indexOf("set")||!pn(e["get"+n.substr(3)])?n:"get"+n.substr(3)](d):e[n]():p,_=pn(p)?d?_Y:HR:Aw,x;if(Hn(s)&&(~s.indexOf("random(")&&(s=Cf(s)),s.charAt(1)==="="&&(x=Hu(m,s)+(lr(m)||0),(x||x===0)&&(s=x))),!f||m!==s||w2)return!isNaN(m*s)&&s!==""?(x=new Wr(this._pt,e,n,+m||0,s-(m||0),typeof p=="boolean"?wY:UR,0,_),d&&(x.fp=d),u&&x.modifier(u,this,e),this._pt=x):(!p&&!(n in e)&&bw(n,s),pY.call(this,e,n,m,s,_,c||us.stringFilter,d))},mY=function(e,n,r,s,i){if(pn(e)&&(e=Zd(e,i,n,r,s)),!Li(e)||e.style&&e.nodeType||dr(e)||cR(e))return Hn(e)?Zd(e,i,n,r,s):e;var a={},u;for(u in e)a[u]=Zd(e[u],i,n,r,s);return a},VR=function(e,n,r,s,i,a){var u,c,d,f;if(ns[e]&&(u=new ns[e]).init(i,u.rawVars?n[e]:mY(n[e],s,i,a,r),r,s,a)!==!1&&(r._pt=c=new Wr(r._pt,i,e,0,1,u.render,u,0,u.priority),r!==Mu))for(d=r._ptLookup[r._targets.indexOf(i)],f=u._props.length;f--;)d[u._props[f]]=c;return u},ra,w2,Tw=function t(e,n,r){var s=e.vars,i=s.ease,a=s.startAt,u=s.immediateRender,c=s.lazy,d=s.onUpdate,f=s.runBackwards,p=s.yoyoEase,m=s.keyframes,_=s.autoRevert,x=e._dur,y=e._startAt,w=e._targets,b=e.parent,C=b&&b.data==="nested"?b.vars.targets:w,P=e._overwrite==="auto"&&!yw,T=e.timeline,A=s.easeReverse||p,R,L,I,O,N,j,F,G,Q,Z,W,q,z;if(T&&(!m||!i)&&(i="none"),e._ease=Al(i,bf.ease),e._rEase=A&&(Al(A)||e._ease),e._from=!T&&!!s.runBackwards,e._from&&(e.ratio=1),!T||m&&!s.stagger){if(G=w[0]?Pl(w[0]).harness:0,q=G&&s[G.prop],R=h0(s,Sw),y&&(y._zTime<0&&y.progress(1),n<0&&f&&u&&!_?y.render(-1,!0):y.revert(f&&x?cm:HZ),y._lazy=0),a){if(ga(e._startAt=Pn.set(w,fs({data:"isStart",overwrite:!1,parent:b,immediateRender:!0,lazy:!y&&Ur(c),startAt:null,delay:0,onUpdate:d&&function(){return is(e,"onUpdate")},stagger:0},a))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(Jn||!u&&!_)&&e._startAt.revert(cm),u&&x&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(f&&x&&!y){if(n&&(u=!1),I=fs({overwrite:!1,data:"isFromStart",lazy:u&&!y&&Ur(c),immediateRender:u,stagger:0,parent:b},R),q&&(I[G.prop]=q),ga(e._startAt=Pn.set(w,I)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(Jn?e._startAt.revert(cm):e._startAt.render(-1,!0)),e._zTime=n,!u)t(e._startAt,Rt,Rt);else if(!n)return}for(e._pt=e._ptCache=0,c=x&&Ur(c)||c&&!x,L=0;L<w.length;L++){if(N=w[L],F=N._gsap||Cw(w)[L]._gsap,e._ptLookup[L]=Z={},m2[F.id]&&la.length&&f0(),W=C===w?L:C.indexOf(N),G&&(Q=new G).init(N,q||R,e,W,C)!==!1&&(e._pt=O=new Wr(e._pt,N,Q.name,0,1,Q.render,Q,0,Q.priority),Q._props.forEach(function(X){Z[X]=O}),Q.priority&&(j=1)),!G||q)for(I in R)ns[I]&&(Q=VR(I,R,e,W,N,C))?Q.priority&&(j=1):Z[I]=O=Pw.call(e,N,I,"get",R[I],W,C,0,s.stringFilter);e._op&&e._op[L]&&e.kill(N,e._op[L]),P&&e._pt&&(ra=e,nn.killTweensOf(N,Z,e.globalTime(n)),z=!e.parent,ra=0),e._pt&&c&&(m2[F.id]=1)}j&&WR(e),e._onInit&&e._onInit(e)}e._onUpdate=d,e._initted=(!e._op||e._pt)&&!z,m&&n<=0&&T.render(As,!0,!0)},vY=function(e,n,r,s,i,a,u,c){var d=(e._pt&&e._ptCache||(e._ptCache={}))[n],f,p,m,_;if(!d)for(d=e._ptCache[n]=[],m=e._ptLookup,_=e._targets.length;_--;){if(f=m[_][n],f&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==n&&f.fp!==n;)f=f._next;if(!f)return w2=1,e.vars[n]="+=0",Tw(e,u),w2=0,c?Sf(n+" not eligible for reset. Try splitting into individual properties"):1;d.push(f)}for(_=d.length;_--;)p=d[_],f=p._pt||p,f.s=(s||s===0)&&!i?s:f.s+(s||0)+a*f.c,f.c=r-f.s,p.e&&(p.e=_n(r)+lr(p.e)),p.b&&(p.b=f.s+lr(p.b))},gY=function(e,n){var r=e[0]?Pl(e[0]).harness:0,s=r&&r.aliases,i,a,u,c;if(!s)return n;i=mc({},n);for(a in s)if(a in i)for(c=s[a].split(","),u=c.length;u--;)i[c[u]]=i[a];return i},yY=function(e,n,r,s){var i=n.ease||s||"power1.inOut",a,u;if(dr(n))u=r[e]||(r[e]=[]),n.forEach(function(c,d){return u.push({t:d/(n.length-1)*100,v:c,e:i})});else for(a in n)u=r[a]||(r[a]=[]),a==="ease"||u.push({t:parseFloat(e),v:n[a],e:i})},Zd=function(e,n,r,s,i){return pn(e)?e.call(n,r,s,i):Hn(e)&&~e.indexOf("random(")?Cf(e):e},$R=Ew+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",zR={};Br($R+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return zR[t]=1});var Pn=(function(t){lR(e,t);function e(r,s,i,a){var u;typeof s=="number"&&(i.duration=s,s=i,i=null),u=t.call(this,a?s:Gd(s))||this;var c=u.vars,d=c.duration,f=c.delay,p=c.immediateRender,m=c.stagger,_=c.overwrite,x=c.keyframes,y=c.defaults,w=c.scrollTrigger,b=s.parent||nn,C=(dr(r)||cR(r)?xo(r[0]):"length"in s)?[r]:Is(r),P,T,A,R,L,I,O,N;if(u._targets=C.length?Cw(C):Sf("GSAP target "+r+" not found. https://gsap.com",!us.nullTargetWarn)||[],u._ptLookup=[],u._overwrite=_,x||m||$p(d)||$p(f)){s=u.vars;var j=s.easeReverse||s.yoyoEase;if(P=u.timeline=new Vr({data:"nested",defaults:y||{},targets:b&&b.data==="nested"?b.vars.targets:C}),P.kill(),P.parent=P._dp=no(u),P._start=0,m||$p(d)||$p(f)){if(R=C.length,O=m&&PR(m),Li(m))for(L in m)~$R.indexOf(L)&&(N||(N={}),N[L]=m[L]);for(T=0;T<R;T++)A=h0(s,zR),A.stagger=0,j&&(A.easeReverse=j),N&&mc(A,N),I=C[T],A.duration=+Zd(d,no(u),T,I,C),A.delay=(+Zd(f,no(u),T,I,C)||0)-u._delay,!m&&R===1&&A.delay&&(u._delay=f=A.delay,u._start+=f,A.delay=0),P.to(I,A,O?O(T,I,C):0),P._ease=ft.none;P.duration()?d=f=0:u.timeline=0}else if(x){Gd(fs(P.vars.defaults,{ease:"none"})),P._ease=Al(x.ease||s.ease||"none");var F=0,G,Q,Z;if(dr(x))x.forEach(function(W){return P.to(C,W,">")}),P.duration();else{A={};for(L in x)L==="ease"||L==="easeEach"||yY(L,x[L],A,x.easeEach);for(L in A)for(G=A[L].sort(function(W,q){return W.t-q.t}),F=0,T=0;T<G.length;T++)Q=G[T],Z={ease:Q.e,duration:(Q.t-(T?G[T-1].t:0))/100*d},Z[L]=Q.v,P.to(C,Z,F),F+=Z.duration;P.duration()<d&&P.to({},{duration:d-P.duration()})}}d||u.duration(d=P.duration())}else u.timeline=0;return _===!0&&!yw&&(ra=no(u),nn.killTweensOf(C),ra=0),ki(b,no(u),i),s.reversed&&u.reverse(),s.paused&&u.paused(!0),(p||!d&&!x&&u._start===tn(b._time)&&Ur(p)&&KZ(no(u))&&b.data!=="nested")&&(u._tTime=-Rt,u.render(Math.max(0,-f)||0)),w&&SR(no(u),w),u}var n=e.prototype;return n.render=function(s,i,a){var u=this._time,c=this._tDur,d=this._dur,f=s<0,p=s>c-Rt&&!f?c:s<Rt?0:s,m,_,x,y,w,b,C,P;if(!d)YZ(this,s,i,a);else if(p!==this._tTime||!s||a||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f||this._lazy){if(m=p,P=this.timeline,this._repeat){if(y=d+this._rDelay,this._repeat<-1&&f)return this.totalTime(y*100+s,i,a);if(m=tn(p%y),p===c?(x=this._repeat,m=d):(w=tn(p/y),x=~~w,x&&x===w?(m=d,x--):m>d&&(m=d)),b=this._yoyo&&x&1,b&&(m=d-m),w=vc(this._tTime,y),m===u&&!a&&this._initted&&x===w)return this._tTime=p,this;x!==w&&this.vars.repeatRefresh&&!b&&!this._lock&&m!==y&&this._initted&&(this._lock=a=1,this.render(tn(y*x),!0).invalidate()._lock=0)}if(!this._initted){if(ER(this,f?s:m,a,i,p))return this._tTime=0,this;if(u!==this._time&&!(a&&this.vars.repeatRefresh&&x!==w))return this;if(d!==this._dur)return this.render(s,i,a)}if(this._rEase){var T=m<u;if(T!==this._inv){var A=T?u:d-u;this._inv=T,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=u,this._invRecip=A?(T?-1:1)/A:0,this._invScale=T?-this.ratio:1-this.ratio,this._invEase=T?this._rEase:this._ease}this.ratio=C=this._invRatio+this._invScale*this._invEase((m-this._invTime)*this._invRecip)}else this.ratio=C=this._ease(m/d);if(this._from&&(this.ratio=C=1-C),this._tTime=p,this._time=m,!this._act&&this._ts&&(this._act=1,this._lazy=0),!u&&p&&!i&&!w&&(is(this,"onStart"),this._tTime!==p))return this;for(_=this._pt;_;)_.r(C,_.d),_=_._next;P&&P.render(s<0?s:P._dur*P._ease(m/this._dur),i,a)||this._startAt&&(this._zTime=s),this._onUpdate&&!i&&(f&&v2(this,s,i,a),is(this,"onUpdate")),this._repeat&&x!==w&&this.vars.onRepeat&&!i&&this.parent&&is(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(f&&!this._onUpdate&&v2(this,s,!0,!0),(s||!d)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&ga(this,1),!i&&!(f&&!u)&&(p||u||b)&&(is(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(s){return(!s||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(s),t.prototype.invalidate.call(this,s)},n.resetTo=function(s,i,a,u,c){kf||rs.wake(),this._ts||this.play();var d=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||Tw(this,d),f=this._ease(d/this._dur),vY(this,s,i,a,u,f,d,c)?this.resetTo(s,i,a,u,1):(G0(this,0),this.parent||wR(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(s,i){if(i===void 0&&(i="all"),!s&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?Ld(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Jn),this;if(this.timeline){var a=this.timeline.totalDuration();return this.timeline.killTweensOf(s,i,ra&&ra.vars.overwrite!==!0)._first||Ld(this),this.parent&&a!==this.timeline.totalDuration()&&gc(this,this._dur*this.timeline._tDur/a,0,1),this}var u=this._targets,c=s?Is(s):u,d=this._ptLookup,f=this._pt,p,m,_,x,y,w,b;if((!i||i==="all")&&qZ(u,c))return i==="all"&&(this._pt=0),Ld(this);for(p=this._op=this._op||[],i!=="all"&&(Hn(i)&&(y={},Br(i,function(C){return y[C]=1}),i=y),i=gY(u,i)),b=u.length;b--;)if(~c.indexOf(u[b])){m=d[b],i==="all"?(p[b]=i,x=m,_={}):(_=p[b]=p[b]||{},x=i);for(y in x)w=m&&m[y],w&&((!("kill"in w.d)||w.d.kill(y)===!0)&&W0(this,w,"_pt"),delete m[y]),_!=="all"&&(_[y]=1)}return this._initted&&!this._pt&&f&&Ld(this),this},e.to=function(s,i){return new e(s,i,arguments[2])},e.from=function(s,i){return Kd(1,arguments)},e.delayedCall=function(s,i,a,u){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:s,onComplete:i,onReverseComplete:i,onCompleteParams:a,onReverseCompleteParams:a,callbackScope:u})},e.fromTo=function(s,i,a){return Kd(2,arguments)},e.set=function(s,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(s,i)},e.killTweensOf=function(s,i,a){return nn.killTweensOf(s,i,a)},e})(Pf);fs(Pn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Br("staggerTo,staggerFrom,staggerFromTo",function(t){Pn[t]=function(){var e=new Vr,n=y2.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var Aw=function(e,n,r){return e[n]=r},HR=function(e,n,r){return e[n](r)},_Y=function(e,n,r,s){return e[n](s.fp,r)},xY=function(e,n,r){return e.setAttribute(n,r)},Iw=function(e,n){return pn(e[n])?HR:_w(e[n])&&e.setAttribute?xY:Aw},UR=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},wY=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},BR=function(e,n){var r=n._pt,s="";if(!e&&n.b)s=n.b;else if(e===1&&n.e)s=n.e;else{for(;r;)s=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+s,r=r._next;s+=n.c}n.set(n.t,n.p,s,n)},Rw=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},bY=function(e,n,r,s){for(var i=this._pt,a;i;)a=i._next,i.p===s&&i.modifier(e,n,r),i=a},SY=function(e){for(var n=this._pt,r,s;n;)s=n._next,n.p===e&&!n.op||n.op===e?W0(this,n,"_pt"):n.dep||(r=1),n=s;return!r},EY=function(e,n,r,s){s.mSet(e,n,s.m.call(s.tween,r,s.mt),s)},WR=function(e){for(var n=e._pt,r,s,i,a;n;){for(r=n._next,s=i;s&&s.pr>n.pr;)s=s._next;(n._prev=s?s._prev:a)?n._prev._next=n:i=n,(n._next=s)?s._prev=n:a=n,n=r}e._pt=i},Wr=(function(){function t(n,r,s,i,a,u,c,d,f){this.t=r,this.s=i,this.c=a,this.p=s,this.r=u||UR,this.d=c||this,this.set=d||Aw,this.pr=f||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,s,i){this.mSet=this.mSet||this.set,this.set=EY,this.m=r,this.mt=i,this.tween=s},t})();Br(Ew+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return Sw[t]=1});ds.TweenMax=ds.TweenLite=Pn;ds.TimelineLite=ds.TimelineMax=Vr;nn=new Vr({sortChildren:!1,defaults:bf,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});us.stringFilter=DR;var Il=[],fm={},CY=[],N8=0,kY=0,ny=function(e){return(fm[e]||CY).map(function(n){return n()})},b2=function(){var e=Date.now(),n=[];e-N8>2&&(ny("matchMediaInit"),Il.forEach(function(r){var s=r.queries,i=r.conditions,a,u,c,d;for(u in s)a=_i.matchMedia(s[u]).matches,a&&(c=1),a!==i[u]&&(i[u]=a,d=1);d&&(r.revert(),c&&n.push(r))}),ny("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(s){return r.add(null,s)})}),N8=e,ny("matchMedia"))},qR=(function(){function t(n,r){this.selector=r&&_2(r),this.data=[],this._r=[],this.isReverted=!1,this.id=kY++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,s,i){pn(r)&&(i=s,s=r,r=pn);var a=this,u=function(){var d=Gt,f=a.selector,p;return d&&d!==a&&d.data.push(a),i&&(a.selector=_2(i)),Gt=a,p=s.apply(a,arguments),pn(p)&&a._r.push(p),Gt=d,a.selector=f,a.isReverted=!1,p};return a.last=u,r===pn?u(a,function(c){return a.add(null,c)}):r?a[r]=u:u},e.ignore=function(r){var s=Gt;Gt=null,r(this),Gt=s},e.getTweens=function(){var r=[];return this.data.forEach(function(s){return s instanceof t?r.push.apply(r,s.getTweens()):s instanceof Pn&&!(s.parent&&s.parent.data==="nested")&&r.push(s)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,s){var i=this;if(r?(function(){for(var u=i.getTweens(),c=i.data.length,d;c--;)d=i.data[c],d.data==="isFlip"&&(d.revert(),d.getChildren(!0,!0,!1).forEach(function(f){return u.splice(u.indexOf(f),1)}));for(u.map(function(f){return{g:f._dur||f._delay||f._sat&&!f._sat.vars.immediateRender?f.globalTime(0):-1/0,t:f}}).sort(function(f,p){return p.g-f.g||-1/0}).forEach(function(f){return f.t.revert(r)}),c=i.data.length;c--;)d=i.data[c],d instanceof Vr?d.data!=="nested"&&(d.scrollTrigger&&d.scrollTrigger.revert(),d.kill()):!(d instanceof Pn)&&d.revert&&d.revert(r);i._r.forEach(function(f){return f(r,i)}),i.isReverted=!0})():this.data.forEach(function(u){return u.kill&&u.kill()}),this.clear(),s)for(var a=Il.length;a--;)Il[a].id===this.id&&Il.splice(a,1)},e.revert=function(r){this.kill(r||{})},t})(),PY=(function(){function t(n){this.contexts=[],this.scope=n,Gt&&Gt.data.push(this)}var e=t.prototype;return e.add=function(r,s,i){Li(r)||(r={matches:r});var a=new qR(0,i||this.scope),u=a.conditions={},c,d,f;Gt&&!a.selector&&(a.selector=Gt.selector),this.contexts.push(a),s=a.add("onMatch",s),a.queries=r;for(d in r)d==="all"?f=1:(c=_i.matchMedia(r[d]),c&&(Il.indexOf(a)<0&&Il.push(a),(u[d]=c.matches)&&(f=1),c.addListener?c.addListener(b2):c.addEventListener("change",b2)));return f&&s(a,function(p){return a.add(null,p)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(s){return s.kill(r,!0)})},t})(),m0={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(s){return OR(s)})},timeline:function(e){return new Vr(e)},getTweensOf:function(e,n){return nn.getTweensOf(e,n)},getProperty:function(e,n,r,s){Hn(e)&&(e=Is(e)[0]);var i=Pl(e||{}).get,a=r?xR:_R;return r==="native"&&(r=""),e&&(n?a((ns[n]&&ns[n].get||i)(e,n,r,s)):function(u,c,d){return a((ns[u]&&ns[u].get||i)(e,u,c,d))})},quickSetter:function(e,n,r){if(e=Is(e),e.length>1){var s=e.map(function(f){return Gr.quickSetter(f,n,r)}),i=s.length;return function(f){for(var p=i;p--;)s[p](f)}}e=e[0]||{};var a=ns[n],u=Pl(e),c=u.harness&&(u.harness.aliases||{})[n]||n,d=a?function(f){var p=new a;Mu._pt=0,p.init(e,r?f+r:f,Mu,0,[e]),p.render(1,p),Mu._pt&&Rw(1,Mu)}:u.set(e,c);return a?d:function(f){return d(e,c,r?f+r:f,u,1)}},quickTo:function(e,n,r){var s,i=Gr.to(e,fs((s={},s[n]="+=0.1",s.paused=!0,s.stagger=0,s),r||{})),a=function(c,d,f){return i.resetTo(n,c,d,f)};return a.tween=i,a},isTweening:function(e){return nn.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Al(e.ease,bf.ease)),I8(bf,e||{})},config:function(e){return I8(us,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,s=e.plugins,i=e.defaults,a=e.extendTimeline;(s||"").split(",").forEach(function(u){return u&&!ns[u]&&!ds[u]&&Sf(n+" effect requires "+u+" plugin.")}),Q1[n]=function(u,c,d){return r(Is(u),fs(c||{},i),d)},a&&(Vr.prototype[n]=function(u,c,d){return this.add(Q1[n](u,Li(c)?c:(d=c)&&{},this),d)})},registerEase:function(e,n){ft[e]=Al(n)},parseEase:function(e,n){return arguments.length?Al(e,n):ft},getById:function(e){return nn.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new Vr(e),s,i;for(r.smoothChildTiming=Ur(e.smoothChildTiming),nn.remove(r),r._dp=0,r._time=r._tTime=nn._time,s=nn._first;s;)i=s._next,(n||!(!s._dur&&s instanceof Pn&&s.vars.onComplete===s._targets[0]))&&ki(r,s,s._start-s._delay),s=i;return ki(nn,r,0),r},context:function(e,n){return e?new qR(e,n):Gt},matchMedia:function(e){return new PY(e)},matchMediaRefresh:function(){return Il.forEach(function(e){var n=e.conditions,r,s;for(s in n)n[s]&&(n[s]=!1,r=1);r&&e.revert()})||b2()},addEventListener:function(e,n){var r=fm[e]||(fm[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=fm[e],s=r&&r.indexOf(n);s>=0&&r.splice(s,1)},utils:{wrap:sY,wrapYoyo:iY,distribute:PR,random:AR,snap:TR,normalize:rY,getUnit:lr,clamp:JZ,splitColor:LR,toArray:Is,selector:_2,mapRange:RR,pipe:tY,unitize:nY,interpolate:oY,shuffle:kR},install:pR,effects:Q1,ticker:rs,updateRoot:Vr.updateRoot,plugins:ns,globalTimeline:nn,core:{PropTween:Wr,globals:mR,Tween:Pn,Timeline:Vr,Animation:Pf,getCache:Pl,_removeLinkedListItem:W0,reverting:function(){return Jn},context:function(e){return e&&Gt&&(Gt.data.push(e),e._ctx=Gt),Gt},suppressOverwrites:function(e){return yw=e}}};Br("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return m0[t]=Pn[t]});rs.add(Vr.updateRoot);Mu=m0.to({},{duration:0});var TY=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},AY=function(e,n){var r=e._targets,s,i,a;for(s in n)for(i=r.length;i--;)a=e._ptLookup[i][s],a&&(a=a.d)&&(a._pt&&(a=TY(a,s)),a&&a.modifier&&a.modifier(n[s],e,r[i],s))},ry=function(e,n){return{name:e,headless:1,rawVars:1,init:function(s,i,a){a._onInit=function(u){var c,d;if(Hn(i)&&(c={},Br(i,function(f){return c[f]=1}),i=c),n){c={};for(d in i)c[d]=n(i[d]);i=c}AY(u,i)}}}},Gr=m0.registerPlugin({name:"attr",init:function(e,n,r,s,i){var a,u,c;this.tween=r;for(a in n)c=e.getAttribute(a)||"",u=this.add(e,"setAttribute",(c||0)+"",n[a],s,i,0,0,a),u.op=a,u.b=c,this._props.push(a)},render:function(e,n){for(var r=n._pt;r;)Jn?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},ry("roundProps",x2),ry("modifiers"),ry("snap",TR))||m0;Pn.version=Vr.version=Gr.version="3.15.0";hR=1;xw()&&yc();ft.Power0;ft.Power1;ft.Power2;ft.Power3;ft.Power4;ft.Linear;ft.Quad;ft.Cubic;ft.Quart;ft.Quint;ft.Strong;ft.Elastic;ft.Back;ft.SteppedEase;ft.Bounce;ft.Sine;ft.Expo;ft.Circ;/*!
|
|
123
|
-
* CSSPlugin 3.15.0
|
|
124
|
-
* https://gsap.com
|
|
125
|
-
*
|
|
126
|
-
* Copyright 2008-2026, GreenSock. All rights reserved.
|
|
127
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
128
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
129
|
-
*/var D8,sa,Uu,Mw,hl,j8,Ow,IY=function(){return typeof window<"u"},wo={},ol=180/Math.PI,Bu=Math.PI/180,_u=Math.atan2,F8=1e8,Lw=/([A-Z])/g,RY=/(left|right|width|margin|padding|x)/i,MY=/[\s,\(]\S/,Ai={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},S2=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},OY=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},LY=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},NY=function(e,n){return n.set(n.t,n.p,e===1?n.e:e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},DY=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},GR=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},KR=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},jY=function(e,n,r){return e.style[n]=r},FY=function(e,n,r){return e.style.setProperty(n,r)},VY=function(e,n,r){return e._gsap[n]=r},$Y=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},zY=function(e,n,r,s,i){var a=e._gsap;a.scaleX=a.scaleY=r,a.renderTransform(i,a)},HY=function(e,n,r,s,i){var a=e._gsap;a[n]=r,a.renderTransform(i,a)},rn="transform",qr=rn+"Origin",UY=function t(e,n){var r=this,s=this.target,i=s.style,a=s._gsap;if(e in wo&&i){if(this.tfm=this.tfm||{},e!=="transform")e=Ai[e]||e,~e.indexOf(",")?e.split(",").forEach(function(u){return r.tfm[u]=so(s,u)}):this.tfm[e]=a.x?a[e]:so(s,e),e===qr&&(this.tfm.zOrigin=a.zOrigin);else return Ai.transform.split(",").forEach(function(u){return t.call(r,u,n)});if(this.props.indexOf(rn)>=0)return;a.svg&&(this.svgo=s.getAttribute("data-svg-origin"),this.props.push(qr,n,"")),e=rn}(i||n)&&this.props.push(e,n,i[e])},ZR=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},BY=function(){var e=this.props,n=this.target,r=n.style,s=n._gsap,i,a;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?n[e[i]](e[i+2]):n[e[i]]=e[i+2]:e[i+2]?r[e[i]]=e[i+2]:r.removeProperty(e[i].substr(0,2)==="--"?e[i]:e[i].replace(Lw,"-$1").toLowerCase());if(this.tfm){for(a in this.tfm)s[a]=this.tfm[a];s.svg&&(s.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),i=Ow(),(!i||!i.isStart)&&!r[rn]&&(ZR(r),s.zOrigin&&r[qr]&&(r[qr]+=" "+s.zOrigin+"px",s.zOrigin=0,s.renderTransform()),s.uncache=1)}},YR=function(e,n){var r={target:e,props:[],revert:BY,save:UY};return e._gsap||Gr.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(s){return r.save(s)}),r},XR,E2=function(e,n){var r=sa.createElementNS?sa.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):sa.createElement(e);return r&&r.style?r:sa.createElement(e)},os=function t(e,n,r){var s=getComputedStyle(e);return s[n]||s.getPropertyValue(n.replace(Lw,"-$1").toLowerCase())||s.getPropertyValue(n)||!r&&t(e,_c(n)||n,1)||""},V8="O,Moz,ms,Ms,Webkit".split(","),_c=function(e,n,r){var s=n||hl,i=s.style,a=5;if(e in i&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);a--&&!(V8[a]+e in i););return a<0?null:(a===3?"ms":a>=0?V8[a]:"")+e},C2=function(){IY()&&window.document&&(D8=window,sa=D8.document,Uu=sa.documentElement,hl=E2("div")||{style:{}},E2("div"),rn=_c(rn),qr=rn+"Origin",hl.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",XR=!!_c("perspective"),Ow=Gr.core.reverting,Mw=1)},$8=function(e){var n=e.ownerSVGElement,r=E2("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=e.cloneNode(!0),i;s.style.display="block",r.appendChild(s),Uu.appendChild(r);try{i=s.getBBox()}catch{}return r.removeChild(s),Uu.removeChild(r),i},z8=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},QR=function(e){var n,r;try{n=e.getBBox()}catch{n=$8(e),r=1}return n&&(n.width||n.height)||r||(n=$8(e)),n&&!n.width&&!n.x&&!n.y?{x:+z8(e,["x","cx","x1"])||0,y:+z8(e,["y","cy","y1"])||0,width:0,height:0}:n},JR=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&QR(e))},ya=function(e,n){if(n){var r=e.style,s;n in wo&&n!==qr&&(n=rn),r.removeProperty?(s=n.substr(0,2),(s==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(s==="--"?n:n.replace(Lw,"-$1").toLowerCase())):r.removeAttribute(n)}},ia=function(e,n,r,s,i,a){var u=new Wr(e._pt,n,r,0,1,a?KR:GR);return e._pt=u,u.b=s,u.e=i,e._props.push(r),u},H8={deg:1,rad:1,turn:1},WY={grid:1,flex:1},_a=function t(e,n,r,s){var i=parseFloat(r)||0,a=(r+"").trim().substr((i+"").length)||"px",u=hl.style,c=RY.test(n),d=e.tagName.toLowerCase()==="svg",f=(d?"client":"offset")+(c?"Width":"Height"),p=100,m=s==="px",_=s==="%",x,y,w,b;if(s===a||!i||H8[s]||H8[a])return i;if(a!=="px"&&!m&&(i=t(e,n,r,"px")),b=e.getCTM&&JR(e),(_||a==="%")&&(wo[n]||~n.indexOf("adius")))return x=b?e.getBBox()[c?"width":"height"]:e[f],_n(_?i/x*p:i/100*x);if(u[c?"width":"height"]=p+(m?a:s),y=s!=="rem"&&~n.indexOf("adius")||s==="em"&&e.appendChild&&!d?e:e.parentNode,b&&(y=(e.ownerSVGElement||{}).parentNode),(!y||y===sa||!y.appendChild)&&(y=sa.body),w=y._gsap,w&&_&&w.width&&c&&w.time===rs.time&&!w.uncache)return _n(i/w.width*p);if(_&&(n==="height"||n==="width")){var C=e.style[n];e.style[n]=p+s,x=e[f],C?e.style[n]=C:ya(e,n)}else(_||a==="%")&&!WY[os(y,"display")]&&(u.position=os(e,"position")),y===e&&(u.position="static"),y.appendChild(hl),x=hl[f],y.removeChild(hl),u.position="absolute";return c&&_&&(w=Pl(y),w.time=rs.time,w.width=y[f]),_n(m?x*i/p:x&&i?p/x*i:0)},so=function(e,n,r,s){var i;return Mw||C2(),n in Ai&&n!=="transform"&&(n=Ai[n],~n.indexOf(",")&&(n=n.split(",")[0])),wo[n]&&n!=="transform"?(i=Af(e,s),i=n!=="transformOrigin"?i[n]:i.svg?i.origin:g0(os(e,qr))+" "+i.zOrigin+"px"):(i=e.style[n],(!i||i==="auto"||s||~(i+"").indexOf("calc("))&&(i=v0[n]&&v0[n](e,n,r)||os(e,n)||gR(e,n)||(n==="opacity"?1:0))),r&&!~(i+"").trim().indexOf(" ")?_a(e,n,i,r)+r:i},qY=function(e,n,r,s){if(!r||r==="none"){var i=_c(n,e,1),a=i&&os(e,i,1);a&&a!==r?(n=i,r=a):n==="borderColor"&&(r=os(e,"borderTopColor"))}var u=new Wr(this._pt,e.style,n,0,1,BR),c=0,d=0,f,p,m,_,x,y,w,b,C,P,T,A;if(u.b=r,u.e=s,r+="",s+="",s.substring(0,6)==="var(--"&&(s=os(e,s.substring(4,s.indexOf(")")))),s==="auto"&&(y=e.style[n],e.style[n]=s,s=os(e,n)||s,y?e.style[n]=y:ya(e,n)),f=[r,s],DR(f),r=f[0],s=f[1],m=r.match(Ru)||[],A=s.match(Ru)||[],A.length){for(;p=Ru.exec(s);)w=p[0],C=s.substring(c,p.index),x?x=(x+1)%5:(C.substr(-5)==="rgba("||C.substr(-5)==="hsla(")&&(x=1),w!==(y=m[d++]||"")&&(_=parseFloat(y)||0,T=y.substr((_+"").length),w.charAt(1)==="="&&(w=Hu(_,w)+T),b=parseFloat(w),P=w.substr((b+"").length),c=Ru.lastIndex-P.length,P||(P=P||us.units[n]||T,c===s.length&&(s+=P,u.e+=P)),T!==P&&(_=_a(e,n,y,P)||0),u._pt={_next:u._pt,p:C||d===1?C:",",s:_,c:b-_,m:x&&x<4||n==="zIndex"?Math.round:0});u.c=c<s.length?s.substring(c,s.length):""}else u.r=n==="display"&&s==="none"?KR:GR;return fR.test(s)&&(u.e=0),this._pt=u,u},U8={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},GY=function(e){var n=e.split(" "),r=n[0],s=n[1]||"50%";return(r==="top"||r==="bottom"||s==="left"||s==="right")&&(e=r,r=s,s=e),n[0]=U8[r]||r,n[1]=U8[s]||s,n.join(" ")},KY=function(e,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,s=r.style,i=n.u,a=r._gsap,u,c,d;if(i==="all"||i===!0)s.cssText="",c=1;else for(i=i.split(","),d=i.length;--d>-1;)u=i[d],wo[u]&&(c=1,u=u==="transformOrigin"?qr:rn),ya(r,u);c&&(ya(r,rn),a&&(a.svg&&r.removeAttribute("transform"),s.scale=s.rotate=s.translate="none",Af(r,1),a.uncache=1,ZR(s)))}},v0={clearProps:function(e,n,r,s,i){if(i.data!=="isFromStart"){var a=e._pt=new Wr(e._pt,n,r,0,0,KY);return a.u=s,a.pr=-10,a.tween=i,e._props.push(r),1}}},Tf=[1,0,0,1,0,0],eM={},tM=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},B8=function(e){var n=os(e,rn);return tM(n)?Tf:n.substr(7).match(dR).map(_n)},Nw=function(e,n){var r=e._gsap||Pl(e),s=e.style,i=B8(e),a,u,c,d;return r.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?Tf:i):(i===Tf&&!e.offsetParent&&e!==Uu&&!r.svg&&(c=s.display,s.display="block",a=e.parentNode,(!a||!e.offsetParent&&!e.getBoundingClientRect().width)&&(d=1,u=e.nextElementSibling,Uu.appendChild(e)),i=B8(e),c?s.display=c:ya(e,"display"),d&&(u?a.insertBefore(e,u):a?a.appendChild(e):Uu.removeChild(e))),n&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},k2=function(e,n,r,s,i,a){var u=e._gsap,c=i||Nw(e,!0),d=u.xOrigin||0,f=u.yOrigin||0,p=u.xOffset||0,m=u.yOffset||0,_=c[0],x=c[1],y=c[2],w=c[3],b=c[4],C=c[5],P=n.split(" "),T=parseFloat(P[0])||0,A=parseFloat(P[1])||0,R,L,I,O;r?c!==Tf&&(L=_*w-x*y)&&(I=T*(w/L)+A*(-y/L)+(y*C-w*b)/L,O=T*(-x/L)+A*(_/L)-(_*C-x*b)/L,T=I,A=O):(R=QR(e),T=R.x+(~P[0].indexOf("%")?T/100*R.width:T),A=R.y+(~(P[1]||P[0]).indexOf("%")?A/100*R.height:A)),s||s!==!1&&u.smooth?(b=T-d,C=A-f,u.xOffset=p+(b*_+C*y)-b,u.yOffset=m+(b*x+C*w)-C):u.xOffset=u.yOffset=0,u.xOrigin=T,u.yOrigin=A,u.smooth=!!s,u.origin=n,u.originIsAbsolute=!!r,e.style[qr]="0px 0px",a&&(ia(a,u,"xOrigin",d,T),ia(a,u,"yOrigin",f,A),ia(a,u,"xOffset",p,u.xOffset),ia(a,u,"yOffset",m,u.yOffset)),e.setAttribute("data-svg-origin",T+" "+A)},Af=function(e,n){var r=e._gsap||new FR(e);if("x"in r&&!n&&!r.uncache)return r;var s=e.style,i=r.scaleX<0,a="px",u="deg",c=getComputedStyle(e),d=os(e,qr)||"0",f,p,m,_,x,y,w,b,C,P,T,A,R,L,I,O,N,j,F,G,Q,Z,W,q,z,X,H,D,Y,oe,J,se;return f=p=m=y=w=b=C=P=T=0,_=x=1,r.svg=!!(e.getCTM&&JR(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(s[rn]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[rn]!=="none"?c[rn]:"")),s.scale=s.rotate=s.translate="none"),L=Nw(e,r.svg),r.svg&&(r.uncache?(z=e.getBBox(),d=r.xOrigin-z.x+"px "+(r.yOrigin-z.y)+"px",q=""):q=!n&&e.getAttribute("data-svg-origin"),k2(e,q||d,!!q||r.originIsAbsolute,r.smooth!==!1,L)),A=r.xOrigin||0,R=r.yOrigin||0,L!==Tf&&(j=L[0],F=L[1],G=L[2],Q=L[3],f=Z=L[4],p=W=L[5],L.length===6?(_=Math.sqrt(j*j+F*F),x=Math.sqrt(Q*Q+G*G),y=j||F?_u(F,j)*ol:0,C=G||Q?_u(G,Q)*ol+y:0,C&&(x*=Math.abs(Math.cos(C*Bu))),r.svg&&(f-=A-(A*j+R*G),p-=R-(A*F+R*Q))):(se=L[6],oe=L[7],H=L[8],D=L[9],Y=L[10],J=L[11],f=L[12],p=L[13],m=L[14],I=_u(se,Y),w=I*ol,I&&(O=Math.cos(-I),N=Math.sin(-I),q=Z*O+H*N,z=W*O+D*N,X=se*O+Y*N,H=Z*-N+H*O,D=W*-N+D*O,Y=se*-N+Y*O,J=oe*-N+J*O,Z=q,W=z,se=X),I=_u(-G,Y),b=I*ol,I&&(O=Math.cos(-I),N=Math.sin(-I),q=j*O-H*N,z=F*O-D*N,X=G*O-Y*N,J=Q*N+J*O,j=q,F=z,G=X),I=_u(F,j),y=I*ol,I&&(O=Math.cos(I),N=Math.sin(I),q=j*O+F*N,z=Z*O+W*N,F=F*O-j*N,W=W*O-Z*N,j=q,Z=z),w&&Math.abs(w)+Math.abs(y)>359.9&&(w=y=0,b=180-b),_=_n(Math.sqrt(j*j+F*F+G*G)),x=_n(Math.sqrt(W*W+se*se)),I=_u(Z,W),C=Math.abs(I)>2e-4?I*ol:0,T=J?1/(J<0?-J:J):0),r.svg&&(q=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!tM(os(e,rn)),q&&e.setAttribute("transform",q))),Math.abs(C)>90&&Math.abs(C)<270&&(i?(_*=-1,C+=y<=0?180:-180,y+=y<=0?180:-180):(x*=-1,C+=C<=0?180:-180)),n=n||r.uncache,r.x=f-((r.xPercent=f&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-f)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+a,r.y=p-((r.yPercent=p&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+a,r.z=m+a,r.scaleX=_n(_),r.scaleY=_n(x),r.rotation=_n(y)+u,r.rotationX=_n(w)+u,r.rotationY=_n(b)+u,r.skewX=C+u,r.skewY=P+u,r.transformPerspective=T+a,(r.zOrigin=parseFloat(d.split(" ")[2])||!n&&r.zOrigin||0)&&(s[qr]=g0(d)),r.xOffset=r.yOffset=0,r.force3D=us.force3D,r.renderTransform=r.svg?YY:XR?nM:ZY,r.uncache=0,r},g0=function(e){return(e=e.split(" "))[0]+" "+e[1]},sy=function(e,n,r){var s=lr(n);return _n(parseFloat(n)+parseFloat(_a(e,"x",r+"px",s)))+s},ZY=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,nM(e,n)},Ja="0deg",kd="0px",el=") ",nM=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.z,d=r.rotation,f=r.rotationY,p=r.rotationX,m=r.skewX,_=r.skewY,x=r.scaleX,y=r.scaleY,w=r.transformPerspective,b=r.force3D,C=r.target,P=r.zOrigin,T="",A=b==="auto"&&e&&e!==1||b===!0;if(P&&(p!==Ja||f!==Ja)){var R=parseFloat(f)*Bu,L=Math.sin(R),I=Math.cos(R),O;R=parseFloat(p)*Bu,O=Math.cos(R),a=sy(C,a,L*O*-P),u=sy(C,u,-Math.sin(R)*-P),c=sy(C,c,I*O*-P+P)}w!==kd&&(T+="perspective("+w+el),(s||i)&&(T+="translate("+s+"%, "+i+"%) "),(A||a!==kd||u!==kd||c!==kd)&&(T+=c!==kd||A?"translate3d("+a+", "+u+", "+c+") ":"translate("+a+", "+u+el),d!==Ja&&(T+="rotate("+d+el),f!==Ja&&(T+="rotateY("+f+el),p!==Ja&&(T+="rotateX("+p+el),(m!==Ja||_!==Ja)&&(T+="skew("+m+", "+_+el),(x!==1||y!==1)&&(T+="scale("+x+", "+y+el),C.style[rn]=T||"translate(0, 0)"},YY=function(e,n){var r=n||this,s=r.xPercent,i=r.yPercent,a=r.x,u=r.y,c=r.rotation,d=r.skewX,f=r.skewY,p=r.scaleX,m=r.scaleY,_=r.target,x=r.xOrigin,y=r.yOrigin,w=r.xOffset,b=r.yOffset,C=r.forceCSS,P=parseFloat(a),T=parseFloat(u),A,R,L,I,O;c=parseFloat(c),d=parseFloat(d),f=parseFloat(f),f&&(f=parseFloat(f),d+=f,c+=f),c||d?(c*=Bu,d*=Bu,A=Math.cos(c)*p,R=Math.sin(c)*p,L=Math.sin(c-d)*-m,I=Math.cos(c-d)*m,d&&(f*=Bu,O=Math.tan(d-f),O=Math.sqrt(1+O*O),L*=O,I*=O,f&&(O=Math.tan(f),O=Math.sqrt(1+O*O),A*=O,R*=O)),A=_n(A),R=_n(R),L=_n(L),I=_n(I)):(A=p,I=m,R=L=0),(P&&!~(a+"").indexOf("px")||T&&!~(u+"").indexOf("px"))&&(P=_a(_,"x",a,"px"),T=_a(_,"y",u,"px")),(x||y||w||b)&&(P=_n(P+x-(x*A+y*L)+w),T=_n(T+y-(x*R+y*I)+b)),(s||i)&&(O=_.getBBox(),P=_n(P+s/100*O.width),T=_n(T+i/100*O.height)),O="matrix("+A+","+R+","+L+","+I+","+P+","+T+")",_.setAttribute("transform",O),C&&(_.style[rn]=O)},XY=function(e,n,r,s,i){var a=360,u=Hn(i),c=parseFloat(i)*(u&&~i.indexOf("rad")?ol:1),d=c-s,f=s+d+"deg",p,m;return u&&(p=i.split("_")[1],p==="short"&&(d%=a,d!==d%(a/2)&&(d+=d<0?a:-a)),p==="cw"&&d<0?d=(d+a*F8)%a-~~(d/a)*a:p==="ccw"&&d>0&&(d=(d-a*F8)%a-~~(d/a)*a)),e._pt=m=new Wr(e._pt,n,r,s,d,OY),m.e=f,m.u="deg",e._props.push(r),m},W8=function(e,n){for(var r in n)e[r]=n[r];return e},QY=function(e,n,r){var s=W8({},r._gsap),i="perspective,force3D,transformOrigin,svgOrigin",a=r.style,u,c,d,f,p,m,_,x;s.svg?(d=r.getAttribute("transform"),r.setAttribute("transform",""),a[rn]=n,u=Af(r,1),ya(r,rn),r.setAttribute("transform",d)):(d=getComputedStyle(r)[rn],a[rn]=n,u=Af(r,1),a[rn]=d);for(c in wo)d=s[c],f=u[c],d!==f&&i.indexOf(c)<0&&(_=lr(d),x=lr(f),p=_!==x?_a(r,c,d,x):parseFloat(d),m=parseFloat(f),e._pt=new Wr(e._pt,u,c,p,m-p,S2),e._pt.u=x||0,e._props.push(c));W8(u,s)};Br("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",s="Bottom",i="Left",a=(e<3?[n,r,s,i]:[n+i,n+r,s+r,s+i]).map(function(u){return e<2?t+u:"border"+u+t});v0[e>1?"border"+t:t]=function(u,c,d,f,p){var m,_;if(arguments.length<4)return m=a.map(function(x){return so(u,x,d)}),_=m.join(" "),_.split(m[0]).length===5?m[0]:_;m=(f+"").split(" "),_={},a.forEach(function(x,y){return _[x]=m[y]=m[y]||m[(y-1)/2|0]}),u.init(c,_,p)}});var rM={name:"css",register:C2,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,s,i){var a=this._props,u=e.style,c=r.vars.startAt,d,f,p,m,_,x,y,w,b,C,P,T,A,R,L,I,O;Mw||C2(),this.styles=this.styles||YR(e),I=this.styles.props,this.tween=r;for(y in n)if(y!=="autoRound"&&(f=n[y],!(ns[y]&&VR(y,n,r,s,e,i)))){if(_=typeof f,x=v0[y],_==="function"&&(f=f.call(r,s,e,i),_=typeof f),_==="string"&&~f.indexOf("random(")&&(f=Cf(f)),x)x(this,e,y,f,r)&&(L=1);else if(y.substr(0,2)==="--")d=(getComputedStyle(e).getPropertyValue(y)+"").trim(),f+="",ua.lastIndex=0,ua.test(d)||(w=lr(d),b=lr(f),b?w!==b&&(d=_a(e,y,d,b)+b):w&&(f+=w)),this.add(u,"setProperty",d,f,s,i,0,0,y),a.push(y),I.push(y,0,u[y]);else if(_!=="undefined"){if(c&&y in c?(d=typeof c[y]=="function"?c[y].call(r,s,e,i):c[y],Hn(d)&&~d.indexOf("random(")&&(d=Cf(d)),lr(d+"")||d==="auto"||(d+=us.units[y]||lr(so(e,y))||""),(d+"").charAt(1)==="="&&(d=so(e,y))):d=so(e,y),m=parseFloat(d),C=_==="string"&&f.charAt(1)==="="&&f.substr(0,2),C&&(f=f.substr(2)),p=parseFloat(f),y in Ai&&(y==="autoAlpha"&&(m===1&&so(e,"visibility")==="hidden"&&p&&(m=0),I.push("visibility",0,u.visibility),ia(this,u,"visibility",m?"inherit":"hidden",p?"inherit":"hidden",!p)),y!=="scale"&&y!=="transform"&&(y=Ai[y],~y.indexOf(",")&&(y=y.split(",")[0]))),P=y in wo,P){if(this.styles.save(y),O=f,_==="string"&&f.substring(0,6)==="var(--"){if(f=os(e,f.substring(4,f.indexOf(")"))),f.substring(0,5)==="calc("){var N=e.style.perspective;e.style.perspective=f,f=os(e,"perspective"),N?e.style.perspective=N:ya(e,"perspective")}p=parseFloat(f)}if(T||(A=e._gsap,A.renderTransform&&!n.parseTransform||Af(e,n.parseTransform),R=n.smoothOrigin!==!1&&A.smooth,T=this._pt=new Wr(this._pt,u,rn,0,1,A.renderTransform,A,0,-1),T.dep=1),y==="scale")this._pt=new Wr(this._pt,A,"scaleY",A.scaleY,(C?Hu(A.scaleY,C+p):p)-A.scaleY||0,S2),this._pt.u=0,a.push("scaleY",y),y+="X";else if(y==="transformOrigin"){I.push(qr,0,u[qr]),f=GY(f),A.svg?k2(e,f,0,R,0,this):(b=parseFloat(f.split(" ")[2])||0,b!==A.zOrigin&&ia(this,A,"zOrigin",A.zOrigin,b),ia(this,u,y,g0(d),g0(f)));continue}else if(y==="svgOrigin"){k2(e,f,1,R,0,this);continue}else if(y in eM){XY(this,A,y,m,C?Hu(m,C+f):f);continue}else if(y==="smoothOrigin"){ia(this,A,"smooth",A.smooth,f);continue}else if(y==="force3D"){A[y]=f;continue}else if(y==="transform"){QY(this,f,e);continue}}else y in u||(y=_c(y)||y);if(P||(p||p===0)&&(m||m===0)&&!MY.test(f)&&y in u)w=(d+"").substr((m+"").length),p||(p=0),b=lr(f)||(y in us.units?us.units[y]:w),w!==b&&(m=_a(e,y,d,b)),this._pt=new Wr(this._pt,P?A:u,y,m,(C?Hu(m,C+p):p)-m,!P&&(b==="px"||y==="zIndex")&&n.autoRound!==!1?DY:S2),this._pt.u=b||0,P&&O!==f?(this._pt.b=d,this._pt.e=O,this._pt.r=NY):w!==b&&b!=="%"&&(this._pt.b=d,this._pt.r=LY);else if(y in u)qY.call(this,e,y,d,C?C+f:f);else if(y in e)this.add(e,y,d||e[y],C?C+f:f,s,i);else if(y!=="parseTransform"){bw(y,f);continue}P||(y in u?I.push(y,0,u[y]):typeof e[y]=="function"?I.push(y,2,e[y]()):I.push(y,1,d||e[y])),a.push(y)}}L&&WR(this)},render:function(e,n){if(n.tween._time||!Ow())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:so,aliases:Ai,getSetter:function(e,n,r){var s=Ai[n];return s&&s.indexOf(",")<0&&(n=s),n in wo&&n!==qr&&(e._gsap.x||so(e,"x"))?r&&j8===r?n==="scale"?$Y:VY:(j8=r||{})&&(n==="scale"?zY:HY):e.style&&!_w(e.style[n])?jY:~n.indexOf("-")?FY:Iw(e,n)},core:{_removeProperty:ya,_getMatrix:Nw}};Gr.utils.checkPrefix=_c;Gr.core.getStyleSaver=YR;(function(t,e,n,r){var s=Br(t+","+e+","+n,function(i){wo[i]=1});Br(e,function(i){us.units[i]="deg",eM[i]=1}),Ai[s[13]]=t+","+e,Br(r,function(i){var a=i.split(":");Ai[a[1]]=s[a[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Br("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){us.units[t]="px"});Gr.registerPlugin(rM);var Us=Gr.registerPlugin(rM)||Gr;Us.core.Tween;const hm="/assets/logo-animation",iy=1280,JY=[{id:"eraser",src:`${hm}/eraser.png`,cssW:189,cssH:74,rot:-90,fit:337,localX:60,localY:168,seaX:.2,seaY:.27,seaRot:-8},{id:"clasp",src:`${hm}/clasp.png`,cssW:170,cssH:170,rot:-248,fit:205,flip:!0,localX:188,localY:97,seaX:.8,seaY:.24,seaRot:-18},{id:"ball",src:`${hm}/playdough.png`,cssW:236,cssH:206,rot:5,fit:150,localX:182,localY:277,seaX:.52,seaY:.79,seaRot:6}],eX=[{k:"pot",x:.075,y:.2,r:-12,w:152},{k:"chair",x:.1,y:.52,r:8,w:150},{k:"mug",x:.11,y:.84,r:-6,w:140},{k:"cart",x:.3,y:.13,r:10,w:178},{k:"terracotta-1",x:.345,y:.45,r:-18,w:122},{k:"pitcher",x:.285,y:.71,r:14,w:128},{k:"desk",x:.46,y:.25,r:-8,w:198},{k:"startac",x:.475,y:.55,r:16,w:140},{k:"vhsplant",x:.4,y:.9,r:-6,w:188},{k:"bubblephone",x:.63,y:.12,r:12,w:150},{k:"terracotta-2",x:.61,y:.43,r:20,w:122},{k:"pot",x:.675,y:.68,r:14,w:140},{k:"chair",x:.71,y:.91,r:-12,w:140},{k:"mug",x:.91,y:.15,r:8,w:136},{k:"cart",x:.905,y:.47,r:-10,w:166},{k:"startac",x:.88,y:.76,r:18,w:136}],P2=({className:t})=>{const e=v.useRef(null),n=v.useRef(null),r=v.useRef(null);return v.useEffect(()=>{const s=e.current,i=n.current,a=r.current;if(!s||!i||!a)return;const u=window.matchMedia("(prefers-reduced-motion: reduce)").matches,c=(b,C)=>b+Math.random()*(C-b);let d=null,f,p=1;const m=JY.map(b=>({...b})),_=()=>{s.querySelectorAll(".la-obj").forEach(I=>I.remove());const b=s.getBoundingClientRect(),C=b.width||iy,P=b.height||iy*.64;p=C/iy,i.style.width=`${242*p}px`,i.style.height=`${250*p}px`;const A=250*p/337,R=[],L=(I,O,N)=>{const j=document.createElement("div");return j.className="la-obj",j.style.width=`${O}px`,j.innerHTML=`<img src="${I}" alt="" style="${N?"transform:scaleX(-1)":""}">`,s.appendChild(j),j};return eX.forEach((I,O)=>{const N=I.w*p,j=L(`${hm}/sea/${I.k}.png`,N,O%2===0);Us.set(j,{x:I.x*C-N/2,y:I.y*P-N/2,rotation:I.r,opacity:1,scale:0,transformOrigin:"50% 50%"}),R.push({el:j,hero:!1,rest:1})}),m.forEach(I=>{const O=I.cssW*p;I.el=L(I.src,O,!!I.flip),I.finalScale=I.fit*A/(I.cssW*p),Us.set(I.el,{x:I.seaX*C-O/2,y:I.seaY*P-I.cssH*p/2,rotation:I.seaRot,opacity:1,scale:0,transformOrigin:"50% 50%",zIndex:30}),R.push({el:I.el,hero:!0,rest:150/I.cssW})}),R},x=(b,C)=>{const P=s.getBoundingClientRect(),T=a.getBoundingClientRect();return{x:T.left-P.left+b/326*T.width,y:T.top-P.top+C/337*T.height}},y=()=>{d&&d.revert();const b=_();if(u){d=Us.context(()=>{b.filter(T=>!T.hero).forEach(T=>Us.set(T.el,{scale:0})),m.forEach(T=>{if(!T.el)return;const A=x(T.localX,T.localY);Us.set(T.el,{x:A.x-T.cssW*p/2,y:A.y-T.cssH*p/2,rotation:T.rot,scale:T.finalScale})})},s);return}const C=[],P=[];d=Us.context(()=>{const T=Us.timeline();T.to(b.map(A=>A.el),{scale:A=>b[A].rest,duration:.5,ease:"steps(4)",stagger:{each:.045,from:"random"}}),T.add(()=>{b.forEach(({el:A,hero:R},L)=>{const I=R?C:P,O=L%2?1:-1;I.push(Us.to(A,{rotation:"+="+c(2.5,6)*O,duration:c(.5,.9),repeat:-1,yoyo:!0,ease:"steps(2)",delay:c(0,.4)}),Us.to(A,{y:"+="+c(5,11)*O,x:"+="+c(4,9)*-O,duration:c(.7,1.2),repeat:-1,yoyo:!0,ease:"steps(3)",delay:c(0,.4)}))})},"<0.1"),T.to({},{duration:1.1}),T.add("pick"),m.forEach((A,R)=>{A.el&&T.to(A.el,{scale:150/A.cssW*1.2,duration:.28,ease:"steps(3)",yoyo:!0,repeat:1},"pick+="+R*.08)}),T.add("clear","pick+=0.7"),T.add(()=>P.forEach(A=>A.kill()),"clear"),T.to(b.filter(A=>!A.hero).map(A=>A.el),{scale:0,rotation:"+=40",duration:.5,ease:"steps(5)",overwrite:"auto",stagger:{each:.025,from:"random"}},"clear"),T.add("assemble","clear+=0.25"),T.add(()=>C.forEach(A=>A.kill()),"assemble"),m.forEach((A,R)=>{if(!A.el||A.finalScale===void 0)return;const L=x(A.localX,A.localY);T.to(A.el,{x:L.x-A.cssW*p/2,y:L.y-A.cssH*p/2,rotation:A.rot,scale:A.finalScale,duration:1.05,ease:"steps(9)",overwrite:"auto"},"assemble+="+R*.12)}),m.forEach(A=>{!A.el||A.finalScale===void 0||T.to(A.el,{scale:A.finalScale*1.03,duration:.16,ease:"steps(2)",yoyo:!0,repeat:1},"assemble+=1.45")})},s)};Us.ticker.fps(12),y();const w=()=>{clearTimeout(f),f=setTimeout(y,250)};return window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w),clearTimeout(f),d==null||d.revert(),s.querySelectorAll(".la-obj").forEach(b=>b.remove())}},[]),E.jsx("div",{ref:e,className:`la-scene ${t??""}`,children:E.jsx("div",{ref:n,className:"la-logo-stage",children:E.jsx("svg",{ref:r,className:"la-mark",viewBox:"0 0 326 337","aria-hidden":"true"})})})},tX=Object.freeze(Object.defineProperty({__proto__:null,default:P2},Symbol.toStringTag,{value:"Module"})),q8=({isSigningIn:t})=>t?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent"}),E.jsx("span",{children:"Signing in..."})]}):E.jsxs(E.Fragment,{children:[E.jsx("img",{src:"https://www.gstatic.com/firebasejs/ui/2.0.0/images/auth/google.svg",alt:"Google",className:"h-5 w-5"}),E.jsx("span",{children:"Sign in with Google"})]}),nX=({isSigningIn:t,onStartSignIn:e,errorMessage:n=null,isDesktopShell:r=!1,displayMode:s="full"})=>s==="modal"?E.jsxs("div",{className:"glass-panel relative w-full max-w-sm overflow-hidden rounded-2xl border border-white/10 font-main text-white shadow-2xl",children:[E.jsx(P2,{className:"relative z-0 h-44 w-full"}),E.jsxs("div",{className:"relative z-10 flex flex-col items-center gap-6 px-8 pb-12 pt-8",children:[E.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[E.jsx("h1",{className:"text-xl font-medium text-content",children:"Welcome to Rivet"}),E.jsx("p",{className:"text-sm leading-relaxed text-content-muted",children:"Rivet understands your references, and then explores dozens of design directions with you."})]}),E.jsx("button",{onClick:e,disabled:t,className:"glass-panel active-push flex cursor-pointer items-center gap-3 rounded-xl px-8 py-3.5 text-sm font-medium transition-colors hover:bg-main-hover disabled:cursor-not-allowed disabled:opacity-50",children:E.jsx(q8,{isSigningIn:t})}),n?E.jsx("p",{className:"text-center text-xs text-red-200",children:n}):null]})]}):E.jsxs("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-white font-main text-[#18181b]",children:[r?E.jsx("div",{className:"fixed left-0 right-0 top-0 z-10 h-8",style:{WebkitAppRegion:"drag"}}):null,E.jsx(P2,{className:"absolute inset-0 z-0"}),E.jsxs("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 flex flex-col items-center gap-5 pb-[14vh]",children:[E.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 text-center",children:[E.jsx("h1",{className:"text-xl font-medium tracking-tight text-[#18181b]",children:"Welcome to Rivet"}),E.jsx("p",{className:"max-w-md text-sm leading-relaxed text-[#71717a]",children:"Rivet understands your references, and then explores dozens of design directions with you."})]}),E.jsx("button",{onClick:e,disabled:t,className:"active-push pointer-events-auto flex cursor-pointer items-center gap-3 rounded-full border border-black/10 bg-white px-8 py-3.5 text-sm font-medium text-[#18181b] shadow-[0_8px_24px_rgba(40,33,28,0.14)] transition-colors hover:bg-[#faf9f7] disabled:cursor-not-allowed disabled:opacity-50",children:E.jsx(q8,{isSigningIn:t})}),n?E.jsx("p",{className:"text-center text-xs text-red-500",children:n}):null]})]}),rX="data:image/svg+xml,%3csvg%20width='94'%20height='24'%20viewBox='0%200%2094%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M-0.000156164%2023.832V7.704H5.11184L6.47984%208.424C7.58384%207.704%209.04784%207.344%2010.8718%207.344C12.0718%207.344%2013.1278%207.476%2014.0398%207.74C14.9518%207.98%2015.6838%208.244%2016.2358%208.532C16.8118%208.82%2017.1718%209.024%2017.3158%209.144L15.5158%2013.824C15.2758%2013.656%2014.8198%2013.428%2014.1478%2013.14C13.4998%2012.852%2012.7318%2012.588%2011.8438%2012.348C10.9558%2012.084%2010.0198%2011.952%209.03584%2011.952H8.63984C7.96784%2011.952%207.45184%2012.072%207.09184%2012.312C6.73184%2012.528%206.55184%2013.02%206.55184%2013.788V23.832H-0.000156164ZM23.464%206.156C21.04%206.156%2019.828%205.124%2019.828%203.06C19.828%201.908%2020.128%201.116%2020.728%200.684C21.352%200.227999%2022.264%20-1.43051e-06%2023.464%20-1.43051e-06C24.736%20-1.43051e-06%2025.66%200.227999%2026.236%200.684C26.836%201.116%2027.136%201.908%2027.136%203.06C27.136%205.124%2025.912%206.156%2023.464%206.156ZM20.152%2023.832V7.704H26.704V23.832H20.152ZM37.4767%2023.832L29.6647%207.704H36.9007L40.3207%2016.524L41.2567%2019.116H41.6167L42.5527%2016.524L46.0087%207.704H53.1727L52.5967%209.9L45.4327%2023.832H37.4767ZM61.1953%2023.832C59.6113%2023.832%2058.3873%2023.604%2057.5233%2023.148C56.6833%2022.692%2056.1073%2022.068%2055.7953%2021.276C55.4833%2020.46%2055.3273%2019.524%2055.3273%2018.468V13.032C55.3273%2012.072%2055.4833%2011.196%2055.7953%2010.404C56.1313%209.588%2056.7193%208.94%2057.5593%208.46C58.3993%207.956%2059.6113%207.704%2061.1953%207.704H68.6473C70.5193%207.704%2071.9473%207.932%2072.9313%208.388C73.9393%208.82%2074.6233%209.444%2074.9833%2010.26C75.3673%2011.052%2075.5593%2011.976%2075.5593%2013.032V17.64H69.2593C67.0993%2017.64%2065.4553%2017.592%2064.3273%2017.496C63.2233%2017.4%2062.4433%2017.34%2061.9873%2017.316V17.856C61.9633%2018.816%2062.5393%2019.296%2063.7153%2019.296H64.8313C66.7513%2019.296%2068.5273%2019.26%2070.1593%2019.188C71.7913%2019.092%2073.0033%2019.008%2073.7953%2018.936L75.9553%2022.356C75.9553%2022.596%2075.7513%2022.824%2075.3433%2023.04C74.9353%2023.256%2074.2153%2023.448%2073.1833%2023.616C72.1753%2023.76%2070.7353%2023.832%2068.8633%2023.832H61.1953ZM61.9873%2014.184H68.8993V13.68C68.8993%2013.2%2068.8513%2012.864%2068.7553%2012.672C68.6833%2012.48%2068.4313%2012.36%2067.9993%2012.312C67.5673%2012.264%2066.8353%2012.24%2065.8033%2012.24H63.7153C62.5633%2012.24%2061.9873%2012.72%2061.9873%2013.68V14.184ZM85.8224%2023.832C83.9984%2023.832%2082.7504%2023.448%2082.0784%2022.68C81.4064%2021.912%2081.0704%2020.76%2081.0704%2019.224V12.24H78.1184V7.704H79.6304C80.0384%207.704%2080.3624%207.632%2080.6024%207.488C80.8664%207.32%2081.0344%207.032%2081.1064%206.624L81.7904%202.772H87.6944V7.704H93.7064V12.24H87.6944V17.82C87.6944%2018.42%2087.8384%2018.816%2088.1264%2019.008C88.4144%2019.2%2088.8464%2019.296%2089.4224%2019.296H93.0224L93.7424%2023.472C93.2384%2023.544%2092.4704%2023.628%2091.4384%2023.724C90.4064%2023.796%2089.2784%2023.832%2088.0544%2023.832H85.8224Z'%20fill='%23FF3300'/%3e%3c/svg%3e",sX=({message:t})=>E.jsx("div",{className:"relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-[#1c1c20] font-main text-white",children:E.jsxs("div",{className:"flex flex-col items-center gap-10",children:[E.jsx("img",{src:rX,alt:"Rivet",className:"h-8 w-auto object-contain"}),E.jsxs("div",{className:"glass-panel flex items-center gap-3 rounded-xl px-8 py-3.5 text-sm font-medium",children:[E.jsx(L0,{className:"h-5 w-5 shrink-0 animate-spin text-primary",weight:"bold"}),E.jsx("span",{children:t})]})]})}),iX="data:image/svg+xml,%3csvg%20width='548'%20height='565'%20viewBox='0%200%20548%20565'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M136.53%20-0.00177124C170.301%20-0.00177124%20197.687%2027.3551%20197.724%2061.1255L198.089%20394.976C198.189%20486.214%20124.253%20560.23%2033.0153%20560.23C14.7818%20560.23%200.000557184%20545.449%200.000557184%20527.216V61.1923C0.000557184%2027.3957%2027.3981%20-0.00177124%2061.1947%20-0.00177124H136.53Z'%20fill='white'/%3e%3cpath%20d='M271.092%20463.876C271.092%20530.762%20310.368%20564.205%20388.919%20564.205C468.248%20564.205%20507.913%20530.762%20507.913%20463.876C507.913%20426.545%20498.191%20400.88%20478.748%20386.88C460.082%20372.103%20430.139%20364.715%20388.919%20364.715C350.032%20364.715%20320.478%20372.103%20300.257%20386.88C280.814%20400.88%20271.092%20426.545%20271.092%20463.876Z'%20fill='white'/%3e%3cpath%20d='M405.25%200.917969C408.273%200.917973%20411.331%201.11183%20414.358%201.66895C437.891%205.99962%20471.151%2018.8698%20498.612%2044.5137C526.065%2070.1496%20547.676%20108.515%20547.992%20163.691C547.992%20163.693%20547.994%20163.695%20547.997%20163.695C547.999%20163.695%20548.001%20163.697%20548.001%20163.7L547.996%20164.612L548.001%20165.526C548.001%20165.528%20547.999%20165.53%20547.997%20165.53C547.994%20165.53%20547.992%20165.532%20547.992%20165.535C547.665%20222.498%20524.643%20261.54%20495.935%20287.156C467.223%20312.776%20432.863%20324.939%20409.917%20328.291C409.844%20328.302%20409.769%20328.308%20409.695%20328.308H283.146C254.52%20328.308%20231.314%20305.102%20231.314%20276.477C231.315%20244.265%20255.799%20218.161%20287.447%20213.026C309.663%20209.422%20329.612%20204.399%20344.084%20196.322C354.361%20190.586%20359.717%20184.074%20362.521%20178.421C365.332%20172.756%20365.636%20167.843%20365.636%20165.225V163.994C365.635%20161.374%20365.33%20156.465%20362.521%20150.805C359.717%20145.152%20354.361%20138.639%20344.084%20132.903C329.612%20124.826%20309.663%20119.803%20287.447%20116.199C255.799%20111.065%20231.315%2084.9602%20231.314%2052.749C231.314%2024.1235%20254.52%200.917969%20283.146%200.917969H405.25Z'%20fill='white'/%3e%3c/svg%3e",y0=44,Pd=8,zp=16,oX=4,G8=-18,aX=.18,lX=[.22,1,.36,1],K8=.92,uX=1,cX=.95,dX=.4,fX=[.19,1,.22,1],oy=0,hX=1,pX=0,mX=0,vX=0,sM=({position:t,viewport:e,boundsLeft:n=0})=>{const r=n+Pd,s=Math.max(r,e.width-y0-Pd),i=Math.max(Pd,e.height-y0-Pd);return{x:Math.min(s,Math.max(r,t.x)),y:Math.min(i,Math.max(Pd,t.y))}},Dw=()=>({width:window.innerWidth,height:window.innerHeight}),gX=({position:t,boundsLeftPx:e=0})=>sM({position:t,viewport:Dw(),boundsLeft:e}),yX=()=>{if(typeof window>"u")return{x:zp,y:zp};const t=Dw();return{x:t.width-y0-zp,y:t.height-y0-zp}},_X=({deltaX:t,deltaY:e})=>Math.hypot(t,e)>=oX,xX=t=>t.button===void 0||t.button<=vX,Z8=t=>{const e=t.nativeEvent;return{x:Number.isFinite(t.clientX)?t.clientX:e.clientX,y:Number.isFinite(t.clientY)?t.clientY:e.clientY}},wX=({isVisible:t,isPanelOpen:e,isReducedMotion:n,position:r,dragBoundsLeftPx:s=0,onToggle:i,onPositionChange:a})=>{const u=v.useRef(null),c=v.useRef(!1),[d,f]=v.useState(!1),[p,m]=v.useState(!1),_=n?!1:{opacity:oy,scale:K8,x:G8},x=n?{opacity:oy}:{opacity:oy,scale:K8,x:G8},y=n?{duration:mX}:{duration:aX,ease:lX,scale:{duration:dX,ease:fX}},w=v.useCallback(()=>{const A=u.current;A&&(c.current=A.hasMoved),u.current=null,f(!1)},[]),b=v.useCallback(A=>{const R=u.current;if(!R)return;const L=Z8(A),I=L.x-R.startPointer.x,O=L.y-R.startPointer.y,N=R.hasMoved||_X({deltaX:I,deltaY:O});u.current={...R,hasMoved:N},N&&a(sM({position:{x:R.startPosition.x+I,y:R.startPosition.y+O},viewport:Dw(),boundsLeft:s}))},[a,s]),C=v.useCallback(A=>{if(u.current||!xX(A))return;const R=Z8(A);u.current={startPointer:R,startPosition:r,hasMoved:!1},f(!0)},[r]),P=v.useCallback(()=>{if(c.current){c.current=!1;return}i()},[i]),T=e?"Close panel":"Open panel";return E.jsxs(E.Fragment,{children:[d?E.jsx("div",{className:"fixed inset-0 z-40 cursor-grabbing","data-cy":"rivet-panel-launcher-drag-surface",onPointerMove:b,onPointerUp:w,onPointerCancel:w,onMouseMove:b,onMouseUp:w}):null,E.jsx(Qs,{children:t?E.jsx(Ys,{label:T,side:"top",forceOpen:p&&!d?void 0:!1,children:E.jsx(po.button,{type:"button","aria-label":T,"data-cy":"reopen-panel",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),initial:_,animate:{opacity:hX,scale:uX,x:pX},whileTap:{scale:cX},exit:x,transition:y,onPointerDown:C,onMouseDown:C,onPointerMove:b,onPointerUp:w,onPointerCancel:w,onMouseMove:b,onMouseUp:w,onClick:P,className:`bg-main absolute z-50 flex h-11 w-11 touch-none select-none items-center justify-center overflow-hidden rounded-full border border-white/10 shadow-[0_2px_8px_rgba(0,0,0,0.2),0_4px_16px_rgba(0,0,0,0.1)] transition-[background-color,box-shadow] duration-150 hover:bg-[#2a2a2a] focus:outline-none focus-visible:ring-2 focus-visible:ring-white/75 ${d?"cursor-grabbing shadow-[0_4px_12px_rgba(0,0,0,0.28),0_10px_24px_rgba(0,0,0,0.16)]":"cursor-grab"}`,style:{left:r.x,top:r.y,willChange:"left, top, transform"},children:E.jsx("img",{src:iX,alt:"","aria-hidden":"true",draggable:!1,className:"h-4 w-4"})})}):null})]})},ay=Os("useConfig"),bX=300*1e3,SX=1800*1e3,EX=60*1e3,CX=300*1e3,kX=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.queueAccessToken)??null},PX=()=>{var t;return typeof window>"u"?null:((t=window.__RIVET_BOOTSTRAP__)==null?void 0:t.agentApplyMode)??null},TX=t=>({...GA,...t??{}}),AX=()=>{const t=tt(i2),e=at(i2),n=at(rI),r=at(sI),s=at(N0),i=at(MW),a=at(nI),u=at(IW),c=at(Wf),d=at(XA),f=v.useCallback(b=>{a(b.agentModeAvailable),d({name:b.name??null,email:b.email??null}),b.isMCPSession&&n(!0),b.mcpEditor&&r(b.mcpEditor),s(b.agentApplyMode??PX()??null),i(b.queueAccessToken??kX())},[s,a,n,r,i,d]),p=ky({queryKey:["rivet-config"],queryFn:async()=>{const b=await fetch("/api/config");if(!b.ok)throw new Error(`Failed to fetch config: ${b.statusText}`);return await b.json()},staleTime:bX,gcTime:SX}),m=ky({queryKey:["rivet-feature-flags"],queryFn:async()=>{const b=await fetch("/api/feature-flags");if(!b.ok)throw new Error(`Failed to fetch feature flags: ${b.statusText}`);return await b.json()},staleTime:EX,gcTime:CX}),{refetch:_}=p,{refetch:x}=m;v.useLayoutEffect(()=>{p.data&&(f(p.data),c(!1),ay.info("Config loaded:",p.data)),m.data&&(e(TX(m.data.featureFlags)),u(!0))},[p.data,m.data,f,c,e,u]),v.useLayoutEffect(()=>{p.error&&(u(!0),c(!1),ay.warn("Failed to load config:",p.error instanceof Error?p.error.message:"Failed to load config")),m.error&&(u(!0),ay.warn("Failed to load feature flags:",m.error instanceof Error?m.error.message:"Failed to load feature flags"))},[p.error,m.error,c,u]);const y=v.useCallback(async()=>{const[b]=await Promise.all([_(),x()]);return b.data?b.data:null},[_,x]);let w=null;return p.error instanceof Error?w=p.error.message:p.error&&(w="Failed to load config"),{config:p.data??null,featureFlags:t,loading:p.isPending||!p.error&&m.isPending,error:w,refetchConfig:y}},pm="rivet_just_signed_in",xu=Os("useOAuthCallback"),IX="https://rivet-proxy.onrender.com",RX=()=>{const[t,e]=v.useState({isProcessing:!1,isComplete:!1,error:null});return v.useEffect(()=>{const n=new AbortController;let r=!1;return(async()=>{var u,c,d;const i=window.location.hash,a=window.location.search;if(!(!i||!i.includes("access_token"))&&!r){e({isProcessing:!0,isComplete:!1,error:null});try{xu.info("Processing OAuth callback...");const f=new URLSearchParams(i.substring(1)),p=f.get("access_token"),m=f.get("refresh_token"),x=new URLSearchParams(a).get("session");if(!p)throw new Error("No access token found in URL");if(!x)throw new Error("No session ID found in URL");xu.info(`Completing OAuth with session: ${x}`);const y=await fetch(`${IX}/api/auth/google/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:x,accessToken:p,refreshToken:m}),signal:n.signal}),w=await y.json();if(!y.ok||!w.success)throw new Error(w.error||w.message||"Failed to complete authentication");if(xu.info("OAuth authentication completed successfully"),r)return;if((u=w.user)!=null&&u.id?(Ee.identify(w.user.id,{...w.user.email?{email:w.user.email}:{}}),w.user.email&&Ee.alias(w.user.email,w.user.id)):(c=w.user)!=null&&c.email&&Ee.identify(w.user.email,{email:w.user.email}),(d=w.user)!=null&&d.email&&p)try{const C=await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w.user.email,token:p,refreshToken:m,userId:w.user.id}),signal:n.signal});C.ok||xu.warn(`Local auth store returned ${C.status}`)}catch(C){if(r)return;xu.warn("Failed to store auth locally:",C)}if(r)return;window.sessionStorage.setItem(pm,"1");const b=window.location.pathname;window.history.replaceState({},document.title,b),e({isProcessing:!1,isComplete:!0,error:null})}catch(f){if(r)return;const p=f instanceof Error?f.message:"Unknown error occurred";xu.warn("OAuth callback error:",f),e({isProcessing:!1,isComplete:!1,error:p})}}})(),()=>{r=!0,n.abort()}},[]),t},ly=Os("useAgentVariantsSession"),MX=t=>typeof t.pendingCount=="number"&&t.pendingCount===0&&(t.pendingVariantRequests??0)===0&&(t.leasedVariantRequests??0)===0&&(t.activeLeases??[]).length===0,Y8=(t,e,n)=>{e.size===0&&!n||t.set(mf,r=>{if(r.size===0)return r;const s=new Map(r);let i=!1;for(const[a,u]of r)u.status==="sending"&&u.variantRequestId&&(e.has(u.variantRequestId)||n&&u.variantRequest!==void 0)&&(s.delete(a),i=!0);return i?s:r})},OX=(t,e)=>{var s;if(t.size===0)return t;let n=!1;const r=new Map(t);for(const[i,a]of t){if(a.status!=="sending"||!a.awaitingSnapshotOutcome||a.variantRequest!==void 0)continue;const u=a.target;if(!u||u.kind!=="variant"||u.sessionId!==e.sessionId)continue;const c=(s=e.variants.find(d=>d.workItemId===u.variantId))==null?void 0:s.refinement;c&&(c.status==="succeeded"?(r.set(i,{...a,status:"complete",awaitingSnapshotOutcome:void 0}),n=!0):(c.status==="failed"||c.status==="cancelled")&&(r.set(i,{...a,status:"error",awaitingSnapshotOutcome:void 0}),n=!0))}return n?r:t},LX=({enabled:t=!0}={})=>{const e=at(Bf),n=at(KA),r=at(CW),s=at(eI),i=at(AW),a=ox(),u=v.useRef(null);v.useEffect(()=>{if(!t)return;const c=new EventSource("/api/variants/events");return c.onmessage=d=>{try{const f=JSON.parse(d.data),p=u.current;if(f.active){const x=new Set(f.variants.map(y=>y.requestId).filter(y=>!!y));s(y=>y.filter(b=>!x.has(b.requestId))),Y8(a,x,!1),a.set(mf,y=>{let w=y;for(const b of f.variants){const C=b.adoptedSource;C&&(w=TW(w,{kind:"variant",sessionId:C.sessionId,variantId:C.variantId},{kind:"variant",sessionId:f.sessionId,variantId:b.workItemId}))}return w}),a.set(mf,y=>OX(y,f)),f.sessionId!==u.current&&(u.current=f.sessionId,n(!0),r("directions"))}else u.current=null,Y8(a,new Set,MX(f));e(f);const m=!f.active&&p!==null,_=f.active&&f.sessionId!==p;if(_&&fetch(`/api/variants/${f.sessionId}/preview-port`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({variantId:null})}).catch(x=>ly.warn("failed to reset preview-port on session switch",x)),m||_){const x=new Set;if(f.active)for(const w of f.variants)x.add(hf({kind:"variant",sessionId:f.sessionId,variantId:w.workItemId}));const y=a.get(yo);for(const w of[y==null?void 0:y.left,y==null?void 0:y.right])w&&x.add(hf({kind:"variant",sessionId:w.sessionId,variantId:w.variantId}));i(x)}}catch(f){ly.warn("failed to parse SSE event payload",f)}},c.onerror=d=>{ly.warn("SSE error (auto-reconnects)",d)},()=>{c.close()}},[t,e,n,r,s,i,a])};var NX=Object.defineProperty,$n=(t,e)=>NX(t,"name",{value:e,configurable:!0});function jw(t){const e=t+"CollectionProvider",[n,r]=Ni(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=$n(y=>{const{scope:w,children:b}=y,C=v.useRef(null),P=v.useRef(new Map).current;return E.jsx(s,{scope:w,itemMap:P,collectionRef:C,children:b})},"CollectionProvider");a.displayName=e;const u=t+"CollectionSlot",c=pa(u),d=v.forwardRef((y,w)=>{const{scope:b,children:C}=y,P=i(u,b),T=Bt(w,P.collectionRef);return E.jsx(c,{ref:T,children:C})});d.displayName=u;const f=t+"CollectionItemSlot",p="data-radix-collection-item",m=pa(f),_=v.forwardRef((y,w)=>{const{scope:b,children:C,...P}=y,T=v.useRef(null),A=Bt(w,T),R=i(f,b);return v.useEffect(()=>(R.itemMap.set(T,{ref:T,...P}),()=>void R.itemMap.delete(T))),E.jsx(m,{[p]:"",ref:A,children:C})});_.displayName=f;function x(y){const w=i(t+"CollectionConsumer",y);return v.useCallback(()=>{const C=w.collectionRef.current;if(!C)return[];const P=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((R,L)=>P.indexOf(R.ref.current)-P.indexOf(L.ref.current))},[w.collectionRef,w.itemMap])}return $n(x,"useCollection"),[{Provider:a,Slot:d,ItemSlot:_},x,r]}$n(jw,"createCollection");var X8=new WeakMap,Cn,Jr,uy=(Jr=class extends Map{constructor(n){super(n);Be(this,Cn);ke(this,Cn,[...super.keys()]),X8.set(this,!0)}set(n,r){return X8.get(this)&&(this.has(n)?U(this,Cn)[U(this,Cn).indexOf(n)]=n:U(this,Cn).push(n)),super.set(n,r),this}insert(n,r,s){const i=this.has(r),a=U(this,Cn).length,u=Fw(n);let c=u>=0?u:a+u;const d=c<0||c>=a?-1:c;if(d===this.size||i&&d===this.size-1||d===-1)return this.set(r,s),this;const f=this.size+(i?0:1);u<0&&c++;const p=[...U(this,Cn)];let m,_=!1;for(let x=c;x<f;x++)if(c===x){let y=p[x];p[x]===r&&(y=p[x+1]),i&&this.delete(r),m=this.get(y),this.set(r,s)}else{!_&&p[x-1]===r&&(_=!0);const y=p[_?x:x-1],w=m;m=this.get(y),this.delete(y),this.set(y,w)}return this}with(n,r,s){const i=new Jr(this);return i.insert(n,r,s),i}before(n){const r=U(this,Cn).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,s){const i=U(this,Cn).indexOf(n);return i===-1?this:this.insert(i,r,s)}after(n){let r=U(this,Cn).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,s){const i=U(this,Cn).indexOf(n);return i===-1?this:this.insert(i+1,r,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ke(this,Cn,[]),super.clear()}delete(n){const r=super.delete(n);return r&&U(this,Cn).splice(U(this,Cn).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=mm(U(this,Cn),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=mm(U(this,Cn),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return U(this,Cn).indexOf(n)}keyAt(n){return mm(U(this,Cn),n)}from(n,r){const s=this.indexOf(n);if(s===-1)return;let i=s+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(n,r){const s=this.indexOf(n);if(s===-1)return;let i=s+r;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return i;s++}}findIndex(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return s;s++}return-1}filter(n,r){const s=[];let i=0;for(const a of this)Reflect.apply(n,r,[a,i,this])&&s.push(a),i++;return new Jr(s)}map(n,r){const s=[];let i=0;for(const a of this)s.push([a[0],Reflect.apply(n,r,[a,i,this])]),i++;return new Jr(s)}reduce(...n){const[r,s]=n;let i=0,a=s??this.at(0);for(const u of this)i===0&&n.length===1?a=u:a=Reflect.apply(r,this,[a,u,i,this]),i++;return a}reduceRight(...n){const[r,s]=n;let i=s??this.at(-1);for(let a=this.size-1;a>=0;a--){const u=this.at(a);a===this.size-1&&n.length===1?i=u:i=Reflect.apply(r,this,[i,u,a,this])}return i}toSorted(n){const r=[...this.entries()].sort(n);return new Jr(r)}toReversed(){const n=new Jr;for(let r=this.size-1;r>=0;r--){const s=this.keyAt(r),i=this.get(s);n.set(s,i)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Jr(r)}slice(n,r){const s=new Jr;let i=this.size-1;if(n===void 0)return s;n<0&&(n=n+this.size),r!==void 0&&r>0&&(i=r-1);for(let a=n;a<=i;a++){const u=this.keyAt(a),c=this.get(u);s.set(u,c)}return s}every(n,r){let s=0;for(const i of this){if(!Reflect.apply(n,r,[i,s,this]))return!1;s++}return!0}some(n,r){let s=0;for(const i of this){if(Reflect.apply(n,r,[i,s,this]))return!0;s++}return!1}},Cn=new WeakMap,$n(Jr,"OrderedDict"),Jr);function mm(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=iM(t,e);return n===-1?void 0:t[n]}$n(mm,"at");function iM(t,e){const n=t.length,r=Fw(e),s=r>=0?r:n+r;return s<0||s>=n?-1:s}$n(iM,"toSafeIndex");function Fw(t){return t!==t||t===0?0:Math.trunc(t)}$n(Fw,"toSafeInteger");function DX(t){const e=t+"CollectionProvider",[n,r]=Ni(e),[s,i]=n(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new uy,setItemMap:$n(()=>{},"setItemMap")}),a=$n(({state:P,...T})=>P?E.jsx(c,{...T,state:P}):E.jsx(u,{...T}),"CollectionProvider");a.displayName=e;const u=$n(P=>{const T=w();return E.jsx(c,{...P,state:T})},"CollectionInit");u.displayName=e+"Init";const c=$n(P=>{const{scope:T,children:A,state:R}=P,L=v.useRef(null),[I,O]=v.useState(null),N=Bt(L,O),[j,F]=R;return v.useEffect(()=>{if(!I)return;const G=lM(()=>{});return G.observe(I,{childList:!0,subtree:!0}),()=>{G.disconnect()}},[I]),E.jsx(s,{scope:T,itemMap:j,setItemMap:F,collectionRef:N,collectionRefObject:L,collectionElement:I,children:A})},"CollectionProviderImpl");c.displayName=e+"Impl";const d=t+"CollectionSlot",f=pa(d),p=v.forwardRef((P,T)=>{const{scope:A,children:R}=P,L=i(d,A),I=Bt(T,L.collectionRef);return E.jsx(f,{ref:I,children:R})});p.displayName=d;const m=t+"CollectionItemSlot",_="data-radix-collection-item",x=pa(m),y=v.forwardRef((P,T)=>{const{scope:A,children:R,...L}=P,I=v.useRef(null),[O,N]=v.useState(null),j=Bt(T,I,N),F=i(m,A),{setItemMap:G}=F,Q=v.useRef(L);oM(Q.current,L)||(Q.current=L);const Z=Q.current;return v.useEffect(()=>{const W=Z;return G(q=>O?q.has(O)?q.set(O,{...W,element:O}).toSorted(T2):(q.set(O,{...W,element:O}),q.toSorted(T2)):q),()=>{G(q=>!O||!q.has(O)?q:(q.delete(O),new uy(q)))}},[O,Z,G]),E.jsx(x,{[_]:"",ref:j,children:R})});y.displayName=m;function w(){return v.useState(new uy)}$n(w,"useInitCollection");function b(P){const{itemMap:T}=i(t+"CollectionConsumer",P);return T}return $n(b,"useCollection"),[{Provider:a,Slot:p,ItemSlot:y},{createCollectionScope:r,useCollection:b,useInitCollection:w}]}$n(DX,"createCollection");function oM(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n)if(!Object.prototype.hasOwnProperty.call(e,s)||t[s]!==e[s])return!1;return!0}$n(oM,"shallowEqual");function aM(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}$n(aM,"isElementPreceding");function T2(t,e){return!t[1].element||!e[1].element?0:aM(t[1].element,e[1].element)?-1:1}$n(T2,"sortByDocumentPosition");function lM(t){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){t();return}})}$n(lM,"getChildListObserver");var jX=Object.defineProperty,Kf=(t,e)=>jX(t,"name",{value:e,configurable:!0}),Vw="Collapsible",[FX,uM]=Ni(Vw),[VX,$w]=FX(Vw),$X=v.forwardRef(Kf(function(e,n){const{__scopeCollapsible:r,open:s,defaultOpen:i,disabled:a,onOpenChange:u,...c}=e,[d,f]=wa({prop:s,defaultProp:i??!1,onChange:u,caller:Vw});return E.jsx(VX,{scope:r,disabled:a,contentId:oa(),open:d,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),children:E.jsx(xn.div,{"data-state":K0(d),"data-disabled":a?"":void 0,...c,ref:n})})},"Collapsible")),zX="CollapsibleTrigger",HX=v.forwardRef(Kf(function(e,n){const{__scopeCollapsible:r,...s}=e,i=$w(zX,r);return E.jsx(xn.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":K0(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...s,ref:n,onClick:Ht(e.onClick,i.onOpenToggle)})},"CollapsibleTrigger")),cM="CollapsibleContent",UX=v.forwardRef(Kf(function(e,n){const{forceMount:r,...s}=e,i=$w(cM,e.__scopeCollapsible);return E.jsx(ba,{present:r||i.open,children:({present:a})=>E.jsx(BX,{...s,ref:n,present:a})})},"CollapsibleContent")),BX=v.forwardRef(Kf(function(e,n){const{__scopeCollapsible:r,present:s,children:i,...a}=e,u=$w(cM,r),[c,d]=v.useState(s),f=v.useRef(null),p=Bt(n,f),m=v.useRef(0),_=m.current,x=v.useRef(0),y=x.current,w=u.open||c,b=v.useRef(w),C=v.useRef(void 0);return v.useEffect(()=>{const P=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(P)},[]),zr(()=>{const P=f.current;if(P){C.current=C.current||{transitionDuration:P.style.transitionDuration,animationName:P.style.animationName},P.style.transitionDuration="0s",P.style.animationName="none";const T=P.getBoundingClientRect();m.current=T.height,x.current=T.width,b.current||(P.style.transitionDuration=C.current.transitionDuration,P.style.animationName=C.current.animationName),d(s)}},[u.open,s]),E.jsx(xn.div,{"data-state":K0(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...a,ref:p,style:{"--radix-collapsible-content-height":_?`${_}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:w&&i})},"CollapsibleContentImpl"));function K0(t){return t?"open":"closed"}Kf(K0,"getState");var WX=$X,qX=HX,GX=UX,KX=Object.defineProperty,ZX=(t,e)=>KX(t,"name",{value:e,configurable:!0}),YX=v.createContext(void 0);function zw(t){const e=v.useContext(YX);return t||e||"ltr"}ZX(zw,"useDirection");var XX=Object.defineProperty,cs=(t,e)=>XX(t,"name",{value:e,configurable:!0}),Di="Accordion",QX=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Hw,JX,eQ]=jw(Di),[Z0,mte]=Ni(Di,[eQ,uM]),Uw=uM(),tQ=v.forwardRef(cs(function(e,n){const{type:r,...s}=e,i=s,a=s;return E.jsx(Hw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?E.jsx(iQ,{...a,ref:n}):E.jsx(sQ,{...i,ref:n})})},"Accordion")),[dM,nQ]=Z0(Di),[fM,rQ]=Z0(Di,{collapsible:!1}),sQ=v.forwardRef(cs(function(e,n){const{value:r,defaultValue:s,onValueChange:i=cs(()=>{},"onValueChange"),collapsible:a=!1,...u}=e,[c,d]=wa({prop:r,defaultProp:s??"",onChange:i,caller:Di});return E.jsx(dM,{scope:e.__scopeAccordion,value:v.useMemo(()=>c?[c]:[],[c]),onItemOpen:d,onItemClose:v.useCallback(()=>a&&d(""),[a,d]),children:E.jsx(fM,{scope:e.__scopeAccordion,collapsible:a,children:E.jsx(hM,{...u,ref:n})})})},"AccordionImplSingle")),iQ=v.forwardRef(cs(function(e,n){const{value:r,defaultValue:s,onValueChange:i=cs(()=>{},"onValueChange"),...a}=e,[u,c]=wa({prop:r,defaultProp:s??[],onChange:i,caller:Di}),d=v.useCallback(p=>c((m=[])=>[...m,p]),[c]),f=v.useCallback(p=>c((m=[])=>m.filter(_=>_!==p)),[c]);return E.jsx(dM,{scope:e.__scopeAccordion,value:u,onItemOpen:d,onItemClose:f,children:E.jsx(fM,{scope:e.__scopeAccordion,collapsible:!0,children:E.jsx(hM,{...a,ref:n})})})},"AccordionImplMultiple")),[oQ,Y0]=Z0(Di),hM=v.forwardRef(cs(function(e,n){const{__scopeAccordion:r,disabled:s,dir:i,orientation:a="vertical",...u}=e,c=v.useRef(null),d=Bt(c,n),f=JX(r),m=zw(i)==="ltr",_=Ht(e.onKeyDown,x=>{var O;if(!QX.includes(x.key))return;const y=x.target,w=f().filter(N=>{var j;return!((j=N.ref.current)!=null&&j.disabled)}),b=w.findIndex(N=>N.ref.current===y),C=w.length;if(b===-1)return;x.preventDefault();let P=b;const T=0,A=C-1,R=cs(()=>{P=b+1,P>A&&(P=T)},"moveNext"),L=cs(()=>{P=b-1,P<T&&(P=A)},"movePrev");switch(x.key){case"Home":P=T;break;case"End":P=A;break;case"ArrowRight":a==="horizontal"&&(m?R():L());break;case"ArrowDown":a==="vertical"&&R();break;case"ArrowLeft":a==="horizontal"&&(m?L():R());break;case"ArrowUp":a==="vertical"&&L();break}const I=P%C;(O=w[I].ref.current)==null||O.focus()});return E.jsx(oQ,{scope:r,disabled:s,direction:i,orientation:a,children:E.jsx(Hw.Slot,{scope:r,children:E.jsx(xn.div,{...u,"data-orientation":a,ref:d,onKeyDown:s?void 0:_})})})},"AccordionImpl")),A2="AccordionItem",[aQ,Bw]=Z0(A2),lQ=v.forwardRef(cs(function(e,n){const{__scopeAccordion:r,value:s,...i}=e,a=Y0(A2,r),u=nQ(A2,r),c=Uw(r),d=oa(),f=s&&u.value.includes(s)||!1,p=a.disabled||e.disabled;return E.jsx(aQ,{scope:r,open:f,disabled:p,triggerId:d,children:E.jsx(WX,{"data-orientation":a.orientation,"data-state":Ww(f),...c,...i,ref:n,disabled:p,open:f,onOpenChange:m=>{m?u.onItemOpen(s):u.onItemClose(s)}})})},"AccordionItem")),uQ="AccordionHeader",cQ=v.forwardRef(cs(function(e,n){const{__scopeAccordion:r,...s}=e,i=Y0(Di,r),a=Bw(uQ,r);return E.jsx(xn.h3,{"data-orientation":i.orientation,"data-state":Ww(a.open),"data-disabled":a.disabled?"":void 0,...s,ref:n})},"AccordionHeader")),Q8="AccordionTrigger",dQ=v.forwardRef(cs(function(e,n){const{__scopeAccordion:r,...s}=e,i=Y0(Di,r),a=Bw(Q8,r),u=rQ(Q8,r),c=Uw(r);return E.jsx(Hw.ItemSlot,{scope:r,children:E.jsx(qX,{"aria-disabled":a.open&&!u.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...c,...s,ref:n})})},"AccordionTrigger")),fQ="AccordionContent",hQ=v.forwardRef(cs(function(e,n){const{__scopeAccordion:r,...s}=e,i=Y0(Di,r),a=Bw(fQ,r),u=Uw(r);return E.jsx(GX,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...u,...s,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})},"AccordionContent"));function Ww(t){return t?"open":"closed"}cs(Ww,"getState");var pM=tQ,pQ=lQ,mQ=cQ,vQ=dQ,gQ=hQ;/**
|
|
130
|
-
* @license lucide-react v1.34.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const mM=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
|
|
135
|
-
* @license lucide-react v1.34.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const yQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
140
|
-
* @license lucide-react v1.34.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const _Q=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
145
|
-
* @license lucide-react v1.34.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const J8=t=>{const e=_Q(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
|
|
150
|
-
* @license lucide-react v1.34.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/var cy={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"};/**
|
|
155
|
-
* @license lucide-react v1.34.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const xQ=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},wQ=v.createContext({}),bQ=()=>v.useContext(wQ),SQ=v.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...u},c)=>{const{size:d=24,strokeWidth:f=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:_=""}=bQ()??{},x=r??p?Number(n??f)*24/Number(e??d):n??f;return v.createElement("svg",{ref:c,...cy,width:e??d??cy.width,height:e??d??cy.height,stroke:t??m,strokeWidth:x,className:mM("lucide",_,s),...!i&&!xQ(u)&&{"aria-hidden":"true"},...u},[...a.map(([y,w])=>v.createElement(y,w)),...Array.isArray(i)?i:[i]])});/**
|
|
160
|
-
* @license lucide-react v1.34.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const et=(t,e)=>{const n=v.forwardRef(({className:r,...s},i)=>v.createElement(SQ,{ref:i,iconNode:e,className:mM(`lucide-${yQ(J8(t))}`,`lucide-${t}`,r),...s}));return n.displayName=J8(t),n};/**
|
|
165
|
-
* @license lucide-react v1.34.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const EQ=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],CQ=et("arrow-left",EQ);/**
|
|
170
|
-
* @license lucide-react v1.34.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const kQ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],PQ=et("arrow-right",kQ);/**
|
|
175
|
-
* @license lucide-react v1.34.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const TQ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],AQ=et("arrow-up",TQ);/**
|
|
180
|
-
* @license lucide-react v1.34.0 - ISC
|
|
181
|
-
*
|
|
182
|
-
* This source code is licensed under the ISC license.
|
|
183
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const IQ=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],RQ=et("bell",IQ);/**
|
|
185
|
-
* @license lucide-react v1.34.0 - ISC
|
|
186
|
-
*
|
|
187
|
-
* This source code is licensed under the ISC license.
|
|
188
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const MQ=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],OQ=et("brain",MQ);/**
|
|
190
|
-
* @license lucide-react v1.34.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const LQ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],NQ=et("check",LQ);/**
|
|
195
|
-
* @license lucide-react v1.34.0 - ISC
|
|
196
|
-
*
|
|
197
|
-
* This source code is licensed under the ISC license.
|
|
198
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const DQ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jQ=et("chevron-down",DQ);/**
|
|
200
|
-
* @license lucide-react v1.34.0 - ISC
|
|
201
|
-
*
|
|
202
|
-
* This source code is licensed under the ISC license.
|
|
203
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const FQ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],VQ=et("chevron-right",FQ);/**
|
|
205
|
-
* @license lucide-react v1.34.0 - ISC
|
|
206
|
-
*
|
|
207
|
-
* This source code is licensed under the ISC license.
|
|
208
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const $Q=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zQ=et("circle",$Q);/**
|
|
210
|
-
* @license lucide-react v1.34.0 - ISC
|
|
211
|
-
*
|
|
212
|
-
* This source code is licensed under the ISC license.
|
|
213
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const HQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],UQ=et("clock",HQ);/**
|
|
215
|
-
* @license lucide-react v1.34.0 - ISC
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the ISC license.
|
|
218
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/const BQ=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],WQ=et("copy",BQ);/**
|
|
220
|
-
* @license lucide-react v1.34.0 - ISC
|
|
221
|
-
*
|
|
222
|
-
* This source code is licensed under the ISC license.
|
|
223
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/const qQ=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],GQ=et("dot",qQ);/**
|
|
225
|
-
* @license lucide-react v1.34.0 - ISC
|
|
226
|
-
*
|
|
227
|
-
* This source code is licensed under the ISC license.
|
|
228
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/const KQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ZQ=et("globe",KQ);/**
|
|
230
|
-
* @license lucide-react v1.34.0 - ISC
|
|
231
|
-
*
|
|
232
|
-
* This source code is licensed under the ISC license.
|
|
233
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/const YQ=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],XQ=et("heart",YQ);/**
|
|
235
|
-
* @license lucide-react v1.34.0 - ISC
|
|
236
|
-
*
|
|
237
|
-
* This source code is licensed under the ISC license.
|
|
238
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
-
*/const QQ=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],JQ=et("house",QQ);/**
|
|
240
|
-
* @license lucide-react v1.34.0 - ISC
|
|
241
|
-
*
|
|
242
|
-
* This source code is licensed under the ISC license.
|
|
243
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/const eJ=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],tJ=et("image",eJ);/**
|
|
245
|
-
* @license lucide-react v1.34.0 - ISC
|
|
246
|
-
*
|
|
247
|
-
* This source code is licensed under the ISC license.
|
|
248
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/const nJ=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],rJ=et("inbox",nJ);/**
|
|
250
|
-
* @license lucide-react v1.34.0 - ISC
|
|
251
|
-
*
|
|
252
|
-
* This source code is licensed under the ISC license.
|
|
253
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/const sJ=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],iJ=et("lightbulb",sJ);/**
|
|
255
|
-
* @license lucide-react v1.34.0 - ISC
|
|
256
|
-
*
|
|
257
|
-
* This source code is licensed under the ISC license.
|
|
258
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
-
*/const oJ=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],aJ=et("link",oJ);/**
|
|
260
|
-
* @license lucide-react v1.34.0 - ISC
|
|
261
|
-
*
|
|
262
|
-
* This source code is licensed under the ISC license.
|
|
263
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
-
*/const lJ=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],uJ=et("loader",lJ);/**
|
|
265
|
-
* @license lucide-react v1.34.0 - ISC
|
|
266
|
-
*
|
|
267
|
-
* This source code is licensed under the ISC license.
|
|
268
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
-
*/const cJ=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],dJ=et("lock",cJ);/**
|
|
270
|
-
* @license lucide-react v1.34.0 - ISC
|
|
271
|
-
*
|
|
272
|
-
* This source code is licensed under the ISC license.
|
|
273
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
-
*/const fJ=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],hJ=et("mail",fJ);/**
|
|
275
|
-
* @license lucide-react v1.34.0 - ISC
|
|
276
|
-
*
|
|
277
|
-
* This source code is licensed under the ISC license.
|
|
278
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/const pJ=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],mJ=et("menu",pJ);/**
|
|
280
|
-
* @license lucide-react v1.34.0 - ISC
|
|
281
|
-
*
|
|
282
|
-
* This source code is licensed under the ISC license.
|
|
283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/const vJ=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],gJ=et("message-circle",vJ);/**
|
|
285
|
-
* @license lucide-react v1.34.0 - ISC
|
|
286
|
-
*
|
|
287
|
-
* This source code is licensed under the ISC license.
|
|
288
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
-
*/const yJ=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],_J=et("monitor",yJ);/**
|
|
290
|
-
* @license lucide-react v1.34.0 - ISC
|
|
291
|
-
*
|
|
292
|
-
* This source code is licensed under the ISC license.
|
|
293
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
-
*/const xJ=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],wJ=et("moon",xJ);/**
|
|
295
|
-
* @license lucide-react v1.34.0 - ISC
|
|
296
|
-
*
|
|
297
|
-
* This source code is licensed under the ISC license.
|
|
298
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
-
*/const bJ=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],SJ=et("paintbrush",bJ);/**
|
|
300
|
-
* @license lucide-react v1.34.0 - ISC
|
|
301
|
-
*
|
|
302
|
-
* This source code is licensed under the ISC license.
|
|
303
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
-
*/const EJ=[["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"}]],CJ=et("palette",EJ);/**
|
|
305
|
-
* @license lucide-react v1.34.0 - ISC
|
|
306
|
-
*
|
|
307
|
-
* This source code is licensed under the ISC license.
|
|
308
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
-
*/const kJ=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],PJ=et("pause",kJ);/**
|
|
310
|
-
* @license lucide-react v1.34.0 - ISC
|
|
311
|
-
*
|
|
312
|
-
* This source code is licensed under the ISC license.
|
|
313
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/const TJ=[["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"}]],AJ=et("pencil",TJ);/**
|
|
315
|
-
* @license lucide-react v1.34.0 - ISC
|
|
316
|
-
*
|
|
317
|
-
* This source code is licensed under the ISC license.
|
|
318
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
-
*/const IJ=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],RJ=et("pipette",IJ);/**
|
|
320
|
-
* @license lucide-react v1.34.0 - ISC
|
|
321
|
-
*
|
|
322
|
-
* This source code is licensed under the ISC license.
|
|
323
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
-
*/const MJ=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],OJ=et("play",MJ);/**
|
|
325
|
-
* @license lucide-react v1.34.0 - ISC
|
|
326
|
-
*
|
|
327
|
-
* This source code is licensed under the ISC license.
|
|
328
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
-
*/const LJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],NJ=et("plus",LJ);/**
|
|
330
|
-
* @license lucide-react v1.34.0 - ISC
|
|
331
|
-
*
|
|
332
|
-
* This source code is licensed under the ISC license.
|
|
333
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
-
*/const DJ=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}]],jJ=et("rectangle-horizontal",DJ);/**
|
|
335
|
-
* @license lucide-react v1.34.0 - ISC
|
|
336
|
-
*
|
|
337
|
-
* This source code is licensed under the ISC license.
|
|
338
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
-
*/const FJ=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],VJ=et("rocket",FJ);/**
|
|
340
|
-
* @license lucide-react v1.34.0 - ISC
|
|
341
|
-
*
|
|
342
|
-
* This source code is licensed under the ISC license.
|
|
343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/const $J=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],zJ=et("rotate-ccw",$J);/**
|
|
345
|
-
* @license lucide-react v1.34.0 - ISC
|
|
346
|
-
*
|
|
347
|
-
* This source code is licensed under the ISC license.
|
|
348
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
-
*/const HJ=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],UJ=et("search",HJ);/**
|
|
350
|
-
* @license lucide-react v1.34.0 - ISC
|
|
351
|
-
*
|
|
352
|
-
* This source code is licensed under the ISC license.
|
|
353
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
-
*/const BJ=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],WJ=et("settings",BJ);/**
|
|
355
|
-
* @license lucide-react v1.34.0 - ISC
|
|
356
|
-
*
|
|
357
|
-
* This source code is licensed under the ISC license.
|
|
358
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/const qJ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],GJ=et("shield",qJ);/**
|
|
360
|
-
* @license lucide-react v1.34.0 - ISC
|
|
361
|
-
*
|
|
362
|
-
* This source code is licensed under the ISC license.
|
|
363
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
-
*/const KJ=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],ZJ=et("skip-forward",KJ);/**
|
|
365
|
-
* @license lucide-react v1.34.0 - ISC
|
|
366
|
-
*
|
|
367
|
-
* This source code is licensed under the ISC license.
|
|
368
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
-
*/const YJ=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 7v10",key:"d5nglc"}],["path",{d:"M11 7v10",key:"pptsnr"}],["path",{d:"m15 7 2 10",key:"1m7qm5"}]],XJ=et("square-library",YJ);/**
|
|
370
|
-
* @license lucide-react v1.34.0 - ISC
|
|
371
|
-
*
|
|
372
|
-
* This source code is licensed under the ISC license.
|
|
373
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
-
*/const QJ=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],JJ=et("star",QJ);/**
|
|
375
|
-
* @license lucide-react v1.34.0 - ISC
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the ISC license.
|
|
378
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/const eee=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],tee=et("sun",eee);/**
|
|
380
|
-
* @license lucide-react v1.34.0 - ISC
|
|
381
|
-
*
|
|
382
|
-
* This source code is licensed under the ISC license.
|
|
383
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
384
|
-
*/const nee=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ree=et("user",nee);/**
|
|
385
|
-
* @license lucide-react v1.34.0 - ISC
|
|
386
|
-
*
|
|
387
|
-
* This source code is licensed under the ISC license.
|
|
388
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
-
*/const see=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],iee=et("users",see);/**
|
|
390
|
-
* @license lucide-react v1.34.0 - ISC
|
|
391
|
-
*
|
|
392
|
-
* This source code is licensed under the ISC license.
|
|
393
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
-
*/const oee=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],aee=et("x",oee),lee={"chevron-right":VQ,"chevron-down":jQ,pipette:RJ,x:aee,copy:WQ,menu:mJ,dot:GQ,monitor:_J,sun:tee,moon:wJ,"rectangle-horizontal":jJ,circle:zQ,"square-library":XJ,clock:UQ,star:JJ,settings:WJ,plus:NJ,"arrow-left":CQ,"arrow-right":PQ,"arrow-up":AQ,search:UJ,loader:uJ,users:iee,lock:dJ,mail:hJ,bell:RQ,shield:GJ,palette:CJ,lightbulb:iJ,rocket:VJ,heart:XQ,paintbrush:SJ,brain:OQ,globe:ZQ,user:ree,image:tJ,link:aJ,check:NQ,"rotate-ccw":zJ,play:OJ,pause:PJ,home:JQ,"message-circle":gJ,inbox:rJ,pencil:AJ,"skip-forward":ZJ},e6={lucide:lee},vM=v.createContext(null);function uee(t){const e=v.useContext(vM);return e?e6[e.iconLibrary][t]:e6.lucide[t]}function cee({children:t,defaultLibrary:e="lucide"}){const[n,r]=v.useState(e),s=v.useCallback(i=>{r(i)},[]);return E.jsx(vM.Provider,{value:{iconLibrary:n,setIconLibrary:s},children:t})}const gM=v.createContext(null);function qw(){return v.useContext(gM)}const yM=v.createContext(null);function _M(){const t=v.useContext(yM);if(!t)throw new Error("AccordionTrigger/AccordionContent must be used within an AccordionItem");return t}const dee=v.forwardRef((t,e)=>{const{children:n,type:r="single",className:s,...i}=t,a=v.useRef(null),u=v.useRef(new Map),[c,d]=v.useState(new Map),{activeIndex:f,setActiveIndex:p,itemRects:m,sessionRef:_,handlers:x,registerItem:y,measureItems:w}=HA(a),b=v.useCallback((ce,ae)=>{ae?u.current.set(ce,ae):u.current.delete(ce)},[]),C=v.useCallback(()=>{if(!a.current)return;const ce=new Map;u.current.forEach((ae,$e)=>{ce.set($e,{top:ae.offsetTop,left:ae.offsetLeft,width:ae.offsetWidth,height:ae.offsetHeight})}),d(ce)},[]),[P,T]=v.useState(()=>r==="single"?t.defaultValue??"":""),[A,R]=v.useState(()=>r==="multiple"?t.defaultValue??[]:[]),L=t.onValueChange,I=t.onValueChange,O=t.value,N=new Set(r==="multiple"?t.value??A:(()=>{const ce=t.value??P;return ce?[ce]:[]})()),j=v.useCallback(ce=>{const ae=t;ae.onValueChange?ae.onValueChange(ce):T(ce)},[L]),F=v.useCallback(ce=>{const ae=t;ae.onValueChange?ae.onValueChange(ce):R(ce)},[I]),G=v.useCallback(ce=>{if(r==="multiple"){const ae=t.value??A;F(ae.filter($e=>$e!==ce))}else j("")},[r,j,F,A,O]);v.useEffect(()=>{w(),C()},[w,C,n]);const Q=[...N].join(",");v.useEffect(()=>{w(),C()},[w,C,Q]);const[Z,W]=v.useState(null),q=f!==null?m[f]:null,z=Z!==null?m[Z]:null,X=f!==null&&!c.has(f),H=U0(),{value:D,defaultValue:Y,onValueChange:oe,collapsible:J,type:se,...pe}=i,Se=r==="multiple"?{type:"multiple",value:t.value??A,onValueChange:F}:{type:"single",collapsible:t.collapsible??!0,value:t.value??P,onValueChange:j};return E.jsx(gM.Provider,{value:{registerItem:y,registerFullItem:b,activeIndex:f,grouped:!0,remeasure:()=>{w(),C()},openValues:N,openItemRects:c,toggleValue:G},children:E.jsx(pM,{...Se,asChild:!0,children:E.jsxs("div",{ref:ce=>{a.current=ce,typeof e=="function"?e(ce):e&&(e.current=ce)},onMouseEnter:x.onMouseEnter,onMouseMove:ce=>{const ae=a.current;if(ae){const $e=ae.getBoundingClientRect(),We=ae.offsetHeight,ze=$e.height,Fe=We>0?ze/We:1,ct=(ce.clientY-$e.top)/Fe+ae.scrollTop;for(const[Kt,rt]of c){const Ve=m[Kt];if(!Ve)continue;const Ne=Ve.top+Ve.height,Je=rt.top+rt.height;if(ct>=Ne&&ct<=Je){p(null);return}}}x.onMouseMove(ce)},onMouseLeave:x.onMouseLeave,onFocus:ce=>{var $e;const ae=($e=ce.target.closest("[data-proximity-index]"))==null?void 0:$e.getAttribute("data-proximity-index");if(ae!=null){const We=Number(ae);p(We),W(ce.target.matches(":focus-visible")?We:null)}},onBlur:ce=>{var ae;(ae=a.current)!=null&&ae.contains(ce.relatedTarget)||(W(null),p(null))},className:cr("relative flex flex-col gap-0.5 w-72 max-w-full",s),...pe,children:[E.jsx(Qs,{children:[...c.entries()].map(([ce,ae])=>E.jsx(ho.div,{className:`absolute ${H.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,initial:!1,animate:{top:ae.top,left:ae.left,width:ae.width,height:ae.height,opacity:X?.7:1},exit:{opacity:0,transition:{duration:.12}},transition:{top:{duration:0},left:{duration:0},width:{duration:0},height:{duration:0},opacity:{duration:.08}}},`expanded-${ce}`))}),E.jsx(Qs,{children:q&&E.jsx(ho.div,{className:`absolute ${H.bg} bg-hover pointer-events-none`,initial:{opacity:0,top:q.top,left:q.left,width:q.width,height:q.height},animate:{opacity:1,top:q.top,left:q.left,width:q.width,height:q.height},exit:{opacity:0,transition:{duration:.06}},transition:{...ff.fast,opacity:{duration:.08}}},_.current)}),E.jsx(Qs,{children:z&&E.jsx(ho.div,{className:`absolute ${H.focusRing} pointer-events-none z-20 border border-[#6B97FF]`,initial:!1,animate:{left:z.left-2,top:z.top-2,width:z.width+4,height:z.height+4},exit:{opacity:0,transition:{duration:.06}},transition:{...ff.fast,opacity:{duration:.08}}})}),n]})})})});dee.displayName="AccordionGroup";const xM=v.forwardRef(({children:t,type:e="single",collapsible:n=!0,defaultValue:r,value:s,onValueChange:i,className:a,...u},c)=>{const[d,f]=v.useState(()=>e==="single"?r??"":""),[p,m]=v.useState(()=>e==="multiple"?r??[]:[]),_=new Set(e==="multiple"?s??p:(()=>{const C=s??d;return C?[C]:[]})()),x=v.useCallback(C=>{i?i(C):f(C)},[i]),y=v.useCallback(C=>{i?i(C):m(C)},[i]),w=v.useCallback(C=>{e==="multiple"?y((s??p).filter(T=>T!==C)):x("")},[e,s,p,x,y]),b=e==="multiple"?{type:"multiple",value:s??p,defaultValue:r,onValueChange:y}:{type:"single",collapsible:n,value:s??d,defaultValue:r,onValueChange:x};return E.jsx(pM,{...b,asChild:!0,children:E.jsx("div",{ref:c,className:cr("w-72 max-w-full flex flex-col gap-0.5",a),...u,children:E.jsx(wM.Provider,{value:_,children:E.jsx(bM.Provider,{value:w,children:t})})})})});xM.displayName="Accordion";const wM=v.createContext(new Set),bM=v.createContext(()=>{}),SM=v.forwardRef(({value:t,index:e,disabled:n,children:r,className:s,...i},a)=>{const u=v.useRef(null),c=qw(),d=v.useContext(wM),f=v.useContext(bM),p=U0(),m=c!=null&&c.grouped?c.openValues.has(t):d.has(t),_=v.useRef(null),x=v.useCallback(()=>{c!=null&&c.grouped?c.toggleValue(t):f(t)},[c,f,t]);return v.useEffect(()=>{if(c!=null&&c.grouped&&e!==void 0)return c.registerItem(e,_.current),()=>c.registerItem(e,null)},[e,c]),v.useEffect(()=>{if(c!=null&&c.grouped&&e!==void 0)return m?c.registerFullItem(e,u.current):c.registerFullItem(e,null),()=>c.registerFullItem(e,null)},[e,c,m]),E.jsx(yM.Provider,{value:{index:e,value:t,isOpen:m,onToggle:x,triggerRef:_},children:E.jsxs(pQ,{ref:y=>{u.current=y,typeof a=="function"?a(y):a&&(a.current=y)},value:t,disabled:n,"data-proximity-index":e,className:cr(!(c!=null&&c.grouped)&&"relative",s),...i,children:[!(c!=null&&c.grouped)&&E.jsx(Qs,{children:m&&E.jsx(ho.div,{className:`absolute inset-0 ${p.bg} bg-accent/20 dark:bg-accent/12 pointer-events-none`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.06}},transition:{duration:.08}})}),r]})})});SM.displayName="AccordionItem";const EM=v.forwardRef(({children:t,className:e,...n},r)=>{const s=uee("chevron-right"),i=qw(),{index:a,isOpen:u,triggerRef:c}=_M(),d=U0(),[f,p]=v.useState(!1),m=i!=null&&i.grouped?i.activeIndex===a:f,_=E.jsx(mQ,{asChild:!0,children:E.jsx("div",{children:E.jsxs(vQ,{ref:r,className:cr(`relative z-10 flex items-center gap-2.5 ${d.item} px-3 py-2 w-full cursor-pointer outline-none select-none`,!(i!=null&&i.grouped)&&"focus-visible:ring-1 focus-visible:ring-[#6B97FF] focus-visible:ring-offset-0",e),...n,children:[E.jsxs("span",{className:"inline-grid text-[13px] flex-1 text-left",children:[E.jsx("span",{className:"col-start-1 row-start-1 invisible",style:{fontVariationSettings:Wd.semibold},"aria-hidden":"true",children:t}),E.jsx("span",{className:cr("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-80",u||m?"text-foreground":"text-muted-foreground"),style:{fontVariationSettings:u?Wd.semibold:Wd.normal},children:t})]}),E.jsx(ho.span,{className:"shrink-0 inline-flex items-center justify-center",animate:{rotate:u?90:0},transition:ff.fast,children:E.jsx(s,{size:16,strokeWidth:u||m?2:1.5,className:cr("transition-[color,stroke-width] duration-80",u||m?"text-foreground":"text-muted-foreground")})})]})})});return i!=null&&i.grouped?E.jsx("div",{ref:c,children:_}):E.jsxs("div",{className:"relative",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[E.jsx(Qs,{children:f&&E.jsx(ho.div,{className:`absolute inset-0 ${d.bg} bg-hover pointer-events-none`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.06}},transition:{duration:.08}})}),_]})});EM.displayName="AccordionTrigger";const CM=v.forwardRef(({children:t,className:e,...n},r)=>{const s=qw(),{isOpen:i}=_M();return E.jsx(Qs,{initial:!1,children:i&&E.jsx(gQ,{forceMount:!0,asChild:!0,...n,children:E.jsx(ho.div,{ref:r,className:cr("overflow-hidden",e),initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{...ff.moderate,bounce:0},onUpdate:()=>{s==null||s.remeasure()},onAnimationComplete:()=>{s==null||s.remeasure()},children:E.jsx("div",{className:"px-3 pb-3 pt-1 text-[13px] text-muted-foreground",children:t})})})})});CM.displayName="AccordionContent";const vm=({children:t,defaultValue:e=[],className:n=""})=>E.jsx(xM,{type:"multiple",defaultValue:e,className:cr("w-full",n),children:t}),fee=({value:t,title:e,description:n,dataCy:r,icon:s,children:i,className:a=""})=>{const u=a.includes("first-item");return E.jsxs(SM,{value:t,className:cr("w-full",!u&&"border-t border-main-border"),children:[E.jsxs(EM,{"data-cy":r,children:[s?E.jsx("span",{className:"mr-1 inline-flex items-center",children:s}):null,e]}),E.jsxs(CM,{children:[n?E.jsx("p",{className:"pb-2 text-sm text-content-subtle",children:n}):null,i]})]})};vm.Item=fee;const hee=({message:t,isLoading:e=!0})=>E.jsxs("div",{className:"flex items-center gap-2 text-sm text-content",children:[e?E.jsx(L0,{className:"h-4 w-4 shrink-0 animate-spin text-primary",weight:"bold"}):null,E.jsx("span",{className:"whitespace-pre-wrap font-sans",children:t})]}),pee=()=>{const t=v.useRef(Date.now()),[e,n]=v.useState(0);return v.useEffect(()=>{const r=()=>n(Math.max(0,Math.floor((Date.now()-t.current)/1e3)));r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[]),e},mee=t=>{const e=Math.floor(t/60),n=t%60;return`${e}:${n.toString().padStart(2,"0")}`},t6="M 12 8 C 14.21 8 16 9.79 16 12 C 16 14.21 14.21 16 12 16 C 9.79 16 8 14.21 8 12 C 8 9.79 9.79 8 12 8 Z",n6="M 12 12 C 14 8.5 19 8.5 19 12 C 19 15.5 14 15.5 12 12 C 10 8.5 5 8.5 5 12 C 5 15.5 10 15.5 12 12 Z",vee="M 12 16 C 14.21 16 16 14.21 16 12 C 16 9.79 14.21 8 12 8 C 9.79 8 8 9.79 8 12 C 8 14.21 9.79 16 12 16 Z",gm=["Applying","Thinking","Planning","Crafting"],gee=gm.reduce((t,e)=>t.length>=e.length?t:e),yee=20,_ee="Still working — runs can take a few minutes.",xee=({hint:t,showElapsed:e=!0})=>{const[n,r]=v.useState(0),s=pee();v.useEffect(()=>{const a=setInterval(()=>{r(u=>(u+1)%gm.length)},4e3);return()=>clearInterval(a)},[]);const i=t??(e&&s>=yee?_ee:null);return E.jsxs("div",{role:"status",className:"flex items-center gap-2 px-3 py-1","data-cy":"thinking-indicator",children:[E.jsx(po.svg,{"aria-hidden":!0,width:20,height:20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 text-muted-foreground",children:E.jsx(po.path,{animate:{d:[t6,n6,vee,n6,t6]},transition:{d:{duration:6,ease:"easeInOut",repeat:1/0,times:[0,.25,.5,.75,1]}}})}),E.jsxs("span",{className:"inline-grid overflow-hidden text-sm font-medium",style:{fontVariationSettings:Wd.medium},children:[E.jsx("span",{className:"shimmer-text invisible col-start-1 row-start-1","aria-hidden":"true",children:gee}),E.jsx(Qs,{mode:"popLayout",initial:!1,children:E.jsx(po.span,{className:"shimmer-text col-start-1 row-start-1",initial:{y:"80%",opacity:0},animate:{y:0,opacity:1,transition:{duration:.24,ease:[.4,0,.2,1]}},exit:{y:"-80%",opacity:0,transition:{duration:.16,ease:[.4,0,.2,1]}},children:gm[n]},gm[n])})]}),e?E.jsx("span",{className:"text-xs tabular-nums text-content-subtle","data-cy":"thinking-elapsed",children:mee(s)}):null,i?E.jsx("span",{className:"text-xs text-content-subtle",children:i}):null]})};var wee=Object.defineProperty,bee=(t,e)=>wee(t,"name",{value:e,configurable:!0});function Gw(t,[e,n]){return Math.min(n,Math.max(e,t))}bee(Gw,"clamp");var See=Object.defineProperty,Eee=(t,e)=>See(t,"name",{value:e,configurable:!0});function kM(t){const e=v.useRef({value:t,previous:t});return v.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}Eee(kM,"usePrevious");var Cee=Object.defineProperty,yt=(t,e)=>Cee(t,"name",{value:e,configurable:!0}),PM=["PageUp","PageDown"],TM=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],AM={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Zf="Slider",[I2,kee,Pee]=jw(Zf),[Kw,vte]=Ni(Zf,[Pee]),[Tee,Yf]=Kw(Zf),Aee=v.forwardRef(yt(function(e,n){const{name:r,min:s=0,max:i=100,step:a=1,orientation:u="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:f=[s],value:p,onValueChange:m=yt(()=>{},"onValueChange"),onValueCommit:_=yt(()=>{},"onValueCommit"),inverted:x=!1,form:y,...w}=e,b=v.useRef(new Set),C=v.useRef(0),P=v.useRef(!1),A=u==="horizontal"?Iee:Ree,[R,L]=v.useState(null),I=Bt(n,L),[O=[],N]=wa({prop:p,defaultProp:f,onChange:yt(q=>{var X;(X=[...b.current][C.current])==null||X.focus({preventScroll:!0,focusVisible:P.current}),P.current=!1,m(q)},"onChange")}),j=v.useRef(O),F=v.useRef(O);v.useEffect(()=>{const q=y?R==null?void 0:R.ownerDocument.getElementById(y):R==null?void 0:R.closest("form");if(q instanceof HTMLFormElement){const z=yt(()=>N(F.current),"reset");return q.addEventListener("reset",z),()=>q.removeEventListener("reset",z)}},[R,y,N]);function G(q){const z=jM(O,q);W(q,z)}yt(G,"handleSlideStart");function Q(q){W(q,C.current)}yt(Q,"handleSlideMove");function Z(){String(O)!==String(j.current)&&_(O)}yt(Z,"handleSlideEnd");function W(q,z,{commit:X}={commit:!1}){const H=Yw(a),D=Yd(Math.round((q-s)/a)*a+s,H),Y=Gw(D,[s,i]);N((oe=[])=>{const J=NM(oe,Y,z);if($M(J,d*a)){C.current=J.indexOf(Y);const se=String(J)!==String(oe);return se&&X&&_(J),se?J:oe}else return oe})}return yt(W,"updateValues"),E.jsx(Tee,{scope:e.__scopeSlider,name:r,disabled:c,min:s,max:i,valueIndexToChangeRef:C,thumbs:b.current,values:O,orientation:u,form:y,children:E.jsx(I2.Provider,{scope:e.__scopeSlider,children:E.jsx(I2.Slot,{scope:e.__scopeSlider,children:E.jsx(A,{"aria-disabled":c,"data-disabled":c?"":void 0,...w,ref:I,onPointerDown:Ht(w.onPointerDown,()=>{c||(j.current=O,P.current=!1)}),min:s,max:i,inverted:x,onSlideStart:c?void 0:G,onSlideMove:c?void 0:Q,onSlideEnd:c?void 0:Z,onHomeKeyDown:()=>{c||(P.current=!0,W(s,0,{commit:!0}))},onEndKeyDown:()=>{c||(P.current=!0,W(i,O.length-1,{commit:!0}))},onStepKeyDown:({event:q,direction:z})=>{if(!c){P.current=!0;const D=PM.includes(q.key)||q.shiftKey&&TM.includes(q.key)?10:1,Y=C.current,oe=O[Y],J=zM(oe,{min:s,step:a,direction:z,multiplier:D});W(J,Y,{commit:!0})}}})})})})},"Slider")),[IM,RM]=Kw(Zf,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Iee=v.forwardRef(yt(function(e,n){const{min:r,max:s,dir:i,inverted:a,onSlideStart:u,onSlideMove:c,onSlideEnd:d,onStepKeyDown:f,...p}=e,[m,_]=v.useState(null),x=Bt(n,_),y=v.useRef(void 0),w=zw(i),b=w==="ltr",C=b&&!a||!b&&a;function P(T){const A=y.current||m.getBoundingClientRect(),R=[0,A.width],I=X0(R,C?[r,s]:[s,r]);return y.current=A,I(T-A.left)}return yt(P,"getValueFromPointer"),E.jsx(IM,{scope:e.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:E.jsx(MM,{dir:w,"data-orientation":"horizontal",...p,ref:x,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const A=P(T.clientX);u==null||u(A)},onSlideMove:T=>{const A=P(T.clientX);c==null||c(A)},onSlideEnd:()=>{y.current=void 0,d==null||d()},onStepKeyDown:T=>{const R=AM[C?"from-left":"from-right"].includes(T.key);f==null||f({event:T,direction:R?-1:1})}})})},"SliderHorizontal")),Ree=v.forwardRef(yt(function(e,n){const{min:r,max:s,inverted:i,onSlideStart:a,onSlideMove:u,onSlideEnd:c,onStepKeyDown:d,...f}=e,p=v.useRef(null),m=Bt(n,p),_=v.useRef(void 0),x=!i;function y(w){const b=_.current||p.current.getBoundingClientRect(),C=[0,b.height],T=X0(C,x?[s,r]:[r,s]);return _.current=b,T(w-b.top)}return yt(y,"getValueFromPointer"),E.jsx(IM,{scope:e.__scopeSlider,startEdge:x?"bottom":"top",endEdge:x?"top":"bottom",size:"height",direction:x?1:-1,children:E.jsx(MM,{"data-orientation":"vertical",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:w=>{const b=y(w.clientY);a==null||a(b)},onSlideMove:w=>{const b=y(w.clientY);u==null||u(b)},onSlideEnd:()=>{_.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=AM[x?"from-bottom":"from-top"].includes(w.key);d==null||d({event:w,direction:C?-1:1})}})})},"SliderVertical")),MM=v.forwardRef(yt(function(e,n){const{__scopeSlider:r,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:u,onEndKeyDown:c,onStepKeyDown:d,...f}=e,p=Yf(Zf,r);return E.jsx(xn.span,{...f,ref:n,onKeyDown:Ht(e.onKeyDown,m=>{m.key==="Home"?(u(m),m.preventDefault()):m.key==="End"?(c(m),m.preventDefault()):PM.concat(TM).includes(m.key)&&(d(m),m.preventDefault())}),onPointerDown:Ht(e.onPointerDown,m=>{const _=m.target;_.setPointerCapture(m.pointerId),m.preventDefault(),p.thumbs.has(_)?_.focus({preventScroll:!0,focusVisible:!1}):s(m)}),onPointerMove:Ht(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&i(m)}),onPointerUp:Ht(e.onPointerUp,m=>{const _=m.target;_.hasPointerCapture(m.pointerId)&&(_.releasePointerCapture(m.pointerId),a(m))})})},"SliderImpl")),Mee="SliderTrack",Oee=v.forwardRef(yt(function(e,n){const{__scopeSlider:r,...s}=e,i=Yf(Mee,r);return E.jsx(xn.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...s,ref:n})},"SliderTrack")),r6="SliderRange",Lee=v.forwardRef(yt(function(e,n){const{__scopeSlider:r,...s}=e,i=Yf(r6,r),a=RM(r6,r),u=v.useRef(null),c=Bt(n,u),d=i.values.length,f=i.values.map(_=>Zw(_,i.min,i.max)),p=d>1?Math.min(...f):0,m=100-Math.max(...f);return E.jsx(xn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...s,ref:c,style:{...e.style,[a.startEdge]:p+"%",[a.endEdge]:m+"%"}})},"SliderRange")),Nee="SliderThumb",[Dee,OM]=Kw(Nee),jee="SliderThumbProvider";function LM(t){const{__scopeSlider:e,name:n,children:r,internal_do_not_use_render:s}=t,i=Yf(jee,e),a=kee(e),[u,c]=v.useState(null),d=v.useMemo(()=>u?a().findIndex(w=>w.ref.current===u):-1,[a,u]),f=lw(u),p=u?!!i.form||!!u.closest("form"):!0,m=i.values[d],_=n??(i.name?i.name+(i.values.length>1?"[]":""):void 0),x=m===void 0?0:Zw(m,i.min,i.max);v.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]);const y={value:m,name:_,form:i.form,isFormControl:p,index:d,thumb:u,onThumbChange:c,percent:x,size:f};return E.jsx(Dee,{scope:e,...y,children:HM(s)?s(y):r})}yt(LM,"SliderThumbProvider");var dy="SliderThumbTrigger",Fee=v.forwardRef(yt(function(e,n){const{__scopeSlider:r,...s}=e,i=Yf(dy,r),a=RM(dy,r),{index:u,value:c,percent:d,size:f,onThumbChange:p}=OM(dy,r),m=Bt(n,p),_=DM(u,i.values.length),x=f==null?void 0:f[a.size],y=x?FM(x,d,a.direction):0;return E.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${d}% + ${y}px)`},children:E.jsx(I2.ItemSlot,{scope:r,children:E.jsx(xn.span,{role:"slider","aria-label":e["aria-label"]||_,"aria-valuemin":i.min,"aria-valuenow":c,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:m,style:c===void 0?{display:"none"}:e.style,onFocus:Ht(e.onFocus,()=>{i.valueIndexToChangeRef.current=u})})})})},"SliderThumbTrigger")),Vee=v.forwardRef(yt(function(e,n){const{__scopeSlider:r,name:s,...i}=e;return E.jsx(LM,{__scopeSlider:r,name:s,internal_do_not_use_render:({index:a,isFormControl:u})=>E.jsxs(E.Fragment,{children:[E.jsx(Fee,{...i,ref:n,__scopeSlider:r}),u?E.jsx(zee,{__scopeSlider:r},a):null]})})},"SliderThumb")),$ee="SliderBubbleInput",zee=v.forwardRef(yt(function({__scopeSlider:e,...n},r){const{value:s,name:i,form:a}=OM($ee,e),u=v.useRef(null),c=Bt(u,r),d=kM(s);return v.useEffect(()=>{const f=u.current;if(!f)return;const p=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(p,"value").set;if(d!==s&&_){const x=new Event("input",{bubbles:!0});_.call(f,s),f.dispatchEvent(x)}},[d,s]),E.jsx(xn.input,{style:{display:"none"},name:i,form:a,...n,ref:c,defaultValue:s})},"SliderBubbleInput"));function NM(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}yt(NM,"getNextSortedValues");function Zw(t,e,n){const i=100/(n-e)*(t-e);return Gw(i,[0,100])}yt(Zw,"convertValueToPercentage");function DM(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}yt(DM,"getLabel");function jM(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}yt(jM,"getClosestValueIndex");function FM(t,e,n){const r=t/2,i=X0([0,50],[0,r]);return(r-i(e)*n)*n}yt(FM,"getThumbInBoundsOffset");function VM(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}yt(VM,"getStepsBetweenValues");function $M(t,e){if(e>0){const n=VM(t);return Math.min(...n)>=e}return!0}yt($M,"hasMinStepsBetweenValues");function X0(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}yt(X0,"linearScale");function Yw(t){if(!Number.isFinite(t))return 0;const e=t.toString();if(e.includes("e")){const[r,s]=e.split("e"),i=r.split(".")[1]||"",a=Number(s);return Math.max(0,i.length-a)}const n=e.split(".")[1];return n?n.length:0}yt(Yw,"getDecimalCount");function Yd(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}yt(Yd,"roundValue");function zM(t,{min:e,step:n,direction:r,multiplier:s}){const i=Yw(n),a=(t-e)/n,u=Math.round(a),c=Yd(u*n+e,i)===Yd(t,i);let d;return c?d=u+s*r:r>0?d=Math.ceil(a):d=Math.floor(a),Yd(d*n+e,i)}yt(zM,"getNextStepValue");function HM(t){return typeof t=="function"}yt(HM,"isFunction");const R2=v.forwardRef(({className:t,...e},n)=>E.jsxs(Aee,{ref:n,className:cr("relative flex w-full touch-none select-none items-center","data-[disabled]:opacity-50",t),...e,children:[E.jsx(Oee,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-input",children:E.jsx(Lee,{className:"absolute h-full bg-primary"})}),E.jsx(Vee,{className:cr("block h-3.5 w-3.5 rounded-full border border-border bg-foreground shadow-sm","transition-transform hover:scale-110 active:scale-95","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#6B97FF]","disabled:pointer-events-none")})]}));R2.displayName="Slider";const Hee=[{name:"surface-1",utility:"bg-surface-1",className:"bg-surface-1"},{name:"surface-2",utility:"bg-surface-2",className:"bg-surface-2"},{name:"surface-3",utility:"bg-surface-3",className:"bg-surface-3"},{name:"surface-4",utility:"bg-surface-4",className:"bg-surface-4"},{name:"surface-5",utility:"bg-surface-5",className:"bg-surface-5"},{name:"surface-6",utility:"bg-surface-6",className:"bg-surface-6"}],Uee=[{name:"primary",utility:"bg-primary",className:"bg-primary"},{name:"selected",utility:"bg-selected",className:"bg-selected"},{name:"accent",utility:"bg-accent",className:"bg-accent"},{name:"success",utility:"bg-accent-success",className:"bg-accent-success"},{name:"warning",utility:"bg-accent-warning",className:"bg-accent-warning"},{name:"error",utility:"bg-accent-error",className:"bg-accent-error"}],Bee=[{name:"gap-1",className:"w-1"},{name:"gap-2",className:"w-2"},{name:"gap-3",className:"w-3"},{name:"gap-4",className:"w-4"},{name:"gap-6",className:"w-6"},{name:"gap-8",className:"w-8"}],Hp=[{name:"Accordion",path:"components/Accordion.tsx",status:"showcased",note:"Reusable primitive shown with local item composition."},{name:"AgentVariantsPanel",path:"components/AgentVariantsPanel.tsx",status:"feature-only",note:"Requires live variant session state and editor atoms."},{name:"AuthProgressScreen",path:"components/AuthProgressScreen.tsx",status:"feature-only",note:"Auth flow surface; represented through progress treatment."},{name:"AuthScreenView",path:"components/AuthScreenView.tsx",status:"feature-only",note:"Auth flow surface that depends on sign-in actions."},{name:"Button",path:"components/Button.tsx",status:"showcased",note:"Reusable tooltip-wrapped button shown in multiple states."},{name:"CommentCarouselLayer",path:"components/CommentCarouselLayer.tsx",status:"feature-only",note:"Preview overlay layer tied to iframe geometry."},{name:"CommentMarker",path:"components/CommentMarker.tsx",status:"feature-only",note:"Preview overlay marker tied to comment positions."},{name:"CommentMarkerLayer",path:"components/CommentMarkerLayer.tsx",status:"feature-only",note:"Preview overlay layer tied to comment collections."},{name:"CommentPopover",path:"components/CommentPopover.tsx",status:"feature-only",note:"Comment workflow popover tied to editor state."},{name:"CommentReferenceChip",path:"components/CommentReferenceChip.tsx",status:"feature-only",note:"Comment workflow chip tied to selected references."},{name:"CommentReferencePicker",path:"components/CommentReferencePicker.tsx",status:"feature-only",note:"Comment workflow picker tied to preview elements."},{name:"ElementInspector",path:"components/ElementInspector.tsx",status:"feature-only",note:"Primary editor surface with many app-level dependencies."},{name:"GitHome",path:"components/GitHome.tsx",status:"feature-only",note:"Git dashboard tied to repository state."},{name:"IframePreview",path:"components/IframePreview.tsx",status:"unsuitable",note:"Needs live iframe target and cross-window integration."},{name:"PreviewFrame",path:"components/PreviewFrame.tsx",status:"unsuitable",note:"Requires proxied app URL and iframe lifecycle."},{name:"PreviewSurface",path:"components/PreviewSurface.tsx",status:"unsuitable",note:"Requires preview iframe and overlay orchestration."},{name:"ProfileAvatar",path:"components/ProfileAvatar.tsx",status:"feature-only",note:"Account chrome tied to user identity data."},{name:"Progress",path:"components/Progress.tsx",status:"showcased",note:"Reusable inline loading/status primitive."},{name:"SecondaryVariantIframe",path:"components/SecondaryVariantIframe.tsx",status:"unsuitable",note:"Requires variant preview iframe lifecycle."},{name:"SparkleLoader",path:"components/SparkleLoader.tsx",status:"showcased",note:"Reusable loading animation shown in feedback states."},{name:"SplitButton",path:"components/SplitButton.tsx",status:"showcased",note:"Reusable compound action button shown with dropdown."},{name:"StatusSurface",path:"components/StatusSurface.tsx",status:"showcased",note:"Unified full-surface primitive: LoadingSurface / EmptyState / ErrorState."},{name:"SupportTicketModal",path:"components/SupportTicketModal.tsx",status:"feature-only",note:"Support workflow modal tied to form submission."},{name:"ThinkingIndicator",path:"components/ThinkingIndicator.tsx",status:"showcased",note:"Reusable thinking/loading indicator shown in feedback states."},{name:"Tooltip",path:"components/Tooltip.tsx",status:"showcased",note:"Reusable tooltip API shown with hover target."},{name:"VariantDragGhost",path:"components/VariantDragGhost.tsx",status:"feature-only",note:"Drag visual tied to variant split interactions."},{name:"VariantSplitDropZones",path:"components/VariantSplitDropZones.tsx",status:"feature-only",note:"Drop-zone visual tied to variant split interactions."},{name:"ui/accordion",path:"components/ui/accordion.tsx",status:"showcased",note:"Radix accordion primitive backing the local Accordion showcase."},{name:"ui/slider",path:"components/ui/slider.tsx",status:"showcased",note:"Radix slider primitive shown in enabled and disabled states."},{name:"ui/tooltip",path:"components/ui/tooltip.tsx",status:"showcased",note:"Radix tooltip primitive shown with forced-open preview."}],Wee=()=>{window.location.hash=""},Xi=({title:t,eyebrow:e,description:n,children:r})=>E.jsxs("section",{className:"border-border bg-card shadow-surface-3 rounded-2xl border p-5",children:[E.jsxs("div",{className:"mb-5 max-w-2xl",children:[E.jsx("p",{className:"text-primary text-xs font-semibold tracking-[0.18em] uppercase",children:e}),E.jsx("h2",{className:"text-foreground mt-2 text-xl font-semibold",children:t}),E.jsx("p",{className:"text-muted-foreground mt-2 text-sm leading-6",children:n})]}),r]}),s6=({swatches:t})=>E.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(e=>E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-3",children:[E.jsx("div",{className:`h-16 rounded-lg ${e.className}`}),E.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3",children:[E.jsx("span",{className:"text-foreground text-sm font-medium",children:e.name}),E.jsx("code",{className:"bg-muted text-muted-foreground rounded px-2 py-1 text-xs",children:e.utility})]})]},e.name))}),qee=t=>t==="showcased"?"border-accent-success/40 bg-accent-success/10 text-accent-success":t==="cataloged"?"border-primary/40 bg-primary/10 text-primary":t==="generated"?"border-accent/40 bg-accent/10 text-accent":t==="unsuitable"?"border-accent-warning/40 bg-accent-warning/10 text-accent-warning":"border-border bg-surface-4 text-content-muted",Gee=()=>{const t=Hp.filter(n=>n.status==="showcased").length,e=Hp.filter(n=>n.status==="cataloged").length;return E.jsx("main",{className:"bg-main font-main text-content h-screen overflow-y-auto",children:E.jsxs("div",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 py-6 lg:px-8",children:[E.jsxs("header",{className:"border-border bg-surface-2 shadow-surface-4 rounded-3xl border p-6",children:[E.jsxs("button",{type:"button",onClick:Wee,className:"text-content-subtle hover:text-content mb-6 inline-flex items-center gap-2 text-sm transition-colors",children:[E.jsx(fB,{className:"h-4 w-4",weight:"bold"}),"Back to editor"]}),E.jsxs("div",{className:"flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between",children:[E.jsxs("div",{className:"max-w-3xl",children:[E.jsx("p",{className:"text-primary text-xs font-semibold tracking-[0.22em] uppercase",children:"Local component gallery"}),E.jsx("h1",{className:"text-foreground mt-3 text-4xl font-semibold tracking-tight",children:"Rivet design system"}),E.jsx("p",{className:"text-muted-foreground mt-3 text-base leading-7",children:"A Storybook-like route for checking the current UI primitives, tokens, and interaction states inside the Vite app."})]}),E.jsx("div",{className:"border-border bg-surface-3 rounded-2xl border p-4",children:E.jsxs("div",{className:"text-content-muted flex items-center gap-3 text-sm",children:[E.jsx(bA,{className:"text-primary h-5 w-5",weight:"bold"}),"Open with ",E.jsx("code",{className:"text-content",children:"#/design-system"})]})})]})]}),E.jsx(Xi,{eyebrow:"Controls",title:"Button, split button, and tooltip",description:"The gallery uses Rivet's tooltip-wrapped button, compound split button, and the lower-level Radix tooltip wrapper so the reusable control APIs are visible.",children:E.jsxs("div",{className:"grid gap-4 lg:grid-cols-[1fr_1fr]",children:[E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground mb-3 text-sm font-medium",children:"Rivet Button wrapper"}),E.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[E.jsx($u,{title:"Primary action",shortcut:"D",className:"bg-primary text-primary-foreground hover:bg-primary-hover rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:"Design action"}),E.jsx($u,{title:"Secondary action",className:"border-border bg-surface-4 text-content hover:bg-surface-5 rounded-lg border px-4 py-2 text-sm font-medium transition-colors",children:"Secondary"}),E.jsx($u,{title:"Disabled action",disabled:!0,className:"border-border bg-muted text-muted-foreground rounded-lg border px-4 py-2 text-sm font-medium opacity-60",children:"Disabled"}),E.jsx(RI,{primaryLabel:"Ship",primaryIcon:F1,primaryAction:()=>{},dropdownItems:[{label:"Create PR",onClick:()=>{}},{label:"Copy branch",onClick:()=>{}}]})]})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground mb-3 text-sm font-medium",children:"Tooltip states"}),E.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[E.jsx(Ys,{label:"Rivet tooltip API",side:"bottom",children:E.jsx("button",{className:"border-border bg-surface-4 text-content rounded-lg border px-4 py-2 text-sm",children:"Hover target"})}),E.jsx(mw,{content:"Forced open preview",forceOpen:!0,side:"right",children:E.jsx("button",{className:"bg-selected text-content rounded-lg px-4 py-2 text-sm",children:"UI tooltip"})})]})]})]})}),E.jsx(Xi,{eyebrow:"Tokens",title:"Surface ladder",description:"Surface tokens move from the base app background toward raised panels without leaving the dark Rivet palette.",children:E.jsx(s6,{swatches:Hee})}),E.jsx(Xi,{eyebrow:"Tokens",title:"Color roles",description:"Named roles should communicate purpose: brand, selection, neutral accent, and outcome colors.",children:E.jsx(s6,{swatches:Uee})}),E.jsx(Xi,{eyebrow:"Type",title:"Typography",description:"Satoshi remains the default UI voice with clear hierarchy and muted support text.",children:E.jsxs("div",{className:"grid gap-4 lg:grid-cols-3",children:[E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-primary text-xs tracking-[0.18em] uppercase",children:"Display"}),E.jsx("p",{className:"text-foreground mt-2 text-3xl font-semibold tracking-tight",children:"Visual edits, quickly"})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground text-sm font-semibold",children:"Panel heading"}),E.jsx("p",{className:"text-muted-foreground mt-2 text-sm leading-6",children:"Body copy uses compact line height and muted contrast for dense inspector panels."})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-content-subtle text-xs font-medium tracking-[0.16em] uppercase",children:"Micro label"}),E.jsx("code",{className:"bg-muted text-muted-foreground mt-3 block rounded-lg px-3 py-2 text-xs",children:"font-main text-content"})]})]})}),E.jsx(Xi,{eyebrow:"Layout",title:"Spacing rhythm",description:"A compact spacing scale keeps editor chrome dense while preserving scannable groupings.",children:E.jsx("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:E.jsx("div",{className:"flex flex-col gap-3",children:Bee.map(n=>E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsx("code",{className:"text-muted-foreground w-16 text-xs",children:n.name}),E.jsx("div",{className:`${n.className} bg-primary h-4 rounded`}),E.jsx("div",{className:"bg-border h-px flex-1"})]},n.name))})})}),E.jsx(Xi,{eyebrow:"Primitives",title:"Accordion and slider",description:"Representative Radix primitives styled through the local component layer.",children:E.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[E.jsxs(vm,{defaultValue:["foundations"],className:"border-border bg-surface-2 rounded-xl border p-2",children:[E.jsx(vm.Item,{value:"foundations",title:"Foundations",description:"Tokens, surfaces, type, and spacing.",className:"first-item",icon:E.jsx(F1,{className:"text-primary h-4 w-4"}),children:E.jsx("p",{children:"Use these pieces before adding one-off visual rules."})}),E.jsx(vm.Item,{value:"components",title:"Components",description:"Buttons, tooltips, accordions, sliders.",children:E.jsx("p",{children:"Keep states visible in this route as the system evolves."})})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-5",children:[E.jsx("p",{className:"text-foreground mb-5 text-sm font-medium",children:"Slider states"}),E.jsxs("div",{className:"space-y-6",children:[E.jsx(R2,{defaultValue:[64],max:100,step:1}),E.jsx(R2,{defaultValue:[36],max:100,step:1,disabled:!0})]})]})]})}),E.jsx(Xi,{eyebrow:"Feedback",title:"Motion and loading",description:"Loading states use existing CSS animation utilities and avoid per-frame React work where possible.",children:E.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Progress"}),E.jsx(hee,{message:"Applying visual change..."})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Sparkle strip"}),E.jsx(tw,{className:"text-primary text-xl"})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-foreground mb-4 text-sm font-medium",children:"Shimmer text"}),E.jsx("span",{className:"shimmer-text text-sm font-medium",children:"Generating variants"})]}),E.jsx("div",{className:"border-border bg-surface-2 rounded-xl border p-4 sm:col-span-3",children:E.jsx(xee,{hint:"Reading selected elements"})})]})}),E.jsx(Xi,{eyebrow:"Feedback",title:"Status surfaces",description:"The unified full-surface system: one StatusSurface primitive with LoadingSurface / EmptyState / ErrorState wrappers. Every full-page loading, empty, and error state routes through these so they share layout, copy tone, and a single status_surface_shown impression event. Inline loaders (Sparkle, ThinkingIndicator, above) stay inline and are deliberately not part of this system.",children:E.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[E.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:E.jsx(f2,{fill:"surface",loader:"coalesce",trackGlobalLoaderCount:!1})}),E.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:E.jsx(oR,{icon:E.jsx(F1,{size:32}),title:"Nothing to preview yet",description:"Pick a direction from the panel."})}),E.jsx("div",{className:"border-border relative h-56 overflow-hidden rounded-xl border",children:E.jsx(gw,{fill:"surface",size:"sm",title:"Preview isn't connected",description:"Rivet lost connection to your project.",actions:[{label:"Reload",onClick:()=>{}}]})})]})}),E.jsxs(Xi,{eyebrow:"Inventory",title:"Component coverage",description:"Every current component file is accounted for here. Reusable primitives are rendered above; app surfaces that need live editor, git, auth, iframe, or generated state are cataloged instead of mounted unsafely.",children:[E.jsxs("div",{className:"mb-4 grid gap-3 sm:grid-cols-3",children:[E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Total components"}),E.jsx("p",{className:"text-foreground mt-2 text-2xl font-semibold",children:Hp.length})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Showcased"}),E.jsx("p",{className:"text-accent-success mt-2 text-2xl font-semibold",children:t})]}),E.jsxs("div",{className:"border-border bg-surface-2 rounded-xl border p-4",children:[E.jsx("p",{className:"text-content-subtle text-xs tracking-[0.16em] uppercase",children:"Cataloged"}),E.jsx("p",{className:"text-primary mt-2 text-2xl font-semibold",children:e})]})]}),E.jsxs("div",{className:"border-border overflow-hidden rounded-xl border",children:[E.jsxs("div",{className:"border-border bg-surface-3 text-content-subtle grid grid-cols-[minmax(140px,1fr)_minmax(110px,auto)_minmax(220px,2fr)] border-b px-4 py-3 text-xs font-semibold tracking-[0.14em] uppercase",children:[E.jsx("span",{children:"Component"}),E.jsx("span",{children:"Status"}),E.jsx("span",{children:"Coverage note"})]}),E.jsx("div",{className:"divide-border bg-surface-2 divide-y",children:Hp.map(n=>E.jsxs("div",{className:"grid grid-cols-[minmax(140px,1fr)_minmax(110px,auto)_minmax(220px,2fr)] gap-3 px-4 py-3 text-sm",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-foreground font-medium",children:n.name}),E.jsx("code",{className:"text-muted-foreground text-xs",children:n.path})]}),E.jsx("div",{children:E.jsx("span",{className:`inline-flex rounded-full border px-2 py-1 text-xs font-medium ${qee(n.status)}`,children:n.status})}),E.jsx("p",{className:"text-muted-foreground",children:n.note})]},n.path))})]})]})]})})},Kee=t=>(t.startsWith("#/")?t.slice(2):t.slice(1)).split("?")[0]==="design-system"?"design-system":"editor",Zee=t=>{const e=t.toLowerCase();return e.includes("timed out")?"timeout":e.includes("pop-up blocked")?"popup_blocked":e.includes("window was closed")?"popup_closed":e.includes("store session")?"credential_store_failed":"provider_failed"},fy=({outcome:t,authAttemptId:e,startedAt:n,now:r,failureReason:s})=>({event:`visual_editor_auth_${t}`,properties:{auth_attempt_id:e,duration_ms:r-n,entry_point:"editor_gate",method:"google_oauth",...s?{failure_reason:s}:{}}}),i6=Os("App"),Yee=2e3,Xee=60,o6="Connecting to Google...",a6="https://rivet-proxy.onrender.com",Qee=`<!doctype html>
|
|
395
|
-
<html lang="en">
|
|
396
|
-
<head>
|
|
397
|
-
<meta charset="utf-8" />
|
|
398
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
399
|
-
<title>${o6}</title>
|
|
400
|
-
<style>
|
|
401
|
-
:root { color-scheme: light dark; }
|
|
402
|
-
body {
|
|
403
|
-
margin: 0;
|
|
404
|
-
min-height: 100vh;
|
|
405
|
-
display: grid;
|
|
406
|
-
place-items: center;
|
|
407
|
-
font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
|
|
408
|
-
background: #111215;
|
|
409
|
-
color: #f3f4f6;
|
|
410
|
-
}
|
|
411
|
-
.panel {
|
|
412
|
-
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
413
|
-
border-radius: 12px;
|
|
414
|
-
padding: 18px 22px;
|
|
415
|
-
background: rgba(255, 255, 255, 0.06);
|
|
416
|
-
font-size: 14px;
|
|
417
|
-
}
|
|
418
|
-
</style>
|
|
419
|
-
</head>
|
|
420
|
-
<body>
|
|
421
|
-
<div class="panel">${o6}</div>
|
|
422
|
-
</body>
|
|
423
|
-
</html>`,M2=274,_0=395,hy=Math.min(_0,Math.round((M2+_0)/2*1.1)),l6="rivet:panelWidth:v2",Jee=t=>{if(!(t instanceof HTMLElement))return!1;const e=t.tagName.toLowerCase();return t.isContentEditable||e==="input"||e==="textarea"||e==="select"},ete=({projectPath:t})=>{const e=tt(YA)>0,[n,r]=R3(KA),s=Hz(),[i,a]=v.useState(()=>{if(typeof window>"u")return hy;const T=Number(window.localStorage.getItem(l6));return Number.isFinite(T)&&T>=M2&&T<=_0?T:hy}),[u,c]=v.useState(!1),[d,f]=v.useState(yX),p=n?i:0,[m,_]=v.useState(n);v.useEffect(()=>{if(!n){_(!1);return}f(T=>gX({position:T,boundsLeftPx:i}))},[n,i]),v.useEffect(()=>{window.localStorage.setItem(l6,String(i))},[i]),v.useEffect(()=>{if(!n)return;const T=A=>{A.key==="Escape"&&(Jee(A.target)||(A.preventDefault(),r(!1)))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n,r]);const x=v.useCallback(T=>{T.preventDefault(),T.stopPropagation();const A=T.clientX,R=i;c(!0);const L=O=>{const N=Math.min(_0,Math.max(M2,R+(O.clientX-A)));a(N)},I=()=>{window.removeEventListener("pointermove",L),window.removeEventListener("pointerup",I),window.removeEventListener("pointercancel",I),c(!1)};window.addEventListener("pointermove",L),window.addEventListener("pointerup",I),window.addEventListener("pointercancel",I)},[i]),y=v.useCallback(()=>a(hy),[]),w=RX(),b=tt(Wf);LX({enabled:!b});const C=w.isProcessing?"Completing authentication...":null,P=at(tI);return v.useEffect(()=>{P(t??null)},[t,P]),E.jsxs(po.div,{className:"relative flex h-screen overflow-hidden",initial:!1,animate:{opacity:1},transition:{duration:.5,ease:"easeOut"},"data-cy":"rivet-app",children:[C!==null?E.jsx("div",{className:"absolute inset-0 z-50",children:E.jsx(sX,{message:C})}):null,E.jsx("div",{className:"relative flex min-w-0 flex-1 flex-col",children:E.jsx(MZ,{})}),E.jsx(E.Fragment,{children:e?null:E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"relative order-first h-full flex-shrink-0",style:{width:m?i:0},children:E.jsxs(po.div,{className:"absolute inset-y-0 left-0 z-30",initial:!1,animate:{x:n?0:-i},transition:s?{duration:0}:{duration:.2,ease:[.22,1,.36,1]},onAnimationComplete:()=>{n&&_(!0)},style:{width:i,willChange:"transform"},children:[E.jsx(zK,{onClose:()=>r(!1)}),E.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize panel",onPointerDown:x,onDoubleClick:y,className:"group/resize absolute inset-y-0 right-0 z-20 flex w-3 cursor-col-resize touch-none justify-end",children:E.jsx("span",{className:`h-full transition-all duration-150 ${u?"bg-content-muted w-0.5":"bg-divider group-hover/resize:bg-content-muted w-px group-hover/resize:w-0.5"}`})})]})}),u&&E.jsx("div",{className:"fixed inset-0 z-[100] cursor-col-resize"}),E.jsx(wX,{isVisible:!0,isPanelOpen:n,isReducedMotion:!!s,position:d,dragBoundsLeftPx:p,onPositionChange:f,onToggle:()=>r(T=>!T)})]})}),E.jsx(yH,{duration:5e3,richColors:!0,toastOptions:{style:{maxHeight:"150px",overflow:"hidden"}}})]})},O2="rivet_connect_deep_link",tte=()=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search),e=t.get("connect"),n=e??window.sessionStorage.getItem(O2);if(n!=="pinterest"&&n!=="arena")return null;if(window.sessionStorage.setItem(O2,n),e){t.delete("connect");const r=t.toString();window.history.replaceState(null,document.title,window.location.pathname+(r?`?${r}`:"")+window.location.hash)}return n},nte=tte(),rte=()=>{const[t,e]=v.useState(window.location.hash),[n]=v.useState(()=>typeof window<"u"&&window.sessionStorage.getItem(pm)==="1"),[r,s]=v.useState(!1),[i,a]=v.useState(nte);v.useEffect(()=>{n&&window.sessionStorage.removeItem(pm)},[n]);const{config:u,refetchConfig:c,loading:d,error:f}=AX(),p=at(Wf),[m,_]=v.useState(!1),[x,y]=v.useState(null),[w,b]=v.useState(!1);v.useEffect(()=>{u!=null&&u.userId?(Ee.identify(u.userId,{...u.email?{email:u.email}:{}}),u.email&&Ee.alias(u.email,u.userId)):u!=null&&u.email&&Ee.identify(u.email,{email:u.email})},[u==null?void 0:u.userId,u==null?void 0:u.email]),v.useEffect(()=>{u&&Ee.register({source:"visual_editor",surface:"visual_editor"})},[u]);const C=v.useCallback(async()=>{var G;const O=globalThis.crypto.randomUUID(),N=Date.now();_(!0),y(null);const j=fy({outcome:"started",authAttemptId:O,startedAt:N,now:N});Ee.capture(j.event,j.properties);let F=null;try{if(F=window.open("","_blank"),!F)throw new Error("Pop-up blocked. Please allow pop-ups and try again.");try{F.document.open(),F.document.write(Qee),F.document.close()}catch(W){i6.warn("Failed to render loading state in auth popup:",W)}const Q=await fetch(`${a6}/api/auth/google/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:"desktop"})}),Z=await Q.json();if(!Q.ok||!Z.success||!Z.authUrl||!Z.sessionId||!Z.pollSecret)throw new Error(Z.error||Z.message||"Failed to start Google login");if(F.closed)throw new Error("Sign-in window was closed before Google login started.");F.location.href=Z.authUrl;for(let W=0;W<Xee;W+=1){if(F.closed)throw new Error("Sign-in window was closed before authentication completed.");const z=await(await fetch(`${a6}/api/auth/google/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:Z.sessionId,pollSecret:Z.pollSecret})})).json();if(z.success&&z.token&&((G=z.user)!=null&&G.email)){if(!(await fetch("/api/auth/store",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:z.user.email,token:z.token,refreshToken:z.refreshToken,userId:z.user.id})})).ok)throw new Error("Signed in, but failed to store session locally.");F.close(),window.sessionStorage.setItem(pm,"1");const H=fy({outcome:"completed",authAttemptId:O,startedAt:N,now:Date.now()});Ee.capture(H.event,H.properties),window.location.reload();return}if(z.error&&z.error!=="Pending")throw new Error(z.error||"Google login failed");await new Promise(X=>setTimeout(X,Yee))}throw new Error("Authentication timed out. Please try again.")}catch(Q){F&&!F.closed&&F.close();const Z=Q instanceof Error?Q.message:"Failed to start login flow";i6.warn("Login failed:",Z);const W=fy({outcome:"failed",authAttemptId:O,startedAt:N,now:Date.now(),failureReason:Zee(Z)});Ee.capture(W.event,W.properties),y(Z),_(!1)}},[]),P=u!=null&&u.agentModeAvailable!==!0,T=Kee(t),A=v.useCallback(async()=>{b(!0),p(!0);try{await c()}finally{p(!1),b(!1)}},[c,p]);if(v.useEffect(()=>{const O=()=>{const N=window.location.hash;e(N)};return window.addEventListener("hashchange",O),()=>window.removeEventListener("hashchange",O)},[]),T==="design-system")return E.jsx(Gee,{});if(!d&&u===null&&!w){const O=f||"Could not load Rivet configuration.";return E.jsx("div",{className:"bg-main flex h-screen items-center justify-center px-6",children:E.jsxs("div",{className:"border-divider bg-main w-full max-w-md rounded-lg border p-6 text-center shadow-lg",children:[E.jsx("p",{className:"text-content text-sm font-medium",children:"We could not start Rivet yet."}),E.jsx("p",{className:"text-content-dim mt-2 text-xs",children:O}),E.jsx("button",{type:"button",className:"border-divider text-content hover:bg-main/80 mt-4 rounded-md border px-3 py-1.5 text-xs",onClick:()=>{A()},children:"Retry"})]})})}if(P)return E.jsx(nX,{isSigningIn:m,onStartSignIn:()=>{C()},errorMessage:x,displayMode:"full"});const L=(u==null?void 0:u.agentModeAvailable)===!0&&i!==null,I=(u==null?void 0:u.agentModeAvailable)===!0&&n&&!r&&!L;return E.jsxs(E.Fragment,{children:[E.jsx(ete,{projectPath:u==null?void 0:u.projectPath}),E.jsx(d2,{context:"onboarding",isOpen:I,onClose:()=>s(!0)}),E.jsx(d2,{context:"menu",isOpen:L,highlightProvider:i,onClose:()=>{window.sessionStorage.removeItem(O2),a(null)}})]})},ste="phc_Ntj9tXHbS64XgYxlTfhglRmFivFsfm0AERph4ZlnNH",ite=new JL,ote={session_recording:{maskAllInputs:!0,maskTextSelector:"[data-rivet-private]"}},ate=()=>E.jsx("div",{style:{display:"flex",height:"100vh",alignItems:"center",justifyContent:"center"},children:E.jsx("p",{style:{fontSize:"14px",color:"#6b7280"},children:"Something went wrong. Please reload the page."})});h7.createRoot(document.getElementById("root")).render(E.jsx(we.StrictMode,{children:E.jsx(e7,{apiKey:ste,options:{api_host:"https://rivet-proxy.onrender.com/ingest",ui_host:"https://us.posthog.com",person_profiles:"always",capture_exceptions:!0,autocapture:!0,capture_pageview:!0,capture_performance:!0,persistence:"localStorage",...ote,mask_all_text:!1,mask_all_element_attributes:!1,loaded:t=>{t.register({source:"visual_editor",surface:"visual_editor",telemetry_version:2,rivet_version:"0.16.1",env:"production"})}},children:E.jsx(a7,{fallback:E.jsx(ate,{}),children:E.jsx(PL,{client:ite,children:E.jsx(zG,{defaultShape:"rounded",children:E.jsx(cee,{defaultLibrary:"lucide",children:E.jsx(rte,{})})})})})})}));
|