tokentracker-cli 0.79.6 → 0.79.7
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/dashboard/dist/assets/{AchievementBadge-wAEfjNCA.js → AchievementBadge-BgLKRfg6.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-Dv5LhNzL.js → AchievementsPage-DAZPKi69.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-a3gkS8tD.js → AchievementsSection-Bpck20e3.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-BNItadFZ.js → BadgeDetailModal-Di0rpmTQ.js} +1 -1
- package/dashboard/dist/assets/{Card-CmemgZ8c.js → Card-CiVg1n9y.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-CaZ4BpsR.js → ClawdAnimated-Dhw6SxU-.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-C3gojIs4.js → CommunityStatsModal-DosBW4lR.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-DZGC1wxW.js → ConfirmModal-DD1Ri-dh.js} +1 -1
- package/dashboard/dist/assets/{Controls-BMAZOGJA.js → Controls-BQxSK041.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-Sv3L7w2P.js → DashboardPage-B7F7CLG5.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-VfvDSVAL.js → DevicePage-BgByRtlZ.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-RhHDM3jn.js → DialogClose-DigAXf6w.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CS0HEX8l.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DwbiXVxh.js → DialogTitle-Du1uOZMr.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-CQCtW5QX.js → FadeIn-Da6jgqZ_.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-BR8zEIU9.js → HeaderGithubStar-Cqqy7vB7.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-rKHYtujQ.js → IpCheckPage-DkTAw_dO.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-x6KqrhSL.js → LandingPage-Dvb9s-kJ.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-BUoLYT1K.js → LeaderboardAvatar-Ch7SLsZ_.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-bCcorBNY.js → LeaderboardPage-BbPfFFuF.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-DM84x71o.js → LeaderboardProfileModal-PFZaQLMG.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-DO3bP3yS.js → LeaderboardProfilePage-DRautoWL.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-CGDnKTon.js → LimitsPage-Bwc3XCCg.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-DbXdLROj.js → LocalOnlyNotice-DftNXQsE.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-DIRdoCb2.js → LoginPage-CffpNmm-.js} +1 -1
- package/dashboard/dist/assets/{PetPage-CIevZPBl.js → PetPage-C_lq7mMA.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-BRphdEUz.js → PopoverPopup-B7L6V9OS.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-BJQBIphH.js → ResetPasswordPage-P-VatRkZ.js} +1 -1
- package/dashboard/dist/assets/{Select-gHY4N9ZP.js → Select-NpNBO_zW.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-CLpcRYRB.js → SelectItemText-DEqB9ndy.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-D7ux0u6V.js → SettingsPage-uCZ0OdF3.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-DRCrdltk.js → SkillsPage-Dy_sojV5.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CmifV9Qh.js → WidgetsPage-CzbeMPoq.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-VKP5hIAs.js → WrappedPage-C9sMo5ha.js} +1 -1
- package/dashboard/dist/assets/{agent-logos---afteTI.js → agent-logos-D95HrgpM.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-DAyZEmy0.js → arrow-up-right-jaA_F8VA.js} +1 -1
- package/dashboard/dist/assets/check-ShRr2Grp.js +1 -0
- package/dashboard/dist/assets/{copy-BQ4dDdQO.js → copy-BUsG8Dxq.js} +1 -1
- package/dashboard/dist/assets/{download-C0OHvtFX.js → download-B89jns_I.js} +1 -1
- package/dashboard/dist/assets/{flame-Bk2l5Mqz.js → flame-DYJfKTkq.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-BuWmqFvA.js → format-tokens-Ck4iJNuB.js} +1 -1
- package/dashboard/dist/assets/{info-CvbVDSUt.js → info-DgaOnN42.js} +1 -1
- package/dashboard/dist/assets/{link-2-DEoNTwlC.js → link-2-l6SkcxP3.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-5YZxGR3t.js → loader-circle-BTZ18vzb.js} +1 -1
- package/dashboard/dist/assets/{main-hXifO_Tp.js → main-BVPlyJJu.js} +2 -2
- package/dashboard/dist/assets/{provider-display-BZrfO0vc.js → provider-display-DuQlae7O.js} +1 -1
- package/dashboard/dist/assets/{trash-2-CmXAeMGC.js → trash-2-DDKBUuG2.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-sX5H9fnG.js → use-community-stats-KM2l89gG.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-B_gzE53D.js → use-limits-display-prefs-1RM6rjBg.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-BkIj-y5n.js → use-native-settings-S7AyC9Ou.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BQHfDz38.js → use-ordered-list-B3ExZ03c.js} +1 -1
- package/dashboard/dist/assets/{use-quality-per-dollar-pref-B8clb2IP.js → use-quality-per-dollar-pref-oapCFOoT.js} +1 -1
- package/dashboard/dist/assets/{use-transform-Bu6AKPnc.js → use-transform-Cd2VlHK0.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-BXOTiyCG.js → use-usage-limits-BMwpdXJP.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-yQkSTo4P.js → useCurrency-BA2GiiJp.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-DP7SL29Q.js → useScrollLock-CBHwgGF7.js} +1 -1
- package/dashboard/dist/assets/{zap-C122AVXf.js → zap-C3aLlz8b.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/commands/init.js +4 -6
- package/src/commands/serve.js +3 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/star-cta.js +73 -0
- package/dashboard/dist/assets/DialogDescription-ozWESnQP.js +0 -1
- package/dashboard/dist/assets/check-C__WkABK.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LimitsPage-Bwc3XCCg.js","assets/use-usage-limits-BMwpdXJP.js","assets/use-limits-display-prefs-1RM6rjBg.js","assets/Card-CiVg1n9y.js","assets/FadeIn-Da6jgqZ_.js","assets/LocalOnlyNotice-DftNXQsE.js","assets/arrow-up-right-jaA_F8VA.js","assets/download-B89jns_I.js","assets/LeaderboardPage-BbPfFFuF.js","assets/Select-NpNBO_zW.js","assets/SelectItemText-DEqB9ndy.js","assets/useScrollLock-CBHwgGF7.js","assets/check-ShRr2Grp.js","assets/use-ordered-list-B3ExZ03c.js","assets/useCurrency-BA2GiiJp.js","assets/LeaderboardAvatar-Ch7SLsZ_.js","assets/AchievementBadge-BgLKRfg6.js","assets/zap-C3aLlz8b.js","assets/flame-DYJfKTkq.js","assets/use-community-stats-KM2l89gG.js","assets/DashboardPage-B7F7CLG5.js","assets/provider-display-DuQlae7O.js","assets/info-DgaOnN42.js","assets/DialogTitle-Du1uOZMr.js","assets/DialogClose-DigAXf6w.js","assets/PopoverPopup-B7L6V9OS.js","assets/use-transform-Cd2VlHK0.js","assets/loader-circle-BTZ18vzb.js","assets/ClawdAnimated-Dhw6SxU-.js","assets/use-quality-per-dollar-pref-oapCFOoT.js","assets/agent-logos-D95HrgpM.js","assets/AchievementsPage-DAZPKi69.js","assets/AchievementsSection-Bpck20e3.js","assets/format-tokens-Ck4iJNuB.js","assets/LandingPage-Dvb9s-kJ.js","assets/HeaderGithubStar-Cqqy7vB7.js","assets/copy-BUsG8Dxq.js","assets/LeaderboardProfilePage-DRautoWL.js","assets/LeaderboardProfileModal-PFZaQLMG.js","assets/link-2-l6SkcxP3.js","assets/SettingsPage-uCZ0OdF3.js","assets/Controls-BQxSK041.js","assets/use-native-settings-S7AyC9Ou.js","assets/ConfirmModal-DD1Ri-dh.js","assets/DialogDescription-CS0HEX8l.js","assets/SkillsPage-Dy_sojV5.js","assets/trash-2-DDKBUuG2.js","assets/WidgetsPage-CzbeMPoq.js","assets/PetPage-C_lq7mMA.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function YA(t,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(a,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function CS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ZA(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function a(){var r=!1;try{r=this instanceof a}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return t[a]}})}),n}var xg={exports:{}},Mc={},Pg={exports:{}},ut={};var Q1;function JA(){if(Q1)return ut;Q1=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=m&&N[m]||N["@@iterator"],typeof N=="function"?N:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function P(N,Y,ue){this.props=N,this.context=Y,this.refs=x,this.updater=ue||y}P.prototype.isReactComponent={},P.prototype.setState=function(N,Y){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,Y,"setState")},P.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function T(){}T.prototype=P.prototype;function L(N,Y,ue){this.props=N,this.context=Y,this.refs=x,this.updater=ue||y}var E=L.prototype=new T;E.constructor=L,b(E,P.prototype),E.isPureReactComponent=!0;var A=Array.isArray,I=Object.prototype.hasOwnProperty,B={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function S(N,Y,ue){var ke,me={},_e=null,Me=null;if(Y!=null)for(ke in Y.ref!==void 0&&(Me=Y.ref),Y.key!==void 0&&(_e=""+Y.key),Y)I.call(Y,ke)&&!D.hasOwnProperty(ke)&&(me[ke]=Y[ke]);var Oe=arguments.length-2;if(Oe===1)me.children=ue;else if(1<Oe){for(var Le=Array(Oe),St=0;St<Oe;St++)Le[St]=arguments[St+2];me.children=Le}if(N&&N.defaultProps)for(ke in Oe=N.defaultProps,Oe)me[ke]===void 0&&(me[ke]=Oe[ke]);return{$$typeof:t,type:N,key:_e,ref:Me,props:me,_owner:B.current}}function j(N,Y){return{$$typeof:t,type:N.type,key:Y,ref:N.ref,props:N.props,_owner:N._owner}}function F(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Z(N){var Y={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ue){return Y[ue]})}var ee=/\/+/g;function de(N,Y){return typeof N=="object"&&N!==null&&N.key!=null?Z(""+N.key):Y.toString(36)}function ae(N,Y,ue,ke,me){var _e=typeof N;(_e==="undefined"||_e==="boolean")&&(N=null);var Me=!1;if(N===null)Me=!0;else switch(_e){case"string":case"number":Me=!0;break;case"object":switch(N.$$typeof){case t:case e:Me=!0}}if(Me)return Me=N,me=me(Me),N=ke===""?"."+de(Me,0):ke,A(me)?(ue="",N!=null&&(ue=N.replace(ee,"$&/")+"/"),ae(me,Y,ue,"",function(St){return St})):me!=null&&(F(me)&&(me=j(me,ue+(!me.key||Me&&Me.key===me.key?"":(""+me.key).replace(ee,"$&/")+"/")+N)),Y.push(me)),1;if(Me=0,ke=ke===""?".":ke+":",A(N))for(var Oe=0;Oe<N.length;Oe++){_e=N[Oe];var Le=ke+de(_e,Oe);Me+=ae(_e,Y,ue,Le,me)}else if(Le=v(N),typeof Le=="function")for(N=Le.call(N),Oe=0;!(_e=N.next()).done;)_e=_e.value,Le=ke+de(_e,Oe++),Me+=ae(_e,Y,ue,Le,me);else if(_e==="object")throw Y=String(N),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Me}function re(N,Y,ue){if(N==null)return N;var ke=[],me=0;return ae(N,ke,"","",function(_e){return Y.call(ue,_e,me++)}),ke}function te(N){if(N._status===-1){var Y=N._result;Y=Y(),Y.then(function(ue){(N._status===0||N._status===-1)&&(N._status=1,N._result=ue)},function(ue){(N._status===0||N._status===-1)&&(N._status=2,N._result=ue)}),N._status===-1&&(N._status=0,N._result=Y)}if(N._status===1)return N._result.default;throw N._result}var le={current:null},H={transition:null},Q={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:H,ReactCurrentOwner:B};function W(){throw Error("act(...) is not supported in production builds of React.")}return ut.Children={map:re,forEach:function(N,Y,ue){re(N,function(){Y.apply(this,arguments)},ue)},count:function(N){var Y=0;return re(N,function(){Y++}),Y},toArray:function(N){return re(N,function(Y){return Y})||[]},only:function(N){if(!F(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ut.Component=P,ut.Fragment=n,ut.Profiler=r,ut.PureComponent=L,ut.StrictMode=a,ut.Suspense=u,ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,ut.act=W,ut.cloneElement=function(N,Y,ue){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ke=b({},N.props),me=N.key,_e=N.ref,Me=N._owner;if(Y!=null){if(Y.ref!==void 0&&(_e=Y.ref,Me=B.current),Y.key!==void 0&&(me=""+Y.key),N.type&&N.type.defaultProps)var Oe=N.type.defaultProps;for(Le in Y)I.call(Y,Le)&&!D.hasOwnProperty(Le)&&(ke[Le]=Y[Le]===void 0&&Oe!==void 0?Oe[Le]:Y[Le])}var Le=arguments.length-2;if(Le===1)ke.children=ue;else if(1<Le){Oe=Array(Le);for(var St=0;St<Le;St++)Oe[St]=arguments[St+2];ke.children=Oe}return{$$typeof:t,type:N.type,key:me,ref:_e,props:ke,_owner:Me}},ut.createContext=function(N){return N={$$typeof:l,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:s,_context:N},N.Consumer=N},ut.createElement=S,ut.createFactory=function(N){var Y=S.bind(null,N);return Y.type=N,Y},ut.createRef=function(){return{current:null}},ut.forwardRef=function(N){return{$$typeof:c,render:N}},ut.isValidElement=F,ut.lazy=function(N){return{$$typeof:p,_payload:{_status:-1,_result:N},_init:te}},ut.memo=function(N,Y){return{$$typeof:h,type:N,compare:Y===void 0?null:Y}},ut.startTransition=function(N){var Y=H.transition;H.transition={};try{N()}finally{H.transition=Y}},ut.unstable_act=W,ut.useCallback=function(N,Y){return le.current.useCallback(N,Y)},ut.useContext=function(N){return le.current.useContext(N)},ut.useDebugValue=function(){},ut.useDeferredValue=function(N){return le.current.useDeferredValue(N)},ut.useEffect=function(N,Y){return le.current.useEffect(N,Y)},ut.useId=function(){return le.current.useId()},ut.useImperativeHandle=function(N,Y,ue){return le.current.useImperativeHandle(N,Y,ue)},ut.useInsertionEffect=function(N,Y){return le.current.useInsertionEffect(N,Y)},ut.useLayoutEffect=function(N,Y){return le.current.useLayoutEffect(N,Y)},ut.useMemo=function(N,Y){return le.current.useMemo(N,Y)},ut.useReducer=function(N,Y,ue){return le.current.useReducer(N,Y,ue)},ut.useRef=function(N){return le.current.useRef(N)},ut.useState=function(N){return le.current.useState(N)},ut.useSyncExternalStore=function(N,Y,ue){return le.current.useSyncExternalStore(N,Y,ue)},ut.useTransition=function(){return le.current.useTransition()},ut.version="18.3.1",ut}var ew;function Gd(){return ew||(ew=1,Pg.exports=JA()),Pg.exports}var tw;function XA(){if(tw)return Mc;tw=1;var t=Gd(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(c,u,h){var p,m={},v=null,y=null;h!==void 0&&(v=""+h),u.key!==void 0&&(v=""+u.key),u.ref!==void 0&&(y=u.ref);for(p in u)a.call(u,p)&&!s.hasOwnProperty(p)&&(m[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)m[p]===void 0&&(m[p]=u[p]);return{$$typeof:e,type:c,key:v,ref:y,props:m,_owner:r.current}}return Mc.Fragment=n,Mc.jsx=l,Mc.jsxs=l,Mc}var nw;function QA(){return nw||(nw=1,xg.exports=XA()),xg.exports}var R=QA(),k=Gd();const Sl=CS(k),TS=YA({__proto__:null,default:Sl},[k]);var dh={},Sg={exports:{}},ma={},Cg={exports:{}},Tg={};var aw;function eR(){return aw||(aw=1,(function(t){function e(H,Q){var W=H.length;H.push(Q);e:for(;0<W;){var N=W-1>>>1,Y=H[N];if(0<r(Y,Q))H[N]=Q,H[W]=Y,W=N;else break e}}function n(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var Q=H[0],W=H.pop();if(W!==Q){H[0]=W;e:for(var N=0,Y=H.length,ue=Y>>>1;N<ue;){var ke=2*(N+1)-1,me=H[ke],_e=ke+1,Me=H[_e];if(0>r(me,W))_e<Y&&0>r(Me,me)?(H[N]=Me,H[_e]=W,N=_e):(H[N]=me,H[ke]=W,N=ke);else if(_e<Y&&0>r(Me,W))H[N]=Me,H[_e]=W,N=_e;else break e}}return Q}function r(H,Q){var W=H.sortIndex-Q.sortIndex;return W!==0?W:H.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var u=[],h=[],p=1,m=null,v=3,y=!1,b=!1,x=!1,P=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var Q=n(h);Q!==null;){if(Q.callback===null)a(h);else if(Q.startTime<=H)a(h),Q.sortIndex=Q.expirationTime,e(u,Q);else break;Q=n(h)}}function A(H){if(x=!1,E(H),!b)if(n(u)!==null)b=!0,te(I);else{var Q=n(h);Q!==null&&le(A,Q.startTime-H)}}function I(H,Q){b=!1,x&&(x=!1,T(S),S=-1),y=!0;var W=v;try{for(E(Q),m=n(u);m!==null&&(!(m.expirationTime>Q)||H&&!Z());){var N=m.callback;if(typeof N=="function"){m.callback=null,v=m.priorityLevel;var Y=N(m.expirationTime<=Q);Q=t.unstable_now(),typeof Y=="function"?m.callback=Y:m===n(u)&&a(u),E(Q)}else a(u);m=n(u)}if(m!==null)var ue=!0;else{var ke=n(h);ke!==null&&le(A,ke.startTime-Q),ue=!1}return ue}finally{m=null,v=W,y=!1}}var B=!1,D=null,S=-1,j=5,F=-1;function Z(){return!(t.unstable_now()-F<j)}function ee(){if(D!==null){var H=t.unstable_now();F=H;var Q=!0;try{Q=D(!0,H)}finally{Q?de():(B=!1,D=null)}}else B=!1}var de;if(typeof L=="function")de=function(){L(ee)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,re=ae.port2;ae.port1.onmessage=ee,de=function(){re.postMessage(null)}}else de=function(){P(ee,0)};function te(H){D=H,B||(B=!0,de())}function le(H,Q){S=P(function(){H(t.unstable_now())},Q)}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(H){H.callback=null},t.unstable_continueExecution=function(){b||y||(b=!0,te(I))},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(H){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var W=v;v=Q;try{return H()}finally{v=W}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(H,Q){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var W=v;v=H;try{return Q()}finally{v=W}},t.unstable_scheduleCallback=function(H,Q,W){var N=t.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?N+W:N):W=N,H){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=W+Y,H={id:p++,callback:Q,priorityLevel:H,startTime:W,expirationTime:Y,sortIndex:-1},W>N?(H.sortIndex=W,e(h,H),n(u)===null&&H===n(h)&&(x?(T(S),S=-1):x=!0,le(A,W-N))):(H.sortIndex=Y,e(u,H),b||y||(b=!0,te(I))),H},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(H){var Q=v;return function(){var W=v;v=Q;try{return H.apply(this,arguments)}finally{v=W}}}})(Tg)),Tg}var rw;function tR(){return rw||(rw=1,Cg.exports=eR()),Cg.exports}var iw;function nR(){if(iw)return ma;iw=1;var t=Gd(),e=tR();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,d=1;d<arguments.length;d++)o+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,r={};function s(i,o){l(i,o),l(i+"Capture",o)}function l(i,o){for(r[i]=o,i=0;i<o.length;i++)a.add(o[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function v(i){return u.call(m,i)?!0:u.call(p,i)?!1:h.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,d,f){if(d!==null&&d.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:d!==null?!d.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,d,f){if(o===null||typeof o>"u"||y(i,o,d,f))return!0;if(f)return!1;if(d!==null)switch(d.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function x(i,o,d,f,g,_,C){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=d,this.propertyName=i,this.type=o,this.sanitizeURL=_,this.removeEmptyString=C}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[i]=new x(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];P[o]=new x(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new x(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[i]=new x(i,2,!1,i,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(i){P[i]=new x(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new x(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new x(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new x(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new x(i,5,!1,i.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function L(i){return i[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(i){var o=i.replace(T,L);P[o]=new x(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(T,L);P[o]=new x(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(T,L);P[o]=new x(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new x(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new x(i,1,!1,i.toLowerCase(),null,!0,!0)});function E(i,o,d,f){var g=P.hasOwnProperty(o)?P[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,d,g,f)&&(d=null),f||g===null?v(o)&&(d===null?i.removeAttribute(o):i.setAttribute(o,""+d)):g.mustUseProperty?i[g.propertyName]=d===null?g.type===3?!1:"":d:(o=g.attributeName,f=g.attributeNamespace,d===null?i.removeAttribute(o):(g=g.type,d=g===3||g===4&&d===!0?"":""+d,f?i.setAttributeNS(f,o,d):i.setAttribute(o,d))))}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),B=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),Z=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),H=Symbol.iterator;function Q(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var W=Object.assign,N;function Y(i){if(N===void 0)try{throw Error()}catch(d){var o=d.stack.trim().match(/\n( *(at )?)/);N=o&&o[1]||""}return`
|
|
3
3
|
`+N+i}var ue=!1;function ke(i,o){if(!i||ue)return"";ue=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(X){var f=X}Reflect.construct(i,[],o)}else{try{o.call()}catch(X){f=X}i.call(o.prototype)}else{try{throw Error()}catch(X){f=X}i()}}catch(X){if(X&&f&&typeof X.stack=="string"){for(var g=X.stack.split(`
|
|
4
4
|
`),_=f.stack.split(`
|
|
@@ -1241,5 +1241,5 @@ achievements.page.suggest_link,dashboard,AchievementsPage,AchievementsPage,sugge
|
|
|
1241
1241
|
${A}px !important;
|
|
1242
1242
|
${I}px !important;
|
|
1243
1243
|
}
|
|
1244
|
-
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),D.contains(B)&&D.removeChild(B)}},[e]),R.jsx(JF,{isPresent:e,childRef:c,sizeRef:u,pop:s,children:s===!1?t:k.cloneElement(t,{ref:m})})}const QF=({children:t,initial:e,isPresent:n,onExitComplete:a,custom:r,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=y0(eU),m=k.useId(),v=k.useRef(n),y=k.useRef(a);b0(()=>{v.current=n,y.current=a});let b=!0,x=k.useMemo(()=>(b=!1,{id:m,initial:e,isPresent:n,custom:r,onExitComplete:P=>{p.set(P,!0);for(const T of p.values())if(!T)return;a&&a()},register:P=>(p.set(P,!1),()=>{p.delete(P),!v.current&&!p.size&&y.current?.()})}),[n,p,a]);return s&&b&&(x={...x}),k.useMemo(()=>{p.forEach((P,T)=>p.set(T,!1))},[n]),k.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),t=R.jsx(XF,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:u,root:h,children:t}),R.jsx(Mf.Provider,{value:x,children:t})};function eU(){return new Map}function v5(t=!0){const e=k.useContext(Mf);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:r}=e,s=k.useId();k.useEffect(()=>{if(t)return r(s)},[t]);const l=k.useCallback(()=>t&&a&&a(s),[s,a,t]);return!n&&a?[!1,l]:[!0]}const kh=t=>t.key||"";function T2(t){const e=[];return k.Children.forEach(t,n=>{k.isValidElement(n)&&e.push(n)}),e}const _5=({children:t,custom:e,initial:n=!0,onExitComplete:a,presenceAffectsLayout:r=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:h})=>{const[p,m]=v5(l),v=k.useMemo(()=>T2(t),[t]),y=l&&!p?[]:v.map(kh),b=k.useRef(!0),x=k.useRef(v),P=y0(()=>new Map),T=k.useRef(new Set),[L,E]=k.useState(v),[A,I]=k.useState(v);b0(()=>{b.current=!1,x.current=v;for(let S=0;S<A.length;S++){const j=kh(A[S]);y.includes(j)?(P.delete(j),T.current.delete(j)):P.get(j)!==!0&&P.set(j,!1)}},[A,y.length,y.join("-")]);const B=[];if(v!==L){let S=[...v];for(let j=0;j<A.length;j++){const F=A[j],Z=kh(F);y.includes(Z)||(S.splice(j,0,F),B.push(F))}return s==="wait"&&B.length&&(S=B),I(T2(S)),E(v),null}const{forceRender:D}=k.useContext(_0);return R.jsx(R.Fragment,{children:A.map(S=>{const j=kh(S),F=l&&!p?!1:v===A||y.includes(j),Z=()=>{if(T.current.has(j))return;if(P.has(j))T.current.add(j),P.set(j,!0);else return;let ee=!0;P.forEach(de=>{de||(ee=!1)}),ee&&(D?.(),I(x.current),l&&m?.(),a&&a())};return R.jsx(QF,{isPresent:F,initial:!b.current||n?void 0:!1,custom:e,presenceAffectsLayout:r,mode:s,root:h,onExitComplete:F?void 0:Z,anchorX:c,anchorY:u,children:S},j)})})},y5=k.createContext({strict:!1}),E2={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 A2=!1;function tU(){if(A2)return;const t={};for(const e in E2)t[e]={isEnabled:n=>E2[e].some(a=>!!n[a])};KT(t),A2=!0}function b5(){return tU(),Fz()}function nU(t){const e=b5();for(const n in t)e[n]={...e[n],...t[n]};KT(e)}const aU=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 Gp(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||aU.has(t)}let k5=t=>!Gp(t);function rU(t){typeof t=="function"&&(k5=e=>e.startsWith("on")?!Gp(e):t(e))}try{rU(require("@emotion/is-prop-valid").default)}catch{}function iU(t,e,n){const a={};for(const r in t)r==="values"&&typeof t.values=="object"||Un(t[r])||(k5(r)||n===!0&&Gp(r)||!e&&!Gp(r)||t.draggable&&r.startsWith("onDrag"))&&(a[r]=t[r]);return a}const zf=k.createContext({});function sU(t,e){if(jf(t)){const{initial:n,animate:a}=t;return{initial:n===!1||Nd(n)?n:void 0,animate:Nd(a)?a:void 0}}return t.inherit!==!1?e:{}}function oU(t){const{initial:e,animate:n}=sU(t,k.useContext(zf));return k.useMemo(()=>({initial:e,animate:n}),[R2(e),R2(n)])}function R2(t){return Array.isArray(t)?t.join(" "):t}const q0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function w5(t,e,n){for(const a in e)!Un(e[a])&&!t5(a,n)&&(t[a]=e[a])}function lU({transformTemplate:t},e){return k.useMemo(()=>{const n=q0();return H0(n,e,t),Object.assign({},n.vars,n.style)},[e])}function cU(t,e){const n=t.style||{},a={};return w5(a,n,t),Object.assign(a,lU(t,e)),a}function dU(t,e){const n={},a=cU(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.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=a,n}const x5=()=>({...q0(),attrs:{}});function uU(t,e,n,a){const r=k.useMemo(()=>{const s=x5();return n5(s,e,r5(a),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};w5(s,t.style,t),r.style={...s,...r.style}}return r}const hU=["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 K0(t){return typeof t!="string"||t.includes("-")?!1:!!(hU.indexOf(t)>-1||/[A-Z]/u.test(t))}function pU(t,e,n,{latestValues:a},r,s=!1,l){const u=(l??K0(t)?uU:dU)(e,a,r,t),h=iU(e,typeof t=="string",s),p=t!==k.Fragment?{...h,...u,ref:n}:{},{children:m}=e,v=k.useMemo(()=>Un(m)?m.get():m,[m]);return k.createElement(t,{...p,children:v})}function fU({scrapeMotionValuesFromProps:t,createRenderState:e},n,a,r){return{latestValues:mU(n,a,r,t),renderState:e()}}function mU(t,e,n,a){const r={},s=a(t,{});for(const v in s)r[v]=op(s[v]);let{initial:l,animate:c}=t;const u=jf(t),h=GT(t);e&&h&&!u&&t.inherit!==!1&&(l===void 0&&(l=e.initial),c===void 0&&(c=e.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const m=p?c:l;if(m&&typeof m!="boolean"&&!Of(m)){const v=Array.isArray(m)?m:[m];for(let y=0;y<v.length;y++){const b=N0(t,v[y]);if(b){const{transitionEnd:x,transition:P,...T}=b;for(const L in T){let E=T[L];if(Array.isArray(E)){const A=p?E.length-1:0;E=E[A]}E!==null&&(r[L]=E)}for(const L in x)r[L]=x[L]}}}return r}const P5=t=>(e,n)=>{const a=k.useContext(zf),r=k.useContext(Mf),s=()=>fU(t,e,a,r);return n?s():y0(s)},gU=P5({scrapeMotionValuesFromProps:W0,createRenderState:q0}),vU=P5({scrapeMotionValuesFromProps:i5,createRenderState:x5}),_U=Symbol.for("motionComponentSymbol");function yU(t,e,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const r=k.useRef(null);return k.useCallback(s=>{s&&t.onMount?.(s),e&&(s?e.mount(s):e.unmount());const l=a.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):l(s);else l&&(l.current=s)},[e])}const S5=k.createContext({});function cl(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function bU(t,e,n,a,r,s){const{visualElement:l}=k.useContext(zf),c=k.useContext(y5),u=k.useContext(Mf),h=k.useContext(G0),p=h.reducedMotion,m=h.skipAnimations,v=k.useRef(null),y=k.useRef(!1);a=a||c.renderer,!v.current&&a&&(v.current=a(t,{visualState:e,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:s}),y.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,x=k.useContext(S5);b&&!b.projection&&r&&(b.type==="html"||b.type==="svg")&&kU(v.current,n,r,x);const P=k.useRef(!1);k.useInsertionEffect(()=>{b&&P.current&&b.update(n,u)});const T=n[MT],L=k.useRef(!!T&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return b0(()=>{y.current=!0,b&&(P.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),L.current&&b.animationState&&b.animationState.animateChanges())}),k.useEffect(()=>{b&&(!L.current&&b.animationState&&b.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),L.current=!1),b.enteringChildren=void 0)}),b}function kU(t,e,n,a){const{layoutId:r,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:h,layoutAnchor:p,layoutCrossfade:m}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:C5(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!l||c&&cl(c),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:m,layoutScroll:u,layoutRoot:h,layoutAnchor:p})}function C5(t){if(t)return t.options.allowProjection!==!1?t.projection:C5(t.parent)}function tv(t,{forwardMotionProps:e=!1,type:n}={},a,r){a&&nU(a);const s=n?n==="svg":K0(t),l=s?vU:gU;function c(h,p){let m;const v={...k.useContext(G0),...h,layoutId:wU(h)},{isStatic:y}=v,b=oU(h),x=l(h,y);if(!y&&typeof window<"u"){xU();const P=PU(v);m=P.MeasureLayout,b.visualElement=bU(t,x,v,r,P.ProjectionNode,s)}return R.jsxs(zf.Provider,{value:b,children:[m&&b.visualElement?R.jsx(m,{visualElement:b.visualElement,...v}):null,pU(t,h,yU(x,b.visualElement,p),x,y,e,s)]})}c.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=k.forwardRef(c);return u[_U]=t,u}function wU({layoutId:t}){const e=k.useContext(_0).id;return e&&t!==void 0?e+"-"+t:t}function xU(t,e){k.useContext(y5).strict}function PU(t){const e=b5(),{drag:n,layout:a}=e;if(!n&&!a)return{};const r={...n,...a};return{MeasureLayout:n?.isEnabled(t)||a?.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function SU(t,e){if(typeof Proxy>"u")return tv;const n=new Map,a=(s,l)=>tv(s,l,t,e),r=(s,l)=>a(s,l);return new Proxy(r,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,tv(l,void 0,t,e)),n.get(l))})}const CU=(t,e)=>e.isSVG??K0(t)?new nF(e):new Zz(e,{allowProjection:t!==k.Fragment});class TU extends vs{constructor(e){super(e),e.animationState||(e.animationState=oF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Of(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(){this.node.animationState.reset(),this.unmountControls?.()}}let EU=0;class AU extends vs{constructor(){super(...arguments),this.id=EU++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===a)return;if(e&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"||typeof s=="object"&&s!==null&&!Array.isArray(s)){const c=io(this.node,s,l);if(c){const{transition:u,transitionEnd:h,...p}=c;for(const m in p)this.node.getValue(m)?.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.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 RU={animation:{Feature:TU},exit:{Feature:AU}};function ru(t){return{point:{x:t.pageX,y:t.pageY}}}const LU=t=>e=>F0(e)&&t(e,ru(e));function _d(t,e,n,a){return Od(t,e,LU(n),a)}const T5=({current:t})=>t?t.ownerDocument.defaultView:null,L2=(t,e)=>Math.abs(t-e);function DU(t,e){const n=L2(t.x,e.x),a=L2(t.y,e.y);return Math.sqrt(n**2+a**2)}const D2=new Set(["auto","scroll"]);class E5{constructor(e,n,{transformPagePoint:a,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3,element:c}={}){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=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wh(this.lastRawMoveEventInfo,this.transformPagePoint));const b=nv(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,P=DU(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!P)return;const{point:T}=b,{timestamp:L}=zn;this.history.push({...T,timestamp:L});const{onStart:E,onMove:A}=this.handlers;x||(E&&E(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=wh(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:P,onSessionEnd:T,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=nv(b.type==="pointercancel"?this.lastMoveEventInfo:wh(x,this.transformPagePoint),this.history);this.startEvent&&P&&P(b,E),T&&T(b,E)},!F0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=r||window;const u=ru(e),h=wh(u,this.transformPagePoint),{point:p}=h,{timestamp:m}=zn;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=n;v&&v(e,nv(h,this.history));const y={passive:!0,capture:!0};this.removeListeners=tu(_d(this.contextWindow,"pointermove",this.handlePointerMove,y),_d(this.contextWindow,"pointerup",this.handlePointerUp,y),_d(this.contextWindow,"pointercancel",this.handlePointerUp,y)),c&&this.startScrollTracking(c)}startScrollTracking(e){let n=e.parentElement;for(;n;){const a=getComputedStyle(n);(D2.has(a.overflowX)||D2.has(a.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 a=e===window,r=a?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-n.x,y:r.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),Ot.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ps(this.updatePoint)}}function wh(t,e){return e?{point:e(t.point)}:t}function I2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nv({point:t},e){return{point:t,delta:I2(t,A5(e)),offset:I2(t,IU(e)),velocity:MU(e,.1)}}function IU(t){return t[0]}function A5(t){return t[t.length-1]}function MU(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,a=null;const r=A5(t);for(;n>=0&&(a=t[n],!(r.timestamp-a.timestamp>Ra(e)));)n--;if(!a)return{x:0,y:0};a===t[0]&&t.length>2&&r.timestamp-a.timestamp>Ra(e)*2&&(a=t[1]);const s=qa(r.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(r.x-a.x)/s,y:(r.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function NU(t,{min:e,max:n},a){return e!==void 0&&t<e?t=a?Nt(e,t,a.min):Math.max(t,e):n!==void 0&&t>n&&(t=a?Nt(n,t,a.max):Math.min(t,n)),t}function M2(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 OU(t,{top:e,left:n,bottom:a,right:r}){return{x:M2(t.x,n,r),y:M2(t.y,e,a)}}function N2(t,e){let n=e.min-t.min,a=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,a]=[a,n]),{min:n,max:a}}function jU(t,e){return{x:N2(t.x,e.x),y:N2(t.y,e.y)}}function zU(t,e){let n=.5;const a=ra(t),r=ra(e);return r>a?n=Id(e.min,e.max-a,t.min):a>r&&(n=Id(t.min,t.max-r,e.min)),Zr(0,1,n)}function FU(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 j_=.35;function UU(t=j_){return t===!1?t=0:t===!0&&(t=j_),{x:O2(t,"left","right"),y:O2(t,"top","bottom")}}function O2(t,e,n){return{min:j2(t,e),max:j2(t,n)}}function j2(t,e){return typeof t=="number"?t:t[e]||0}const BU=new WeakMap;class $U{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=Cn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=m=>{n&&this.snapToCursor(ru(m).point),this.stopAnimation()},l=(m,v)=>{const{drag:y,dragPropagation:b,onDragStart:x}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gz(y),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jr(T=>{let L=this.getAxisMotionValue(T).get()||0;if(Vr.test(L)){const{projection:E}=this.visualElement;if(E&&E.layout){const A=E.layout.layoutBox[T];A&&(L=ra(A)*(parseFloat(L)/100))}}this.originPoint[T]=L}),x&&Ot.update(()=>x(m,v),!1,!0),E_(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:x,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:T}=v;if(b&&this.currentDirection===null){this.currentDirection=HU(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,T),this.updateAxis("y",v.point,T),this.visualElement.render(),P&&Ot.update(()=>P(m,v),!1,!0)},u=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v,this.stop(m,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new E5(e,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:T5(this.visualElement),element:this.visualElement.current})}stop(e,n){const a=e||this.latestPointerEvent,r=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!a)return;const{velocity:l}=r;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(a,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&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,a){const{drag:r}=this.getProps();if(!a||!xh(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let l=this.originPoint[e]+a[e];this.constraints&&this.constraints[e]&&(l=NU(l,this.constraints[e],this.elastic[e])),s.set(l)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&cl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&a?this.constraints=OU(a.layoutBox,e):this.constraints=!1,this.elastic=UU(n),r!==this.constraints&&!cl(e)&&a&&this.constraints&&!this.hasMutatedConstraints&&jr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=FU(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!cl(e))return!1;const a=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const s=Hz(a,r.root,this.visualElement.getTransformPagePoint());let l=jU(r.layout.layoutBox,s);if(n){const c=n(Bz(l));this.hasMutatedConstraints=!!c,c&&(l=ZT(c))}return l}startAnimation(e){const{drag:n,dragMomentum:a,dragElastic:r,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},h=jr(p=>{if(!xh(p,n,this.currentDirection))return;let m=u&&u[p]||{};(l===!0||l===p)&&(m={min:0,max:0});const v=r?200:1e6,y=r?40:1e7,b={type:"inertia",velocity:a?e[p]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(p,b)});return Promise.all(h).then(c)}startAxisValueAnimation(e,n){const a=this.getAxisMotionValue(e);return E_(this.visualElement,e),a.start(M0(e,a,0,n,this.visualElement,!1))}stopAnimation(){jr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps()[n];return r||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){jr(n=>{const{drag:a}=this.getProps();if(!xh(n,a,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:l,max:c}=r.layout.layoutBox[n],u=s.get()||0;s.set(e[n]-Nt(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!cl(n)||!a||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};jr(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();r[l]=zU({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),jr(l=>{if(!xh(l,e,null))return;const c=this.getAxisMotionValue(l),{min:u,max:h}=this.constraints[l];c.set(Nt(u,h,r[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;BU.set(this.visualElement,this);const e=this.visualElement.current,n=_d(e,"pointerdown",h=>{const{drag:p,dragListener:m=!0}=this.getProps(),v=h.target,y=v!==e&&wz(v);p&&m&&!y&&this.start(h)});let a;const r=()=>{const{dragConstraints:h}=this.getProps();cl(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),a||(a=VU(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(r);const c=Od(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(jr(m=>{const v=this.getAxisMotionValue(m);v&&(this.originPoint[m]+=h[m].translate,v.set(v.get()+h[m].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),u&&u(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:l=j_,dragMomentum:c=!0}=e;return{...e,drag:n,dragDirectionLock:a,dragPropagation:r,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function z2(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function VU(t,e,n){const a=Wx(t,z2(n)),r=Wx(e,z2(n));return()=>{a(),r()}}function xh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function HU(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class WU extends vs{constructor(e){super(e),this.removeGroupControls=Za,this.removeListeners=Za,this.controls=new $U(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Za}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 av=t=>(e,n)=>{t&&Ot.update(()=>t(e,n),!1,!0)};class GU extends vs{constructor(){super(...arguments),this.removePointerDownListener=Za}onPointerDown(e){this.session=new E5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:T5(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:a,onPanEnd:r}=this.node.getProps();return{onSessionStart:av(e),onStart:av(n),onMove:av(a),onEnd:(s,l)=>{delete this.session,r&&Ot.postRender(()=>r(s,l))}}}mount(){this.removePointerDownListener=_d(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 rv=!1;class qU extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:a,layoutId:r}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),a&&a.register&&r&&a.register(s),rv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),lp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:a,drag:r,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,e.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),rv=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==s?l.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:a}=e;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),z0.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:r}=e;rv=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),a&&a.deregister&&a.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function R5(t){const[e,n]=v5(),a=k.useContext(_0);return R.jsx(qU,{...t,layoutGroup:a,switchLayoutGroup:k.useContext(S5),isPresent:e,safeToRemove:n})}const KU={pan:{Feature:GU},drag:{Feature:WU,ProjectionNode:g5,MeasureLayout:R5}};function F2(t,e,n){const{props:a}=t;t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=a[r];s&&Ot.postRender(()=>s(e,ru(e)))}class YU extends vs{mount(){const{current:e}=this.node;e&&(this.unmount=_z(e,(n,a)=>(F2(this.node,a,"Start"),r=>F2(this.node,r,"End"))))}unmount(){}}class ZU extends vs{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=tu(Od(this.node.current,"focus",()=>this.onFocus()),Od(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function U2(t,e,n){const{props:a}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&a.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=a[r];s&&Ot.postRender(()=>s(e,ru(e)))}class JU extends vs{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=Pz(e,(r,s)=>(U2(this.node,s,"Start"),(l,{success:c})=>U2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const z_=new WeakMap,iv=new WeakMap,XU=t=>{const e=z_.get(t.target);e&&e(t)},QU=t=>{t.forEach(XU)};function eB({root:t,...e}){const n=t||document;iv.has(n)||iv.set(n,{});const a=iv.get(n),r=JSON.stringify(e);return a[r]||(a[r]=new IntersectionObserver(QU,{root:t,...e})),a[r]}function tB(t,e,n){const a=eB(e);return z_.set(t,n),a.observe(t),()=>{z_.delete(t),a.unobserve(t)}}const nB={some:0,all:1};class aB extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:a,amount:r="some",once:s}=e,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof r=="number"?r:nB[r]},c=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),v=h?p:m;v&&v(u)};this.stopObserver=tB(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(rB(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function rB({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const iB={inView:{Feature:aB},tap:{Feature:JU},focus:{Feature:ZU},hover:{Feature:YU}},sB={layout:{ProjectionNode:g5,MeasureLayout:R5}},oB={...RU,...iB,...KU,...sB},lB=SU(oB,CU);function cB(){!V0.current&&qT();const[t]=k.useState($p.current);return t}const yd=lB;function L5(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=L5(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function dB(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=L5(t))&&(a&&(a+=" "),a+=e);return a}const uB=(t,e)=>{const n=new Array(t.length+e.length);for(let a=0;a<t.length;a++)n[a]=t[a];for(let a=0;a<e.length;a++)n[t.length+a]=e[a];return n},hB=(t,e)=>({classGroupId:t,validator:e}),D5=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),qp="-",B2=[],pB="arbitrary..",fB=t=>{const e=gB(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return mB(l);const c=l.split(qp),u=c[0]===""&&c.length>1?1:0;return I5(c,u,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=a[l],h=n[l];return u?h?uB(h,u):u:h||B2}return n[l]||B2}}},I5=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const r=t[e],s=n.nextPart.get(r);if(s){const h=I5(t,e+1,s);if(h)return h}const l=n.validators;if(l===null)return;const c=e===0?t.join(qp):t.slice(e).join(qp),u=l.length;for(let h=0;h<u;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},mB=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),a=e.slice(0,n);return a?pB+a:void 0})(),gB=t=>{const{theme:e,classGroups:n}=t;return vB(n,e)},vB=(t,e)=>{const n=D5();for(const a in t){const r=t[a];Y0(r,n,a,e)}return n},Y0=(t,e,n,a)=>{const r=t.length;for(let s=0;s<r;s++){const l=t[s];_B(l,e,n,a)}},_B=(t,e,n,a)=>{if(typeof t=="string"){yB(t,e,n);return}if(typeof t=="function"){bB(t,e,n,a);return}kB(t,e,n,a)},yB=(t,e,n)=>{const a=t===""?e:M5(e,t);a.classGroupId=n},bB=(t,e,n,a)=>{if(wB(t)){Y0(t(a),e,n,a);return}e.validators===null&&(e.validators=[]),e.validators.push(hB(n,t))},kB=(t,e,n,a)=>{const r=Object.entries(t),s=r.length;for(let l=0;l<s;l++){const[c,u]=r[l];Y0(u,M5(e,c),n,a)}},M5=(t,e)=>{let n=t;const a=e.split(qp),r=a.length;for(let s=0;s<r;s++){const l=a[s];let c=n.nextPart.get(l);c||(c=D5(),n.nextPart.set(l,c)),n=c}return n},wB=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,xB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),a=Object.create(null);const r=(s,l)=>{n[s]=l,e++,e>t&&(e=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return r(s,l),l},set(s,l){s in n?n[s]=l:r(s,l)}}},F_="!",$2=":",PB=[],V2=(t,e,n,a,r)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),SB=t=>{const{prefix:e,experimentalParseClassName:n}=t;let a=r=>{const s=[];let l=0,c=0,u=0,h;const p=r.length;for(let x=0;x<p;x++){const P=r[x];if(l===0&&c===0){if(P===$2){s.push(r.slice(u,x)),u=x+1;continue}if(P==="/"){h=x;continue}}P==="["?l++:P==="]"?l--:P==="("?c++:P===")"&&c--}const m=s.length===0?r:r.slice(u);let v=m,y=!1;m.endsWith(F_)?(v=m.slice(0,-1),y=!0):m.startsWith(F_)&&(v=m.slice(1),y=!0);const b=h&&h>u?h-u:void 0;return V2(s,y,v,b)};if(e){const r=e+$2,s=a;a=l=>l.startsWith(r)?s(l.slice(r.length)):V2(PB,!1,l,void 0,!0)}if(n){const r=a;a=s=>n({className:s,parseClassName:r})}return a},CB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,a)=>{e.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=e.has(l);c||u?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(l)):r.push(l)}return r.length>0&&(r.sort(),a.push(...r)),a}},TB=t=>({cache:xB(t.cacheSize),parseClassName:SB(t),sortModifiers:CB(t),postfixLookupClassGroupIds:EB(t),...fB(t)}),EB=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)e[n[a]]=!0;return e},AB=/\s+/,RB=(t,e)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:s,postfixLookupClassGroupIds:l}=e,c=[],u=t.trim().split(AB);let h="";for(let p=u.length-1;p>=0;p-=1){const m=u[p],{isExternal:v,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:P}=n(m);if(v){h=m+(h.length>0?" "+h:h);continue}let T=!!P,L;if(T){const D=x.substring(0,P);L=a(D);const S=L&&l[L]?a(x):void 0;S&&S!==L&&(L=S,T=!1)}else L=a(x);if(!L){if(!T){h=m+(h.length>0?" "+h:h);continue}if(L=a(x),!L){h=m+(h.length>0?" "+h:h);continue}T=!1}const E=y.length===0?"":y.length===1?y[0]:s(y).join(":"),A=b?E+F_:E,I=A+L;if(c.indexOf(I)>-1)continue;c.push(I);const B=r(L,T);for(let D=0;D<B.length;++D){const S=B[D];c.push(A+S)}h=m+(h.length>0?" "+h:h)}return h},LB=(...t)=>{let e=0,n,a,r="";for(;e<t.length;)(n=t[e++])&&(a=N5(n))&&(r&&(r+=" "),r+=a);return r},N5=t=>{if(typeof t=="string")return t;let e,n="";for(let a=0;a<t.length;a++)t[a]&&(e=N5(t[a]))&&(n&&(n+=" "),n+=e);return n},DB=(t,...e)=>{let n,a,r,s;const l=u=>{const h=e.reduce((p,m)=>m(p),t());return n=TB(h),a=n.cache.get,r=n.cache.set,s=c,c(u)},c=u=>{const h=a(u);if(h)return h;const p=RB(u,n);return r(u,p),p};return s=l,(...u)=>s(LB(...u))},IB=[],Sn=t=>{const e=n=>n[t]||IB;return e.isThemeGetter=!0,e},O5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,j5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,NB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OB=/\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$/,jB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=t=>MB.test(t),lt=t=>!!t&&!Number.isNaN(Number(t)),Dr=t=>!!t&&Number.isInteger(Number(t)),sv=t=>t.endsWith("%")&<(t.slice(0,-1)),pi=t=>NB.test(t),z5=()=>!0,UB=t=>OB.test(t)&&!jB.test(t),Z0=()=>!1,BB=t=>zB.test(t),$B=t=>FB.test(t),VB=t=>!Te(t)&&!Ae(t),HB=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)),WB=t=>_s(t,B5,Z0),Te=t=>O5.test(t),Os=t=>_s(t,$5,UB),H2=t=>_s(t,QB,lt),GB=t=>_s(t,H5,z5),qB=t=>_s(t,V5,Z0),W2=t=>_s(t,F5,Z0),KB=t=>_s(t,U5,$B),Ph=t=>_s(t,W5,BB),Ae=t=>j5.test(t),Uc=t=>ko(t,$5),YB=t=>ko(t,V5),G2=t=>ko(t,F5),ZB=t=>ko(t,B5),JB=t=>ko(t,U5),Sh=t=>ko(t,W5,!0),XB=t=>ko(t,H5,!0),_s=(t,e,n)=>{const a=O5.exec(t);return a?a[1]?e(a[1]):n(a[2]):!1},ko=(t,e,n=!1)=>{const a=j5.exec(t);return a?a[1]?e(a[1]):n:!1},F5=t=>t==="position"||t==="percentage",U5=t=>t==="image"||t==="url",B5=t=>t==="length"||t==="size"||t==="bg-size",$5=t=>t==="length",QB=t=>t==="number",V5=t=>t==="family-name",H5=t=>t==="number"||t==="weight",W5=t=>t==="shadow",e$=()=>{const t=Sn("color"),e=Sn("font"),n=Sn("text"),a=Sn("font-weight"),r=Sn("tracking"),s=Sn("leading"),l=Sn("breakpoint"),c=Sn("container"),u=Sn("spacing"),h=Sn("radius"),p=Sn("shadow"),m=Sn("inset-shadow"),v=Sn("text-shadow"),y=Sn("drop-shadow"),b=Sn("blur"),x=Sn("perspective"),P=Sn("aspect"),T=Sn("ease"),L=Sn("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...A(),Ae,Te],B=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],S=()=>[Ae,Te,u],j=()=>[ts,"full","auto",...S()],F=()=>[Dr,"none","subgrid",Ae,Te],Z=()=>["auto",{span:["full",Dr,Ae,Te]},Dr,Ae,Te],ee=()=>[Dr,"auto",Ae,Te],de=()=>["auto","min","max","fr",Ae,Te],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...S()],le=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[ts,"screen","full","dvw","lvw","svw","min","max","fit",...S()],Q=()=>[ts,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],W=()=>[t,Ae,Te],N=()=>[...A(),G2,W2,{position:[Ae,Te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",ZB,WB,{size:[Ae,Te]}],ke=()=>[sv,Uc,Os],me=()=>["","none","full",h,Ae,Te],_e=()=>["",lt,Uc,Os],Me=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[lt,sv,G2,W2],St=()=>["","none",b,Ae,Te],dn=()=>["none",lt,Ae,Te],jt=()=>["none",lt,Ae,Te],_t=()=>[lt,Ae,Te],Zt=()=>[ts,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[z5],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[VB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",lt],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,Te,Ae,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Te]}],"container-named":[HB],columns:[{columns:[lt,Te,Ae,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:I()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Dr,"auto",Ae,Te]}],basis:[{basis:[ts,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ts,"auto","initial","none",Te]}],grow:[{grow:["",lt,Ae,Te]}],shrink:[{shrink:["",lt,Ae,Te]}],order:[{order:[Dr,"first","last","none",Ae,Te]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh",...le()]}],"font-size":[{text:["base",n,Uc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,XB,GB]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sv,Te]}],"font-family":[{font:[YB,qB,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:[r,Ae,Te]}],"line-clamp":[{"line-clamp":[lt,"none",Ae,H2]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",Ae,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Me(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Ae,Os]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[lt,"auto",Ae,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Dr,Ae,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,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",Ae,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:N()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dr,Ae,Te],radial:["",Ae,Te],conic:[Dr,Ae,Te]},JB,KB]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ke()}],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Me(),"hidden","none"]}],"divide-style":[{divide:[...Me(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Ae,Te]}],"outline-w":[{outline:["",lt,Uc,Os]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Sh,Ph]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",m,Sh,Ph]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[lt,Os]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Sh,Ph]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[lt,Ae,Te]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"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":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ae,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Te]}],filter:[{filter:["","none",Ae,Te]}],blur:[{blur:St()}],brightness:[{brightness:[lt,Ae,Te]}],contrast:[{contrast:[lt,Ae,Te]}],"drop-shadow":[{"drop-shadow":["","none",y,Sh,Ph]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",lt,Ae,Te]}],"hue-rotate":[{"hue-rotate":[lt,Ae,Te]}],invert:[{invert:["",lt,Ae,Te]}],saturate:[{saturate:[lt,Ae,Te]}],sepia:[{sepia:["",lt,Ae,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Te]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Ae,Te]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Ae,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Ae,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Ae,Te]}],"backdrop-invert":[{"backdrop-invert":["",lt,Ae,Te]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Ae,Te]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Ae,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Ae,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Ae,Te]}],ease:[{ease:["linear","initial",T,Ae,Te]}],delay:[{delay:[lt,Ae,Te]}],animate:[{animate:["none",L,Ae,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ae,Te]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:dn()}],"rotate-x":[{"rotate-x":dn()}],"rotate-y":[{"rotate-y":dn()}],"rotate-z":[{"rotate-z":dn()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:_t()}],"skew-x":[{"skew-x":_t()}],"skew-y":[{"skew-y":_t()}],transform:[{transform:[Ae,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Zt()}],"translate-x":[{"translate-x":Zt()}],"translate-y":[{"translate-y":Zt()}],"translate-z":[{"translate-z":Zt()}],"translate-none":["translate-none"],zoom:[{zoom:[Dr,Ae,Te]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Ae,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":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Ae,Te]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[lt,Uc,Os,H2]}],stroke:[{stroke:["none",...W()]}],"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"]}},t$=DB(e$);function $t(...t){return t$(dB(t))}const n$=R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[R.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),R.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),R.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),R.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),a$=R.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:R.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),r$={google:n$,github:a$},i$={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function s$(t){return i$[t]||String(t||"").replace(/-/g," ")}function o$(t){if(typeof t=="string"&&t.trim())return t.trim();if(t&&typeof t=="object"){if(typeof t.token=="string"&&t.token.trim())return t.token.trim();if(typeof t.otp=="string"&&t.otp.trim())return t.otp.trim()}return""}function l$({title:t,subtitle:e,className:n="",onSuccess:a,hideLogo:r=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:u=""}){eu();const{enabled:h,signedIn:p,refreshUser:m,signInWithPassword:v,signUp:y,signInWithOAuth:b,getPublicAuthConfig:x,sendResetPasswordEmail:P,exchangeResetPasswordToken:T,resetPassword:L}=bo(),[E,A]=k.useState(s),[I,B]=k.useState(c),[D,S]=k.useState(""),[j,F]=k.useState(""),[Z,ee]=k.useState(""),[de,ae]=k.useState(u),[re,te]=k.useState(!1),[le,H]=k.useState(null),[Q,W]=k.useState(null),[N,Y]=k.useState(!1),[ue,ke]=k.useState(!!(s!=="signin"||c)),[me,_e]=k.useState(!0),[Me,Oe]=k.useState([]),[Le,St]=k.useState(8);k.useEffect(()=>{s&&A(s)},[s]),k.useEffect(()=>{c&&B(c)},[c]),k.useEffect(()=>{u&&ae(u)},[u]),k.useEffect(()=>{if(!h)return;let Qe=!0;return _e(!0),(async()=>{const{data:st,error:Dt}=await x();if(Qe){if(Dt||!st)Oe(["google","github"]);else{const Et=Array.isArray(st.oAuthProviders)?st.oAuthProviders:[],Nn=Array.isArray(st.customOAuthProviders)?st.customOAuthProviders:[];Oe([...Et,...Nn]),typeof st.passwordMinLength=="number"&&st.passwordMinLength>0&&St(st.passwordMinLength)}_e(!1)}})(),()=>{Qe=!1}},[h,x]),k.useEffect(()=>{p&&a&&a()},[p,a]);const dn=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=k.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=k.useCallback(async Qe=>{H(null),te(!0);try{const{error:st}=await b(Qe,dn);st&&H(st.message||String(st))}finally{te(!1)}},[b,dn]);k.useEffect(()=>{if(!h||me||p||typeof window>"u")return;const Qe=window.location.search;if(!Qe)return;const st=new URLSearchParams(Qe),Dt=st.get("native")==="1",Et=st.get("provider");Dt&&Et&&[...Me].includes(Et)&&_t(Et)},[h,me,p,Me,_t]);const Zt=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{if(E==="signup"){const{data:Dt,error:Et}=await y({email:I.trim(),password:D,name:Z.trim()||void 0});if(Et){H(Et.message||String(Et));return}if(Dt?.requireEmailVerification){W(xe("login.verify_email_pending")),A("signin");return}await m();return}const{error:st}=await v({email:I.trim(),password:D});if(st){H(st.message||String(st));return}await m()}finally{te(!1)}},[E,I,D,Z,y,v,m]),nr=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{const st=I.trim(),{error:Dt}=await P({email:st,redirectTo:jt});if(Dt){H(Dt.message||String(Dt));return}B(st),W(xe("reset_password.request.sent")),A("reset_confirm")}finally{te(!1)}},[I,jt,P]),Mn=k.useCallback(async Qe=>{if(Qe.preventDefault(),H(null),D!==j){H(xe("reset_password.error.password_mismatch"));return}te(!0);try{let st=l;if(!st){const{data:Et,error:Nn}=await T({email:I.trim(),code:de.trim()});if(Nn){H(Nn.message||String(Nn));return}if(st=o$(Et),!st){H(xe("reset_password.error.missing_token"));return}}const{error:Dt}=await L({newPassword:D,otp:st});if(Dt){H(Dt.message||String(Dt));return}Y(!0),W(xe("reset_password.success"))}finally{te(!1)}},[de,j,I,T,D,L,l]);if(!h)return null;const Vt=E==="reset_email"||E==="reset_confirm";return R.jsxs("div",{className:$t("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Vt&&R.jsxs("button",{type:"button",onClick:()=>{A("signin"),W(null),H(null),Y(!1),S(""),F("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[R.jsx(PN,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:$t("mb-6",Vt?"text-left":"text-center"),children:[!r&&!Vt&&R.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),R.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:xe("shared.app_name")})]}),R.jsx("h2",{className:$t("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(r||Vt)&&"text-base font-bold md:text-lg"),children:Vt?xe("reset_password.title"):t||xe("login_modal.subtitle")}),!Vt&&e&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:e}),Vt&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:Q&&E==="reset_confirm"&&!N?Q:xe("reset_password.subtitle")})]}),Q&&(!Vt||N)&&R.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:Q}),le&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:le}),E==="reset_email"&&R.jsxs("form",{onSubmit:nr,className:"space-y-3",children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.request.submit")})]}),E==="reset_confirm"&&(N?R.jsx("button",{type:"button",onClick:()=>{A("signin"),Y(!1),W(null),H(null),S(""),F("")},className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors text-center shadow-sm",children:xe("reset_password.success_cta")}):R.jsxs("form",{onSubmit:Mn,className:"space-y-3",children:[!l&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.code")}),R.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:de,onChange:Qe=>ae(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.new_password")}),R.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:D,onChange:Qe=>S(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.confirm_password")}),R.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:j,onChange:Qe=>F(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.reset.submit")})]})),!Vt&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:me?R.jsxs("div",{className:"space-y-2.5",children:[R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):Me.map(Qe=>R.jsxs("button",{type:"button",disabled:re,onClick:()=>_t(Qe),className:$t("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[r$[Qe]||null,xe("login.oauth.continue",{provider:s$(Qe)})]},Qe))}),ue?R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login_modal.divider_email")})})]}),R.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[R.jsx("button",{type:"button",className:$t("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signin"),H(null)},children:xe("login.tab.sign_in")}),R.jsx("button",{type:"button",className:$t("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signup"),H(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Zt,className:"space-y-3",children:[E==="signup"&&R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.name")}),R.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:Z,onChange:Qe=>ee(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:xe("login.field.name_placeholder")})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.password")}),R.jsx("input",{id:"card-password",type:"password",autoComplete:E==="signup"?"new-password":"current-password",required:!0,minLength:E==="signup"?Le:void 0,value:D,onChange:Qe=>S(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),E==="signup"&&R.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.password_hint",{min:String(Le)})}),E==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{A("reset_email"),H(null),W(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:xe("login.forgot_password")})})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe(E==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.divider")})})]}),R.jsxs("button",{type:"button",onClick:()=>ke(!0),className:$t("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[R.jsx(zN,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function c$(){const{isOpen:t,closeLoginModal:e}=GC(),{enabled:n}=bo();return k.useEffect(()=>{if(!t)return;const a=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t,e]),n?R.jsx(_5,{children:t&&R.jsxs(yd.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[R.jsx(yd.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(yd.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 shadow-2xl overflow-hidden",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:a=>a.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:e,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:R.jsx(v0,{className:"h-5 w-5"})}),R.jsx(l$,{onSuccess:e,className:"p-6 bg-transparent"})]})]})}):null}const d$={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},SY="https://tokentracker.statuspage.io/",u$="https://github.com/mm7894215/TokenTracker",G5=`${u$}/releases/latest`,CY=`${G5}/download/TokenTrackerBar.dmg`,TY=`${G5}/download/TokenTracker-Setup.exe`;function h$(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const e=typeof import.meta<"u"?d$:void 0;return(e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||e?.VITE_INSFORGE_BASE_URL||Yr()).trim()}function p$(){return Yr()}function f$(t=""){if(typeof t!="string"||t.length===0)return!1;const e=new URLSearchParams(t),n=String(e.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const m$=300*1e3,g$=720*60*1e3;function J0(t){return typeof t=="string"&&/^https?:\/\//i.test(t.trim())}function v$(t,e=Date.now()){if(!t?.token||!t?.deviceId||!t?.issuedAt)return!0;const n=Date.parse(t.issuedAt);return Number.isFinite(n)?n+g$<=e:!0}async function q5(t,e){const n=Yr();if(!J0(n)||!t)return;const a=n.replace(/\/$/,""),r=Wl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};r&&(s.apikey=r);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:e})})}catch{}}async function _$(){try{const t=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(t.ok){const e=await t.json().catch(()=>null),n=typeof e?.machineId=="string"?e.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function y$(t){const e=Yr();if(!J0(e)||!t)return null;const n=e.replace(/\/$/,""),a=Wl(),r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};a&&(r.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await _$();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,u=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:r,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!u.ok)return null;const h=await u.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,m=typeof h?.device_id=="string"?h.device_id:null;return!p||!m?null:{token:p,deviceId:m,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function q2(t){const{deviceToken:e,insforgeBaseUrl:n,drain:a}=t,r={deviceToken:e};a===!0&&(r.drain=!0);const s=n||Yr();J0(s)&&(r.insforgeBaseUrl=s.trim());const l=await Xd(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function K2(t){const e=await t();if(!e)return null;const n=rC();if(n&&!v$(n))return n;const a=await y$(e);return a?(uM(a),a):null}async function K5(t,e={}){let n=await t();if(!n)return null;let a=await K2(async()=>n);if(!a)return n;try{return await q2({deviceToken:a.token,insforgeBaseUrl:Yr(),drain:e.drain===!0}),n}catch(r){if(!rC()||(iC(),n=await t(),!n)||(a=await K2(async()=>n),!a))throw r;return await q2({deviceToken:a.token,insforgeBaseUrl:Yr(),drain:e.drain===!0}),n}}async function b$(t){const e=hM();if(Date.now()-e<m$)return;const n=await K5(t);n&&(sC(Date.now()),await q5(n,"cloud-sync-auto"))}async function EY(t){const e=await K5(t,{drain:!0});e&&(sC(Date.now()),await q5(e,"cloud-sync-now"))}function k$(t){const e=t.replace(/\/+$/,"")||"/";return e==="/share"||e==="/share.html"||e.startsWith("/share/")}function w$(t){const e=t.replace(/\/+$/,"")||"/";return e==="/login"||e==="/landing"||k$(e)?!1:e==="/"||e==="/dashboard"||e.startsWith("/leaderboard")}function x$(){const t=_a(),e=bo(),n=k.useRef(!1);k.useEffect(()=>{if(!Tp()||!w$(t.pathname||"/")||!e.enabled||!e.signedIn||e.loading||!Ep())return;let a=!1;const r=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await b$(()=>e.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(r)}},[t.pathname,e.enabled,e.signedIn,e.loading,e.getAccessToken])}function P$(){const t=k.useContext(HC);if(t===null)throw new Error("useTheme must be used within a ThemeProvider");return t}function S$({prefersReducedMotion:t,screenshotCapture:e}){return!(e||t)}function C$(t){if(!t||typeof t!="object")return null;const e=t.user_metadata&&typeof t.user_metadata=="object"?t.user_metadata:{},n=t.profile&&typeof t.profile=="object"?t.profile:{},a=e.avatar_url||e.picture||n.avatar_url||t.avatar_url;return typeof a=="string"&&a.trim()?a.trim():null}function T$(t){return t?Lf()?`/api/avatar-proxy?url=${encodeURIComponent(t)}`:t:null}function Ch(t){const e=String(t||"").trim();if(!e)return"?";const n=e.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function Y2({className:t,variant:e="header",collapsed:n=!1,onAfterAction:a}){eu();const r=e==="sidebar",{enabled:s,loading:l,signedIn:c,user:u,displayName:h}=bo(),{openLoginModal:p}=GC(),m=Bl(),v=k.useMemo(()=>C$(u),[u]),y=k.useMemo(()=>T$(v),[v]),[b,x]=Sl.useState(!1);if(Sl.useEffect(()=>{x(!1)},[y]),!s)return null;if(l)return R.jsx("div",{className:$t("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",t),"aria-hidden":!0});if(!c)return r?R.jsxs("button",{type:"button",onClick:()=>{p(),a?.()},className:$t("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",t),"aria-label":xe("header.auth.sign_in_aria"),title:n?xe("header.auth.sign_in_aria"):void 0,children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&R.jsx("span",{className:"truncate flex-1 text-left",children:xe("header.auth.sign_in_aria")})]}):R.jsx("button",{type:"button",onClick:p,className:$t("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",t),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const P=()=>{m("/settings"),a?.()};return R.jsx("div",{className:$t(r?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",t),children:R.jsxs("button",{type:"button",onClick:P,className:$t(r?$t("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":xe("header.auth.open_settings"),title:r&&n?h:void 0,children:[r?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:y&&!b?R.jsx("img",{src:y,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Ch(h)==="?"?R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Ch(h)})}):y&&!b?R.jsx("img",{src:y,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Ch(h)==="?"?R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Ch(h)}),r?!n&&R.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:h}):R.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const U_="tt.sidebarCollapsed";function Y5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:EN,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:DN,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:rO,label:xe("nav.leaderboard")},{id:"achievements",to:"/achievements",icon:CN,label:xe("nav.achievements")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:ON,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:WN,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:qN,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:MN,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:QN,label:xe("nav.settings")}]}]}function E$(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(U_)==="1"}catch{return!1}}function A$(){const[t,e]=k.useState(E$),n=k.useCallback(()=>{e(a=>{const r=!a;try{typeof window<"u"&&window.localStorage.setItem(U_,r?"1":"0")}catch{}return r})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=r=>{r.key===U_&&e(r.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:t,toggle:n}}function R$(t,e){const n=t.replace(/\/+$/,"")||"/";return e==="/dashboard"?n==="/dashboard"||n==="/":e==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===e}function L$({label:t,collapsed:e,first:n}){return e?n?null:R.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):R.jsx("div",{className:$t("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:t})}function D$({item:t,collapsed:e,active:n,onClick:a}){const r=t.icon;return R.jsxs(Pf,{to:t.to,onClick:a,title:e?t.label:void 0,"aria-current":n?"page":void 0,className:$t("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",e&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx(r,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!e&&R.jsx("span",{className:"truncate",children:t.label})]})}function I$({as:t="button",title:e,onClick:n,href:a,children:r,className:s,...l}){const c=$t("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return t==="a"?R.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:e,"aria-label":e,className:c,...l,children:r}):R.jsx("button",{type:"button",title:e,"aria-label":e,onClick:n,className:c,...l,children:r})}function M$({repo:t="mm7894215/TokenTracker",glassChrome:e=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;S$({prefersReducedMotion:r,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${t}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[t]),R.jsxs("a",{href:`https://github.com/${t}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:$t("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",e?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[R.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:R.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),R.jsx("span",{children:"Star"}),n!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const N$=[{value:"light",label:"Light",Icon:VC},{value:"dark",label:"Dark",Icon:$C},{value:"system",label:"System",Icon:$N}];function O$({theme:t,resolvedTheme:e,onSetTheme:n,glassChrome:a=!1}){const[r,s]=k.useState(!1),l=k.useRef(null),c=e==="dark"?$C:VC;return k.useEffect(()=>{if(!r)return;const u=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",h)}},[r]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":r,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(u=>!u),className:$t("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",a?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:R.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),r&&R.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:N$.map(({value:u,label:h,Icon:p})=>{const m=t===u;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(u),s(!1)},className:$t("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",m?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[R.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),R.jsx("span",{children:h})]},u)})})]})}function Z5({collapsed:t,onToggleCollapsed:e,onItemClick:n,showCloseButton:a=!1,onClose:r,glassChrome:s=!1}){const c=_a()?.pathname||"/",{theme:u,resolvedTheme:h,setTheme:p}=P$(),{resolvedLocale:m}=eu(),v=k.useMemo(()=>Y5(),[m]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:$t("px-2 pt-2 pb-2",t&&"flex justify-center"),children:a?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(Y2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("button",{type:"button",onClick:r,"aria-label":xe("nav.close_menu"),title:xe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:R.jsx(v0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(Y2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((y,b)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(L$,{label:y.label,collapsed:t,first:b===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:y.items.filter(x=>!(x.to==="/widgets"&&Df())).map(x=>R.jsx(D$,{item:x,collapsed:t,active:R$(c,x.to),onClick:n},x.id))})]},y.id))}),R.jsxs("div",{className:$t("flex items-center px-2 py-3",t?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(O$,{theme:u,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!t&&R.jsx(M$,{glassChrome:s})})]})]})}function j$({collapsed:t,onToggleCollapsed:e}){const n=k.useMemo(()=>typeof window>"u"?!1:Ga()||Lf(),[]);return R.jsx("aside",{"data-native-sidebar":!0,"aria-label":xe("nav.aside_label"),className:$t("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",t?"w-[72px]":"w-[220px]"),children:R.jsx(Z5,{collapsed:t,onToggleCollapsed:e,glassChrome:n})})}function z$({open:t,onClose:e}){return k.useEffect(()=>{if(!t)return;const n=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,e]),k.useEffect(()=>{if(!t)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[t]),t?R.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[R.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:e,"aria-hidden":!0}),R.jsx("aside",{"aria-label":xe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:R.jsx(Z5,{collapsed:!1,showCloseButton:!0,onClose:e,onItemClick:e})})]}):null}function F$({onOpenDrawer:t}){return R.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[R.jsx(I$,{title:xe("nav.menu"),onClick:t,children:R.jsx(UN,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(Pf,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),R.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),R.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function U$({children:t}){const{collapsed:e,toggle:n}=A$(),[a,r]=k.useState(!1),s=k.useCallback(()=>r(!0),[]),l=k.useCallback(()=>r(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:Ga()||Lf(),[]);return R.jsxs("div",{className:$t("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Df()&&"tt-native-glass-shell",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&R.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),R.jsxs("div",{className:"flex-1 min-h-0 flex",children:[R.jsx(j$,{collapsed:e,onToggleCollapsed:n}),R.jsx(z$,{open:a,onClose:l}),R.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:R.jsxs("div",{className:$t("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[R.jsx(F$,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:t})]})})]})]})}function B$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function Z2({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,children:R.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function $$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function V$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function H$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function W$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function G$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function q$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:[R.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),R.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function K$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function J2({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 60",fill:"none",className:e,"aria-hidden":"true",children:[R.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),R.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:R.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),R.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:R.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function Y$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,children:[R.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),R.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),R.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function Z$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",className:e,children:R.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function J$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:e,children:R.jsx("path",{d:"M23.955 13.587l-1.342-4.135-2.664-8.189c-.135-.423-.73-.423-.867 0L16.418 9.45H7.582L4.919 1.263c-.135-.423-.73-.423-.867 0L1.388 9.452.045 13.587a.924.924 0 0 0 .331 1.03L12 23.054l11.625-8.436a.92.92 0 0 0 .33-1.031"})})}function X$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:R.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:R.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function Q$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),R.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),R.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),R.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function eV({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function tV({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[R.jsx("path",{d:"M9 3v2"}),R.jsx("path",{d:"M15 3v2"}),R.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),R.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("path",{d:"M9 16h6"})]})}function nV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"})})}function aV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M20.113 5.5l-.442 1.557a.157.157 0 01-.196.106l-7.414-2.157a.16.16 0 00-.143.028l-7.342 5.74a.159.159 0 01-.074.032l-4.37.656a.154.154 0 00-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002 3.75-1.953a.16.16 0 01.164.01l2.657 1.847a.152.152 0 01.066.125l-.023 2.45c0 .032.01.063.028.089l3.737 5.227c.03.04.077.065.129.065h1.182a.153.153 0 00.14-.224l-2.664-4.919a.15.15 0 01.005-.152l1.389-2.169a.156.156 0 01.062-.055l4.965-2.456a.16.16 0 01.158.01l1.418.921a.16.16 0 00.087.026h1.289c.125 0 .2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z"})})}function rV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"})})}function iV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"})})}function sV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z"})})}function oV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:e,children:R.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}const lV={CLAUDE:B$,ZCODE:nV,CODEBUDDY:J2,WORKBUDDY:J2,CODEX:Z2,COPILOT:K$,CRAFT:X$,CURSOR:$$,DEEPSEEK:oV,DROID:tV,"EVERY-CODE":Z2,GEMINI:V$,GITHUB:Z$,GITLAB:J$,GOOSE:rV,GROK:H$,HERMES:Y$,KIMI:q$,KIRO:W$,KILOCODE:iV,OPENCODE:G$,OMP:Q$,PI:eV,ROOCODE:aV,ZED:sV},cV={ANTIGRAVITY:"/brand-logos/antigravity.svg",ANYTHINGLLM:"/brand-logos/anythingllm.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",DEEPSEEK:"/brand-logos/deepseek.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",MIMO:"/brand-logos/mimo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"},dV={ANYTHINGLLM:"brightness-0 dark:brightness-100"};function uV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function hV({provider:t,size:e=16,color:n,className:a=""}){const r=t?.toUpperCase?.()||"",s=cV[r];if(s){const c=`${dV[r]||""} ${a}`.trim();return R.jsx("img",{src:s,alt:"",width:e,height:e,className:c,style:{width:e,height:e,objectFit:"contain"},"aria-hidden":!0})}const l=lV[r];return l?R.jsx(l,{size:e,className:a}):R.jsx(uV,{size:e,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const J5="tokentracker-skills";async function wo(t){const e=new URL(`/functions/${J5}`,window.location.origin);if(t)for(const[r,s]of Object.entries(t))s!=null&&s!==""&&e.searchParams.set(r,String(s));const n=await fetch(e.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function ys(t){const e=await Xd(),n=await fetch(`/functions/${J5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e},cache:"no-store",body:JSON.stringify(t)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function pV(){return wo({mode:"installed"})}function AY(t={}){return wo({mode:"discover",...t.force?{force:1}:{}})}function RY(t,e=0,n=20){return wo({mode:"search",q:t,offset:e,limit:n})}function LY(){return wo({mode:"repos"})}function DY(t,e){return ys({action:"install",skill:t,targets:e})}function IY(t){return ys({action:"uninstall",id:t})}function MY(t){return ys({action:"restore",id:t})}function NY(t,e){return ys({action:"set_targets",id:t,targets:e})}function OY(t,e){return ys({action:"import_local",directory:t,targets:e})}function jY(t,e){return ys({action:"delete_local",directory:t,targets:e||[]})}function zY(t){return ys({action:"add_repo",repo:t})}function FY(t,e){return ys({action:"remove_repo",owner:t,name:e})}function UY(t={}){return wo({mode:"popular",...t.force?{force:1}:{}})}function BY(t={}){return wo({mode:"updates",...t.force?{force:1}:{}})}function $Y(t={}){return wo({mode:"skill_usage",...t.force?{force:1}:{}})}const fV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function mV(){const t=Bl(),e=cB(),[n,a]=k.useState(!1),[r,s]=k.useState(""),[l,c]=k.useState(0),[u,h]=k.useState([]),p=k.useRef(null),m=k.useRef(null);k.useEffect(()=>{const E=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),a(B=>!B))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),k.useEffect(()=>{if(!n)return;s(""),c(0);const E=requestAnimationFrame(()=>p.current?.focus());return fV&&!u.length&&pV().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(E)},[n,u.length]);const v=k.useMemo(()=>{const E=Y5().flatMap(I=>I.items.map(B=>({kind:"page",id:`page:${B.id}`,label:B.label,sub:xe("cmdk.group.pages"),Icon:B.icon,run:()=>t(B.to)}))),A=(u||[]).map(I=>({kind:"skill",id:`skill:${I.id||I.directory}`,label:I.name||I.directory,sub:I.repoOwner&&I.repoName?`${I.repoOwner}/${I.repoName}`:xe("cmdk.group.skills"),provider:(I.targets||[])[0]||"claude",run:()=>t(`/skills?skill=${encodeURIComponent(I.directory||I.id)}`)}));return[...E,...A]},[t,u]),y=k.useMemo(()=>{const E=r.trim().toLowerCase();return E?v.filter(A=>A.label.toLowerCase().includes(E)||String(A.sub||"").toLowerCase().includes(E)):v},[v,r]);k.useEffect(()=>{l>=y.length&&c(y.length?y.length-1:0)},[l,y.length]),k.useEffect(()=>{if(!n)return;m.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const b=k.useCallback(()=>a(!1),[]),x=k.useCallback(E=>{E&&(b(),E.run())},[b]),P=E=>{E.key==="ArrowDown"?(E.preventDefault(),c(A=>Math.min(A+1,Math.max(0,y.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),c(A=>Math.max(A-1,0))):E.key==="Enter"?(E.preventDefault(),x(y[l])):E.key==="Escape"&&(E.preventDefault(),b())},T={duration:e?0:.12},L=e?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(_5,{children:n?R.jsxs(yd.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:e?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:T,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:b,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(yd.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:e?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:e?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:L,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[R.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[R.jsx(JN,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:r,onChange:E=>{s(E.target.value),c(0)},onKeyDown:P,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":y[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:xe("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),R.jsx("div",{ref:m,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:y.length===0?R.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:xe("cmdk.empty")}):y.map((E,A)=>{const I=A===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":I,onMouseMove:()=>c(A),onClick:()=>x(E),className:$t("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",I?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:E.kind==="skill"?R.jsx(hV,{provider:E.provider,size:16}):R.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),I?R.jsx(RN,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}const gV=[];function X0(t){k.useEffect(t,gV)}const X2={};function Zl(t,e){const n=k.useRef(X2);return n.current===X2&&(n.current=t(e)),n}const vV=()=>{},Ka=typeof document<"u"?k.useLayoutEffect:vV;function _V(t,e){return function(a,...r){const s=new URL(t);return s.searchParams.set("code",a.toString()),r.forEach(l=>s.searchParams.append("args[]",l)),`${e} error #${a}; visit ${s} for the full message.`}}const Jl=_V("https://base-ui.com/production-error","Base UI"),Q0=k.createContext(void 0);function eb(){const t=k.useContext(Q0);if(!t)throw new Error(Jl(73));return t}const fr=(t,e,n,a,r,s,...l)=>{if(l.length>0)throw new Error(Jl(1));let c;if(t&&e&&n&&a&&r&&s)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m),x=a(u,h,p,m),P=r(u,h,p,m);return s(v,y,b,x,P,h,p,m)};else if(t&&e&&n&&a&&r)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m),x=a(u,h,p,m);return r(v,y,b,x,h,p,m)};else if(t&&e&&n&&a)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m);return a(v,y,b,h,p,m)};else if(t&&e&&n)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m);return n(v,y,h,p,m)};else if(t&&e)c=(u,h,p,m)=>{const v=t(u,h,p,m);return e(v,h,p,m)};else if(t)c=t;else throw new Error("Missing arguments");return c};var ov={exports:{}},lv={};var Q2;function yV(){if(Q2)return lv;Q2=1;var t=Gd();function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:e,a=t.useState,r=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function c(m,v){var y=v(),b=a({inst:{value:y,getSnapshot:v}}),x=b[0].inst,P=b[1];return s(function(){x.value=y,x.getSnapshot=v,u(x)&&P({inst:x})},[m,y,v]),r(function(){return u(x)&&P({inst:x}),m(function(){u(x)&&P({inst:x})})},[m]),l(y),y}function u(m){var v=m.getSnapshot;m=m.value;try{var y=v();return!n(m,y)}catch{return!0}}function h(m,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return lv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,lv}var eP;function X5(){return eP||(eP=1,ov.exports=yV()),ov.exports}var bV=X5(),cv={exports:{}},dv={};var tP;function kV(){if(tP)return dv;tP=1;var t=Gd(),e=X5();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var a=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,s=t.useRef,l=t.useEffect,c=t.useMemo,u=t.useDebugValue;return dv.useSyncExternalStoreWithSelector=function(h,p,m,v,y){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=c(function(){function T(B){if(!L){if(L=!0,E=B,B=v(B),y!==void 0&&x.hasValue){var D=x.value;if(y(D,B))return A=D}return A=B}if(D=A,a(E,B))return D;var S=v(B);return y!==void 0&&y(D,S)?(E=B,D):(E=B,A=S)}var L=!1,E,A,I=m===void 0?null:m;return[function(){return T(p())},I===null?void 0:function(){return T(I())}]},[p,m,v,y]);var P=r(h,b[0],b[1]);return l(function(){x.hasValue=!0,x.value=P},[P]),u(P),P},dv}var nP;function wV(){return nP||(nP=1,cv.exports=kV()),cv.exports}var xV=wV();const PV=parseInt(k.version,10);function tb(t){return PV>=t}const SV=tb(19),CV=SV?EV:AV;function Q5(t,e,n,a,r){return CV(t,e,n,a,r)}function TV(t,e,n,a,r){const s=k.useCallback(()=>e(t.getSnapshot(),n,a,r),[t,e,n,a,r]);return bV.useSyncExternalStore(t.subscribe,s,s)}function EV(t,e,n,a,r){return TV(t,e,n,a,r)}function AV(t,e,n,a,r){return xV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,s=>e(s,n,a,r))}class RV{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const n=this.updateTick;for(const a of this.listeners){if(n!==this.updateTick)return;a(e)}}update(e){for(const n in e)if(!Object.is(this.state[n],e[n])){this.setState({...this.state,...e});return}}set(e,n){Object.is(this.state[e],n)||this.setState({...this.state,[e]:n})}notifyAll(){const e={...this.state};this.setState(e)}use(e,n,a,r){return Q5(this,e,n,a,r)}}const nb={...TS},uv=nb.useInsertionEffect,LV=uv&&uv!==nb.useLayoutEffect?uv:t=>t();function mo(t){const e=Zl(DV).current;return e.next=t,LV(e.effect),e.trampoline}function DV(){const t={next:void 0,callback:IV,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function IV(){}function MV(){}const VY=Object.freeze([]),eo=Object.freeze({});class NV extends RV{constructor(e,n={},a){super(e),this.context=n,this.selectors=a}useSyncedValue(e,n){k.useDebugValue(e);const a=this;Ka(()=>{a.state[e]!==n&&a.set(e,n)},[a,e,n])}useSyncedValueWithCleanup(e,n){const a=this;Ka(()=>(a.state[e]!==n&&a.set(e,n),()=>{a.set(e,void 0)}),[a,e,n])}useSyncedValues(e){const n=this,a=Object.values(e);Ka(()=>{n.update(e)},[n,...a])}useControlledProp(e,n){k.useDebugValue(e);const a=this,r=n!==void 0;Ka(()=>{r&&!Object.is(a.state[e],n)&&a.setState({...a.state,[e]:n})},[a,e,n,r])}select(e,n,a,r){const s=this.selectors[e];return s(this.state,n,a,r)}useState(e,n,a,r){return k.useDebugValue(e),Q5(this,this.selectors[e],n,a,r)}useContextCallback(e,n){k.useDebugValue(e);const a=mo(n??MV);this.context[e]=a}useStateSetter(e){const n=k.useRef(void 0);return n.current===void 0&&(n.current=a=>{this.set(e,a)}),n.current}observe(e,n){let a;typeof e=="function"?a=e:a=this.selectors[e];let r=a(this.state);return n(r,r,this),this.subscribe(s=>{const l=a(s);if(!Object.is(r,l)){const c=r;r=l,n(l,c,this)}})}}function Ff(){return typeof window<"u"}function wr(t){return ab(t)?(t.nodeName||"").toLowerCase():"#document"}function Ei(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function OV(t){var e;return(e=(ab(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ab(t){return Ff()?t instanceof Node||t instanceof Ei(t).Node:!1}function rb(t){return Ff()?t instanceof Element||t instanceof Ei(t).Element:!1}function fs(t){return Ff()?t instanceof HTMLElement||t instanceof Ei(t).HTMLElement:!1}function Kp(t){return!Ff()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ei(t).ShadowRoot}function e4(t){const{overflow:e,overflowX:n,overflowY:a,display:r}=Uf(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&r!=="inline"&&r!=="contents"}function HY(t){return/^(table|td|th)$/.test(wr(t))}function jV(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const zV=/transform|translate|scale|rotate|perspective|filter/,FV=/paint|layout|strict|content/,js=t=>!!t&&t!=="none";let hv;function UV(t){const e=rb(t)?Uf(t):t;return js(e.transform)||js(e.translate)||js(e.scale)||js(e.rotate)||js(e.perspective)||!BV()&&(js(e.backdropFilter)||js(e.filter))||zV.test(e.willChange||"")||FV.test(e.contain||"")}function WY(t){let e=B_(t);for(;fs(e)&&!t4(e);){if(UV(e))return e;if(jV(e))return null;e=B_(e)}return null}function BV(){return hv==null&&(hv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hv}function t4(t){return/^(html|body|#document)$/.test(wr(t))}function Uf(t){return Ei(t).getComputedStyle(t)}function GY(t){return rb(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B_(t){if(wr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kp(t)&&t.host||OV(t);return Kp(e)?e.host:e}function n4(t){const e=B_(t);return t4(e)?t.ownerDocument?t.ownerDocument.body:t.body:fs(e)&&e4(e)?e:n4(e)}function aP(t,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=n4(t),s=r===((a=t.ownerDocument)==null?void 0:a.body),l=Ei(r);if(s){const c=$V(l);return e.concat(l,l.visualViewport||[],e4(r)?r:[],c&&n?aP(c):[])}else return e.concat(r,aP(r,[],n))}function $V(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function a4(...t){return()=>{for(let e=0;e<t.length;e+=1){const n=t[e];n&&n()}}}function br(t){return t?.ownerDocument||document}function to(t,e,n,a){return t.addEventListener(e,n,a),()=>{t.removeEventListener(e,n,a)}}const Th=null;class VV{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let r=0;r<n.length;r+=1)n[r]?.(e)};request(e){const n=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(e){const n=e-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Eh=new VV;class ib{static create(){return new ib}static request(e){return Eh.request(e)}static cancel(e){return Eh.cancel(e)}currentId=Th;request(e){this.cancel(),this.currentId=Eh.request(()=>{this.currentId=Th,e()})}cancel=()=>{this.currentId!==Th&&(Eh.cancel(this.currentId),this.currentId=Th)};disposeEffect=()=>this.cancel}function HV(){const t=Zl(ib.create).current;return X0(t.disposeEffect),t}const Bc=0;class jd{static create(){return new jd}currentId=Bc;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Bc,n()},e)}isStarted(){return this.currentId!==Bc}clear=()=>{this.currentId!==Bc&&(clearTimeout(this.currentId),this.currentId=Bc)};disposeEffect=()=>this.clear}function WV(){const t=Zl(jd.create).current;return X0(t.disposeEffect),t}let rP=0;function r4(t){return rP+=1,`${t}-${Math.random().toString(36).slice(2,6)}-${rP}`}function pv(t,e){if(typeof t=="string")return{description:t};if(typeof t=="function"){const n=t(e);return typeof n=="string"?{description:n}:n}return t}function GV(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:qV,platform:KV,maxTouchPoints:YV}=GV(),Bf=qV.toLowerCase(),zd=KV.toLowerCase(),i4=/^i(os$|p)/.test(zd)||zd==="macintel"&&YV>1,iP="android",qY=zd===iP||Bf.includes(iP),ZV=!i4&&zd.startsWith("mac");zd.startsWith("win");const JV=ZV||i4,sb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!sb&&Bf.includes("firefox");!sb&&Bf.includes("chrom");const XV=JV,QV=/jsdom|happydom/.test(Bf),sP="data-base-ui-focusable",s4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",KY="ArrowLeft",YY="ArrowRight",ZY="ArrowUp",JY="ArrowDown";function wl(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Ai(t,e){if(!t||!e)return!1;const n=e.getRootNode?.();if(t.contains(e))return!0;if(n&&Kp(n)){let a=e;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function no(t){return"composedPath"in t?t.composedPath()[0]:t.target}function XY(t,e){if(!rb(t))return!1;const n=t;if(e.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,a]of e.entries())if(Ai(a,n))return!a.hasAttribute("data-trigger-disabled");return!1}function QY(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function eZ(t){return t.matches("html,body")}function eH(t){return fs(t)&&t.matches(s4)}function tZ(t){return t?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${s4}`)!=null}function nZ(t){return t?t.getAttribute("role")==="combobox"&&eH(t):!1}function $_(t){if(!t||QV)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function aZ(t){return t?t.hasAttribute(sP)?t:t.querySelector(`[${sP}]`)||t:null}function rZ(t,e){return e<0||e>=t.length}function iZ(t,e){return o4(t.current,{disabledIndices:e})}function sZ(t,e){return o4(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function o4(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:a,amount:r=1}={}){let s=e;do s+=n?-r:r;while(s>=0&&s<=t.length-1&&tH(t,s,a));return s}function tH(t,e,n){if(typeof n=="function"?n(e):n?.includes(e)??!1)return!0;const r=t[e];return r?l4(r)?!n&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!0:!1}function nH(t){return t.visibility==="hidden"||t.visibility==="collapse"}function l4(t,e=t?Uf(t):null){return!t||!t.isConnected||!e||nH(e)?!1:typeof t.checkVisibility=="function"?t.checkVisibility():e.display!=="none"&&e.display!=="contents"}const aH='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function rH(t){const e=t.assignedSlot;if(e)return e;if(t.parentElement)return t.parentElement;const n=t.getRootNode();return Kp(n)?n.host:null}function V_(t){for(const e of Array.from(t.children))if(wr(e)==="summary")return e;return null}function iH(t,e){const n=V_(e);return!!n&&(t===n||Ai(n,t))}function c4(t){const e=t?wr(t):"";return t!=null&&t.matches(aH)&&(e!=="summary"||t.parentElement!=null&&wr(t.parentElement)==="details"&&V_(t.parentElement)===t)&&(e!=="details"||V_(t)==null)&&(e!=="input"||t.type!=="hidden")}function d4(t){if(!c4(t)||!t.isConnected||t.matches(":disabled"))return!1;for(let e=t;e;e=rH(e)){const n=e!==t,a=wr(e)==="slot";if(e.hasAttribute("inert")||n&&wr(e)==="details"&&!e.open&&!iH(t,e)||e.hasAttribute("hidden")||!a&&!sH(e,n))return!1}return!0}function sH(t,e){const n=Uf(t);return e?n.display!=="none":l4(t,n)}function u4(t){const e=t.tabIndex;if(e<0){const n=wr(t);if(n==="details"||n==="audio"||n==="video"||fs(t)&&t.isContentEditable)return 0}return e}function fv(t){if(wr(t)!=="input")return null;const e=t;return e.type==="radio"&&e.name!==""?e:null}function oH(t,e){const n=fv(t);if(!n)return!0;const a=e.find(r=>{const s=fv(r);return s?.name===n.name&&s.form===n.form&&s.checked});return a?a===n:e.find(r=>{const s=fv(r);return s?.name===n.name&&s.form===n.form})===n}function h4(t){if(fs(t)&&wr(t)==="slot"){const e=t.assignedElements({flatten:!0});if(e.length>0)return e}return fs(t)&&t.shadowRoot?Array.from(t.shadowRoot.children):Array.from(t.children)}function p4(t,e){h4(t).forEach(n=>{c4(n)&&e.push(n),p4(n,e)})}function f4(t,e,n){h4(t).forEach(a=>{fs(a)&&a.matches(e)&&n.push(a),f4(a,e,n)})}function oZ(t){return d4(t)&&u4(t)>=0}function lH(t){const e=[];return p4(t,e),e.filter(d4)}function ob(t){const e=lH(t);return e.filter(n=>u4(n)>=0&&oH(n,e))}function m4(t,e){const n=ob(t),a=n.length;if(a===0)return;const r=wl(br(t)),s=n.indexOf(r),l=s===-1?e===1?0:a-1:s+e;return n[l]}function cH(t){return m4(br(t).body,1)||t}function dH(t){return m4(br(t).body,-1)||t}function g4(t,e){if(!t)return null;const n=ob(br(t).body),a=n.length;if(a===0)return null;const r=n.indexOf(t);if(r===-1)return null;const s=(r+e+a)%a;return n[s]}function lZ(t){return g4(t,1)}function cZ(t){return g4(t,-1)}function mv(t,e){const n=e||t.currentTarget,a=t.relatedTarget;return!a||!Ai(n,a)}function uH(t){ob(t).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oP(t){const e=[];f4(t,"[data-tabindex]",e),e.forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}function Ah(t){const e=new Map;let n=0,a=0;return t.forEach((r,s)=>{const l=r.transitionStatus==="ending";e.set(r.id,{value:r,domIndex:s,visibleIndex:l?-1:n,offsetY:a}),a+=r.height||0,l||(n+=1)}),e}function gv(t,e){let n=0;return t.map(a=>{if(a.transitionStatus==="ending")return a;const r=n>=e;return n+=1,a.limited===r?a:{...a,limited:r}})}const Rh=t=>t.toastMetadata,Ir={toasts:fr(t=>t.toasts),isEmpty:fr(t=>t.toasts.length===0),toast:fr(Rh,(t,e)=>t.get(e)?.value),toastIndex:fr(Rh,(t,e)=>t.get(e)?.domIndex??-1),toastOffsetY:fr(Rh,(t,e)=>t.get(e)?.offsetY??0),toastVisibleIndex:fr(Rh,(t,e)=>t.get(e)?.visibleIndex??-1),hovering:fr(t=>t.hovering),focused:fr(t=>t.focused),expanded:fr(t=>t.hovering||t.focused),expandedOrOutOfFocus:fr(t=>t.hovering||t.focused||!t.isWindowFocused),prevFocusElement:fr(t=>t.prevFocusElement)};class hH extends NV{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ah(e.toasts)},{},Ir)}setFocused(e){this.set("focused",e)}setHovering(e){this.set("hovering",e)}setIsWindowFocused(e){this.set("isWindowFocused",e)}setPrevFocusElement(e){this.set("prevFocusElement",e)}setViewport=e=>{this.set("viewport",e)};syncProviderProps(e){const n=this.state.limit!==e.limit;if(this.state.timeout===e.timeout&&!n)return;const a={timeout:e.timeout,limit:e.limit};if(n){const r=gv(this.state.toasts,e.limit);a.toasts=r,a.toastMetadata=Ah(r)}this.update(a)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,n={}){const a=Ir.toastIndex(this.state,e);if(a===-1)return;const r=this.state.toasts[a];n.skipOnRemove||r?.onRemove?.();const s=[...this.state.toasts];s.splice(a,1),this.setToasts(s)}addToast=e=>{const{timeout:n,limit:a}=this.state,r=e.id||r4("toast");if(e.id){const u=Ir.toast(this.state,e.id);if(u)if(u.transitionStatus==="ending")this.removeToast(e.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...m}=e;return this.updateToastInternal(e.id,m,{resetTimer:!0,markUpdated:!0}),e.id}}const s={...e,id:r,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(gv(l,a));const c=s.timeout??n;return s.type!=="loading"&&c>0&&this.scheduleTimer(r,c,()=>this.closeToast(r)),Ir.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,n)=>{this.updateToastInternal(e,n,{markUpdated:!0})};updateToastInternal=(e,n,a={})=>{const{timeout:r,toasts:s}=this.state,l=Ir.toast(this.state,e)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...n,...a.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===e?c:x));const u=c.timeout??r,h=l?.timeout??r,p=Object.hasOwn(n,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,v=this.timers.has(e),y=h!==u,b=l?.type==="loading";if(!m&&v){this.clearTimer(e);return}m&&(!v||y||p||b||a.resetTimer)&&(this.clearTimer(e),this.scheduleTimer(e,u,()=>this.closeToast(e)),Ir.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{const n=e===void 0,{limit:a,toasts:r}=this.state;let s;if(n)s=r,this.clearTimers();else{const p=Ir.toast(this.state,e);if(!p)return;s=[p],this.clearTimer(e)}const l=r.map(p=>n||p.id===e?{...p,transitionStatus:"ending",height:0}:p),c=gv(l,a),u={toasts:c,toastMetadata:Ah(c)};c.some(p=>p.transitionStatus!=="ending")||(u.hovering=!1,u.focused=!1),this.update(u),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,n)=>{const a=pv(n.loading),r=this.addToast({...a,type:"loading"}),s=e.then(l=>{const c=pv(n.success,l);return this.updateToast(r,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=pv(n.error,l);return this.updateToast(r,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();const n=Date.now()-e.start,a=e.delay-n;e.remaining=a>0?a:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,n)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=jd.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(n),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!=="touch")return;const n=no(e);Ai(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,n,a){const r=Date.now(),s=!Ir.expandedOrOutOfFocus(this.state),l=s?jd.create():void 0;l?.start(n,()=>{this.handleTimerFired(e),a()}),this.timers.set(e,{timeout:l,start:s?r:0,delay:n,remaining:n,callback:a})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e){const n={toasts:e,toastMetadata:Ah(e)};e.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){const n=wl(br(this.state.viewport));if(!this.state.viewport||!Ai(this.state.viewport,n)||!$_(n))return;if(e===void 0){this.restoreFocusToPrevElement();return}const a=Ir.toasts(this.state),r=Ir.toastIndex(this.state,e);let s=null,l=r+1;for(;l<a.length;){if(a[l].transitionStatus!=="ending"){s=a[l];break}l+=1}if(!s)for(l=r-1;l>=0;){if(a[l].transitionStatus!=="ending"){s=a[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const pH=function(e){const{children:n,timeout:a=5e3,limit:r=3,toastManager:s}=e,l=Zl(()=>new hH({timeout:a,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return X0(l.disposeEffect),k.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const m=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&m?l.updateToast(m,p):h==="close"?l.closeToast(m):l.addToast(p)}):void 0},[l,s]),Ka(()=>{l.syncProviderProps({timeout:a,limit:r})},[l,a,r]),R.jsx(Q0.Provider,{value:l,children:n})},v4={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},_4={...v4,position:"fixed",top:0,left:0},dZ={...v4,position:"absolute"},bd=k.forwardRef(function(e,n){const[a,r]=k.useState();Ka(()=>{XV&&sb&&r("button")},[]);const s={tabIndex:0,role:a};return R.jsx("span",{...e,ref:n,style:_4,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})});function lP(t,e,n,a){const r=Zl(y4).current;return mH(r,t,e,n,a)&&b4(r,[t,e,n,a]),r.callback}function fH(t){const e=Zl(y4).current;return gH(e,t)&&b4(e,t),e.callback}function y4(){return{callback:null,cleanup:null,refs:[]}}function mH(t,e,n,a,r){return t.refs[0]!==e||t.refs[1]!==n||t.refs[2]!==a||t.refs[3]!==r}function gH(t,e){return t.refs.length!==e.length||t.refs.some((n,a)=>n!==e[a])}function b4(t,e){if(t.refs=e,e.every(n=>n==null)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),n!=null){const a=Array(e.length).fill(null);for(let r=0;r<e.length;r+=1){const s=e[r];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[r]=l);break}case"object":{s.current=n;break}}}t.cleanup=()=>{for(let r=0;r<e.length;r+=1){const s=e[r];if(s!=null)switch(typeof s){case"function":{const l=a[r];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function cP(t){if(!k.isValidElement(t))return null;const e=t,n=e.props;return(tb(19)?n?.ref:e.ref)??null}function H_(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function vH(t,e){const n={};for(const a in t){const r=t[a];if(e?.hasOwnProperty(a)){const s=e[a](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${a.toLowerCase()}`]="":r&&(n[`data-${a.toLowerCase()}`]=r.toString())}return n}function _H(t,e){return typeof t=="function"?t(e):t}function yH(t,e){return typeof t=="function"?t(e):t}const lb={};function cb(t,e,n,a,r){if(!n&&!a&&!r&&!t)return Yp(e);let s=Yp(t);return e&&(s=rd(s,e)),n&&(s=rd(s,n)),a&&(s=rd(s,a)),r&&(s=rd(s,r)),s}function bH(t){if(t.length===0)return lb;if(t.length===1)return Yp(t[0]);let e=Yp(t[0]);for(let n=1;n<t.length;n+=1)e=rd(e,t[n]);return e}function Yp(t){return db(t)?{...w4(t,lb)}:kH(t)}function rd(t,e){return db(e)?w4(e,t):wH(t,e)}function kH(t){const e={...t};for(const n in e){const a=e[n];k4(n,a)&&(e[n]=x4(a))}return e}function wH(t,e){if(!e)return t;for(const n in e){const a=e[n];switch(n){case"style":{t[n]=H_(t.style,a);break}case"className":{t[n]=P4(t.className,a);break}default:k4(n,a)?t[n]=xH(t[n],a):t[n]=a}}return t}function k4(t,e){const n=t.charCodeAt(0),a=t.charCodeAt(1),r=t.charCodeAt(2);return n===111&&a===110&&r>=65&&r<=90&&(typeof e=="function"||typeof e>"u")}function db(t){return typeof t=="function"}function w4(t,e){return db(t)?t(e):t??lb}function xH(t,e){return e?t?(...n)=>{const a=n[0];if(S4(a)){const s=a;Zp(s);const l=e(...n);return s.baseUIHandlerPrevented||t?.(...n),l}const r=e(...n);return t?.(...n),r}:x4(e):t}function x4(t){return t&&((...e)=>{const n=e[0];return S4(n)&&Zp(n),t(...e)})}function Zp(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function P4(t,e){return e?t?e+" "+t:e:t}function S4(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}function iu(t,e,n={}){const a=e.render,r=PH(e,n);if(n.enabled===!1)return null;const s=n.state??eo;return TH(t,a,r,s)}function PH(t,e={}){const{className:n,style:a,render:r}=t,{state:s=eo,ref:l,props:c,stateAttributesMapping:u,enabled:h=!0}=e,p=h?_H(n,s):void 0,m=h?yH(a,s):void 0,v=h?vH(s,u):eo,y=h&&c?SH(c):void 0,b=h?H_(v,y)??{}:eo;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=fH([b.ref,cP(r),...l]):b.ref=lP(b.ref,cP(r),l):lP(null,null)),h?(p!==void 0&&(b.className=P4(b.className,p)),m!==void 0&&(b.style=H_(b.style,m)),b):eo}function SH(t){return Array.isArray(t)?bH(t):cb(void 0,t)}const CH=Symbol.for("react.lazy");function TH(t,e,n,a){if(e){if(typeof e=="function")return e(n,a);const r=cb(n,e.props);r.ref=n.ref;let s=e;return s?.$$typeof===CH&&(s=k.Children.toArray(e)[0]),k.cloneElement(s,r)}if(t&&typeof t=="string")return EH(t,n);throw new Error(Jl(8))}function EH(t,e){return t==="button"?k.createElement("button",{type:"button",...e,key:e.key}):t==="img"?k.createElement("img",{alt:"",...e,key:e.key}):k.createElement(t,e)}let AH=(function(t){return t.frontmostHeight="--toast-frontmost-height",t})({});const RH=k.forwardRef(function(e,n){const{render:a,className:r,style:s,children:l,...c}=e,u=eb(),h=WV(),p=k.useRef(!1),m=k.useRef(!1),v=k.useRef(!1),y=u.useState("isEmpty"),b=u.useState("toasts"),x=u.useState("focused"),P=u.useState("expanded"),T=u.useState("prevFocusElement"),L=b[0]?.height??0,E=k.useMemo(()=>b.some(H=>H.transitionStatus==="ending"),[b]),A=k.useMemo(()=>b.filter(H=>H.priority==="high"),[b]);k.useEffect(()=>{const H=u.state.viewport;if(!H)return;function Q(N){y||N.key==="F6"&&no(N)!==H&&(N.preventDefault(),u.setPrevFocusElement(wl(br(H))),H?.focus({preventScroll:!0}),u.pauseTimers(),u.setFocused(!0))}const W=Ei(H);return to(W,"keydown",Q)},[u,y]),k.useEffect(()=>{const H=u.state.viewport;if(!H||y)return;const Q=Ei(H);function W(Y){no(Y)===Q&&(u.setIsWindowFocused(!1),u.pauseTimers())}function N(Y){if(Y.relatedTarget)return;const ue=no(Y),ke=wl(br(H));(ue===Q||!Ai(H,ue)||!$_(ke))&&u.resumeTimers(),h.start(0,()=>u.setIsWindowFocused(!0))}return a4(to(Q,"blur",W,!0),to(Q,"focus",N,!0))},[u,h,y]),k.useEffect(()=>{const H=u.state.viewport;if(!H||y)return;const Q=br(H);return to(Q,"pointerdown",u.handleDocumentPointerDown,!0)},[y,u]);function I(H){const Q=u.state.viewport;if(Q)if(p.current=!0,H.relatedTarget===Q){const W=b.find(N=>N.transitionStatus!=="ending"&&!N.limited);W?W.ref?.current?.focus():u.restoreFocusToPrevElement()}else u.restoreFocusToPrevElement()}function B(H){H.key==="Tab"&&H.shiftKey&&no(H.nativeEvent)===u.state.viewport&&(H.preventDefault(),u.restoreFocusToPrevElement(),u.resumeTimers())}function D(){u.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current||!m.current||(u.state.isWindowFocused&&u.resumeTimers(),u.setHovering(!1),m.current=!1)}k.useEffect(D,[E,u]);function S(){u.pauseTimers(),u.setHovering(!0),m.current=!1}function j(){u.state.isWindowFocused&&u.resumeTimers()}function F(){u.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current?m.current=!0:(j(),u.setHovering(!1))}function Z(H){H.pointerType==="touch"&&(v.current=!0)}function ee(H){H.pointerType==="touch"&&(v.current=!1,D())}function de(){if(p.current){p.current=!1;return}x||$_(wl(br(u.state.viewport)))&&(u.setFocused(!0),u.pauseTimers())}function ae(H){!x||Ai(u.state.viewport,H.relatedTarget)||(u.setFocused(!1),j())}const re={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:S,onMouseMove:S,onMouseLeave:F,onFocus:de,onBlur:ae,onKeyDown:B,onClick:de,onPointerDown:Z,onPointerUp:ee,onPointerCancel:ee},te={expanded:P},le=iu("div",e,{ref:[n,u.setViewport],state:te,props:[re,{style:{[AH.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(k.Fragment,{children:[!y&&T&&R.jsx(bd,{onFocus:I}),l,!y&&T&&R.jsx(bd,{onFocus:I})]})}]});return R.jsxs(k.Fragment,{children:[!y&&T&&R.jsx(bd,{onFocus:I}),le,!x&&A.length>0&&R.jsx("div",{style:_4,children:A.map(H=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:H.title}),R.jsx("div",{children:H.description})]},H.id))})]})});function LH(t){return tb(19)?t:t?"true":void 0}const C4=k.createContext(void 0);function T4(){const t=k.useContext(C4);if(!t)throw new Error(Jl(66));return t}let ub=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const DH={[ub.startingStyle]:""},IH={[ub.endingStyle]:""},MH={transitionStatus(t){return t==="starting"?DH:t==="ending"?IH:null}};function NH(t){return t==null?t:"current"in t?t.current:t}function OH(t,e=!1,n=!0){const a=HV();return mo((r,s=null)=>{a.cancel();const l=NH(t);if(l==null)return;const c=l,u=()=>{$l.flushSync(r)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(n){s?.aborted||u();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})}if(e){const p=ub.startingStyle;if(!c.hasAttribute(p)){a.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}a.request(h)})}function jH(t){const{enabled:e=!0,open:n,ref:a,onComplete:r}=t,s=mo(r),l=OH(a,n,!1);k.useEffect(()=>{if(!e)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[e,n,s,l])}let zs=(function(t){return t.index="--toast-index",t.offsetY="--toast-offset-y",t.height="--toast-height",t.swipeMovementX="--toast-swipe-movement-x",t.swipeMovementY="--toast-swipe-movement-y",t})({});const uZ=500,hZ={style:{transition:"none"}},pZ="data-base-ui-click-trigger",zH="data-base-ui-swipe-ignore",FH="data-swipe-ignore",UH=`[${zH}]`,BH=`[${FH}]`,fZ={fallbackAxisSide:"none"},mZ={fallbackAxisSide:"end"},$H={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function dP(t,e,n){switch(t){case"up":return-n;case"down":return n;case"left":return-e;case"right":return e;default:return 0}}function VH(t){const n=Ei(t).getComputedStyle(t).transform;let a=0,r=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(a=c[4],r=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(a=c[12],r=c[13],s=c[0])}}return{x:a,y:r,scale:s}}const HH={...MH,swipeDirection(t){return t?{"data-swipe-direction":t}:null}},$c=40,WH=10,ns=.5,GH=1,qH=`${UH},${BH}`,KH=k.forwardRef(function(e,n){const{toast:a,render:r,className:s,swipeDirection:l=["down","right"],style:c,...u}=e,h=a.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const m=p.length>0,v=eb(),[y,b]=k.useState(void 0),[x,P]=k.useState(!1),[T,L]=k.useState(!1),[E,A]=k.useState(!1),[I,B]=k.useState({x:0,y:0}),[D,S]=k.useState({x:0,y:0,scale:1}),[j,F]=k.useState(),[Z,ee]=k.useState(),[de,ae]=k.useState(null),re=k.useRef(null),te=k.useRef({x:0,y:0}),le=k.useRef({x:0,y:0,scale:1}),H=k.useRef(void 0),Q=k.useRef(0),W=k.useRef(!1),N=k.useRef({x:0,y:0}),Y=k.useRef(!1),ue=k.useRef({x:0,y:0}),ke=k.useRef(null),me=k.useRef(null),_e=v.useState("toastIndex",a.id),Me=v.useState("toastVisibleIndex",a.id),Oe=v.useState("toastOffsetY",a.id),Le=v.useState("focused"),St=v.useState("expanded");jH({open:a.transitionStatus!=="ending",ref:re,onComplete(){a.transitionStatus==="ending"&&v.removeToast(a.id)}});const dn=mo((tt=!1)=>{const et=re.current;if(!et)return;const kt=et.style.height;et.style.height="auto";const nn=et.offsetHeight;et.style.height=kt;function zt(){v.updateToastInternal(a.id,{ref:re,height:nn,...a.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}tt?$l.flushSync(zt):zt()});Ka(dn,[dn]);function jt(tt){ue.current=tt,B(tt)}Ka(()=>()=>{me.current?.abort()},[]);function _t(tt,et){let kt=tt,nn=et;return!p.includes("left")&&!p.includes("right")?kt=tt>0?tt**ns:-(Math.abs(tt)**ns):(!p.includes("right")&&tt>0&&(kt=tt**ns),!p.includes("left")&&tt<0&&(kt=-(Math.abs(tt)**ns))),!p.includes("up")&&!p.includes("down")?nn=et>0?et**ns:-(Math.abs(et)**ns):(!p.includes("down")&&et>0&&(nn=et**ns),!p.includes("up")&&et<0&&(nn=-(Math.abs(et)**ns))),{x:kt,y:nn}}const Zt=mo(tt=>{if(tt.pointerId!==ke.current)return;ke.current=null,me.current?.abort(),me.current=null,P(!1),L(!1),ae(null);const et=le.current;if(tt.type==="pointercancel"||W.current){jt({x:et.x,y:et.y}),b(void 0);return}let kt=!1;const nn=ue.current,zt=nn.x-et.x,At=nn.y-et.y;let xt;for(const ar of p){switch(ar){case"right":zt>$c&&(kt=!0,xt="right");break;case"left":zt<-$c&&(kt=!0,xt="left");break;case"down":At>$c&&(kt=!0,xt="down");break;case"up":At<-$c&&(kt=!0,xt="up");break}if(kt)break}kt?(b(xt),A(!0),v.closeToast(a.id)):(jt({x:et.x,y:et.y}),b(void 0))});function nr(tt){if(tt.button!==0)return;tt.pointerType==="touch"&&v.pauseTimers();const et=no(tt.nativeEvent);if(et?et.closest(`button,a,input,textarea,[role="button"],${qH}`):!1)return;if(W.current=!1,H.current=void 0,Q.current=0,ke.current=tt.pointerId,te.current={x:tt.clientX,y:tt.clientY},N.current=te.current,re.current){const zt=VH(re.current);le.current=zt,S(zt),jt({x:zt.x,y:zt.y})}v.setHovering(!0),P(!0),L(!1),ae(null),Y.current=!0;const nn=re.current;if(nn){me.current?.abort();const zt=new AbortController;me.current=zt;const At=br(nn);At.addEventListener("pointerup",Zt,{signal:zt.signal}),At.addEventListener("pointercancel",Zt,{signal:zt.signal}),nn.setPointerCapture?.(tt.pointerId)}}function Mn(tt){if(tt.pointerId!==ke.current)return;tt.preventDefault(),Y.current&&(te.current={x:tt.clientX,y:tt.clientY},Y.current=!1);const{clientY:et,clientX:kt,movementX:nn,movementY:zt}=tt;(zt<0&&et>N.current.y||zt>0&&et<N.current.y)&&(N.current={x:N.current.x,y:et}),(nn<0&&kt>N.current.x||nn>0&&kt<N.current.x)&&(N.current={x:kt,y:N.current.y});const At=kt-te.current.x,xt=et-te.current.y,ar=et-N.current.y,Xl=kt-N.current.x;if(!T&&Math.sqrt(At*At+xt*xt)>=GH&&(L(!0),de===null)){const rr=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(rr&&bs){const Ri=Math.abs(At),ka=Math.abs(xt);ae(Ri>ka?"horizontal":"vertical")}}let En;if(!H.current)de==="vertical"?xt>0?En="down":xt<0&&(En="up"):de==="horizontal"?At>0?En="right":At<0&&(En="left"):Math.abs(At)>=Math.abs(xt)?En=At>0?"right":"left":En=xt>0?"down":"up",En&&p.includes(En)&&(H.current=En,Q.current=dP(En,At,xt),b(En));else{const Sr=H.current,rr=dP(Sr,Xl,ar);rr>$c?(W.current=!1,b(Sr)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&Q.current-rr>=WH&&(W.current=!0)}const ti=_t(At,xt);let Qn=le.current.x,Pr=le.current.y;de==="horizontal"?(p.includes("left")||p.includes("right"))&&(Qn+=ti.x):(de==="vertical"||(p.includes("left")||p.includes("right"))&&(Qn+=ti.x),(p.includes("up")||p.includes("down"))&&(Pr+=ti.y)),jt({x:Qn,y:Pr})}function Vt(tt){if(tt.key==="Escape"){if(!re.current||!Ai(re.current,wl(br(re.current))))return;v.closeToast(a.id)}}k.useEffect(()=>{if(!m)return;const tt=re.current;if(!tt)return;function et(kt){ke.current===null||!Ai(tt,no(kt))||kt.preventDefault()}return to(tt,"touchmove",et,{passive:!1})},[m]);function Qe(){if(!x&&I.x===D.x&&I.y===D.y&&!E)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const tt=I.x-D.x,et=I.y-D.y;return{transition:x?"none":void 0,transform:x?`translateX(${I.x}px) translateY(${I.y}px) scale(${D.scale})`:void 0,[zs.swipeMovementX]:`${tt}px`,[zs.swipeMovementY]:`${et}px`}}const st=a.priority==="high",Dt={role:st?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Z,"aria-hidden":st&&!Le?!0:void 0,onPointerDown:m?nr:void 0,onPointerMove:m?Mn:void 0,onPointerUp:m?Zt:void 0,onPointerCancel:m?Zt:void 0,onKeyDown:Vt,inert:LH(a.limited),style:{...Qe(),[zs.index]:a.transitionStatus==="ending"?_e:Me,[zs.offsetY]:`${Oe}px`,[zs.height]:a.height?`${a.height}px`:void 0}},Et=k.useMemo(()=>({rootRef:re,toast:a,titleId:j,setTitleId:F,descriptionId:Z,setDescriptionId:ee,swiping:x,swipeDirection:y,recalculateHeight:dn,index:_e,visibleIndex:Me,expanded:St}),[a,j,Z,x,y,dn,_e,Me,St]),Nn={transitionStatus:a.transitionStatus,expanded:St,limited:a.limited||!1,type:a.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},xr=iu("div",e,{ref:[n,Et.rootRef],state:Nn,stateAttributesMapping:HH,props:[Dt,u]});return R.jsx(C4.Provider,{value:Et,children:xr})});let uP=0;function YH(t,e="mui"){const[n,a]=k.useState(t),r=t||n;return k.useEffect(()=>{n==null&&(uP+=1,a(`${e}-${uP}`))},[n,e]),r}const hP=nb.useId;function E4(t,e){if(hP!==void 0){const n=hP();return t??(e?`${e}-${n}`:n)}return YH(t,e)}const ZH=k.forwardRef(function(e,n){const{render:a,className:r,style:s,id:l,children:c,...u}=e,{toast:h,setTitleId:p}=T4(),m=c??h.title,v=!!m,y=E4(l);Ka(()=>{if(v)return p(y),()=>{p(void 0)}},[v,y,p]);const b={type:h.type},x=iu("h2",e,{ref:n,state:b,props:{...u,id:y,children:m}});return v?x:null}),JH=k.createContext(void 0);function XH(t=!1){const e=k.useContext(JH);if(e===void 0&&!t)throw new Error(Jl(16));return e}function QH(t){const{focusableWhenDisabled:e,disabled:n,composite:a=!1,tabIndex:r=0,isNativeButton:s}=t,l=a&&e!==!1,c=a&&e===!1;return{props:k.useMemo(()=>{const h={onKeyDown(p){n&&e&&p.key!=="Tab"&&p.preventDefault()}};return a||(h.tabIndex=r,!s&&n&&(h.tabIndex=e?r:-1)),(s&&(e||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!e||c)&&(h.disabled=n),h},[a,n,e,l,c,s,r])}}function eW(t={}){const{disabled:e=!1,focusableWhenDisabled:n,tabIndex:a=0,native:r=!0,composite:s}=t,l=k.useRef(null),c=XH(!0),u=s??c!==void 0,{props:h}=QH({focusableWhenDisabled:n,disabled:e,composite:u,tabIndex:a,isNativeButton:r}),p=k.useCallback(()=>{const y=l.current;vv(y)&&u&&e&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[e,h.disabled,u]);Ka(p,[p]);const m=k.useCallback((y={})=>{const{onClick:b,onMouseDown:x,onKeyUp:P,onKeyDown:T,onPointerDown:L,...E}=y;return cb({onClick(A){if(e){A.preventDefault();return}b?.(A)},onMouseDown(A){e||x?.(A)},onKeyDown(A){if(e||(Zp(A),T?.(A),A.baseUIHandlerPrevented))return;const I=A.target===A.currentTarget,B=A.currentTarget,D=vv(B),S=!r&&tW(B),j=I&&(r?D:!S),F=A.key==="Enter",Z=A.key===" ",ee=B.getAttribute("role"),de=ee?.startsWith("menuitem")||ee==="option"||ee==="gridcell";if(I&&u&&Z){if(A.defaultPrevented&&de)return;A.preventDefault(),S||r&&D?(B.click(),A.preventBaseUIHandler()):j&&(b?.(A),A.preventBaseUIHandler());return}j&&(!r&&(Z||F)&&A.preventDefault(),!r&&F&&b?.(A))},onKeyUp(A){if(!e){if(Zp(A),P?.(A),A.target===A.currentTarget&&r&&u&&vv(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!r&&!u&&A.key===" "&&b?.(A)}},onPointerDown(A){if(e){A.preventDefault();return}L?.(A)}},r?{type:"button"}:{role:"button"},h,E)},[e,h,u,r]),v=mo(y=>{l.current=y,p()});return{getButtonProps:m,buttonRef:v}}function vv(t){return fs(t)&&t.tagName==="BUTTON"}function tW(t){return!!(t?.tagName==="A"&&t?.href)}const nW=k.forwardRef(function(e,n){const{render:a,className:r,style:s,disabled:l,nativeButton:c=!0,...u}=e,h=eb(),{toast:p}=T4(),m=h.useState("expanded"),[v,y]=k.useState(!1),{getButtonProps:b,buttonRef:x}=eW({disabled:l,native:c}),P={type:p.type};return iu("button",e,{ref:[n,x],state:P,props:[{"aria-hidden":!m&&!v,onClick(){h.closeToast(p.id)},onFocus(){y(!0)},onBlur(){y(!1)}},u,b]})}),gZ="none",vZ="trigger-press",_Z="trigger-hover",yZ="outside-press",bZ="item-press",kZ="close-press",aW="focus-out",wZ="escape-key",xZ="list-navigation",PZ="cancel-open",SZ="imperative-action",CZ="window-resize";function rW(t,e,n,a){let r=!1,s=!1;const l=eo;return{reason:t,event:e??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...l}}function iW(t){return`data-base-ui-${t}`}const A4=k.createContext(null),sW=()=>k.useContext(A4),oW=iW("portal");function R4(t={}){const{ref:e,container:n,componentProps:a=eo,elementProps:r}=t,s=E4(),c=sW()?.portalNode,[u,h]=k.useState(null),[p,m]=k.useState(null),v=mo(P=>{P!==null&&m(P)}),y=k.useRef(null);Ka(()=>{if(n===null){y.current&&(y.current=null,m(null),h(null));return}if(s==null)return;const P=(n&&(ab(n)?n:n.current))??c??document.body;if(P==null){y.current&&(y.current=null,m(null),h(null));return}y.current!==P&&(y.current=P,m(null),h(P))},[n,c,s]);const b=iu("div",a,{ref:[e,v],props:[{id:s,[oW]:""},r]});return{portalNode:p,portalSubtree:u&&b?$l.createPortal(b,u):null}}const TZ=k.forwardRef(function(e,n){const{render:a,className:r,style:s,children:l,container:c,renderGuards:u,...h}=e,{portalNode:p,portalSubtree:m}=R4({container:c,ref:n,componentProps:e,elementProps:h}),v=k.useRef(null),y=k.useRef(null),b=k.useRef(null),x=k.useRef(null),[P,T]=k.useState(null),L=k.useRef(!1),E=P?.modal,A=P?.open,I=typeof u=="boolean"?u:!!P&&!P.modal&&P.open&&!!p;k.useEffect(()=>{if(!p||E)return;function D(S){p&&S.relatedTarget&&mv(S)&&(S.type==="focusin"?L.current&&(oP(p),L.current=!1):(uH(p),L.current=!0))}return a4(to(p,"focusin",D,!0),to(p,"focusout",D,!0))},[p,E]),Ka(()=>{!p||A!==!0||!L.current||(oP(p),L.current=!1)},[A,p]);const B=k.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:y,beforeInsideRef:b,afterInsideRef:x,portalNode:p,setFocusManagerState:T}),[p]);return R.jsxs(k.Fragment,{children:[m,R.jsxs(A4.Provider,{value:B,children:[I&&p&&R.jsx(bd,{"data-type":"outside",ref:v,onFocus:D=>{if(mv(D,p))b.current?.focus();else{const S=P?P.domReference:null;dH(S)?.focus()}}}),I&&p&&R.jsx("span",{"aria-owns":p.id,style:$H}),p&&$l.createPortal(l,p),I&&p&&R.jsx(bd,{"data-type":"outside",ref:y,onFocus:D=>{if(mv(D,p))x.current?.focus();else{const S=P?P.domReference:null;cH(S)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,rW(aW,D.nativeEvent))}}})]})]})}),lW=k.forwardRef(function(e,n){const{children:a,container:r,className:s,render:l,style:c,...u}=e,{portalNode:h,portalSubtree:p}=R4({container:r,ref:n,componentProps:e,elementProps:u});return!p&&!h?null:R.jsxs(k.Fragment,{children:[p,h&&$l.createPortal(a,h)]})}),cW=lW;function dW(){const t=k.useContext(Q0);if(!t)throw new Error(Jl(73));const e=t.useState("toasts");return k.useMemo(()=>({toasts:e,add:t.addToast,close:t.closeToast,update:t.updateToast,promise:t.promiseToast}),[e,t])}function uW(){const t=new Set;function e(n){t.forEach(a=>a(n))}return{" subscribe":function(a){return t.add(a),()=>{t.delete(a)}},add(n){const a=n.id||r4("toast"),r={...n,id:a,transitionStatus:"starting"};return e({action:"add",options:r}),a},close(n){e({action:"close",options:{id:n}})},update(n,a){e({action:"update",options:{...a,id:n}})},promise(n,a){let r=n;return e({action:"promise",options:{...a,promise:n,setPromise(s){r=s}}}),r}}}const hb=uW();function EZ(t){return hb.add(t)}function hW({children:t}){return R.jsxs(pH,{toastManager:hb,children:[t,R.jsx(cW,{children:R.jsx(RH,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:R.jsx(pW,{})})})]})}function pW(){const{toasts:t}=dW();return t.map(e=>{const n=e.data?.onUndo;return R.jsxs(KH,{toast:e,className:$t("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[R.jsx(ZH,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?R.jsx("button",{type:"button",onClick:()=>{n(),hb.close(e.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:xe("shared.action.undo")}):null,R.jsx(nW,{"aria-label":xe("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:R.jsx(v0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},e.id)})}const pb=Object.freeze(["limits","leaderboard"]),fW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),mW=Object.freeze({limits:()=>In(()=>import("./LimitsPage-CGDnKTon.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>In(()=>import("./LeaderboardPage-bCcorBNY.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19]))}),L4="total",D4=0,pP=20,gW=Object.freeze([10,20,50,100]),vW="tokentracker:leaderboard:pageSize",_W=20,yW=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let fP=0,Ja;class bW{constructor(e={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=xW(e.leaderboardMaxEntries)}read(e,n){return su(e),e==="limits"?!this.limits||this.limits.contextKey!==n?null:cp(this.limits):n?cp(this.leaderboard.get(n)):null}write(e,n={}){if(e.targetKey==="limits"){this.limits=e;return}this.leaderboard.has(e.contextKey)&&this.leaderboard.delete(e.contextKey),this.leaderboard.set(e.contextKey,e),this.evictLeaderboardEntries(n.activeContextKey||e.contextKey)}evictLeaderboardEntries(e=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==e)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:cp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class kW{constructor(e={}){fP+=1,this.sessionId=`dashboard-preload-${fP}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new bW(e),this.targets={limits:mP("limits"),leaderboard:mP("leaderboard")}}}function mP(t){return{key:t,route:fW[t],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function wW(t={}){return new kW(t)}function xW(t){const e=Number(t);return!Number.isInteger(e)||e<1?_W:e}Ja=wW();function su(t){if(!pb.includes(t))throw new Error(`Unknown dashboard preload target: ${t}`)}function I4(t){return t?typeof t=="string"?t:t.message||String(t):null}function PW(t,e){return yW.includes(t)?t:e}function SW(t){const e=Number(t);return Number.isFinite(e)?e:Date.now()}function cp(t){return t?{...t}:null}function gP(){const t=pb.every(e=>{const n=Ja.targets[e];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});Ja.completedAt=t?Date.now():null}function CW(){Ja.startedAfterMainContentVisible=!0}function fb(t,e={}){su(t);const n=Object.entries(e).filter(([,a])=>a!==void 0).sort(([a],[r])=>a.localeCompare(r)).map(([a,r])=>`${a}=${r===null?"null":String(r)}`);return`${t}:${n.join("|")}`}function TW(t,e={}){su(t);const n=Ja.targets[t];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=e.loader||mW[t],r=n.resourceRequestId+1;n.resourceRequestId=r,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==r||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,gP(),l)).catch(l=>(n.resourceRequestId!==r||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=I4(l),gP()),null));return n.resourcePromise=s,s}function EW(t={}){const e=t.loaders||{};return Promise.all(pb.map(n=>TW(n,{loader:e[n]})))}function M4(t,e){su(t);const n=Ja.targets[t],a=e?.status||"fulfilled",r={targetKey:t,status:a,data:e?.data??null,error:I4(e?.error),source:PW(e?.source,"silent-preload"),generatedAt:SW(e?.generatedAt),updatedAt:Date.now(),contextKey:e?.contextKey||fb(t,e?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=r.error:a==="fulfilled"&&(n.error=null,Ja.cache.write(r,{activeContextKey:e?.activeContextKey})),cp(r)}function N4(t,e){return su(t),Ja.cache.read(t,e)}function AZ(t,e={}){return M4("limits",{data:t,source:e.source||"dashboard-existing",contextKey:e.contextKey||O4(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function O4(t={}){return fb("limits",{state:"current",...t})}function RZ(t=O4()){return N4("limits",t)}function W_(t,e={}){return M4("leaderboard",{activeContextKey:e.activeContextKey,data:t,source:e.source||"silent-preload",contextKey:e.contextKey||mb(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function AW(t){return N4("leaderboard",t)}function j4(){if(typeof window>"u")return pP;try{const t=window.localStorage.getItem(vW),e=Number(t);if(gW.includes(e))return e}catch{}return pP}function z4(t={}){const e=t.userId;return e!==void 0?e||null:t.cloudUser?.id||null}function F4(t={}){return typeof t.accessMode=="string"&&t.accessMode.trim()?t.accessMode.trim():t.mockEnabled?"mock":t.baseUrl?"cloud":"unavailable"}function mb(t={}){const e=!!t.mockEnabled,n=t.baseUrl??"";return fb("leaderboard",{accessMode:F4({...t,baseUrl:n,mockEnabled:e}),baseUrl:n,mockEnabled:e,offset:t.offset??D4,pageSize:t.pageSize??j4(),period:t.period||L4,userId:z4(t)})}function Lh(t,e){const n=Ja.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,W_(null,{contextKey:e,status:"skipped",error:t})}function RW(t={}){const e=Ja,n=!!t.mockEnabled,a=t.baseUrl??"",r=F4({...t,baseUrl:a,mockEnabled:n}),s=t.period||L4,l=t.pageSize??j4(),c=t.offset??D4,u=z4(t),h=mb({accessMode:r,baseUrl:a,mockEnabled:n,offset:c,pageSize:l,period:s,userId:u});if(!n&&t.authLoading)return Promise.resolve(Lh("auth-loading",h));if(!n&&!t.signedIn&&r!=="public")return Promise.resolve(Lh("not-signed-in",h));if(!n&&!a)return Promise.resolve(Lh("missing-base-url",h));if(!n&&r==="unavailable")return Promise.resolve(Lh("access-unavailable",h));const p=e.targets.leaderboard,m=AW(h);if(m)return Promise.resolve(m);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const y=Promise.resolve().then(()=>t9({userId:u,period:s,limit:l,offset:c})).then(b=>Ja!==e||p.stateRequestId!==v||p.statePromise!==y?null:(p.pendingStateContextKey=null,W_(b,{contextKey:h}))).catch(b=>(Ja!==e||p.stateRequestId!==v||p.statePromise!==y||(p.pendingStateContextKey=null,W_(null,{contextKey:h,status:"rejected",error:b})),null));return p.statePromise=y,y}const LW=typeof window<"u"?window.location.search:"",vP=new URLSearchParams(LW),Dh=vP.get("insforge_code")||vP.get("code")||null,DW=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function IW(){eu();const{loading:t,signedIn:e}=bo(),n=Bl(),[a,r]=k.useState("processing"),[s,l]=k.useState(null),c=k.useRef(!1);k.useEffect(()=>{if(!(!Dh||c.current)){if(c.current=!0,DW){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!Dh)return;r("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Dh)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||t)return;if(e){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{e||r("failed")},12e3);return()=>clearTimeout(h)},[s,t,e,n]),k.useEffect(()=>{if(!Dh&&s===null){const h=setTimeout(()=>r("failed"),3e3);return()=>clearTimeout(h)}},[s]);const u=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&t)?R.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):R.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:R.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),R.jsx("p",{className:"text-oai-gray-400 text-sm",children:xe("auth.callback.processing")})]}),a==="redirecting"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:R.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:R.jsx("path",{d:"M20 6 9 17l-5-5"})})}),R.jsx("p",{className:"text-white text-sm font-medium",children:xe("auth.callback.success")}),R.jsx("p",{className:"text-oai-gray-500 text-xs",children:xe("auth.callback.redirecting")})]}),a==="failed"&&R.jsxs("div",{className:"space-y-3",children:[R.jsx("p",{className:"text-oai-gray-300 text-sm",children:xe("auth.callback.failed")}),R.jsx("button",{type:"button",onClick:u,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:xe("auth.callback.close")})]})]})})}const MW=k.lazy(()=>In(()=>import("./DashboardPage-Sv3L7w2P.js"),__vite__mapDeps([20,13,1,14,21,22,23,11,24,3,9,10,12,25,26,27,4,28,29,30])).then(t=>({default:t.DashboardPage}))),NW=k.lazy(()=>In(()=>import("./IpCheckPage-rKHYtujQ.js"),[])),OW=k.lazy(()=>In(()=>import("./AchievementsPage-Dv5LhNzL.js"),__vite__mapDeps([31,32,16,17,18,33]))),jW=k.lazy(()=>In(()=>import("./LandingPage-x6KqrhSL.js"),__vite__mapDeps([34,35,19,12,36,7,30,33])).then(t=>({default:t.LandingPage}))),zW=k.lazy(()=>In(()=>import("./LeaderboardPage-bCcorBNY.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>({default:t.LeaderboardPage}))),FW=k.lazy(()=>In(()=>import("./LeaderboardProfilePage-DO3bP3yS.js"),__vite__mapDeps([37,14,35,38,21,22,15,16,17,18,32,33,6,39,12,23,11,7])).then(t=>({default:t.LeaderboardProfilePage}))),UW=k.lazy(()=>In(()=>import("./LimitsPage-CGDnKTon.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(t=>({default:t.LimitsPage}))),BW=k.lazy(()=>In(()=>import("./LoginPage-DIRdoCb2.js"),[]).then(t=>({default:t.LoginPage}))),$W=k.lazy(()=>In(()=>import("./ResetPasswordPage-BJQBIphH.js"),[]).then(t=>({default:t.ResetPasswordPage}))),VW=k.lazy(()=>In(()=>import("./DevicePage-VfvDSVAL.js"),[])),HW=k.lazy(()=>In(()=>import("./WrappedPage-VKP5hIAs.js"),[])),WW=k.lazy(()=>In(()=>import("./SettingsPage-D7ux0u6V.js"),__vite__mapDeps([40,2,41,3,29,12,36,14,9,10,11,22,42,43,23,44,7])).then(t=>({default:t.SettingsPage}))),GW=k.lazy(()=>In(()=>import("./SkillsPage-DRCrdltk.js"),__vite__mapDeps([45,5,6,7,3,43,23,11,44,22,14,27,12,46,10,18,25])).then(t=>({default:t.SkillsPage}))),qW=k.lazy(()=>In(()=>import("./WidgetsPage-CmifV9Qh.js"),__vite__mapDeps([47,9,10,11,12,42,41,3,4,6,7])).then(t=>({default:t.WidgetsPage}))),KW=k.lazy(()=>In(()=>import("./PetPage-CIevZPBl.js"),__vite__mapDeps([48,41,3,28,4,39,27,17,46])).then(t=>({default:t.PetPage})));function YW(){const{resolvedLocale:t}=eu(),e=_a(),n=bo();x$();const a=k.useRef(!1),r=k.useRef(!1),s=k.useRef(new Set),l=bn(),c=k.useMemo(()=>typeof window>"u"?!1:f$(window.location.search),[]),u=e?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,y=h.searchParams.get("token")||null,b=v||y,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),T=u.replace(/\/+$/,"")||"/",L=T==="/"||T==="/dashboard",E=T==="/leaderboard",A=T.match(/^\/u\/([^/]+)$/i),I=A?A[1]:null,B=!!(n.enabled&&n.signedIn),D=P||B,S=!1,j=h$(),F=!D&&!l&&!P,Z=l?"mock":n.loading?"unavailable":B?"cloud":D?"local":"unavailable",ee=k.useCallback(()=>{if(!a.current||!l&&n.loading||!l&&!D)return;const Me={accessMode:Z,baseUrl:p$(),mockEnabled:l,signedIn:D,authLoading:!!n.loading,userId:B&&n.user?.id||null},Oe=mb(Me);s.current.has(Oe)||(s.current.add(Oe),RW(Me))},[B,n.loading,n.user?.id,Z,l,D]),de=k.useCallback(()=>{L&&(a.current||(a.current=!0,CW()),r.current||(r.current=!0,EW()),ee())},[L,ee]);k.useEffect(()=>{ee()},[ee]);const ae=k.useMemo(()=>!n.enabled||!B?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[B,n]);let re=P||l||c?"dashboard":"landing";T==="/landing"&&(re="landing"),T==="/dashboard"&&(re="dashboard"),E&&(re="dashboard"),I&&(re="dashboard");const te=T==="/limits",le=T==="/settings",H=T==="/skills",Q=T==="/widgets",W=T==="/pet-settings",N=T==="/ip-check",Y=T==="/achievements";(te||le||H||Q||W||N||Y)&&(re="dashboard");let ue=MW;I?ue=FW:T==="/leaderboard"?ue=zW:te?ue=UW:le?ue=WW:H?ue=GW:Q?ue=qW:W?ue=KW:N?ue=NW:Y&&(ue=OW);const ke=!x&&!F&&(T==="/dashboard"||T==="/"||E||te||le||H||Q||W||N||Y);if(!P&&!B&&!x&&!n.loading&&re==="dashboard"&&!E&&!I&&T!=="/login"&&T!=="/reset-password"&&T!=="/landing"&&T!=="/auth/callback"&&T!=="/auth/native-callback")return R.jsx(H8,{to:"/login",replace:!0});let _e=null;if(T==="/auth/callback"||T==="/auth/native-callback")_e=R.jsx(IW,{});else if(T==="/login")_e=R.jsx(BW,{});else if(T==="/reset-password")_e=R.jsx($W,{});else if(T==="/device")_e=R.jsx(VW,{});else if(T==="/wrapped")_e=R.jsx(HW,{});else if(re==="landing")_e=R.jsx(jW,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=R.jsx(ue,{baseUrl:j,auth:ae,signedIn:D,sessionSoftExpired:S,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:x,publicToken:b,userId:I,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:de},t);ke?_e=R.jsx(U$,{children:Me}):_e=Me}return R.jsx(oO,{children:R.jsx(dO,{children:R.jsx(hW,{children:R.jsxs(uO,{children:[R.jsx(k.Suspense,{fallback:null,children:_e}),ke?R.jsx(mV,{}):null,R.jsx(c$,{}),R.jsx(iN,{}),R.jsx(gN,{})]})})})})}var J=typeof window<"u"?window:void 0,Tn=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Tn.self=Tn),typeof File>"u"&&(Tn.File=function(){});var ia=Tn?.navigator,we=Tn?.document,pn=Tn?.location,G_=Tn?.fetch,q_=Tn!=null&&Tn.XMLHttpRequest&&"withCredentials"in new Tn.XMLHttpRequest?Tn.XMLHttpRequest:void 0,_P=Tn?.AbortController,ZW=Tn?.CompressionStream,ga=ia?.userAgent,Be=J??{};function U4(){return!(!J||J.navigator.onLine===!1)}var yP="1.398.3",on={DEBUG:!1,LIB_VERSION:yP,LIB_NAME:"web",JS_SDK_VERSION:yP};function bP(t,e,n,a,r,s,l){try{var c=t[s](l),u=c.value}catch(h){return void n(h)}c.done?e(u):Promise.resolve(u).then(a,r)}function _n(t){return function(){var e=this,n=arguments;return new Promise((function(a,r){var s=t.apply(e,n);function l(u){bP(s,a,r,l,c,"next",u)}function c(u){bP(s,a,r,l,c,"throw",u)}l(void 0)}))}}function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fe.apply(null,arguments)}function B4(t,e){if(t==null)return{};var n={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;n[a]=t[a]}return n}var kP=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function wP(t){return typeof t=="string"||t}function xP(t){return typeof t=="string"?t:void 0}var Vc,ki=(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.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.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})({}),PP=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),JW=["$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"],XW=["token"],$4="NativeGzipValidationError",K_=t=>t.length>=2&&t[0]===31&&t[1]===139,SP=(t,e)=>t===PP.GZipJS||e===PP.GZipJS||e==="gzip",CP=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Ih=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=$4,e},QW=(function(){var t=_n((function*(e,n){18>e.size&&Ih("too-short");var a=new Uint8Array(yield e.slice(0,10).arrayBuffer());K_(a)&&a[2]===8||Ih("invalid-header");var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(l=>{for(var c=(()=>{if(Vc)return Vc;Vc=[];for(var p=0;256>p;p++){for(var m=p,v=0;8>v;v++)m=1&m?3988292384^m>>>1:m>>>1;Vc[p]=m>>>0}return Vc})(),u=4294967295,h=0;l.length>h;h++)u=c[255&(u^l[h])]^u>>>8;return(4294967295^u)>>>0})(n)&&Ih("invalid-crc");var s=n.length>>>0;r.getUint32(4,!0)!==s&&Ih("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function Y_(){return Y_=_n((function*(t,e,n){e===void 0&&(e=!0);try{var a=new TextEncoder().encode(t),r=new CompressionStream("gzip"),s=r.writable.getWriter(),l=s.write(a).then((()=>s.close())).catch((function(){var h=_n((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(r.readable).blob(),[u]=yield Promise.all([c,l]);return yield QW(u,a),u}catch(h){if(n!=null&&n.rethrow)throw h;return e&&console.error("Failed to gzip compress data",h),null}})),Y_.apply(this,arguments)}var eG=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],TP=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return eG.concat(e).some((a=>{var r=a.toLowerCase();return n.indexOf(r)!==-1}))};function Ke(t,e){return t.indexOf(e)!==-1}var $f=function(t){return t.trim()},Z_=function(t){return t.replace(/^\$/,"")},V4=Object.prototype,H4=V4.hasOwnProperty,Vf=V4.toString,ct=Array.isArray||function(t){return Vf.call(t)==="[object Array]"},yr=t=>typeof t=="function",qt=t=>t===Object(t)&&!ct(t),cs=t=>{if(qt(t)){for(var e in t)if(H4.call(t,e))return!1;return!0}return!1},be=t=>t===void 0,Lt=t=>Vf.call(t)=="[object String]",J_=t=>Lt(t)&&t.trim().length===0,oa=t=>t===null,nt=t=>be(t)||oa(t),Bn=t=>Vf.call(t)=="[object Number]"&&t==t,yi=t=>Bn(t)&&t>0,Hr=t=>Vf.call(t)==="[object Boolean]",tG=t=>t instanceof FormData,nG=t=>Ke(JW,t),aG=t=>Ke(XW,t);function W4(t){return t===null||typeof t!="object"}function Jp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function gb(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var rG=[!0,"true",1,"1","yes"],_v=t=>Ke(rG,t),iG=[!1,"false",0,"0","no"];function Br(t,e,n,a,r){return e>n&&(a.warn("min cannot be greater than max."),e=n),Bn(t)?t>n?(a.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(a.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(a.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+r),Br(r||n,e,n,a))}class sG{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=Br(e.bucketSize,0,100,e.Ae),this.$e=Br(e.refillRate,0,this.Fe,e.Ae),this.De=Br(e.refillInterval,0,864e5,e.Ae)}Ne(e,n){var a=Math.floor((n-e.lastAccess)/this.De);a>0&&(e.tokens=Math.min(e.tokens+a*this.$e,this.Fe),e.lastAccess=e.lastAccess+a*this.De)}consumeRateLimit(e){var n,a=Date.now(),r=String(e),s=this.Ee[r];return s?this.Ne(s,a):this.Ee[r]=s={tokens:this.Fe,lastAccess:a},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.Pe)==null||n.call(this,e)),s.tokens===0)}stop(){this.Ee={}}}var La="Mobile",Xp="iOS",Si="Android",Ml="Tablet",G4=Si+" "+Ml,q4="iPad",K4="Apple",Y4=K4+" Watch",kd="Safari",Nl="BlackBerry",Z4="Samsung",J4=Z4+"Browser",X4=Z4+" Internet",so="Chrome",oG=so+" OS",Q4=so+" "+Xp,vb="Internet Explorer",eE=vb+" "+La,_b="Opera",lG=_b+" Mini",yb="Edge",tE="Microsoft "+yb,xl="Firefox",nE=xl+" "+Xp,Fd="Nintendo",Ud="PlayStation",Pl="Xbox",aE=Si+" "+La,rE=La+" "+kd,id="Windows",X_=id+" Phone",EP="Nokia",Q_="Ouya",iE="Generic",cG=iE+" "+La.toLowerCase(),sE=iE+" "+Ml.toLowerCase(),ey="Konqueror",oE="Oculus Browser",Qp="Vivaldi",lE="Yandex",ef="Whale",ty="DuckDuckGo",cE="Pale Moon",tf="Waterfox",wd="Brave",dE="Google Search App",Xt="(\\d+(\\.\\d+)?)",yv=new RegExp("Version/"+Xt),dG=new RegExp(Pl,"i"),uG=new RegExp(Ud+" \\w+","i"),hG=new RegExp(Fd+" \\w+","i"),bb=new RegExp(Nl+"|PlayBook|BB10","i"),pG={"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"},uE=function(t,e,n,a){e=e||"";var r=(function(s){return s!=null&&s.brave?wd:null})(n);return r||(a!=null&&a.detectGoogleSearchApp&&Ke(t,"GSA/")?dE:Ke(t," OPR/")&&Ke(t,"Mini")?lG:Ke(t," OPR/")?_b:bb.test(t)?Nl:Ke(t,"IE"+La)||Ke(t,"WPDesktop")?eE:Ke(t,"OculusBrowser")?oE:Ke(t,J4)?X4:Ke(t,yb)||Ke(t,"Edg/")?tE:Ke(t,Qp+"/")?Qp:Ke(t,"YaBrowser/")?lE:Ke(t,ef+"/")?ef:Ke(t,ty+"/")||Ke(t,"Ddg/")?ty:Ke(t,"FBIOS")?"Facebook "+La:Ke(t,"UCWEB")||Ke(t,"UCBrowser")?"UC Browser":Ke(t,"CriOS")?Q4:Ke(t,"CrMo")||Ke(t,so)?so:Ke(t,Si)&&Ke(t,kd)?aE:Ke(t,"FxiOS")?nE:Ke(t.toLowerCase(),ey.toLowerCase())?ey:Ke(t,wd+"/")?wd:((s,l)=>l&&Ke(l,K4)||(function(c){return Ke(c,kd)&&!Ke(c,so)&&!Ke(c,Si)})(s))(t,e)?Ke(t,La)?rE:kd:Ke(t,"PaleMoon/")?cE:Ke(t,tf+"/")?tf:Ke(t,xl)?xl:Ke(t,"MSIE")||Ke(t,"Trident/")?vb:Ke(t,"Gecko")?xl:"")},fG={[eE]:[new RegExp("rv:"+Xt)],[tE]:[new RegExp(yb+"?\\/"+Xt)],[so]:[new RegExp("("+so+"|CrMo)\\/"+Xt)],[Q4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[kd]:[yv],[rE]:[yv],[_b]:[new RegExp("(Opera|OPR)\\/"+Xt)],[xl]:[new RegExp(xl+"\\/"+Xt)],[nE]:[new RegExp("FxiOS\\/"+Xt)],[ey]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Nl]:[new RegExp(Nl+" "+Xt),yv],[aE]:[new RegExp("android\\s"+Xt,"i")],[X4]:[new RegExp(J4+"\\/"+Xt)],[oE]:[new RegExp("OculusBrowser\\/"+Xt)],[Qp]:[new RegExp(Qp+"\\/"+Xt)],[lE]:[new RegExp("YaBrowser\\/"+Xt)],[ef]:[new RegExp(ef+"\\/"+Xt)],[wd]:[new RegExp(wd+"\\/"+Xt)],[ty]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[cE]:[new RegExp("PaleMoon\\/"+Xt)],[tf]:[new RegExp(tf+"\\/"+Xt)],[dE]:[new RegExp("GSA\\/"+Xt)],[vb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},mG=function(t,e,n,a){var r=uE(t,e,n,a),s=fG[r];if(be(s))return null;for(var l=0;s.length>l;l++){var c=t.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},AP=[[new RegExp(Pl+"; "+Pl+" (.*?)[);]","i"),t=>[Pl,t&&t[1]||""]],[new RegExp(Fd,"i"),[Fd,""]],[new RegExp(Ud,"i"),[Ud,""]],[bb,[Nl,""]],[new RegExp(id,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[X_,""];if(new RegExp(La).test(e)&&!/IEMobile\b/.test(e))return[id+" "+La,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var a=pG[n[1]]||"";return/arm/i.test(e)&&(a="RT"),[id,a]}return[id,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[Xp,[t[3],t[4],t[5]||"0"].join(".")]:[Xp,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=be(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Si+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Si+")","i"),t=>t&&t[2]?[Si,[t[2],t[3],t[4]||"0"].join(".")]:[Si,""]],[/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/,[oG,""]],[/Linux|debian/i,["Linux",""]]],RP=function(t){return hG.test(t)?Fd:uG.test(t)?Ud:dG.test(t)?Pl:new RegExp(Q_,"i").test(t)?Q_:new RegExp("("+X_+"|WPDesktop)","i").test(t)?X_:/iPad/.test(t)?q4:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Y4:bb.test(t)?Nl:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(EP,"i").test(t)?EP:/(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(La).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)?Si:G4:new RegExp("(pda|"+La+")","i").test(t)?cG:new RegExp(Ml,"i").test(t)&&!new RegExp(Ml+" pc","i").test(t)?sE:""},gG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function LP(t,e){return typeof(n=t)=="string"&&gG.test(n)?t:e();var n}function ms(t){return t&&t.split("#")[0]}function bv(t,e){var n=setTimeout(t,e);return n?.unref&&n?.unref(),n}var vG=t=>t instanceof Error,hE={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}},_G=hE.info;function pE(t){if(Hr(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(ct(t))return{arrayValue:{values:t.map((e=>pE(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function fE(t){var e=[];for(var n in t){var a=t[n];oa(a)||be(a)||e.push({key:n,value:pE(a)})}return e}function yG(t,e){var n=t.level||"info",{text:a,number:r}=hE[n]||_G,s=String(Date.now())+"000000",l={};e.distinctId&&(l.posthogDistinctId=e.distinctId),e.sessionId&&(l.sessionId=e.sessionId),e.windowId&&(l["window.id"]=e.windowId),nt(e.sessionStartTimestamp)||(l.sessionStartTimestamp=String(e.sessionStartTimestamp)),nt(e.lastActivityTimestamp)||(l.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(l["url.full"]=e.currentUrl),e.screenName&&(l["screen.name"]=e.screenName),e.appState&&(l["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(l.feature_flags=e.activeFeatureFlags);var c=fe({},l,t.attributes||{}),u={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:r,severityText:a,body:{stringValue:t.body},attributes:fE(c)};return t.trace_id&&(u.traceId=t.trace_id),t.span_id&&(u.spanId=t.span_id),be(t.trace_flags)||(u.flags=t.trace_flags),u}function mE(t,e,n){return fe({},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 gE(t,e,n,a){return{resourceLogs:[{resource:{attributes:fE(e)},scopeLogs:[{scope:{name:n,version:a},logRecords:t}]}]}}let bG=class{constructor(t,e,n,a,r,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=t,this.Se=e,this.Ae=n,this.qe=a,this.Be=r,this.je=s,this.He=l,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=e.maxBufferSize,this.Je=Math.max((c=e.maxQueueSize)!==null&&c!==void 0?c:e.maxBufferSize,e.maxBufferSize),this.Ye=e.flushIntervalMs,this.Ke=e.maxBatchRecordsPerPost,this.Xe=e.rateCapWindowMs,this.et=e.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.it(t);if(e!==null)if(e.body){if(this.nt()){var n={record:yG(e,this.qe())};this.Be((()=>this.st(n)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(t){var e=this.Se.beforeSend;if(!e)return t;var n=ct(e)?e:[e],a=t;for(var r of n)try{var s=r(a);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;a=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return a}nt(){if(this.et===void 0)return!0;var t=Date.now(),e=t-this.We;return this.Xe>e&&e>=0||(this.We=t,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var t=this;return _n((function*(){if(!t._instance.isDisabled)return t.Ue||(t.Ue=t.ot().finally((()=>{t.Ue=null}))),t.Ue}))()}ot(){var t=this;return _n((function*(){var e;t.tt();var n=(e=t._instance.getPersistedProperty(ki.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var a=n.length,r=0;n.length>0&&a>r;){var s,l;t.ze=0;var c=Math.min(n.length,t.Ke),u=n.slice(0,c),h=gE(u.map((m=>m.record)),t.ut(),(s=t.He)!==null&&s!==void 0?s:t._instance.getLibraryId(),t._instance.getLibraryVersion()),p=yield t._instance.ht(h);if(p.kind==="too-large"&&u.length>1)t.Ke=Math.max(1,Math.floor(u.length/2)),t.Ae.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+t.Ke);else if(p.kind==="retry-later"||(p.kind==="too-large"?t.Ae.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.Se.maxBatchRecordsPerPost>t.Ke&&(t.Ke=Math.min(t.Se.maxBatchRecordsPerPost,t.Ke+1)),yield t.dt(u.length),n=(l=t._instance.getPersistedProperty(ki.LogsQueue))!==null&&l!==void 0?l:[],r+=u.length,p.kind==="fatal"))throw p.error}}))()}dt(t){var e=this;return _n((function*(){var n,a=Math.max(0,t-e.ze),r=(n=e._instance.getPersistedProperty(ki.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(ki.LogsQueue,r.slice(a)),yield e.je()}))()}ut(){return mE(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(ki.LogsQueue))!==null&&e!==void 0?e:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(ki.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(t){t===void 0&&(t=this.Ye),this.vt||(this.vt=bv((()=>{this.vt=void 0,this.rt()}),t))}ft(){var t=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,t)}yt(){var t=this._instance.getPersistedProperty(ki.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return _n((function*(){e.tt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((a=>bv(a,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return _n((function*(){var n=!1,a=e.flush(),r=new Promise((s=>bv((()=>{n=!0,s()}),t)));try{yield Promise.race([a,r])}finally{n&&a.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.Ve=0}),(t=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Mh,DP,kv;function kG(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return kv&&n.length===DP||(DP=n.length,kv=n.reduce(((a,r)=>{Mh||(Mh={});var s=Mh[r];if(s)a[s[0]]=s[1];else for(var l=t(r),c=l.length-1;c>=0;c--){var u=l[c],h=u?.filename,p=e[r];if(h&&p){a[h]=p,Mh[r]=[h,p];break}}return a}),{})),kv}}class wG{constructor(e,n,a){a===void 0&&(a=[]),this.coercers=e,this.stackParser=n,this.modifiers=a}buildFromUnknown(e,n){n===void 0&&(n={});var a=n&&n.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(a,n,0).apply(e),s=this.buildParsingContext(n),l=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(l,a),$exception_level:"error"}}modifyFrames(e){var n=this;return _n((function*(){for(var a of e)a.stacktrace&&a.stacktrace.frames&&ct(a.stacktrace.frames)&&(a.stacktrace.frames=yield n.applyModifiers(a.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 a,r;return e.cause!=null&&(a=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),fe({},e,{cause:a,stack:r})}applyChunkIds(e,n){return e.map((a=>(a.filename&&n&&(a.chunk_id=n[a.filename]),a)))}applyCoercers(e,n){for(var a of this.coercers)if(a.match(e))return a.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return _n((function*(){var a=e;for(var r of n.modifiers)a=yield r(a);return a}))()}convertToExceptionList(e,n){var a,r,s,l={type:e.type,value:e.value,mechanism:{type:(a=n.type)!==null&&a!==void 0?a:"generic",handled:(r=n.handled)===null||r===void 0||r,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(l.stacktrace={type:"raw",frames:e.stack});var c=[l];return e.cause!=null&&c.push(...this.convertToExceptionList(e.cause,fe({},n,{handled:!0}))),c}buildParsingContext(e){var n;return{chunkIdMap:kG(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,a){a===void 0&&(a=0);var r=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(e,n,l);return this.applyCoercers(s,c)}};return fe({},n,{syntheticException:a==0?n.syntheticException:void 0,mechanism:e,apply:s=>r(s,a),next:s=>r(s,a+1)})}}var Ol="?";function ny(t,e,n,a,r){var s={platform:t,filename:e,function:n==="<anonymous>"?Ol:n,in_app:!0};return be(a)||(s.lineno=a),be(r)||(s.colno=r),s}var vE=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,a=t.indexOf("safari-web-extension")!==-1;return n||a?[t.indexOf("@")!==-1?t.split("@")[0]:Ol,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},xG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,PG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,SG=/\((\S*)(?::(\d+))(?::(\d+))\)/,CG=(t,e)=>{var n=xG.exec(t);if(n){var[,a,r,s]=n;return ny(e,a,Ol,+r,+s)}var l=PG.exec(t);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=SG.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[u,h]=vE(l[1]||Ol,l[2]);return ny(e,h,u,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},TG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,EG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,AG=(t,e)=>{var n=TG.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var a=EG.exec(n[3]);a&&(n[1]=n[1]||"eval",n[3]=a[1],n[4]=a[2],n[5]="")}var r=n[3],s=n[1]||Ol;return[s,r]=vE(s,r),ny(e,r,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},IP=/\(error: (.*)\)/;class RG{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var a=Lt(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:a?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 Jp(e,"DOMException")}isDOMError(e){return Jp(e,"DOMError")}}class LG{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var a=e.message;return String(a.error&&typeof a.error.message=="string"?a.error.message:a)}getStack(e){return e.stacktrace||e.stack||void 0}}class DG{constructor(){}match(e){return Jp(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var a;return n.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}var IG=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class MG{match(e){return typeof e=="string"}coerce(e,n){var a,[r,s]=this.getInfos(e);return{type:r??"Error",value:s??e,stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}getInfos(e){var n="Error",a=e,r=e.match(IG);return r&&(n=r[1],a=r[2]),[n,a]}}var NG=["fatal","error","warning","log","info","debug"];function _E(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var a=n.length;a>0;a--){var r=n.slice(0,a).join(", ");if(e>=r.length)return a===n.length?r:r.length>e?r.slice(0,e)+"...":r}return""}class OG{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var a,r=this.getErrorPropertyFromObject(e);return r?n.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(a=n.syntheticException)==null?void 0:a.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return gb(e)?e.constructor.name:"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 a=this.getObjectClassName(e);return(a&&a!=="Object"?"'"+a+"'":"Object")+" captured as exception with keys: "+_E(e)}isSeverityLevel(e){return Lt(e)&&!J_(e)&&NG.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var a=e[n];if(vG(a))return a}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class jG{match(e){return gb(e)}coerce(e,n){var a,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+_E(e),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}class zG{match(e){return W4(e)}coerce(e,n){var a;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}class FG{match(e){return Jp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!gb(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var a,r=this.getUnhandledRejectionReason(e);return W4(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}:n.apply(r)}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 nf="$message",af="$timestamp",UG=new Set([nf,af]),wv={enabled:!0,max_bytes:32768};function rf(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:wv.enabled,max_bytes:$G(t.max_bytes,wv.max_bytes)}:fe({},wv)}class BG{constructor(e){this.bt=[],this._t=0,this.Se=rf(e)}setConfig(e){this.Se=rf(e),this.wt()}add(e){var n=(function(r){var s,l,c;try{c=[],s=(l=JSON.stringify(r,(function(v,y){if(typeof y=="bigint")return y.toString();if(typeof y!="function"&&typeof y!="symbol"){if(y instanceof Error)return{name:y.name,message:y.message,stack:y.stack};if(y&&typeof y=="object"){for(;c.length>0&&c[c.length-1]!==this;)c.pop();if(c.includes(y))return"[Circular]";c.push(y)}return y}})))!==null&&l!==void 0?l:"null"}catch{return}try{var u=JSON.parse(s);if(!qt(u))return;var h=u,p=h[nf],m=h[af];return!Lt(p)||p.trim().length===0||!Lt(m)&&!Bn(m)?void 0:{step:h,json:s}}catch{return}})(e);if(n){var a=(function(r){if(typeof TextEncoder<"u")return new TextEncoder().encode(r).length;for(var s=encodeURIComponent(r),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);a>this.Se.max_bytes||(this.bt.push({step:n.step,bytes:a}),this._t+=a,this.wt())}}getAttachable(){return this.bt.map((e=>e.step))}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}}function $G(t,e){if(!Bn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var yE=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,a={k(r){if(J&&(on.DEBUG||Be.POSTHOG_DEBUG||n)&&!be(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[r])?J.console[r].__rrweb_original__:J.console[r],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];s(t,...c)}},debug(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("debug",...s)},info(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("log",...s)},warn(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("warn",...s)},error(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("error",...s)},critical(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];console.error(t,...s)},uninitializedWarning(r){a.error("You must initialize PostHog before calling "+r)},createLogger:(r,s)=>yE(t+" "+r,s)};return a},ye=yE("[PostHog.js]"),tn=ye.createLogger,VG=tn("[ExternalScriptsLoader]"),xv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return VG.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var a=we?.querySelectorAll("script");if(a){for(var r,s=function(){if(a[l].src===e){var u=a[l];return u.__posthog_loading_callback_fired?{v:n()}:(u.addEventListener("load",(h=>{u.__posthog_loading_callback_fired=!0,n(void 0,h)})),u.onerror=h=>n(h),{v:void 0})}},l=0;a.length>l;l++)if(r=s())return r.v}var c=()=>{if(!we)return n("document not found");var u=we.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=e,u.onload=m=>{u.__posthog_loading_callback_fired=!0,n(void 0,m)},u.onerror=m=>n(m),t.config.prepare_external_dependency_script&&(u=t.config.prepare_external_dependency_script(u)),!u)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")we.head.appendChild(u);else{var h,p=we.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(u,p[0]):we.body.appendChild(u)}};we!=null&&we.body?c():we?.addEventListener("DOMContentLoaded",c)};Be.__PosthogExtensions__=Be.__PosthogExtensions__||{},Be.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var a;if(t.config.strict_script_versioning)a=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var r="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}a=t.requestRouter.endpointFor("assets",r)}xv(t,a,n)}else{var l=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");xv(t,l,n)}},Be.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var a=t.requestRouter.endpointFor("api",e);xv(t,a,n)};var bE="$people_distinct_id",sf="$device_id",Pv="$device_model",sd="__alias",od="__timers",ay="$autocapture_disabled_server_side",ry="$heatmaps_enabled_server_side",iy="$exception_capture_enabled_server_side",sy="$error_tracking_suppression_rules",oy="$error_tracking_capture_extension_exceptions",ly="$web_vitals_enabled_server_side",kb="$dead_clicks_enabled_server_side",wb="$product_tours_enabled_server_side",cy="$web_vitals_allowed_metrics",ao="$session_recording_remote_config",kE="$replay_sample_rate",wE="$replay_override_sampling",xE="$replay_override_linked_flag",PE="$replay_override_url_trigger",SE="$replay_override_event_trigger",_l="$sesid",xb="$session_is_sampled",Ys="$enabled_feature_flags",dp="$active_feature_flags",ld="$early_access_features",dy="$feature_flag_details",up="$feature_flag_payloads",uy="$feature_flag_request_id",bi="$override_feature_flags",dl="$override_feature_flag_payloads",Gs="$stored_person_properties",qs="$stored_group_properties",hy="$surveys",of="$surveys_loaded_at",py="$surveys_activated",cd="ph_product_tours",xd="$flag_call_reported",fy="$flag_call_reported_session_id",my="$feature_flag_errors",Bd="$feature_flag_evaluated_at",vr="$user_state",gy="$client_session_props",vy="$capture_rate_limit",_y="$initial_campaign_params",yy="$initial_referrer_info",lf="$initial_person_info",cf="$epp",CE="__POSTHOG_TOOLBAR__",Nh="$posthog_cookieless",TE="$sdk_debug_extensions_init_method",EE="$sdk_debug_extensions_init_time_ms",AE="$sdk_debug_recording_script_not_loaded",by="PostHog loadExternalDependency extension not found.",Ks="on_reject",xi="always",el="anonymous",tl="identified",ky="identified_only",df="visibilitychange",uf="beforeunload",ul="$pageview",Sv="$pageleave",Cv="$identify",MP="$groupidentify";function Oh(t,e){ct(t)&&t.forEach(e)}function Mt(t,e){if(!nt(t))if(ct(t))t.forEach(e);else if(tG(t))t.forEach(((a,r)=>e(a,r)));else for(var n in t)H4.call(t,n)&&e(t[n],n)}var Bt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];for(var r of n)for(var s in r)r[s]!==void 0&&(t[s]=r[s]);return t};function hp(t){for(var e=Object.keys(t),n=e.length,a=new Array(n);n--;)a[n]=[e[n],t[e[n]]];return a}var NP=function(t){try{return t()}catch{return}},HG=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),a=0;e>a;a++)n[a]=arguments[a];return t.apply(this,n)}catch(r){ye.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ye.critical(r)}}},Pb=function(t){var e={};return Mt(t,(function(n,a){(Lt(n)&&n.length>0||Bn(n))&&(e[a]=n)})),e},WG=["herokuapp.com","vercel.app","netlify.app"];function GG(t){var e=t?.hostname;if(!Lt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var a of WG)if(n===a)return!1;return!0}function Qt(t,e,n,a){var{capture:r=!1,passive:s=!0}=a??{};t?.addEventListener(e,n,{capture:r,passive:s})}function RE(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Bn(t)&&isFinite(t)&&Math.floor(t)===t});class hf{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,a,r){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(a)||!Number.isInteger(r)||0>e||0>n||0>a||0>r||e>0xffffffffffff||n>4095||a>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|a>>>24,s[9]=a>>>16,s[10]=a>>>8,s[11]=a,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new hf(s)}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 hf(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var a=this.bytes[n]-e.bytes[n];if(a!==0)return Math.sign(a)}return 0}}class qG{constructor(){this.S=0,this.C=0,this.I=new KG}generate(){var e=this.generateOrAbort();if(be(e)){this.S=0;var n=this.generateOrAbort();if(be(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return hf.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var OP,LE=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};J&&!be(J.crypto)&&crypto.getRandomValues&&(LE=t=>crypto.getRandomValues(t));class KG{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(LE(this.R),this.O=0),this.R[this.O++]}}var wi=()=>YG().toString(),YG=()=>(OP||(OP=new qG)).generate(),Hc="",ZG=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Fr={N:()=>!!we,D(t){ye.error("cookieStore error: "+t)},A(t){if(we){try{for(var e=t+"=",n=we.cookie.split(";").filter((s=>s.length)),a=0;n.length>a;a++){for(var r=n[a];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},F(t){var e;try{e=JSON.parse(Fr.A(t))||{}}catch{}return e},q(t,e,n,a,r){if(!we)return!1;try{var s="",l="",c=(function(p,m){if(m){var v=(function(b,x){if(x===void 0&&(x=we),Hc)return Hc;if(!x||["localhost","127.0.0.1"].includes(b))return"";for(var P=b.split("."),T=Math.min(P.length,8),L="dmn_chk_"+wi();!Hc&&T--;){var E=P.slice(T).join("."),A=L+"=1;domain=."+E+";path=/";x.cookie=A+";max-age=3",x.cookie.includes(L)&&(x.cookie=A+";max-age=0",Hc=E)}return Hc})(p);if(!v){var y=(b=>{var x=b.match(ZG);return x?x[0]:""})(p);y!==v&&ye.info("Warning: cookie subdomain discovery mismatch",y,v),v=y}return v?"; domain=."+v:""}return""})(we.location.hostname,a);if(n){var u=new Date;u.setTime(u.getTime()+864e5*n),s="; expires="+u.toUTCString()}r&&(l="; secure");var h=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&ye.warn("cookieStore warning: large cookie, len="+h.length),we.cookie=h,!0}catch{return!1}},P(t,e){if(we!=null&&we.cookie)try{Fr.q(t,"",-1,e)}catch{return}}},Tv=null,It={N(){if(!oa(Tv))return Tv;var t=!0;if(be(J))t=!1;else try{var e="__mplssupport__";It.q(e,"xyz"),It.A(e)!=='"xyz"'&&(t=!1),It.P(e)}catch{t=!1}return t||ye.error("localStorage unsupported; falling back to cookie store"),Tv=t,t},D(t){ye.error("localStorage error: "+t)},A(t){try{return J?.localStorage.getItem(t)}catch(e){It.D(e)}return null},F(t){try{return JSON.parse(It.A(t))||{}}catch{}return null},q(t,e){try{return J?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){It.D(n)}return!1},P(t){try{J?.localStorage.removeItem(t)}catch(e){It.D(e)}}},JG=[sf,"distinct_id",_l,xb,cf,lf,vr],jh={},XG={N:()=>!0,D(t){ye.error("memoryStorage error: "+t)},A:t=>jh[t]||null,F:t=>jh[t]||null,q:(t,e)=>(jh[t]=e,!0),P(t){delete jh[t]}},Fs=null,Fn={N(){if(!oa(Fs))return Fs;if(Fs=!0,be(J))Fs=!1;else try{var t="__support__";Fn.q(t,"xyz"),Fn.A(t)!=='"xyz"'&&(Fs=!1),Fn.P(t)}catch{Fs=!1}return Fs},D(t){ye.error("sessionStorage error: ",t)},A(t){try{return J?.sessionStorage.getItem(t)}catch(e){Fn.D(e)}return null},F(t){try{return JSON.parse(Fn.A(t))||null}catch{}return null},q(t,e){try{return J?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Fn.D(n)}return!1},P(t){try{J?.sessionStorage.removeItem(t)}catch(e){Fn.D(e)}}};class QG{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}isOptedOut(){return this.Se.cookieless_mode===xi||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Ks}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(e){this.Ct.q(this.It,e?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.P(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:a}=this._instance.config;return a||(n?n+e:"__ph_opt_in_out_"+e)}get St(){var e=this.Ct.A(this.It);return _v(e)?1:Ke(iG,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,n=e==="localStorage"?It:Fr;if(!this.Tt||this.Tt!==n){this.Tt=n;var a=e==="localStorage"?Fr:It;a.A(this.It)&&(this.Tt.A(this.It)||this.optInOut(_v(a.A(this.It))),a.P(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[ia?.doNotTrack,ia?.msDoNotTrack,Be.doNotTrack].some((e=>_v(e)))}}function DE(t,e){var n,a=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!yr(a))return e;try{var r=a(e);return Lt(r)&&r?r:e}catch(s){return ye.error("Error in get_current_url, falling back to window.location.href",s),e}}var eq=1,tq=3,nq=11;function jP(t){return t instanceof Element&&(t.id===CE||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function gs(t){return!!t&&t.nodeType===eq}function Aa(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function IE(t){return!!t&&t.nodeType===tq}function ME(t){return!!t&&t.nodeType===nq&&gs(t.host)}function Sb(t){return t?$f(t).split(/\s+/):[]}function zP(t,e){var n=(function(a){var r,s=J==null||(r=J.location)==null?void 0:r.href;return be(s)?void 0:DE(a,s)})(e);return!!(n&&t&&t.some((a=>n.match(a))))}function pf(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 Sb(e)}function NE(t){return nt(t)?null:$f(t).split(/(\s+)/).filter((e=>Pd(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function $d(t){var e="";return xy(t)&&!FE(t)&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var a;IE(n)&&n.textContent&&(e+=(a=NE(n.textContent))!==null&&a!==void 0?a:"")})),$f(e)}function Ev(t){return be(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var Cb=["a","button","form","input","select","textarea","label"];function wy(t,e){if(be(e))return!0;var n,a=function(s){if(e.some((l=>(function(c,u){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,u)}catch{return!1}})(s,l))))return{v:!0}};for(var r of t)if(n=a(r))return n.v;return!1}function OE(t){var e=t.parentNode;return!(!e||!gs(e))&&e}var aq=[".ph-no-autocapture","[data-ph-no-autocapture]"],jE=["next","previous","prev",">","<"],rq=[...jE,"+","-","−","–"],FP=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,UP=[".ph-no-rageclick",".ph-no-capture"],iq=["","text","search","email","password","url","tel","number"];function BP(t,e){if(!J||Tb(t))return!1;var n,a,r,s,l;if(Hr(e)?(n=!!e&&UP,a=void 0,r=!1):(n=(s=e?.css_selector_ignorelist)!==null&&s!==void 0?s:UP,a=e?.content_ignorelist,r=(l=e?.ignore_text_selection)!==null&&l!==void 0&&l),n===!1||r&&(function(u){return!(!u||!gs(u))&&(!!Aa(u,"textarea")||(Aa(u,"input")?Ke(iq,(u.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(u)))})(t))return!1;var{targetElementList:c}=zE(t,!1);return!(function(u,h){if(u===!1||be(u))return!1;var p;if(u===!0)p=jE;else{if(!ct(u))return!1;if(u.length>10)return ye.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=u.map((m=>m.toLowerCase()))}return h.some((m=>{var{safeText:v,ariaLabel:y}=m;return p.some((b=>FP(v,b)||FP(y,b)))}))})(a,c.map((u=>{var h;return{safeText:$d(u).toLowerCase(),ariaLabel:((h=u.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!wy(c,n)}var Tb=t=>!t||Aa(t,"html")||!gs(t),zE=(t,e)=>{if(!J||Tb(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,a=[t],r=t;r.parentNode&&!Aa(r,"body");)if(ME(r.parentNode))a.push(r.parentNode.host),r=r.parentNode.host;else{var s=OE(r);if(!s)break;if(e||Cb.indexOf(s.tagName.toLowerCase())>-1)n=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}a.push(s),r=s}return{parentIsUsefulElement:n,targetElementList:a}};function xy(t){for(var e=t;e.parentNode&&!Aa(e,"body");e=e.parentNode){var n=pf(e);if(Ke(n,"ph-sensitive")||Ke(n,"ph-no-capture"))return!1}if(Ke(pf(t),"ph-include"))return!0;var a=t.type||"";if(Lt(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var r=t.name||t.id||"";return!Lt(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function FE(t){return!!(Aa(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Aa(t,"select")||Aa(t,"textarea")||t.getAttribute("contenteditable")==="true")}var UE="(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})",sq=new RegExp("^(?:"+UE+")$"),oq=new RegExp(UE),BE="\\d{3}-?\\d{2}-?\\d{4}",lq=new RegExp("^("+BE+")$"),cq=new RegExp("("+BE+")");function Pd(t,e){return e===void 0&&(e=!0),!(nt(t)||Lt(t)&&(t=$f(t),(e?sq:oq).test((t||"").replace(/[- ]/g,""))||(e?lq:cq).test(t)))}function $P(t){var e=$d(t);return Pd(e=(e+" "+$E(t)).trim())?e:""}function $E(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var a;if(n&&((a=n.tagName)==null?void 0:a.toLowerCase())==="span")try{var r=$d(n);e=(e+" "+r).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+$E(n)).trim())}catch(s){ye.error("[AutoCapture]",s)}})),e}function VP(t){return t.replace(/"|\\"/g,'\\"')}function dq(t){var e=t.attr__class;return e?ct(e)?e:Sb(e):void 0}var zh=tn("[Dead Clicks]"),uq=()=>!0,hq=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(kb)),a=t.instance.config.capture_dead_clicks;return Hr(a)?a:!!qt(a)||n};class HP{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,n,a){this.instance=e,this.isEnabled=n,this.onCapture=a,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[kb]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt((()=>{this.Pt()})):this.stop()}Mt(e){var n,a;(n=Be.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?zh.error("failed to load script",r):e()}))}Pt(){var e;if(we){if(!this.Et&&(e=Be.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.Et=Be.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Et.start(we),zh.info("starting...")}}else zh.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,zh.info("stopping..."))}}var Av=tn("[SegmentIntegration]"),VE="posthog-js";function HE(t,e){var{organization:n,projectId:a,prefix:r,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=e===void 0?{}:e;return c=>{var u,h,p,m,v;if(s!=="*"&&!s.includes(c.level)||!t.__loaded)return c;c.tags||(c.tags={});var y=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());c.tags["PostHog Person URL"]=y,t.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var b,x=((u=c.exception)==null?void 0:u.values)||[],P=x.map((L=>fe({},L,{stacktrace:L.stacktrace?fe({},L.stacktrace,{type:"raw",frames:(L.stacktrace.frames||[]).map((E=>fe({},E,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((h=x[0])==null?void 0:h.value)||c.message,$exception_type:(p=x[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:P,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((m=x[0])==null?void 0:m.value)||c.message,$sentry_exception_type:(v=x[0])==null?void 0:v.type,$sentry_tags:c.tags};return n&&a&&(T.$sentry_url=(r||"https://sentry.io/organizations/")+n+"/issues/?project="+a+"&query="+c.event_id),l&&((b=t.exceptions)==null||b.sendExceptionEvent(T)),c}}class pq{constructor(e,n,a,r,s,l){this.name=VE,this.setupOnce=function(c){c(HE(e,{organization:n,projectId:a,prefix:r,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class WP{constructor(e){this.Rt=(n,a,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength||r.crossTabAdoption)&&(ye.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:r}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){var e;this.Ft=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.Rt)}destroy(){var e;(e=this.Ft)==null||e.call(this),this.Ft=void 0}doPageView(e,n){var a,r=this.At(e,n);return this.Ot={pathname:(a=J?.location.pathname)!==null&&a!==void 0?a:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var n;return this.At(e,(n=this.Ot)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Ot)==null?void 0:e.pageViewId}}At(e,n){var a=this.Ot;if(!a)return{$pageview_id:n};var r={$pageview_id:n,$prev_pageview_id:a.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:u,maxContentHeight:h,lastContentY:p,maxContentY:m}=s;if(!(be(l)||be(c)||be(u)||be(h)||be(p)||be(m))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h),p=Math.ceil(p),m=Math.ceil(m);var v=l>1?Br(c/l,0,1,ye):1,y=l>1?Br(u/l,0,1,ye):1,b=h>1?Br(p/h,0,1,ye):1,x=h>1?Br(m/h,0,1,ye):1;r=Bt(r,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:v,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:y,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:m,$prev_pageview_max_content_percentage:x})}}return a.pathname&&(r.$prev_pageview_pathname=a.pathname),a.timestamp&&(r.$prev_pageview_duration=(e.getTime()-a.timestamp.getTime())/1e3),r}}var Fh=["flags","surveys"],fq={[bE]:{exposure:"hidden"},[sd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[od]:{exposure:"hidden"},[ay]:{exposure:"event"},[ry]:{exposure:"hidden"},[iy]:{exposure:"event"},[sy]:{exposure:"hidden"},[oy]:{exposure:"event"},[ly]:{exposure:"event"},[kb]:{exposure:"event"},[wb]:{exposure:"hidden"},[cy]:{exposure:"event"},[ao]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[_l]:{exposure:"hidden"},[xb]:{exposure:"event"},[kE]:{exposure:"event",shouldSkipFromEventProperties:t=>oa(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"},[Ys]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!qt(t))return{};for(var e={},n=Object.keys(t),a=0;n.length>a;a++)e["$feature/"+n[a]]=t[n[a]];return e}},[dp]:{exposure:"event",storageGroup:"flags"},[ld]:{exposure:"hidden"},[dy]:{exposure:"hidden",storageGroup:"flags"},[up]:{exposure:"event",storageGroup:"flags"},[uy]:{exposure:"event",storageGroup:"flags",volatile:!0},[bi]:{exposure:"event"},[dl]:{exposure:"hidden"},[Gs]:{exposure:"hidden"},[qs]:{exposure:"hidden"},[hy]:{exposure:"hidden",storageGroup:"surveys"},[of]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[py]:{exposure:"event"},[cd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[xd]:{exposure:"hidden"},[fy]:{exposure:"hidden"},[my]:{exposure:"hidden"},[Bd]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[vr]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[vy]:{exposure:"hidden"},[_y]:{exposure:"hidden"},[yy]:{exposure:"hidden"},[lf]:{exposure:"hidden"},[cf]:{exposure:"hidden"},[wE]:{exposure:"event"},[xE]:{exposure:"event"},[PE]:{exposure:"event"},[SE]:{exposure:"event"},[TE]:{exposure:"event"},[EE]:{exposure:"event"},[AE]:{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_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"}},mq=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=t=>{var e=fq[t];if(e)return e;for(var[n,a]of mq)if(t.indexOf(n)===0)return a},Vd=t=>{var e=we?.createElement("a");return be(e)?null:(e.href=t,e)},jl=function(t,e){for(var n,a=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;a.length>r;r++){var s=a[r].split("=");if(s[0]===e){n=s;break}}if(!ct(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{ye.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Hd=function(t,e,n){if(!t||!e||!e.length)return t;for(var a=t.split("#"),r=a[1],s=(a[0]||"").split("?"),l=s[1],c=s[0],u=(l||"").split("&"),h=[],p=0;u.length>p;p++){var m=u[p].split("=");ct(m)&&(e.includes(m[0])?h.push(m[0]+"="+n):h.push(u[p]))}var v=c;return l!=null&&(v+="?"+h.join("&")),r!=null&&(v+="#"+r),v},ff=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},WE=(t,e)=>t>=e&&U4(),GE=(t,e,n,a)=>{if(t===0){if(U4()){var r=e+1;return r===n&&a(),r}return e}return 0},Uh="https?://(.*)",zl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],gq=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...zl],Wd="<masked>",vq=["li_fat_id"];function qE(t,e,n){if(!we)return{};var a,r=e?[...zl,...n||[]]:[],s=KE(Hd(we.URL,r,Wd),t),l=(a={},Mt(vq,(function(c){var u=Fr.A(c);a[c]=u||null})),a);return Bt(l,s)}function KE(t,e){var n=gq.concat(e||[]),a={};return Mt(n,(function(r){var s=jl(t,r);a[r]=s||null})),a}function YE(t){var e=(function(s){return s?s.search(Uh+"google.([^/?]*)")===0?"google":s.search(Uh+"bing.com")===0?"bing":s.search(Uh+"yahoo.com")===0?"yahoo":s.search(Uh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",a={};if(!oa(e)){a.$search_engine=e;var r=we?jl(we.referrer,n):"";r.length&&(a.ph_keyword=r)}return a}function GP(){return navigator.language||navigator.userLanguage}var mf="$direct";function ZE(){return we?.referrer||mf}function JE(t,e,n){n===void 0&&(n=!1);var a=t?[...zl,...e||[]]:[],r=n?ms(pn?.href):pn?.href,s=r?.substring(0,1e3);return{r:ZE().substring(0,1e3),u:s?Hd(s,a,Wd):void 0}}function XE(t,e){var n;e===void 0&&(e=!1);var{r:a,u:r}=t,s=e?ms(r):r,l={$referrer:a,$referring_domain:a==null?void 0:a==mf?mf:(n=Vd(a))==null?void 0:n.host};if(s){l.$current_url=s;var c=Vd(s);l.$host=c?.host,l.$pathname=c?.pathname;var u=KE(s);Bt(l,u)}if(a){var h=YE(a);Bt(l,h)}return l}function QE(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function _q(){try{return new Date().getTimezoneOffset()}catch{return}}var yq={flags:Bd,surveys:of},bq=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],nl="main";class Rv{constructor(e,n,a){if(a===void 0&&(a=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=a,this.props={},this.Bt=!1,this.jt=(s=>{var l="";return s.token&&(l=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+l+"_posthog"})(e),this.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&ye.info("Persistence loaded",e.persistence,fe({},this.props)),this.update_config(e,e,n),this.save(),J){var r=()=>this.flush();Qt(J,"beforeunload",r,{capture:!1}),Qt(J,"pagehide",r,{capture:!1})}}zt(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return Bn(n)&&n>0?n:0}isDisabled(){return!!this.Vt}Ht(e){bq.indexOf(e.persistence.toLowerCase())===-1&&(ye.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,a=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var u=[...JG,...l];return fe({},It,{F(h){try{var p={};try{p=Fr.F(h)||{}}catch{}var m,v=JSON.parse(It.A(h)||"{}");if(c){var y={};for(var b in p){var x=p[b];oa(x)||x===""||(y[b]=x)}m=Bt(v,y)}else m=Bt(p,v);return It.q(h,m),m}catch{}return null},q(h,p,m,v,y,b){var x=It.q(h,p,void 0,void 0,b);try{var P={};u.forEach((T=>{p[T]&&(P[T]=p[T])})),Object.keys(P).length&&Fr.q(h,P,m,v,y,b)}catch(T){It.D(T)}return x},P(h,p){try{J?.localStorage.removeItem(h),Fr.P(h,p)}catch(m){It.D(m)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),r=!1,s=e.persistence.toLowerCase();return s==="localstorage"&&It.N()?(n=It,r=!0):s==="localstorage+cookie"&&a.N()?(n=a,r=!0):s==="sessionstorage"&&Fn.N()?n=Fn:s==="memory"?n=XG:s==="cookie"?n=Fr:a.N()?(n=a,r=!0):n=Fr,this.Dt=r,n}Wt(e){return this.jt+"__"+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var n=e??this.Se.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var a=this.props[Bd];return!a||typeof a!="number"||Date.now()-a>n}properties(){var e={};return Mt(this.props,((n,a)=>{var r=Us(a);if(r?.exposure==="derived"){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,a===Ys?()=>this.Gt():()=>!1))return;r.transformToEventProperties&&Bt(e,r.transformToEventProperties(n))}else if(!r||r.exposure==="event"){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,(()=>!1)))return;e[a]=n}})),e}load(){if(!this.Vt){var e=this.Ct.F(this.jt);e&&(this.props=Bt({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of Fh){var n=It.F(this.Wt(e));if(n&&!cs(n)){var a=this.Qt(e);a.persisted=!0,this.Jt(e)||(a.fingerprint=this.Yt(n,e)),this.Kt(e,n)||Bt(this.props,n)}}}Jt(e){return Object.keys(this.props).some((n=>{var a;return((a=Us(n))==null?void 0:a.storageGroup)===e}))}Kt(e,n){var a=yq[e];if(!a)return!1;var r=n[a],s=this.props[a];return Bn(r)&&Bn(s)&&s>r}refreshKey(e){var n;if(!this.Vt){var a=this.Nt?(n=Us(e))==null?void 0:n.storageGroup:void 0,r=a?It.F(this.Wt(a)):this.Ct.F(this.jt);if(r&&e in r)this.Xt(e,r[e]);else{if(a){var s=this.Ct.F(this.jt);if(s&&e in s)return void this.Xt(e,s[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?be(this.tr)&&(this.tr=setTimeout((()=>{this.tr=void 0,this.rr()}),e)):this.rr()}}flush(){be(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.jt,this.props,nl))}ir(){var{main:e,groups:n}=this.sr();for(var a of(this.nr(this.Ct,this.jt,e,nl),Fh)){var r,s=n[a];(!cs(s)||(r=this.$t[a])!=null&&r.persisted)&&this.nr(It,this.Wt(a),s,a)}}sr(){var e={},n={};for(var a of Fh)n[a]={};return Mt(this.props,((r,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?n[c][s]=r:e[s]=r})),{main:e,groups:n}}Yt(e,n){if(n===nl)return JSON.stringify(e)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var a={};return Mt(e,((r,s)=>{var l;a[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":r})),JSON.stringify(a)}nr(e,n,a,r){var s=this.Qt(r);if(r===nl||s.dirty||be(s.fingerprint)){var l;try{if((l=this.Yt(a,r))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}e.q(n,a,this.ar,this.lr,this.ur,this.Se.debug)?(s.dirty=!1,r!==nl&&(s.persisted=!0),be(l)||(s.fingerprint=l)):this.Se.debug&&ye.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var{keepGroupEntries:n=!1}=e===void 0?{}:e;if(be(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.P(this.jt,!1),this.Ct.P(this.jt,!0),!n&&this.qt)for(var a of Fh)It.P(this.Wt(a));n?delete this.$t[nl]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,n,a){if(qt(e)){be(n)&&(n="None"),this.ar=be(a)?this.hr:a;var r=!1;if(Mt(e,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Xt(l,s),r=!0)})),r)return this.save(),!0}return!1}register(e,n){if(qt(e)){this.ar=be(n)?this.hr:n;var a=!1;if(Mt(e,((r,s)=>{e.hasOwnProperty(s)&&this.props[s]!==r&&(this.Xt(s,r),a=!0)})),a)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.Bt){var e=qE(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);cs(Pb(e))||this.register(e),this.Bt=!0}}update_search_keyword(){var e;this.register((e=we?.referrer)?YE(e):{})}update_referrer_info(){var e;this.register_once({$referrer:ZE(),$referring_domain:we!=null&&we.referrer&&((e=Vd(we.referrer))==null?void 0:e.host)||mf},void 0)}set_initial_person_info(){this.props[_y]||this.props[yy]||this.register_once({[lf]:JE(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};Mt([yy,_y],(r=>{var s=this.props[r];s&&Mt(s,(function(l,c){e["$initial_"+Z_(c)]=l}))}));var n=this.props[lf];if(n){var a=(function(r,s){s===void 0&&(s=!1);var l=XE(r,s),c={};return Mt(l,(function(u,h){c["$initial_"+Z_(h)]=u})),c})(n,this.Se.disable_capture_url_hashes);Bt(e,a)}return e}safe_merge(e){return Mt(this.props,(function(n,a){a in e||(e[a]=n)})),e}update_config(e,n,a){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!a),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==n.persistence||!((u,h)=>{if(u.length!==h.length)return!1;var p=[...u].sort(),m=[...h].sort();return p.every(((v,y)=>v===m[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=r?this.Ht(e):this.Ct,l=this.Ut(e);if(r||l!==this.Nt){var c=this.props;this.clear(),this.Ct=s,this.Nt=l,this.props=c,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var a=this.props[od]||{};a[e]=n,this.Xt(od,a),this.save()}remove_event_timer(e){var n=this.props[od]||{},a=n[e];return be(a)||(delete n[e],this.Xt(od,n),this.save()),a}get_property(e){return this.props[e]}set_property(e,n){this.Xt(e,n),this.save()}Xt(e,n){var a;this.props[e]=n,(a=Us(e))!=null&&a.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var n,a=(n=Us(e))==null?void 0:n.storageGroup;a&&(this.Qt(a).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}}var Wc={Activation:"events",Cancellation:"cancelEvents"},Lv={Popover:"popover",API:"api",Widget:"widget"},kq={Always:"always"},Pi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Dv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Py={Popover:"popover",Inline:"inline"},wq={SHOWN:"product tour shown"},qP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},KP=tn("[RateLimiter]");class xq{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var a=n.text;if(a&&a.length)try{(JSON.parse(a).quota_limited||[]).forEach((r=>{KP.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void KP.warn('could not rate limit - continuing. Error: "'+r?.message+'"',{text:a})}},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,a,r;e===void 0&&(e=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),u=(n=(a=this.instance.persistence)==null?void 0:a.get_property(vy))!==null&&n!==void 0?n:{tokens:s,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>s&&(u.tokens=s);var h=1>u.tokens;return h||e||(u.tokens=Math.max(0,u.tokens-1)),!h||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=h,(r=this.instance.persistence)==null||r.set_property(vy,u),{isRateLimited:h,remainingTokens:u.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Gc=tn("[RemoteConfig]");class e6{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Be._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}cr(e){var n,a;(n=Be.__PosthogExtensions__)!=null&&n.loadExternalDependency?(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}vr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Gc.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void Gc.warn("Remote config is disabled. Falling back to local config.");this.cr((e=>{if(!e)return Gc.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr((n=>{this.pr(n),this.gr()}));this.pr(e),this.gr()}))}catch(e){Gc.error("Error loading remote config",e)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}refresh(){!this._instance.mr()&&we&&we.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}gr(){var e;if(!this.yr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.yr=setInterval((()=>{this.refresh()}),n))}}pr(e){var n;e||Gc.error("Failed to fetch remote config from PostHog."),this._instance.pr(e??{}),e?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Ha={GZipJS:"gzip-js",Base64:"base64"},Xa=Uint8Array,va=Uint16Array,Fl=Uint32Array,Eb=new Xa([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]),Ab=new Xa([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]),YP=new Xa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t6=function(t,e){for(var n=new va(31),a=0;31>a;++a)n[a]=e+=1<<t[a-1];var r=new Fl(n[30]);for(a=1;30>a;++a)for(var s=n[a];n[a+1]>s;++s)r[s]=s-n[a]<<5|a;return[n,r]},n6=t6(Eb,2),Sy=n6[1];n6[0][28]=258,Sy[258]=28;for(var ZP=t6(Ab,0)[1],a6=new va(32768),Yt=0;32768>Yt;++Yt){var al=(43690&Yt)>>>1|(21845&Yt)<<1;a6[Yt]=((65280&(al=(61680&(al=(52428&al)>>>2|(13107&al)<<2))>>>4|(3855&al)<<4))>>>8|(255&al)<<8)>>>1}var Sd=function(t,e,n){for(var a=t.length,r=0,s=new va(e);a>r;++r)++s[t[r]-1];var l,c=new va(e);for(r=0;e>r;++r)c[r]=c[r-1]+s[r-1]<<1;for(l=new va(a),r=0;a>r;++r)l[r]=a6[c[t[r]-1]++]>>>15-t[r];return l},go=new Xa(288);for(Yt=0;144>Yt;++Yt)go[Yt]=8;for(Yt=144;256>Yt;++Yt)go[Yt]=9;for(Yt=256;280>Yt;++Yt)go[Yt]=7;for(Yt=280;288>Yt;++Yt)go[Yt]=8;var gf=new Xa(32);for(Yt=0;32>Yt;++Yt)gf[Yt]=5;var Pq=Sd(go,9),Sq=Sd(gf,5),r6=function(t){return(t/8>>0)+(7&t&&1)},i6=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var a=new(t instanceof va?va:t instanceof Fl?Fl:Xa)(n-e);return a.set(t.subarray(e,n)),a},fi=function(t,e,n){var a=e/8>>0;t[a]|=n<<=7&e,t[a+1]|=n>>>8},qc=function(t,e,n){var a=e/8>>0;t[a]|=n<<=7&e,t[a+1]|=n>>>8,t[a+2]|=n>>>16},Iv=function(t,e){for(var n=[],a=0;t.length>a;++a)t[a]&&n.push({s:a,f:t[a]});var r=n.length,s=n.slice();if(!r)return[new Xa(0),0];if(r==1){var l=new Xa(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(I,B){return I.f-B.f})),n.push({s:-1,f:25001});var c=n[0],u=n[1],h=0,p=1,m=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=r-1;)c=n[n[m].f>n[h].f?h++:m++],u=n[h!=p&&n[m].f>n[h].f?h++:m++],n[p++]={s:-1,f:c.f+u.f,l:c,r:u};var v=s[0].s;for(a=1;r>a;++a)s[a].s>v&&(v=s[a].s);var y=new va(v+1),b=Cy(n[p-1],y,0);if(b>e){a=0;var x=0,P=b-e,T=1<<P;for(s.sort((function(I,B){return y[B.s]-y[I.s]||I.f-B.f}));r>a;++a){var L=s[a].s;if(e>=y[L])break;x+=T-(1<<b-y[L]),y[L]=e}for(x>>>=P;x>0;){var E=s[a].s;e>y[E]?x-=1<<e-y[E]++-1:++a}for(;a>=0&&x;--a){var A=s[a].s;y[A]==e&&(--y[A],++x)}b=e}return[new Xa(y),b]},Cy=function(t,e,n){return t.s==-1?Math.max(Cy(t.l,e,n+1),Cy(t.r,e,n+1)):e[t.s]=n},JP=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new va(++e),a=0,r=t[0],s=1,l=function(u){n[a++]=u},c=1;e>=c;++c)if(t[c]==r&&c!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(r),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(r);s=1,r=t[c]}return[n.subarray(0,a),e]},Kc=function(t,e){for(var n=0,a=0;e.length>a;++a)n+=t[a]*e[a];return n},Ty=function(t,e,n){var a=n.length,r=r6(e+2);t[r]=255&a,t[r+1]=a>>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var s=0;a>s;++s)t[r+s+4]=n[s];return 8*(r+4+a)},XP=function(t,e,n,a,r,s,l,c,u,h,p){fi(e,p++,n),++r[256];for(var m=Iv(r,15),v=m[0],y=m[1],b=Iv(s,15),x=b[0],P=b[1],T=JP(v),L=T[0],E=T[1],A=JP(x),I=A[0],B=A[1],D=new va(19),S=0;L.length>S;++S)D[31&L[S]]++;for(S=0;I.length>S;++S)D[31&I[S]]++;for(var j=Iv(D,7),F=j[0],Z=j[1],ee=19;ee>4&&!F[YP[ee-1]];--ee);var de,ae,re,te,le=h+5<<3,H=Kc(r,go)+Kc(s,gf)+l,Q=Kc(r,v)+Kc(s,x)+l+14+3*ee+Kc(D,F)+(2*D[16]+3*D[17]+7*D[18]);if(H>=le&&Q>=le)return Ty(e,p,t.subarray(u,u+h));if(fi(e,p,1+(H>Q)),p+=2,H>Q){de=Sd(v,y),ae=v,re=Sd(x,P),te=x;var W=Sd(F,Z);for(fi(e,p,E-257),fi(e,p+5,B-1),fi(e,p+10,ee-4),p+=14,S=0;ee>S;++S)fi(e,p+3*S,F[YP[S]]);p+=3*ee;for(var N=[L,I],Y=0;2>Y;++Y){var ue=N[Y];for(S=0;ue.length>S;++S)fi(e,p,W[ke=31&ue[S]]),p+=F[ke],ke>15&&(fi(e,p,ue[S]>>>5&127),p+=ue[S]>>>12)}}else de=Pq,ae=go,re=Sq,te=gf;for(S=0;c>S;++S)if(a[S]>255){var ke;qc(e,p,de[257+(ke=a[S]>>>18&31)]),p+=ae[ke+257],ke>7&&(fi(e,p,a[S]>>>23&31),p+=Eb[ke]);var me=31&a[S];qc(e,p,re[me]),p+=te[me],me>3&&(qc(e,p,a[S]>>>5&8191),p+=Ab[me])}else qc(e,p,de[a[S]]),p+=ae[a[S]];return qc(e,p,de[256]),p+ae[256]},Cq=new Fl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Tq=(function(){for(var t=new Fl(256),e=0;256>e;++e){for(var n=e,a=9;--a;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Mv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function Eq(t,e){e===void 0&&(e={});var n=(function(){var m=4294967295;return{p(v){for(var y=m,b=0;v.length>b;++b)y=Tq[255&y^v[b]]^y>>>8;m=y},d(){return 4294967295^m}}})(),a=t.length;n.p(t);var r,s,l,c,u,h=(c=10+((r=e).filename&&r.filename.length+1||0),u=8,(function(m,v,y,b,x,P){var T=m.length,L=new Xa(b+T+5*(1+Math.floor(T/7e3))+x),E=L.subarray(b,L.length-x),A=0;if(!v||8>T)for(var I=0;T>=I;I+=65535){var B=I+65535;T>B?A=Ty(E,A,m.subarray(I,B)):(E[I]=!0,A=Ty(E,A,m.subarray(I,T)))}else{for(var D=Cq[v-1],S=D>>>13,j=8191&D,F=(1<<y)-1,Z=new va(32768),ee=new va(F+1),de=Math.ceil(y/3),ae=2*de,re=function(xr){return(m[xr]^m[xr+1]<<de^m[xr+2]<<ae)&F},te=new Fl(25e3),le=new va(288),H=new va(32),Q=0,W=0,N=(I=0,0),Y=0,ue=0;T>I;++I){var ke=re(I),me=32767&I,_e=ee[ke];if(Z[me]=_e,ee[ke]=me,I>=Y){var Me=T-I;if((Q>7e3||N>24576)&&Me>423){A=XP(m,E,0,te,le,H,W,N,ue,I-ue,A),N=Q=W=0,ue=I;for(var Oe=0;286>Oe;++Oe)le[Oe]=0;for(Oe=0;30>Oe;++Oe)H[Oe]=0}var Le=2,St=0,dn=j,jt=me-_e&32767;if(Me>2&&ke==re(I-jt))for(var _t=Math.min(S,Me)-1,Zt=Math.min(32767,I),nr=Math.min(258,Me);Zt>=jt&&--dn&&me!=_e;){if(m[I+Le]==m[I+Le-jt]){for(var Mn=0;nr>Mn&&m[I+Mn]==m[I+Mn-jt];++Mn);if(Mn>Le){if(Le=Mn,St=jt,Mn>_t)break;var Vt=Math.min(jt,Mn-2),Qe=0;for(Oe=0;Vt>Oe;++Oe){var st=I-jt+Oe+32768&32767,Dt=st-Z[st]+32768&32767;Dt>Qe&&(Qe=Dt,_e=st)}}}jt+=(me=_e)-(_e=Z[me])+32768&32767}if(St){te[N++]=268435456|Sy[Le]<<18|ZP[St];var Et=31&Sy[Le],Nn=31&ZP[St];W+=Eb[Et]+Ab[Nn],++le[257+Et],++H[Nn],Y=I+Le,++Q}else te[N++]=m[I],++le[m[I]]}}A=XP(m,E,!0,te,le,H,W,N,ue,I-ue,A)}return i6(L,0,b+r6(A)+x)})(s=t,(l=e).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,u)),p=h.length;return(function(m,v){var y=v.filename;if(m[0]=31,m[1]=139,m[2]=8,m[8]=2>v.level?4:v.level==9?2:0,m[9]=3,v.mtime!=0&&Mv(m,4,Math.floor(new Date(v.mtime||Date.now())/1e3)),y){m[3]=8;for(var b=0;y.length>=b;++b)m[b+10]=y.charCodeAt(b)}})(h,e),Mv(h,p-8,n.d()),Mv(h,p-4,a),h}var Aq=!!q_||!!G_,s6="text/plain",pp=!1,Ey=(t,e)=>{var[n,a]=t.split("#"),[r,s]=n.split("?");if(!s)return t;var l=s.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return r+(l?"?"+l:"")+(a?"#"+a:"")},o6=function(t,e,n){var a;n===void 0&&(n=!0);var[r,s]=t.split("?"),l=fe({},e),c=(a=s?.split("&").map((h=>{var p,[m,v]=h.split("="),y=n&&(p=l[m])!==null&&p!==void 0?p:v;return delete l[m],m+"="+y})))!==null&&a!==void 0?a:[],u=(function(h,p){var m,v;p===void 0&&(p="&");var y=[];return Mt(h,(function(b,x){be(b)||be(x)||x==="undefined"||(m=encodeURIComponent((P=>P instanceof File)(b)?b.name:b.toString()),v=encodeURIComponent(x),y[y.length]=v+"="+m)})),y.join(p)})(l);return u&&c.push(u),r+"?"+c.join("&")},yl=(t,e)=>JSON.stringify(t,((n,a)=>typeof a=="bigint"?a.toString():a),e),QP=t=>{if(t.xt)return t.xt;var{data:e,compression:n}=t;if(e){if(n===Ha.GZipJS){var a=Eq((function(c,u){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Xa(c.length+(c.length>>>1)),m=0,v=function(P){p[m++]=P},y=0;h>y;++y){if(m+5>p.length){var b=new Xa(m+8+(h-y<<1));b.set(p),p=b}var x=c.charCodeAt(y);128>x?v(x):2048>x?(v(192|x>>>6),v(128|63&x)):x>55295&&57344>x?(v(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++y))>>>18),v(128|x>>>12&63),v(128|x>>>6&63),v(128|63&x)):(v(224|x>>>12),v(128|x>>>6&63),v(128|63&x))}return i6(p,0,m)})(yl(e)),{mtime:0});return{contentType:s6,body:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),estimatedSize:a.byteLength}}if(n===Ha.Base64){var r=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,h)=>String.fromCharCode(parseInt(h,16)))))})(yl(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:yl(c)))(r);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=yl(e);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},l6=t=>{var e,n,a=()=>({url:Ey(t.url,"compression"),encodedBody:QP(fe({},t,{compression:void 0,xt:void 0}))});try{e=QP(t)}catch(r){if(SP(t.compression,jl(t.url,"compression")))return ye.error("Failed to gzip request body, sending uncompressed payload",r),a();throw r}return e&&SP(t.compression,jl(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?K_(new Uint8Array(n)):ArrayBuffer.isView(n)&&K_(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(pp=!0,a()):{url:t.url,encodedBody:e}},eS=t=>{try{return l6(t)}catch(e){return ye.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},Rq=(function(){var t=_n((function*(e){var n=yl(e.data),a=yield(function(s,l,c){return Y_.apply(this,arguments)})(n,on.DEBUG,{rethrow:!0});if(!a)return e;var r=yield a.arrayBuffer();return fe({},e,{xt:{contentType:s6,body:r,estimatedSize:r.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),Lq=["/e/","/s/"],tS=(t,e)=>{var n=(r=>{var s=(l=>{var c=Vd(l),u=c?.pathname||l.split(/[?#]/)[0];return u?u[0]==="/"?u:"/"+u:"/"})(r);return Lq.some((l=>((c,u)=>c.slice(c.length-u.length)===u)(s,l)))})(t),a=n?Ey(t,"ver"):t;return o6(e===Ha.GZipJS?Ey(a,"compression"):a,fe({_:new Date().getTime().toString()},n?{}:{ver:on.JS_SDK_VERSION},e===Ha.GZipJS?{}:{compression:e}))},fp=[];G_&&fp.push({transport:"fetch",method(t){var e,n=eS(t);if(n){var{url:a,encodedBody:r}=n,{contentType:s,body:l,estimatedSize:c}=r??{},u=new Headers;Mt(t.headers,(function(v,y){u.append(y,v)})),s&&u.append("Content-Type",s);var h=null,p=!1;if(_P){var m=new _P;h={signal:m.signal,timeout:setTimeout((()=>{var v,y;p=!0,m.abort((v=t.timeout,(y=new Error("PostHog request timed out"+(v?" after "+v+"ms":""))).name="AbortError",y))}),t.timeout)}}G_(a,fe({method:t?.method||"GET",headers:u,keepalive:t.method==="POST"&&52428.8>(c||0),body:l,signal:(e=h)==null?void 0:e.signal},t.fetchOptions)).then((v=>v.text().then((y=>{var b={statusCode:v.status,text:y};if(v.status===200)try{b.json=JSON.parse(y)}catch(x){ye.error(x)}t.callback==null||t.callback(b)})))).catch((v=>{p&&v?.name==="AbortError"?ye.warn(v):ye.error(v),t.callback==null||t.callback({statusCode:0,error:v})})).finally((()=>h?clearTimeout(h.timeout):null))}}}),q_&&fp.push({transport:"XHR",method(t){var e=eS(t);if(e){var n=new q_,{url:a,encodedBody:r}=e;n.open(t.method||"GET",a,!0);var{contentType:s,body:l}=r??{};Mt(t.headers,(function(c,u){n.setRequestHeader(u,c)})),s&&n.setRequestHeader("Content-Type",s),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var c={statusCode:n.status,text:n.responseText};if(n.status===200)try{c.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(c)}},n.send(l)}}}),ia!=null&&ia.sendBeacon&&fp.push({transport:"sendBeacon",method(t){try{var{url:e,encodedBody:n}=l6(t),{contentType:a,body:r}=n??{};if(!r)return;var s=r instanceof Blob?r:new Blob([r],{type:a});ia.sendBeacon(e,s)}catch{}}});var Ay=3e3;class Dq{constructor(e,n){this.br=!0,this._r=[],this.wr=Br(n?.flush_interval_ms||Ay,250,5e3,ye.createLogger("flush interval"),Ay),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((a=>a.url.indexOf("/e")===0)),...n.filter((a=>a.url.indexOf("/e")!==0))].map((a=>{this.Er(fe({},a,{transport:"sendBeacon"}))}))}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout((()=>{if(this.Ir(),this._r.length>0){var n=this.Tr(),a=function(){var s=n[r],l=new Date().getTime();s.data&&ct(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),e.Er(s)};for(var r in n)a()}}),this.wr))}Er(e){try{this.kr(e)}catch(n){ye.error(n)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return Mt(this._r,(n=>{var a,r=n,s=(r?r.batchKey:null)||r.url;be(e[s])&&(e[s]=fe({},r,{data:[]})),(a=e[s].data)==null||a.push(r.data)})),this._r=[],e}}var Iq=["retriesPerformedSoFar"];class Mq{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!be(J)&&"onLine"in J.navigator&&(this.Rr=J.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},Qt(J,"online",this.Or),Qt(J,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,a=B4(e,Iq);yi(n)&&(a.url=o6(a.url,{retry_count:n})),this._instance._send_request(fe({},a,{callback:r=>{if(r.statusCode!==200&&(400>r.statusCode||r.statusCode>=500)){if((r.statusCode===0?3:10)>(n??0))return void this.st(fe({retriesPerformedSoFar:n},a));r.statusCode===0&&ye.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.")}a.callback==null||a.callback(r)}}))}st(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var a=(function(l){var c=3e3*Math.pow(2,l),u=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-u))})(n),r=Date.now()+a;this._r.push({retryAt:r,requestOptions:e});var s="Enqueued failed request for retry in "+a;navigator.onLine||(s+=" (Browser is offline)"),ye.warn(s),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout((()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()}),this.Pr)}Lr(){var e=Date.now(),n=[],a=this._r.filter((s=>e>s.retryAt||(n.push(s),!1)));if(this._r=n,a.length>0)for(var{requestOptions:r}of a)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,be(J)||(this.Or&&(J.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(J.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(fe({},e,{transport:"sendBeacon"}))}catch(n){ye.error(n)}this._r=[]}}class Nq{constructor(e){this.Dr=()=>{var n,a,r,s;this.Nr||(this.Nr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Nr.lastScrollY=Math.ceil(c),this.Nr.maxScrollY=Math.max(c,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(u,(a=this.Nr.maxScrollHeight)!==null&&a!==void 0?a:0),this.Nr.lastContentY=h,this.Nr.maxContentY=Math.max(h,(r=this.Nr.maxContentY)!==null&&r!==void 0?r:0),this.Nr.maxContentHeight=Math.max(p,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){Qt(J,"scroll",this.Dr,{capture:!0}),Qt(J,"scrollend",this.Dr,{capture:!0}),Qt(J,"resize",this.Dr)}scrollElement(){if(!this.qr)return J?.document.documentElement;var e=ct(this.qr)?this.qr:[this.qr];for(var n of e){var a=J?.document.querySelector(n);if(a)return a}}Br(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.qr){var a=this.scrollElement();return a&&a[n]||0}return J?e==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Br("y")}scrollX(){return this.Br("x")}}var Oq=t=>JE(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);class nS{constructor(e,n,a,r){this.jr=s=>{var l=this.Hr();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.Ur(this._instance)};this.zr.register({[gy]:c})}},this._instance=e,this.Vr=n,this.zr=a,this.Ur=r||Oq,this.Vr.onSessionId(this.jr)}Hr(){return this.zr.props[gy]}getSetOnceProps(){var e,n=(e=this.Hr())==null?void 0:e.props;return n?"r"in n?XE(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 Mt(Pb(this.getSetOnceProps()),((n,a)=>{a==="$current_url"&&(a="url"),e["$session_entry_"+Z_(a)]=n})),e}}class Rb{constructor(){this.Wr={}}on(e,n){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(n),()=>{this.Wr[e]=this.Wr[e].filter((a=>a!==n))}}emit(e,n){for(var a of this.Wr[e]||[])a(n);for(var r of this.Wr["*"]||[])r(e,n)}}var Yc=tn("[SessionId]");class aS{on(e,n){return this.Gr.on(e,n)}constructor(e,n,a){var r;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new Rb,this.Kr=(h,p)=>!(!yi(h)||!yi(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===xi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=n||wi,this.ri=a||wi;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Br(this.Se.session_idle_timeout_seconds||1800,60,36e3,Yc.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+s+"_window_id",this.si="ph_"+s+"_primary_window_exists",this.oi()){var l=Fn.F(this.ni),c=Fn.F(this.si);l&&!c?this.Xr=l:Fn.P(this.ni),Fn.q(this.si,!0)}if((r=this.Se.bootstrap)!=null&&r.sessionID)try{var u=(h=>{var p=this.Se.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.ai(this.Se.bootstrap.sessionID,new Date().getTime(),u)}catch(h){Yc.error("Invalid sessionID in bootstrap",h)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return be(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter((n=>n!==e))}}oi(){return this.Se.persistence!=="memory"&&!this.zr.Vt&&Fn.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&Fn.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?Fn.F(this.ni):null}di(e){var n=this.Zr;return!oa(n)&&!oa(e)&&5e3>Math.abs(e-n)}ai(e,n,a){var r=n!==this._sessionActivityTimestamp,s=!(e!==this.ei||a!==this._sessionStartTimestamp);this._sessionStartTimestamp=a,this._sessionActivityTimestamp=n,this.ei=e,s&&!r||s&&this.di(n)||(this.Zr=n,this.zr.register({[_l]:[n,e,a]}))}ci(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return yi(n)&&n>0}vi(){this.ci()?this.zr.refreshKey(_l):(this.zr.flush(),this.zr.load())}fi(){var e;if(!oa(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,n,a]=this.pi();n===this.ei&&a===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[_l]:[this._sessionActivityTimestamp,(e=this.ei)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),n=yi(e)?e:0,a=yi(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,a)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[_l];return ct(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&J&&(J.removeEventListener(uf,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&Fn.P(this.si)},Qt(J,uf,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Se.cookieless_mode===xi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var a=n||new Date().getTime(),[,r,s]=this.pi(),l=this.gi(),c=this.hi(),u=yi(s)&&Math.abs(a-s)>864e5,h=!1,p=!1,m=!r,v=r,y=!m&&!e&&this.Kr(a,l);y&&((y=this.mi(a))||Yc.info("cross-tab refresh kept the session alive",{sessionId:r}),[,r,s]=this.pi()),m||y||u?(r=this.ti(),c=this.ri(),Yc.info("new session ID generated",{sessionId:r,windowId:c,changeReason:{noSessionId:m,activityTimeout:y,sessionPastMaximumLength:u}}),s=a,h=!0):(c||(c=this.ri(),h=!0),(p=r!==v)&&(Yc.info("adopted cross-tab session id",{sessionId:r,windowId:c}),h=!0));var b=yi(l)&&e&&!u?l:a,x=yi(s)?s:new Date().getTime();this.ui(c),this.ai(r,b,x),e||this.ii();var P={noSessionId:m,activityTimeout:y,sessionPastMaximumLength:u,crossTabAdoption:p};return h&&this.Qr.forEach((T=>T(r,c,P))),{sessionId:r,windowId:c,sessionStartTimestamp:x,changeReason:h?P:void 0,lastActivityTimestamp:l}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout((()=>{if(!this.Yr)if(this.mi(new Date().getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:e})}else this.ii()}),1.1*this.sessionTimeoutMs))}}var c6=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&TP(n,e))return!0;try{var a=t?.userAgentData;if(a!=null&&a.brands&&a.brands.some((r=>TP(r?.brand,e))))return!0}catch{}return!!t.webdriver};function d6(){return(d6=_n((function*(){var t=ia?.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e?.model;return Lt(n)&&n.length>0?n:void 0}catch(a){return void ye.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",a)}}))).apply(this,arguments)}var vf=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function rS(t,e,n){return yl({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var u6={exact:(t,e)=>e.some((n=>t.some((a=>n===a)))),is_not:(t,e)=>e.every((n=>t.every((a=>n!==a)))),regex:(t,e)=>e.some((n=>t.some((a=>vf(n,a))))),not_regex:(t,e)=>e.every((n=>t.every((a=>!vf(n,a))))),icontains:(t,e)=>e.map(Bh).some((n=>t.map(Bh).some((a=>n.includes(a))))),not_icontains:(t,e)=>e.map(Bh).every((n=>t.map(Bh).every((a=>!n.includes(a))))),gt:(t,e)=>e.some((n=>{var a=parseFloat(n);return!isNaN(a)&&t.some((r=>a>parseFloat(r)))})),lt:(t,e)=>e.some((n=>{var a=parseFloat(n);return!isNaN(a)&&t.some((r=>a<parseFloat(r)))}))},Bh=t=>t.toLowerCase();function h6(t,e){return!t||Object.entries(t).every((n=>{var[a,r]=n,s=e?.[a];if(be(s)||oa(s))return!1;var l=[String(s)],c=u6[r.operator];return!!c&&c(r.values,l)}))}var Ry="custom",iS="i.posthog.com",jq=/^\/static\//;class zq{constructor(e){this.bi={},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("."+iS,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.bi[this.apiHost]||(this.bi[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":Ry),this.bi[this.apiHost]}wi(e){if(jq.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(e==="flags")return this.flagsApiHost+n;if(e==="assets"){var a=this.wi(n);if(a)return""+a+n}if(this.region===Ry)return this.apiHost+n;var r=iS+n;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var Rt=tn("[Surveys]"),Ly="seenSurvey_",p6=t=>{try{var e=(n=>((a,r)=>{var s=""+Ly+r.id;return r.current_iteration&&r.current_iteration>0&&(s=""+Ly+r.id+"_"+r.current_iteration),s})(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){Rt.error("Failed to persist survey seen state",n)}},Fq=[Lv.Popover,Lv.Widget,Lv.API],Uq={ignoreConditions:!1,ignoreDelay:!1,displayType:Py.Popover},Bq=tn("[PostHog ExternalIntegrations]"),$q={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Vq{constructor(e){this._instance=e}Mt(e,n){var a;(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,e,(r=>{if(r)return Bq.error("failed to load script",r);n()}))}startIfEnabledOrStop(){var e=this,n=function(l){var c,u,h;!r||(c=Be.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||e.Mt($q[l],(()=>{var p;(p=Be.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.start(e._instance)})),!r&&(u=Be.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[l]&&((h=Be.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[l])==null||h.stop())};for(var[a,r]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(a)}}}var Cd={},Nv=0,_f=()=>{},sS='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Zc="Surveys module not available",oS="sanitize_properties is deprecated. Use before_send instead",f6="Invalid value for property_denylist config: ",hl="posthog",m6=!Aq&&ga?.indexOf("MSIE")===-1&&ga?.indexOf("Mozilla")===-1,lS=t=>{var e;return fe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:GG(we?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:_f,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:pn&&Lt(pn?.search)&&pn.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:!1,enable_recording_console_log:void 0,secure_cookie:(J==null||(e=J.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){ye.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:ky,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Ay},error_tracking:{},_onCapture:_f},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:rq,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},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)}))(t))},Hq=[["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"]],cS=t=>{var e={};for(var[n,a]of Hq)be(t[n])||(e[a]=t[n]);var r=Bt({},e,t),s=t.__preview_external_dependency_versioned_paths;return be(s)||(be(t.strict_script_versioning)&&(r.strict_script_versioning=!!s),Lt(s)&&be(t.asset_host)&&(r.asset_host=s)),ct(t.property_blacklist)&&(be(t.property_denylist)?r.property_denylist=t.property_blacklist:ct(t.property_denylist)?r.property_denylist=[...t.property_blacklist,...t.property_denylist]:ye.error(f6+t.property_denylist)),r};class Wq{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){ye.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Wa{ki(e,n){if(e){var a=this.Si.indexOf(e);a!==-1&&this.Si.splice(a,1)}return this.Si.push(n),n.initialize==null||n.initialize(),n}Ci(){return this.config.cookieless_mode===xi||this.config.cookieless_mode===Ks&&this.consent.isRejected()}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 Wq,this.Ii=!1,this.version=on.LIB_VERSION,this.Ti=new Rb,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=lS(),this.SentryIntegration=pq,this.sentryIntegration=a=>(function(r,s){var l=HE(r,s);return{name:VE,processEvent:c=>l(c)}})(this,a),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new Nq(this),this.pageViewManager=new WP(this),this.rateLimiter=new xq(this),this.requestRouter=new zq(this),this.consent=new QG(this),this.externalIntegrations=new Vq(this);var n=(e=Wa.__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.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(a,r,s)=>{var l=Lt(a)?{[a]:r}:a;this.setPersonProperties(l),s?.({})},set_once:(a,r,s)=>{var l=Lt(a)?{[a]:r}:a;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(a=>ye.info('send "'+a?.event+'"',a)))}init(e,n,a){if(a&&a!==hl){var r,s=(r=Cd[a])!==null&&r!==void 0?r:new Wa;return s._init(e,n,a),Cd[a]=s,Cd[hl][a]=s,s}return this._init(e,n,a)}_init(e,n,a){var r,s;n===void 0&&(n={});var l=Lt(e)?e.trim():"";if(!l)return ye.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 console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Oi(n.debug),this.Li=n,this.Fi=[],n.person_profiles?this.Pi=n.person_profiles:n.process_person&&(this.Pi=n.process_person);var c=lS(n.defaults),u=cS(n),h=Bt({},c,u,{name:a,token:l});qt(c.rageclick)&&qt(u.rageclick)&&(h.rageclick=Bt({},c.rageclick,u.rageclick)),qt(c.session_recording)&&qt(u.session_recording)&&(h.session_recording=Bt({},c.session_recording,u.session_recording)),this.set_config(h),this.config.on_xhr_error&&ye.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Ha.GZipJS;var p=this.Ai();this.persistence=new Rv(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Rv(fe({},this.config,{persistence:"sessionStorage"}),p,!1);var m=fe({},this.persistence.props),v=fe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new Dq((A=>this.Di(A)),this.config.request_queue_config),this.Ni=new Mq(this),this.__request_queue=[];var y=this.Ci();if(y||(this.sessionManager=new aS(this),this.sessionPropsManager=new nS(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ye.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.qi(y)}),0)):(ye.info("Initializing extensions synchronously"),this.qi(y)),on.DEBUG=on.DEBUG||this.config.debug,on.DEBUG&&ye.info("Starting in debug mode",{this:this,config:n,thisC:fe({},this.config),p:m,s:v}),!this.config.identity_distinct_id||(r=n.bootstrap)!=null&&r.distinctID||(n.bootstrap=fe({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var b=n.bootstrap.distinctID,x=this.get_distinct_id(),P=this.persistence.get_property(vr);if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===el)this.identify(b);else if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===tl)ye.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 T=this.config.get_device_id(wi()),L=n.bootstrap.isIdentifiedID?T:b;this.persistence.set_property(vr,n.bootstrap.isIdentifiedID?tl:el),this.register({distinct_id:b,$device_id:L})}}if(y)this.register_once({distinct_id:Nh,$device_id:null},"");else if(!this.get_distinct_id()){var E=this.config.get_device_id(wi());this.register_once({distinct_id:E,$device_id:E},""),this.persistence.set_property(vr,el)}return Qt(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(A,I){var B=A.config.segment;if(!B)return I();(function(D,S){var j=D.config.segment;if(!j)return S();var F=ee=>{var de=()=>ee.anonymousId()||wi();D.config.get_device_id=de,ee.id()&&(D.register({distinct_id:ee.id(),$device_id:de()}),D.persistence.set_property(vr,tl)),S()},Z=j.user();"then"in Z&&yr(Z.then)?Z.then(F):F(Z)})(A,(()=>{B.register((D=>{typeof Promise<"u"&&Promise.resolve||Av.warn("This browser does not have Promise support, and can not use the segment integration");var S=(j,F)=>{if(!F)return j;j.event.userId||j.event.anonymousId===D.get_distinct_id()||(Av.info("No userId set, resetting PostHog"),D.reset()),j.event.userId&&j.event.userId!==D.get_distinct_id()&&(Av.info("UserId set, identifying with PostHog"),D.identify(j.event.userId));var Z=D.calculateEventProperties(F,j.event.properties);return j.event.properties=Object.assign({},Z,j.event.properties),j};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:j=>S(j,j.event.event),page:j=>S(j,ul),identify:j=>S(j,Cv),screen:j=>S(j,"$screen")}})(A)).then((()=>{I()}))}))})(this,(()=>this.Bi())):this.Bi(),yr(this.config._onCapture)&&this.config._onCapture!==_f&&(ye.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(A=>this.config._onCapture(A.event,A)))),this.config.ip&&ye.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 d6.apply(this,arguments)})().then((A=>{A&&this.register({[Pv]:A})})).catch(_f),this}qi(e){var n,a,r,s,l,c,u,h=performance.now(),p=fe({},Wa.__defaultExtensionClasses,this.config.__extensionClasses),m=[];p.featureFlags&&this.Si.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Si.push(this.exceptions=(a=this.exceptions)!==null&&a!==void 0?a:new p.exceptions(this)),p.historyAutocapture&&this.Si.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Si.push(this.tracingHeaders=new p.tracingHeaders(this)),p.siteApps&&this.Si.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!e&&this.Si.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Si.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Si.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new p.surveys(this)),p.logs&&this.Si.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Si.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new p.conversations(this)),p.productTours&&this.Si.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Si.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Si.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,hq)),p.toolbar&&this.Si.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Si.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new p.experiments(this)),this.Si.forEach((v=>{v.initialize&&m.push((()=>{v.initialize==null||v.initialize()}))})),m.push((()=>{if(this.ji){var v=this.ji;this.ji=void 0,this.pr(v)}})),this.Hi(m,h)}Hi(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Hi(e,n)}),0);var a=e.shift();if(a)try{a()}catch(s){ye.error("Error initializing extension:",s)}}var r=Math.round(performance.now()-n);this.register_for_session({[TE]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[EE]:r}),this.config.__preview_deferred_init_extensions&&ye.info("PostHog extensions initialized ("+r+"ms)")}pr(e){var n;if(!we||!we.body)return ye.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.pr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ke(e.supportedCompression,Ha.GZipJS)?Ha.GZipJS:Ke(e.supportedCompression,Ha.Base64)?Ha.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:ky}),this.Si.forEach((a=>a.onRemoteConfig==null?void 0:a.onRemoteConfig(e)))}Bi(){try{this.config.loaded(this)}catch(a){ye.critical("`loaded` function failed",a)}if(this.zi(),this.config.internal_or_test_user_hostname&&pn!=null&&pn.hostname){var e=pn.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.Ci())&&this.Vi()}),1),this.Wi=new e6(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Oh(this.__request_queue,(e=>this.Di(e))),this.__request_queue=[],this.zi()}_handle_unload(){var e,n,a,r;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(Sv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(a=this.$i)==null||a.unload(),(r=this.Ni)==null||r.unload()):this.Gi()&&this.capture(Sv,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?m6?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=fe({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(be(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var a,r,s,l=fe({},n);l.timeout=l.timeout||6e4,l.url=tS(l.url,l.compression);var c=(a=l.transport)!==null&&a!==void 0?a:"fetch",u=fp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(r=(s=(function(p,m){for(var v=0;p.length>v;v++)if(p[v].transport===c)return p[v]})(u))==null?void 0:s.method)!==null&&r!==void 0?r:u[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===Ha.GZipJS&&ZW&&typeof Promise<"u"&&!pp?Rq(l).then((p=>{h(p)})).catch((p=>{if(CP(p))return pp=!0,void h(fe({},l,{compression:void 0,url:tS(n.url,void 0)}));(m=>{if(!m||typeof m!="object")return!1;var v="name"in m?String(m.name):"";return CP(m)||v===$4})(p)&&(pp=!0),h(l)})):h(l)})(fe({},e,{callback:n=>{var a,r;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(a=(r=this.config).on_request_error)==null||a.call(r,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Nv++;try{var n,a=[],r=[],s=[];Oh(e,(c=>{if(c)if(ct(n=c[0]))s.push(c);else if(yr(c))try{c.call(this)}catch(u){ye.error("Error executing queued PostHog call",c,u)}else ct(c)&&n==="alias"?a.push(c):ct(c)&&n.indexOf("capture")!==-1&&yr(this[n])?s.push(c):r.push(c)}));var l=function(c,u){Oh(c,(function(h){try{if(ct(h[0])){var p=u;Mt(h,(function(m){p=p[m[0]].apply(p,m.slice(1))}))}else u[h[0]].apply(u,h.slice(1))}catch(m){ye.error("Error executing queued PostHog call",h,m)}}))};l(a,this),l(r,this),l(s,this)}finally{Nv--}}push(e){if(Nv>0&&ct(e)&&Lt(e[0])){var n=Wa.prototype[e[0]];yr(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,a){var r,s,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!be(e)&&Lt(e)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=a!=null&&a.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){n!=null&&n.$current_url&&!Lt(n?.$current_url)&&(ye.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"||a!=null&&a.Zi||ye.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 m=new Date,v=a?.timestamp||m,y=LP(a?.uuid,wi),b={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},v,y)};e===ul&&this.config.__preview_capture_bot_pageviews&&h&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),p&&(b.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),a?.$set&&(b.$set=a?.$set);var x=a?.$unset;x&&(b.$unset=x);var P,T,L,E=this.Qi(a?.$set_once,e!==MP,e===Cv);if(E&&(b.$set_once=E),a!=null&&a._noTruncate||(s=this.config.properties_string_max_length,l=b,c=F=>Lt(F)?F.slice(0,s):F,u=new Set,b=(function F(Z,ee){return Z!==Object(Z)?c?c(Z):Z:u.has(Z)?void 0:(u.add(Z),ct(Z)?(de=[],Oh(Z,(ae=>{de.push(F(ae))}))):(de={},Mt(Z,((ae,re)=>{u.has(ae)||(de[re]=F(ae))}))),de);var de})(l)),b.timestamp=v,be(a?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=m),e===Pi.DISMISSED||e===Pi.SENT){var A=n?.[Dv.SURVEY_ID],I=n?.[Dv.SURVEY_ITERATION];p6({id:A,current_iteration:I}),b.$set=fe({},b.$set,{[(P={id:A,current_iteration:I},T=e===Pi.SENT?"responded":"dismissed",L="$survey_"+T+"/"+P.id,P.current_iteration&&P.current_iteration>0&&(L="$survey_"+T+"/"+P.id+"/"+P.current_iteration),L)]:!0})}else e===Pi.SHOWN&&(b.$set=fe({},b.$set,{[Dv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===wq.SHOWN){var B=n?.[qP.TOUR_TYPE];B&&(b.$set=fe({},b.$set,{[qP.TOUR_LAST_SEEN_DATE+"/"+B]:new Date().toISOString()}))}var D=fe({},b.properties.$set,b.$set);if(cs(D)||this.setPersonPropertiesForFlags(D),!nt(this.config.before_send)){var S=this.it(b);if(!S)return;(b=S).uuid=LP(b.uuid,wi)}this.Ti.emit("eventCaptured",b);var j={method:"POST",url:(r=a?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:a?._batchKey,transport:a?.transport};return!this.config.request_batching||a&&(a==null||!a._batchKey)||a!=null&&a.send_instantly?this.Di(j):this.$i.enqueue(j),b}ye.critical("This capture call is ignored due to client rate limiting.")}}else ye.error("No event name provided to posthog.capture")}else ye.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,a,r,s){if(a=a||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(e),c=fe({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ci()&&(c.$cookieless_mode=!0),e==="$snapshot"){var u=fe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!Lt(c.distinct_id)&&!Bn(c.distinct_id)||J_(c.distinct_id))&&ye.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(T,L,E,A){var I,B,D,S;if(A===void 0&&(A=!1),!ga)return{};var j,F,Z,ee,de,ae,re,te,le,H=T?[...zl,...L||[]]:[],[Q,W]=(function(ke){for(var me=0;AP.length>me;me++){var[_e,Me]=AP[me],Oe=_e.exec(ke),Le=Oe&&(yr(Me)?Me(Oe,ke):Me);if(Le)return Le}return["",""]})(ga),N=(j=typeof navigator<"u"?navigator:void 0)!=null&&j.brave?{brave:!0}:{},Y={detectGoogleSearchApp:E},ue=Bt(Pb({$os:Q,$os_version:W,$browser:uE(ga,navigator.vendor,N,Y),$device:RP(ga),$device_type:(Z=ga,ee={userAgentDataPlatform:(I=navigator)==null||(I=I.userAgentData)==null?void 0:I.platform,maxTouchPoints:(B=navigator)==null?void 0:B.maxTouchPoints,screenWidth:J==null||(D=J.screen)==null?void 0:D.width,screenHeight:J==null||(S=J.screen)==null?void 0:S.height,devicePixelRatio:J?.devicePixelRatio},le=RP(Z),le===q4||le===G4||le==="Kobo"||le==="Kindle Fire"||le===sE?Ml:le===Fd||le===Pl||le===Ud||le===Q_?"Console":le===Y4?"Wearable":le?La:ee?.userAgentDataPlatform==="Android"&&((de=ee?.maxTouchPoints)!==null&&de!==void 0?de:0)>0?600>Math.min((ae=ee?.screenWidth)!==null&&ae!==void 0?ae:0,(re=ee?.screenHeight)!==null&&re!==void 0?re:0)/((te=ee?.devicePixelRatio)!==null&&te!==void 0?te:1)?La:Ml:"Desktop"),$timezone:QE(),$timezone_offset:_q()}),{$current_url:Hd(A?ms(pn?.href):pn?.href,H,Wd),$host:pn?.host,$pathname:pn?.pathname,$raw_user_agent:ga.length>1e3?ga.substring(0,997)+"...":ga,$browser_version:mG(ga,navigator.vendor,N,Y),$browser_language:GP(),$browser_language_prefix:(F=GP(),typeof F=="string"?F.split("-")[0]:void 0),$screen_height:J?.screen.height,$screen_width:J?.screen.width,$viewport_height:J?.innerHeight,$viewport_width:J?.innerWidth,$lib:on.LIB_NAME,$lib_version:on.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return on.SDK_DIST_CHANNEL&&(ue.$sdk_dist_channel=on.SDK_DIST_CHANNEL),ue})(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{sessionId:m,windowId:v}=this.sessionManager.checkAndGetSessionAndWindowId(s,a.getTime());c.$session_id=m,c.$window_id=v}this.sessionPropsManager&&Bt(c,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&Bt(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(y=this.Ni)==null?void 0:y.length}catch(T){c.$sdk_debug_error_capturing_properties=String(T)}if(this.requestRouter.region===Ry&&(c.$lib_custom_api_host=this.config.api_host),h=e!==ul||s?e!==Sv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(a):this.pageViewManager.doPageView(a,r),c=Bt(c,h),e===ul&&we&&(c.title=we.title),!be(l)){var b=a.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}ga&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Bt({},p,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),ct(this.config.property_denylist)?Mt(this.config.property_denylist,(function(T){delete c[T]})):ye.error(f6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(ye.error(oS),c=x(c,e));var P=this.Ji();return c.$process_person_profile=P,P&&!s&&this.Yi("_calculate_event_properties"),c}Qi(e,n,a){var r;if(n===void 0&&(n=!0),a===void 0&&(a=!1),!this.persistence||!this.Ji()||this.Ii&&!a)return e;var s=this.persistence.get_initial_props(),l=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),c=Bt({},s,l||{},e||{}),u=this.config.sanitize_properties;return u&&(ye.error(oS),c=u(c,"$set_once")),n&&(this.Ii=!0),cs(c)?void 0:c}register(e,n){var a;(a=this.persistence)==null||a.register(e,n)}register_once(e,n,a){var r;(r=this.persistence)==null||r.register_once(e,n,a)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ki(e,n){this.register({[e]:n})}getFeatureFlag(e,n){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var a;return(a=this.featureFlags)==null?void 0:a.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 a;return(a=this.featureFlags)==null?void 0:a.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,a){var r;(r=this.featureFlags)==null||r.updateFlags(e,n,a)}updateEarlyAccessFeatureEnrollment(e,n,a){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,n,a)}getEarlyAccessFeatures(e,n,a){var r;return n===void 0&&(n=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(e,n,a)}on(e,n){return this.Ti.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:Zc}),()=>{})}onSessionId(e){var n,a;return(n=(a=this.sessionManager)==null?void 0:a.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:Zc})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Zc})}renderSurvey(e,n){var a;(a=this.surveys)==null||a.renderSurvey(e,n)}displaySurvey(e,n){var a;n===void 0&&(n=Uq),(a=this.surveys)==null||a.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,a;return(n=(a=this.surveys)==null?void 0:a.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:Zc}}canRenderSurveyAsync(e,n){var a,r;return n===void 0&&(n=!1),(a=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(e,n))!==null&&a!==void 0?a:Promise.resolve({visible:!1,disabledReason:Zc})}Xi(e){return!e||J_(e)?(ye.critical("Unique user id has not been set in posthog.identify"),!1):e===Nh?(ye.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())||(ye.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,a){if(!this.__loaded||!this.persistence)return ye.uninitializedWarning("posthog.identify");if(Bn(e)&&(e=e.toString(),ye.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(e)&&this.Yi("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(sf)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(sd)&&(this.unregister(sd),this.register({distinct_id:e}));var s,l=(this.persistence.get_property(vr)||el)===el;e!==r&&l?(this.persistence.set_property(vr,tl),this.setPersonPropertiesForFlags({$set:n||{},$set_once:a||{}},!1),this.capture(Cv,{distinct_id:e,$anon_distinct_id:r},{$set:n||{},$set_once:a||{}}),this.Ri=rS(e,n,a),(s=this.featureFlags)==null||s.setAnonymousDistinctId(r)):(n||a)&&this.setPersonProperties(n,a),e!==r&&(this.reloadFeatureFlags(),this.unregister(xd))}}setPersonProperties(e,n){if((e||n)&&this.Yi("posthog.setPersonProperties")){var a=rS(this.get_distinct_id(),e,n);this.Ri!==a?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ri=a):ye.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,a=(ct(e)?e:[e]).filter((r=>Lt(r)&&r.length>0));a.length!==0&&this.Yi("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(a,!0),this.capture("$set",{$unset:a}),this.Ri=null)}group(e,n,a){if(e&&n){var r=this.getGroups(),s=r[e]!==n;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:fe({},r,{[e]:n})}),s||a){var l={$group_type:e,$group_key:n};a&&(l.$group_set=a),this.capture(MP,l)}a&&this.setGroupPropertiesForFlags({[e]:a}),s&&!a&&this.reloadFeatureFlags()}else ye.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var a;n===void 0&&(n=!0),(a=this.featureFlags)==null||a.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var a;n===void 0&&(n=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&((a=this.featureFlags)==null||a.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n,a,r,s,l,c,u,h,p;if(ye.info("reset"),!this.__loaded)return ye.uninitializedWarning("posthog.reset");var m,v=this.get_property(sf),y=this.get_property(Pv),b=this.get_property(ao);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(a=this.sessionPersistence)==null||a.clear(),be(b)||(m=this.persistence)==null||m.register({[ao]:b}),(r=this.surveys)==null||r.reset(),(s=this.Wi)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.logs)==null||u.reset(),(h=this.persistence)==null||h.set_property(vr,el),(p=this.sessionManager)==null||p.resetSessionId(),this.Ri=null,this.config.cookieless_mode===xi)this.register_once({distinct_id:Nh,$device_id:null},"");else{var x=this.config.get_device_id(wi());this.register_once({distinct_id:x,$device_id:e?x:v},""),e||be(y)||this.register({[Pv]:y})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var n=this;return _n((function*(){var a,r,s,l;n.__loaded?((a=n.logs)==null||a.flushLogs("sendBeacon"),(r=n.$i)==null||r.unload(),(s=n.Ni)==null||s.unload(),(l=n.featureFlags)==null||l.destroy()):ye.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var a;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(a=this.conversations)==null||a.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:a}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&a){var s,l=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!a)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-a)/1e3)-l,0)}return r}alias(e,n){return e===this.get_property(bE)?(ye.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(be(n)&&(n=this.get_distinct_id()),e!==n?(this.Ki(sd,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(ye.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=fe({},this.config);if(qt(e)){var a,r,s,l,c,u,h,p,m,v,y;Bt(this.config,cS(e));var b=this.Ai();(a=this.persistence)==null||a.update_config(this.config,n,b),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Rv(fe({},this.config,{persistence:"sessionStorage"}),b,!1);var x=this.Oi(this.config.debug);Hr(x)&&(this.config.debug=x),Hr(this.config.debug)&&(this.config.debug?(on.DEBUG=!0,It.N()&&It.q("ph_debug",!0),ye.info("set_config",{config:e,oldConfig:n,newConfig:fe({},this.config)})):(on.DEBUG=!1,It.N()&&It.P("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.rn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){on.LIB_NAME=e,on.LIB_VERSION=n}startSessionRecording(e){var n,a,r,s,l,c=e===!0,u={sampling:c||!(e==null||!e.sampling),linked_flag:c||!(e==null||!e.linked_flag),url_trigger:c||!(e==null||!e.url_trigger),event_trigger:c||!(e==null||!e.event_trigger)};Object.values(u).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),u.sampling&&((a=this.sessionRecording)==null||a.overrideSampling()),u.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var a=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:a});return this.exceptions.sendExceptionEvent(fe({},r,n))}}addExceptionStep(e,n){var a;(a=this.exceptions)==null||a.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:Wa.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,a;return(n=(a=this.toolbar)==null?void 0:a.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:hl;return n!==hl&&(n=hl+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(vr))===tl||((n=this.sessionPersistence)==null?void 0:n.get_property(vr))===tl}Ji(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===ky&&!this._isIdentified()&&cs(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[sd])&&((n=this.persistence)==null||(n=n.props)==null||!n[cf]))}Gi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return this.config.person_profiles==="never"?(ye.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(cf,!0),!0)}Ai(){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!==Ks)}rn(){var e,n,a,r,s=this.Ai();return((e=this.persistence)==null?void 0:e.Vt)!==s&&((a=this.persistence)==null||a.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Vt)!==s&&((r=this.sessionPersistence)==null||r.set_disabled(s)),s}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==xi){if(this.Ci()){var a,r,s,l,c;this.reset(!0),(a=this.sessionManager)==null||a.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new aS(this),this.pageViewManager=new WP(this),this.persistence&&(this.sessionPropsManager=new nS(this,this.sessionManager,this.persistence));var u,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Wa.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.ki(this.sessionRecording,new h(this)),this.Ui&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Ui)))}var p,m;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ks&&((p=this.surveys)==null||p.loadIfEnabled()),(be(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((m=e?.captureEventName)!==null&&m!==void 0?m:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else ye.warn(sS)}opt_out_capturing(){var e,n,a;this.config.cookieless_mode!==xi?(this.config.cookieless_mode===Ks&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Ks&&(this.register({distinct_id:Nh,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(a=this.pageViewManager)==null||a.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):ye.warn(sS)}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===xi||(this.config.cookieless_mode===Ks?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return ia?c6(ia,this.config.custom_blocked_useragents):void 0}Vi(){we&&(we.visibilityState==="visible"?this.Ei||(this.Ei=!0,this.capture(ul,{title:we.title},{send_instantly:!0}),this.Mi&&(we.removeEventListener(df,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),Qt(we,df,this.Mi)))}debug(e){e===!1?(J?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(J?.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}))}mr(){var e,n,a,r,s,l,c=this.Li||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ye.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):(a="advanced_disable_decide",r=ye,s=(n="advanced_disable_flags")in(e=c)&&!nt(e[n]),l=a in e&&!nt(e[a]),s?e[n]:!!l&&(r&&r.warn("Config field '"+a+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[a]))}it(e){var n;if(nt(this.config.before_send))return e;var a=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(aG),r=ct(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var l of r){if(s=l(s),nt(s)){var c="Event '"+e.event+"' was rejected in beforeSend function";return nG(e.event)?ye.warn(c+". This can cause unexpected behavior."):ye.info(c),null}s.properties&&!cs(s.properties)||ye.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var u of a)if(s.properties&&nt(s.properties[u]))return ye.warn("Event '"+e.event+"' had its '"+u+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var e;return(e=this.pageViewManager.Ot)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,a){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(a)})}Oi(e){var n=Hr(e)&&!e,a=It.N()&&It.A("ph_debug")==="true";return!n&&(!!a||e)}}Wa.__defaultExtensionClasses={},Wa.nn=(()=>{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]]=HG(t.prototype[e[n]])})(Wa,["identify"]);class dS{constructor(e){this.disabled=e===!1;var n=qt(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,a){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(n-r.y)<this.thresholdPx&&this.timeoutMs>a-r.timestamp){if(this.clicks.push({x:e,y:n,timestamp:a}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:a}];return!1}}var Ov="$copy_autocapture",jv=tn("[AutoCapture]");function zv(t,e){return e.length>t?e.slice(0,t)+"...":e}function Gq(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!gs(e));return e}function qq(t,e){var n,a,{e:r,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:u,disableCaptureUrlHashes:h}=e;if(!gs(t))return{props:{}};for(var p=[t],m=t;m.parentNode&&!Aa(m,"body");)if(ME(m.parentNode))p.push(m.parentNode.host),m=m.parentNode.host;else{if(!gs(m.parentNode))break;p.push(m.parentNode),m=m.parentNode}var v,y,b=[],x={},P=!1,T=!1;if(Mt(p,(B=>{var D=xy(B);if(Aa(B,"a")){var S=B.getAttribute("href");P=!!(D&&S&&Pd(S))&&(h?ms(S):S)}Ke(pf(B),"ph-no-capture")&&(T=!0),b.push((function(F,Z,ee,de,ae){ae===void 0&&(ae=!1);var re=F.tagName.toLowerCase(),te={tag_name:re};Cb.indexOf(re)>-1&&!ee&&(te.$el_text=re.toLowerCase()==="a"||re.toLowerCase()==="button"?zv(1024,$P(F)):zv(1024,$d(F)));var le=pf(F);le.length>0&&(te.classes=le.filter((function(N){return N!==""}))),Mt(F.attributes,(function(N){var Y;if((!FE(F)||["name","id","class","aria-label"].indexOf(N.name)!==-1)&&(de==null||!de.includes(N.name))&&!Z&&Pd(N.value)&&(!Lt(Y=N.name)||Y.substring(0,10)!=="_ngcontent"&&Y.substring(0,7)!=="_nghost")){var ue=N.value;N.name==="class"&&(ue=Sb(ue).join(" ")),te["attr__"+N.name]=zv(1024,N.name==="href"&&ae?ms(ue):ue)}}));for(var H=1,Q=1,W=F;W=Gq(W);)H++,W.tagName===F.tagName&&Q++;return te.nth_child=H,te.nth_of_type=Q,te})(B,s,l,c,h));var j=(function(F){if(!xy(F))return{};var Z={};return Mt(F.attributes,(function(ee){if(ee.name&&ee.name.indexOf("data-ph-capture-attribute")===0){var de=ee.name.replace("data-ph-capture-attribute-",""),ae=ee.value;de&&ae&&Pd(ae)&&(Z[de]=ae)}})),Z})(B);Bt(x,j)})),T)return{props:{},explicitNoCapture:T};if(l||(b[0].$el_text=Aa(t,"a")||Aa(t,"button")?$P(t):$d(t)),P){var L,E;b[0].attr__href=P;var A=(L=Vd(P))==null?void 0:L.host,I=J==null||(E=J.location)==null?void 0:E.host;A&&I&&A!==I&&(v=P)}return{props:Bt({$event_type:r.type,$ce_version:1},u?{}:{$elements:b},{$elements_chain:(y=b,(function(B){return B.map((D=>{var S,j,F="";if(D.tag_name&&(F+=D.tag_name),D.attr_class)for(var Z of(D.attr_class.sort(),D.attr_class))F+="."+Z.replace(/"/g,"");var ee=fe({},D.text?{text:D.text}:{},{"nth-child":(S=D.nth_child)!==null&&S!==void 0?S:0,"nth-of-type":(j=D.nth_of_type)!==null&&j!==void 0?j:0},D.href?{href:D.href}:{},D.attr_id?{attr_id:D.attr_id}:{},D.attributes),de={};return hp(ee).sort(((ae,re)=>{var[te]=ae,[le]=re;return te.localeCompare(le)})).forEach((ae=>{var[re,te]=ae;return de[VP(re.toString())]=VP(te.toString())})),(F+=":")+hp(de).map((ae=>{var[re,te]=ae;return re+'="'+te+'"'})).join("")})).join(";")})((function(B){return B.map((D=>{var S,j,F={text:(S=D.$el_text)==null?void 0:S.slice(0,400),tag_name:D.tag_name,href:(j=D.attr__href)==null?void 0:j.slice(0,2048),attr_class:dq(D),attr_id:D.attr__id,nth_child:D.nth_child,nth_of_type:D.nth_of_type,attributes:{}};return hp(D).filter((Z=>{var[ee]=Z;return ee.indexOf("attr__")===0})).forEach((Z=>{var[ee,de]=Z;return F.attributes[ee]=de})),F}))})(y)))},(n=b[0])!=null&&n.$el_text?{$el_text:(a=b[0])==null?void 0:a.$el_text}:{},v&&r.type==="click"?{$external_click_url:v}:{},x)}}var Jc=tn("[ExceptionAutocapture]"),uS=()=>{},Kq=tn("[TracingHeaders]"),Bs=tn("[Web Vitals]"),hS=9e5,pS="disabled",fS="lazy_loading",Xc="awaiting_config",$h="missing_config";tn("[SessionRecording]"),tn("[SessionRecording]");var Dy="[SessionRecording]",mi=tn(Dy),Yq=tn("[Heatmaps]");function mS(t){return qt(t)&&"clientX"in t&&"clientY"in t&&Bn(t.clientX)&&Bn(t.clientY)}var Fv=tn("[Product Tours]"),Uv=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(wb))},Zq=["$set_once","$set"],Mr=tn("[SiteApps]"),gS="Error while initializing PostHog app with config id ";function rl(t,e,n){if(nt(t))return!1;switch(n){case"exact":return t===e;case"contains":var a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(a,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class Jq{constructor(e){this.sn=new Rb,this.an=(n,a)=>this.ln(n,a)&&this.un(n,a)&&this.hn(n,a)&&this.dn(n,a),this.ln=(n,a)=>a==null||!a.event||n?.event===a?.event,this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e,n;be((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((a,r)=>{this.on(a,r)}))}register(e){var n,a;if(!be((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((l=>{var c,u;(c=this.vn)==null||c.add(l),(u=l.steps)==null||u.forEach((h=>{var p;(p=this.cn)==null||p.add(h?.event||"")}))})),(a=this._instance)!=null&&a.autocapture)){var r,s=new Set;e.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&s.add(u?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(s)}}on(e,n){var a;n!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(n?.event))&&this.vn&&((a=this.vn)==null?void 0:a.size)>0&&this.vn.forEach((r=>{this.fn(n,r)&&this.sn.emit("actionCaptured",r.name)}))}pn(e){this.onAction("actionCaptured",(n=>e(n)))}fn(e,n){if(n?.steps==null)return!1;for(var a of n.steps)if(this.an(e,a))return!0;return!1}onAction(e,n){return this.sn.on(e,n)}un(e,n){if(n!=null&&n.url){var a,r=e==null||(a=e.properties)==null?void 0:a.$current_url;if(!r||typeof r!="string"||!rl(r,n.url,n.url_matching||"contains"))return!1}return!0}hn(e,n){return!!this.gn(e,n)&&!!this.mn(e,n)&&!!this.yn(e,n)}gn(e,n){var a;if(n==null||!n.href)return!0;var r=this.bn(e);if(r.length>0)return r.some((c=>rl(c.href,n.href,n.href_matching||"exact")));var s,l=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";return!!l&&rl((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}mn(e,n){var a;if(n==null||!n.text)return!0;var r=this.bn(e);if(r.length>0)return r.some((h=>rl(h.text,n.text,n.text_matching||"exact")||rl(h.$el_text,n.text,n.text_matching||"exact")));var s,l,c,u=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";return!!u&&(s=(function(h){for(var p,m=[],v=/(?::|")text="(.*?)"/g;!nt(p=v.exec(h));)m.includes(p[1])||m.push(p[1]);return m})(u),l=n.text,c=n.text_matching||"exact",s.some((h=>rl(h,l,c))))}yn(e,n){var a,r;if(n==null||!n.selector)return!0;var s=e==null||(a=e.properties)==null?void 0:a.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}bn(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e?.properties.$elements}dn(e,n){return n==null||!n.properties||n.properties.length===0||h6(n.properties.reduce(((a,r)=>{var s=ct(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return a[r.key]={values:s,operator:r.operator||"exact"},a}),{}),e?.properties)}}class Xq{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,n){return!!e&&h6(e.propertyFilters,n?.properties)}Cn(e,n){var a=new Map;return e.forEach((r=>{var s;(s=r.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=a.get(l.name)||[];c.push(r.id),a.set(l.name,c)}}))})),a}In(e,n,a){var r=(a===Wc.Activation?this.wn:this.xn).get(e),s=[];return this.Tn((l=>{s=l.filter((c=>r?.includes(c.id)))})),s.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[a])==null||(c=c.values)==null?void 0:c.find((h=>h.name===e));return this.Sn(u,n)}))}register(e){var n;be((n=this._instance)==null?void 0:n._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var n=e.filter((a=>{var r,s;return((r=a.conditions)==null?void 0:r.actions)&&((s=a.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Pn==null&&(this.Pn=new Jq(this._instance),this.Pn.init(),this.Pn.pn((a=>{this.onAction(a)}))),n.forEach((a=>{var r,s,l,c,u;a.conditions&&(r=a.conditions)!=null&&r.actions&&(s=a.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=a.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Pn)==null||c.register(a.conditions.actions.values),(u=a.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((h=>{if(h&&h.name){var p=this.kn.get(h.name);p&&p.push(a.id),this.kn.set(h.name,p||[a.id])}})))})))}En(e){var n,a=e.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),r=e.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));a.length===0&&r.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.wn=this.Cn(e,Wc.Activation),this.xn=this.Cn(e,Wc.Cancellation))}onEvent(e,n){var a,r,s=this.Rn(),l=(n==null||(a=n.properties)==null?void 0:a.$survey_id)||(n==null||(r=n.properties)==null?void 0:r.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.On(e,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:e,itemId:l}),void this.Ln([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:e,itemId:l}),void this.Fn(l)}if(this.xn.has(e)){var u=this.In(e,n,Wc.Cancellation);u.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:u.map((p=>p.id))}),this.Ln(u.map((p=>p.id))),u.forEach((p=>this.An(p.id))))}if(this.wn.has(e)){s.info("event name matched",{event:e,eventPayload:n,items:this.wn.get(e)});var h=this.In(e,n,Wc.Activation);this.$n(h.map((p=>p.id)))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){e.length!==0&&(this._n=[...new Set([...this._n,...e])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter((a=>a!==e));var n=this.Dn();n.includes(e)||this.Nn([...n,e])}Ln(e){var n=new Set(e);this._n=this._n.filter((s=>!n.has(s)));var a=this.Dn(),r=a.filter((s=>!n.has(s)));r.length!==a.length&&this.Nn(r)}Dn(){var e,n=this.qn();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter((e=>!this.Bn(e)))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}jn(){return this.Pn}}class Qq extends Xq{constructor(e){super(e)}qn(){return py}Hn(){return Pi.SHOWN}Tn(e){var n;(n=this._instance)==null||n.getSurveys(e)}An(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}Rn(){return Rt}Nn(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[py]:e})}Bn(){return!1}On(e,n){var a;this.Tn((s=>{a=s.find((l=>l.id===n))}));var r=!a||(function(s){var l,c,u,h=((l=(c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)!==null&&l!==void 0?l:0)>0;return s.schedule===kq.Always||!((u=s.conditions)==null||(u=u.events)==null||!u.repeatedActivation||!h)})(a);return r?e===Pi.SHOWN?"consume":"ignore":e===Pi.SHOWN?"persist":e===Pi.DISMISSED||e===Pi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Bv="SDK is not enabled or survey functionality is not yet loaded",vS="Disabled. Not loading surveys.",eK=J!=null&&J.location?ff(J.location.hash,"__posthog")||ff(location.hash,"state"):null,_S="_postHogToolbarParams",yS=tn("[Toolbar]"),mn=tn("[FeatureFlags]"),$s=tn("[FeatureFlags]",{debugEnabled:!0}),$v=`" failed. Feature flags didn't load in time.`,bS=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},kS=t=>{var e={};for(var[n,a]of hp(t||{}))a&&(e[n]=a);return e},gi=tn("[Error tracking]"),wS="Refusing to render web experiment since the viewer is a likely bot",tK={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>vf(e,t),not_regex:(t,e)=>!vf(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Zn{get Se(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(a){a===void 0&&(a=!1),n.getWebExperiments((r=>{Zn.Un("retrieved web experiments from the server"),n.zn=new Map,r.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(Zn.Un("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);Lt(c)&&s.variants[c]&&n.Vn(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var u in s.variants){var h=s.variants[u];Zn.Wn(h,n._instance)&&n.Vn(s.name,u,h.transforms)}}))}),a)},this._instance=e,this._instance.onFeatureFlags((a=>{this.onFeatureFlags(a)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Zn.Un(wS);else if(!this.Se.disable_web_experiments){if(nt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Zn.Un("applying feature flags",e),e.forEach((n=>{var a;if(this.zn&&(a=this.zn)!=null&&a.has(n)){var r,s=this._instance.getFeatureFlag(n),l=(r=this.zn)==null?void 0:r.get(n);s&&l!=null&&l.variants[s]&&this.Vn(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var e=Zn.getWindowLocation();if(e!=null&&e.search){var n=jl(e?.search,"__experiment_id"),a=jl(e?.search,"__experiment_variant");n&&a&&(Zn.Un("previewing web experiments "+n+" && "+a),this.getWebExperiments((r=>{this.Gn(parseInt(n),a,r)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,a){if(this.Se.disable_web_experiments&&!a)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!n)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>e(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(e,n,a){var r=a.filter((s=>s.id===e));r&&r.length>0&&(Zn.Un("Previewing web experiment ["+r[0].name+"] with variant ["+n+"]"),this.Vn(r[0].name,n,r[0].variants[n].transforms))}static Wn(e,n){return!nt(e.conditions)&&Zn.Zn(e,n)&&Zn.Qn(e)}static Zn(e,n){var a;if(nt(e.conditions)||nt((a=e.conditions)==null?void 0:a.url))return!0;var r=Zn.getWindowLocation();if(r){var s,l,c,u=DE(n,r.href);return(s=e.conditions)==null||!s.url||tK[(l=(c=e.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](e.conditions.url,u)}return!1}static getWindowLocation(){return J?.location}static Qn(e){var n;if(nt(e.conditions)||nt((n=e.conditions)==null?void 0:n.utm))return!0;var a=qE();if(a.utm_source){var r,s,l,c,u,h,p,m,v=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==a.utm_campaign,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==a.utm_source,b=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_medium||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==a.utm_medium,x=(p=e.conditions)==null||(p=p.utm)==null||!p.utm_term||((m=e.conditions)==null||(m=m.utm)==null?void 0:m.utm_term)==a.utm_term;return v&&b&&x&&y}return!1}static Un(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;n>r;r++)a[r-1]=arguments[r];ye.info("[WebExperiments] "+e,a)}Vn(e,n,a){this._is_bot()?Zn.Un(wS):n!=="control"?a.forEach((r=>{if(r.selector){var s;Zn.Un("applying transform of variant "+n+" for experiment "+e+" ",r);var l=(s=document)==null?void 0:s.querySelectorAll(r.selector);l?.forEach((c=>{var u=c;r.html&&(u.innerHTML=r.html),r.css&&u.setAttribute("style",r.css)}))}})):Zn.Un("Control variants leave the page unmodified.")}_is_bot(){return ia&&this._instance?c6(ia,this.Se.custom_blocked_useragents):void 0}}var Ua=tn("[Conversations]"),Vs="Conversations not available yet.",xS="console",Hf={featureFlags:class{constructor(t){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=0,this.os=()=>{var e=this.ls();this.ss=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],J&&Qt(J,"online",this.os)}destroy(){J?.removeEventListener("online",this.os)}get Se(){return this._instance.config}get zr(){return this._instance.persistence}us(t){return this._instance.get_property(t)}hs(){var t,e;return(t=(e=this.zr)==null?void 0:e.Gt(this.Se.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}ds(){return!!this.hs()&&(this.ns||this.Kn||(this.ns=!0,mn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}cs(){var t,e=(t=this.Se.evaluation_contexts)!==null&&t!==void 0?t:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(mn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),e!=null&&e.length?e.filter((n=>{var a=n&&typeof n=="string"&&n.trim().length>0;return a||mn.error("Invalid evaluation context found:",n,"Expected non-empty string"),a})):[]}vs(){return this.cs().length>0}fs(){var t=this.Se.flag_keys;if(!be(t)){if(ct(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||mn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));mn.error("Invalid flag_keys found:",t,"Expected array of non-empty strings")}}initialize(){var t,e,{config:n}=this._instance,a=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(a).length){var r,s,l=(r=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&r!==void 0?r:{},c=Object.keys(a).filter((h=>!!a[h])).reduce(((h,p)=>(h[p]=a[p]||!1,h)),{}),u=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(t,e,n){var a,r,s=n!=null&&n.merge&&(a=this.us(Ys))!==null&&a!==void 0?a:{},l=n!=null&&n.merge&&(r=this.us(up))!==null&&r!==void 0?r:{},c=fe({},s,t),u=fe({},l,e),h={};for(var[p,m]of Object.entries(c))h[p]={key:p,enabled:wP(m),variant:xP(m),reason:void 0,metadata:be(u?.[p])?void 0:{id:0,version:void 0,description:void 0,payload:u[p]}};this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.us(dy),e=this.us(bi),n=this.us(dl);if(!n&&!e)return t||{};var a=Bt({},t||{}),r=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var s of r){var l,c,u=a[s],h=e?.[s],p=be(h)?(l=u?.enabled)!==null&&l!==void 0&&l:!!h,m=be(h)?u.variant:typeof h=="string"?h:void 0,v=n?.[s],y=fe({},u,{enabled:p,variant:p?m??u?.variant:void 0});p!==u?.enabled&&(y.original_enabled=u?.enabled),m!==u?.variant&&(y.original_variant=u?.variant),v&&(y.metadata=fe({},u?.metadata,{payload:v,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),a[s]=y}return this.Jn||(mn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:a}),this.Jn=!0),a}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var a=t[n];return{key:n,enabled:wP(a),variant:xP(a),payload:kP(e[n])}}))}getFlagVariants(){var t=this.us(Ys),e=this.us(bi);if(!e)return t||{};for(var n=Bt({},t),a=Object.keys(e),r=0;a.length>r;r++)n[a[r]]=e[a[r]];return this.Jn||(mn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var t=this.us(up),e=this.us(dl);if(!e)return t||{};for(var n=Bt({},t||{}),a=Object.keys(e),r=0;a.length>r;r++)n[a[r]]=e[a[r]];return this.Jn||(mn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.ls()||this.ps||(this._instance.Ti.emit("featureFlagsReloading",!0),this.ps=setTimeout((()=>{this.gs()}),5))}ys(){clearTimeout(this.ps),this.ps=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.ps||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Xn=t}gs(t){var e;if(this.ys(),!this._instance.mr()&&!this.ls())if(this.Kn)this.es=!0;else{var n=this.Se.token,a=this.us(sf),r={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:fe({},((e=this.zr)==null?void 0:e.get_initial_props())||{},this.us(Gs)||{}),group_properties:this.us(qs),timezone:QE()};oa(a)||be(a)||(r.$device_id=a),(t!=null&&t.disableFlags||this.Se.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.vs()&&(r.evaluation_contexts=this.cs());var s=this.fs();be(s)||(r.flag_keys=s);var l=!!this.Se.advanced_only_evaluate_survey_feature_flags,c=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Kn=!0,this._instance._send_request({method:"POST",url:c,data:r,compression:this.Se.disable_compression?void 0:Ha.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:u=>{var h,p,m,v=!0;if(this.bs(u.statusCode),u.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),v=!1),this.Kn=!1,!r.disable_flags||this.es){this.ts=!v;var y=[];u.error?u.error instanceof Error?y.push(u.error.name==="AbortError"?"timeout":"connection_error"):y.push("unknown_error"):u.statusCode!==200&&y.push("api_error_"+u.statusCode),(h=u.json)!=null&&h.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var b,x=!((p=u.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&y.push("quota_limited"),(m=this.zr)==null||m.register({[my]:y}),x?mn.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."):(r.disable_flags||this.receivedFeatureFlags((b=u.json)!==null&&b!==void 0?b:{},v,{partialResponse:l}),this.es&&(this.es=!1,this.gs()))}}})}}ls(){return WE(this.ss,3)}bs(t){this.ss=GE(t,this.ss,3,(()=>mn.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.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var a=this.getFeatureFlagResult(t,e);return(n=a?.variant)!==null&&n!==void 0?n:a?.enabled}}else mn.warn('getFeatureFlag for key "'+t+$v)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var n=this.getFlagVariants(),a=t in n,r=n[t],s=this.getFlagPayloads()[t],l=String(r),c=this.us(uy)||void 0,u=this.us(Bd)||void 0,h=this.us(xd)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,m=this._instance.get_session_id(),v=this.us(fy);m&&m!==v&&(h={},(p=this.zr)==null||p.register({[xd]:h,[fy]:m}))}if((e.send_event||!("send_event"in e))&&(!(t in h)||!h[t].includes(l))){var y,b,x,P,T,L,E,A,I,B;ct(h[t])?h[t].push(l):h[t]=[l],(y=this.zr)==null||y.register({[xd]:h});var D=this.getFeatureFlagDetails(t),S=[...(b=this.us(my))!==null&&b!==void 0?b:[]];be(r)&&S.push("flag_missing");var j={$feature_flag:t,$feature_flag_response:r,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[t])||null,$feature_flag_bootstrapped_payload:((P=this.Se.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[t])||null,$used_bootstrap_value:!this.ts};be(D==null||(T=D.metadata)==null?void 0:T.version)||(j.$feature_flag_version=D.metadata.version);var F,Z=(L=D==null||(E=D.reason)==null?void 0:E.description)!==null&&L!==void 0?L:D==null||(A=D.reason)==null?void 0:A.code;Z&&(j.$feature_flag_reason=Z),D!=null&&(I=D.metadata)!=null&&I.id&&(j.$feature_flag_id=D.metadata.id),be(D?.original_variant)&&be(D?.original_enabled)||(j.$feature_flag_original_response=be(D.original_variant)?D.original_enabled:D.original_variant),D!=null&&(B=D.metadata)!=null&&B.original_payload&&(j.$feature_flag_original_payload=D==null||(F=D.metadata)==null?void 0:F.original_payload),S.length&&(j.$feature_flag_error=S.join(",")),this._instance.capture("$feature_flag_called",j)}if(a)return{key:t,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:kP(s)}}}else mn.warn('getFeatureFlagResult for key "'+t+$v)}getRemoteConfigPayload(t,e){var n=this.Se.token,a={distinct_id:this._instance.get_distinct_id(),token:n};this.vs()&&(a.evaluation_contexts=this.cs());var r=this.fs();be(r)||(a.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:a,compression:this.Se.disable_compression?void 0:Ha.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;e(c?.[t]||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return be(n)?void 0:!!n}mn.warn('isFeatureEnabled for key "'+t+$v)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.zr){this.Yn=!0;var a=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,u,h,p,m){u===void 0&&(u={}),h===void 0&&(h={}),p===void 0&&(p={});var v=(S=>{var j=S.flags;return j?(S.featureFlags=Object.fromEntries(Object.keys(j).map((F=>{var Z;return[F,(Z=j[F].variant)!==null&&Z!==void 0?Z:j[F].enabled]}))),S.featureFlagPayloads=Object.fromEntries(Object.keys(j).filter((F=>j[F].enabled)).filter((F=>{var Z;return(Z=j[F].metadata)==null?void 0:Z.payload})).map((F=>{var Z;return[F,(Z=j[F].metadata)==null?void 0:Z.payload]})))):S.featureFlags&&mn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),S})(l),y=v.flags,b=v.featureFlags,x=v.featureFlagPayloads;if(b){var P=l.requestId,T=l.evaluatedAt;if(ct(b)){mn.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(b)for(var E=0;b.length>E;E++)L[b[E]]=!0;c&&c.register({[dp]:b,[Ys]:L})}else{var A=b,I=x,B=y;if(m!=null&&m.partialResponse)A=fe({},u,A),I=fe({},h,I),B=fe({},p,B);else if(l.errorsWhileComputingFlags)if(y){var D=new Set(Object.keys(y).filter((S=>{var j;return!((j=y[S])!=null&&j.failed)})));A=fe({},u,Object.fromEntries(Object.entries(A).filter((S=>{var[j]=S;return D.has(j)})))),I=fe({},h,Object.fromEntries(Object.entries(I||{}).filter((S=>{var[j]=S;return D.has(j)})))),B=fe({},p,Object.fromEntries(Object.entries(B||{}).filter((S=>{var[j]=S;return D.has(j)}))))}else A=fe({},u,A),I=fe({},h,I),B=fe({},p,B);c&&c.register(fe({[dp]:Object.keys(kS(A)),[Ys]:A||{},[up]:I||{},[dy]:B||{}},P?{[uy]:P}:{},T?{[Bd]:T}:{}))}}})(t,this.zr,a,r,s,n),e||(this.ns=!1),this._s(e)}}override(t,e){e===void 0&&(e=!1),mn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.zr)return mn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.zr.unregister(bi),this.zr.unregister(dl),this._s(),$s.info("All overrides cleared");if(ct(t)){var e=bS(t);return this.zr.register({[bi]:e}),this._s(),$s.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,a=t;if(this.Jn=!!((n=a.suppressWarning)!==null&&n!==void 0&&n),"flags"in a){if(a.flags===!1)this.zr.unregister(bi),$s.info("Flag overrides cleared");else if(a.flags){if(ct(a.flags)){var r=bS(a.flags);this.zr.register({[bi]:r})}else this.zr.register({[bi]:a.flags});$s.info("Flag overrides set",{flags:a.flags})}}return"payloads"in a&&(a.payloads===!1?(this.zr.unregister(dl),$s.info("Payload overrides cleared")):a.payloads&&(this.zr.register({[dl]:a.payloads}),$s.info("Payload overrides set",{payloads:a.payloads}))),void this._s()}if(t&&typeof t=="object")return this.zr.register({[bi]:t}),this._s(),$s.info("Flag overrides set",{flags:t});mn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Yn){var{flags:e,flagVariants:n}=this.ws();try{t(e,n)}catch(a){mn.error("Error while running feature flags callback",a)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var a,r=(this.us(ld)||[]).find((u=>u.flagKey===t)),s={["$feature_enrollment/"+t]:e},l={$feature_flag:t,$feature_enrollment:e,$set:s};r&&(l.$early_access_feature_name=r.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=fe({},this.getFlagVariants(),{[t]:e});(a=this.zr)==null||a.register({[dp]:Object.keys(kS(c)),[Ys]:c}),this._s()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var a=this.us(ld),r=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(a&&!e)return t(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+r),method:"GET",callback:s=>{var l,c;if(s.json){var u=s.json.earlyAccessFeatures;return(l=this.zr)==null||l.unregister(ld),(c=this.zr)==null||c.register({[ld]:u}),t(u)}}})}ws(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,a)=>(n[a]=e[a],n)),{})}}_s(t){var{flags:e,flagVariants:n}=this.ws();this.featureFlagEventHandlers.forEach((a=>{try{a(e,n,{errorsLoading:t})}catch(r){mn.error("Error while running feature flags callback",r)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(Gs)||{},a=t?.$set||(t!=null&&t.$set_once?{}:t),r=t?.$set_once,s={};if(r)for(var l in r)({}).hasOwnProperty.call(r,l)&&(l in n||(s[l]=r[l]));this._instance.register({[Gs]:fe({},n,s,a)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=fe({},this.us(Gs)||{});t.forEach((a=>{delete n[a]})),this._instance.register({[Gs]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Gs),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(qs)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((a=>{n[a]=fe({},n[a],t[a]),delete t[a]})),this._instance.register({[qs]:fe({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.us(qs)||{};this._instance.register({[qs]:fe({},e,{[t]:{}})})}else this._instance.unregister(qs)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.ys(),this.Jn=!1,this.ss=0}}},nK={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var t;return!((t=this.xs)==null||!t.isStarted)}get status(){var t,e;return this.ks===Xc||this.ks===$h?this.ks:(t=(e=this.xs)==null?void 0:e.status)!==null&&t!==void 0?t:this.ks}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ks=pS,this.Ss=void 0,this._instance=t,!this._instance.sessionManager)throw mi.error("started without valid sessionManager"),new Error(Dy+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===xi)throw new Error(Dy+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Cs(){var t,e=!((t=this._instance.get_property(ao))==null||!t.enabled),n=!this.Se.disable_session_recording,a=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&e&&n&&!a}startIfEnabledOrStop(t){var e;if(!this.Cs||(e=this.xs)==null||!e.isStarted){var n=!be(Object.assign)&&!be(Array.from);this.Cs&&n?(this.Is(t),mi.info("starting")):(this.ks=pS,this.stopRecording())}}Is(t){var e,n,a;this.Cs&&(this.ks!==Xc&&this.ks!==$h&&(this.ks=fS),Be!=null&&(e=Be.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=Be.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ts(t):(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.Es,(r=>{if(r)return mi.error("could not load recorder",r);this.Ts(t)})))}stopRecording(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.stop()}Ms(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.discard()}Ps(){var t,e;(t=this.zr)==null||t.unregister(xb),(e=this.zr)==null||e.unregister(kE)}Rs(t,e){if(nt(t))return null;var n,a=Bn(t)?t:parseFloat(t);return typeof(n=a)!="number"||!Number.isFinite(n)||0>n||n>1?(mi.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):a}Os(t){if(this.zr){var e,n,a=this.zr,r=()=>{var s,l=t.sessionRecording===!1?void 0:t.sessionRecording,c=this.Rs((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Rs(l?.sampleRate,"remote config sampleRate"),h=c??u;nt(h)&&this.Ps();var p=l?.minimumDurationMilliseconds;a.register({[ao]:fe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:fe({capturePerformance:t.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:be(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};r(),(e=this.Ss)==null||e.call(this),this.Ss=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(r)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.Os(t),void this.Ms()):(this.Os(t),void this.startIfEnabledOrStop()):(this.ks===Xc&&(this.ks=$h,mi.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.xs)!=null&&n.log?this.xs.log(t,e):mi.warn("log called before recorder was ready")}get Es(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ao);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}Ls(){var t,e,n=this._instance.get_property(ao);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(r){return mi.warn("persisted remote config for session recording is invalid and will be ignored",r),!1}var a=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-a}Ts(t){var e,n;if((e=Be.__PosthogExtensions__)==null||!e.initSessionRecording)return mi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[AE]:!0});if(this.xs||(this.xs=(n=Be.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.xs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ls())return this.ks===$h||this.ks===Xc?void 0:(this.ks=Xc,mi.info("persisted remote config is stale, requesting fresh config before starting"),void new e6(this._instance).load());this.ks=fS,this.xs.start(t)}onRRwebEmit(t){var e;(e=this.xs)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.xs||(e=this.zr)==null||e.register({[xE]:!0}),(t=this.xs)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.xs||(e=this.zr)==null||e.register({[wE]:!0}),(t=this.xs)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.xs||(n=this.zr)==null||n.register({[t==="url"?PE:SE]:!0}),(e=this.xs)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.xs)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.xs)==null||!n.tryAddCustomEvent(t,e))}}},aK={autocapture:class{constructor(t){this.Fs=!1,this.As=null,this.$s=!1,this.instance=t,this.rageclicks=new dS(t.config.rageclick),this.Ds=null}initialize(){this.startIfEnabled()}get Se(){var t,e,n=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((a=>new RegExp(a))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((a=>new RegExp(a))),n}Ns(){if(this.isBrowserSupported()){if(J&&we){var t=n=>{n=n||J?.event;try{this.qs(n)}catch(a){jv.error("Failed to capture event",a)}};if(Qt(we,"submit",t,{capture:!0}),Qt(we,"change",t,{capture:!0}),Qt(we,"click",t,{capture:!0}),this.Se.capture_copied_text){var e=n=>{n=n||J?.event;try{this.qs(n,Ov)}catch(a){jv.error("Failed to capture copy/cut event",a)}};Qt(we,"copy",e,{capture:!0}),Qt(we,"cut",e,{capture:!0})}}}else jv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Fs&&(this.Ns(),this.Fs=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.$s=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ay]:!!t.autocapture_opt_out}),this.As=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.Ds=t}getElementSelectors(t){var e,n=[];return(e=this.Ds)==null||e.forEach((a=>{var r=we?.querySelectorAll(a);r?.forEach((s=>{t===s&&n.push(a)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[ay];if(oa(this.As)&&!Hr(n)&&!this.instance.mr())return!1;var a=(e=this.As)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!a}qs(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,a=Ev(t);IE(a)&&(a=a.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&BP(a,this.instance.config.rageclick)&&this.qs(t,"$rageclick");var r=e===Ov;if(a&&(function(m,v,y,b,x,P){var T,L,E,A,I,B;if(y===void 0&&(y=void 0),!J||Tb(m)||(T=y)!=null&&T.url_allowlist&&!zP(y.url_allowlist,P)||(L=y)!=null&&L.url_ignorelist&&zP(y.url_ignorelist,P))return!1;if((E=y)!=null&&E.dom_event_allowlist){var D=y.dom_event_allowlist;if(D&&!D.some((ee=>v.type===ee)))return!1}var{parentIsUsefulElement:S,targetElementList:j}=zE(m,b);if(!(function(ee,de){var ae=de?.element_allowlist;if(be(ae))return!0;var re,te=function(H){if(ae.some((Q=>H.tagName.toLowerCase()===Q)))return{v:!0}};for(var le of ee)if(re=te(le))return re.v;return!1})(j,y)||!wy(j,(A=y)==null?void 0:A.css_selector_allowlist)||wy(j,(I=(B=y)==null?void 0:B.css_selector_ignorelist)!==null&&I!==void 0?I:aq))return!1;try{var F=J.getComputedStyle(m);if(F&&F.getPropertyValue("cursor")==="pointer"&&v.type==="click")return!0}catch{}var Z=m.tagName.toLowerCase();switch(Z){case"html":return!1;case"form":return(x||["submit"]).indexOf(v.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(v.type)>=0;default:return S?(x||["click"]).indexOf(v.type)>=0:(x||["click"]).indexOf(v.type)>=0&&(Cb.indexOf(Z)>-1||m.getAttribute("contenteditable")==="true")}})(a,t,this.Se,r,r?["copy","cut"]:void 0,this.instance)){var{props:s,explicitNoCapture:l}=qq(a,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.$s,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(l)return!1;var c=this.getElementSelectors(a);if(c&&c.length>0&&(s.$element_selectors=c),e===Ov){var u,h=NE(J==null||(u=J.getSelection())==null?void 0:u.toString()),p=t.type||"clipboard";if(!h)return!1;s.$selected_content=h,s.$copy_type=p}return this.instance.capture(e,s),!0}}}isBrowserSupported(){return yr(we?.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.Bs=(J==null||(e=J.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(ye.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.js&&this.js(),this.js=void 0,ye.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.Hs("pushState"),this.Hs("replaceState"),this.Us())}Hs(t){var e;if(J&&((e=J.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(a,r,s){try{if(!(r in a))return uS;var l={next:a[r]},c=s((function(){for(var u=arguments.length,h=new Array(u),p=0;u>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return yr(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),a[r]=c,()=>{if(a[r]!==c)for(var u=a[r];yr(u)&&u.__posthog_layer__;){var h=u.__posthog_layer__;if(h.next===c)return void(h.next=l.next);u=h.next}else a[r]=l.next}}catch{return uS}})(J.history,t,(a=>function(r,s,l){a.call(this,r,s,l),n.zs(t)}))}}zs(t){try{var e,n=J==null||(e=J.location)==null?void 0:e.pathname;if(!n)return;n!==this.Bs&&this.isEnabled&&this._instance.capture(ul,{navigation_type:t}),this.Bs=n}catch(a){ye.error("Error capturing "+t+" pageview",a)}}Us(){if(!this.js){var t=()=>{this.zs("popstate")};Qt(J,"popstate",t),this.js=()=>{J&&J.removeEventListener("popstate",t)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(t){var e;this.Vs=!1,this.Fs=!1,this.Ws=null,this.instance=t,this.Vs=!((e=this.instance.persistence)==null||!e.props[ry]),this.rageclicks=new dS(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(t=this.Se.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return nt(this.Se.capture_heatmaps)?nt(this.Se.enable_heatmaps)?this.Vs:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Fs)return;Yq.info("starting..."),this.Gs(),this.ke()}else{var t;clearInterval((t=this.Ws)!==null&&t!==void 0?t:void 0),this.Zs(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ry]:e}),this.Vs=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Qs(t){this.fe(t.originalEvent,"deadclick")}ke(){this.Ws&&clearInterval(this.Ws),this.Ws=we?.visibilityState==="visible"?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Gs(){J&&we&&(this.Js=this.Lr.bind(this),Qt(J,uf,this.Js),this.Ys=t=>this.fe(t||J?.event),Qt(we,"click",this.Ys,{capture:!0}),this.Ks=t=>this.Xs(t||J?.event),Qt(we,"mousemove",this.Ks,{capture:!0}),this.eo=new HP(this.instance,uq,this.Qs.bind(this)),this.eo.startIfEnabledOrStop(),this.ro=this.ke.bind(this),Qt(we,df,this.ro),this.Fs=!0)}Zs(){var t;J&&we&&(this.Js&&J.removeEventListener(uf,this.Js),this.Ys&&we.removeEventListener("click",this.Ys,{capture:!0}),this.Ks&&we.removeEventListener("mousemove",this.Ks,{capture:!0}),this.ro&&we.removeEventListener(df,this.ro),clearTimeout(this.io),(t=this.eo)==null||t.stop(),this.Fs=!1)}no(t,e){var n=this.instance.scrollManager.scrollY(),a=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),s=(function(l,c,u){for(var h=l;h&&gs(h)&&!Aa(h,"body");){if(h===u)return!1;var p=void 0;try{var m,v,y;p=(m=(v=(y=h.ownerDocument)==null?void 0:y.defaultView)!==null&&v!==void 0?v:J)==null?void 0:m.getComputedStyle(h).position}catch{return!1}if(Ke(c,p))return!0;h=OE(h)}return!1})(Ev(t),["fixed","sticky"],r);return{x:t.clientX+(s?0:a),y:t.clientY+(s?0:n),target_fixed:s,type:e}}fe(t,e){var n;if(e===void 0&&(e="click"),!jP(t.target)&&mS(t)){var a=this.no(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&BP(Ev(t),this.instance.config.rageclick)&&this.so(fe({},a,{type:"rageclick"})),this.so(a)}}Xs(t){!jP(t.target)&&mS(t)&&(clearTimeout(this.io),this.io=setTimeout((()=>{this.so(this.no(t,"mousemove"))}),500))}so(t){if(J){var e=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,n=this.Se.custom_personal_data_properties,a=this.Se.mask_personal_data_properties?[...zl,...n||[]]:[],r=Hd(e,a,Wd);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(t)}}Lr(){this.R&&!cs(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:HP,webVitalsAutocapture:class{constructor(t){var e;this.Vs=!1,this.Fs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.oo=()=>{clearTimeout(this.ao),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((n,a)=>fe({},n,{["$web_vitals_"+a.name+"_event"]:fe({},a),["$web_vitals_"+a.name+"_value"]:a.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.lo=n=>{var a;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.uo();if(!be(r))if(nt(n?.name)||nt(n?.value))Bs.error("Invalid metric received",n);else if(!this.ho||this.ho>n.value){this.R.url!==r&&(this.oo(),this.ao=setTimeout(this.oo,this.flushToCaptureTimeoutMs)),be(this.R.url)&&(this.R.url=r),this.R.firstMetricTimestamp=be(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var s=(a=this._instance.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0),l=fe({},n,{$current_url:r,timestamp:Date.now()});be(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.oo()}else Bs.error("Ignoring metric with value >= "+this.ho,n)},this.do=()=>{if(!this.Fs){var n,a,r,s,l=Be.__PosthogExtensions__;be(l)||be(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:a,onFCP:r,onINP:s}=l.postHogWebVitalsCallbacks),n&&a&&r&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.lo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&a(this.lo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.lo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.lo.bind(this)),this.Fs=!0):Bs.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Vs=!((e=this._instance.persistence)==null||!e.props[ly]),this.startIfEnabled()}get co(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=qt(this.co)?(t=this.co)==null?void 0:t.web_vitals_allowed_metrics:void 0;return nt(n)?((e=this._instance.persistence)==null?void 0:e.props[cy])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(qt(this.co)?this.co.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=qt(this.co)?this.co.web_vitals_attribution:void 0;return t!=null&&t}get ho(){var t=qt(this.co)&&Bn(this.co.__web_vitals_max_value)?this.co.__web_vitals_max_value:hS;return t>0&&6e4>=t?hS:t}get isEnabled(){var t=pn?.protocol;if(t!=="http:"&&t!=="https:")return Bs.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=qt(this.co)?this.co.web_vitals:Hr(this.co)?this.co:void 0;return Hr(e)?e:this.Vs}startIfEnabled(){this.isEnabled&&!this.Fs&&(Bs.info("enabled, starting..."),this.Mt(this.do))}onRemoteConfig(t){if("capturePerformance"in t){var e=qt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=qt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ly]:e}),this._instance.persistence.register({[cy]:n})),this.Vs=e,this.startIfEnabled()}}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(a=>{a?Bs.error("failed to load script",a):t()}))}uo(){var t=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...zl,...e||[]]:[];return Hd(t,n,Wd)}Bs.error("Could not determine current URL")}}},rK={exceptionObserver:class{constructor(t){var e,n,a;this.do=()=>{var r;if(J&&this.isEnabled&&(r=Be.__PosthogExtensions__)!=null&&r.errorWrappingFunctions){var s=Be.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=Be.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Be.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.vo&&this.Se.capture_unhandled_errors&&(this.vo=s(this.captureException.bind(this))),!this.fo&&this.Se.capture_unhandled_rejections&&(this.fo=l(this.captureException.bind(this))),!this.po&&this.Se.capture_console_errors&&(this.po=c(this.captureException.bind(this)))}catch(u){Jc.error("failed to start",u),this.mo()}}},this._instance=t,this.yo=!((e=this._instance.persistence)==null||!e.props[iy]),this.bo=new sG({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(a=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:10,refillInterval:1e4,Ae:Jc}),this.Se=this._o(),this.startIfEnabledOrStop()}_o(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(t)?e=fe({},e,t):(be(t)?this.yo:t)&&(e=fe({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Jc.info("enabled"),this.mo(),this.Mt(this.do)):this.mo()}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(a=>{if(a)return Jc.error("failed to load script",a);t()}))}mo(){var t,e,n;(t=this.vo)==null||t.call(this),this.vo=void 0,(e=this.fo)==null||e.call(this),this.fo=void 0,(n=this.po)==null||n.call(this),this.po=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.yo=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[iy]:this.yo}),this.Se=this._o(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this._o()}captureException(t){var e,n,a,r=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.bo.consumeRateLimit(r)?Jc.info("Skipping exception capture because of client rate limiting.",{exception:r}):(a=this._instance.exceptions)==null||a.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.wo=[],this.xo=new wG([new RG,new FG,new DG,new LG,new jG,new OG,new MG,new zG],(function(a){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;r>l;l++)s[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var h=[],p=c.split(`
|
|
1244
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),D.contains(B)&&D.removeChild(B)}},[e]),R.jsx(JF,{isPresent:e,childRef:c,sizeRef:u,pop:s,children:s===!1?t:k.cloneElement(t,{ref:m})})}const QF=({children:t,initial:e,isPresent:n,onExitComplete:a,custom:r,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:h})=>{const p=y0(eU),m=k.useId(),v=k.useRef(n),y=k.useRef(a);b0(()=>{v.current=n,y.current=a});let b=!0,x=k.useMemo(()=>(b=!1,{id:m,initial:e,isPresent:n,custom:r,onExitComplete:P=>{p.set(P,!0);for(const T of p.values())if(!T)return;a&&a()},register:P=>(p.set(P,!1),()=>{p.delete(P),!v.current&&!p.size&&y.current?.()})}),[n,p,a]);return s&&b&&(x={...x}),k.useMemo(()=>{p.forEach((P,T)=>p.set(T,!1))},[n]),k.useEffect(()=>{!n&&!p.size&&a&&a()},[n]),t=R.jsx(XF,{pop:l==="popLayout",isPresent:n,anchorX:c,anchorY:u,root:h,children:t}),R.jsx(Mf.Provider,{value:x,children:t})};function eU(){return new Map}function v5(t=!0){const e=k.useContext(Mf);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:a,register:r}=e,s=k.useId();k.useEffect(()=>{if(t)return r(s)},[t]);const l=k.useCallback(()=>t&&a&&a(s),[s,a,t]);return!n&&a?[!1,l]:[!0]}const kh=t=>t.key||"";function T2(t){const e=[];return k.Children.forEach(t,n=>{k.isValidElement(n)&&e.push(n)}),e}const _5=({children:t,custom:e,initial:n=!0,onExitComplete:a,presenceAffectsLayout:r=!0,mode:s="sync",propagate:l=!1,anchorX:c="left",anchorY:u="top",root:h})=>{const[p,m]=v5(l),v=k.useMemo(()=>T2(t),[t]),y=l&&!p?[]:v.map(kh),b=k.useRef(!0),x=k.useRef(v),P=y0(()=>new Map),T=k.useRef(new Set),[L,E]=k.useState(v),[A,I]=k.useState(v);b0(()=>{b.current=!1,x.current=v;for(let S=0;S<A.length;S++){const j=kh(A[S]);y.includes(j)?(P.delete(j),T.current.delete(j)):P.get(j)!==!0&&P.set(j,!1)}},[A,y.length,y.join("-")]);const B=[];if(v!==L){let S=[...v];for(let j=0;j<A.length;j++){const F=A[j],Z=kh(F);y.includes(Z)||(S.splice(j,0,F),B.push(F))}return s==="wait"&&B.length&&(S=B),I(T2(S)),E(v),null}const{forceRender:D}=k.useContext(_0);return R.jsx(R.Fragment,{children:A.map(S=>{const j=kh(S),F=l&&!p?!1:v===A||y.includes(j),Z=()=>{if(T.current.has(j))return;if(P.has(j))T.current.add(j),P.set(j,!0);else return;let ee=!0;P.forEach(de=>{de||(ee=!1)}),ee&&(D?.(),I(x.current),l&&m?.(),a&&a())};return R.jsx(QF,{isPresent:F,initial:!b.current||n?void 0:!1,custom:e,presenceAffectsLayout:r,mode:s,root:h,onExitComplete:F?void 0:Z,anchorX:c,anchorY:u,children:S},j)})})},y5=k.createContext({strict:!1}),E2={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 A2=!1;function tU(){if(A2)return;const t={};for(const e in E2)t[e]={isEnabled:n=>E2[e].some(a=>!!n[a])};KT(t),A2=!0}function b5(){return tU(),Fz()}function nU(t){const e=b5();for(const n in t)e[n]={...e[n],...t[n]};KT(e)}const aU=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 Gp(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||aU.has(t)}let k5=t=>!Gp(t);function rU(t){typeof t=="function"&&(k5=e=>e.startsWith("on")?!Gp(e):t(e))}try{rU(require("@emotion/is-prop-valid").default)}catch{}function iU(t,e,n){const a={};for(const r in t)r==="values"&&typeof t.values=="object"||Un(t[r])||(k5(r)||n===!0&&Gp(r)||!e&&!Gp(r)||t.draggable&&r.startsWith("onDrag"))&&(a[r]=t[r]);return a}const zf=k.createContext({});function sU(t,e){if(jf(t)){const{initial:n,animate:a}=t;return{initial:n===!1||Nd(n)?n:void 0,animate:Nd(a)?a:void 0}}return t.inherit!==!1?e:{}}function oU(t){const{initial:e,animate:n}=sU(t,k.useContext(zf));return k.useMemo(()=>({initial:e,animate:n}),[R2(e),R2(n)])}function R2(t){return Array.isArray(t)?t.join(" "):t}const q0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function w5(t,e,n){for(const a in e)!Un(e[a])&&!t5(a,n)&&(t[a]=e[a])}function lU({transformTemplate:t},e){return k.useMemo(()=>{const n=q0();return H0(n,e,t),Object.assign({},n.vars,n.style)},[e])}function cU(t,e){const n=t.style||{},a={};return w5(a,n,t),Object.assign(a,lU(t,e)),a}function dU(t,e){const n={},a=cU(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.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=a,n}const x5=()=>({...q0(),attrs:{}});function uU(t,e,n,a){const r=k.useMemo(()=>{const s=x5();return n5(s,e,r5(a),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};w5(s,t.style,t),r.style={...s,...r.style}}return r}const hU=["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 K0(t){return typeof t!="string"||t.includes("-")?!1:!!(hU.indexOf(t)>-1||/[A-Z]/u.test(t))}function pU(t,e,n,{latestValues:a},r,s=!1,l){const u=(l??K0(t)?uU:dU)(e,a,r,t),h=iU(e,typeof t=="string",s),p=t!==k.Fragment?{...h,...u,ref:n}:{},{children:m}=e,v=k.useMemo(()=>Un(m)?m.get():m,[m]);return k.createElement(t,{...p,children:v})}function fU({scrapeMotionValuesFromProps:t,createRenderState:e},n,a,r){return{latestValues:mU(n,a,r,t),renderState:e()}}function mU(t,e,n,a){const r={},s=a(t,{});for(const v in s)r[v]=op(s[v]);let{initial:l,animate:c}=t;const u=jf(t),h=GT(t);e&&h&&!u&&t.inherit!==!1&&(l===void 0&&(l=e.initial),c===void 0&&(c=e.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const m=p?c:l;if(m&&typeof m!="boolean"&&!Of(m)){const v=Array.isArray(m)?m:[m];for(let y=0;y<v.length;y++){const b=N0(t,v[y]);if(b){const{transitionEnd:x,transition:P,...T}=b;for(const L in T){let E=T[L];if(Array.isArray(E)){const A=p?E.length-1:0;E=E[A]}E!==null&&(r[L]=E)}for(const L in x)r[L]=x[L]}}}return r}const P5=t=>(e,n)=>{const a=k.useContext(zf),r=k.useContext(Mf),s=()=>fU(t,e,a,r);return n?s():y0(s)},gU=P5({scrapeMotionValuesFromProps:W0,createRenderState:q0}),vU=P5({scrapeMotionValuesFromProps:i5,createRenderState:x5}),_U=Symbol.for("motionComponentSymbol");function yU(t,e,n){const a=k.useRef(n);k.useInsertionEffect(()=>{a.current=n});const r=k.useRef(null);return k.useCallback(s=>{s&&t.onMount?.(s),e&&(s?e.mount(s):e.unmount());const l=a.current;if(typeof l=="function")if(s){const c=l(s);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):l(s);else l&&(l.current=s)},[e])}const S5=k.createContext({});function cl(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function bU(t,e,n,a,r,s){const{visualElement:l}=k.useContext(zf),c=k.useContext(y5),u=k.useContext(Mf),h=k.useContext(G0),p=h.reducedMotion,m=h.skipAnimations,v=k.useRef(null),y=k.useRef(!1);a=a||c.renderer,!v.current&&a&&(v.current=a(t,{visualState:e,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:s}),y.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,x=k.useContext(S5);b&&!b.projection&&r&&(b.type==="html"||b.type==="svg")&&kU(v.current,n,r,x);const P=k.useRef(!1);k.useInsertionEffect(()=>{b&&P.current&&b.update(n,u)});const T=n[MT],L=k.useRef(!!T&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return b0(()=>{y.current=!0,b&&(P.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),L.current&&b.animationState&&b.animationState.animateChanges())}),k.useEffect(()=>{b&&(!L.current&&b.animationState&&b.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),L.current=!1),b.enteringChildren=void 0)}),b}function kU(t,e,n,a){const{layoutId:r,layout:s,drag:l,dragConstraints:c,layoutScroll:u,layoutRoot:h,layoutAnchor:p,layoutCrossfade:m}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:C5(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!l||c&&cl(c),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:a,crossfade:m,layoutScroll:u,layoutRoot:h,layoutAnchor:p})}function C5(t){if(t)return t.options.allowProjection!==!1?t.projection:C5(t.parent)}function tv(t,{forwardMotionProps:e=!1,type:n}={},a,r){a&&nU(a);const s=n?n==="svg":K0(t),l=s?vU:gU;function c(h,p){let m;const v={...k.useContext(G0),...h,layoutId:wU(h)},{isStatic:y}=v,b=oU(h),x=l(h,y);if(!y&&typeof window<"u"){xU();const P=PU(v);m=P.MeasureLayout,b.visualElement=bU(t,x,v,r,P.ProjectionNode,s)}return R.jsxs(zf.Provider,{value:b,children:[m&&b.visualElement?R.jsx(m,{visualElement:b.visualElement,...v}):null,pU(t,h,yU(x,b.visualElement,p),x,y,e,s)]})}c.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=k.forwardRef(c);return u[_U]=t,u}function wU({layoutId:t}){const e=k.useContext(_0).id;return e&&t!==void 0?e+"-"+t:t}function xU(t,e){k.useContext(y5).strict}function PU(t){const e=b5(),{drag:n,layout:a}=e;if(!n&&!a)return{};const r={...n,...a};return{MeasureLayout:n?.isEnabled(t)||a?.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function SU(t,e){if(typeof Proxy>"u")return tv;const n=new Map,a=(s,l)=>tv(s,l,t,e),r=(s,l)=>a(s,l);return new Proxy(r,{get:(s,l)=>l==="create"?a:(n.has(l)||n.set(l,tv(l,void 0,t,e)),n.get(l))})}const CU=(t,e)=>e.isSVG??K0(t)?new nF(e):new Zz(e,{allowProjection:t!==k.Fragment});class TU extends vs{constructor(e){super(e),e.animationState||(e.animationState=oF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Of(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(){this.node.animationState.reset(),this.unmountControls?.()}}let EU=0;class AU extends vs{constructor(){super(...arguments),this.id=EU++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:a}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===a)return;if(e&&a===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"||typeof s=="object"&&s!==null&&!Array.isArray(s)){const c=io(this.node,s,l);if(c){const{transition:u,transitionEnd:h,...p}=c;for(const m in p)this.node.getValue(m)?.jump(p[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.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 RU={animation:{Feature:TU},exit:{Feature:AU}};function ru(t){return{point:{x:t.pageX,y:t.pageY}}}const LU=t=>e=>F0(e)&&t(e,ru(e));function _d(t,e,n,a){return Od(t,e,LU(n),a)}const T5=({current:t})=>t?t.ownerDocument.defaultView:null,L2=(t,e)=>Math.abs(t-e);function DU(t,e){const n=L2(t.x,e.x),a=L2(t.y,e.y);return Math.sqrt(n**2+a**2)}const D2=new Set(["auto","scroll"]);class E5{constructor(e,n,{transformPagePoint:a,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:l=3,element:c}={}){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=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wh(this.lastRawMoveEventInfo,this.transformPagePoint));const b=nv(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,P=DU(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!P)return;const{point:T}=b,{timestamp:L}=zn;this.history.push({...T,timestamp:L});const{onStart:E,onMove:A}=this.handlers;x||(E&&E(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=wh(x,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:P,onSessionEnd:T,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=nv(b.type==="pointercancel"?this.lastMoveEventInfo:wh(x,this.transformPagePoint),this.history);this.startEvent&&P&&P(b,E),T&&T(b,E)},!F0(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=a,this.distanceThreshold=l,this.contextWindow=r||window;const u=ru(e),h=wh(u,this.transformPagePoint),{point:p}=h,{timestamp:m}=zn;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=n;v&&v(e,nv(h,this.history));const y={passive:!0,capture:!0};this.removeListeners=tu(_d(this.contextWindow,"pointermove",this.handlePointerMove,y),_d(this.contextWindow,"pointerup",this.handlePointerUp,y),_d(this.contextWindow,"pointercancel",this.handlePointerUp,y)),c&&this.startScrollTracking(c)}startScrollTracking(e){let n=e.parentElement;for(;n;){const a=getComputedStyle(n);(D2.has(a.overflowX)||D2.has(a.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 a=e===window,r=a?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-n.x,y:r.y-n.y};s.x===0&&s.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),Ot.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ps(this.updatePoint)}}function wh(t,e){return e?{point:e(t.point)}:t}function I2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function nv({point:t},e){return{point:t,delta:I2(t,A5(e)),offset:I2(t,IU(e)),velocity:MU(e,.1)}}function IU(t){return t[0]}function A5(t){return t[t.length-1]}function MU(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,a=null;const r=A5(t);for(;n>=0&&(a=t[n],!(r.timestamp-a.timestamp>Ra(e)));)n--;if(!a)return{x:0,y:0};a===t[0]&&t.length>2&&r.timestamp-a.timestamp>Ra(e)*2&&(a=t[1]);const s=qa(r.timestamp-a.timestamp);if(s===0)return{x:0,y:0};const l={x:(r.x-a.x)/s,y:(r.y-a.y)/s};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function NU(t,{min:e,max:n},a){return e!==void 0&&t<e?t=a?Nt(e,t,a.min):Math.max(t,e):n!==void 0&&t>n&&(t=a?Nt(n,t,a.max):Math.min(t,n)),t}function M2(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 OU(t,{top:e,left:n,bottom:a,right:r}){return{x:M2(t.x,n,r),y:M2(t.y,e,a)}}function N2(t,e){let n=e.min-t.min,a=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,a]=[a,n]),{min:n,max:a}}function jU(t,e){return{x:N2(t.x,e.x),y:N2(t.y,e.y)}}function zU(t,e){let n=.5;const a=ra(t),r=ra(e);return r>a?n=Id(e.min,e.max-a,t.min):a>r&&(n=Id(t.min,t.max-r,e.min)),Zr(0,1,n)}function FU(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 j_=.35;function UU(t=j_){return t===!1?t=0:t===!0&&(t=j_),{x:O2(t,"left","right"),y:O2(t,"top","bottom")}}function O2(t,e,n){return{min:j2(t,e),max:j2(t,n)}}function j2(t,e){return typeof t=="number"?t:t[e]||0}const BU=new WeakMap;class $U{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=Cn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:a}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=m=>{n&&this.snapToCursor(ru(m).point),this.stopAnimation()},l=(m,v)=>{const{drag:y,dragPropagation:b,onDragStart:x}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gz(y),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jr(T=>{let L=this.getAxisMotionValue(T).get()||0;if(Vr.test(L)){const{projection:E}=this.visualElement;if(E&&E.layout){const A=E.layout.layoutBox[T];A&&(L=ra(A)*(parseFloat(L)/100))}}this.originPoint[T]=L}),x&&Ot.update(()=>x(m,v),!1,!0),E_(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},c=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:x,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:T}=v;if(b&&this.currentDirection===null){this.currentDirection=HU(T),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",v.point,T),this.updateAxis("y",v.point,T),this.visualElement.render(),P&&Ot.update(()=>P(m,v),!1,!0)},u=(m,v)=>{this.latestPointerEvent=m,this.latestPanInfo=v,this.stop(m,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:p}=this.getProps();this.panSession=new E5(e,{onSessionStart:s,onStart:l,onMove:c,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:a,contextWindow:T5(this.visualElement),element:this.visualElement.current})}stop(e,n){const a=e||this.latestPointerEvent,r=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!a)return;const{velocity:l}=r;this.startAnimation(l);const{onDragEnd:c}=this.getProps();c&&Ot.postRender(()=>c(a,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:a}=this.getProps();!a&&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,a){const{drag:r}=this.getProps();if(!a||!xh(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let l=this.originPoint[e]+a[e];this.constraints&&this.constraints[e]&&(l=NU(l,this.constraints[e],this.elastic[e])),s.set(l)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&cl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&a?this.constraints=OU(a.layoutBox,e):this.constraints=!1,this.elastic=UU(n),r!==this.constraints&&!cl(e)&&a&&this.constraints&&!this.hasMutatedConstraints&&jr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=FU(a.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!cl(e))return!1;const a=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const s=Hz(a,r.root,this.visualElement.getTransformPagePoint());let l=jU(r.layout.layoutBox,s);if(n){const c=n(Bz(l));this.hasMutatedConstraints=!!c,c&&(l=ZT(c))}return l}startAnimation(e){const{drag:n,dragMomentum:a,dragElastic:r,dragTransition:s,dragSnapToOrigin:l,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},h=jr(p=>{if(!xh(p,n,this.currentDirection))return;let m=u&&u[p]||{};(l===!0||l===p)&&(m={min:0,max:0});const v=r?200:1e6,y=r?40:1e7,b={type:"inertia",velocity:a?e[p]:0,bounceStiffness:v,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(p,b)});return Promise.all(h).then(c)}startAxisValueAnimation(e,n){const a=this.getAxisMotionValue(e);return E_(this.visualElement,e),a.start(M0(e,a,0,n,this.visualElement,!1))}stopAnimation(){jr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps()[n];return r||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){jr(n=>{const{drag:a}=this.getProps();if(!xh(n,a,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:l,max:c}=r.layout.layoutBox[n],u=s.get()||0;s.set(e[n]-Nt(l,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:a}=this.visualElement;if(!cl(n)||!a||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};jr(l=>{const c=this.getAxisMotionValue(l);if(c&&this.constraints!==!1){const u=c.get();r[l]=zU({min:u,max:u},this.constraints[l])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),jr(l=>{if(!xh(l,e,null))return;const c=this.getAxisMotionValue(l),{min:u,max:h}=this.constraints[l];c.set(Nt(u,h,r[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;BU.set(this.visualElement,this);const e=this.visualElement.current,n=_d(e,"pointerdown",h=>{const{drag:p,dragListener:m=!0}=this.getProps(),v=h.target,y=v!==e&&wz(v);p&&m&&!y&&this.start(h)});let a;const r=()=>{const{dragConstraints:h}=this.getProps();cl(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),a||(a=VU(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,l=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Ot.read(r);const c=Od(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:p})=>{this.isDragging&&p&&(jr(m=>{const v=this.getAxisMotionValue(m);v&&(this.originPoint[m]+=h[m].translate,v.set(v.get()+h[m].translate))}),this.visualElement.render())}));return()=>{c(),n(),l(),u&&u(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:a=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:l=j_,dragMomentum:c=!0}=e;return{...e,drag:n,dragDirectionLock:a,dragPropagation:r,dragConstraints:s,dragElastic:l,dragMomentum:c}}}function z2(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function VU(t,e,n){const a=Wx(t,z2(n)),r=Wx(e,z2(n));return()=>{a(),r()}}function xh(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function HU(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class WU extends vs{constructor(e){super(e),this.removeGroupControls=Za,this.removeListeners=Za,this.controls=new $U(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Za}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 av=t=>(e,n)=>{t&&Ot.update(()=>t(e,n),!1,!0)};class GU extends vs{constructor(){super(...arguments),this.removePointerDownListener=Za}onPointerDown(e){this.session=new E5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:T5(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:a,onPanEnd:r}=this.node.getProps();return{onSessionStart:av(e),onStart:av(n),onMove:av(a),onEnd:(s,l)=>{delete this.session,r&&Ot.postRender(()=>r(s,l))}}}mount(){this.removePointerDownListener=_d(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 rv=!1;class qU extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:a,layoutId:r}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),a&&a.register&&r&&a.register(s),rv&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),lp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:a,drag:r,isPresent:s}=this.props,{projection:l}=a;return l&&(l.isPresent=s,e.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),rv=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==s?l.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?l.promote():l.relegate()||Ot.postRender(()=>{const c=l.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:a}=e;a&&(a.options.layoutAnchor=n,a.root.didUpdate(),z0.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:a}=this.props,{projection:r}=e;rv=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),a&&a.deregister&&a.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function R5(t){const[e,n]=v5(),a=k.useContext(_0);return R.jsx(qU,{...t,layoutGroup:a,switchLayoutGroup:k.useContext(S5),isPresent:e,safeToRemove:n})}const KU={pan:{Feature:GU},drag:{Feature:WU,ProjectionNode:g5,MeasureLayout:R5}};function F2(t,e,n){const{props:a}=t;t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=a[r];s&&Ot.postRender(()=>s(e,ru(e)))}class YU extends vs{mount(){const{current:e}=this.node;e&&(this.unmount=_z(e,(n,a)=>(F2(this.node,a,"Start"),r=>F2(this.node,r,"End"))))}unmount(){}}class ZU extends vs{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=tu(Od(this.node.current,"focus",()=>this.onFocus()),Od(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function U2(t,e,n){const{props:a}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&a.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=a[r];s&&Ot.postRender(()=>s(e,ru(e)))}class JU extends vs{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:a}=this.node.props;this.unmount=Pz(e,(r,s)=>(U2(this.node,s,"Start"),(l,{success:c})=>U2(this.node,l,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:a?.tap===!1})}unmount(){}}const z_=new WeakMap,iv=new WeakMap,XU=t=>{const e=z_.get(t.target);e&&e(t)},QU=t=>{t.forEach(XU)};function eB({root:t,...e}){const n=t||document;iv.has(n)||iv.set(n,{});const a=iv.get(n),r=JSON.stringify(e);return a[r]||(a[r]=new IntersectionObserver(QU,{root:t,...e})),a[r]}function tB(t,e,n){const a=eB(e);return z_.set(t,n),a.observe(t),()=>{z_.delete(t),a.unobserve(t)}}const nB={some:0,all:1};class aB extends vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:a,amount:r="some",once:s}=e,l={root:n?n.current:void 0,rootMargin:a,threshold:typeof r=="number"?r:nB[r]},c=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:m}=this.node.getProps(),v=h?p:m;v&&v(u)};this.stopObserver=tB(this.node.current,l,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(rB(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function rB({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const iB={inView:{Feature:aB},tap:{Feature:JU},focus:{Feature:ZU},hover:{Feature:YU}},sB={layout:{ProjectionNode:g5,MeasureLayout:R5}},oB={...RU,...iB,...KU,...sB},lB=SU(oB,CU);function cB(){!V0.current&&qT();const[t]=k.useState($p.current);return t}const yd=lB;function L5(t){var e,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=L5(t[e]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}function dB(){for(var t,e,n=0,a="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=L5(t))&&(a&&(a+=" "),a+=e);return a}const uB=(t,e)=>{const n=new Array(t.length+e.length);for(let a=0;a<t.length;a++)n[a]=t[a];for(let a=0;a<e.length;a++)n[t.length+a]=e[a];return n},hB=(t,e)=>({classGroupId:t,validator:e}),D5=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),qp="-",B2=[],pB="arbitrary..",fB=t=>{const e=gB(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return mB(l);const c=l.split(qp),u=c[0]===""&&c.length>1?1:0;return I5(c,u,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const u=a[l],h=n[l];return u?h?uB(h,u):u:h||B2}return n[l]||B2}}},I5=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const r=t[e],s=n.nextPart.get(r);if(s){const h=I5(t,e+1,s);if(h)return h}const l=n.validators;if(l===null)return;const c=e===0?t.join(qp):t.slice(e).join(qp),u=l.length;for(let h=0;h<u;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},mB=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),a=e.slice(0,n);return a?pB+a:void 0})(),gB=t=>{const{theme:e,classGroups:n}=t;return vB(n,e)},vB=(t,e)=>{const n=D5();for(const a in t){const r=t[a];Y0(r,n,a,e)}return n},Y0=(t,e,n,a)=>{const r=t.length;for(let s=0;s<r;s++){const l=t[s];_B(l,e,n,a)}},_B=(t,e,n,a)=>{if(typeof t=="string"){yB(t,e,n);return}if(typeof t=="function"){bB(t,e,n,a);return}kB(t,e,n,a)},yB=(t,e,n)=>{const a=t===""?e:M5(e,t);a.classGroupId=n},bB=(t,e,n,a)=>{if(wB(t)){Y0(t(a),e,n,a);return}e.validators===null&&(e.validators=[]),e.validators.push(hB(n,t))},kB=(t,e,n,a)=>{const r=Object.entries(t),s=r.length;for(let l=0;l<s;l++){const[c,u]=r[l];Y0(u,M5(e,c),n,a)}},M5=(t,e)=>{let n=t;const a=e.split(qp),r=a.length;for(let s=0;s<r;s++){const l=a[s];let c=n.nextPart.get(l);c||(c=D5(),n.nextPart.set(l,c)),n=c}return n},wB=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,xB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),a=Object.create(null);const r=(s,l)=>{n[s]=l,e++,e>t&&(e=0,a=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=a[s])!==void 0)return r(s,l),l},set(s,l){s in n?n[s]=l:r(s,l)}}},F_="!",$2=":",PB=[],V2=(t,e,n,a,r)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),SB=t=>{const{prefix:e,experimentalParseClassName:n}=t;let a=r=>{const s=[];let l=0,c=0,u=0,h;const p=r.length;for(let x=0;x<p;x++){const P=r[x];if(l===0&&c===0){if(P===$2){s.push(r.slice(u,x)),u=x+1;continue}if(P==="/"){h=x;continue}}P==="["?l++:P==="]"?l--:P==="("?c++:P===")"&&c--}const m=s.length===0?r:r.slice(u);let v=m,y=!1;m.endsWith(F_)?(v=m.slice(0,-1),y=!0):m.startsWith(F_)&&(v=m.slice(1),y=!0);const b=h&&h>u?h-u:void 0;return V2(s,y,v,b)};if(e){const r=e+$2,s=a;a=l=>l.startsWith(r)?s(l.slice(r.length)):V2(PB,!1,l,void 0,!0)}if(n){const r=a;a=s=>n({className:s,parseClassName:r})}return a},CB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,a)=>{e.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",u=e.has(l);c||u?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(l)):r.push(l)}return r.length>0&&(r.sort(),a.push(...r)),a}},TB=t=>({cache:xB(t.cacheSize),parseClassName:SB(t),sortModifiers:CB(t),postfixLookupClassGroupIds:EB(t),...fB(t)}),EB=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)e[n[a]]=!0;return e},AB=/\s+/,RB=(t,e)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:s,postfixLookupClassGroupIds:l}=e,c=[],u=t.trim().split(AB);let h="";for(let p=u.length-1;p>=0;p-=1){const m=u[p],{isExternal:v,modifiers:y,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:P}=n(m);if(v){h=m+(h.length>0?" "+h:h);continue}let T=!!P,L;if(T){const D=x.substring(0,P);L=a(D);const S=L&&l[L]?a(x):void 0;S&&S!==L&&(L=S,T=!1)}else L=a(x);if(!L){if(!T){h=m+(h.length>0?" "+h:h);continue}if(L=a(x),!L){h=m+(h.length>0?" "+h:h);continue}T=!1}const E=y.length===0?"":y.length===1?y[0]:s(y).join(":"),A=b?E+F_:E,I=A+L;if(c.indexOf(I)>-1)continue;c.push(I);const B=r(L,T);for(let D=0;D<B.length;++D){const S=B[D];c.push(A+S)}h=m+(h.length>0?" "+h:h)}return h},LB=(...t)=>{let e=0,n,a,r="";for(;e<t.length;)(n=t[e++])&&(a=N5(n))&&(r&&(r+=" "),r+=a);return r},N5=t=>{if(typeof t=="string")return t;let e,n="";for(let a=0;a<t.length;a++)t[a]&&(e=N5(t[a]))&&(n&&(n+=" "),n+=e);return n},DB=(t,...e)=>{let n,a,r,s;const l=u=>{const h=e.reduce((p,m)=>m(p),t());return n=TB(h),a=n.cache.get,r=n.cache.set,s=c,c(u)},c=u=>{const h=a(u);if(h)return h;const p=RB(u,n);return r(u,p),p};return s=l,(...u)=>s(LB(...u))},IB=[],Sn=t=>{const e=n=>n[t]||IB;return e.isThemeGetter=!0,e},O5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,j5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,MB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,NB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OB=/\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$/,jB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ts=t=>MB.test(t),lt=t=>!!t&&!Number.isNaN(Number(t)),Dr=t=>!!t&&Number.isInteger(Number(t)),sv=t=>t.endsWith("%")&<(t.slice(0,-1)),pi=t=>NB.test(t),z5=()=>!0,UB=t=>OB.test(t)&&!jB.test(t),Z0=()=>!1,BB=t=>zB.test(t),$B=t=>FB.test(t),VB=t=>!Te(t)&&!Ae(t),HB=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)),WB=t=>_s(t,B5,Z0),Te=t=>O5.test(t),Os=t=>_s(t,$5,UB),H2=t=>_s(t,QB,lt),GB=t=>_s(t,H5,z5),qB=t=>_s(t,V5,Z0),W2=t=>_s(t,F5,Z0),KB=t=>_s(t,U5,$B),Ph=t=>_s(t,W5,BB),Ae=t=>j5.test(t),Uc=t=>ko(t,$5),YB=t=>ko(t,V5),G2=t=>ko(t,F5),ZB=t=>ko(t,B5),JB=t=>ko(t,U5),Sh=t=>ko(t,W5,!0),XB=t=>ko(t,H5,!0),_s=(t,e,n)=>{const a=O5.exec(t);return a?a[1]?e(a[1]):n(a[2]):!1},ko=(t,e,n=!1)=>{const a=j5.exec(t);return a?a[1]?e(a[1]):n:!1},F5=t=>t==="position"||t==="percentage",U5=t=>t==="image"||t==="url",B5=t=>t==="length"||t==="size"||t==="bg-size",$5=t=>t==="length",QB=t=>t==="number",V5=t=>t==="family-name",H5=t=>t==="number"||t==="weight",W5=t=>t==="shadow",e$=()=>{const t=Sn("color"),e=Sn("font"),n=Sn("text"),a=Sn("font-weight"),r=Sn("tracking"),s=Sn("leading"),l=Sn("breakpoint"),c=Sn("container"),u=Sn("spacing"),h=Sn("radius"),p=Sn("shadow"),m=Sn("inset-shadow"),v=Sn("text-shadow"),y=Sn("drop-shadow"),b=Sn("blur"),x=Sn("perspective"),P=Sn("aspect"),T=Sn("ease"),L=Sn("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...A(),Ae,Te],B=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],S=()=>[Ae,Te,u],j=()=>[ts,"full","auto",...S()],F=()=>[Dr,"none","subgrid",Ae,Te],Z=()=>["auto",{span:["full",Dr,Ae,Te]},Dr,Ae,Te],ee=()=>[Dr,"auto",Ae,Te],de=()=>["auto","min","max","fr",Ae,Te],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...S()],le=()=>[ts,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],H=()=>[ts,"screen","full","dvw","lvw","svw","min","max","fit",...S()],Q=()=>[ts,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],W=()=>[t,Ae,Te],N=()=>[...A(),G2,W2,{position:[Ae,Te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",ZB,WB,{size:[Ae,Te]}],ke=()=>[sv,Uc,Os],me=()=>["","none","full",h,Ae,Te],_e=()=>["",lt,Uc,Os],Me=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Le=()=>[lt,sv,G2,W2],St=()=>["","none",b,Ae,Te],dn=()=>["none",lt,Ae,Te],jt=()=>["none",lt,Ae,Te],_t=()=>[lt,Ae,Te],Zt=()=>[ts,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[z5],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[VB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",lt],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ts,Te,Ae,P]}],container:["container"],"container-type":[{"@container":["","normal","size",Ae,Te]}],"container-named":[HB],columns:[{columns:[lt,Te,Ae,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:I()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Dr,"auto",Ae,Te]}],basis:[{basis:[ts,"full","auto",c,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[lt,ts,"auto","initial","none",Te]}],grow:[{grow:["",lt,Ae,Te]}],shrink:[{shrink:["",lt,Ae,Te]}],order:[{order:[Dr,"first","last","none",Ae,Te]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mbs:[{mbs:te()}],mbe:[{mbe:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:le()}],"inline-size":[{inline:["auto",...H()]}],"min-inline-size":[{"min-inline":["auto",...H()]}],"max-inline-size":[{"max-inline":["none",...H()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[c,"screen",...le()]}],"min-w":[{"min-w":[c,"screen","none",...le()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...le()]}],h:[{h:["screen","lh",...le()]}],"min-h":[{"min-h":["screen","lh","none",...le()]}],"max-h":[{"max-h":["screen","lh",...le()]}],"font-size":[{text:["base",n,Uc,Os]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,XB,GB]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sv,Te]}],"font-family":[{font:[YB,qB,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:[r,Ae,Te]}],"line-clamp":[{"line-clamp":[lt,"none",Ae,H2]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",Ae,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Me(),"wavy"]}],"text-decoration-thickness":[{decoration:[lt,"from-font","auto",Ae,Os]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[lt,"auto",Ae,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[Dr,Ae,Te]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,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",Ae,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:N()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Dr,Ae,Te],radial:["",Ae,Te],conic:[Dr,Ae,Te]},JB,KB]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:ke()}],"gradient-via-pos":[{via:ke()}],"gradient-to-pos":[{to:ke()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:me()}],"rounded-s":[{"rounded-s":me()}],"rounded-e":[{"rounded-e":me()}],"rounded-t":[{"rounded-t":me()}],"rounded-r":[{"rounded-r":me()}],"rounded-b":[{"rounded-b":me()}],"rounded-l":[{"rounded-l":me()}],"rounded-ss":[{"rounded-ss":me()}],"rounded-se":[{"rounded-se":me()}],"rounded-ee":[{"rounded-ee":me()}],"rounded-es":[{"rounded-es":me()}],"rounded-tl":[{"rounded-tl":me()}],"rounded-tr":[{"rounded-tr":me()}],"rounded-br":[{"rounded-br":me()}],"rounded-bl":[{"rounded-bl":me()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Me(),"hidden","none"]}],"divide-style":[{divide:[...Me(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[lt,Ae,Te]}],"outline-w":[{outline:["",lt,Uc,Os]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",p,Sh,Ph]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",m,Sh,Ph]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[lt,Os]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Sh,Ph]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[lt,Ae,Te]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"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":[lt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Le()}],"mask-image-linear-to-pos":[{"mask-linear-to":Le()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Le()}],"mask-image-t-to-pos":[{"mask-t-to":Le()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Le()}],"mask-image-r-to-pos":[{"mask-r-to":Le()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Le()}],"mask-image-b-to-pos":[{"mask-b-to":Le()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Le()}],"mask-image-l-to-pos":[{"mask-l-to":Le()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Le()}],"mask-image-x-to-pos":[{"mask-x-to":Le()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Le()}],"mask-image-y-to-pos":[{"mask-y-to":Le()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ae,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Le()}],"mask-image-radial-to-pos":[{"mask-radial-to":Le()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[lt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Le()}],"mask-image-conic-to-pos":[{"mask-conic-to":Le()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Te]}],filter:[{filter:["","none",Ae,Te]}],blur:[{blur:St()}],brightness:[{brightness:[lt,Ae,Te]}],contrast:[{contrast:[lt,Ae,Te]}],"drop-shadow":[{"drop-shadow":["","none",y,Sh,Ph]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",lt,Ae,Te]}],"hue-rotate":[{"hue-rotate":[lt,Ae,Te]}],invert:[{invert:["",lt,Ae,Te]}],saturate:[{saturate:[lt,Ae,Te]}],sepia:[{sepia:["",lt,Ae,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Te]}],"backdrop-blur":[{"backdrop-blur":St()}],"backdrop-brightness":[{"backdrop-brightness":[lt,Ae,Te]}],"backdrop-contrast":[{"backdrop-contrast":[lt,Ae,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",lt,Ae,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lt,Ae,Te]}],"backdrop-invert":[{"backdrop-invert":["",lt,Ae,Te]}],"backdrop-opacity":[{"backdrop-opacity":[lt,Ae,Te]}],"backdrop-saturate":[{"backdrop-saturate":[lt,Ae,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",lt,Ae,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[lt,"initial",Ae,Te]}],ease:[{ease:["linear","initial",T,Ae,Te]}],delay:[{delay:[lt,Ae,Te]}],animate:[{animate:["none",L,Ae,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ae,Te]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:dn()}],"rotate-x":[{"rotate-x":dn()}],"rotate-y":[{"rotate-y":dn()}],"rotate-z":[{"rotate-z":dn()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:_t()}],"skew-x":[{"skew-x":_t()}],"skew-y":[{"skew-y":_t()}],transform:[{transform:[Ae,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Zt()}],"translate-x":[{"translate-x":Zt()}],"translate-y":[{"translate-y":Zt()}],"translate-z":[{"translate-z":Zt()}],"translate-none":["translate-none"],zoom:[{zoom:[Dr,Ae,Te]}],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"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",Ae,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":W()}],"scrollbar-track-color":[{"scrollbar-track":W()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",Ae,Te]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[lt,Uc,Os,H2]}],stroke:[{stroke:["none",...W()]}],"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"]}},t$=DB(e$);function $t(...t){return t$(dB(t))}const n$=R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[R.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1Z",fill:"#4285F4"}),R.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23Z",fill:"#34A853"}),R.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.44 1.18 4.93l3.66-2.84Z",fill:"#FBBC05"}),R.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53Z",fill:"#EA4335"})]}),a$=R.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:R.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12Z"})}),r$={google:n$,github:a$},i$={google:"Google",github:"GitHub",microsoft:"Microsoft",discord:"Discord",apple:"Apple"};function s$(t){return i$[t]||String(t||"").replace(/-/g," ")}function o$(t){if(typeof t=="string"&&t.trim())return t.trim();if(t&&typeof t=="object"){if(typeof t.token=="string"&&t.token.trim())return t.token.trim();if(typeof t.otp=="string"&&t.otp.trim())return t.otp.trim()}return""}function l$({title:t,subtitle:e,className:n="",onSuccess:a,hideLogo:r=!1,initialMode:s="signin",tokenFromUrl:l="",initialEmail:c="",initialCode:u=""}){eu();const{enabled:h,signedIn:p,refreshUser:m,signInWithPassword:v,signUp:y,signInWithOAuth:b,getPublicAuthConfig:x,sendResetPasswordEmail:P,exchangeResetPasswordToken:T,resetPassword:L}=bo(),[E,A]=k.useState(s),[I,B]=k.useState(c),[D,S]=k.useState(""),[j,F]=k.useState(""),[Z,ee]=k.useState(""),[de,ae]=k.useState(u),[re,te]=k.useState(!1),[le,H]=k.useState(null),[Q,W]=k.useState(null),[N,Y]=k.useState(!1),[ue,ke]=k.useState(!!(s!=="signin"||c)),[me,_e]=k.useState(!0),[Me,Oe]=k.useState([]),[Le,St]=k.useState(8);k.useEffect(()=>{s&&A(s)},[s]),k.useEffect(()=>{c&&B(c)},[c]),k.useEffect(()=>{u&&ae(u)},[u]),k.useEffect(()=>{if(!h)return;let Qe=!0;return _e(!0),(async()=>{const{data:st,error:Dt}=await x();if(Qe){if(Dt||!st)Oe(["google","github"]);else{const Et=Array.isArray(st.oAuthProviders)?st.oAuthProviders:[],Nn=Array.isArray(st.customOAuthProviders)?st.customOAuthProviders:[];Oe([...Et,...Nn]),typeof st.passwordMinLength=="number"&&st.passwordMinLength>0&&St(st.passwordMinLength)}_e(!1)}})(),()=>{Qe=!1}},[h,x]),k.useEffect(()=>{p&&a&&a()},[p,a]);const dn=k.useMemo(()=>typeof window>"u"?"":!!window.webkit?.messageHandlers?.nativeOAuth?`${window.location.origin}/auth/callback`:`${window.location.origin}/`,[]),jt=k.useMemo(()=>typeof window>"u"?"/reset-password":`${window.location.origin}/reset-password`,[]),_t=k.useCallback(async Qe=>{H(null),te(!0);try{const{error:st}=await b(Qe,dn);st&&H(st.message||String(st))}finally{te(!1)}},[b,dn]);k.useEffect(()=>{if(!h||me||p||typeof window>"u")return;const Qe=window.location.search;if(!Qe)return;const st=new URLSearchParams(Qe),Dt=st.get("native")==="1",Et=st.get("provider");Dt&&Et&&[...Me].includes(Et)&&_t(Et)},[h,me,p,Me,_t]);const Zt=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{if(E==="signup"){const{data:Dt,error:Et}=await y({email:I.trim(),password:D,name:Z.trim()||void 0});if(Et){H(Et.message||String(Et));return}if(Dt?.requireEmailVerification){W(xe("login.verify_email_pending")),A("signin");return}await m();return}const{error:st}=await v({email:I.trim(),password:D});if(st){H(st.message||String(st));return}await m()}finally{te(!1)}},[E,I,D,Z,y,v,m]),nr=k.useCallback(async Qe=>{Qe.preventDefault(),H(null),te(!0);try{const st=I.trim(),{error:Dt}=await P({email:st,redirectTo:jt});if(Dt){H(Dt.message||String(Dt));return}B(st),W(xe("reset_password.request.sent")),A("reset_confirm")}finally{te(!1)}},[I,jt,P]),Mn=k.useCallback(async Qe=>{if(Qe.preventDefault(),H(null),D!==j){H(xe("reset_password.error.password_mismatch"));return}te(!0);try{let st=l;if(!st){const{data:Et,error:Nn}=await T({email:I.trim(),code:de.trim()});if(Nn){H(Nn.message||String(Nn));return}if(st=o$(Et),!st){H(xe("reset_password.error.missing_token"));return}}const{error:Dt}=await L({newPassword:D,otp:st});if(Dt){H(Dt.message||String(Dt));return}Y(!0),W(xe("reset_password.success"))}finally{te(!1)}},[de,j,I,T,D,L,l]);if(!h)return null;const Vt=E==="reset_email"||E==="reset_confirm";return R.jsxs("div",{className:$t("w-full bg-white dark:bg-oai-gray-950 p-6 transition-colors duration-200",n),children:[Vt&&R.jsxs("button",{type:"button",onClick:()=>{A("signin"),W(null),H(null),Y(!1),S(""),F("")},className:"flex items-center gap-1.5 text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors mb-4 focus:outline-none",children:[R.jsx(PN,{className:"h-3.5 w-3.5"}),xe("reset_password.back_to_sign_in")]}),R.jsxs("div",{className:$t("mb-6",Vt?"text-left":"text-center"),children:[!r&&!Vt&&R.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:28,height:28,className:"rounded-md"}),R.jsx("span",{className:"text-lg font-semibold text-oai-black dark:text-white font-oai tracking-tight",children:xe("shared.app_name")})]}),R.jsx("h2",{className:$t("text-sm font-semibold text-oai-black dark:text-white tracking-tight mb-1",(r||Vt)&&"text-base font-bold md:text-lg"),children:Vt?xe("reset_password.title"):t||xe("login_modal.subtitle")}),!Vt&&e&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px] mx-auto",children:e}),Vt&&R.jsx("p",{className:"text-xs text-oai-gray-500 dark:text-oai-gray-400 mt-1.5 leading-relaxed max-w-[320px]",children:Q&&E==="reset_confirm"&&!N?Q:xe("reset_password.subtitle")})]}),Q&&(!Vt||N)&&R.jsx("div",{className:"mb-4 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900/50 px-3 py-2 text-xs text-oai-gray-700 dark:text-oai-gray-300",children:Q}),le&&R.jsx("p",{className:"mb-4 text-sm text-red-500 dark:text-red-400 text-center",role:"alert",children:le}),E==="reset_email"&&R.jsxs("form",{onSubmit:nr,className:"space-y-3",children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.request.submit")})]}),E==="reset_confirm"&&(N?R.jsx("button",{type:"button",onClick:()=>{A("signin"),Y(!1),W(null),H(null),S(""),F("")},className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors text-center shadow-sm",children:xe("reset_password.success_cta")}):R.jsxs("form",{onSubmit:Mn,className:"space-y-3",children:[!l&&R.jsxs(R.Fragment,{children:[R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-email-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-reset-email-confirm",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-code",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.code")}),R.jsx("input",{id:"card-reset-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",required:!0,value:de,onChange:Qe=>ae(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.new_password")}),R.jsx("input",{id:"card-reset-password",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:D,onChange:Qe=>S(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-reset-password-confirm",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("reset_password.field.confirm_password")}),R.jsx("input",{id:"card-reset-password-confirm",type:"password",autoComplete:"new-password",required:!0,minLength:8,value:j,onChange:Qe=>F(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe("reset_password.reset.submit")})]})),!Vt&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"space-y-2.5 mb-5",children:me?R.jsxs("div",{className:"space-y-2.5",children:[R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"}),R.jsx("div",{className:"h-10 rounded-lg bg-oai-gray-100 dark:bg-oai-gray-900/50 animate-pulse"})]}):Me.map(Qe=>R.jsxs("button",{type:"button",disabled:re,onClick:()=>_t(Qe),className:$t("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors disabled:opacity-50","flex items-center justify-center gap-2.5"),children:[r$[Qe]||null,xe("login.oauth.continue",{provider:s$(Qe)})]},Qe))}),ue?R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login_modal.divider_email")})})]}),R.jsxs("div",{className:"flex rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 bg-oai-gray-50 dark:bg-oai-gray-900/50 mb-4",children:[R.jsx("button",{type:"button",className:$t("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="signin"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signin"),H(null)},children:xe("login.tab.sign_in")}),R.jsx("button",{type:"button",className:$t("flex-1 py-1.5 text-xs font-medium rounded-md transition-colors",E==="signup"?"bg-white dark:bg-oai-gray-800 text-oai-black dark:text-white shadow-sm":"text-oai-gray-500 hover:text-oai-gray-700 dark:hover:text-oai-gray-300"),onClick:()=>{A("signup"),H(null)},children:xe("login.tab.sign_up")})]}),R.jsxs("form",{onSubmit:Zt,className:"space-y-3",children:[E==="signup"&&R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-name",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.name")}),R.jsx("input",{id:"card-name",type:"text",autoComplete:"name",value:Z,onChange:Qe=>ee(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500",placeholder:xe("login.field.name_placeholder")})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-email",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.email")}),R.jsx("input",{id:"card-email",type:"email",autoComplete:"email",required:!0,value:I,onChange:Qe=>B(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"})]}),R.jsxs("div",{children:[R.jsx("label",{htmlFor:"card-password",className:"block text-xs font-medium text-oai-gray-500 mb-1",children:xe("login.field.password")}),R.jsx("input",{id:"card-password",type:"password",autoComplete:E==="signup"?"new-password":"current-password",required:!0,minLength:E==="signup"?Le:void 0,value:D,onChange:Qe=>S(Qe.target.value),className:"w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-oai-gray-50 dark:bg-oai-gray-900 px-3 text-sm text-oai-black dark:text-white placeholder-oai-gray-400 dark:placeholder-oai-gray-600 focus:outline-none focus:ring-2 focus:ring-oai-brand-500"}),E==="signup"&&R.jsx("p",{className:"mt-1 text-xs text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.password_hint",{min:String(Le)})}),E==="signin"&&R.jsx("div",{className:"mt-1 text-right",children:R.jsx("button",{type:"button",onClick:()=>{A("reset_email"),H(null),W(null)},className:"text-xs font-medium text-oai-gray-500 hover:text-oai-black dark:hover:text-white no-underline bg-transparent border-0 p-0 cursor-pointer focus:outline-none",children:xe("login.forgot_password")})})]}),R.jsx("button",{type:"submit",disabled:re,className:"w-full h-10 rounded-lg bg-oai-gray-900 dark:bg-white text-white dark:text-oai-gray-950 text-sm font-semibold hover:bg-oai-gray-800 dark:hover:bg-oai-gray-100 transition-colors disabled:opacity-50",children:xe(E==="signup"?"login.submit.sign_up":"login.submit.sign_in")})]})]}):R.jsxs(R.Fragment,{children:[R.jsxs("div",{className:"relative mb-5",children:[R.jsx("div",{className:"absolute inset-0 flex items-center",children:R.jsx("span",{className:"w-full border-t border-oai-gray-200 dark:border-oai-gray-800"})}),R.jsx("div",{className:"relative flex justify-center text-xs uppercase tracking-wider",children:R.jsx("span",{className:"bg-white dark:bg-oai-gray-950 px-3 text-oai-gray-400 dark:text-oai-gray-600",children:xe("login.divider")})})]}),R.jsxs("button",{type:"button",onClick:()=>ke(!0),className:$t("w-full h-10 rounded-lg border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-900 text-sm font-medium text-oai-black dark:text-white","hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 hover:border-oai-gray-300 dark:hover:border-oai-gray-600 transition-colors","flex items-center justify-center gap-2.5"),children:[R.jsx(zN,{className:"h-[18px] w-[18px] text-oai-gray-500 dark:text-oai-gray-400",strokeWidth:1.75}),xe("login_modal.continue_email")]})]})]})]})}function c$(){const{isOpen:t,closeLoginModal:e}=GC(),{enabled:n}=bo();return k.useEffect(()=>{if(!t)return;const a=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t,e]),n?R.jsx(_5,{children:t&&R.jsxs(yd.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:[R.jsx(yd.div,{className:"absolute inset-0 bg-black/40 dark:bg-black/60",onClick:e,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),R.jsxs(yd.div,{className:"relative w-full max-w-[420px] rounded-2xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-950 shadow-2xl overflow-hidden",initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.2},onClick:a=>a.stopPropagation(),children:[R.jsx("button",{type:"button",onClick:e,className:"absolute right-4 top-4 z-10 text-oai-gray-400 dark:text-oai-gray-500 hover:text-oai-black dark:hover:text-white transition-colors",children:R.jsx(v0,{className:"h-5 w-5"})}),R.jsx(l$,{onSuccess:e,className:"p-6 bg-transparent"})]})]})}):null}const d$={VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"},SY="https://tokentracker.statuspage.io/",u$="https://github.com/mm7894215/TokenTracker",G5=`${u$}/releases/latest`,CY=`${G5}/download/TokenTrackerBar.dmg`,TY=`${G5}/download/TokenTracker-Setup.exe`;function h$(){if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"))return"";const e=typeof import.meta<"u"?d$:void 0;return(e?.VITE_TOKENTRACKER_BACKEND_BASE_URL||e?.VITE_INSFORGE_BASE_URL||Yr()).trim()}function p$(){return Yr()}function f$(t=""){if(typeof t!="string"||t.length===0)return!1;const e=new URLSearchParams(t),n=String(e.get("screenshot")||"").toLowerCase();return n==="1"||n==="true"}const m$=300*1e3,g$=720*60*1e3;function J0(t){return typeof t=="string"&&/^https?:\/\//i.test(t.trim())}function v$(t,e=Date.now()){if(!t?.token||!t?.deviceId||!t?.issuedAt)return!0;const n=Date.parse(t.issuedAt);return Number.isFinite(n)?n+g$<=e:!0}async function q5(t,e){const n=Yr();if(!J0(n)||!t)return;const a=n.replace(/\/$/,""),r=Wl(),s={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};r&&(s.apikey=r);try{await fetch(`${a}/functions/tokentracker-leaderboard-refresh`,{method:"POST",headers:s,body:JSON.stringify({period:"week",source:e})})}catch{}}async function _$(){try{const t=await fetch("/functions/tokentracker-machine-id",{headers:{Accept:"application/json"},cache:"no-store"});if(t.ok){const e=await t.json().catch(()=>null),n=typeof e?.machineId=="string"?e.machineId.trim():null;if(n&&n.length>=8)return n}}catch{}return null}async function y$(t){const e=Yr();if(!J0(e)||!t)return null;const n=e.replace(/\/$/,""),a=Wl(),r={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`};a&&(r.apikey=a);const s=typeof navigator<"u"&&typeof navigator.platform=="string"?navigator.platform:"web",l=await _$();if(!l)return null;const c=`Token Tracker (dashboard) #${l.slice(0,8)}`,u=await fetch(`${n}/functions/tokentracker-device-token-issue`,{method:"POST",headers:r,body:JSON.stringify({device_name:c,platform:s,machine_id:l})});if(!u.ok)return null;const h=await u.json().catch(()=>null),p=typeof h?.token=="string"?h.token:null,m=typeof h?.device_id=="string"?h.device_id:null;return!p||!m?null:{token:p,deviceId:m,issuedAt:typeof h?.created_at=="string"?h.created_at:new Date().toISOString()}}async function q2(t){const{deviceToken:e,insforgeBaseUrl:n,drain:a}=t,r={deviceToken:e};a===!0&&(r.drain=!0);const s=n||Yr();J0(s)&&(r.insforgeBaseUrl=s.trim());const l=await Xd(),c=await fetch("/functions/tokentracker-local-sync",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...l},body:JSON.stringify(r)}),u=await c.json().catch(()=>({}));if(!c.ok){const h=typeof u.error=="string"?u.error:`HTTP ${c.status}`;throw new Error(h)}return u}async function K2(t){const e=await t();if(!e)return null;const n=rC();if(n&&!v$(n))return n;const a=await y$(e);return a?(uM(a),a):null}async function K5(t,e={}){let n=await t();if(!n)return null;let a=await K2(async()=>n);if(!a)return n;try{return await q2({deviceToken:a.token,insforgeBaseUrl:Yr(),drain:e.drain===!0}),n}catch(r){if(!rC()||(iC(),n=await t(),!n)||(a=await K2(async()=>n),!a))throw r;return await q2({deviceToken:a.token,insforgeBaseUrl:Yr(),drain:e.drain===!0}),n}}async function b$(t){const e=hM();if(Date.now()-e<m$)return;const n=await K5(t);n&&(sC(Date.now()),await q5(n,"cloud-sync-auto"))}async function EY(t){const e=await K5(t,{drain:!0});e&&(sC(Date.now()),await q5(e,"cloud-sync-now"))}function k$(t){const e=t.replace(/\/+$/,"")||"/";return e==="/share"||e==="/share.html"||e.startsWith("/share/")}function w$(t){const e=t.replace(/\/+$/,"")||"/";return e==="/login"||e==="/landing"||k$(e)?!1:e==="/"||e==="/dashboard"||e.startsWith("/leaderboard")}function x$(){const t=_a(),e=bo(),n=k.useRef(!1);k.useEffect(()=>{if(!Tp()||!w$(t.pathname||"/")||!e.enabled||!e.signedIn||e.loading||!Ep())return;let a=!1;const r=window.setTimeout(()=>{(async()=>{if(!(a||n.current)){n.current=!0;try{await b$(()=>e.getAccessToken())}catch(s){console.warn("[tokentracker] cloud usage sync:",s)}finally{n.current=!1}}})()},2500);return()=>{a=!0,window.clearTimeout(r)}},[t.pathname,e.enabled,e.signedIn,e.loading,e.getAccessToken])}function P$(){const t=k.useContext(HC);if(t===null)throw new Error("useTheme must be used within a ThemeProvider");return t}function S$({prefersReducedMotion:t,screenshotCapture:e}){return!(e||t)}function C$(t){if(!t||typeof t!="object")return null;const e=t.user_metadata&&typeof t.user_metadata=="object"?t.user_metadata:{},n=t.profile&&typeof t.profile=="object"?t.profile:{},a=e.avatar_url||e.picture||n.avatar_url||t.avatar_url;return typeof a=="string"&&a.trim()?a.trim():null}function T$(t){return t?Lf()?`/api/avatar-proxy?url=${encodeURIComponent(t)}`:t:null}function Ch(t){const e=String(t||"").trim();if(!e)return"?";const n=e.split(/\s+/).filter(Boolean);return n.length>=2?(n[0][0]+n[n.length-1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function Y2({className:t,variant:e="header",collapsed:n=!1,onAfterAction:a}){eu();const r=e==="sidebar",{enabled:s,loading:l,signedIn:c,user:u,displayName:h}=bo(),{openLoginModal:p}=GC(),m=Bl(),v=k.useMemo(()=>C$(u),[u]),y=k.useMemo(()=>T$(v),[v]),[b,x]=Sl.useState(!1);if(Sl.useEffect(()=>{x(!1)},[y]),!s)return null;if(l)return R.jsx("div",{className:$t("h-9 w-9 shrink-0 rounded-full bg-oai-gray-200 dark:bg-oai-gray-800 animate-pulse",t),"aria-hidden":!0});if(!c)return r?R.jsxs("button",{type:"button",onClick:()=>{p(),a?.()},className:$t("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] font-medium text-oai-gray-700 dark:text-oai-gray-300 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 min-w-0",n?"h-8 w-8 justify-center px-0":"w-full",t),"aria-label":xe("header.auth.sign_in_aria"),title:n?xe("header.auth.sign_in_aria"):void 0,children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx("img",{src:"/app-icon.png",alt:"",width:18,height:18,className:"h-[18px] w-[18px] rounded"})}),!n&&R.jsx("span",{className:"truncate flex-1 text-left",children:xe("header.auth.sign_in_aria")})]}):R.jsx("button",{type:"button",onClick:p,className:$t("shrink-0 inline-flex h-9 items-center justify-center gap-1.5 rounded-md px-4 text-sm font-medium transition-colors duration-200 ease-out shadow-sm ring-1 ring-oai-gray-200 dark:ring-white/10 bg-oai-gray-900 text-white hover:bg-oai-gray-800 active:bg-oai-gray-950 dark:bg-white dark:text-oai-gray-900 dark:hover:bg-oai-gray-100 dark:active:bg-oai-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-oai-gray-950",t),"aria-label":xe("header.auth.sign_in_aria"),children:xe("header.auth.sign_in_aria")});const P=()=>{m("/settings"),a?.()};return R.jsx("div",{className:$t(r?"relative flex w-full shrink-0 items-center":"relative flex shrink-0 items-center",t),children:R.jsxs("button",{type:"button",onClick:P,className:$t(r?$t("flex w-full items-center gap-2 rounded-md px-2 py-1.5 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 transition-colors min-w-0",n&&"justify-center px-0 py-0 h-9 w-9"):"flex items-center gap-2 rounded-md pl-1 pr-2 py-1 border border-transparent hover:bg-oai-gray-100 dark:hover:bg-oai-gray-900/80 hover:border-oai-gray-200 dark:hover:border-oai-gray-800 transition-colors"),"aria-label":xe("header.auth.open_settings"),title:r&&n?h:void 0,children:[r?R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:y&&!b?R.jsx("img",{src:y,alt:"",width:20,height:20,className:"h-5 w-5 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Ch(h)==="?"?R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-3 h-3 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-oai-brand-600 text-[9px] font-semibold text-white ring-1 ring-oai-brand-500/50",children:Ch(h)})}):y&&!b?R.jsx("img",{src:y,alt:"",width:32,height:32,className:"h-8 w-8 rounded-full object-cover ring-1 ring-oai-gray-300 dark:ring-oai-gray-700 shrink-0",referrerPolicy:"no-referrer",onError:()=>x(!0)}):Ch(h)==="?"?R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600/30 text-white ring-1 ring-oai-brand-500/50",children:R.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"w-4 h-4 opacity-80",children:R.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}):R.jsx("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-oai-brand-600 text-xs font-semibold text-white ring-1 ring-oai-brand-500/50",children:Ch(h)}),r?!n&&R.jsx("span",{className:"truncate text-[13px] font-medium text-oai-gray-900 dark:text-oai-gray-200 flex-1 text-left min-w-0",children:h}):R.jsx("span",{className:"hidden sm:inline truncate text-sm font-medium text-oai-gray-900 dark:text-oai-gray-200 max-w-[120px]",children:h})]})})}const U_="tt.sidebarCollapsed";function Y5(){return[{id:"general",label:xe("nav.group.general"),items:[{id:"usage",to:"/dashboard",icon:EN,label:xe("nav.usage")},{id:"limits",to:"/limits",icon:DN,label:xe("nav.limits")},{id:"leaderboard",to:"/leaderboard",icon:rO,label:xe("nav.leaderboard")},{id:"achievements",to:"/achievements",icon:CN,label:xe("nav.achievements")}]},{id:"tools",label:xe("nav.group.tools"),items:[{id:"widgets",to:"/widgets",icon:ON,label:xe("nav.widgets")},{id:"pet",to:"/pet-settings",icon:WN,label:xe("nav.pet")},{id:"skills",to:"/skills",icon:qN,label:xe("nav.skills")},{id:"ip-check",to:"/ip-check",icon:MN,label:xe("nav.ip_check")}]},{id:"account",label:xe("nav.group.account"),items:[{id:"settings",to:"/settings",icon:QN,label:xe("nav.settings")}]}]}function E$(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(U_)==="1"}catch{return!1}}function A$(){const[t,e]=k.useState(E$),n=k.useCallback(()=>{e(a=>{const r=!a;try{typeof window<"u"&&window.localStorage.setItem(U_,r?"1":"0")}catch{}return r})},[]);return k.useEffect(()=>{if(typeof window>"u")return;const a=r=>{r.key===U_&&e(r.newValue==="1")};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),{collapsed:t,toggle:n}}function R$(t,e){const n=t.replace(/\/+$/,"")||"/";return e==="/dashboard"?n==="/dashboard"||n==="/":e==="/leaderboard"?n==="/leaderboard"||n.startsWith("/leaderboard/"):n===e}function L$({label:t,collapsed:e,first:n}){return e?n?null:R.jsx("div",{className:"mx-2 my-2 h-px bg-oai-gray-200/70 dark:bg-oai-gray-800/70","aria-hidden":!0}):R.jsx("div",{className:$t("px-3 pb-1 text-[10px] uppercase tracking-wider text-oai-gray-500 dark:text-oai-gray-500",n?"pt-2":"pt-4"),children:t})}function D$({item:t,collapsed:e,active:n,onClick:a}){const r=t.icon;return R.jsxs(Pf,{to:t.to,onClick:a,title:e?t.label:void 0,"aria-current":n?"page":void 0,className:$t("flex items-center gap-2 rounded-md px-2 py-1.5 text-[13px] no-underline transition-colors",e&&"justify-center px-0 py-2",n?"bg-oai-gray-200/70 text-oai-black font-medium dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/50 hover:text-oai-black dark:hover:bg-oai-gray-800/60 dark:hover:text-white"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center",children:R.jsx(r,{className:"h-[15px] w-[15px]","aria-hidden":!0})}),!e&&R.jsx("span",{className:"truncate",children:t.label})]})}function I$({as:t="button",title:e,onClick:n,href:a,children:r,className:s,...l}){const c=$t("flex h-10 w-10 items-center justify-center rounded-lg text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",s);return t==="a"?R.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:e,"aria-label":e,className:c,...l,children:r}):R.jsx("button",{type:"button",title:e,"aria-label":e,onClick:n,className:c,...l,children:r})}function M$({repo:t="mm7894215/TokenTracker",glassChrome:e=!1}){const[n,a]=k.useState(null);return k.useEffect(()=>{if(typeof window>"u")return;const r=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;S$({prefersReducedMotion:r,screenshotCapture:!1})&&fetch(`https://api.github.com/repos/${t}`).then(s=>s.json()).then(s=>{s&&typeof s.stargazers_count=="number"&&a(s.stargazers_count)}).catch(()=>{})},[t]),R.jsxs("a",{href:`https://github.com/${t}`,target:"_blank",rel:"noopener noreferrer","aria-label":n!==null?`Star on GitHub (${n})`:"Star on GitHub",className:$t("inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium transition-colors no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",e?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:[R.jsx("svg",{height:"12",viewBox:"0 0 16 16",width:"12",className:"shrink-0 fill-current",children:R.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),R.jsx("span",{children:"Star"}),n!==null&&R.jsx("span",{className:"text-[10px] text-oai-gray-500 dark:text-oai-gray-500 tabular-nums",children:n})]})}const N$=[{value:"light",label:"Light",Icon:VC},{value:"dark",label:"Dark",Icon:$C},{value:"system",label:"System",Icon:$N}];function O$({theme:t,resolvedTheme:e,onSetTheme:n,glassChrome:a=!1}){const[r,s]=k.useState(!1),l=k.useRef(null),c=e==="dark"?$C:VC;return k.useEffect(()=>{if(!r)return;const u=p=>{l.current&&!l.current.contains(p.target)&&s(!1)},h=p=>{p.key==="Escape"&&s(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",h)}},[r]),R.jsxs("div",{ref:l,className:"relative",children:[R.jsx("button",{type:"button","aria-label":"Theme","aria-expanded":r,"aria-haspopup":"menu",title:"Theme",onClick:()=>s(u=>!u),className:$t("inline-flex h-7 w-7 items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",a?"border border-gray-500/20 dark:border-gray-500/30 bg-gray-500/[0.04] dark:bg-gray-500/[0.06] backdrop-blur-[2px] text-oai-gray-700 dark:text-oai-gray-300 hover:bg-gray-500/10 dark:hover:bg-gray-500/12 hover:border-gray-500/30 dark:hover:border-gray-500/40 hover:text-oai-black dark:hover:text-white":"border border-oai-gray-200 dark:border-oai-gray-700 text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-black dark:hover:text-white hover:border-oai-gray-300 dark:hover:border-oai-gray-600"),children:R.jsx(c,{className:"h-3.5 w-3.5","aria-hidden":!0})}),r&&R.jsx("div",{role:"menu",className:"absolute bottom-full left-0 mb-2 z-50 min-w-[140px] py-1 rounded-lg border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 shadow-lg",children:N$.map(({value:u,label:h,Icon:p})=>{const m=t===u;return R.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{n(u),s(!1)},className:$t("flex w-full items-center gap-2.5 px-3 py-1.5 text-[13px] transition-colors",m?"text-oai-black dark:text-white bg-oai-gray-100 dark:bg-oai-gray-800":"text-oai-gray-600 dark:text-oai-gray-400 hover:bg-oai-gray-50 dark:hover:bg-oai-gray-800/60 hover:text-oai-black dark:hover:text-white"),children:[R.jsx(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),R.jsx("span",{children:h})]},u)})})]})}function Z5({collapsed:t,onToggleCollapsed:e,onItemClick:n,showCloseButton:a=!1,onClose:r,glassChrome:s=!1}){const c=_a()?.pathname||"/",{theme:u,resolvedTheme:h,setTheme:p}=P$(),{resolvedLocale:m}=eu(),v=k.useMemo(()=>Y5(),[m]);return R.jsxs(R.Fragment,{children:[R.jsx("div",{className:$t("px-2 pt-2 pb-2",t&&"flex justify-center"),children:a?R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("div",{className:"flex-1 min-w-0",children:R.jsx(Y2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("button",{type:"button",onClick:r,"aria-label":xe("nav.close_menu"),title:xe("nav.close_menu"),className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-oai-gray-500 dark:text-oai-gray-500 hover:bg-oai-gray-200/60 dark:hover:bg-oai-gray-800 hover:text-oai-gray-900 dark:hover:text-oai-gray-200 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500",children:R.jsx(v0,{className:"h-4 w-4",strokeWidth:1.75,"aria-hidden":!0})})]}):R.jsx(Y2,{variant:"sidebar",collapsed:t,onAfterAction:n})}),R.jsx("nav",{"aria-label":xe("nav.nav_label"),className:"flex-1 px-2 pb-2 flex flex-col overflow-y-auto",children:v.map((y,b)=>R.jsxs("div",{className:"flex flex-col",children:[R.jsx(L$,{label:y.label,collapsed:t,first:b===0}),R.jsx("div",{className:"flex flex-col gap-0.5",children:y.items.filter(x=>!(x.to==="/widgets"&&Df())).map(x=>R.jsx(D$,{item:x,collapsed:t,active:R$(c,x.to),onClick:n},x.id))})]},y.id))}),R.jsxs("div",{className:$t("flex items-center px-2 py-3",t?"flex-col justify-center gap-2":"justify-between gap-2"),children:[R.jsx(O$,{theme:u,resolvedTheme:h,onSetTheme:p,glassChrome:s}),R.jsx("div",{className:"flex items-center gap-1.5",children:!t&&R.jsx(M$,{glassChrome:s})})]})]})}function j$({collapsed:t,onToggleCollapsed:e}){const n=k.useMemo(()=>typeof window>"u"?!1:Ga()||Lf(),[]);return R.jsx("aside",{"data-native-sidebar":!0,"aria-label":xe("nav.aside_label"),className:$t("hidden lg:flex flex-col shrink-0 h-full min-h-0 transition-[width] duration-200",t?"w-[72px]":"w-[220px]"),children:R.jsx(Z5,{collapsed:t,onToggleCollapsed:e,glassChrome:n})})}function z$({open:t,onClose:e}){return k.useEffect(()=>{if(!t)return;const n=a=>{a.key==="Escape"&&e()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t,e]),k.useEffect(()=>{if(!t)return;const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[t]),t?R.jsxs("div",{className:"lg:hidden fixed inset-0 z-[80] flex",children:[R.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:e,"aria-hidden":!0}),R.jsx("aside",{"aria-label":xe("nav.aside_label"),className:"relative w-[260px] max-w-[80vw] flex flex-col bg-oai-white dark:bg-oai-gray-900 border-r border-oai-gray-200 dark:border-oai-gray-800 shadow-2xl",children:R.jsx(Z5,{collapsed:!1,showCloseButton:!0,onClose:e,onItemClick:e})})]}):null}function F$({onOpenDrawer:t}){return R.jsxs("div",{className:"lg:hidden flex items-center justify-between gap-2 px-3 h-14 border-b border-oai-gray-200 dark:border-oai-gray-800",children:[R.jsx(I$,{title:xe("nav.menu"),onClick:t,children:R.jsx(UN,{className:"h-5 w-5","aria-hidden":!0})}),R.jsxs(Pf,{to:"/landing",className:"flex items-center gap-2 no-underline hover:opacity-80 transition-opacity","aria-label":"Token Tracker",children:[R.jsx("img",{src:"/app-icon.png",alt:"",width:24,height:24,className:"rounded-md"}),R.jsx("span",{className:"text-sm font-semibold text-oai-black dark:text-oai-white",children:"Token Tracker"})]}),R.jsx("div",{className:"w-10 shrink-0","aria-hidden":!0})]})}function U$({children:t}){const{collapsed:e,toggle:n}=A$(),[a,r]=k.useState(!1),s=k.useCallback(()=>r(!0),[]),l=k.useCallback(()=>r(!1),[]),c=k.useMemo(()=>typeof window>"u"?!1:Ga()||Lf(),[]);return R.jsxs("div",{className:$t("fixed inset-0 flex flex-col text-oai-black dark:text-oai-white font-sans overflow-hidden",Df()&&"tt-native-glass-shell",c?"bg-transparent":"bg-oai-gray-100 dark:bg-oai-gray-950"),children:[c&&R.jsx("div",{className:"h-7 shrink-0",style:{WebkitAppRegion:"drag"},"aria-hidden":!0}),R.jsxs("div",{className:"flex-1 min-h-0 flex",children:[R.jsx(j$,{collapsed:e,onToggleCollapsed:n}),R.jsx(z$,{open:a,onClose:l}),R.jsx("div",{className:"flex-1 min-w-0 min-h-0 p-2 lg:pl-0 lg:pr-3 lg:pb-3 flex flex-col",children:R.jsxs("div",{className:$t("flex-1 min-h-0 flex flex-col bg-oai-white dark:bg-oai-gray-900 border border-oai-gray-200 dark:border-oai-gray-800 overflow-hidden",c?"tt-native-main-card":"rounded-2xl",!c&&"shadow-sm"),children:[R.jsx(F$,{onOpenDrawer:s}),R.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:t})]})})]})]})}function B$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})})}function Z2({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,children:R.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"})})}function $$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})})}function V$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"})})}function H$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})})}function W$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 -1 22 28",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M4.125 20.149c-2.69 5.959 3.036 7.453 7.26 3.966 1.24 3.91 5.898.993 7.569-2.036 3.682-6.678 2.195-13.49 1.813-14.895-2.617-9.582-15.699-9.592-17.95.049-.526 1.687-.535 3.606-.833 5.598-.15 1.005-.256 1.646-.645 2.703-.223.607-.53 1.147-1.014 2.056-.75 1.412-.434 4.138 3.434 2.724v.001ZM11.895 11.332c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.395.9.395 1.578 0 1.283-.493 2.048-1.319 2.048Zm4.416 0c-1.073 0-1.234-1.283-1.234-2.048 0-.69.124-1.239.358-1.586a1 1 0 0 1 .876-.462c.375 0 .697.158.924.47.259.354.396.9.396 1.578 0 1.283-.494 2.048-1.32 2.048Z"})})}function G$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M16 6H8v12h8V6zm4 16H4V2h16v20z"})})}function q$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:[R.jsx("path",{d:"M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"}),R.jsx("path",{d:"M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"})]})}function K$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"})})}function J2({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 64 60",fill:"none",className:e,"aria-hidden":"true",children:[R.jsx("path",{fill:"currentColor",d:"M37.2114 3.75318C37.6821 3.33106 37.7106 3.31457 38.0558 3.29385C38.6149 3.2531 39.1272 3.52199 39.9989 4.31564C42.0356 6.16652 44.8714 9.97183 46.6346 13.2212L47.3163 14.4819L48.2782 14.9605C49.2072 15.4299 50.7308 16.3923 51.3672 16.9085C51.655 17.1464 51.6956 17.1508 51.9947 17.0344C53.3454 16.5084 55.2803 17.206 56.9869 18.8432C58.5231 20.3155 59.9943 22.8312 60.558 24.9308C60.6403 25.2687 60.7493 25.9952 60.7891 26.5362C60.9177 28.4358 60.3092 29.9532 59.1362 30.64C58.8965 30.7784 58.8801 30.8158 58.8868 31.4132C58.9409 34.2583 58.1741 37.0985 56.6335 39.8679C54.8946 42.9773 51.7981 46.1938 47.6074 49.2243C45.357 50.8619 40.0323 53.964 37.6248 55.0532C31.8578 57.6496 27.2346 58.646 23.2188 58.154C20.8236 57.8638 18.1124 56.9287 16.5082 55.8433C16.086 55.5515 16.0191 55.5329 15.6966 55.6251C13.9793 56.1185 11.73 55.1053 9.81931 52.9844C9.05725 52.1366 7.82714 50.0548 7.42839 48.9409C6.50606 46.3339 6.68976 43.9816 7.91836 42.5767C8.23573 42.2149 8.2453 42.1995 8.17598 41.5912C8.06148 40.5951 8.00971 39.1206 8.06202 38.1692L8.10361 37.2803L6.76977 34.9212C4.70378 31.2451 3.3912 28.1582 2.88489 25.7998C2.61762 24.5066 2.63385 23.9324 2.96214 23.5078C3.16198 23.2515 3.81796 22.9866 4.60785 22.8407C6.59665 22.4917 10.9334 22.8076 15.7581 23.6595L16.259 23.7458L17.3608 22.7713C19.1891 21.1519 20.4038 20.244 22.6429 18.8478C24.9768 17.3876 27.6108 16.1858 30.577 15.2346L31.5295 14.9294L32.0526 13.5561C33.9257 8.61146 35.8437 4.96584 37.2114 3.75318ZM21.5208 29.0919C19.404 30.314 18.3453 30.9251 17.5676 31.6099C14.4179 34.3835 13.2414 38.777 14.5823 42.7537C14.9135 43.7357 15.5247 44.7942 16.7469 46.9111C17.9691 49.0279 18.5801 50.0865 19.2649 50.8643C22.0385 54.014 26.4316 55.1918 30.4084 53.8509C31.3904 53.5198 32.4489 52.9085 34.5657 51.6863L46.7442 44.6551C48.8613 43.4328 49.9205 42.8214 50.6983 42.1365C53.8479 39.363 55.0245 34.9695 53.6835 30.9927C53.3524 30.0107 52.7412 28.9522 51.519 26.8354C50.2968 24.7185 49.6858 23.66 49.0009 22.8822C46.2274 19.7325 41.8342 18.5547 37.8575 19.8956C36.8754 20.2267 35.8163 20.8383 33.6993 22.0606L21.5208 29.0919Z"}),R.jsx("g",{transform:"rotate(-30 22.6953 37.6011)",children:R.jsx("rect",{x:"22.6953",y:"37.6011",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})}),R.jsx("g",{transform:"rotate(-30 35.6748 30.1074)",children:R.jsx("rect",{x:"35.6748",y:"30.1074",width:"4.81084",height:"9.99175",rx:"2.40542",fill:"currentColor"})})]})}function Y$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:e,children:[R.jsx("path",{d:"M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"}),R.jsx("path",{d:"M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"}),R.jsx("path",{d:"M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"})]})}function Z$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",className:e,children:R.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function J$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:e,children:R.jsx("path",{d:"M23.955 13.587l-1.342-4.135-2.664-8.189c-.135-.423-.73-.423-.867 0L16.418 9.45H7.582L4.919 1.263c-.135-.423-.73-.423-.867 0L1.388 9.452.045 13.587a.924.924 0 0 0 .331 1.03L12 23.054l11.625-8.436a.92.92 0 0 0 .33-1.031"})})}function X$({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:R.jsx("g",{transform:"translate(3.4502, 3)",fill:"#9570BE",children:R.jsx("path",{d:"M3.17890888,3.6 L3.17890888,0 L16,0 L16,3.6 L3.17890888,3.6 Z M9.642,7.2 L9.64218223,10.8 L0,10.8 L0,3.6 L16,3.6 L16,7.2 L9.642,7.2 Z M3.17890888,18 L3.178,14.4 L0,14.4 L0,10.8 L16,10.8 L16,18 L3.17890888,18 Z",fillRule:"nonzero"})})})}function Q$({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"75",y:"20",width:"12",height:"45",rx:"2"}),R.jsx("rect",{x:"71",y:"55",width:"20",height:"16",rx:"3"}),R.jsx("rect",{x:"76",y:"71",width:"3",height:"8",rx:"1"}),R.jsx("rect",{x:"82",y:"71",width:"3",height:"8",rx:"1"})]})}function eV({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 120 90",fill:"currentColor",className:e,children:[R.jsx("rect",{x:"10",y:"8",width:"100",height:"12",rx:"2"}),R.jsx("rect",{x:"25",y:"20",width:"12",height:"62",rx:"2"}),R.jsx("rect",{x:"83",y:"20",width:"12",height:"62",rx:"2"})]})}function tV({size:t=16,className:e=""}){return R.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[R.jsx("path",{d:"M9 3v2"}),R.jsx("path",{d:"M15 3v2"}),R.jsx("rect",{x:"4",y:"6",width:"16",height:"13",rx:"3"}),R.jsx("circle",{cx:"9",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("circle",{cx:"15",cy:"13",r:"1.4",fill:"currentColor",stroke:"none"}),R.jsx("path",{d:"M9 16h6"})]})}function nV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"})})}function aV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M20.113 5.5l-.442 1.557a.157.157 0 01-.196.106l-7.414-2.157a.16.16 0 00-.143.028l-7.342 5.74a.159.159 0 01-.074.032l-4.37.656a.154.154 0 00-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002 3.75-1.953a.16.16 0 01.164.01l2.657 1.847a.152.152 0 01.066.125l-.023 2.45c0 .032.01.063.028.089l3.737 5.227c.03.04.077.065.129.065h1.182a.153.153 0 00.14-.224l-2.664-4.919a.15.15 0 01.005-.152l1.389-2.169a.156.156 0 01.062-.055l4.965-2.456a.16.16 0 01.158.01l1.418.921a.16.16 0 00.087.026h1.289c.125 0 .2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z"})})}function rV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"})})}function iV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",className:e,children:R.jsx("path",{d:"M0 0v24h24V0H0zm22.222 22.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89 17.83v-2.794h1.778v2.222zm4 0h-1.778v-2.222h-2.222v-1.778h2.793l1.207 1.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333 17.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206 1.207v2.793h2.014zm-11.556-2h2.222l1.778 1.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4 0H9.333v-2h1.778v2z"})})}function sV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z"})})}function oV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:e,children:R.jsx("path",{d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}const lV={CLAUDE:B$,ZCODE:nV,CODEBUDDY:J2,WORKBUDDY:J2,CODEX:Z2,COPILOT:K$,CRAFT:X$,CURSOR:$$,DEEPSEEK:oV,DROID:tV,"EVERY-CODE":Z2,GEMINI:V$,GITHUB:Z$,GITLAB:J$,GOOSE:rV,GROK:H$,HERMES:Y$,KIMI:q$,KIRO:W$,KILOCODE:iV,OPENCODE:G$,OMP:Q$,PI:eV,ROOCODE:aV,ZED:sV},cV={ANTIGRAVITY:"/brand-logos/antigravity.svg",ANYTHINGLLM:"/brand-logos/anythingllm.svg",CLAUDE:"/brand-logos/claude-code.svg",CODEX:"/brand-logos/codex.svg",DEEPSEEK:"/brand-logos/deepseek.svg",GEMINI:"/brand-logos/gemini.svg","KILO-CLI":"/brand-logos/kilo.svg","KILO-CODE":"/brand-logos/kilo.svg",MIMO:"/brand-logos/mimo.svg",OPENCLAW:"/brand-logos/openclaw.svg",OPENCODE:"/brand-logos/opencode.svg"},dV={ANYTHINGLLM:"brightness-0 dark:brightness-100"};function uV({size:t=16,className:e=""}){return R.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:R.jsx("circle",{cx:"12",cy:"12",r:"7.5",strokeDasharray:"3 3"})})}function hV({provider:t,size:e=16,color:n,className:a=""}){const r=t?.toUpperCase?.()||"",s=cV[r];if(s){const c=`${dV[r]||""} ${a}`.trim();return R.jsx("img",{src:s,alt:"",width:e,height:e,className:c,style:{width:e,height:e,objectFit:"contain"},"aria-hidden":!0})}const l=lV[r];return l?R.jsx(l,{size:e,className:a}):R.jsx(uV,{size:e,className:`text-oai-gray-400 dark:text-oai-gray-500 shrink-0 ${a}`})}const J5="tokentracker-skills";async function wo(t){const e=new URL(`/functions/${J5}`,window.location.origin);if(t)for(const[r,s]of Object.entries(t))s!=null&&s!==""&&e.searchParams.set(r,String(s));const n=await fetch(e.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await n.json().catch(()=>null);if(!n.ok)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}async function ys(t){const e=await Xd(),n=await fetch(`/functions/${J5}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e},cache:"no-store",body:JSON.stringify(t)}),a=await n.json().catch(()=>null);if(!n.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${n.status}`);return a}function pV(){return wo({mode:"installed"})}function AY(t={}){return wo({mode:"discover",...t.force?{force:1}:{}})}function RY(t,e=0,n=20){return wo({mode:"search",q:t,offset:e,limit:n})}function LY(){return wo({mode:"repos"})}function DY(t,e){return ys({action:"install",skill:t,targets:e})}function IY(t){return ys({action:"uninstall",id:t})}function MY(t){return ys({action:"restore",id:t})}function NY(t,e){return ys({action:"set_targets",id:t,targets:e})}function OY(t,e){return ys({action:"import_local",directory:t,targets:e})}function jY(t,e){return ys({action:"delete_local",directory:t,targets:e||[]})}function zY(t){return ys({action:"add_repo",repo:t})}function FY(t,e){return ys({action:"remove_repo",owner:t,name:e})}function UY(t={}){return wo({mode:"popular",...t.force?{force:1}:{}})}function BY(t={}){return wo({mode:"updates",...t.force?{force:1}:{}})}function $Y(t={}){return wo({mode:"skill_usage",...t.force?{force:1}:{}})}const fV=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function mV(){const t=Bl(),e=cB(),[n,a]=k.useState(!1),[r,s]=k.useState(""),[l,c]=k.useState(0),[u,h]=k.useState([]),p=k.useRef(null),m=k.useRef(null);k.useEffect(()=>{const E=A=>{(A.metaKey||A.ctrlKey)&&(A.key==="k"||A.key==="K")&&(A.preventDefault(),a(B=>!B))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),k.useEffect(()=>{if(!n)return;s(""),c(0);const E=requestAnimationFrame(()=>p.current?.focus());return fV&&!u.length&&pV().then(A=>h(A?.skills||[])).catch(()=>h([])),()=>cancelAnimationFrame(E)},[n,u.length]);const v=k.useMemo(()=>{const E=Y5().flatMap(I=>I.items.map(B=>({kind:"page",id:`page:${B.id}`,label:B.label,sub:xe("cmdk.group.pages"),Icon:B.icon,run:()=>t(B.to)}))),A=(u||[]).map(I=>({kind:"skill",id:`skill:${I.id||I.directory}`,label:I.name||I.directory,sub:I.repoOwner&&I.repoName?`${I.repoOwner}/${I.repoName}`:xe("cmdk.group.skills"),provider:(I.targets||[])[0]||"claude",run:()=>t(`/skills?skill=${encodeURIComponent(I.directory||I.id)}`)}));return[...E,...A]},[t,u]),y=k.useMemo(()=>{const E=r.trim().toLowerCase();return E?v.filter(A=>A.label.toLowerCase().includes(E)||String(A.sub||"").toLowerCase().includes(E)):v},[v,r]);k.useEffect(()=>{l>=y.length&&c(y.length?y.length-1:0)},[l,y.length]),k.useEffect(()=>{if(!n)return;m.current?.querySelector(`[data-cmdk-index="${l}"]`)?.scrollIntoView({block:"nearest"})},[l,n]);const b=k.useCallback(()=>a(!1),[]),x=k.useCallback(E=>{E&&(b(),E.run())},[b]),P=E=>{E.key==="ArrowDown"?(E.preventDefault(),c(A=>Math.min(A+1,Math.max(0,y.length-1)))):E.key==="ArrowUp"?(E.preventDefault(),c(A=>Math.max(A-1,0))):E.key==="Enter"?(E.preventDefault(),x(y[l])):E.key==="Escape"&&(E.preventDefault(),b())},T={duration:e?0:.12},L=e?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return R.jsx(_5,{children:n?R.jsxs(yd.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:e?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:T,children:[R.jsx("button",{type:"button","aria-label":xe("cmdk.close"),onClick:b,className:"absolute inset-0 cursor-default bg-oai-black/40"}),R.jsxs(yd.div,{role:"dialog","aria-modal":"true","aria-label":xe("cmdk.open_aria"),initial:e?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:e?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:L,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[R.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[R.jsx(JN,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),R.jsx("input",{ref:p,type:"text",value:r,onChange:E=>{s(E.target.value),c(0)},onKeyDown:P,"aria-label":xe("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":y[l]?`cmdk-opt-${l}`:void 0,role:"combobox","aria-expanded":"true",placeholder:xe("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),R.jsx("div",{ref:m,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:y.length===0?R.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:xe("cmdk.empty")}):y.map((E,A)=>{const I=A===l;return R.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${A}`,"data-cmdk-index":A,"aria-selected":I,onMouseMove:()=>c(A),onClick:()=>x(E),className:$t("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",I?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[R.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:E.kind==="skill"?R.jsx(hV,{provider:E.provider,size:16}):R.jsx(E.Icon,{className:"h-4 w-4","aria-hidden":!0})}),R.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:E.label}),R.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:E.sub}),I?R.jsx(RN,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},E.id)})})]})]}):null})}const gV=[];function X0(t){k.useEffect(t,gV)}const X2={};function Zl(t,e){const n=k.useRef(X2);return n.current===X2&&(n.current=t(e)),n}const vV=()=>{},Ka=typeof document<"u"?k.useLayoutEffect:vV;function _V(t,e){return function(a,...r){const s=new URL(t);return s.searchParams.set("code",a.toString()),r.forEach(l=>s.searchParams.append("args[]",l)),`${e} error #${a}; visit ${s} for the full message.`}}const Jl=_V("https://base-ui.com/production-error","Base UI"),Q0=k.createContext(void 0);function eb(){const t=k.useContext(Q0);if(!t)throw new Error(Jl(73));return t}const fr=(t,e,n,a,r,s,...l)=>{if(l.length>0)throw new Error(Jl(1));let c;if(t&&e&&n&&a&&r&&s)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m),x=a(u,h,p,m),P=r(u,h,p,m);return s(v,y,b,x,P,h,p,m)};else if(t&&e&&n&&a&&r)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m),x=a(u,h,p,m);return r(v,y,b,x,h,p,m)};else if(t&&e&&n&&a)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m),b=n(u,h,p,m);return a(v,y,b,h,p,m)};else if(t&&e&&n)c=(u,h,p,m)=>{const v=t(u,h,p,m),y=e(u,h,p,m);return n(v,y,h,p,m)};else if(t&&e)c=(u,h,p,m)=>{const v=t(u,h,p,m);return e(v,h,p,m)};else if(t)c=t;else throw new Error("Missing arguments");return c};var ov={exports:{}},lv={};var Q2;function yV(){if(Q2)return lv;Q2=1;var t=Gd();function e(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var n=typeof Object.is=="function"?Object.is:e,a=t.useState,r=t.useEffect,s=t.useLayoutEffect,l=t.useDebugValue;function c(m,v){var y=v(),b=a({inst:{value:y,getSnapshot:v}}),x=b[0].inst,P=b[1];return s(function(){x.value=y,x.getSnapshot=v,u(x)&&P({inst:x})},[m,y,v]),r(function(){return u(x)&&P({inst:x}),m(function(){u(x)&&P({inst:x})})},[m]),l(y),y}function u(m){var v=m.getSnapshot;m=m.value;try{var y=v();return!n(m,y)}catch{return!0}}function h(m,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return lv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,lv}var eP;function X5(){return eP||(eP=1,ov.exports=yV()),ov.exports}var bV=X5(),cv={exports:{}},dv={};var tP;function kV(){if(tP)return dv;tP=1;var t=Gd(),e=X5();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var a=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,s=t.useRef,l=t.useEffect,c=t.useMemo,u=t.useDebugValue;return dv.useSyncExternalStoreWithSelector=function(h,p,m,v,y){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=c(function(){function T(B){if(!L){if(L=!0,E=B,B=v(B),y!==void 0&&x.hasValue){var D=x.value;if(y(D,B))return A=D}return A=B}if(D=A,a(E,B))return D;var S=v(B);return y!==void 0&&y(D,S)?(E=B,D):(E=B,A=S)}var L=!1,E,A,I=m===void 0?null:m;return[function(){return T(p())},I===null?void 0:function(){return T(I())}]},[p,m,v,y]);var P=r(h,b[0],b[1]);return l(function(){x.hasValue=!0,x.value=P},[P]),u(P),P},dv}var nP;function wV(){return nP||(nP=1,cv.exports=kV()),cv.exports}var xV=wV();const PV=parseInt(k.version,10);function tb(t){return PV>=t}const SV=tb(19),CV=SV?EV:AV;function Q5(t,e,n,a,r){return CV(t,e,n,a,r)}function TV(t,e,n,a,r){const s=k.useCallback(()=>e(t.getSnapshot(),n,a,r),[t,e,n,a,r]);return bV.useSyncExternalStore(t.subscribe,s,s)}function EV(t,e,n,a,r){return TV(t,e,n,a,r)}function AV(t,e,n,a,r){return xV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,s=>e(s,n,a,r))}class RV{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const n=this.updateTick;for(const a of this.listeners){if(n!==this.updateTick)return;a(e)}}update(e){for(const n in e)if(!Object.is(this.state[n],e[n])){this.setState({...this.state,...e});return}}set(e,n){Object.is(this.state[e],n)||this.setState({...this.state,[e]:n})}notifyAll(){const e={...this.state};this.setState(e)}use(e,n,a,r){return Q5(this,e,n,a,r)}}const nb={...TS},uv=nb.useInsertionEffect,LV=uv&&uv!==nb.useLayoutEffect?uv:t=>t();function mo(t){const e=Zl(DV).current;return e.next=t,LV(e.effect),e.trampoline}function DV(){const t={next:void 0,callback:IV,trampoline:(...e)=>t.callback?.(...e),effect:()=>{t.callback=t.next}};return t}function IV(){}function MV(){}const VY=Object.freeze([]),eo=Object.freeze({});class NV extends RV{constructor(e,n={},a){super(e),this.context=n,this.selectors=a}useSyncedValue(e,n){k.useDebugValue(e);const a=this;Ka(()=>{a.state[e]!==n&&a.set(e,n)},[a,e,n])}useSyncedValueWithCleanup(e,n){const a=this;Ka(()=>(a.state[e]!==n&&a.set(e,n),()=>{a.set(e,void 0)}),[a,e,n])}useSyncedValues(e){const n=this,a=Object.values(e);Ka(()=>{n.update(e)},[n,...a])}useControlledProp(e,n){k.useDebugValue(e);const a=this,r=n!==void 0;Ka(()=>{r&&!Object.is(a.state[e],n)&&a.setState({...a.state,[e]:n})},[a,e,n,r])}select(e,n,a,r){const s=this.selectors[e];return s(this.state,n,a,r)}useState(e,n,a,r){return k.useDebugValue(e),Q5(this,this.selectors[e],n,a,r)}useContextCallback(e,n){k.useDebugValue(e);const a=mo(n??MV);this.context[e]=a}useStateSetter(e){const n=k.useRef(void 0);return n.current===void 0&&(n.current=a=>{this.set(e,a)}),n.current}observe(e,n){let a;typeof e=="function"?a=e:a=this.selectors[e];let r=a(this.state);return n(r,r,this),this.subscribe(s=>{const l=a(s);if(!Object.is(r,l)){const c=r;r=l,n(l,c,this)}})}}function Ff(){return typeof window<"u"}function wr(t){return ab(t)?(t.nodeName||"").toLowerCase():"#document"}function Ei(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function OV(t){var e;return(e=(ab(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ab(t){return Ff()?t instanceof Node||t instanceof Ei(t).Node:!1}function rb(t){return Ff()?t instanceof Element||t instanceof Ei(t).Element:!1}function fs(t){return Ff()?t instanceof HTMLElement||t instanceof Ei(t).HTMLElement:!1}function Kp(t){return!Ff()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ei(t).ShadowRoot}function e4(t){const{overflow:e,overflowX:n,overflowY:a,display:r}=Uf(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+n)&&r!=="inline"&&r!=="contents"}function HY(t){return/^(table|td|th)$/.test(wr(t))}function jV(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const zV=/transform|translate|scale|rotate|perspective|filter/,FV=/paint|layout|strict|content/,js=t=>!!t&&t!=="none";let hv;function UV(t){const e=rb(t)?Uf(t):t;return js(e.transform)||js(e.translate)||js(e.scale)||js(e.rotate)||js(e.perspective)||!BV()&&(js(e.backdropFilter)||js(e.filter))||zV.test(e.willChange||"")||FV.test(e.contain||"")}function WY(t){let e=B_(t);for(;fs(e)&&!t4(e);){if(UV(e))return e;if(jV(e))return null;e=B_(e)}return null}function BV(){return hv==null&&(hv=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hv}function t4(t){return/^(html|body|#document)$/.test(wr(t))}function Uf(t){return Ei(t).getComputedStyle(t)}function GY(t){return rb(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function B_(t){if(wr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kp(t)&&t.host||OV(t);return Kp(e)?e.host:e}function n4(t){const e=B_(t);return t4(e)?t.ownerDocument?t.ownerDocument.body:t.body:fs(e)&&e4(e)?e:n4(e)}function aP(t,e,n){var a;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=n4(t),s=r===((a=t.ownerDocument)==null?void 0:a.body),l=Ei(r);if(s){const c=$V(l);return e.concat(l,l.visualViewport||[],e4(r)?r:[],c&&n?aP(c):[])}else return e.concat(r,aP(r,[],n))}function $V(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function a4(...t){return()=>{for(let e=0;e<t.length;e+=1){const n=t[e];n&&n()}}}function br(t){return t?.ownerDocument||document}function to(t,e,n,a){return t.addEventListener(e,n,a),()=>{t.removeEventListener(e,n,a)}}const Th=null;class VV{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const n=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let r=0;r<n.length;r+=1)n[r]?.(e)};request(e){const n=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(e){const n=e-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Eh=new VV;class ib{static create(){return new ib}static request(e){return Eh.request(e)}static cancel(e){return Eh.cancel(e)}currentId=Th;request(e){this.cancel(),this.currentId=Eh.request(()=>{this.currentId=Th,e()})}cancel=()=>{this.currentId!==Th&&(Eh.cancel(this.currentId),this.currentId=Th)};disposeEffect=()=>this.cancel}function HV(){const t=Zl(ib.create).current;return X0(t.disposeEffect),t}const Bc=0;class jd{static create(){return new jd}currentId=Bc;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Bc,n()},e)}isStarted(){return this.currentId!==Bc}clear=()=>{this.currentId!==Bc&&(clearTimeout(this.currentId),this.currentId=Bc)};disposeEffect=()=>this.clear}function WV(){const t=Zl(jd.create).current;return X0(t.disposeEffect),t}let rP=0;function r4(t){return rP+=1,`${t}-${Math.random().toString(36).slice(2,6)}-${rP}`}function pv(t,e){if(typeof t=="string")return{description:t};if(typeof t=="function"){const n=t(e);return typeof n=="string"?{description:n}:n}return t}function GV(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:qV,platform:KV,maxTouchPoints:YV}=GV(),Bf=qV.toLowerCase(),zd=KV.toLowerCase(),i4=/^i(os$|p)/.test(zd)||zd==="macintel"&&YV>1,iP="android",qY=zd===iP||Bf.includes(iP),ZV=!i4&&zd.startsWith("mac");zd.startsWith("win");const JV=ZV||i4,sb=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!sb&&Bf.includes("firefox");!sb&&Bf.includes("chrom");const XV=JV,QV=/jsdom|happydom/.test(Bf),sP="data-base-ui-focusable",s4="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",KY="ArrowLeft",YY="ArrowRight",ZY="ArrowUp",JY="ArrowDown";function wl(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Ai(t,e){if(!t||!e)return!1;const n=e.getRootNode?.();if(t.contains(e))return!0;if(n&&Kp(n)){let a=e;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function no(t){return"composedPath"in t?t.composedPath()[0]:t.target}function XY(t,e){if(!rb(t))return!1;const n=t;if(e.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,a]of e.entries())if(Ai(a,n))return!a.hasAttribute("data-trigger-disabled");return!1}function QY(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function eZ(t){return t.matches("html,body")}function eH(t){return fs(t)&&t.matches(s4)}function tZ(t){return t?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${s4}`)!=null}function nZ(t){return t?t.getAttribute("role")==="combobox"&&eH(t):!1}function $_(t){if(!t||QV)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function aZ(t){return t?t.hasAttribute(sP)?t:t.querySelector(`[${sP}]`)||t:null}function rZ(t,e){return e<0||e>=t.length}function iZ(t,e){return o4(t.current,{disabledIndices:e})}function sZ(t,e){return o4(t.current,{decrement:!0,startingIndex:t.current.length,disabledIndices:e})}function o4(t,{startingIndex:e=-1,decrement:n=!1,disabledIndices:a,amount:r=1}={}){let s=e;do s+=n?-r:r;while(s>=0&&s<=t.length-1&&tH(t,s,a));return s}function tH(t,e,n){if(typeof n=="function"?n(e):n?.includes(e)??!1)return!0;const r=t[e];return r?l4(r)?!n&&(r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"):!0:!1}function nH(t){return t.visibility==="hidden"||t.visibility==="collapse"}function l4(t,e=t?Uf(t):null){return!t||!t.isConnected||!e||nH(e)?!1:typeof t.checkVisibility=="function"?t.checkVisibility():e.display!=="none"&&e.display!=="contents"}const aH='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function rH(t){const e=t.assignedSlot;if(e)return e;if(t.parentElement)return t.parentElement;const n=t.getRootNode();return Kp(n)?n.host:null}function V_(t){for(const e of Array.from(t.children))if(wr(e)==="summary")return e;return null}function iH(t,e){const n=V_(e);return!!n&&(t===n||Ai(n,t))}function c4(t){const e=t?wr(t):"";return t!=null&&t.matches(aH)&&(e!=="summary"||t.parentElement!=null&&wr(t.parentElement)==="details"&&V_(t.parentElement)===t)&&(e!=="details"||V_(t)==null)&&(e!=="input"||t.type!=="hidden")}function d4(t){if(!c4(t)||!t.isConnected||t.matches(":disabled"))return!1;for(let e=t;e;e=rH(e)){const n=e!==t,a=wr(e)==="slot";if(e.hasAttribute("inert")||n&&wr(e)==="details"&&!e.open&&!iH(t,e)||e.hasAttribute("hidden")||!a&&!sH(e,n))return!1}return!0}function sH(t,e){const n=Uf(t);return e?n.display!=="none":l4(t,n)}function u4(t){const e=t.tabIndex;if(e<0){const n=wr(t);if(n==="details"||n==="audio"||n==="video"||fs(t)&&t.isContentEditable)return 0}return e}function fv(t){if(wr(t)!=="input")return null;const e=t;return e.type==="radio"&&e.name!==""?e:null}function oH(t,e){const n=fv(t);if(!n)return!0;const a=e.find(r=>{const s=fv(r);return s?.name===n.name&&s.form===n.form&&s.checked});return a?a===n:e.find(r=>{const s=fv(r);return s?.name===n.name&&s.form===n.form})===n}function h4(t){if(fs(t)&&wr(t)==="slot"){const e=t.assignedElements({flatten:!0});if(e.length>0)return e}return fs(t)&&t.shadowRoot?Array.from(t.shadowRoot.children):Array.from(t.children)}function p4(t,e){h4(t).forEach(n=>{c4(n)&&e.push(n),p4(n,e)})}function f4(t,e,n){h4(t).forEach(a=>{fs(a)&&a.matches(e)&&n.push(a),f4(a,e,n)})}function oZ(t){return d4(t)&&u4(t)>=0}function lH(t){const e=[];return p4(t,e),e.filter(d4)}function ob(t){const e=lH(t);return e.filter(n=>u4(n)>=0&&oH(n,e))}function m4(t,e){const n=ob(t),a=n.length;if(a===0)return;const r=wl(br(t)),s=n.indexOf(r),l=s===-1?e===1?0:a-1:s+e;return n[l]}function cH(t){return m4(br(t).body,1)||t}function dH(t){return m4(br(t).body,-1)||t}function g4(t,e){if(!t)return null;const n=ob(br(t).body),a=n.length;if(a===0)return null;const r=n.indexOf(t);if(r===-1)return null;const s=(r+e+a)%a;return n[s]}function lZ(t){return g4(t,1)}function cZ(t){return g4(t,-1)}function mv(t,e){const n=e||t.currentTarget,a=t.relatedTarget;return!a||!Ai(n,a)}function uH(t){ob(t).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oP(t){const e=[];f4(t,"[data-tabindex]",e),e.forEach(n=>{const a=n.dataset.tabindex;delete n.dataset.tabindex,a?n.setAttribute("tabindex",a):n.removeAttribute("tabindex")})}function Ah(t){const e=new Map;let n=0,a=0;return t.forEach((r,s)=>{const l=r.transitionStatus==="ending";e.set(r.id,{value:r,domIndex:s,visibleIndex:l?-1:n,offsetY:a}),a+=r.height||0,l||(n+=1)}),e}function gv(t,e){let n=0;return t.map(a=>{if(a.transitionStatus==="ending")return a;const r=n>=e;return n+=1,a.limited===r?a:{...a,limited:r}})}const Rh=t=>t.toastMetadata,Ir={toasts:fr(t=>t.toasts),isEmpty:fr(t=>t.toasts.length===0),toast:fr(Rh,(t,e)=>t.get(e)?.value),toastIndex:fr(Rh,(t,e)=>t.get(e)?.domIndex??-1),toastOffsetY:fr(Rh,(t,e)=>t.get(e)?.offsetY??0),toastVisibleIndex:fr(Rh,(t,e)=>t.get(e)?.visibleIndex??-1),hovering:fr(t=>t.hovering),focused:fr(t=>t.focused),expanded:fr(t=>t.hovering||t.focused),expandedOrOutOfFocus:fr(t=>t.hovering||t.focused||!t.isWindowFocused),prevFocusElement:fr(t=>t.prevFocusElement)};class hH extends NV{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:Ah(e.toasts)},{},Ir)}setFocused(e){this.set("focused",e)}setHovering(e){this.set("hovering",e)}setIsWindowFocused(e){this.set("isWindowFocused",e)}setPrevFocusElement(e){this.set("prevFocusElement",e)}setViewport=e=>{this.set("viewport",e)};syncProviderProps(e){const n=this.state.limit!==e.limit;if(this.state.timeout===e.timeout&&!n)return;const a={timeout:e.timeout,limit:e.limit};if(n){const r=gv(this.state.toasts,e.limit);a.toasts=r,a.toastMetadata=Ah(r)}this.update(a)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,n={}){const a=Ir.toastIndex(this.state,e);if(a===-1)return;const r=this.state.toasts[a];n.skipOnRemove||r?.onRemove?.();const s=[...this.state.toasts];s.splice(a,1),this.setToasts(s)}addToast=e=>{const{timeout:n,limit:a}=this.state,r=e.id||r4("toast");if(e.id){const u=Ir.toast(this.state,e.id);if(u)if(u.transitionStatus==="ending")this.removeToast(e.id,{skipOnRemove:!0});else{const{id:h,transitionStatus:p,...m}=e;return this.updateToastInternal(e.id,m,{resetTimer:!0,markUpdated:!0}),e.id}}const s={...e,id:r,updateKey:0,transitionStatus:"starting"},l=[s,...this.state.toasts];this.setToasts(gv(l,a));const c=s.timeout??n;return s.type!=="loading"&&c>0&&this.scheduleTimer(r,c,()=>this.closeToast(r)),Ir.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,n)=>{this.updateToastInternal(e,n,{markUpdated:!0})};updateToastInternal=(e,n,a={})=>{const{timeout:r,toasts:s}=this.state,l=Ir.toast(this.state,e)??null;if(!l||l.transitionStatus==="ending")return;const c={...l,...n,...a.markUpdated&&{updateKey:(l.updateKey??0)+1}};this.setToasts(s.map(x=>x.id===e?c:x));const u=c.timeout??r,h=l?.timeout??r,p=Object.hasOwn(n,"timeout"),m=c.transitionStatus!=="ending"&&c.type!=="loading"&&u>0,v=this.timers.has(e),y=h!==u,b=l?.type==="loading";if(!m&&v){this.clearTimer(e);return}m&&(!v||y||p||b||a.resetTimer)&&(this.clearTimer(e),this.scheduleTimer(e,u,()=>this.closeToast(e)),Ir.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{const n=e===void 0,{limit:a,toasts:r}=this.state;let s;if(n)s=r,this.clearTimers();else{const p=Ir.toast(this.state,e);if(!p)return;s=[p],this.clearTimer(e)}const l=r.map(p=>n||p.id===e?{...p,transitionStatus:"ending",height:0}:p),c=gv(l,a),u={toasts:c,toastMetadata:Ah(c)};c.some(p=>p.transitionStatus!=="ending")||(u.hovering=!1,u.focused=!1),this.update(u),s.forEach(p=>{p.transitionStatus!=="ending"&&p.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,n)=>{const a=pv(n.loading),r=this.addToast({...a,type:"loading"}),s=e.then(l=>{const c=pv(n.success,l);return this.updateToast(r,{...c,type:"success",timeout:c.timeout}),l}).catch(l=>{const c=pv(n.error,l);return this.updateToast(r,{...c,type:"error",timeout:c.timeout}),Promise.reject(l)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(s),s};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();const n=Date.now()-e.start,a=e.delay-n;e.remaining=a>0?a:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,n)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=jd.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(n),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!=="touch")return;const n=no(e);Ai(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,n,a){const r=Date.now(),s=!Ir.expandedOrOutOfFocus(this.state),l=s?jd.create():void 0;l?.start(n,()=>{this.handleTimerFired(e),a()}),this.timers.set(e,{timeout:l,start:s?r:0,delay:n,remaining:n,callback:a})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){this.timers.size===0&&(this.areTimersPaused=!1)}setToasts(e){const n={toasts:e,toastMetadata:Ah(e)};e.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){const n=wl(br(this.state.viewport));if(!this.state.viewport||!Ai(this.state.viewport,n)||!$_(n))return;if(e===void 0){this.restoreFocusToPrevElement();return}const a=Ir.toasts(this.state),r=Ir.toastIndex(this.state,e);let s=null,l=r+1;for(;l<a.length;){if(a[l].transitionStatus!=="ending"){s=a[l];break}l+=1}if(!s)for(l=r-1;l>=0;){if(a[l].transitionStatus!=="ending"){s=a[l];break}l-=1}s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}const pH=function(e){const{children:n,timeout:a=5e3,limit:r=3,toastManager:s}=e,l=Zl(()=>new hH({timeout:a,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return X0(l.disposeEffect),k.useEffect(function(){return s?s[" subscribe"](({action:h,options:p})=>{const m=p.id;h==="promise"&&p.promise?l.promiseToast(p.promise,p):h==="update"&&m?l.updateToast(m,p):h==="close"?l.closeToast(m):l.addToast(p)}):void 0},[l,s]),Ka(()=>{l.syncProviderProps({timeout:a,limit:r})},[l,a,r]),R.jsx(Q0.Provider,{value:l,children:n})},v4={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},_4={...v4,position:"fixed",top:0,left:0},dZ={...v4,position:"absolute"},bd=k.forwardRef(function(e,n){const[a,r]=k.useState();Ka(()=>{XV&&sb&&r("button")},[]);const s={tabIndex:0,role:a};return R.jsx("span",{...e,ref:n,style:_4,"aria-hidden":a?void 0:!0,...s,"data-base-ui-focus-guard":""})});function lP(t,e,n,a){const r=Zl(y4).current;return mH(r,t,e,n,a)&&b4(r,[t,e,n,a]),r.callback}function fH(t){const e=Zl(y4).current;return gH(e,t)&&b4(e,t),e.callback}function y4(){return{callback:null,cleanup:null,refs:[]}}function mH(t,e,n,a,r){return t.refs[0]!==e||t.refs[1]!==n||t.refs[2]!==a||t.refs[3]!==r}function gH(t,e){return t.refs.length!==e.length||t.refs.some((n,a)=>n!==e[a])}function b4(t,e){if(t.refs=e,e.every(n=>n==null)){t.callback=null;return}t.callback=n=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),n!=null){const a=Array(e.length).fill(null);for(let r=0;r<e.length;r+=1){const s=e[r];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(a[r]=l);break}case"object":{s.current=n;break}}}t.cleanup=()=>{for(let r=0;r<e.length;r+=1){const s=e[r];if(s!=null)switch(typeof s){case"function":{const l=a[r];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}function cP(t){if(!k.isValidElement(t))return null;const e=t,n=e.props;return(tb(19)?n?.ref:e.ref)??null}function H_(t,e){if(t&&!e)return t;if(!t&&e)return e;if(t||e)return{...t,...e}}function vH(t,e){const n={};for(const a in t){const r=t[a];if(e?.hasOwnProperty(a)){const s=e[a](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${a.toLowerCase()}`]="":r&&(n[`data-${a.toLowerCase()}`]=r.toString())}return n}function _H(t,e){return typeof t=="function"?t(e):t}function yH(t,e){return typeof t=="function"?t(e):t}const lb={};function cb(t,e,n,a,r){if(!n&&!a&&!r&&!t)return Yp(e);let s=Yp(t);return e&&(s=rd(s,e)),n&&(s=rd(s,n)),a&&(s=rd(s,a)),r&&(s=rd(s,r)),s}function bH(t){if(t.length===0)return lb;if(t.length===1)return Yp(t[0]);let e=Yp(t[0]);for(let n=1;n<t.length;n+=1)e=rd(e,t[n]);return e}function Yp(t){return db(t)?{...w4(t,lb)}:kH(t)}function rd(t,e){return db(e)?w4(e,t):wH(t,e)}function kH(t){const e={...t};for(const n in e){const a=e[n];k4(n,a)&&(e[n]=x4(a))}return e}function wH(t,e){if(!e)return t;for(const n in e){const a=e[n];switch(n){case"style":{t[n]=H_(t.style,a);break}case"className":{t[n]=P4(t.className,a);break}default:k4(n,a)?t[n]=xH(t[n],a):t[n]=a}}return t}function k4(t,e){const n=t.charCodeAt(0),a=t.charCodeAt(1),r=t.charCodeAt(2);return n===111&&a===110&&r>=65&&r<=90&&(typeof e=="function"||typeof e>"u")}function db(t){return typeof t=="function"}function w4(t,e){return db(t)?t(e):t??lb}function xH(t,e){return e?t?(...n)=>{const a=n[0];if(S4(a)){const s=a;Zp(s);const l=e(...n);return s.baseUIHandlerPrevented||t?.(...n),l}const r=e(...n);return t?.(...n),r}:x4(e):t}function x4(t){return t&&((...e)=>{const n=e[0];return S4(n)&&Zp(n),t(...e)})}function Zp(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function P4(t,e){return e?t?e+" "+t:e:t}function S4(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}function iu(t,e,n={}){const a=e.render,r=PH(e,n);if(n.enabled===!1)return null;const s=n.state??eo;return TH(t,a,r,s)}function PH(t,e={}){const{className:n,style:a,render:r}=t,{state:s=eo,ref:l,props:c,stateAttributesMapping:u,enabled:h=!0}=e,p=h?_H(n,s):void 0,m=h?yH(a,s):void 0,v=h?vH(s,u):eo,y=h&&c?SH(c):void 0,b=h?H_(v,y)??{}:eo;return typeof document<"u"&&(h?Array.isArray(l)?b.ref=fH([b.ref,cP(r),...l]):b.ref=lP(b.ref,cP(r),l):lP(null,null)),h?(p!==void 0&&(b.className=P4(b.className,p)),m!==void 0&&(b.style=H_(b.style,m)),b):eo}function SH(t){return Array.isArray(t)?bH(t):cb(void 0,t)}const CH=Symbol.for("react.lazy");function TH(t,e,n,a){if(e){if(typeof e=="function")return e(n,a);const r=cb(n,e.props);r.ref=n.ref;let s=e;return s?.$$typeof===CH&&(s=k.Children.toArray(e)[0]),k.cloneElement(s,r)}if(t&&typeof t=="string")return EH(t,n);throw new Error(Jl(8))}function EH(t,e){return t==="button"?k.createElement("button",{type:"button",...e,key:e.key}):t==="img"?k.createElement("img",{alt:"",...e,key:e.key}):k.createElement(t,e)}let AH=(function(t){return t.frontmostHeight="--toast-frontmost-height",t})({});const RH=k.forwardRef(function(e,n){const{render:a,className:r,style:s,children:l,...c}=e,u=eb(),h=WV(),p=k.useRef(!1),m=k.useRef(!1),v=k.useRef(!1),y=u.useState("isEmpty"),b=u.useState("toasts"),x=u.useState("focused"),P=u.useState("expanded"),T=u.useState("prevFocusElement"),L=b[0]?.height??0,E=k.useMemo(()=>b.some(H=>H.transitionStatus==="ending"),[b]),A=k.useMemo(()=>b.filter(H=>H.priority==="high"),[b]);k.useEffect(()=>{const H=u.state.viewport;if(!H)return;function Q(N){y||N.key==="F6"&&no(N)!==H&&(N.preventDefault(),u.setPrevFocusElement(wl(br(H))),H?.focus({preventScroll:!0}),u.pauseTimers(),u.setFocused(!0))}const W=Ei(H);return to(W,"keydown",Q)},[u,y]),k.useEffect(()=>{const H=u.state.viewport;if(!H||y)return;const Q=Ei(H);function W(Y){no(Y)===Q&&(u.setIsWindowFocused(!1),u.pauseTimers())}function N(Y){if(Y.relatedTarget)return;const ue=no(Y),ke=wl(br(H));(ue===Q||!Ai(H,ue)||!$_(ke))&&u.resumeTimers(),h.start(0,()=>u.setIsWindowFocused(!0))}return a4(to(Q,"blur",W,!0),to(Q,"focus",N,!0))},[u,h,y]),k.useEffect(()=>{const H=u.state.viewport;if(!H||y)return;const Q=br(H);return to(Q,"pointerdown",u.handleDocumentPointerDown,!0)},[y,u]);function I(H){const Q=u.state.viewport;if(Q)if(p.current=!0,H.relatedTarget===Q){const W=b.find(N=>N.transitionStatus!=="ending"&&!N.limited);W?W.ref?.current?.focus():u.restoreFocusToPrevElement()}else u.restoreFocusToPrevElement()}function B(H){H.key==="Tab"&&H.shiftKey&&no(H.nativeEvent)===u.state.viewport&&(H.preventDefault(),u.restoreFocusToPrevElement(),u.resumeTimers())}function D(){u.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current||!m.current||(u.state.isWindowFocused&&u.resumeTimers(),u.setHovering(!1),m.current=!1)}k.useEffect(D,[E,u]);function S(){u.pauseTimers(),u.setHovering(!0),m.current=!1}function j(){u.state.isWindowFocused&&u.resumeTimers()}function F(){u.state.toasts.some(Q=>Q.transitionStatus==="ending")||v.current?m.current=!0:(j(),u.setHovering(!1))}function Z(H){H.pointerType==="touch"&&(v.current=!0)}function ee(H){H.pointerType==="touch"&&(v.current=!1,D())}function de(){if(p.current){p.current=!1;return}x||$_(wl(br(u.state.viewport)))&&(u.setFocused(!0),u.pauseTimers())}function ae(H){!x||Ai(u.state.viewport,H.relatedTarget)||(u.setFocused(!1),j())}const re={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:S,onMouseMove:S,onMouseLeave:F,onFocus:de,onBlur:ae,onKeyDown:B,onClick:de,onPointerDown:Z,onPointerUp:ee,onPointerCancel:ee},te={expanded:P},le=iu("div",e,{ref:[n,u.setViewport],state:te,props:[re,{style:{[AH.frontmostHeight]:L?`${L}px`:void 0}},c,{children:R.jsxs(k.Fragment,{children:[!y&&T&&R.jsx(bd,{onFocus:I}),l,!y&&T&&R.jsx(bd,{onFocus:I})]})}]});return R.jsxs(k.Fragment,{children:[!y&&T&&R.jsx(bd,{onFocus:I}),le,!x&&A.length>0&&R.jsx("div",{style:_4,children:A.map(H=>R.jsxs("div",{role:"alert","aria-atomic":!0,children:[R.jsx("div",{children:H.title}),R.jsx("div",{children:H.description})]},H.id))})]})});function LH(t){return tb(19)?t:t?"true":void 0}const C4=k.createContext(void 0);function T4(){const t=k.useContext(C4);if(!t)throw new Error(Jl(66));return t}let ub=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const DH={[ub.startingStyle]:""},IH={[ub.endingStyle]:""},MH={transitionStatus(t){return t==="starting"?DH:t==="ending"?IH:null}};function NH(t){return t==null?t:"current"in t?t.current:t}function OH(t,e=!1,n=!0){const a=HV();return mo((r,s=null)=>{a.cancel();const l=NH(t);if(l==null)return;const c=l,u=()=>{$l.flushSync(r)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){r();return}function h(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(n){s?.aborted||u();return}const p=c.getAnimations();!s?.aborted&&p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})}if(e){const p=ub.startingStyle;if(!c.hasAttribute(p)){a.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),s?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}a.request(h)})}function jH(t){const{enabled:e=!0,open:n,ref:a,onComplete:r}=t,s=mo(r),l=OH(a,n,!1);k.useEffect(()=>{if(!e)return;const c=new AbortController;return l(s,c.signal),()=>{c.abort()}},[e,n,s,l])}let zs=(function(t){return t.index="--toast-index",t.offsetY="--toast-offset-y",t.height="--toast-height",t.swipeMovementX="--toast-swipe-movement-x",t.swipeMovementY="--toast-swipe-movement-y",t})({});const uZ=500,hZ={style:{transition:"none"}},pZ="data-base-ui-click-trigger",zH="data-base-ui-swipe-ignore",FH="data-swipe-ignore",UH=`[${zH}]`,BH=`[${FH}]`,fZ={fallbackAxisSide:"none"},mZ={fallbackAxisSide:"end"},$H={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function dP(t,e,n){switch(t){case"up":return-n;case"down":return n;case"left":return-e;case"right":return e;default:return 0}}function VH(t){const n=Ei(t).getComputedStyle(t).transform;let a=0,r=0,s=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(a=c[4],r=c[5],s=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(a=c[12],r=c[13],s=c[0])}}return{x:a,y:r,scale:s}}const HH={...MH,swipeDirection(t){return t?{"data-swipe-direction":t}:null}},$c=40,WH=10,ns=.5,GH=1,qH=`${UH},${BH}`,KH=k.forwardRef(function(e,n){const{toast:a,render:r,className:s,swipeDirection:l=["down","right"],style:c,...u}=e,h=a.positionerProps?.anchor!==void 0;let p=[];h||(p=Array.isArray(l)?l:[l]);const m=p.length>0,v=eb(),[y,b]=k.useState(void 0),[x,P]=k.useState(!1),[T,L]=k.useState(!1),[E,A]=k.useState(!1),[I,B]=k.useState({x:0,y:0}),[D,S]=k.useState({x:0,y:0,scale:1}),[j,F]=k.useState(),[Z,ee]=k.useState(),[de,ae]=k.useState(null),re=k.useRef(null),te=k.useRef({x:0,y:0}),le=k.useRef({x:0,y:0,scale:1}),H=k.useRef(void 0),Q=k.useRef(0),W=k.useRef(!1),N=k.useRef({x:0,y:0}),Y=k.useRef(!1),ue=k.useRef({x:0,y:0}),ke=k.useRef(null),me=k.useRef(null),_e=v.useState("toastIndex",a.id),Me=v.useState("toastVisibleIndex",a.id),Oe=v.useState("toastOffsetY",a.id),Le=v.useState("focused"),St=v.useState("expanded");jH({open:a.transitionStatus!=="ending",ref:re,onComplete(){a.transitionStatus==="ending"&&v.removeToast(a.id)}});const dn=mo((tt=!1)=>{const et=re.current;if(!et)return;const kt=et.style.height;et.style.height="auto";const nn=et.offsetHeight;et.style.height=kt;function zt(){v.updateToastInternal(a.id,{ref:re,height:nn,...a.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}tt?$l.flushSync(zt):zt()});Ka(dn,[dn]);function jt(tt){ue.current=tt,B(tt)}Ka(()=>()=>{me.current?.abort()},[]);function _t(tt,et){let kt=tt,nn=et;return!p.includes("left")&&!p.includes("right")?kt=tt>0?tt**ns:-(Math.abs(tt)**ns):(!p.includes("right")&&tt>0&&(kt=tt**ns),!p.includes("left")&&tt<0&&(kt=-(Math.abs(tt)**ns))),!p.includes("up")&&!p.includes("down")?nn=et>0?et**ns:-(Math.abs(et)**ns):(!p.includes("down")&&et>0&&(nn=et**ns),!p.includes("up")&&et<0&&(nn=-(Math.abs(et)**ns))),{x:kt,y:nn}}const Zt=mo(tt=>{if(tt.pointerId!==ke.current)return;ke.current=null,me.current?.abort(),me.current=null,P(!1),L(!1),ae(null);const et=le.current;if(tt.type==="pointercancel"||W.current){jt({x:et.x,y:et.y}),b(void 0);return}let kt=!1;const nn=ue.current,zt=nn.x-et.x,At=nn.y-et.y;let xt;for(const ar of p){switch(ar){case"right":zt>$c&&(kt=!0,xt="right");break;case"left":zt<-$c&&(kt=!0,xt="left");break;case"down":At>$c&&(kt=!0,xt="down");break;case"up":At<-$c&&(kt=!0,xt="up");break}if(kt)break}kt?(b(xt),A(!0),v.closeToast(a.id)):(jt({x:et.x,y:et.y}),b(void 0))});function nr(tt){if(tt.button!==0)return;tt.pointerType==="touch"&&v.pauseTimers();const et=no(tt.nativeEvent);if(et?et.closest(`button,a,input,textarea,[role="button"],${qH}`):!1)return;if(W.current=!1,H.current=void 0,Q.current=0,ke.current=tt.pointerId,te.current={x:tt.clientX,y:tt.clientY},N.current=te.current,re.current){const zt=VH(re.current);le.current=zt,S(zt),jt({x:zt.x,y:zt.y})}v.setHovering(!0),P(!0),L(!1),ae(null),Y.current=!0;const nn=re.current;if(nn){me.current?.abort();const zt=new AbortController;me.current=zt;const At=br(nn);At.addEventListener("pointerup",Zt,{signal:zt.signal}),At.addEventListener("pointercancel",Zt,{signal:zt.signal}),nn.setPointerCapture?.(tt.pointerId)}}function Mn(tt){if(tt.pointerId!==ke.current)return;tt.preventDefault(),Y.current&&(te.current={x:tt.clientX,y:tt.clientY},Y.current=!1);const{clientY:et,clientX:kt,movementX:nn,movementY:zt}=tt;(zt<0&&et>N.current.y||zt>0&&et<N.current.y)&&(N.current={x:N.current.x,y:et}),(nn<0&&kt>N.current.x||nn>0&&kt<N.current.x)&&(N.current={x:kt,y:N.current.y});const At=kt-te.current.x,xt=et-te.current.y,ar=et-N.current.y,Xl=kt-N.current.x;if(!T&&Math.sqrt(At*At+xt*xt)>=GH&&(L(!0),de===null)){const rr=p.includes("left")||p.includes("right"),bs=p.includes("up")||p.includes("down");if(rr&&bs){const Ri=Math.abs(At),ka=Math.abs(xt);ae(Ri>ka?"horizontal":"vertical")}}let En;if(!H.current)de==="vertical"?xt>0?En="down":xt<0&&(En="up"):de==="horizontal"?At>0?En="right":At<0&&(En="left"):Math.abs(At)>=Math.abs(xt)?En=At>0?"right":"left":En=xt>0?"down":"up",En&&p.includes(En)&&(H.current=En,Q.current=dP(En,At,xt),b(En));else{const Sr=H.current,rr=dP(Sr,Xl,ar);rr>$c?(W.current=!1,b(Sr)):!(p.includes("left")&&p.includes("right"))&&!(p.includes("up")&&p.includes("down"))&&Q.current-rr>=WH&&(W.current=!0)}const ti=_t(At,xt);let Qn=le.current.x,Pr=le.current.y;de==="horizontal"?(p.includes("left")||p.includes("right"))&&(Qn+=ti.x):(de==="vertical"||(p.includes("left")||p.includes("right"))&&(Qn+=ti.x),(p.includes("up")||p.includes("down"))&&(Pr+=ti.y)),jt({x:Qn,y:Pr})}function Vt(tt){if(tt.key==="Escape"){if(!re.current||!Ai(re.current,wl(br(re.current))))return;v.closeToast(a.id)}}k.useEffect(()=>{if(!m)return;const tt=re.current;if(!tt)return;function et(kt){ke.current===null||!Ai(tt,no(kt))||kt.preventDefault()}return to(tt,"touchmove",et,{passive:!1})},[m]);function Qe(){if(!x&&I.x===D.x&&I.y===D.y&&!E)return{[zs.swipeMovementX]:"0px",[zs.swipeMovementY]:"0px"};const tt=I.x-D.x,et=I.y-D.y;return{transition:x?"none":void 0,transform:x?`translateX(${I.x}px) translateY(${I.y}px) scale(${D.scale})`:void 0,[zs.swipeMovementX]:`${tt}px`,[zs.swipeMovementY]:`${et}px`}}const st=a.priority==="high",Dt={role:st?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":j,"aria-describedby":Z,"aria-hidden":st&&!Le?!0:void 0,onPointerDown:m?nr:void 0,onPointerMove:m?Mn:void 0,onPointerUp:m?Zt:void 0,onPointerCancel:m?Zt:void 0,onKeyDown:Vt,inert:LH(a.limited),style:{...Qe(),[zs.index]:a.transitionStatus==="ending"?_e:Me,[zs.offsetY]:`${Oe}px`,[zs.height]:a.height?`${a.height}px`:void 0}},Et=k.useMemo(()=>({rootRef:re,toast:a,titleId:j,setTitleId:F,descriptionId:Z,setDescriptionId:ee,swiping:x,swipeDirection:y,recalculateHeight:dn,index:_e,visibleIndex:Me,expanded:St}),[a,j,Z,x,y,dn,_e,Me,St]),Nn={transitionStatus:a.transitionStatus,expanded:St,limited:a.limited||!1,type:a.type,swiping:Et.swiping,swipeDirection:Et.swipeDirection},xr=iu("div",e,{ref:[n,Et.rootRef],state:Nn,stateAttributesMapping:HH,props:[Dt,u]});return R.jsx(C4.Provider,{value:Et,children:xr})});let uP=0;function YH(t,e="mui"){const[n,a]=k.useState(t),r=t||n;return k.useEffect(()=>{n==null&&(uP+=1,a(`${e}-${uP}`))},[n,e]),r}const hP=nb.useId;function E4(t,e){if(hP!==void 0){const n=hP();return t??(e?`${e}-${n}`:n)}return YH(t,e)}const ZH=k.forwardRef(function(e,n){const{render:a,className:r,style:s,id:l,children:c,...u}=e,{toast:h,setTitleId:p}=T4(),m=c??h.title,v=!!m,y=E4(l);Ka(()=>{if(v)return p(y),()=>{p(void 0)}},[v,y,p]);const b={type:h.type},x=iu("h2",e,{ref:n,state:b,props:{...u,id:y,children:m}});return v?x:null}),JH=k.createContext(void 0);function XH(t=!1){const e=k.useContext(JH);if(e===void 0&&!t)throw new Error(Jl(16));return e}function QH(t){const{focusableWhenDisabled:e,disabled:n,composite:a=!1,tabIndex:r=0,isNativeButton:s}=t,l=a&&e!==!1,c=a&&e===!1;return{props:k.useMemo(()=>{const h={onKeyDown(p){n&&e&&p.key!=="Tab"&&p.preventDefault()}};return a||(h.tabIndex=r,!s&&n&&(h.tabIndex=e?r:-1)),(s&&(e||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!e||c)&&(h.disabled=n),h},[a,n,e,l,c,s,r])}}function eW(t={}){const{disabled:e=!1,focusableWhenDisabled:n,tabIndex:a=0,native:r=!0,composite:s}=t,l=k.useRef(null),c=XH(!0),u=s??c!==void 0,{props:h}=QH({focusableWhenDisabled:n,disabled:e,composite:u,tabIndex:a,isNativeButton:r}),p=k.useCallback(()=>{const y=l.current;vv(y)&&u&&e&&h.disabled===void 0&&y.disabled&&(y.disabled=!1)},[e,h.disabled,u]);Ka(p,[p]);const m=k.useCallback((y={})=>{const{onClick:b,onMouseDown:x,onKeyUp:P,onKeyDown:T,onPointerDown:L,...E}=y;return cb({onClick(A){if(e){A.preventDefault();return}b?.(A)},onMouseDown(A){e||x?.(A)},onKeyDown(A){if(e||(Zp(A),T?.(A),A.baseUIHandlerPrevented))return;const I=A.target===A.currentTarget,B=A.currentTarget,D=vv(B),S=!r&&tW(B),j=I&&(r?D:!S),F=A.key==="Enter",Z=A.key===" ",ee=B.getAttribute("role"),de=ee?.startsWith("menuitem")||ee==="option"||ee==="gridcell";if(I&&u&&Z){if(A.defaultPrevented&&de)return;A.preventDefault(),S||r&&D?(B.click(),A.preventBaseUIHandler()):j&&(b?.(A),A.preventBaseUIHandler());return}j&&(!r&&(Z||F)&&A.preventDefault(),!r&&F&&b?.(A))},onKeyUp(A){if(!e){if(Zp(A),P?.(A),A.target===A.currentTarget&&r&&u&&vv(A.currentTarget)&&A.key===" "){A.preventDefault();return}A.baseUIHandlerPrevented||A.target===A.currentTarget&&!r&&!u&&A.key===" "&&b?.(A)}},onPointerDown(A){if(e){A.preventDefault();return}L?.(A)}},r?{type:"button"}:{role:"button"},h,E)},[e,h,u,r]),v=mo(y=>{l.current=y,p()});return{getButtonProps:m,buttonRef:v}}function vv(t){return fs(t)&&t.tagName==="BUTTON"}function tW(t){return!!(t?.tagName==="A"&&t?.href)}const nW=k.forwardRef(function(e,n){const{render:a,className:r,style:s,disabled:l,nativeButton:c=!0,...u}=e,h=eb(),{toast:p}=T4(),m=h.useState("expanded"),[v,y]=k.useState(!1),{getButtonProps:b,buttonRef:x}=eW({disabled:l,native:c}),P={type:p.type};return iu("button",e,{ref:[n,x],state:P,props:[{"aria-hidden":!m&&!v,onClick(){h.closeToast(p.id)},onFocus(){y(!0)},onBlur(){y(!1)}},u,b]})}),gZ="none",vZ="trigger-press",_Z="trigger-hover",yZ="outside-press",bZ="item-press",kZ="close-press",aW="focus-out",wZ="escape-key",xZ="list-navigation",PZ="cancel-open",SZ="imperative-action",CZ="window-resize";function rW(t,e,n,a){let r=!1,s=!1;const l=eo;return{reason:t,event:e??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...l}}function iW(t){return`data-base-ui-${t}`}const A4=k.createContext(null),sW=()=>k.useContext(A4),oW=iW("portal");function R4(t={}){const{ref:e,container:n,componentProps:a=eo,elementProps:r}=t,s=E4(),c=sW()?.portalNode,[u,h]=k.useState(null),[p,m]=k.useState(null),v=mo(P=>{P!==null&&m(P)}),y=k.useRef(null);Ka(()=>{if(n===null){y.current&&(y.current=null,m(null),h(null));return}if(s==null)return;const P=(n&&(ab(n)?n:n.current))??c??document.body;if(P==null){y.current&&(y.current=null,m(null),h(null));return}y.current!==P&&(y.current=P,m(null),h(P))},[n,c,s]);const b=iu("div",a,{ref:[e,v],props:[{id:s,[oW]:""},r]});return{portalNode:p,portalSubtree:u&&b?$l.createPortal(b,u):null}}const TZ=k.forwardRef(function(e,n){const{render:a,className:r,style:s,children:l,container:c,renderGuards:u,...h}=e,{portalNode:p,portalSubtree:m}=R4({container:c,ref:n,componentProps:e,elementProps:h}),v=k.useRef(null),y=k.useRef(null),b=k.useRef(null),x=k.useRef(null),[P,T]=k.useState(null),L=k.useRef(!1),E=P?.modal,A=P?.open,I=typeof u=="boolean"?u:!!P&&!P.modal&&P.open&&!!p;k.useEffect(()=>{if(!p||E)return;function D(S){p&&S.relatedTarget&&mv(S)&&(S.type==="focusin"?L.current&&(oP(p),L.current=!1):(uH(p),L.current=!0))}return a4(to(p,"focusin",D,!0),to(p,"focusout",D,!0))},[p,E]),Ka(()=>{!p||A!==!0||!L.current||(oP(p),L.current=!1)},[A,p]);const B=k.useMemo(()=>({beforeOutsideRef:v,afterOutsideRef:y,beforeInsideRef:b,afterInsideRef:x,portalNode:p,setFocusManagerState:T}),[p]);return R.jsxs(k.Fragment,{children:[m,R.jsxs(A4.Provider,{value:B,children:[I&&p&&R.jsx(bd,{"data-type":"outside",ref:v,onFocus:D=>{if(mv(D,p))b.current?.focus();else{const S=P?P.domReference:null;dH(S)?.focus()}}}),I&&p&&R.jsx("span",{"aria-owns":p.id,style:$H}),p&&$l.createPortal(l,p),I&&p&&R.jsx(bd,{"data-type":"outside",ref:y,onFocus:D=>{if(mv(D,p))x.current?.focus();else{const S=P?P.domReference:null;cH(S)?.focus(),P?.closeOnFocusOut&&P?.onOpenChange(!1,rW(aW,D.nativeEvent))}}})]})]})}),lW=k.forwardRef(function(e,n){const{children:a,container:r,className:s,render:l,style:c,...u}=e,{portalNode:h,portalSubtree:p}=R4({container:r,ref:n,componentProps:e,elementProps:u});return!p&&!h?null:R.jsxs(k.Fragment,{children:[p,h&&$l.createPortal(a,h)]})}),cW=lW;function dW(){const t=k.useContext(Q0);if(!t)throw new Error(Jl(73));const e=t.useState("toasts");return k.useMemo(()=>({toasts:e,add:t.addToast,close:t.closeToast,update:t.updateToast,promise:t.promiseToast}),[e,t])}function uW(){const t=new Set;function e(n){t.forEach(a=>a(n))}return{" subscribe":function(a){return t.add(a),()=>{t.delete(a)}},add(n){const a=n.id||r4("toast"),r={...n,id:a,transitionStatus:"starting"};return e({action:"add",options:r}),a},close(n){e({action:"close",options:{id:n}})},update(n,a){e({action:"update",options:{...a,id:n}})},promise(n,a){let r=n;return e({action:"promise",options:{...a,promise:n,setPromise(s){r=s}}}),r}}}const hb=uW();function EZ(t){return hb.add(t)}function hW({children:t}){return R.jsxs(pH,{toastManager:hb,children:[t,R.jsx(cW,{children:R.jsx(RH,{className:"fixed inset-x-0 top-6 z-[100] mx-auto flex w-full max-w-sm flex-col items-center gap-2 px-4 outline-none",children:R.jsx(pW,{})})})]})}function pW(){const{toasts:t}=dW();return t.map(e=>{const n=e.data?.onUndo;return R.jsxs(KH,{toast:e,className:$t("pointer-events-auto flex w-full items-center gap-3 rounded-xl border border-oai-gray-200 bg-oai-white px-4 py-3 shadow-xl transition-all duration-200 ease-out","data-[starting-style]:-translate-y-3 data-[starting-style]:opacity-0","data-[ending-style]:-translate-y-3 data-[ending-style]:opacity-0","dark:border-oai-gray-800 dark:bg-oai-gray-900"),children:[R.jsx(ZH,{className:"min-w-0 flex-1 text-sm font-medium text-oai-black dark:text-white"}),n?R.jsx("button",{type:"button",onClick:()=>{n(),hb.close(e.id)},className:"shrink-0 rounded-md px-2 py-1 text-xs font-semibold text-oai-gray-600 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:text-oai-gray-300 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:xe("shared.action.undo")}):null,R.jsx(nW,{"aria-label":xe("shared.action.dismiss"),className:"-mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-oai-gray-400 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus:outline-none focus:ring-2 focus:ring-oai-gray-400/30 dark:hover:bg-oai-gray-800 dark:hover:text-white",children:R.jsx(v0,{className:"h-3.5 w-3.5","aria-hidden":!0})})]},e.id)})}const pb=Object.freeze(["limits","leaderboard"]),fW=Object.freeze({limits:"/limits",leaderboard:"/leaderboard"}),mW=Object.freeze({limits:()=>In(()=>import("./LimitsPage-Bwc3XCCg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),leaderboard:()=>In(()=>import("./LeaderboardPage-BbPfFFuF.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19]))}),L4="total",D4=0,pP=20,gW=Object.freeze([10,20,50,100]),vW="tokentracker:leaderboard:pageSize",_W=20,yW=Object.freeze(["dashboard-existing","silent-preload","page-load","manual-refresh"]);let fP=0,Ja;class bW{constructor(e={}){this.limits=null,this.leaderboard=new Map,this.leaderboardMaxEntries=xW(e.leaderboardMaxEntries)}read(e,n){return su(e),e==="limits"?!this.limits||this.limits.contextKey!==n?null:cp(this.limits):n?cp(this.leaderboard.get(n)):null}write(e,n={}){if(e.targetKey==="limits"){this.limits=e;return}this.leaderboard.has(e.contextKey)&&this.leaderboard.delete(e.contextKey),this.leaderboard.set(e.contextKey,e),this.evictLeaderboardEntries(n.activeContextKey||e.contextKey)}evictLeaderboardEntries(e=null){for(;this.leaderboard.size>this.leaderboardMaxEntries;){const n=Array.from(this.leaderboard.keys()).find(a=>a!==e)||this.leaderboard.keys().next().value;this.leaderboard.delete(n)}}snapshot(){return{limits:cp(this.limits),leaderboard:{maxEntries:this.leaderboardMaxEntries,size:this.leaderboard.size,keys:Array.from(this.leaderboard.keys())}}}}class kW{constructor(e={}){fP+=1,this.sessionId=`dashboard-preload-${fP}`,this.createdAt=Date.now(),this.completedAt=null,this.startedAfterMainContentVisible=!1,this.cache=new bW(e),this.targets={limits:mP("limits"),leaderboard:mP("leaderboard")}}}function mP(t){return{key:t,route:fW[t],resourceStatus:"idle",stateStatus:"idle",error:null,resourcePromise:null,resourceModule:null,resourceRequestId:0,statePromise:null,stateRequestId:0,pendingStateContextKey:null}}function wW(t={}){return new kW(t)}function xW(t){const e=Number(t);return!Number.isInteger(e)||e<1?_W:e}Ja=wW();function su(t){if(!pb.includes(t))throw new Error(`Unknown dashboard preload target: ${t}`)}function I4(t){return t?typeof t=="string"?t:t.message||String(t):null}function PW(t,e){return yW.includes(t)?t:e}function SW(t){const e=Number(t);return Number.isFinite(e)?e:Date.now()}function cp(t){return t?{...t}:null}function gP(){const t=pb.every(e=>{const n=Ja.targets[e];return n.resourceStatus==="fulfilled"||n.resourceStatus==="rejected"});Ja.completedAt=t?Date.now():null}function CW(){Ja.startedAfterMainContentVisible=!0}function fb(t,e={}){su(t);const n=Object.entries(e).filter(([,a])=>a!==void 0).sort(([a],[r])=>a.localeCompare(r)).map(([a,r])=>`${a}=${r===null?"null":String(r)}`);return`${t}:${n.join("|")}`}function TW(t,e={}){su(t);const n=Ja.targets[t];if(n.resourceStatus==="fulfilled")return Promise.resolve(n.resourceModule);if(n.resourceStatus==="pending"&&n.resourcePromise)return n.resourcePromise;const a=e.loader||mW[t],r=n.resourceRequestId+1;n.resourceRequestId=r,n.resourceStatus="pending",n.error=null;const s=Promise.resolve().then(()=>a()).then(l=>n.resourceRequestId!==r||n.resourcePromise!==s?null:(n.resourceStatus="fulfilled",n.resourceModule=l,n.error=null,gP(),l)).catch(l=>(n.resourceRequestId!==r||n.resourcePromise!==s||(n.resourceStatus="rejected",n.error=I4(l),gP()),null));return n.resourcePromise=s,s}function EW(t={}){const e=t.loaders||{};return Promise.all(pb.map(n=>TW(n,{loader:e[n]})))}function M4(t,e){su(t);const n=Ja.targets[t],a=e?.status||"fulfilled",r={targetKey:t,status:a,data:e?.data??null,error:I4(e?.error),source:PW(e?.source,"silent-preload"),generatedAt:SW(e?.generatedAt),updatedAt:Date.now(),contextKey:e?.contextKey||fb(t,e?.context||{})};return n.stateStatus=a,a==="rejected"||a==="skipped"?n.error=r.error:a==="fulfilled"&&(n.error=null,Ja.cache.write(r,{activeContextKey:e?.activeContextKey})),cp(r)}function N4(t,e){return su(t),Ja.cache.read(t,e)}function AZ(t,e={}){return M4("limits",{data:t,source:e.source||"dashboard-existing",contextKey:e.contextKey||O4(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function O4(t={}){return fb("limits",{state:"current",...t})}function RZ(t=O4()){return N4("limits",t)}function W_(t,e={}){return M4("leaderboard",{activeContextKey:e.activeContextKey,data:t,source:e.source||"silent-preload",contextKey:e.contextKey||mb(e.context||{}),generatedAt:e.generatedAt,status:e.status||"fulfilled",error:e.error})}function AW(t){return N4("leaderboard",t)}function j4(){if(typeof window>"u")return pP;try{const t=window.localStorage.getItem(vW),e=Number(t);if(gW.includes(e))return e}catch{}return pP}function z4(t={}){const e=t.userId;return e!==void 0?e||null:t.cloudUser?.id||null}function F4(t={}){return typeof t.accessMode=="string"&&t.accessMode.trim()?t.accessMode.trim():t.mockEnabled?"mock":t.baseUrl?"cloud":"unavailable"}function mb(t={}){const e=!!t.mockEnabled,n=t.baseUrl??"";return fb("leaderboard",{accessMode:F4({...t,baseUrl:n,mockEnabled:e}),baseUrl:n,mockEnabled:e,offset:t.offset??D4,pageSize:t.pageSize??j4(),period:t.period||L4,userId:z4(t)})}function Lh(t,e){const n=Ja.targets.leaderboard;return n.stateRequestId+=1,n.statePromise=null,n.pendingStateContextKey=null,W_(null,{contextKey:e,status:"skipped",error:t})}function RW(t={}){const e=Ja,n=!!t.mockEnabled,a=t.baseUrl??"",r=F4({...t,baseUrl:a,mockEnabled:n}),s=t.period||L4,l=t.pageSize??j4(),c=t.offset??D4,u=z4(t),h=mb({accessMode:r,baseUrl:a,mockEnabled:n,offset:c,pageSize:l,period:s,userId:u});if(!n&&t.authLoading)return Promise.resolve(Lh("auth-loading",h));if(!n&&!t.signedIn&&r!=="public")return Promise.resolve(Lh("not-signed-in",h));if(!n&&!a)return Promise.resolve(Lh("missing-base-url",h));if(!n&&r==="unavailable")return Promise.resolve(Lh("access-unavailable",h));const p=e.targets.leaderboard,m=AW(h);if(m)return Promise.resolve(m);if(p.stateStatus==="pending"&&p.statePromise&&p.pendingStateContextKey===h)return p.statePromise;const v=p.stateRequestId+1;p.stateRequestId=v,p.stateStatus="pending",p.pendingStateContextKey=h,p.error=null;const y=Promise.resolve().then(()=>t9({userId:u,period:s,limit:l,offset:c})).then(b=>Ja!==e||p.stateRequestId!==v||p.statePromise!==y?null:(p.pendingStateContextKey=null,W_(b,{contextKey:h}))).catch(b=>(Ja!==e||p.stateRequestId!==v||p.statePromise!==y||(p.pendingStateContextKey=null,W_(null,{contextKey:h,status:"rejected",error:b})),null));return p.statePromise=y,y}const LW=typeof window<"u"?window.location.search:"",vP=new URLSearchParams(LW),Dh=vP.get("insforge_code")||vP.get("code")||null,DW=typeof window<"u"&&!!window.webkit?.messageHandlers?.nativeOAuth;function IW(){eu();const{loading:t,signedIn:e}=bo(),n=Bl(),[a,r]=k.useState("processing"),[s,l]=k.useState(null),c=k.useRef(!1);k.useEffect(()=>{if(!(!Dh||c.current)){if(c.current=!0,DW){l(!1);return}(async()=>{try{const p=await(await fetch("/api/auth-bridge/verifier")).json();l(!!p?.native)}catch{l(!1)}})()}},[]),k.useEffect(()=>{if(s!==!0||!Dh)return;r("redirecting");const h=setTimeout(()=>{window.location.href=`tokentracker://auth/callback?insforge_code=${encodeURIComponent(Dh)}`},200);return()=>clearTimeout(h)},[s]),k.useEffect(()=>{if(s!==!1||t)return;if(e){n("/dashboard",{replace:!0});return}const h=setTimeout(()=>{e||r("failed")},12e3);return()=>clearTimeout(h)},[s,t,e,n]),k.useEffect(()=>{if(!Dh&&s===null){const h=setTimeout(()=>r("failed"),3e3);return()=>clearTimeout(h)}},[s]);const u=()=>{n("/dashboard",{replace:!0})};return a==="processing"&&s!==!0&&(s===null||s===!1&&t)?R.jsx("div",{className:"min-h-screen bg-oai-gray-950"}):R.jsx("div",{className:"min-h-screen bg-oai-gray-950 text-white font-oai antialiased dark flex items-center justify-center",children:R.jsxs("div",{className:"text-center space-y-4 max-w-sm px-4",children:[a==="processing"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-8 h-8 border-2 border-oai-gray-600 border-t-white rounded-full animate-spin mx-auto"}),R.jsx("p",{className:"text-oai-gray-400 text-sm",children:xe("auth.callback.processing")})]}),a==="redirecting"&&R.jsxs(R.Fragment,{children:[R.jsx("div",{className:"w-12 h-12 mx-auto rounded-full bg-green-500/15 flex items-center justify-center",children:R.jsx("svg",{className:"w-6 h-6 text-green-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:R.jsx("path",{d:"M20 6 9 17l-5-5"})})}),R.jsx("p",{className:"text-white text-sm font-medium",children:xe("auth.callback.success")}),R.jsx("p",{className:"text-oai-gray-500 text-xs",children:xe("auth.callback.redirecting")})]}),a==="failed"&&R.jsxs("div",{className:"space-y-3",children:[R.jsx("p",{className:"text-oai-gray-300 text-sm",children:xe("auth.callback.failed")}),R.jsx("button",{type:"button",onClick:u,className:"px-4 py-2 rounded-lg bg-oai-gray-800 text-sm text-white hover:bg-oai-gray-700 transition-colors",children:xe("auth.callback.close")})]})]})})}const MW=k.lazy(()=>In(()=>import("./DashboardPage-B7F7CLG5.js"),__vite__mapDeps([20,13,1,14,21,22,23,11,24,3,9,10,12,25,26,27,4,28,29,30])).then(t=>({default:t.DashboardPage}))),NW=k.lazy(()=>In(()=>import("./IpCheckPage-DkTAw_dO.js"),[])),OW=k.lazy(()=>In(()=>import("./AchievementsPage-DAZPKi69.js"),__vite__mapDeps([31,32,16,17,18,33]))),jW=k.lazy(()=>In(()=>import("./LandingPage-Dvb9s-kJ.js"),__vite__mapDeps([34,35,19,12,36,7,30,33])).then(t=>({default:t.LandingPage}))),zW=k.lazy(()=>In(()=>import("./LeaderboardPage-BbPfFFuF.js"),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19])).then(t=>({default:t.LeaderboardPage}))),FW=k.lazy(()=>In(()=>import("./LeaderboardProfilePage-DRautoWL.js"),__vite__mapDeps([37,14,35,38,21,22,15,16,17,18,32,33,6,39,12,23,11,7])).then(t=>({default:t.LeaderboardProfilePage}))),UW=k.lazy(()=>In(()=>import("./LimitsPage-Bwc3XCCg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(t=>({default:t.LimitsPage}))),BW=k.lazy(()=>In(()=>import("./LoginPage-CffpNmm-.js"),[]).then(t=>({default:t.LoginPage}))),$W=k.lazy(()=>In(()=>import("./ResetPasswordPage-P-VatRkZ.js"),[]).then(t=>({default:t.ResetPasswordPage}))),VW=k.lazy(()=>In(()=>import("./DevicePage-BgByRtlZ.js"),[])),HW=k.lazy(()=>In(()=>import("./WrappedPage-C9sMo5ha.js"),[])),WW=k.lazy(()=>In(()=>import("./SettingsPage-uCZ0OdF3.js"),__vite__mapDeps([40,2,41,3,29,12,36,14,9,10,11,22,42,43,23,44,7])).then(t=>({default:t.SettingsPage}))),GW=k.lazy(()=>In(()=>import("./SkillsPage-Dy_sojV5.js"),__vite__mapDeps([45,5,6,7,3,43,23,11,44,22,14,27,12,46,10,18,25])).then(t=>({default:t.SkillsPage}))),qW=k.lazy(()=>In(()=>import("./WidgetsPage-CzbeMPoq.js"),__vite__mapDeps([47,9,10,11,12,42,41,3,4,6,7])).then(t=>({default:t.WidgetsPage}))),KW=k.lazy(()=>In(()=>import("./PetPage-C_lq7mMA.js"),__vite__mapDeps([48,41,3,28,4,39,27,17,46])).then(t=>({default:t.PetPage})));function YW(){const{resolvedLocale:t}=eu(),e=_a(),n=bo();x$();const a=k.useRef(!1),r=k.useRef(!1),s=k.useRef(new Set),l=bn(),c=k.useMemo(()=>typeof window>"u"?!1:f$(window.location.search),[]),u=e?.pathname||"/",h=new URL(window.location.href),p=h.pathname.replace(/\/+$/,"")||"/",v=p.match(/^\/share\/([^/?#]+)$/i)?.[1]||null,y=h.searchParams.get("token")||null,b=v||y,x=p==="/share"||p==="/share.html"||p.startsWith("/share/"),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),T=u.replace(/\/+$/,"")||"/",L=T==="/"||T==="/dashboard",E=T==="/leaderboard",A=T.match(/^\/u\/([^/]+)$/i),I=A?A[1]:null,B=!!(n.enabled&&n.signedIn),D=P||B,S=!1,j=h$(),F=!D&&!l&&!P,Z=l?"mock":n.loading?"unavailable":B?"cloud":D?"local":"unavailable",ee=k.useCallback(()=>{if(!a.current||!l&&n.loading||!l&&!D)return;const Me={accessMode:Z,baseUrl:p$(),mockEnabled:l,signedIn:D,authLoading:!!n.loading,userId:B&&n.user?.id||null},Oe=mb(Me);s.current.has(Oe)||(s.current.add(Oe),RW(Me))},[B,n.loading,n.user?.id,Z,l,D]),de=k.useCallback(()=>{L&&(a.current||(a.current=!0,CW()),r.current||(r.current=!0,EW()),ee())},[L,ee]);k.useEffect(()=>{ee()},[ee]);const ae=k.useMemo(()=>!n.enabled||!B?null:{getAccessToken:()=>n.getAccessToken(),name:n.displayName||"",userId:n.user?.id||null},[B,n]);let re=P||l||c?"dashboard":"landing";T==="/landing"&&(re="landing"),T==="/dashboard"&&(re="dashboard"),E&&(re="dashboard"),I&&(re="dashboard");const te=T==="/limits",le=T==="/settings",H=T==="/skills",Q=T==="/widgets",W=T==="/pet-settings",N=T==="/ip-check",Y=T==="/achievements";(te||le||H||Q||W||N||Y)&&(re="dashboard");let ue=MW;I?ue=FW:T==="/leaderboard"?ue=zW:te?ue=UW:le?ue=WW:H?ue=GW:Q?ue=qW:W?ue=KW:N?ue=NW:Y&&(ue=OW);const ke=!x&&!F&&(T==="/dashboard"||T==="/"||E||te||le||H||Q||W||N||Y);if(!P&&!B&&!x&&!n.loading&&re==="dashboard"&&!E&&!I&&T!=="/login"&&T!=="/reset-password"&&T!=="/landing"&&T!=="/auth/callback"&&T!=="/auth/native-callback")return R.jsx(H8,{to:"/login",replace:!0});let _e=null;if(T==="/auth/callback"||T==="/auth/native-callback")_e=R.jsx(IW,{});else if(T==="/login")_e=R.jsx(BW,{});else if(T==="/reset-password")_e=R.jsx($W,{});else if(T==="/device")_e=R.jsx(VW,{});else if(T==="/wrapped")_e=R.jsx(HW,{});else if(re==="landing")_e=R.jsx(jW,{signInUrl:"/login",signUpUrl:"/login"});else{const Me=R.jsx(ue,{baseUrl:j,auth:ae,signedIn:D,sessionSoftExpired:S,signOut:()=>n.enabled?n.signOut():Promise.resolve(),publicMode:x,publicToken:b,userId:I,signInUrl:"/login",signUpUrl:"/login",onMainContentVisible:de},t);ke?_e=R.jsx(U$,{children:Me}):_e=Me}return R.jsx(oO,{children:R.jsx(dO,{children:R.jsx(hW,{children:R.jsxs(uO,{children:[R.jsx(k.Suspense,{fallback:null,children:_e}),ke?R.jsx(mV,{}):null,R.jsx(c$,{}),R.jsx(iN,{}),R.jsx(gN,{})]})})})})}var J=typeof window<"u"?window:void 0,Tn=typeof globalThis<"u"?globalThis:J;typeof self>"u"&&(Tn.self=Tn),typeof File>"u"&&(Tn.File=function(){});var ia=Tn?.navigator,we=Tn?.document,pn=Tn?.location,G_=Tn?.fetch,q_=Tn!=null&&Tn.XMLHttpRequest&&"withCredentials"in new Tn.XMLHttpRequest?Tn.XMLHttpRequest:void 0,_P=Tn?.AbortController,ZW=Tn?.CompressionStream,ga=ia?.userAgent,Be=J??{};function U4(){return!(!J||J.navigator.onLine===!1)}var yP="1.398.3",on={DEBUG:!1,LIB_VERSION:yP,LIB_NAME:"web",JS_SDK_VERSION:yP};function bP(t,e,n,a,r,s,l){try{var c=t[s](l),u=c.value}catch(h){return void n(h)}c.done?e(u):Promise.resolve(u).then(a,r)}function _n(t){return function(){var e=this,n=arguments;return new Promise((function(a,r){var s=t.apply(e,n);function l(u){bP(s,a,r,l,c,"next",u)}function c(u){bP(s,a,r,l,c,"throw",u)}l(void 0)}))}}function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fe.apply(null,arguments)}function B4(t,e){if(t==null)return{};var n={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;n[a]=t[a]}return n}var kP=t=>{if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}};function wP(t){return typeof t=="string"||t}function xP(t){return typeof t=="string"?t:void 0}var Vc,ki=(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.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.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})({}),PP=(function(t){return t.GZipJS="gzip-js",t.Base64="base64",t})({}),JW=["$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"],XW=["token"],$4="NativeGzipValidationError",K_=t=>t.length>=2&&t[0]===31&&t[1]===139,SP=(t,e)=>t===PP.GZipJS||e===PP.GZipJS||e==="gzip",CP=t=>!(!t||typeof t!="object")&&("name"in t?String(t.name):"")==="NotReadableError",Ih=t=>{var e=new Error("Native gzip produced invalid output: "+t);throw e.name=$4,e},QW=(function(){var t=_n((function*(e,n){18>e.size&&Ih("too-short");var a=new Uint8Array(yield e.slice(0,10).arrayBuffer());K_(a)&&a[2]===8||Ih("invalid-header");var r=new DataView(yield e.slice(e.size-8).arrayBuffer());r.getUint32(0,!0)!==(l=>{for(var c=(()=>{if(Vc)return Vc;Vc=[];for(var p=0;256>p;p++){for(var m=p,v=0;8>v;v++)m=1&m?3988292384^m>>>1:m>>>1;Vc[p]=m>>>0}return Vc})(),u=4294967295,h=0;l.length>h;h++)u=c[255&(u^l[h])]^u>>>8;return(4294967295^u)>>>0})(n)&&Ih("invalid-crc");var s=n.length>>>0;r.getUint32(4,!0)!==s&&Ih("invalid-size")}));return function(e,n){return t.apply(this,arguments)}})();function Y_(){return Y_=_n((function*(t,e,n){e===void 0&&(e=!0);try{var a=new TextEncoder().encode(t),r=new CompressionStream("gzip"),s=r.writable.getWriter(),l=s.write(a).then((()=>s.close())).catch((function(){var h=_n((function*(p){try{yield s.abort(p)}catch{}throw p}));return function(p){return h.apply(this,arguments)}})()),c=new Response(r.readable).blob(),[u]=yield Promise.all([c,l]);return yield QW(u,a),u}catch(h){if(n!=null&&n.rethrow)throw h;return e&&console.error("Failed to gzip compress data",h),null}})),Y_.apply(this,arguments)}var eG=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],TP=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var n=t.toLowerCase();return eG.concat(e).some((a=>{var r=a.toLowerCase();return n.indexOf(r)!==-1}))};function Ke(t,e){return t.indexOf(e)!==-1}var $f=function(t){return t.trim()},Z_=function(t){return t.replace(/^\$/,"")},V4=Object.prototype,H4=V4.hasOwnProperty,Vf=V4.toString,ct=Array.isArray||function(t){return Vf.call(t)==="[object Array]"},yr=t=>typeof t=="function",qt=t=>t===Object(t)&&!ct(t),cs=t=>{if(qt(t)){for(var e in t)if(H4.call(t,e))return!1;return!0}return!1},be=t=>t===void 0,Lt=t=>Vf.call(t)=="[object String]",J_=t=>Lt(t)&&t.trim().length===0,oa=t=>t===null,nt=t=>be(t)||oa(t),Bn=t=>Vf.call(t)=="[object Number]"&&t==t,yi=t=>Bn(t)&&t>0,Hr=t=>Vf.call(t)==="[object Boolean]",tG=t=>t instanceof FormData,nG=t=>Ke(JW,t),aG=t=>Ke(XW,t);function W4(t){return t===null||typeof t!="object"}function Jp(t,e){return{}.toString.call(t)==="[object "+e+"]"}function gb(t){return typeof Event<"u"&&(function(e,n){try{return e instanceof n}catch{return!1}})(t,Event)}var rG=[!0,"true",1,"1","yes"],_v=t=>Ke(rG,t),iG=[!1,"false",0,"0","no"];function Br(t,e,n,a,r){return e>n&&(a.warn("min cannot be greater than max."),e=n),Bn(t)?t>n?(a.warn(" cannot be greater than max: "+n+". Using max value instead."),n):e>t?(a.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(a.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+r),Br(r||n,e,n,a))}class sG{constructor(e){this.Ee={},this.Pe=e.Pe,this.Fe=Br(e.bucketSize,0,100,e.Ae),this.$e=Br(e.refillRate,0,this.Fe,e.Ae),this.De=Br(e.refillInterval,0,864e5,e.Ae)}Ne(e,n){var a=Math.floor((n-e.lastAccess)/this.De);a>0&&(e.tokens=Math.min(e.tokens+a*this.$e,this.Fe),e.lastAccess=e.lastAccess+a*this.De)}consumeRateLimit(e){var n,a=Date.now(),r=String(e),s=this.Ee[r];return s?this.Ne(s,a):this.Ee[r]=s={tokens:this.Fe,lastAccess:a},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.Pe)==null||n.call(this,e)),s.tokens===0)}stop(){this.Ee={}}}var La="Mobile",Xp="iOS",Si="Android",Ml="Tablet",G4=Si+" "+Ml,q4="iPad",K4="Apple",Y4=K4+" Watch",kd="Safari",Nl="BlackBerry",Z4="Samsung",J4=Z4+"Browser",X4=Z4+" Internet",so="Chrome",oG=so+" OS",Q4=so+" "+Xp,vb="Internet Explorer",eE=vb+" "+La,_b="Opera",lG=_b+" Mini",yb="Edge",tE="Microsoft "+yb,xl="Firefox",nE=xl+" "+Xp,Fd="Nintendo",Ud="PlayStation",Pl="Xbox",aE=Si+" "+La,rE=La+" "+kd,id="Windows",X_=id+" Phone",EP="Nokia",Q_="Ouya",iE="Generic",cG=iE+" "+La.toLowerCase(),sE=iE+" "+Ml.toLowerCase(),ey="Konqueror",oE="Oculus Browser",Qp="Vivaldi",lE="Yandex",ef="Whale",ty="DuckDuckGo",cE="Pale Moon",tf="Waterfox",wd="Brave",dE="Google Search App",Xt="(\\d+(\\.\\d+)?)",yv=new RegExp("Version/"+Xt),dG=new RegExp(Pl,"i"),uG=new RegExp(Ud+" \\w+","i"),hG=new RegExp(Fd+" \\w+","i"),bb=new RegExp(Nl+"|PlayBook|BB10","i"),pG={"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"},uE=function(t,e,n,a){e=e||"";var r=(function(s){return s!=null&&s.brave?wd:null})(n);return r||(a!=null&&a.detectGoogleSearchApp&&Ke(t,"GSA/")?dE:Ke(t," OPR/")&&Ke(t,"Mini")?lG:Ke(t," OPR/")?_b:bb.test(t)?Nl:Ke(t,"IE"+La)||Ke(t,"WPDesktop")?eE:Ke(t,"OculusBrowser")?oE:Ke(t,J4)?X4:Ke(t,yb)||Ke(t,"Edg/")?tE:Ke(t,Qp+"/")?Qp:Ke(t,"YaBrowser/")?lE:Ke(t,ef+"/")?ef:Ke(t,ty+"/")||Ke(t,"Ddg/")?ty:Ke(t,"FBIOS")?"Facebook "+La:Ke(t,"UCWEB")||Ke(t,"UCBrowser")?"UC Browser":Ke(t,"CriOS")?Q4:Ke(t,"CrMo")||Ke(t,so)?so:Ke(t,Si)&&Ke(t,kd)?aE:Ke(t,"FxiOS")?nE:Ke(t.toLowerCase(),ey.toLowerCase())?ey:Ke(t,wd+"/")?wd:((s,l)=>l&&Ke(l,K4)||(function(c){return Ke(c,kd)&&!Ke(c,so)&&!Ke(c,Si)})(s))(t,e)?Ke(t,La)?rE:kd:Ke(t,"PaleMoon/")?cE:Ke(t,tf+"/")?tf:Ke(t,xl)?xl:Ke(t,"MSIE")||Ke(t,"Trident/")?vb:Ke(t,"Gecko")?xl:"")},fG={[eE]:[new RegExp("rv:"+Xt)],[tE]:[new RegExp(yb+"?\\/"+Xt)],[so]:[new RegExp("("+so+"|CrMo)\\/"+Xt)],[Q4]:[new RegExp("CriOS\\/"+Xt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Xt)],[kd]:[yv],[rE]:[yv],[_b]:[new RegExp("(Opera|OPR)\\/"+Xt)],[xl]:[new RegExp(xl+"\\/"+Xt)],[nE]:[new RegExp("FxiOS\\/"+Xt)],[ey]:[new RegExp("Konqueror[:/]?"+Xt,"i")],[Nl]:[new RegExp(Nl+" "+Xt),yv],[aE]:[new RegExp("android\\s"+Xt,"i")],[X4]:[new RegExp(J4+"\\/"+Xt)],[oE]:[new RegExp("OculusBrowser\\/"+Xt)],[Qp]:[new RegExp(Qp+"\\/"+Xt)],[lE]:[new RegExp("YaBrowser\\/"+Xt)],[ef]:[new RegExp(ef+"\\/"+Xt)],[wd]:[new RegExp(wd+"\\/"+Xt)],[ty]:[new RegExp("(DuckDuckGo|Ddg)\\/"+Xt)],[cE]:[new RegExp("PaleMoon\\/"+Xt)],[tf]:[new RegExp(tf+"\\/"+Xt)],[dE]:[new RegExp("GSA\\/"+Xt)],[vb]:[new RegExp("(rv:|MSIE )"+Xt)],Mozilla:[new RegExp("rv:"+Xt)]},mG=function(t,e,n,a){var r=uE(t,e,n,a),s=fG[r];if(be(s))return null;for(var l=0;s.length>l;l++){var c=t.match(s[l]);if(c)return parseFloat(c[c.length-2])}return null},AP=[[new RegExp(Pl+"; "+Pl+" (.*?)[);]","i"),t=>[Pl,t&&t[1]||""]],[new RegExp(Fd,"i"),[Fd,""]],[new RegExp(Ud,"i"),[Ud,""]],[bb,[Nl,""]],[new RegExp(id,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[X_,""];if(new RegExp(La).test(e)&&!/IEMobile\b/.test(e))return[id+" "+La,""];var n=/Windows NT ([0-9.]+)/i.exec(e);if(n&&n[1]){var a=pG[n[1]]||"";return/arm/i.test(e)&&(a="RT"),[id,a]}return[id,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>t&&t[3]?[Xp,[t[3],t[4],t[5]||"0"].join(".")]:[Xp,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=be(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+Si+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Si+")","i"),t=>t&&t[2]?[Si,[t[2],t[3],t[4]||"0"].join(".")]:[Si,""]],[/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/,[oG,""]],[/Linux|debian/i,["Linux",""]]],RP=function(t){return hG.test(t)?Fd:uG.test(t)?Ud:dG.test(t)?Pl:new RegExp(Q_,"i").test(t)?Q_:new RegExp("("+X_+"|WPDesktop)","i").test(t)?X_:/iPad/.test(t)?q4:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?Y4:bb.test(t)?Nl:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(EP,"i").test(t)?EP:/(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(La).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)?Si:G4:new RegExp("(pda|"+La+")","i").test(t)?cG:new RegExp(Ml,"i").test(t)&&!new RegExp(Ml+" pc","i").test(t)?sE:""},gG=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function LP(t,e){return typeof(n=t)=="string"&&gG.test(n)?t:e();var n}function ms(t){return t&&t.split("#")[0]}function bv(t,e){var n=setTimeout(t,e);return n?.unref&&n?.unref(),n}var vG=t=>t instanceof Error,hE={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}},_G=hE.info;function pE(t){if(Hr(t))return{boolValue:t};if(typeof t=="number")return Number.isFinite(t)?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:{stringValue:String(t)};if(typeof t=="string")return{stringValue:t};if(ct(t))return{arrayValue:{values:t.map((e=>pE(e)))}};try{return{stringValue:JSON.stringify(t)}}catch{return{stringValue:String(t)}}}function fE(t){var e=[];for(var n in t){var a=t[n];oa(a)||be(a)||e.push({key:n,value:pE(a)})}return e}function yG(t,e){var n=t.level||"info",{text:a,number:r}=hE[n]||_G,s=String(Date.now())+"000000",l={};e.distinctId&&(l.posthogDistinctId=e.distinctId),e.sessionId&&(l.sessionId=e.sessionId),e.windowId&&(l["window.id"]=e.windowId),nt(e.sessionStartTimestamp)||(l.sessionStartTimestamp=String(e.sessionStartTimestamp)),nt(e.lastActivityTimestamp)||(l.lastActivityTimestamp=String(e.lastActivityTimestamp)),e.currentUrl&&(l["url.full"]=e.currentUrl),e.screenName&&(l["screen.name"]=e.screenName),e.appState&&(l["app.state"]=e.appState),e.activeFeatureFlags&&e.activeFeatureFlags.length>0&&(l.feature_flags=e.activeFeatureFlags);var c=fe({},l,t.attributes||{}),u={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:r,severityText:a,body:{stringValue:t.body},attributes:fE(c)};return t.trace_id&&(u.traceId=t.trace_id),t.span_id&&(u.spanId=t.span_id),be(t.trace_flags)||(u.flags=t.trace_flags),u}function mE(t,e,n){return fe({},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 gE(t,e,n,a){return{resourceLogs:[{resource:{attributes:fE(e)},scopeLogs:[{scope:{name:n,version:a},logRecords:t}]}]}}let bG=class{constructor(t,e,n,a,r,s,l){var c;s===void 0&&(s=()=>Promise.resolve()),this._instance=t,this.Se=e,this.Ae=n,this.qe=a,this.Be=r,this.je=s,this.He=l,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=e.maxBufferSize,this.Je=Math.max((c=e.maxQueueSize)!==null&&c!==void 0?c:e.maxBufferSize,e.maxBufferSize),this.Ye=e.flushIntervalMs,this.Ke=e.maxBatchRecordsPerPost,this.Xe=e.rateCapWindowMs,this.et=e.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(t){if(!this._instance.isDisabled&&!this._instance.optedOut&&t!=null&&t.body){var e=this.it(t);if(e!==null)if(e.body){if(this.nt()){var n={record:yG(e,this.qe())};this.Be((()=>this.st(n)))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(t){var e=this.Se.beforeSend;if(!e)return t;var n=ct(e)?e:[e],a=t;for(var r of n)try{var s=r(a);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;a=s}catch(l){return this.Ae.error("Error in beforeSend function for log:",l),null}return a}nt(){if(this.et===void 0)return!0;var t=Date.now(),e=t-this.We;return this.Xe>e&&e>=0||(this.We=t,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var t=this;return _n((function*(){if(!t._instance.isDisabled)return t.Ue||(t.Ue=t.ot().finally((()=>{t.Ue=null}))),t.Ue}))()}ot(){var t=this;return _n((function*(){var e;t.tt();var n=(e=t._instance.getPersistedProperty(ki.LogsQueue))!==null&&e!==void 0?e:[];if(n.length!==0)for(var a=n.length,r=0;n.length>0&&a>r;){var s,l;t.ze=0;var c=Math.min(n.length,t.Ke),u=n.slice(0,c),h=gE(u.map((m=>m.record)),t.ut(),(s=t.He)!==null&&s!==void 0?s:t._instance.getLibraryId(),t._instance.getLibraryVersion()),p=yield t._instance.ht(h);if(p.kind==="too-large"&&u.length>1)t.Ke=Math.max(1,Math.floor(u.length/2)),t.Ae.warn("Received 413 when sending logs batch of size "+u.length+", reducing batch size to "+t.Ke);else if(p.kind==="retry-later"||(p.kind==="too-large"?t.Ae.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.Se.maxBatchRecordsPerPost>t.Ke&&(t.Ke=Math.min(t.Se.maxBatchRecordsPerPost,t.Ke+1)),yield t.dt(u.length),n=(l=t._instance.getPersistedProperty(ki.LogsQueue))!==null&&l!==void 0?l:[],r+=u.length,p.kind==="fatal"))throw p.error}}))()}dt(t){var e=this;return _n((function*(){var n,a=Math.max(0,t-e.ze),r=(n=e._instance.getPersistedProperty(ki.LogsQueue))!==null&&n!==void 0?n:[];e._instance.setPersistedProperty(ki.LogsQueue,r.slice(a)),yield e.je()}))()}ut(){return mE(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(t){var e;if(!this._instance.optedOut){var n=(e=this._instance.getPersistedProperty(ki.LogsQueue))!==null&&e!==void 0?e:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(t),this._instance.setPersistedProperty(ki.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(t){t===void 0&&(t=this.Ye),this.vt||(this.vt=bv((()=>{this.vt=void 0,this.rt()}),t))}ft(){var t=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,t)}yt(){var t=this._instance.getPersistedProperty(ki.LogsQueue);return!!t&&t.length>0}shutdown(t){var e=this;return _n((function*(){e.tt();var n=e.flush().catch((()=>{}));t!==void 0?yield Promise.race([n,new Promise((a=>bv(a,t)))]):yield n}))()}flushWithTimeout(t){var e=this;return _n((function*(){var n=!1,a=e.flush(),r=new Promise((s=>bv((()=>{n=!0,s()}),t)));try{yield Promise.race([a,r])}finally{n&&a.catch((()=>{}))}}))()}rt(){this.flush().then((()=>{this.Ve=0}),(t=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",t)})).finally((()=>{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())}))}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Mh,DP,kv;function kG(t){var e=globalThis._posthogChunkIds;if(e){var n=Object.keys(e);return kv&&n.length===DP||(DP=n.length,kv=n.reduce(((a,r)=>{Mh||(Mh={});var s=Mh[r];if(s)a[s[0]]=s[1];else for(var l=t(r),c=l.length-1;c>=0;c--){var u=l[c],h=u?.filename,p=e[r];if(h&&p){a[h]=p,Mh[r]=[h,p];break}}return a}),{})),kv}}class wG{constructor(e,n,a){a===void 0&&(a=[]),this.coercers=e,this.stackParser=n,this.modifiers=a}buildFromUnknown(e,n){n===void 0&&(n={});var a=n&&n.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(a,n,0).apply(e),s=this.buildParsingContext(n),l=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(l,a),$exception_level:"error"}}modifyFrames(e){var n=this;return _n((function*(){for(var a of e)a.stacktrace&&a.stacktrace.frames&&ct(a.stacktrace.frames)&&(a.stacktrace.frames=yield n.applyModifiers(a.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 a,r;return e.cause!=null&&(a=this.parseStacktrace(e.cause,n)),e.stack!=""&&e.stack!=null&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?n.skipFirstLines:0),n.chunkIdMap)),fe({},e,{cause:a,stack:r})}applyChunkIds(e,n){return e.map((a=>(a.filename&&n&&(a.chunk_id=n[a.filename]),a)))}applyCoercers(e,n){for(var a of this.coercers)if(a.match(e))return a.coerce(e,n);return this.coerceFallback(n)}applyModifiers(e){var n=this;return _n((function*(){var a=e;for(var r of n.modifiers)a=yield r(a);return a}))()}convertToExceptionList(e,n){var a,r,s,l={type:e.type,value:e.value,mechanism:{type:(a=n.type)!==null&&a!==void 0?a:"generic",handled:(r=n.handled)===null||r===void 0||r,synthetic:(s=e.synthetic)!==null&&s!==void 0&&s}};e.stack&&(l.stacktrace={type:"raw",frames:e.stack});var c=[l];return e.cause!=null&&c.push(...this.convertToExceptionList(e.cause,fe({},n,{handled:!0}))),c}buildParsingContext(e){var n;return{chunkIdMap:kG(this.stackParser),skipFirstLines:(n=e.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(e,n,a){a===void 0&&(a=0);var r=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(e,n,l);return this.applyCoercers(s,c)}};return fe({},n,{syntheticException:a==0?n.syntheticException:void 0,mechanism:e,apply:s=>r(s,a),next:s=>r(s,a+1)})}}var Ol="?";function ny(t,e,n,a,r){var s={platform:t,filename:e,function:n==="<anonymous>"?Ol:n,in_app:!0};return be(a)||(s.lineno=a),be(r)||(s.colno=r),s}var vE=(t,e)=>{var n=t.indexOf("safari-extension")!==-1,a=t.indexOf("safari-web-extension")!==-1;return n||a?[t.indexOf("@")!==-1?t.split("@")[0]:Ol,n?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},xG=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,PG=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,SG=/\((\S*)(?::(\d+))(?::(\d+))\)/,CG=(t,e)=>{var n=xG.exec(t);if(n){var[,a,r,s]=n;return ny(e,a,Ol,+r,+s)}var l=PG.exec(t);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=SG.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[u,h]=vE(l[1]||Ol,l[2]);return ny(e,h,u,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},TG=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,EG=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,AG=(t,e)=>{var n=TG.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var a=EG.exec(n[3]);a&&(n[1]=n[1]||"eval",n[3]=a[1],n[4]=a[2],n[5]="")}var r=n[3],s=n[1]||Ol;return[s,r]=vE(s,r),ny(e,r,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},IP=/\(error: (.*)\)/;class RG{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,n){var a=Lt(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:a?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 Jp(e,"DOMException")}isDOMError(e){return Jp(e,"DOMError")}}class LG{match(e){return(n=>n instanceof Error)(e)}coerce(e,n){return{type:this.getType(e),value:this.getMessage(e,n),stack:this.getStack(e),cause:e.cause?n.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,n){var a=e.message;return String(a.error&&typeof a.error.message=="string"?a.error.message:a)}getStack(e){return e.stacktrace||e.stack||void 0}}class DG{constructor(){}match(e){return Jp(e,"ErrorEvent")&&e.error!=null}coerce(e,n){var a;return n.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}var IG=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class MG{match(e){return typeof e=="string"}coerce(e,n){var a,[r,s]=this.getInfos(e);return{type:r??"Error",value:s??e,stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}getInfos(e){var n="Error",a=e,r=e.match(IG);return r&&(n=r[1],a=r[2]),[n,a]}}var NG=["fatal","error","warning","log","info","debug"];function _E(t,e){e===void 0&&(e=40);var n=Object.keys(t);if(n.sort(),!n.length)return"[object has no keys]";for(var a=n.length;a>0;a--){var r=n.slice(0,a).join(", ");if(e>=r.length)return a===n.length?r:r.length>e?r.slice(0,e)+"...":r}return""}class OG{match(e){return typeof e=="object"&&e!==null}coerce(e,n){var a,r=this.getErrorPropertyFromObject(e);return r?n.apply(r):{type:this.getType(e),value:this.getValue(e),stack:(a=n.syntheticException)==null?void 0:a.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return gb(e)?e.constructor.name:"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 a=this.getObjectClassName(e);return(a&&a!=="Object"?"'"+a+"'":"Object")+" captured as exception with keys: "+_E(e)}isSeverityLevel(e){return Lt(e)&&!J_(e)&&NG.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var n in e)if({}.hasOwnProperty.call(e,n)){var a=e[n];if(vG(a))return a}}getObjectClassName(e){try{var n=Object.getPrototypeOf(e);return n?n.constructor.name:void 0}catch{return}}}class jG{match(e){return gb(e)}coerce(e,n){var a,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+_E(e),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}class zG{match(e){return W4(e)}coerce(e,n){var a;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}}}class FG{match(e){return Jp(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!gb(e))return!1;try{var n=e.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(e,n){var a,r=this.getUnhandledRejectionReason(e);return W4(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:(a=n.syntheticException)==null?void 0:a.stack,synthetic:!0}:n.apply(r)}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 nf="$message",af="$timestamp",UG=new Set([nf,af]),wv={enabled:!0,max_bytes:32768};function rf(t){var e;return t?{enabled:(e=t.enabled)!==null&&e!==void 0?e:wv.enabled,max_bytes:$G(t.max_bytes,wv.max_bytes)}:fe({},wv)}class BG{constructor(e){this.bt=[],this._t=0,this.Se=rf(e)}setConfig(e){this.Se=rf(e),this.wt()}add(e){var n=(function(r){var s,l,c;try{c=[],s=(l=JSON.stringify(r,(function(v,y){if(typeof y=="bigint")return y.toString();if(typeof y!="function"&&typeof y!="symbol"){if(y instanceof Error)return{name:y.name,message:y.message,stack:y.stack};if(y&&typeof y=="object"){for(;c.length>0&&c[c.length-1]!==this;)c.pop();if(c.includes(y))return"[Circular]";c.push(y)}return y}})))!==null&&l!==void 0?l:"null"}catch{return}try{var u=JSON.parse(s);if(!qt(u))return;var h=u,p=h[nf],m=h[af];return!Lt(p)||p.trim().length===0||!Lt(m)&&!Bn(m)?void 0:{step:h,json:s}}catch{return}})(e);if(n){var a=(function(r){if(typeof TextEncoder<"u")return new TextEncoder().encode(r).length;for(var s=encodeURIComponent(r),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);a>this.Se.max_bytes||(this.bt.push({step:n.step,bytes:a}),this._t+=a,this.wt())}}getAttachable(){return this.bt.map((e=>e.step))}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var e=this.bt.shift();e&&(this._t-=e.bytes)}}}function $G(t,e){if(!Bn(t)||t===1/0||t===-1/0)return e;var n=Math.floor(t);return 0>n?e:n}var yE=function(t,e){var{debugEnabled:n}=e===void 0?{}:e,a={k(r){if(J&&(on.DEBUG||Be.POSTHOG_DEBUG||n)&&!be(J.console)&&J.console){for(var s=("__rrweb_original__"in J.console[r])?J.console[r].__rrweb_original__:J.console[r],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];s(t,...c)}},debug(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("debug",...s)},info(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("log",...s)},warn(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("warn",...s)},error(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];a.k("error",...s)},critical(){for(var r=arguments.length,s=new Array(r),l=0;r>l;l++)s[l]=arguments[l];console.error(t,...s)},uninitializedWarning(r){a.error("You must initialize PostHog before calling "+r)},createLogger:(r,s)=>yE(t+" "+r,s)};return a},ye=yE("[PostHog.js]"),tn=ye.createLogger,VG=tn("[ExternalScriptsLoader]"),xv=(t,e,n)=>{if(t.config.disable_external_dependency_loading)return VG.warn(e+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var a=we?.querySelectorAll("script");if(a){for(var r,s=function(){if(a[l].src===e){var u=a[l];return u.__posthog_loading_callback_fired?{v:n()}:(u.addEventListener("load",(h=>{u.__posthog_loading_callback_fired=!0,n(void 0,h)})),u.onerror=h=>n(h),{v:void 0})}},l=0;a.length>l;l++)if(r=s())return r.v}var c=()=>{if(!we)return n("document not found");var u=we.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=e,u.onload=m=>{u.__posthog_loading_callback_fired=!0,n(void 0,m)},u.onerror=m=>n(m),t.config.prepare_external_dependency_script&&(u=t.config.prepare_external_dependency_script(u)),!u)return n("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")we.head.appendChild(u);else{var h,p=we.querySelectorAll("body > script");p.length>0?(h=p[0].parentNode)==null||h.insertBefore(u,p[0]):we.body.appendChild(u)}};we!=null&&we.body?c():we?.addEventListener("DOMContentLoaded",c)};Be.__PosthogExtensions__=Be.__PosthogExtensions__||{},Be.__PosthogExtensions__.loadExternalDependency=(t,e,n)=>{if(e!=="remote-config"){var a;if(t.config.strict_script_versioning)a=t.requestRouter.endpointFor("assets","/static/"+t.version+"/"+e+".js");else{var r="/static/"+e+".js?v="+t.version;if(e==="toolbar"){var s=3e5;r=r+"&t="+Math.floor(Date.now()/s)*s}a=t.requestRouter.endpointFor("assets",r)}xv(t,a,n)}else{var l=t.requestRouter.endpointFor("assets","/array/"+t.config.token+"/config.js");xv(t,l,n)}},Be.__PosthogExtensions__.loadSiteApp=(t,e,n)=>{var a=t.requestRouter.endpointFor("api",e);xv(t,a,n)};var bE="$people_distinct_id",sf="$device_id",Pv="$device_model",sd="__alias",od="__timers",ay="$autocapture_disabled_server_side",ry="$heatmaps_enabled_server_side",iy="$exception_capture_enabled_server_side",sy="$error_tracking_suppression_rules",oy="$error_tracking_capture_extension_exceptions",ly="$web_vitals_enabled_server_side",kb="$dead_clicks_enabled_server_side",wb="$product_tours_enabled_server_side",cy="$web_vitals_allowed_metrics",ao="$session_recording_remote_config",kE="$replay_sample_rate",wE="$replay_override_sampling",xE="$replay_override_linked_flag",PE="$replay_override_url_trigger",SE="$replay_override_event_trigger",_l="$sesid",xb="$session_is_sampled",Ys="$enabled_feature_flags",dp="$active_feature_flags",ld="$early_access_features",dy="$feature_flag_details",up="$feature_flag_payloads",uy="$feature_flag_request_id",bi="$override_feature_flags",dl="$override_feature_flag_payloads",Gs="$stored_person_properties",qs="$stored_group_properties",hy="$surveys",of="$surveys_loaded_at",py="$surveys_activated",cd="ph_product_tours",xd="$flag_call_reported",fy="$flag_call_reported_session_id",my="$feature_flag_errors",Bd="$feature_flag_evaluated_at",vr="$user_state",gy="$client_session_props",vy="$capture_rate_limit",_y="$initial_campaign_params",yy="$initial_referrer_info",lf="$initial_person_info",cf="$epp",CE="__POSTHOG_TOOLBAR__",Nh="$posthog_cookieless",TE="$sdk_debug_extensions_init_method",EE="$sdk_debug_extensions_init_time_ms",AE="$sdk_debug_recording_script_not_loaded",by="PostHog loadExternalDependency extension not found.",Ks="on_reject",xi="always",el="anonymous",tl="identified",ky="identified_only",df="visibilitychange",uf="beforeunload",ul="$pageview",Sv="$pageleave",Cv="$identify",MP="$groupidentify";function Oh(t,e){ct(t)&&t.forEach(e)}function Mt(t,e){if(!nt(t))if(ct(t))t.forEach(e);else if(tG(t))t.forEach(((a,r)=>e(a,r)));else for(var n in t)H4.call(t,n)&&e(t[n],n)}var Bt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];for(var r of n)for(var s in r)r[s]!==void 0&&(t[s]=r[s]);return t};function hp(t){for(var e=Object.keys(t),n=e.length,a=new Array(n);n--;)a[n]=[e[n],t[e[n]]];return a}var NP=function(t){try{return t()}catch{return}},HG=function(t){return function(){try{for(var e=arguments.length,n=new Array(e),a=0;e>a;a++)n[a]=arguments[a];return t.apply(this,n)}catch(r){ye.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ye.critical(r)}}},Pb=function(t){var e={};return Mt(t,(function(n,a){(Lt(n)&&n.length>0||Bn(n))&&(e[a]=n)})),e},WG=["herokuapp.com","vercel.app","netlify.app"];function GG(t){var e=t?.hostname;if(!Lt(e))return!1;var n=e.split(".").slice(-2).join(".");for(var a of WG)if(n===a)return!1;return!0}function Qt(t,e,n,a){var{capture:r=!1,passive:s=!0}=a??{};t?.addEventListener(e,n,{capture:r,passive:s})}function RE(t){return t.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(t){return 0>t?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return Bn(t)&&isFinite(t)&&Math.floor(t)===t});class hf{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,n,a,r){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(a)||!Number.isInteger(r)||0>e||0>n||0>a||0>r||e>0xffffffffffff||n>4095||a>1073741823||r>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/Math.pow(2,40),s[1]=e/Math.pow(2,32),s[2]=e/Math.pow(2,24),s[3]=e/Math.pow(2,16),s[4]=e/Math.pow(2,8),s[5]=e,s[6]=112|n>>>8,s[7]=n,s[8]=128|a>>>24,s[9]=a>>>16,s[10]=a>>>8,s[11]=a,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new hf(s)}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 hf(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var n=0;16>n;n++){var a=this.bytes[n]-e.bytes[n];if(a!==0)return Math.sign(a)}return 0}}class qG{constructor(){this.S=0,this.C=0,this.I=new KG}generate(){var e=this.generateOrAbort();if(be(e)){this.S=0;var n=this.generateOrAbort();if(be(n))throw new Error("Could not generate UUID after timestamp reset");return n}return e}generateOrAbort(){var e=Date.now();if(e>this.S)this.S=e,this.M();else{if(this.S>=e+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return hf.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var OP,LE=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};J&&!be(J.crypto)&&crypto.getRandomValues&&(LE=t=>crypto.getRandomValues(t));class KG{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(LE(this.R),this.O=0),this.R[this.O++]}}var wi=()=>YG().toString(),YG=()=>(OP||(OP=new qG)).generate(),Hc="",ZG=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Fr={N:()=>!!we,D(t){ye.error("cookieStore error: "+t)},A(t){if(we){try{for(var e=t+"=",n=we.cookie.split(";").filter((s=>s.length)),a=0;n.length>a;a++){for(var r=n[a];r.charAt(0)==" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return decodeURIComponent(r.substring(e.length,r.length))}}catch{}return null}},F(t){var e;try{e=JSON.parse(Fr.A(t))||{}}catch{}return e},q(t,e,n,a,r){if(!we)return!1;try{var s="",l="",c=(function(p,m){if(m){var v=(function(b,x){if(x===void 0&&(x=we),Hc)return Hc;if(!x||["localhost","127.0.0.1"].includes(b))return"";for(var P=b.split("."),T=Math.min(P.length,8),L="dmn_chk_"+wi();!Hc&&T--;){var E=P.slice(T).join("."),A=L+"=1;domain=."+E+";path=/";x.cookie=A+";max-age=3",x.cookie.includes(L)&&(x.cookie=A+";max-age=0",Hc=E)}return Hc})(p);if(!v){var y=(b=>{var x=b.match(ZG);return x?x[0]:""})(p);y!==v&&ye.info("Warning: cookie subdomain discovery mismatch",y,v),v=y}return v?"; domain=."+v:""}return""})(we.location.hostname,a);if(n){var u=new Date;u.setTime(u.getTime()+864e5*n),s="; expires="+u.toUTCString()}r&&(l="; secure");var h=t+"="+encodeURIComponent(JSON.stringify(e))+s+"; SameSite=Lax; path=/"+c+l;return h.length>3686.4&&ye.warn("cookieStore warning: large cookie, len="+h.length),we.cookie=h,!0}catch{return!1}},P(t,e){if(we!=null&&we.cookie)try{Fr.q(t,"",-1,e)}catch{return}}},Tv=null,It={N(){if(!oa(Tv))return Tv;var t=!0;if(be(J))t=!1;else try{var e="__mplssupport__";It.q(e,"xyz"),It.A(e)!=='"xyz"'&&(t=!1),It.P(e)}catch{t=!1}return t||ye.error("localStorage unsupported; falling back to cookie store"),Tv=t,t},D(t){ye.error("localStorage error: "+t)},A(t){try{return J?.localStorage.getItem(t)}catch(e){It.D(e)}return null},F(t){try{return JSON.parse(It.A(t))||{}}catch{}return null},q(t,e){try{return J?.localStorage.setItem(t,JSON.stringify(e)),!0}catch(n){It.D(n)}return!1},P(t){try{J?.localStorage.removeItem(t)}catch(e){It.D(e)}}},JG=[sf,"distinct_id",_l,xb,cf,lf,vr],jh={},XG={N:()=>!0,D(t){ye.error("memoryStorage error: "+t)},A:t=>jh[t]||null,F:t=>jh[t]||null,q:(t,e)=>(jh[t]=e,!0),P(t){delete jh[t]}},Fs=null,Fn={N(){if(!oa(Fs))return Fs;if(Fs=!0,be(J))Fs=!1;else try{var t="__support__";Fn.q(t,"xyz"),Fn.A(t)!=='"xyz"'&&(Fs=!1),Fn.P(t)}catch{Fs=!1}return Fs},D(t){ye.error("sessionStorage error: ",t)},A(t){try{return J?.sessionStorage.getItem(t)}catch(e){Fn.D(e)}return null},F(t){try{return JSON.parse(Fn.A(t))||null}catch{}return null},q(t,e){try{return J?.sessionStorage.setItem(t,JSON.stringify(e)),!0}catch(n){Fn.D(n)}return!1},P(t){try{J?.sessionStorage.removeItem(t)}catch(e){Fn.D(e)}}};class QG{constructor(e){this._instance=e}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}isOptedOut(){return this.Se.cookieless_mode===xi||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Ks}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(e){this.Ct.q(this.It,e?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.P(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:e,opt_out_capturing_cookie_prefix:n,consent_persistence_name:a}=this._instance.config;return a||(n?n+e:"__ph_opt_in_out_"+e)}get St(){var e=this.Ct.A(this.It);return _v(e)?1:Ke(iG,e)?0:-1}get Ct(){var e=this.Se.opt_out_capturing_persistence_type,n=e==="localStorage"?It:Fr;if(!this.Tt||this.Tt!==n){this.Tt=n;var a=e==="localStorage"?Fr:It;a.A(this.It)&&(this.Tt.A(this.It)||this.optInOut(_v(a.A(this.It))),a.P(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[ia?.doNotTrack,ia?.msDoNotTrack,Be.doNotTrack].some((e=>_v(e)))}}function DE(t,e){var n,a=t==null||(n=t.config)==null?void 0:n.get_current_url;if(!yr(a))return e;try{var r=a(e);return Lt(r)&&r?r:e}catch(s){return ye.error("Error in get_current_url, falling back to window.location.href",s),e}}var eq=1,tq=3,nq=11;function jP(t){return t instanceof Element&&(t.id===CE||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function gs(t){return!!t&&t.nodeType===eq}function Aa(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function IE(t){return!!t&&t.nodeType===tq}function ME(t){return!!t&&t.nodeType===nq&&gs(t.host)}function Sb(t){return t?$f(t).split(/\s+/):[]}function zP(t,e){var n=(function(a){var r,s=J==null||(r=J.location)==null?void 0:r.href;return be(s)?void 0:DE(a,s)})(e);return!!(n&&t&&t.some((a=>n.match(a))))}function pf(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 Sb(e)}function NE(t){return nt(t)?null:$f(t).split(/(\s+)/).filter((e=>Pd(e))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function $d(t){var e="";return xy(t)&&!FE(t)&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var a;IE(n)&&n.textContent&&(e+=(a=NE(n.textContent))!==null&&a!==void 0?a:"")})),$f(e)}function Ev(t){return be(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var Cb=["a","button","form","input","select","textarea","label"];function wy(t,e){if(be(e))return!0;var n,a=function(s){if(e.some((l=>(function(c,u){var h=c.matches||c.matchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.webkitMatchesSelector||c.oMatchesSelector;try{return!!h&&h.call(c,u)}catch{return!1}})(s,l))))return{v:!0}};for(var r of t)if(n=a(r))return n.v;return!1}function OE(t){var e=t.parentNode;return!(!e||!gs(e))&&e}var aq=[".ph-no-autocapture","[data-ph-no-autocapture]"],jE=["next","previous","prev",">","<"],rq=[...jE,"+","-","−","–"],FP=(t,e)=>/[a-z0-9]/i.test(e)?t.includes(e):t===e,UP=[".ph-no-rageclick",".ph-no-capture"],iq=["","text","search","email","password","url","tel","number"];function BP(t,e){if(!J||Tb(t))return!1;var n,a,r,s,l;if(Hr(e)?(n=!!e&&UP,a=void 0,r=!1):(n=(s=e?.css_selector_ignorelist)!==null&&s!==void 0?s:UP,a=e?.content_ignorelist,r=(l=e?.ignore_text_selection)!==null&&l!==void 0&&l),n===!1||r&&(function(u){return!(!u||!gs(u))&&(!!Aa(u,"textarea")||(Aa(u,"input")?Ke(iq,(u.getAttribute("type")||"").toLowerCase()):(function(h){if(h.isContentEditable)return!0;var p=h.getAttribute==null?void 0:h.getAttribute("contenteditable");return p==="true"||p===""})(u)))})(t))return!1;var{targetElementList:c}=zE(t,!1);return!(function(u,h){if(u===!1||be(u))return!1;var p;if(u===!0)p=jE;else{if(!ct(u))return!1;if(u.length>10)return ye.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;p=u.map((m=>m.toLowerCase()))}return h.some((m=>{var{safeText:v,ariaLabel:y}=m;return p.some((b=>FP(v,b)||FP(y,b)))}))})(a,c.map((u=>{var h;return{safeText:$d(u).toLowerCase(),ariaLabel:((h=u.getAttribute("aria-label"))==null?void 0:h.toLowerCase().trim())||""}})))&&!wy(c,n)}var Tb=t=>!t||Aa(t,"html")||!gs(t),zE=(t,e)=>{if(!J||Tb(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,a=[t],r=t;r.parentNode&&!Aa(r,"body");)if(ME(r.parentNode))a.push(r.parentNode.host),r=r.parentNode.host;else{var s=OE(r);if(!s)break;if(e||Cb.indexOf(s.tagName.toLowerCase())>-1)n=!0;else try{var l=J.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}a.push(s),r=s}return{parentIsUsefulElement:n,targetElementList:a}};function xy(t){for(var e=t;e.parentNode&&!Aa(e,"body");e=e.parentNode){var n=pf(e);if(Ke(n,"ph-sensitive")||Ke(n,"ph-no-capture"))return!1}if(Ke(pf(t),"ph-include"))return!0;var a=t.type||"";if(Lt(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var r=t.name||t.id||"";return!Lt(r)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(r.replace(/[^a-zA-Z0-9]/g,""))}function FE(t){return!!(Aa(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||Aa(t,"select")||Aa(t,"textarea")||t.getAttribute("contenteditable")==="true")}var UE="(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})",sq=new RegExp("^(?:"+UE+")$"),oq=new RegExp(UE),BE="\\d{3}-?\\d{2}-?\\d{4}",lq=new RegExp("^("+BE+")$"),cq=new RegExp("("+BE+")");function Pd(t,e){return e===void 0&&(e=!0),!(nt(t)||Lt(t)&&(t=$f(t),(e?sq:oq).test((t||"").replace(/[- ]/g,""))||(e?lq:cq).test(t)))}function $P(t){var e=$d(t);return Pd(e=(e+" "+$E(t)).trim())?e:""}function $E(t){var e="";return t&&t.childNodes&&t.childNodes.length&&Mt(t.childNodes,(function(n){var a;if(n&&((a=n.tagName)==null?void 0:a.toLowerCase())==="span")try{var r=$d(n);e=(e+" "+r).trim(),n.childNodes&&n.childNodes.length&&(e=(e+" "+$E(n)).trim())}catch(s){ye.error("[AutoCapture]",s)}})),e}function VP(t){return t.replace(/"|\\"/g,'\\"')}function dq(t){var e=t.attr__class;return e?ct(e)?e:Sb(e):void 0}var zh=tn("[Dead Clicks]"),uq=()=>!0,hq=t=>{var e,n=!((e=t.instance.persistence)==null||!e.get_property(kb)),a=t.instance.config.capture_dead_clicks;return Hr(a)?a:!!qt(a)||n};class HP{get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(e,n,a){this.instance=e,this.isEnabled=n,this.onCapture=a,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[kb]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt((()=>{this.Pt()})):this.stop()}Mt(e){var n,a;(n=Be.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?e():(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"dead-clicks-autocapture",(r=>{r?zh.error("failed to load script",r):e()}))}Pt(){var e;if(we){if(!this.Et&&(e=Be.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var n=qt(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.Et=Be.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Et.start(we),zh.info("starting...")}}else zh.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,zh.info("stopping..."))}}var Av=tn("[SegmentIntegration]"),VE="posthog-js";function HE(t,e){var{organization:n,projectId:a,prefix:r,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=e===void 0?{}:e;return c=>{var u,h,p,m,v;if(s!=="*"&&!s.includes(c.level)||!t.__loaded)return c;c.tags||(c.tags={});var y=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());c.tags["PostHog Person URL"]=y,t.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var b,x=((u=c.exception)==null?void 0:u.values)||[],P=x.map((L=>fe({},L,{stacktrace:L.stacktrace?fe({},L.stacktrace,{type:"raw",frames:(L.stacktrace.frames||[]).map((E=>fe({},E,{platform:"web:javascript"})))}):void 0}))),T={$exception_message:((h=x[0])==null?void 0:h.value)||c.message,$exception_type:(p=x[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:P,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((m=x[0])==null?void 0:m.value)||c.message,$sentry_exception_type:(v=x[0])==null?void 0:v.type,$sentry_tags:c.tags};return n&&a&&(T.$sentry_url=(r||"https://sentry.io/organizations/")+n+"/issues/?project="+a+"&query="+c.event_id),l&&((b=t.exceptions)==null||b.sendExceptionEvent(T)),c}}class pq{constructor(e,n,a,r,s,l){this.name=VE,this.setupOnce=function(c){c(HE(e,{organization:n,projectId:a,prefix:r,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class WP{constructor(e){this.Rt=(n,a,r)=>{r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength||r.crossTabAdoption)&&(ye.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:r}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.Lt()}Lt(){var e;this.Ft=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.Rt)}destroy(){var e;(e=this.Ft)==null||e.call(this),this.Ft=void 0}doPageView(e,n){var a,r=this.At(e,n);return this.Ot={pathname:(a=J?.location.pathname)!==null&&a!==void 0?a:"",pageViewId:n,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var n;return this.At(e,(n=this.Ot)==null?void 0:n.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.Ot)==null?void 0:e.pageViewId}}At(e,n){var a=this.Ot;if(!a)return{$pageview_id:n};var r={$pageview_id:n,$prev_pageview_id:a.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:u,maxContentHeight:h,lastContentY:p,maxContentY:m}=s;if(!(be(l)||be(c)||be(u)||be(h)||be(p)||be(m))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),h=Math.ceil(h),p=Math.ceil(p),m=Math.ceil(m);var v=l>1?Br(c/l,0,1,ye):1,y=l>1?Br(u/l,0,1,ye):1,b=h>1?Br(p/h,0,1,ye):1,x=h>1?Br(m/h,0,1,ye):1;r=Bt(r,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:v,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:y,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:m,$prev_pageview_max_content_percentage:x})}}return a.pathname&&(r.$prev_pageview_pathname=a.pathname),a.timestamp&&(r.$prev_pageview_duration=(e.getTime()-a.timestamp.getTime())/1e3),r}}var Fh=["flags","surveys"],fq={[bE]:{exposure:"hidden"},[sd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[od]:{exposure:"hidden"},[ay]:{exposure:"event"},[ry]:{exposure:"hidden"},[iy]:{exposure:"event"},[sy]:{exposure:"hidden"},[oy]:{exposure:"event"},[ly]:{exposure:"event"},[kb]:{exposure:"event"},[wb]:{exposure:"hidden"},[cy]:{exposure:"event"},[ao]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[_l]:{exposure:"hidden"},[xb]:{exposure:"event"},[kE]:{exposure:"event",shouldSkipFromEventProperties:t=>oa(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"},[Ys]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(t,e)=>e(),transformToEventProperties(t){if(!qt(t))return{};for(var e={},n=Object.keys(t),a=0;n.length>a;a++)e["$feature/"+n[a]]=t[n[a]];return e}},[dp]:{exposure:"event",storageGroup:"flags"},[ld]:{exposure:"hidden"},[dy]:{exposure:"hidden",storageGroup:"flags"},[up]:{exposure:"event",storageGroup:"flags"},[uy]:{exposure:"event",storageGroup:"flags",volatile:!0},[bi]:{exposure:"event"},[dl]:{exposure:"hidden"},[Gs]:{exposure:"hidden"},[qs]:{exposure:"hidden"},[hy]:{exposure:"hidden",storageGroup:"surveys"},[of]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[py]:{exposure:"event"},[cd]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[xd]:{exposure:"hidden"},[fy]:{exposure:"hidden"},[my]:{exposure:"hidden"},[Bd]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[vr]:{exposure:"hidden"},[gy]:{exposure:"hidden"},[vy]:{exposure:"hidden"},[_y]:{exposure:"hidden"},[yy]:{exposure:"hidden"},[lf]:{exposure:"hidden"},[cf]:{exposure:"hidden"},[wE]:{exposure:"event"},[xE]:{exposure:"event"},[PE]:{exposure:"event"},[SE]:{exposure:"event"},[TE]:{exposure:"event"},[EE]:{exposure:"event"},[AE]:{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_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"}},mq=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Us=t=>{var e=fq[t];if(e)return e;for(var[n,a]of mq)if(t.indexOf(n)===0)return a},Vd=t=>{var e=we?.createElement("a");return be(e)?null:(e.href=t,e)},jl=function(t,e){for(var n,a=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),r=0;a.length>r;r++){var s=a[r].split("=");if(s[0]===e){n=s;break}}if(!ct(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{ye.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Hd=function(t,e,n){if(!t||!e||!e.length)return t;for(var a=t.split("#"),r=a[1],s=(a[0]||"").split("?"),l=s[1],c=s[0],u=(l||"").split("&"),h=[],p=0;u.length>p;p++){var m=u[p].split("=");ct(m)&&(e.includes(m[0])?h.push(m[0]+"="+n):h.push(u[p]))}var v=c;return l!=null&&(v+="?"+h.join("&")),r!=null&&(v+="#"+r),v},ff=function(t,e){var n=t.match(new RegExp(e+"=([^&]*)"));return n?n[1]:null},WE=(t,e)=>t>=e&&U4(),GE=(t,e,n,a)=>{if(t===0){if(U4()){var r=e+1;return r===n&&a(),r}return e}return 0},Uh="https?://(.*)",zl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],gq=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...zl],Wd="<masked>",vq=["li_fat_id"];function qE(t,e,n){if(!we)return{};var a,r=e?[...zl,...n||[]]:[],s=KE(Hd(we.URL,r,Wd),t),l=(a={},Mt(vq,(function(c){var u=Fr.A(c);a[c]=u||null})),a);return Bt(l,s)}function KE(t,e){var n=gq.concat(e||[]),a={};return Mt(n,(function(r){var s=jl(t,r);a[r]=s||null})),a}function YE(t){var e=(function(s){return s?s.search(Uh+"google.([^/?]*)")===0?"google":s.search(Uh+"bing.com")===0?"bing":s.search(Uh+"yahoo.com")===0?"yahoo":s.search(Uh+"duckduckgo.com")===0?"duckduckgo":null:null})(t),n=e!="yahoo"?"q":"p",a={};if(!oa(e)){a.$search_engine=e;var r=we?jl(we.referrer,n):"";r.length&&(a.ph_keyword=r)}return a}function GP(){return navigator.language||navigator.userLanguage}var mf="$direct";function ZE(){return we?.referrer||mf}function JE(t,e,n){n===void 0&&(n=!1);var a=t?[...zl,...e||[]]:[],r=n?ms(pn?.href):pn?.href,s=r?.substring(0,1e3);return{r:ZE().substring(0,1e3),u:s?Hd(s,a,Wd):void 0}}function XE(t,e){var n;e===void 0&&(e=!1);var{r:a,u:r}=t,s=e?ms(r):r,l={$referrer:a,$referring_domain:a==null?void 0:a==mf?mf:(n=Vd(a))==null?void 0:n.host};if(s){l.$current_url=s;var c=Vd(s);l.$host=c?.host,l.$pathname=c?.pathname;var u=KE(s);Bt(l,u)}if(a){var h=YE(a);Bt(l,h)}return l}function QE(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function _q(){try{return new Date().getTimezoneOffset()}catch{return}}var yq={flags:Bd,surveys:of},bq=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],nl="main";class Rv{constructor(e,n,a){if(a===void 0&&(a=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=e,this.qt=a,this.props={},this.Bt=!1,this.jt=(s=>{var l="";return s.token&&(l=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+l+"_posthog"})(e),this.Ct=this.Ht(e),this.Nt=this.Ut(e),this.load(),e.debug&&ye.info("Persistence loaded",e.persistence,fe({},this.props)),this.update_config(e,e,n),this.save(),J){var r=()=>this.flush();Qt(J,"beforeunload",r,{capture:!1}),Qt(J,"pagehide",r,{capture:!1})}}zt(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return Bn(n)&&n>0?n:0}isDisabled(){return!!this.Vt}Ht(e){bq.indexOf(e.persistence.toLowerCase())===-1&&(ye.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var n,a=(function(l,c){l===void 0&&(l=[]),c===void 0&&(c=!1);var u=[...JG,...l];return fe({},It,{F(h){try{var p={};try{p=Fr.F(h)||{}}catch{}var m,v=JSON.parse(It.A(h)||"{}");if(c){var y={};for(var b in p){var x=p[b];oa(x)||x===""||(y[b]=x)}m=Bt(v,y)}else m=Bt(p,v);return It.q(h,m),m}catch{}return null},q(h,p,m,v,y,b){var x=It.q(h,p,void 0,void 0,b);try{var P={};u.forEach((T=>{p[T]&&(P[T]=p[T])})),Object.keys(P).length&&Fr.q(h,P,m,v,y,b)}catch(T){It.D(T)}return x},P(h,p){try{J?.localStorage.removeItem(h),Fr.P(h,p)}catch(m){It.D(m)}}})})(e.cookie_persisted_properties||[],e.__preview_cookie_wins_on_conflict||!1),r=!1,s=e.persistence.toLowerCase();return s==="localstorage"&&It.N()?(n=It,r=!0):s==="localstorage+cookie"&&a.N()?(n=a,r=!0):s==="sessionstorage"&&Fn.N()?n=Fn:s==="memory"?n=XG:s==="cookie"?n=Fr:a.N()?(n=a,r=!0):n=Fr,this.Dt=r,n}Wt(e){return this.jt+"__"+e}Ut(e){return this.Dt&&!!e.split_storage}Gt(e){var n=e??this.Se.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var a=this.props[Bd];return!a||typeof a!="number"||Date.now()-a>n}properties(){var e={};return Mt(this.props,((n,a)=>{var r=Us(a);if(r?.exposure==="derived"){if(r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,a===Ys?()=>this.Gt():()=>!1))return;r.transformToEventProperties&&Bt(e,r.transformToEventProperties(n))}else if(!r||r.exposure==="event"){if(r!=null&&r.shouldSkipFromEventProperties!=null&&r.shouldSkipFromEventProperties(n,(()=>!1)))return;e[a]=n}})),e}load(){if(!this.Vt){var e=this.Ct.F(this.jt);e&&(this.props=Bt({},e)),this.Nt&&this.Zt()}}Zt(){for(var e of Fh){var n=It.F(this.Wt(e));if(n&&!cs(n)){var a=this.Qt(e);a.persisted=!0,this.Jt(e)||(a.fingerprint=this.Yt(n,e)),this.Kt(e,n)||Bt(this.props,n)}}}Jt(e){return Object.keys(this.props).some((n=>{var a;return((a=Us(n))==null?void 0:a.storageGroup)===e}))}Kt(e,n){var a=yq[e];if(!a)return!1;var r=n[a],s=this.props[a];return Bn(r)&&Bn(s)&&s>r}refreshKey(e){var n;if(!this.Vt){var a=this.Nt?(n=Us(e))==null?void 0:n.storageGroup:void 0,r=a?It.F(this.Wt(a)):this.Ct.F(this.jt);if(r&&e in r)this.Xt(e,r[e]);else{if(a){var s=this.Ct.F(this.jt);if(s&&e in s)return void this.Xt(e,s[e])}this.er(e)}}}save(){if(!this.Vt){var e=this.zt();e>0?be(this.tr)&&(this.tr=setTimeout((()=>{this.tr=void 0,this.rr()}),e)):this.rr()}}flush(){be(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.jt,this.props,nl))}ir(){var{main:e,groups:n}=this.sr();for(var a of(this.nr(this.Ct,this.jt,e,nl),Fh)){var r,s=n[a];(!cs(s)||(r=this.$t[a])!=null&&r.persisted)&&this.nr(It,this.Wt(a),s,a)}}sr(){var e={},n={};for(var a of Fh)n[a]={};return Mt(this.props,((r,s)=>{var l,c=(l=Us(s))==null?void 0:l.storageGroup;c?n[c][s]=r:e[s]=r})),{main:e,groups:n}}Yt(e,n){if(n===nl)return JSON.stringify(e)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var a={};return Mt(e,((r,s)=>{var l;a[s]=(l=Us(s))!=null&&l.volatile?"__volatile__":r})),JSON.stringify(a)}nr(e,n,a,r){var s=this.Qt(r);if(r===nl||s.dirty||be(s.fingerprint)){var l;try{if((l=this.Yt(a,r))===s.fingerprint)return void(s.dirty=!1)}catch{l=void 0}e.q(n,a,this.ar,this.lr,this.ur,this.Se.debug)?(s.dirty=!1,r!==nl&&(s.persisted=!0),be(l)||(s.fingerprint=l)):this.Se.debug&&ye.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(e){var{keepGroupEntries:n=!1}=e===void 0?{}:e;if(be(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.P(this.jt,!1),this.Ct.P(this.jt,!0),!n&&this.qt)for(var a of Fh)It.P(this.Wt(a));n?delete this.$t[nl]:this.$t={}}clear(){this.remove(),this.props={}}register_once(e,n,a){if(qt(e)){be(n)&&(n="None"),this.ar=be(a)?this.hr:a;var r=!1;if(Mt(e,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Xt(l,s),r=!0)})),r)return this.save(),!0}return!1}register(e,n){if(qt(e)){this.ar=be(n)?this.hr:n;var a=!1;if(Mt(e,((r,s)=>{e.hasOwnProperty(s)&&this.props[s]!==r&&(this.Xt(s,r),a=!0)})),a)return this.save(),!0}return!1}unregister(e){e in this.props&&(this.er(e),this.save())}update_campaign_params(){if(!this.Bt){var e=qE(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);cs(Pb(e))||this.register(e),this.Bt=!0}}update_search_keyword(){var e;this.register((e=we?.referrer)?YE(e):{})}update_referrer_info(){var e;this.register_once({$referrer:ZE(),$referring_domain:we!=null&&we.referrer&&((e=Vd(we.referrer))==null?void 0:e.host)||mf},void 0)}set_initial_person_info(){this.props[_y]||this.props[yy]||this.register_once({[lf]:JE(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes)},void 0)}get_initial_props(){var e={};Mt([yy,_y],(r=>{var s=this.props[r];s&&Mt(s,(function(l,c){e["$initial_"+Z_(c)]=l}))}));var n=this.props[lf];if(n){var a=(function(r,s){s===void 0&&(s=!1);var l=XE(r,s),c={};return Mt(l,(function(u,h){c["$initial_"+Z_(h)]=u})),c})(n,this.Se.disable_capture_url_hashes);Bt(e,a)}return e}safe_merge(e){return Mt(this.props,(function(n,a){a in e||(e[a]=n)})),e}update_config(e,n,a){this.hr=this.ar=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!a),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie);var r=e.persistence!==n.persistence||!((u,h)=>{if(u.length!==h.length)return!1;var p=[...u].sort(),m=[...h].sort();return p.every(((v,y)=>v===m[y]))})(e.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=r?this.Ht(e):this.Ct,l=this.Ut(e);if(r||l!==this.Nt){var c=this.props;this.clear(),this.Ct=s,this.Nt=l,this.props=c,this.save()}}set_disabled(e){this.Vt=e,this.Vt?this.remove():this.save()}set_cross_subdomain(e){e!==this.lr&&(this.lr=e,this.remove({keepGroupEntries:!0}),this.save())}set_secure(e){e!==this.ur&&(this.ur=e,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(e,n){var a=this.props[od]||{};a[e]=n,this.Xt(od,a),this.save()}remove_event_timer(e){var n=this.props[od]||{},a=n[e];return be(a)||(delete n[e],this.Xt(od,n),this.save()),a}get_property(e){return this.props[e]}set_property(e,n){this.Xt(e,n),this.save()}Xt(e,n){var a;this.props[e]=n,(a=Us(e))!=null&&a.volatile||this.dr(e)}er(e){delete this.props[e],this.dr(e)}dr(e){var n,a=(n=Us(e))==null?void 0:n.storageGroup;a&&(this.Qt(a).dirty=!0)}Qt(e){return this.$t[e]||(this.$t[e]={})}}var Wc={Activation:"events",Cancellation:"cancelEvents"},Lv={Popover:"popover",API:"api",Widget:"widget"},kq={Always:"always"},Pi={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},Dv={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Py={Popover:"popover",Inline:"inline"},wq={SHOWN:"product tour shown"},qP={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},KP=tn("[RateLimiter]");class xq{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var a=n.text;if(a&&a.length)try{(JSON.parse(a).quota_limited||[]).forEach((r=>{KP.info((r||"events")+" is quota limited."),this.serverLimits[r]=new Date().getTime()+6e4}))}catch(r){return void KP.warn('could not rate limit - continuing. Error: "'+r?.message+'"',{text:a})}},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,a,r;e===void 0&&(e=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),u=(n=(a=this.instance.persistence)==null?void 0:a.get_property(vy))!==null&&n!==void 0?n:{tokens:s,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>s&&(u.tokens=s);var h=1>u.tokens;return h||e||(u.tokens=Math.max(0,u.tokens-1)),!h||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=h,(r=this.instance.persistence)==null||r.set_property(vy,u),{isRateLimited:h,remainingTokens:u.tokens}}isServerRateLimited(e){var n=this.serverLimits[e||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Gc=tn("[RemoteConfig]");class e6{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=Be._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}cr(e){var n,a;(n=Be.__PosthogExtensions__)!=null&&n.loadExternalDependency?(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,"remote-config",(()=>e(this.remoteConfig))):e()}vr(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){e(n.json)}})}load(){try{if(this.remoteConfig)return Gc.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void Gc.warn("Remote config is disabled. Falling back to local config.");this.cr((e=>{if(!e)return Gc.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr((n=>{this.pr(n),this.gr()}));this.pr(e),this.gr()}))}catch(e){Gc.error("Error loading remote config",e)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}refresh(){!this._instance.mr()&&we&&we.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}gr(){var e;if(!this.yr){var n=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;n!==0&&(this.yr=setInterval((()=>{this.refresh()}),n))}}pr(e){var n;e||Gc.error("Failed to fetch remote config from PostHog."),this._instance.pr(e??{}),e?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Ha={GZipJS:"gzip-js",Base64:"base64"},Xa=Uint8Array,va=Uint16Array,Fl=Uint32Array,Eb=new Xa([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]),Ab=new Xa([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]),YP=new Xa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t6=function(t,e){for(var n=new va(31),a=0;31>a;++a)n[a]=e+=1<<t[a-1];var r=new Fl(n[30]);for(a=1;30>a;++a)for(var s=n[a];n[a+1]>s;++s)r[s]=s-n[a]<<5|a;return[n,r]},n6=t6(Eb,2),Sy=n6[1];n6[0][28]=258,Sy[258]=28;for(var ZP=t6(Ab,0)[1],a6=new va(32768),Yt=0;32768>Yt;++Yt){var al=(43690&Yt)>>>1|(21845&Yt)<<1;a6[Yt]=((65280&(al=(61680&(al=(52428&al)>>>2|(13107&al)<<2))>>>4|(3855&al)<<4))>>>8|(255&al)<<8)>>>1}var Sd=function(t,e,n){for(var a=t.length,r=0,s=new va(e);a>r;++r)++s[t[r]-1];var l,c=new va(e);for(r=0;e>r;++r)c[r]=c[r-1]+s[r-1]<<1;for(l=new va(a),r=0;a>r;++r)l[r]=a6[c[t[r]-1]++]>>>15-t[r];return l},go=new Xa(288);for(Yt=0;144>Yt;++Yt)go[Yt]=8;for(Yt=144;256>Yt;++Yt)go[Yt]=9;for(Yt=256;280>Yt;++Yt)go[Yt]=7;for(Yt=280;288>Yt;++Yt)go[Yt]=8;var gf=new Xa(32);for(Yt=0;32>Yt;++Yt)gf[Yt]=5;var Pq=Sd(go,9),Sq=Sd(gf,5),r6=function(t){return(t/8>>0)+(7&t&&1)},i6=function(t,e,n){(n==null||n>t.length)&&(n=t.length);var a=new(t instanceof va?va:t instanceof Fl?Fl:Xa)(n-e);return a.set(t.subarray(e,n)),a},fi=function(t,e,n){var a=e/8>>0;t[a]|=n<<=7&e,t[a+1]|=n>>>8},qc=function(t,e,n){var a=e/8>>0;t[a]|=n<<=7&e,t[a+1]|=n>>>8,t[a+2]|=n>>>16},Iv=function(t,e){for(var n=[],a=0;t.length>a;++a)t[a]&&n.push({s:a,f:t[a]});var r=n.length,s=n.slice();if(!r)return[new Xa(0),0];if(r==1){var l=new Xa(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(I,B){return I.f-B.f})),n.push({s:-1,f:25001});var c=n[0],u=n[1],h=0,p=1,m=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};p!=r-1;)c=n[n[m].f>n[h].f?h++:m++],u=n[h!=p&&n[m].f>n[h].f?h++:m++],n[p++]={s:-1,f:c.f+u.f,l:c,r:u};var v=s[0].s;for(a=1;r>a;++a)s[a].s>v&&(v=s[a].s);var y=new va(v+1),b=Cy(n[p-1],y,0);if(b>e){a=0;var x=0,P=b-e,T=1<<P;for(s.sort((function(I,B){return y[B.s]-y[I.s]||I.f-B.f}));r>a;++a){var L=s[a].s;if(e>=y[L])break;x+=T-(1<<b-y[L]),y[L]=e}for(x>>>=P;x>0;){var E=s[a].s;e>y[E]?x-=1<<e-y[E]++-1:++a}for(;a>=0&&x;--a){var A=s[a].s;y[A]==e&&(--y[A],++x)}b=e}return[new Xa(y),b]},Cy=function(t,e,n){return t.s==-1?Math.max(Cy(t.l,e,n+1),Cy(t.r,e,n+1)):e[t.s]=n},JP=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new va(++e),a=0,r=t[0],s=1,l=function(u){n[a++]=u},c=1;e>=c;++c)if(t[c]==r&&c!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(r),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(r);s=1,r=t[c]}return[n.subarray(0,a),e]},Kc=function(t,e){for(var n=0,a=0;e.length>a;++a)n+=t[a]*e[a];return n},Ty=function(t,e,n){var a=n.length,r=r6(e+2);t[r]=255&a,t[r+1]=a>>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var s=0;a>s;++s)t[r+s+4]=n[s];return 8*(r+4+a)},XP=function(t,e,n,a,r,s,l,c,u,h,p){fi(e,p++,n),++r[256];for(var m=Iv(r,15),v=m[0],y=m[1],b=Iv(s,15),x=b[0],P=b[1],T=JP(v),L=T[0],E=T[1],A=JP(x),I=A[0],B=A[1],D=new va(19),S=0;L.length>S;++S)D[31&L[S]]++;for(S=0;I.length>S;++S)D[31&I[S]]++;for(var j=Iv(D,7),F=j[0],Z=j[1],ee=19;ee>4&&!F[YP[ee-1]];--ee);var de,ae,re,te,le=h+5<<3,H=Kc(r,go)+Kc(s,gf)+l,Q=Kc(r,v)+Kc(s,x)+l+14+3*ee+Kc(D,F)+(2*D[16]+3*D[17]+7*D[18]);if(H>=le&&Q>=le)return Ty(e,p,t.subarray(u,u+h));if(fi(e,p,1+(H>Q)),p+=2,H>Q){de=Sd(v,y),ae=v,re=Sd(x,P),te=x;var W=Sd(F,Z);for(fi(e,p,E-257),fi(e,p+5,B-1),fi(e,p+10,ee-4),p+=14,S=0;ee>S;++S)fi(e,p+3*S,F[YP[S]]);p+=3*ee;for(var N=[L,I],Y=0;2>Y;++Y){var ue=N[Y];for(S=0;ue.length>S;++S)fi(e,p,W[ke=31&ue[S]]),p+=F[ke],ke>15&&(fi(e,p,ue[S]>>>5&127),p+=ue[S]>>>12)}}else de=Pq,ae=go,re=Sq,te=gf;for(S=0;c>S;++S)if(a[S]>255){var ke;qc(e,p,de[257+(ke=a[S]>>>18&31)]),p+=ae[ke+257],ke>7&&(fi(e,p,a[S]>>>23&31),p+=Eb[ke]);var me=31&a[S];qc(e,p,re[me]),p+=te[me],me>3&&(qc(e,p,a[S]>>>5&8191),p+=Ab[me])}else qc(e,p,de[a[S]]),p+=ae[a[S]];return qc(e,p,de[256]),p+ae[256]},Cq=new Fl([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Tq=(function(){for(var t=new Fl(256),e=0;256>e;++e){for(var n=e,a=9;--a;)n=(1&n&&3988292384)^n>>>1;t[e]=n}return t})(),Mv=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8};function Eq(t,e){e===void 0&&(e={});var n=(function(){var m=4294967295;return{p(v){for(var y=m,b=0;v.length>b;++b)y=Tq[255&y^v[b]]^y>>>8;m=y},d(){return 4294967295^m}}})(),a=t.length;n.p(t);var r,s,l,c,u,h=(c=10+((r=e).filename&&r.filename.length+1||0),u=8,(function(m,v,y,b,x,P){var T=m.length,L=new Xa(b+T+5*(1+Math.floor(T/7e3))+x),E=L.subarray(b,L.length-x),A=0;if(!v||8>T)for(var I=0;T>=I;I+=65535){var B=I+65535;T>B?A=Ty(E,A,m.subarray(I,B)):(E[I]=!0,A=Ty(E,A,m.subarray(I,T)))}else{for(var D=Cq[v-1],S=D>>>13,j=8191&D,F=(1<<y)-1,Z=new va(32768),ee=new va(F+1),de=Math.ceil(y/3),ae=2*de,re=function(xr){return(m[xr]^m[xr+1]<<de^m[xr+2]<<ae)&F},te=new Fl(25e3),le=new va(288),H=new va(32),Q=0,W=0,N=(I=0,0),Y=0,ue=0;T>I;++I){var ke=re(I),me=32767&I,_e=ee[ke];if(Z[me]=_e,ee[ke]=me,I>=Y){var Me=T-I;if((Q>7e3||N>24576)&&Me>423){A=XP(m,E,0,te,le,H,W,N,ue,I-ue,A),N=Q=W=0,ue=I;for(var Oe=0;286>Oe;++Oe)le[Oe]=0;for(Oe=0;30>Oe;++Oe)H[Oe]=0}var Le=2,St=0,dn=j,jt=me-_e&32767;if(Me>2&&ke==re(I-jt))for(var _t=Math.min(S,Me)-1,Zt=Math.min(32767,I),nr=Math.min(258,Me);Zt>=jt&&--dn&&me!=_e;){if(m[I+Le]==m[I+Le-jt]){for(var Mn=0;nr>Mn&&m[I+Mn]==m[I+Mn-jt];++Mn);if(Mn>Le){if(Le=Mn,St=jt,Mn>_t)break;var Vt=Math.min(jt,Mn-2),Qe=0;for(Oe=0;Vt>Oe;++Oe){var st=I-jt+Oe+32768&32767,Dt=st-Z[st]+32768&32767;Dt>Qe&&(Qe=Dt,_e=st)}}}jt+=(me=_e)-(_e=Z[me])+32768&32767}if(St){te[N++]=268435456|Sy[Le]<<18|ZP[St];var Et=31&Sy[Le],Nn=31&ZP[St];W+=Eb[Et]+Ab[Nn],++le[257+Et],++H[Nn],Y=I+Le,++Q}else te[N++]=m[I],++le[m[I]]}}A=XP(m,E,!0,te,le,H,W,N,ue,I-ue,A)}return i6(L,0,b+r6(A)+x)})(s=t,(l=e).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,u)),p=h.length;return(function(m,v){var y=v.filename;if(m[0]=31,m[1]=139,m[2]=8,m[8]=2>v.level?4:v.level==9?2:0,m[9]=3,v.mtime!=0&&Mv(m,4,Math.floor(new Date(v.mtime||Date.now())/1e3)),y){m[3]=8;for(var b=0;y.length>=b;++b)m[b+10]=y.charCodeAt(b)}})(h,e),Mv(h,p-8,n.d()),Mv(h,p-4,a),h}var Aq=!!q_||!!G_,s6="text/plain",pp=!1,Ey=(t,e)=>{var[n,a]=t.split("#"),[r,s]=n.split("?");if(!s)return t;var l=s.split("&").filter((c=>c.split("=")[0]!==e)).join("&");return r+(l?"?"+l:"")+(a?"#"+a:"")},o6=function(t,e,n){var a;n===void 0&&(n=!0);var[r,s]=t.split("?"),l=fe({},e),c=(a=s?.split("&").map((h=>{var p,[m,v]=h.split("="),y=n&&(p=l[m])!==null&&p!==void 0?p:v;return delete l[m],m+"="+y})))!==null&&a!==void 0?a:[],u=(function(h,p){var m,v;p===void 0&&(p="&");var y=[];return Mt(h,(function(b,x){be(b)||be(x)||x==="undefined"||(m=encodeURIComponent((P=>P instanceof File)(b)?b.name:b.toString()),v=encodeURIComponent(x),y[y.length]=v+"="+m)})),y.join(p)})(l);return u&&c.push(u),r+"?"+c.join("&")},yl=(t,e)=>JSON.stringify(t,((n,a)=>typeof a=="bigint"?a.toString():a),e),QP=t=>{if(t.xt)return t.xt;var{data:e,compression:n}=t;if(e){if(n===Ha.GZipJS){var a=Eq((function(c,u){var h=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new Xa(c.length+(c.length>>>1)),m=0,v=function(P){p[m++]=P},y=0;h>y;++y){if(m+5>p.length){var b=new Xa(m+8+(h-y<<1));b.set(p),p=b}var x=c.charCodeAt(y);128>x?v(x):2048>x?(v(192|x>>>6),v(128|63&x)):x>55295&&57344>x?(v(240|(x=65536+(1047552&x)|1023&c.charCodeAt(++y))>>>18),v(128|x>>>12&63),v(128|x>>>6&63),v(128|63&x)):(v(224|x>>>12),v(128|x>>>6&63),v(128|63&x))}return i6(p,0,m)})(yl(e)),{mtime:0});return{contentType:s6,body:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),estimatedSize:a.byteLength}}if(n===Ha.Base64){var r=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,h)=>String.fromCharCode(parseInt(h,16)))))})(yl(e)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:yl(c)))(r);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=yl(e);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},l6=t=>{var e,n,a=()=>({url:Ey(t.url,"compression"),encodedBody:QP(fe({},t,{compression:void 0,xt:void 0}))});try{e=QP(t)}catch(r){if(SP(t.compression,jl(t.url,"compression")))return ye.error("Failed to gzip request body, sending uncompressed payload",r),a();throw r}return e&&SP(t.compression,jl(t.url,"compression"))&&!((n=e.body)instanceof ArrayBuffer?K_(new Uint8Array(n)):ArrayBuffer.isView(n)&&K_(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(pp=!0,a()):{url:t.url,encodedBody:e}},eS=t=>{try{return l6(t)}catch(e){return ye.error(e),void(t.callback==null||t.callback({statusCode:0,error:e}))}},Rq=(function(){var t=_n((function*(e){var n=yl(e.data),a=yield(function(s,l,c){return Y_.apply(this,arguments)})(n,on.DEBUG,{rethrow:!0});if(!a)return e;var r=yield a.arrayBuffer();return fe({},e,{xt:{contentType:s6,body:r,estimatedSize:r.byteLength}})}));return function(e){return t.apply(this,arguments)}})(),Lq=["/e/","/s/"],tS=(t,e)=>{var n=(r=>{var s=(l=>{var c=Vd(l),u=c?.pathname||l.split(/[?#]/)[0];return u?u[0]==="/"?u:"/"+u:"/"})(r);return Lq.some((l=>((c,u)=>c.slice(c.length-u.length)===u)(s,l)))})(t),a=n?Ey(t,"ver"):t;return o6(e===Ha.GZipJS?Ey(a,"compression"):a,fe({_:new Date().getTime().toString()},n?{}:{ver:on.JS_SDK_VERSION},e===Ha.GZipJS?{}:{compression:e}))},fp=[];G_&&fp.push({transport:"fetch",method(t){var e,n=eS(t);if(n){var{url:a,encodedBody:r}=n,{contentType:s,body:l,estimatedSize:c}=r??{},u=new Headers;Mt(t.headers,(function(v,y){u.append(y,v)})),s&&u.append("Content-Type",s);var h=null,p=!1;if(_P){var m=new _P;h={signal:m.signal,timeout:setTimeout((()=>{var v,y;p=!0,m.abort((v=t.timeout,(y=new Error("PostHog request timed out"+(v?" after "+v+"ms":""))).name="AbortError",y))}),t.timeout)}}G_(a,fe({method:t?.method||"GET",headers:u,keepalive:t.method==="POST"&&52428.8>(c||0),body:l,signal:(e=h)==null?void 0:e.signal},t.fetchOptions)).then((v=>v.text().then((y=>{var b={statusCode:v.status,text:y};if(v.status===200)try{b.json=JSON.parse(y)}catch(x){ye.error(x)}t.callback==null||t.callback(b)})))).catch((v=>{p&&v?.name==="AbortError"?ye.warn(v):ye.error(v),t.callback==null||t.callback({statusCode:0,error:v})})).finally((()=>h?clearTimeout(h.timeout):null))}}}),q_&&fp.push({transport:"XHR",method(t){var e=eS(t);if(e){var n=new q_,{url:a,encodedBody:r}=e;n.open(t.method||"GET",a,!0);var{contentType:s,body:l}=r??{};Mt(t.headers,(function(c,u){n.setRequestHeader(u,c)})),s&&n.setRequestHeader("Content-Type",s),t.timeout&&(n.timeout=t.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var c={statusCode:n.status,text:n.responseText};if(n.status===200)try{c.json=JSON.parse(n.responseText)}catch{}t.callback==null||t.callback(c)}},n.send(l)}}}),ia!=null&&ia.sendBeacon&&fp.push({transport:"sendBeacon",method(t){try{var{url:e,encodedBody:n}=l6(t),{contentType:a,body:r}=n??{};if(!r)return;var s=r instanceof Blob?r:new Blob([r],{type:a});ia.sendBeacon(e,s)}catch{}}});var Ay=3e3;class Dq{constructor(e,n){this.br=!0,this._r=[],this.wr=Br(n?.flush_interval_ms||Ay,250,5e3,ye.createLogger("flush interval"),Ay),this.kr=e}enqueue(e){this._r.push(e),this.Sr||this.Cr()}unload(){this.Ir();var e=this._r.length>0?this.Tr():{},n=Object.values(e);[...n.filter((a=>a.url.indexOf("/e")===0)),...n.filter((a=>a.url.indexOf("/e")!==0))].map((a=>{this.Er(fe({},a,{transport:"sendBeacon"}))}))}enable(){this.br=!1,this.Cr()}Cr(){var e=this;this.br||(this.Sr=setTimeout((()=>{if(this.Ir(),this._r.length>0){var n=this.Tr(),a=function(){var s=n[r],l=new Date().getTime();s.data&&ct(s.data)&&Mt(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),e.Er(s)};for(var r in n)a()}}),this.wr))}Er(e){try{this.kr(e)}catch(n){ye.error(n)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var e={};return Mt(this._r,(n=>{var a,r=n,s=(r?r.batchKey:null)||r.url;be(e[s])&&(e[s]=fe({},r,{data:[]})),(a=e[s].data)==null||a.push(r.data)})),this._r=[],e}}var Iq=["retriesPerformedSoFar"];class Mq{constructor(e){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=e,this._r=[],this.Rr=!0,!be(J)&&"onLine"in J.navigator&&(this.Rr=J.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},Qt(J,"online",this.Or),Qt(J,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(e){var{retriesPerformedSoFar:n}=e,a=B4(e,Iq);yi(n)&&(a.url=o6(a.url,{retry_count:n})),this._instance._send_request(fe({},a,{callback:r=>{if(r.statusCode!==200&&(400>r.statusCode||r.statusCode>=500)){if((r.statusCode===0?3:10)>(n??0))return void this.st(fe({retriesPerformedSoFar:n},a));r.statusCode===0&&ye.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.")}a.callback==null||a.callback(r)}}))}st(e){var n=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=n+1;var a=(function(l){var c=3e3*Math.pow(2,l),u=c/2,h=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(h+p*(h-u))})(n),r=Date.now()+a;this._r.push({retryAt:r,requestOptions:e});var s="Enqueued failed request for retry in "+a;navigator.onLine||(s+=" (Browser is offline)"),ye.warn(s),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout((()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()}),this.Pr)}Lr(){var e=Date.now(),n=[],a=this._r.filter((s=>e>s.retryAt||(n.push(s),!1)));if(this._r=n,a.length>0)for(var{requestOptions:r}of a)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,be(J)||(this.Or&&(J.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(J.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(fe({},e,{transport:"sendBeacon"}))}catch(n){ye.error(n)}this._r=[]}}class Nq{constructor(e){this.Dr=()=>{var n,a,r,s;this.Nr||(this.Nr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,h=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Nr.lastScrollY=Math.ceil(c),this.Nr.maxScrollY=Math.max(c,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(u,(a=this.Nr.maxScrollHeight)!==null&&a!==void 0?a:0),this.Nr.lastContentY=h,this.Nr.maxContentY=Math.max(h,(r=this.Nr.maxContentY)!==null&&r!==void 0?r:0),this.Nr.maxContentHeight=Math.max(p,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=e}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var e=this.Nr;return setTimeout(this.Dr,0),e}startMeasuringScrollPosition(){Qt(J,"scroll",this.Dr,{capture:!0}),Qt(J,"scrollend",this.Dr,{capture:!0}),Qt(J,"resize",this.Dr)}scrollElement(){if(!this.qr)return J?.document.documentElement;var e=ct(this.qr)?this.qr:[this.qr];for(var n of e){var a=J?.document.querySelector(n);if(a)return a}}Br(e){var n=e==="y"?"scrollTop":"scrollLeft";if(this.qr){var a=this.scrollElement();return a&&a[n]||0}return J?e==="y"?J.scrollY||J.pageYOffset||J.document.documentElement.scrollTop||0:J.scrollX||J.pageXOffset||J.document.documentElement.scrollLeft||0:0}scrollY(){return this.Br("y")}scrollX(){return this.Br("x")}}var Oq=t=>JE(t?.config.mask_personal_data_properties,t?.config.custom_personal_data_properties,t?.config.disable_capture_url_hashes);class nS{constructor(e,n,a,r){this.jr=s=>{var l=this.Hr();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.Ur(this._instance)};this.zr.register({[gy]:c})}},this._instance=e,this.Vr=n,this.zr=a,this.Ur=r||Oq,this.Vr.onSessionId(this.jr)}Hr(){return this.zr.props[gy]}getSetOnceProps(){var e,n=(e=this.Hr())==null?void 0:e.props;return n?"r"in n?XE(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 Mt(Pb(this.getSetOnceProps()),((n,a)=>{a==="$current_url"&&(a="url"),e["$session_entry_"+Z_(a)]=n})),e}}class Rb{constructor(){this.Wr={}}on(e,n){return this.Wr[e]||(this.Wr[e]=[]),this.Wr[e].push(n),()=>{this.Wr[e]=this.Wr[e].filter((a=>a!==n))}}emit(e,n){for(var a of this.Wr[e]||[])a(n);for(var r of this.Wr["*"]||[])r(e,n)}}var Yc=tn("[SessionId]");class aS{on(e,n){return this.Gr.on(e,n)}constructor(e,n,a){var r;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new Rb,this.Kr=(h,p)=>!(!yi(h)||!yi(p))&&Math.abs(h-p)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===xi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=e.config,this.zr=e.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=n||wi,this.ri=a||wi;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Br(this.Se.session_idle_timeout_seconds||1800,60,36e3,Yc.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+s+"_window_id",this.si="ph_"+s+"_primary_window_exists",this.oi()){var l=Fn.F(this.ni),c=Fn.F(this.si);l&&!c?this.Xr=l:Fn.P(this.ni),Fn.q(this.si,!0)}if((r=this.Se.bootstrap)!=null&&r.sessionID)try{var u=(h=>{var p=this.Se.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.ai(this.Se.bootstrap.sessionID,new Date().getTime(),u)}catch(h){Yc.error("Invalid sessionID in bootstrap",h)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return be(this.Qr)&&(this.Qr=[]),this.Qr.push(e),this.ei&&e(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter((n=>n!==e))}}oi(){return this.Se.persistence!=="memory"&&!this.zr.Vt&&Fn.N()}ui(e){e!==this.Xr&&(this.Xr=e,this.oi()&&Fn.q(this.ni,e))}hi(){return this.Xr?this.Xr:this.oi()?Fn.F(this.ni):null}di(e){var n=this.Zr;return!oa(n)&&!oa(e)&&5e3>Math.abs(e-n)}ai(e,n,a){var r=n!==this._sessionActivityTimestamp,s=!(e!==this.ei||a!==this._sessionStartTimestamp);this._sessionStartTimestamp=a,this._sessionActivityTimestamp=n,this.ei=e,s&&!r||s&&this.di(n)||(this.Zr=n,this.zr.register({[_l]:[n,e,a]}))}ci(){var e,n=(e=this.Se)==null?void 0:e.persistence_save_debounce_ms;return yi(n)&&n>0}vi(){this.ci()?this.zr.refreshKey(_l):(this.zr.flush(),this.zr.load())}fi(){var e;if(!oa(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,n,a]=this.pi();n===this.ei&&a===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[_l]:[this._sessionActivityTimestamp,(e=this.ei)!==null&&e!==void 0?e:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[e]=this.pi(),n=yi(e)?e:0,a=yi(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,a)}mi(e){return this.vi(),this.Kr(e,this.gi())}pi(){var e=this.zr.props[_l];return ct(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&J&&(J.removeEventListener(uf,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&Fn.P(this.si)},Qt(J,uf,this.Jr,{capture:!1})}checkAndGetSessionAndWindowId(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=null),this.Se.cookieless_mode===xi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var a=n||new Date().getTime(),[,r,s]=this.pi(),l=this.gi(),c=this.hi(),u=yi(s)&&Math.abs(a-s)>864e5,h=!1,p=!1,m=!r,v=r,y=!m&&!e&&this.Kr(a,l);y&&((y=this.mi(a))||Yc.info("cross-tab refresh kept the session alive",{sessionId:r}),[,r,s]=this.pi()),m||y||u?(r=this.ti(),c=this.ri(),Yc.info("new session ID generated",{sessionId:r,windowId:c,changeReason:{noSessionId:m,activityTimeout:y,sessionPastMaximumLength:u}}),s=a,h=!0):(c||(c=this.ri(),h=!0),(p=r!==v)&&(Yc.info("adopted cross-tab session id",{sessionId:r,windowId:c}),h=!0));var b=yi(l)&&e&&!u?l:a,x=yi(s)?s:new Date().getTime();this.ui(c),this.ai(r,b,x),e||this.ii();var P={noSessionId:m,activityTimeout:y,sessionPastMaximumLength:u,crossTabAdoption:p};return h&&this.Qr.forEach((T=>T(r,c,P))),{sessionId:r,windowId:c,sessionStartTimestamp:x,changeReason:h?P:void 0,lastActivityTimestamp:l}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout((()=>{if(!this.Yr)if(this.mi(new Date().getTime())){var e=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:e})}else this.ii()}),1.1*this.sessionTimeoutMs))}}var c6=function(t,e){if(!t)return!1;var n=t.userAgent;if(n&&TP(n,e))return!0;try{var a=t?.userAgentData;if(a!=null&&a.brands&&a.brands.some((r=>TP(r?.brand,e))))return!0}catch{}return!!t.webdriver};function d6(){return(d6=_n((function*(){var t=ia?.userAgentData;if(t!=null&&t.getHighEntropyValues)try{var e=yield t.getHighEntropyValues(["model"]),n=e?.model;return Lt(n)&&n.length>0?n:void 0}catch(a){return void ye.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",a)}}))).apply(this,arguments)}var vf=function(t,e){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function rS(t,e,n){return yl({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:n})}var u6={exact:(t,e)=>e.some((n=>t.some((a=>n===a)))),is_not:(t,e)=>e.every((n=>t.every((a=>n!==a)))),regex:(t,e)=>e.some((n=>t.some((a=>vf(n,a))))),not_regex:(t,e)=>e.every((n=>t.every((a=>!vf(n,a))))),icontains:(t,e)=>e.map(Bh).some((n=>t.map(Bh).some((a=>n.includes(a))))),not_icontains:(t,e)=>e.map(Bh).every((n=>t.map(Bh).every((a=>!n.includes(a))))),gt:(t,e)=>e.some((n=>{var a=parseFloat(n);return!isNaN(a)&&t.some((r=>a>parseFloat(r)))})),lt:(t,e)=>e.some((n=>{var a=parseFloat(n);return!isNaN(a)&&t.some((r=>a<parseFloat(r)))}))},Bh=t=>t.toLowerCase();function h6(t,e){return!t||Object.entries(t).every((n=>{var[a,r]=n,s=e?.[a];if(be(s)||oa(s))return!1;var l=[String(s)],c=u6[r.operator];return!!c&&c(r.values,l)}))}var Ry="custom",iS="i.posthog.com",jq=/^\/static\//;class zq{constructor(e){this.bi={},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("."+iS,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.bi[this.apiHost]||(this.bi[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":Ry),this.bi[this.apiHost]}wi(e){if(jq.test(e)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(e,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),e==="ui")return this.uiHost+n;if(e==="flags")return this.flagsApiHost+n;if(e==="assets"){var a=this.wi(n);if(a)return""+a+n}if(this.region===Ry)return this.apiHost+n;var r=iS+n;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}}}var Rt=tn("[Surveys]"),Ly="seenSurvey_",p6=t=>{try{var e=(n=>((a,r)=>{var s=""+Ly+r.id;return r.current_iteration&&r.current_iteration>0&&(s=""+Ly+r.id+"_"+r.current_iteration),s})(0,n))(t);if(localStorage.getItem(e))return;localStorage.setItem(e,"true")}catch(n){Rt.error("Failed to persist survey seen state",n)}},Fq=[Lv.Popover,Lv.Widget,Lv.API],Uq={ignoreConditions:!1,ignoreDelay:!1,displayType:Py.Popover},Bq=tn("[PostHog ExternalIntegrations]"),$q={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class Vq{constructor(e){this._instance=e}Mt(e,n){var a;(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,e,(r=>{if(r)return Bq.error("failed to load script",r);n()}))}startIfEnabledOrStop(){var e=this,n=function(l){var c,u,h;!r||(c=Be.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||e.Mt($q[l],(()=>{var p;(p=Be.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.start(e._instance)})),!r&&(u=Be.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[l]&&((h=Be.__PosthogExtensions__)==null||(h=h.integrations)==null||(h=h[l])==null||h.stop())};for(var[a,r]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(a)}}}var Cd={},Nv=0,_f=()=>{},sS='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Zc="Surveys module not available",oS="sanitize_properties is deprecated. Use before_send instead",f6="Invalid value for property_denylist config: ",hl="posthog",m6=!Aq&&ga?.indexOf("MSIE")===-1&&ga?.indexOf("Mozilla")===-1,lS=t=>{var e;return fe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:GG(we?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:_f,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:pn&&Lt(pn?.search)&&pn.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:!1,enable_recording_console_log:void 0,secure_cookie:(J==null||(e=J.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){ye.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:ky,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:Ay},error_tracking:{},_onCapture:_f},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:rq,ignore_text_selection:!0}:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},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)}))(t))},Hq=[["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"]],cS=t=>{var e={};for(var[n,a]of Hq)be(t[n])||(e[a]=t[n]);var r=Bt({},e,t),s=t.__preview_external_dependency_versioned_paths;return be(s)||(be(t.strict_script_versioning)&&(r.strict_script_versioning=!!s),Lt(s)&&be(t.asset_host)&&(r.asset_host=s)),ct(t.property_blacklist)&&(be(t.property_denylist)?r.property_denylist=t.property_blacklist:ct(t.property_denylist)?r.property_denylist=[...t.property_blacklist,...t.property_denylist]:ye.error(f6+t.property_denylist)),r};class Wq{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(e){ye.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Wa{ki(e,n){if(e){var a=this.Si.indexOf(e);a!==-1&&this.Si.splice(a,1)}return this.Si.push(n),n.initialize==null||n.initialize(),n}Ci(){return this.config.cookieless_mode===xi||this.config.cookieless_mode===Ks&&this.consent.isRejected()}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 Wq,this.Ii=!1,this.version=on.LIB_VERSION,this.Ti=new Rb,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=lS(),this.SentryIntegration=pq,this.sentryIntegration=a=>(function(r,s){var l=HE(r,s);return{name:VE,processEvent:c=>l(c)}})(this,a),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new Nq(this),this.pageViewManager=new WP(this),this.rateLimiter=new xq(this),this.requestRouter=new zq(this),this.consent=new QG(this),this.externalIntegrations=new Vq(this);var n=(e=Wa.__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.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(a,r,s)=>{var l=Lt(a)?{[a]:r}:a;this.setPersonProperties(l),s?.({})},set_once:(a,r,s)=>{var l=Lt(a)?{[a]:r}:a;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(a=>ye.info('send "'+a?.event+'"',a)))}init(e,n,a){if(a&&a!==hl){var r,s=(r=Cd[a])!==null&&r!==void 0?r:new Wa;return s._init(e,n,a),Cd[a]=s,Cd[hl][a]=s,s}return this._init(e,n,a)}_init(e,n,a){var r,s;n===void 0&&(n={});var l=Lt(e)?e.trim():"";if(!l)return ye.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 console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Oi(n.debug),this.Li=n,this.Fi=[],n.person_profiles?this.Pi=n.person_profiles:n.process_person&&(this.Pi=n.process_person);var c=lS(n.defaults),u=cS(n),h=Bt({},c,u,{name:a,token:l});qt(c.rageclick)&&qt(u.rageclick)&&(h.rageclick=Bt({},c.rageclick,u.rageclick)),qt(c.session_recording)&&qt(u.session_recording)&&(h.session_recording=Bt({},c.session_recording,u.session_recording)),this.set_config(h),this.config.on_xhr_error&&ye.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Ha.GZipJS;var p=this.Ai();this.persistence=new Rv(this.config,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Rv(fe({},this.config,{persistence:"sessionStorage"}),p,!1);var m=fe({},this.persistence.props),v=fe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new Dq((A=>this.Di(A)),this.config.request_queue_config),this.Ni=new Mq(this),this.__request_queue=[];var y=this.Ci();if(y||(this.sessionManager=new aS(this),this.sessionPropsManager=new nS(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ye.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.qi(y)}),0)):(ye.info("Initializing extensions synchronously"),this.qi(y)),on.DEBUG=on.DEBUG||this.config.debug,on.DEBUG&&ye.info("Starting in debug mode",{this:this,config:n,thisC:fe({},this.config),p:m,s:v}),!this.config.identity_distinct_id||(r=n.bootstrap)!=null&&r.distinctID||(n.bootstrap=fe({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var b=n.bootstrap.distinctID,x=this.get_distinct_id(),P=this.persistence.get_property(vr);if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===el)this.identify(b);else if(n.bootstrap.isIdentifiedID&&x!=null&&x!==b&&P===tl)ye.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 T=this.config.get_device_id(wi()),L=n.bootstrap.isIdentifiedID?T:b;this.persistence.set_property(vr,n.bootstrap.isIdentifiedID?tl:el),this.register({distinct_id:b,$device_id:L})}}if(y)this.register_once({distinct_id:Nh,$device_id:null},"");else if(!this.get_distinct_id()){var E=this.config.get_device_id(wi());this.register_once({distinct_id:E,$device_id:E},""),this.persistence.set_property(vr,el)}return Qt(J,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(A,I){var B=A.config.segment;if(!B)return I();(function(D,S){var j=D.config.segment;if(!j)return S();var F=ee=>{var de=()=>ee.anonymousId()||wi();D.config.get_device_id=de,ee.id()&&(D.register({distinct_id:ee.id(),$device_id:de()}),D.persistence.set_property(vr,tl)),S()},Z=j.user();"then"in Z&&yr(Z.then)?Z.then(F):F(Z)})(A,(()=>{B.register((D=>{typeof Promise<"u"&&Promise.resolve||Av.warn("This browser does not have Promise support, and can not use the segment integration");var S=(j,F)=>{if(!F)return j;j.event.userId||j.event.anonymousId===D.get_distinct_id()||(Av.info("No userId set, resetting PostHog"),D.reset()),j.event.userId&&j.event.userId!==D.get_distinct_id()&&(Av.info("UserId set, identifying with PostHog"),D.identify(j.event.userId));var Z=D.calculateEventProperties(F,j.event.properties);return j.event.properties=Object.assign({},Z,j.event.properties),j};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:j=>S(j,j.event.event),page:j=>S(j,ul),identify:j=>S(j,Cv),screen:j=>S(j,"$screen")}})(A)).then((()=>{I()}))}))})(this,(()=>this.Bi())):this.Bi(),yr(this.config._onCapture)&&this.config._onCapture!==_f&&(ye.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(A=>this.config._onCapture(A.event,A)))),this.config.ip&&ye.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 d6.apply(this,arguments)})().then((A=>{A&&this.register({[Pv]:A})})).catch(_f),this}qi(e){var n,a,r,s,l,c,u,h=performance.now(),p=fe({},Wa.__defaultExtensionClasses,this.config.__extensionClasses),m=[];p.featureFlags&&this.Si.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Si.push(this.exceptions=(a=this.exceptions)!==null&&a!==void 0?a:new p.exceptions(this)),p.historyAutocapture&&this.Si.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Si.push(this.tracingHeaders=new p.tracingHeaders(this)),p.siteApps&&this.Si.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!e&&this.Si.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Si.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Si.push(this.surveys=(r=this.surveys)!==null&&r!==void 0?r:new p.surveys(this)),p.logs&&this.Si.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Si.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new p.conversations(this)),p.productTours&&this.Si.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Si.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Si.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,hq)),p.toolbar&&this.Si.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Si.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new p.experiments(this)),this.Si.forEach((v=>{v.initialize&&m.push((()=>{v.initialize==null||v.initialize()}))})),m.push((()=>{if(this.ji){var v=this.ji;this.ji=void 0,this.pr(v)}})),this.Hi(m,h)}Hi(e,n){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&e.length>0)return void setTimeout((()=>{this.Hi(e,n)}),0);var a=e.shift();if(a)try{a()}catch(s){ye.error("Error initializing extension:",s)}}var r=Math.round(performance.now()-n);this.register_for_session({[TE]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[EE]:r}),this.config.__preview_deferred_init_extensions&&ye.info("PostHog extensions initialized ("+r+"ms)")}pr(e){var n;if(!we||!we.body)return ye.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.pr(e)}),500);this.config.__preview_deferred_init_extensions&&(this.ji=e),this.Ui=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ke(e.supportedCompression,Ha.GZipJS)?Ha.GZipJS:Ke(e.supportedCompression,Ha.Base64)?Ha.Base64:void 0),(n=e.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:ky}),this.Si.forEach((a=>a.onRemoteConfig==null?void 0:a.onRemoteConfig(e)))}Bi(){try{this.config.loaded(this)}catch(a){ye.critical("`loaded` function failed",a)}if(this.zi(),this.config.internal_or_test_user_hostname&&pn!=null&&pn.hostname){var e=pn.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.Ci())&&this.Vi()}),1),this.Wi=new e6(this),this.Wi.load()}zi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&Oh(this.__request_queue,(e=>this.Di(e))),this.__request_queue=[],this.zi()}_handle_unload(){var e,n,a,r;(e=this.surveys)==null||e.handlePageUnload==null||e.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(Sv),(n=this.logs)==null||n.flushLogs("sendBeacon"),(a=this.$i)==null||a.unload(),(r=this.Ni)==null||r.unload()):this.Gi()&&this.capture(Sv,null,{transport:"sendBeacon"})}_send_request(e){this.__loaded?m6?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=fe({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,(be(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(n=>{var a,r,s,l=fe({},n);l.timeout=l.timeout||6e4,l.url=tS(l.url,l.compression);var c=(a=l.transport)!==null&&a!==void 0?a:"fetch",u=fp.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),h=(r=(s=(function(p,m){for(var v=0;p.length>v;v++)if(p[v].transport===c)return p[v]})(u))==null?void 0:s.method)!==null&&r!==void 0?r:u[0].method;if(!h)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===Ha.GZipJS&&ZW&&typeof Promise<"u"&&!pp?Rq(l).then((p=>{h(p)})).catch((p=>{if(CP(p))return pp=!0,void h(fe({},l,{compression:void 0,url:tS(n.url,void 0)}));(m=>{if(!m||typeof m!="object")return!1;var v="name"in m?String(m.name):"";return CP(m)||v===$4})(p)&&(pp=!0),h(l)})):h(l)})(fe({},e,{callback:n=>{var a,r;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(a=(r=this.config).on_request_error)==null||a.call(r,n),e.callback==null||e.callback(n)}}))):e.fireCallbackOnDrop&&(e.callback==null||e.callback({statusCode:0}))}Di(e){this.Ni?this.Ni.retriableRequest(e):this._send_request(e)}_execute_array(e){Nv++;try{var n,a=[],r=[],s=[];Oh(e,(c=>{if(c)if(ct(n=c[0]))s.push(c);else if(yr(c))try{c.call(this)}catch(u){ye.error("Error executing queued PostHog call",c,u)}else ct(c)&&n==="alias"?a.push(c):ct(c)&&n.indexOf("capture")!==-1&&yr(this[n])?s.push(c):r.push(c)}));var l=function(c,u){Oh(c,(function(h){try{if(ct(h[0])){var p=u;Mt(h,(function(m){p=p[m[0]].apply(p,m.slice(1))}))}else u[h[0]].apply(u,h.slice(1))}catch(m){ye.error("Error executing queued PostHog call",h,m)}}))};l(a,this),l(r,this),l(s,this)}finally{Nv--}}push(e){if(Nv>0&&ct(e)&&Lt(e[0])){var n=Wa.prototype[e[0]];yr(n)&&n.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,n,a){var r,s,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!be(e)&&Lt(e)){var h=!this.config.opt_out_useragent_filter&&this._is_bot();if(!h||this.config.__preview_capture_bot_pageviews){var p=a!=null&&a.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){n!=null&&n.$current_url&&!Lt(n?.$current_url)&&(ye.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"||a!=null&&a.Zi||ye.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 m=new Date,v=a?.timestamp||m,y=LP(a?.uuid,wi),b={uuid:y,event:e,properties:this.calculateEventProperties(e,n||{},v,y)};e===ul&&this.config.__preview_capture_bot_pageviews&&h&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),p&&(b.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),a?.$set&&(b.$set=a?.$set);var x=a?.$unset;x&&(b.$unset=x);var P,T,L,E=this.Qi(a?.$set_once,e!==MP,e===Cv);if(E&&(b.$set_once=E),a!=null&&a._noTruncate||(s=this.config.properties_string_max_length,l=b,c=F=>Lt(F)?F.slice(0,s):F,u=new Set,b=(function F(Z,ee){return Z!==Object(Z)?c?c(Z):Z:u.has(Z)?void 0:(u.add(Z),ct(Z)?(de=[],Oh(Z,(ae=>{de.push(F(ae))}))):(de={},Mt(Z,((ae,re)=>{u.has(ae)||(de[re]=F(ae))}))),de);var de})(l)),b.timestamp=v,be(a?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=m),e===Pi.DISMISSED||e===Pi.SENT){var A=n?.[Dv.SURVEY_ID],I=n?.[Dv.SURVEY_ITERATION];p6({id:A,current_iteration:I}),b.$set=fe({},b.$set,{[(P={id:A,current_iteration:I},T=e===Pi.SENT?"responded":"dismissed",L="$survey_"+T+"/"+P.id,P.current_iteration&&P.current_iteration>0&&(L="$survey_"+T+"/"+P.id+"/"+P.current_iteration),L)]:!0})}else e===Pi.SHOWN&&(b.$set=fe({},b.$set,{[Dv.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===wq.SHOWN){var B=n?.[qP.TOUR_TYPE];B&&(b.$set=fe({},b.$set,{[qP.TOUR_LAST_SEEN_DATE+"/"+B]:new Date().toISOString()}))}var D=fe({},b.properties.$set,b.$set);if(cs(D)||this.setPersonPropertiesForFlags(D),!nt(this.config.before_send)){var S=this.it(b);if(!S)return;(b=S).uuid=LP(b.uuid,wi)}this.Ti.emit("eventCaptured",b);var j={method:"POST",url:(r=a?._url)!==null&&r!==void 0?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:a?._batchKey,transport:a?.transport};return!this.config.request_batching||a&&(a==null||!a._batchKey)||a!=null&&a.send_instantly?this.Di(j):this.$i.enqueue(j),b}ye.critical("This capture call is ignored due to client rate limiting.")}}else ye.error("No event name provided to posthog.capture")}else ye.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",(n=>e(n.event,n)))}calculateEventProperties(e,n,a,r,s){if(a=a||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(e),c=fe({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ci()&&(c.$cookieless_mode=!0),e==="$snapshot"){var u=fe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!Lt(c.distinct_id)&&!Bn(c.distinct_id)||J_(c.distinct_id))&&ye.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var h,p=(function(T,L,E,A){var I,B,D,S;if(A===void 0&&(A=!1),!ga)return{};var j,F,Z,ee,de,ae,re,te,le,H=T?[...zl,...L||[]]:[],[Q,W]=(function(ke){for(var me=0;AP.length>me;me++){var[_e,Me]=AP[me],Oe=_e.exec(ke),Le=Oe&&(yr(Me)?Me(Oe,ke):Me);if(Le)return Le}return["",""]})(ga),N=(j=typeof navigator<"u"?navigator:void 0)!=null&&j.brave?{brave:!0}:{},Y={detectGoogleSearchApp:E},ue=Bt(Pb({$os:Q,$os_version:W,$browser:uE(ga,navigator.vendor,N,Y),$device:RP(ga),$device_type:(Z=ga,ee={userAgentDataPlatform:(I=navigator)==null||(I=I.userAgentData)==null?void 0:I.platform,maxTouchPoints:(B=navigator)==null?void 0:B.maxTouchPoints,screenWidth:J==null||(D=J.screen)==null?void 0:D.width,screenHeight:J==null||(S=J.screen)==null?void 0:S.height,devicePixelRatio:J?.devicePixelRatio},le=RP(Z),le===q4||le===G4||le==="Kobo"||le==="Kindle Fire"||le===sE?Ml:le===Fd||le===Pl||le===Ud||le===Q_?"Console":le===Y4?"Wearable":le?La:ee?.userAgentDataPlatform==="Android"&&((de=ee?.maxTouchPoints)!==null&&de!==void 0?de:0)>0?600>Math.min((ae=ee?.screenWidth)!==null&&ae!==void 0?ae:0,(re=ee?.screenHeight)!==null&&re!==void 0?re:0)/((te=ee?.devicePixelRatio)!==null&&te!==void 0?te:1)?La:Ml:"Desktop"),$timezone:QE(),$timezone_offset:_q()}),{$current_url:Hd(A?ms(pn?.href):pn?.href,H,Wd),$host:pn?.host,$pathname:pn?.pathname,$raw_user_agent:ga.length>1e3?ga.substring(0,997)+"...":ga,$browser_version:mG(ga,navigator.vendor,N,Y),$browser_language:GP(),$browser_language_prefix:(F=GP(),typeof F=="string"?F.split("-")[0]:void 0),$screen_height:J?.screen.height,$screen_width:J?.screen.width,$viewport_height:J?.innerHeight,$viewport_width:J?.innerWidth,$lib:on.LIB_NAME,$lib_version:on.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return on.SDK_DIST_CHANNEL&&(ue.$sdk_dist_channel=on.SDK_DIST_CHANNEL),ue})(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{sessionId:m,windowId:v}=this.sessionManager.checkAndGetSessionAndWindowId(s,a.getTime());c.$session_id=m,c.$window_id=v}this.sessionPropsManager&&Bt(c,this.sessionPropsManager.getSessionProps());try{var y;this.sessionRecording&&Bt(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(y=this.Ni)==null?void 0:y.length}catch(T){c.$sdk_debug_error_capturing_properties=String(T)}if(this.requestRouter.region===Ry&&(c.$lib_custom_api_host=this.config.api_host),h=e!==ul||s?e!==Sv||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(a):this.pageViewManager.doPageView(a,r),c=Bt(c,h),e===ul&&we&&(c.title=we.title),!be(l)){var b=a.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}ga&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Bt({},p,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),ct(this.config.property_denylist)?Mt(this.config.property_denylist,(function(T){delete c[T]})):ye.error(f6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(ye.error(oS),c=x(c,e));var P=this.Ji();return c.$process_person_profile=P,P&&!s&&this.Yi("_calculate_event_properties"),c}Qi(e,n,a){var r;if(n===void 0&&(n=!0),a===void 0&&(a=!1),!this.persistence||!this.Ji()||this.Ii&&!a)return e;var s=this.persistence.get_initial_props(),l=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),c=Bt({},s,l||{},e||{}),u=this.config.sanitize_properties;return u&&(ye.error(oS),c=u(c,"$set_once")),n&&(this.Ii=!0),cs(c)?void 0:c}register(e,n){var a;(a=this.persistence)==null||a.register(e,n)}register_once(e,n,a){var r;(r=this.persistence)==null||r.register_once(e,n,a)}register_for_session(e){var n;(n=this.sessionPersistence)==null||n.register(e)}unregister(e){var n;(n=this.persistence)==null||n.unregister(e)}unregister_for_session(e){var n;(n=this.sessionPersistence)==null||n.unregister(e)}Ki(e,n){this.register({[e]:n})}getFeatureFlag(e,n){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlag(e,n)}getFeatureFlagPayload(e){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(e)}getFeatureFlagResult(e,n){var a;return(a=this.featureFlags)==null?void 0:a.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 a;return(a=this.featureFlags)==null?void 0:a.isFeatureEnabled(e,n)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,n,a){var r;(r=this.featureFlags)==null||r.updateFlags(e,n,a)}updateEarlyAccessFeatureEnrollment(e,n,a){var r;(r=this.featureFlags)==null||r.updateEarlyAccessFeatureEnrollment(e,n,a)}getEarlyAccessFeatures(e,n,a){var r;return n===void 0&&(n=!1),(r=this.featureFlags)==null?void 0:r.getEarlyAccessFeatures(e,n,a)}on(e,n){return this.Ti.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:Zc}),()=>{})}onSessionId(e){var n,a;return(n=(a=this.sessionManager)==null?void 0:a.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:Zc})}getActiveMatchingSurveys(e,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,n):e([],{isLoaded:!1,error:Zc})}renderSurvey(e,n){var a;(a=this.surveys)==null||a.renderSurvey(e,n)}displaySurvey(e,n){var a;n===void 0&&(n=Uq),(a=this.surveys)==null||a.displaySurvey(e,n)}cancelPendingSurvey(e){var n;(n=this.surveys)==null||n.cancelPendingSurvey(e)}canRenderSurvey(e){var n,a;return(n=(a=this.surveys)==null?void 0:a.canRenderSurvey(e))!==null&&n!==void 0?n:{visible:!1,disabledReason:Zc}}canRenderSurveyAsync(e,n){var a,r;return n===void 0&&(n=!1),(a=(r=this.surveys)==null?void 0:r.canRenderSurveyAsync(e,n))!==null&&a!==void 0?a:Promise.resolve({visible:!1,disabledReason:Zc})}Xi(e){return!e||J_(e)?(ye.critical("Unique user id has not been set in posthog.identify"),!1):e===Nh?(ye.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())||(ye.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,a){if(!this.__loaded||!this.persistence)return ye.uninitializedWarning("posthog.identify");if(Bn(e)&&(e=e.toString(),ye.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(e)&&this.Yi("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(sf)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(sd)&&(this.unregister(sd),this.register({distinct_id:e}));var s,l=(this.persistence.get_property(vr)||el)===el;e!==r&&l?(this.persistence.set_property(vr,tl),this.setPersonPropertiesForFlags({$set:n||{},$set_once:a||{}},!1),this.capture(Cv,{distinct_id:e,$anon_distinct_id:r},{$set:n||{},$set_once:a||{}}),this.Ri=rS(e,n,a),(s=this.featureFlags)==null||s.setAnonymousDistinctId(r)):(n||a)&&this.setPersonProperties(n,a),e!==r&&(this.reloadFeatureFlags(),this.unregister(xd))}}setPersonProperties(e,n){if((e||n)&&this.Yi("posthog.setPersonProperties")){var a=rS(this.get_distinct_id(),e,n);this.Ri!==a?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:n||{}},!0),this.capture("$set",{$set:e||{},$set_once:n||{}}),this.Ri=a):ye.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(e){var n,a=(ct(e)?e:[e]).filter((r=>Lt(r)&&r.length>0));a.length!==0&&this.Yi("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(a,!0),this.capture("$set",{$unset:a}),this.Ri=null)}group(e,n,a){if(e&&n){var r=this.getGroups(),s=r[e]!==n;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:fe({},r,{[e]:n})}),s||a){var l={$group_type:e,$group_key:n};a&&(l.$group_set=a),this.capture(MP,l)}a&&this.setGroupPropertiesForFlags({[e]:a}),s&&!a&&this.reloadFeatureFlags()}else ye.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,n){var a;n===void 0&&(n=!0),(a=this.featureFlags)==null||a.setPersonPropertiesForFlags(e,n)}resetPersonPropertiesForFlags(e){var n;e===void 0&&(e=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(e)}setGroupPropertiesForFlags(e,n){var a;n===void 0&&(n=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&((a=this.featureFlags)==null||a.setGroupPropertiesForFlags(e,n))}resetGroupPropertiesForFlags(e){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(e)}reset(e){var n,a,r,s,l,c,u,h,p;if(ye.info("reset"),!this.__loaded)return ye.uninitializedWarning("posthog.reset");var m,v=this.get_property(sf),y=this.get_property(Pv),b=this.get_property(ao);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(a=this.sessionPersistence)==null||a.clear(),be(b)||(m=this.persistence)==null||m.register({[ao]:b}),(r=this.surveys)==null||r.reset(),(s=this.Wi)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.logs)==null||u.reset(),(h=this.persistence)==null||h.set_property(vr,el),(p=this.sessionManager)==null||p.resetSessionId(),this.Ri=null,this.config.cookieless_mode===xi)this.register_once({distinct_id:Nh,$device_id:null},"");else{var x=this.config.get_device_id(wi());this.register_once({distinct_id:x,$device_id:e?x:v},""),e||be(y)||this.register({[Pv]:y})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}shutdown(e){var n=this;return _n((function*(){var a,r,s,l;n.__loaded?((a=n.logs)==null||a.flushLogs("sendBeacon"),(r=n.$i)==null||r.unload(),(s=n.Ni)==null||s.unload(),(l=n.featureFlags)==null||l.destroy()):ye.uninitializedWarning("posthog.shutdown")}))()}setIdentity(e,n){var a;this.config.identity_distinct_id=e,this.config.identity_hash=n,this.alias(e),(a=this.conversations)==null||a.en()}clearIdentity(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,(e=this.conversations)==null||e.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,n;return(e=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:a}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(e!=null&&e.withTimestamp&&a){var s,l=(s=e.timestampLookBack)!==null&&s!==void 0?s:10;if(!a)return r;r+="?t="+Math.max(Math.floor((new Date().getTime()-a)/1e3)-l,0)}return r}alias(e,n){return e===this.get_property(bE)?(ye.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(be(n)&&(n=this.get_distinct_id()),e!==n?(this.Ki(sd,e),this.capture("$create_alias",{alias:e,distinct_id:n})):(ye.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var n=fe({},this.config);if(qt(e)){var a,r,s,l,c,u,h,p,m,v,y;Bt(this.config,cS(e));var b=this.Ai();(a=this.persistence)==null||a.update_config(this.config,n,b),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new Rv(fe({},this.config,{persistence:"sessionStorage"}),b,!1);var x=this.Oi(this.config.debug);Hr(x)&&(this.config.debug=x),Hr(this.config.debug)&&(this.config.debug?(on.DEBUG=!0,It.N()&&It.q("ph_debug",!0),ye.info("set_config",{config:e,oldConfig:n,newConfig:fe({},this.config)})):(on.DEBUG=!1,It.N()&&It.P("ph_debug"))),(r=this.exceptionObserver)==null||r.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.tracingHeaders)==null||c.startIfEnabledOrStop(),(u=this.autocapture)==null||u.startIfEnabled(),(h=this.heatmaps)==null||h.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(m=this.deadClicksAutocapture)==null||m.startIfEnabledOrStop(),(v=this.surveys)==null||v.loadIfEnabled(),this.rn(),(y=this.externalIntegrations)==null||y.startIfEnabledOrStop()}}_overrideSDKInfo(e,n){on.LIB_NAME=e,on.LIB_VERSION=n}startSessionRecording(e){var n,a,r,s,l,c=e===!0,u={sampling:c||!(e==null||!e.sampling),linked_flag:c||!(e==null||!e.linked_flag),url_trigger:c||!(e==null||!e.url_trigger),event_trigger:c||!(e==null||!e.event_trigger)};Object.values(u).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),u.sampling&&((a=this.sessionRecording)==null||a.overrideSampling()),u.linked_flag&&((r=this.sessionRecording)==null||r.overrideLinkedFlag()),u.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),u.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,n){if(this.exceptions){var a=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:a});return this.exceptions.sendExceptionEvent(fe({},r,n))}}addExceptionStep(e,n){var a;(a=this.exceptions)==null||a.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:Wa.nn}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var n,a;return(n=(a=this.toolbar)==null?void 0:a.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:hl;return n!==hl&&(n=hl+"."+n),n}_isIdentified(){var e,n;return((e=this.persistence)==null?void 0:e.get_property(vr))===tl||((n=this.sessionPersistence)==null?void 0:n.get_property(vr))===tl}Ji(){var e,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===ky&&!this._isIdentified()&&cs(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[sd])&&((n=this.persistence)==null||(n=n.props)==null||!n[cf]))}Gi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(e){return this.config.person_profiles==="never"?(ye.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(cf,!0),!0)}Ai(){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!==Ks)}rn(){var e,n,a,r,s=this.Ai();return((e=this.persistence)==null?void 0:e.Vt)!==s&&((a=this.persistence)==null||a.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Vt)!==s&&((r=this.sessionPersistence)==null||r.set_disabled(s)),s}opt_in_capturing(e){var n;if(this.config.cookieless_mode!==xi){if(this.Ci()){var a,r,s,l,c;this.reset(!0),(a=this.sessionManager)==null||a.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=new aS(this),this.pageViewManager=new WP(this),this.persistence&&(this.sessionPropsManager=new nS(this,this.sessionManager,this.persistence));var u,h=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=Wa.__defaultExtensionClasses)==null?void 0:c.sessionRecording;h&&(this.sessionRecording=this.ki(this.sessionRecording,new h(this)),this.Ui&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Ui)))}var p,m;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ks&&((p=this.surveys)==null||p.loadIfEnabled()),(be(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture((m=e?.captureEventName)!==null&&m!==void 0?m:"$opt_in",e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else ye.warn(sS)}opt_out_capturing(){var e,n,a;this.config.cookieless_mode!==xi?(this.config.cookieless_mode===Ks&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Ks&&(this.register({distinct_id:Nh,$device_id:null}),(e=this.sessionRecording)==null||e.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(a=this.pageViewManager)==null||a.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):ye.warn(sS)}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===xi||(this.config.cookieless_mode===Ks?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return ia?c6(ia,this.config.custom_blocked_useragents):void 0}Vi(){we&&(we.visibilityState==="visible"?this.Ei||(this.Ei=!0,this.capture(ul,{title:we.title},{send_instantly:!0}),this.Mi&&(we.removeEventListener(df,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),Qt(we,df,this.Mi)))}debug(e){e===!1?(J?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(J?.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}))}mr(){var e,n,a,r,s,l,c=this.Li||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(ye.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):(a="advanced_disable_decide",r=ye,s=(n="advanced_disable_flags")in(e=c)&&!nt(e[n]),l=a in e&&!nt(e[a]),s?e[n]:!!l&&(r&&r.warn("Config field '"+a+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),e[a]))}it(e){var n;if(nt(this.config.before_send))return e;var a=Object.keys((n=e.properties)!==null&&n!==void 0?n:{}).filter(aG),r=ct(this.config.before_send)?this.config.before_send:[this.config.before_send],s=e;for(var l of r){if(s=l(s),nt(s)){var c="Event '"+e.event+"' was rejected in beforeSend function";return nG(e.event)?ye.warn(c+". This can cause unexpected behavior."):ye.info(c),null}s.properties&&!cs(s.properties)||ye.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}for(var u of a)if(s.properties&&nt(s.properties[u]))return ye.warn("Event '"+e.event+"' had its '"+u+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var e;return(e=this.pageViewManager.Ot)==null?void 0:e.pageViewId}captureTraceFeedback(e,n){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:n})}captureTraceMetric(e,n,a){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:n,$ai_metric_value:String(a)})}Oi(e){var n=Hr(e)&&!e,a=It.N()&&It.A("ph_debug")==="true";return!n&&(!!a||e)}}Wa.__defaultExtensionClasses={},Wa.nn=(()=>{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]]=HG(t.prototype[e[n]])})(Wa,["identify"]);class dS{constructor(e){this.disabled=e===!1;var n=qt(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,a){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(n-r.y)<this.thresholdPx&&this.timeoutMs>a-r.timestamp){if(this.clicks.push({x:e,y:n,timestamp:a}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:n,timestamp:a}];return!1}}var Ov="$copy_autocapture",jv=tn("[AutoCapture]");function zv(t,e){return e.length>t?e.slice(0,t)+"...":e}function Gq(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!gs(e));return e}function qq(t,e){var n,a,{e:r,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:u,disableCaptureUrlHashes:h}=e;if(!gs(t))return{props:{}};for(var p=[t],m=t;m.parentNode&&!Aa(m,"body");)if(ME(m.parentNode))p.push(m.parentNode.host),m=m.parentNode.host;else{if(!gs(m.parentNode))break;p.push(m.parentNode),m=m.parentNode}var v,y,b=[],x={},P=!1,T=!1;if(Mt(p,(B=>{var D=xy(B);if(Aa(B,"a")){var S=B.getAttribute("href");P=!!(D&&S&&Pd(S))&&(h?ms(S):S)}Ke(pf(B),"ph-no-capture")&&(T=!0),b.push((function(F,Z,ee,de,ae){ae===void 0&&(ae=!1);var re=F.tagName.toLowerCase(),te={tag_name:re};Cb.indexOf(re)>-1&&!ee&&(te.$el_text=re.toLowerCase()==="a"||re.toLowerCase()==="button"?zv(1024,$P(F)):zv(1024,$d(F)));var le=pf(F);le.length>0&&(te.classes=le.filter((function(N){return N!==""}))),Mt(F.attributes,(function(N){var Y;if((!FE(F)||["name","id","class","aria-label"].indexOf(N.name)!==-1)&&(de==null||!de.includes(N.name))&&!Z&&Pd(N.value)&&(!Lt(Y=N.name)||Y.substring(0,10)!=="_ngcontent"&&Y.substring(0,7)!=="_nghost")){var ue=N.value;N.name==="class"&&(ue=Sb(ue).join(" ")),te["attr__"+N.name]=zv(1024,N.name==="href"&&ae?ms(ue):ue)}}));for(var H=1,Q=1,W=F;W=Gq(W);)H++,W.tagName===F.tagName&&Q++;return te.nth_child=H,te.nth_of_type=Q,te})(B,s,l,c,h));var j=(function(F){if(!xy(F))return{};var Z={};return Mt(F.attributes,(function(ee){if(ee.name&&ee.name.indexOf("data-ph-capture-attribute")===0){var de=ee.name.replace("data-ph-capture-attribute-",""),ae=ee.value;de&&ae&&Pd(ae)&&(Z[de]=ae)}})),Z})(B);Bt(x,j)})),T)return{props:{},explicitNoCapture:T};if(l||(b[0].$el_text=Aa(t,"a")||Aa(t,"button")?$P(t):$d(t)),P){var L,E;b[0].attr__href=P;var A=(L=Vd(P))==null?void 0:L.host,I=J==null||(E=J.location)==null?void 0:E.host;A&&I&&A!==I&&(v=P)}return{props:Bt({$event_type:r.type,$ce_version:1},u?{}:{$elements:b},{$elements_chain:(y=b,(function(B){return B.map((D=>{var S,j,F="";if(D.tag_name&&(F+=D.tag_name),D.attr_class)for(var Z of(D.attr_class.sort(),D.attr_class))F+="."+Z.replace(/"/g,"");var ee=fe({},D.text?{text:D.text}:{},{"nth-child":(S=D.nth_child)!==null&&S!==void 0?S:0,"nth-of-type":(j=D.nth_of_type)!==null&&j!==void 0?j:0},D.href?{href:D.href}:{},D.attr_id?{attr_id:D.attr_id}:{},D.attributes),de={};return hp(ee).sort(((ae,re)=>{var[te]=ae,[le]=re;return te.localeCompare(le)})).forEach((ae=>{var[re,te]=ae;return de[VP(re.toString())]=VP(te.toString())})),(F+=":")+hp(de).map((ae=>{var[re,te]=ae;return re+'="'+te+'"'})).join("")})).join(";")})((function(B){return B.map((D=>{var S,j,F={text:(S=D.$el_text)==null?void 0:S.slice(0,400),tag_name:D.tag_name,href:(j=D.attr__href)==null?void 0:j.slice(0,2048),attr_class:dq(D),attr_id:D.attr__id,nth_child:D.nth_child,nth_of_type:D.nth_of_type,attributes:{}};return hp(D).filter((Z=>{var[ee]=Z;return ee.indexOf("attr__")===0})).forEach((Z=>{var[ee,de]=Z;return F.attributes[ee]=de})),F}))})(y)))},(n=b[0])!=null&&n.$el_text?{$el_text:(a=b[0])==null?void 0:a.$el_text}:{},v&&r.type==="click"?{$external_click_url:v}:{},x)}}var Jc=tn("[ExceptionAutocapture]"),uS=()=>{},Kq=tn("[TracingHeaders]"),Bs=tn("[Web Vitals]"),hS=9e5,pS="disabled",fS="lazy_loading",Xc="awaiting_config",$h="missing_config";tn("[SessionRecording]"),tn("[SessionRecording]");var Dy="[SessionRecording]",mi=tn(Dy),Yq=tn("[Heatmaps]");function mS(t){return qt(t)&&"clientX"in t&&"clientY"in t&&Bn(t.clientX)&&Bn(t.clientY)}var Fv=tn("[Product Tours]"),Uv=t=>{var e;return!t.config.disable_product_tours&&!((e=t.persistence)==null||!e.get_property(wb))},Zq=["$set_once","$set"],Mr=tn("[SiteApps]"),gS="Error while initializing PostHog app with config id ";function rl(t,e,n){if(nt(t))return!1;switch(n){case"exact":return t===e;case"contains":var a=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(a,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class Jq{constructor(e){this.sn=new Rb,this.an=(n,a)=>this.ln(n,a)&&this.un(n,a)&&this.hn(n,a)&&this.dn(n,a),this.ln=(n,a)=>a==null||!a.event||n?.event===a?.event,this._instance=e,this.cn=new Set,this.vn=new Set}init(){var e,n;be((e=this._instance)==null?void 0:e._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((a,r)=>{this.on(a,r)}))}register(e){var n,a;if(!be((n=this._instance)==null?void 0:n._addCaptureHook)&&(e.forEach((l=>{var c,u;(c=this.vn)==null||c.add(l),(u=l.steps)==null||u.forEach((h=>{var p;(p=this.cn)==null||p.add(h?.event||"")}))})),(a=this._instance)!=null&&a.autocapture)){var r,s=new Set;e.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&s.add(u?.selector)}))})),(r=this._instance)==null||r.autocapture.setElementSelectors(s)}}on(e,n){var a;n!=null&&e.length!=0&&(this.cn.has(e)||this.cn.has(n?.event))&&this.vn&&((a=this.vn)==null?void 0:a.size)>0&&this.vn.forEach((r=>{this.fn(n,r)&&this.sn.emit("actionCaptured",r.name)}))}pn(e){this.onAction("actionCaptured",(n=>e(n)))}fn(e,n){if(n?.steps==null)return!1;for(var a of n.steps)if(this.an(e,a))return!0;return!1}onAction(e,n){return this.sn.on(e,n)}un(e,n){if(n!=null&&n.url){var a,r=e==null||(a=e.properties)==null?void 0:a.$current_url;if(!r||typeof r!="string"||!rl(r,n.url,n.url_matching||"contains"))return!1}return!0}hn(e,n){return!!this.gn(e,n)&&!!this.mn(e,n)&&!!this.yn(e,n)}gn(e,n){var a;if(n==null||!n.href)return!0;var r=this.bn(e);if(r.length>0)return r.some((c=>rl(c.href,n.href,n.href_matching||"exact")));var s,l=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";return!!l&&rl((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}mn(e,n){var a;if(n==null||!n.text)return!0;var r=this.bn(e);if(r.length>0)return r.some((h=>rl(h.text,n.text,n.text_matching||"exact")||rl(h.$el_text,n.text,n.text_matching||"exact")));var s,l,c,u=(e==null||(a=e.properties)==null?void 0:a.$elements_chain)||"";return!!u&&(s=(function(h){for(var p,m=[],v=/(?::|")text="(.*?)"/g;!nt(p=v.exec(h));)m.includes(p[1])||m.push(p[1]);return m})(u),l=n.text,c=n.text_matching||"exact",s.some((h=>rl(h,l,c))))}yn(e,n){var a,r;if(n==null||!n.selector)return!0;var s=e==null||(a=e.properties)==null?void 0:a.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(e==null||(r=e.properties)==null?void 0:r.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}bn(e){var n;return(e==null||(n=e.properties)==null?void 0:n.$elements)==null?[]:e?.properties.$elements}dn(e,n){return n==null||!n.properties||n.properties.length===0||h6(n.properties.reduce(((a,r)=>{var s=ct(r.value)?r.value.map(String):r.value!=null?[String(r.value)]:[];return a[r.key]={values:s,operator:r.operator||"exact"},a}),{}),e?.properties)}}class Xq{constructor(e){this._n=[],this._instance=e,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(e,n){return!!e&&h6(e.propertyFilters,n?.properties)}Cn(e,n){var a=new Map;return e.forEach((r=>{var s;(s=r.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=a.get(l.name)||[];c.push(r.id),a.set(l.name,c)}}))})),a}In(e,n,a){var r=(a===Wc.Activation?this.wn:this.xn).get(e),s=[];return this.Tn((l=>{s=l.filter((c=>r?.includes(c.id)))})),s.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[a])==null||(c=c.values)==null?void 0:c.find((h=>h.name===e));return this.Sn(u,n)}))}register(e){var n;be((n=this._instance)==null?void 0:n._addCaptureHook)||(this.En(e),this.Mn(e))}Mn(e){var n=e.filter((a=>{var r,s;return((r=a.conditions)==null?void 0:r.actions)&&((s=a.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Pn==null&&(this.Pn=new Jq(this._instance),this.Pn.init(),this.Pn.pn((a=>{this.onAction(a)}))),n.forEach((a=>{var r,s,l,c,u;a.conditions&&(r=a.conditions)!=null&&r.actions&&(s=a.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=a.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Pn)==null||c.register(a.conditions.actions.values),(u=a.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((h=>{if(h&&h.name){var p=this.kn.get(h.name);p&&p.push(a.id),this.kn.set(h.name,p||[a.id])}})))})))}En(e){var n,a=e.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),r=e.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));a.length===0&&r.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.wn=this.Cn(e,Wc.Activation),this.xn=this.Cn(e,Wc.Cancellation))}onEvent(e,n){var a,r,s=this.Rn(),l=(n==null||(a=n.properties)==null?void 0:a.$survey_id)||(n==null||(r=n.properties)==null?void 0:r.$product_tour_id);if(l&&this.getActivatedIds().includes(l)){var c=this.On(e,l);if(c==="consume")return s.info("event consumed activated item, removing it",{event:e,itemId:l}),void this.Ln([l]);if(c==="persist")return s.info("shown item promoted to persisted activation",{event:e,itemId:l}),void this.Fn(l)}if(this.xn.has(e)){var u=this.In(e,n,Wc.Cancellation);u.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:u.map((p=>p.id))}),this.Ln(u.map((p=>p.id))),u.forEach((p=>this.An(p.id))))}if(this.wn.has(e)){s.info("event name matched",{event:e,eventPayload:n,items:this.wn.get(e)});var h=this.In(e,n,Wc.Activation);this.$n(h.map((p=>p.id)))}}onAction(e){this.kn.has(e)&&this.$n(this.kn.get(e)||[])}$n(e){e.length!==0&&(this._n=[...new Set([...this._n,...e])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(e){this._n=this._n.filter((a=>a!==e));var n=this.Dn();n.includes(e)||this.Nn([...n,e])}Ln(e){var n=new Set(e);this._n=this._n.filter((s=>!n.has(s)));var a=this.Dn(),r=a.filter((s=>!n.has(s)));r.length!==a.length&&this.Nn(r)}Dn(){var e,n=this.qn();return((e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[n])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter((e=>!this.Bn(e)))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}jn(){return this.Pn}}class Qq extends Xq{constructor(e){super(e)}qn(){return py}Hn(){return Pi.SHOWN}Tn(e){var n;(n=this._instance)==null||n.getSurveys(e)}An(e){var n;(n=this._instance)==null||n.cancelPendingSurvey(e)}Rn(){return Rt}Nn(e){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[py]:e})}Bn(){return!1}On(e,n){var a;this.Tn((s=>{a=s.find((l=>l.id===n))}));var r=!a||(function(s){var l,c,u,h=((l=(c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)!==null&&l!==void 0?l:0)>0;return s.schedule===kq.Always||!((u=s.conditions)==null||(u=u.events)==null||!u.repeatedActivation||!h)})(a);return r?e===Pi.SHOWN?"consume":"ignore":e===Pi.SHOWN?"persist":e===Pi.DISMISSED||e===Pi.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var Bv="SDK is not enabled or survey functionality is not yet loaded",vS="Disabled. Not loading surveys.",eK=J!=null&&J.location?ff(J.location.hash,"__posthog")||ff(location.hash,"state"):null,_S="_postHogToolbarParams",yS=tn("[Toolbar]"),mn=tn("[FeatureFlags]"),$s=tn("[FeatureFlags]",{debugEnabled:!0}),$v=`" failed. Feature flags didn't load in time.`,bS=t=>{for(var e={},n=0;t.length>n;n++)e[t[n]]=!0;return e},kS=t=>{var e={};for(var[n,a]of hp(t||{}))a&&(e[n]=a);return e},gi=tn("[Error tracking]"),wS="Refusing to render web experiment since the viewer is a likely bot",tK={icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>e.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>vf(e,t),not_regex:(t,e)=>!vf(e,t),exact:(t,e)=>e===t,is_not:(t,e)=>e!==t};class Zn{get Se(){return this._instance.config}constructor(e){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(a){a===void 0&&(a=!1),n.getWebExperiments((r=>{Zn.Un("retrieved web experiments from the server"),n.zn=new Map,r.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(Zn.Un("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);Lt(c)&&s.variants[c]&&n.Vn(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var u in s.variants){var h=s.variants[u];Zn.Wn(h,n._instance)&&n.Vn(s.name,u,h.transforms)}}))}),a)},this._instance=e,this._instance.onFeatureFlags((a=>{this.onFeatureFlags(a)}))}initialize(){}onFeatureFlags(e){if(this._is_bot())Zn.Un(wS);else if(!this.Se.disable_web_experiments){if(nt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Zn.Un("applying feature flags",e),e.forEach((n=>{var a;if(this.zn&&(a=this.zn)!=null&&a.has(n)){var r,s=this._instance.getFeatureFlag(n),l=(r=this.zn)==null?void 0:r.get(n);s&&l!=null&&l.variants[s]&&this.Vn(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var e=Zn.getWindowLocation();if(e!=null&&e.search){var n=jl(e?.search,"__experiment_id"),a=jl(e?.search,"__experiment_variant");n&&a&&(Zn.Un("previewing web experiments "+n+" && "+a),this.getWebExperiments((r=>{this.Gn(parseInt(n),a,r)}),!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,n,a){if(this.Se.disable_web_experiments&&!a)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!n)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>e(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(e,n,a){var r=a.filter((s=>s.id===e));r&&r.length>0&&(Zn.Un("Previewing web experiment ["+r[0].name+"] with variant ["+n+"]"),this.Vn(r[0].name,n,r[0].variants[n].transforms))}static Wn(e,n){return!nt(e.conditions)&&Zn.Zn(e,n)&&Zn.Qn(e)}static Zn(e,n){var a;if(nt(e.conditions)||nt((a=e.conditions)==null?void 0:a.url))return!0;var r=Zn.getWindowLocation();if(r){var s,l,c,u=DE(n,r.href);return(s=e.conditions)==null||!s.url||tK[(l=(c=e.conditions)==null?void 0:c.urlMatchType)!==null&&l!==void 0?l:"icontains"](e.conditions.url,u)}return!1}static getWindowLocation(){return J?.location}static Qn(e){var n;if(nt(e.conditions)||nt((n=e.conditions)==null?void 0:n.utm))return!0;var a=qE();if(a.utm_source){var r,s,l,c,u,h,p,m,v=(r=e.conditions)==null||(r=r.utm)==null||!r.utm_campaign||((s=e.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==a.utm_campaign,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==a.utm_source,b=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_medium||((h=e.conditions)==null||(h=h.utm)==null?void 0:h.utm_medium)==a.utm_medium,x=(p=e.conditions)==null||(p=p.utm)==null||!p.utm_term||((m=e.conditions)==null||(m=m.utm)==null?void 0:m.utm_term)==a.utm_term;return v&&b&&x&&y}return!1}static Un(e){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;n>r;r++)a[r-1]=arguments[r];ye.info("[WebExperiments] "+e,a)}Vn(e,n,a){this._is_bot()?Zn.Un(wS):n!=="control"?a.forEach((r=>{if(r.selector){var s;Zn.Un("applying transform of variant "+n+" for experiment "+e+" ",r);var l=(s=document)==null?void 0:s.querySelectorAll(r.selector);l?.forEach((c=>{var u=c;r.html&&(u.innerHTML=r.html),r.css&&u.setAttribute("style",r.css)}))}})):Zn.Un("Control variants leave the page unmodified.")}_is_bot(){return ia&&this._instance?c6(ia,this.Se.custom_blocked_useragents):void 0}}var Ua=tn("[Conversations]"),Vs="Conversations not available yet.",xS="console",Hf={featureFlags:class{constructor(t){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=0,this.os=()=>{var e=this.ls();this.ss=0,e&&this.reloadFeatureFlags()},this._instance=t,this.featureFlagEventHandlers=[],J&&Qt(J,"online",this.os)}destroy(){J?.removeEventListener("online",this.os)}get Se(){return this._instance.config}get zr(){return this._instance.persistence}us(t){return this._instance.get_property(t)}hs(){var t,e;return(t=(e=this.zr)==null?void 0:e.Gt(this.Se.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}ds(){return!!this.hs()&&(this.ns||this.Kn||(this.ns=!0,mn.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}cs(){var t,e=(t=this.Se.evaluation_contexts)!==null&&t!==void 0?t:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(mn.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),e!=null&&e.length?e.filter((n=>{var a=n&&typeof n=="string"&&n.trim().length>0;return a||mn.error("Invalid evaluation context found:",n,"Expected non-empty string"),a})):[]}vs(){return this.cs().length>0}fs(){var t=this.Se.flag_keys;if(!be(t)){if(ct(t))return t.filter((e=>{var n=e&&typeof e=="string"&&e.trim().length>0;return n||mn.error("Invalid flag key found:",e,"Expected non-empty string"),n}));mn.error("Invalid flag_keys found:",t,"Expected array of non-empty strings")}}initialize(){var t,e,{config:n}=this._instance,a=(t=(e=n.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(a).length){var r,s,l=(r=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&r!==void 0?r:{},c=Object.keys(a).filter((h=>!!a[h])).reduce(((h,p)=>(h[p]=a[p]||!1,h)),{}),u=Object.keys(l).filter((h=>c[h])).reduce(((h,p)=>(l[p]&&(h[p]=l[p]),h)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(t,e,n){var a,r,s=n!=null&&n.merge&&(a=this.us(Ys))!==null&&a!==void 0?a:{},l=n!=null&&n.merge&&(r=this.us(up))!==null&&r!==void 0?r:{},c=fe({},s,t),u=fe({},l,e),h={};for(var[p,m]of Object.entries(c))h[p]={key:p,enabled:wP(m),variant:xP(m),reason:void 0,metadata:be(u?.[p])?void 0:{id:0,version:void 0,description:void 0,payload:u[p]}};this.receivedFeatureFlags({flags:h})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this.us(dy),e=this.us(bi),n=this.us(dl);if(!n&&!e)return t||{};var a=Bt({},t||{}),r=[...new Set([...Object.keys(n||{}),...Object.keys(e||{})])];for(var s of r){var l,c,u=a[s],h=e?.[s],p=be(h)?(l=u?.enabled)!==null&&l!==void 0&&l:!!h,m=be(h)?u.variant:typeof h=="string"?h:void 0,v=n?.[s],y=fe({},u,{enabled:p,variant:p?m??u?.variant:void 0});p!==u?.enabled&&(y.original_enabled=u?.enabled),m!==u?.variant&&(y.original_variant=u?.variant),v&&(y.metadata=fe({},u?.metadata,{payload:v,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),a[s]=y}return this.Jn||(mn.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:a}),this.Jn=!0),a}getAllFeatureFlags(){var t=this.getFlagVariants(),e=this.getFlagPayloads();return Object.keys(t).map((n=>{var a=t[n];return{key:n,enabled:wP(a),variant:xP(a),payload:kP(e[n])}}))}getFlagVariants(){var t=this.us(Ys),e=this.us(bi);if(!e)return t||{};for(var n=Bt({},t),a=Object.keys(e),r=0;a.length>r;r++)n[a[r]]=e[a[r]];return this.Jn||(mn.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var t=this.us(up),e=this.us(dl);if(!e)return t||{};for(var n=Bt({},t||{}),a=Object.keys(e),r=0;a.length>r;r++)n[a[r]]=e[a[r]];return this.Jn||(mn.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.ls()||this.ps||(this._instance.Ti.emit("featureFlagsReloading",!0),this.ps=setTimeout((()=>{this.gs()}),5))}ys(){clearTimeout(this.ps),this.ps=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.ps||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Xn=t}gs(t){var e;if(this.ys(),!this._instance.mr()&&!this.ls())if(this.Kn)this.es=!0;else{var n=this.Se.token,a=this.us(sf),r={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:fe({},((e=this.zr)==null?void 0:e.get_initial_props())||{},this.us(Gs)||{}),group_properties:this.us(qs),timezone:QE()};oa(a)||be(a)||(r.$device_id=a),(t!=null&&t.disableFlags||this.Se.advanced_disable_feature_flags)&&(r.disable_flags=!0),this.vs()&&(r.evaluation_contexts=this.cs());var s=this.fs();be(s)||(r.flag_keys=s);var l=!!this.Se.advanced_only_evaluate_survey_feature_flags,c=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Kn=!0,this._instance._send_request({method:"POST",url:c,data:r,compression:this.Se.disable_compression?void 0:Ha.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:u=>{var h,p,m,v=!0;if(this.bs(u.statusCode),u.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),v=!1),this.Kn=!1,!r.disable_flags||this.es){this.ts=!v;var y=[];u.error?u.error instanceof Error?y.push(u.error.name==="AbortError"?"timeout":"connection_error"):y.push("unknown_error"):u.statusCode!==200&&y.push("api_error_"+u.statusCode),(h=u.json)!=null&&h.errorsWhileComputingFlags&&y.push("errors_while_computing_flags");var b,x=!((p=u.json)==null||(p=p.quotaLimited)==null||!p.includes("feature_flags"));x&&y.push("quota_limited"),(m=this.zr)==null||m.register({[my]:y}),x?mn.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."):(r.disable_flags||this.receivedFeatureFlags((b=u.json)!==null&&b!==void 0?b:{},v,{partialResponse:l}),this.es&&(this.es=!1,this.gs()))}}})}}ls(){return WE(this.ss,3)}bs(t){this.ss=GE(t,this.ss,3,(()=>mn.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.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var a=this.getFeatureFlagResult(t,e);return(n=a?.variant)!==null&&n!==void 0?n:a?.enabled}}else mn.warn('getFeatureFlag for key "'+t+$v)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e?.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ds()){var n=this.getFlagVariants(),a=t in n,r=n[t],s=this.getFlagPayloads()[t],l=String(r),c=this.us(uy)||void 0,u=this.us(Bd)||void 0,h=this.us(xd)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var p,m=this._instance.get_session_id(),v=this.us(fy);m&&m!==v&&(h={},(p=this.zr)==null||p.register({[xd]:h,[fy]:m}))}if((e.send_event||!("send_event"in e))&&(!(t in h)||!h[t].includes(l))){var y,b,x,P,T,L,E,A,I,B;ct(h[t])?h[t].push(l):h[t]=[l],(y=this.zr)==null||y.register({[xd]:h});var D=this.getFeatureFlagDetails(t),S=[...(b=this.us(my))!==null&&b!==void 0?b:[]];be(r)&&S.push("flag_missing");var j={$feature_flag:t,$feature_flag_response:r,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((x=this.Se.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[t])||null,$feature_flag_bootstrapped_payload:((P=this.Se.bootstrap)==null||(P=P.featureFlagPayloads)==null?void 0:P[t])||null,$used_bootstrap_value:!this.ts};be(D==null||(T=D.metadata)==null?void 0:T.version)||(j.$feature_flag_version=D.metadata.version);var F,Z=(L=D==null||(E=D.reason)==null?void 0:E.description)!==null&&L!==void 0?L:D==null||(A=D.reason)==null?void 0:A.code;Z&&(j.$feature_flag_reason=Z),D!=null&&(I=D.metadata)!=null&&I.id&&(j.$feature_flag_id=D.metadata.id),be(D?.original_variant)&&be(D?.original_enabled)||(j.$feature_flag_original_response=be(D.original_variant)?D.original_enabled:D.original_variant),D!=null&&(B=D.metadata)!=null&&B.original_payload&&(j.$feature_flag_original_payload=D==null||(F=D.metadata)==null?void 0:F.original_payload),S.length&&(j.$feature_flag_error=S.join(",")),this._instance.capture("$feature_flag_called",j)}if(a)return{key:t,enabled:!!r,variant:typeof r=="string"?r:void 0,payload:kP(s)}}}else mn.warn('getFeatureFlagResult for key "'+t+$v)}getRemoteConfigPayload(t,e){var n=this.Se.token,a={distinct_id:this._instance.get_distinct_id(),token:n};this.vs()&&(a.evaluation_contexts=this.cs());var r=this.fs();be(r)||(a.flag_keys=r),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:a,compression:this.Se.disable_compression?void 0:Ha.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var l,c=(l=s.json)==null?void 0:l.featureFlagPayloads;e(c?.[t]||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,e);return be(n)?void 0:!!n}mn.warn('isFeatureEnabled for key "'+t+$v)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((e=>e!==t))}receivedFeatureFlags(t,e,n){if(this.zr){this.Yn=!0;var a=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,u,h,p,m){u===void 0&&(u={}),h===void 0&&(h={}),p===void 0&&(p={});var v=(S=>{var j=S.flags;return j?(S.featureFlags=Object.fromEntries(Object.keys(j).map((F=>{var Z;return[F,(Z=j[F].variant)!==null&&Z!==void 0?Z:j[F].enabled]}))),S.featureFlagPayloads=Object.fromEntries(Object.keys(j).filter((F=>j[F].enabled)).filter((F=>{var Z;return(Z=j[F].metadata)==null?void 0:Z.payload})).map((F=>{var Z;return[F,(Z=j[F].metadata)==null?void 0:Z.payload]})))):S.featureFlags&&mn.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),S})(l),y=v.flags,b=v.featureFlags,x=v.featureFlagPayloads;if(b){var P=l.requestId,T=l.evaluatedAt;if(ct(b)){mn.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var L={};if(b)for(var E=0;b.length>E;E++)L[b[E]]=!0;c&&c.register({[dp]:b,[Ys]:L})}else{var A=b,I=x,B=y;if(m!=null&&m.partialResponse)A=fe({},u,A),I=fe({},h,I),B=fe({},p,B);else if(l.errorsWhileComputingFlags)if(y){var D=new Set(Object.keys(y).filter((S=>{var j;return!((j=y[S])!=null&&j.failed)})));A=fe({},u,Object.fromEntries(Object.entries(A).filter((S=>{var[j]=S;return D.has(j)})))),I=fe({},h,Object.fromEntries(Object.entries(I||{}).filter((S=>{var[j]=S;return D.has(j)})))),B=fe({},p,Object.fromEntries(Object.entries(B||{}).filter((S=>{var[j]=S;return D.has(j)}))))}else A=fe({},u,A),I=fe({},h,I),B=fe({},p,B);c&&c.register(fe({[dp]:Object.keys(kS(A)),[Ys]:A||{},[up]:I||{},[dy]:B||{}},P?{[uy]:P}:{},T?{[Bd]:T}:{}))}}})(t,this.zr,a,r,s,n),e||(this.ns=!1),this._s(e)}}override(t,e){e===void 0&&(e=!1),mn.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this.zr)return mn.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this.zr.unregister(bi),this.zr.unregister(dl),this._s(),$s.info("All overrides cleared");if(ct(t)){var e=bS(t);return this.zr.register({[bi]:e}),this._s(),$s.info("Flag overrides set",{flags:t})}if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var n,a=t;if(this.Jn=!!((n=a.suppressWarning)!==null&&n!==void 0&&n),"flags"in a){if(a.flags===!1)this.zr.unregister(bi),$s.info("Flag overrides cleared");else if(a.flags){if(ct(a.flags)){var r=bS(a.flags);this.zr.register({[bi]:r})}else this.zr.register({[bi]:a.flags});$s.info("Flag overrides set",{flags:a.flags})}}return"payloads"in a&&(a.payloads===!1?(this.zr.unregister(dl),$s.info("Payload overrides cleared")):a.payloads&&(this.zr.register({[dl]:a.payloads}),$s.info("Payload overrides set",{payloads:a.payloads}))),void this._s()}if(t&&typeof t=="object")return this.zr.register({[bi]:t}),this._s(),$s.info("Flag overrides set",{flags:t});mn.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:t})}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Yn){var{flags:e,flagVariants:n}=this.ws();try{t(e,n)}catch(a){mn.error("Error while running feature flags callback",a)}}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,n){var a,r=(this.us(ld)||[]).find((u=>u.flagKey===t)),s={["$feature_enrollment/"+t]:e},l={$feature_flag:t,$feature_enrollment:e,$set:s};r&&(l.$early_access_feature_name=r.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=fe({},this.getFlagVariants(),{[t]:e});(a=this.zr)==null||a.register({[dp]:Object.keys(kS(c)),[Ys]:c}),this._s()}getEarlyAccessFeatures(t,e,n){e===void 0&&(e=!1);var a=this.us(ld),r=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(a&&!e)return t(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+r),method:"GET",callback:s=>{var l,c;if(s.json){var u=s.json.earlyAccessFeatures;return(l=this.zr)==null||l.unregister(ld),(c=this.zr)==null||c.register({[ld]:u}),t(u)}}})}ws(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter((n=>e[n])),flagVariants:Object.keys(e).filter((n=>e[n])).reduce(((n,a)=>(n[a]=e[a],n)),{})}}_s(t){var{flags:e,flagVariants:n}=this.ws();this.featureFlagEventHandlers.forEach((a=>{try{a(e,n,{errorsLoading:t})}catch(r){mn.error("Error while running feature flags callback",r)}}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(Gs)||{},a=t?.$set||(t!=null&&t.$set_once?{}:t),r=t?.$set_once,s={};if(r)for(var l in r)({}).hasOwnProperty.call(r,l)&&(l in n||(s[l]=r[l]));this._instance.register({[Gs]:fe({},n,s,a)}),e&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=fe({},this.us(Gs)||{});t.forEach((a=>{delete n[a]})),this._instance.register({[Gs]:n}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(t){t===void 0&&(t=!0),this._instance.unregister(Gs),t&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var n=this.us(qs)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((a=>{n[a]=fe({},n[a],t[a]),delete t[a]})),this._instance.register({[qs]:fe({},n,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this.us(qs)||{};this._instance.register({[qs]:fe({},e,{[t]:{}})})}else this._instance.unregister(qs)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.ys(),this.Jn=!1,this.ss=0}}},nK={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var t;return!((t=this.xs)==null||!t.isStarted)}get status(){var t,e;return this.ks===Xc||this.ks===$h?this.ks:(t=(e=this.xs)==null?void 0:e.status)!==null&&t!==void 0?t:this.ks}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.ks=pS,this.Ss=void 0,this._instance=t,!this._instance.sessionManager)throw mi.error("started without valid sessionManager"),new Error(Dy+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===xi)throw new Error(Dy+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Cs(){var t,e=!((t=this._instance.get_property(ao))==null||!t.enabled),n=!this.Se.disable_session_recording,a=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return J&&e&&n&&!a}startIfEnabledOrStop(t){var e;if(!this.Cs||(e=this.xs)==null||!e.isStarted){var n=!be(Object.assign)&&!be(Array.from);this.Cs&&n?(this.Is(t),mi.info("starting")):(this.ks=pS,this.stopRecording())}}Is(t){var e,n,a;this.Cs&&(this.ks!==Xc&&this.ks!==$h&&(this.ks=fS),Be!=null&&(e=Be.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(n=Be.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Ts(t):(a=Be.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.Es,(r=>{if(r)return mi.error("could not load recorder",r);this.Ts(t)})))}stopRecording(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.stop()}Ms(){var t,e;(t=this.Ss)==null||t.call(this),this.Ss=void 0,(e=this.xs)==null||e.discard()}Ps(){var t,e;(t=this.zr)==null||t.unregister(xb),(e=this.zr)==null||e.unregister(kE)}Rs(t,e){if(nt(t))return null;var n,a=Bn(t)?t:parseFloat(t);return typeof(n=a)!="number"||!Number.isFinite(n)||0>n||n>1?(mi.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null):a}Os(t){if(this.zr){var e,n,a=this.zr,r=()=>{var s,l=t.sessionRecording===!1?void 0:t.sessionRecording,c=this.Rs((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),u=this.Rs(l?.sampleRate,"remote config sampleRate"),h=c??u;nt(h)&&this.Ps();var p=l?.minimumDurationMilliseconds;a.register({[ao]:fe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:fe({capturePerformance:t.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:h,minimumDurationMilliseconds:be(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};r(),(e=this.Ss)==null||e.call(this),this.Ss=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(r)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.Os(t),void this.Ms()):(this.Os(t),void this.startIfEnabledOrStop()):(this.ks===Xc&&(this.ks=$h,mi.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.xs)!=null&&n.log?this.xs.log(t,e):mi.warn("log called before recorder was ready")}get Es(){var t,e,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ao);return(n==null||(e=n.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}Ls(){var t,e,n=this._instance.get_property(ao);if(!n)return!1;try{e=typeof n=="object"?n:JSON.parse(n)}catch(r){return mi.warn("persisted remote config for session recording is invalid and will be ignored",r),!1}var a=(t=e.cache_timestamp)!==null&&t!==void 0?t:Date.now();return 36e5>=Date.now()-a}Ts(t){var e,n;if((e=Be.__PosthogExtensions__)==null||!e.initSessionRecording)return mi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[AE]:!0});if(this.xs||(this.xs=(n=Be.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.xs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ls())return this.ks===$h||this.ks===Xc?void 0:(this.ks=Xc,mi.info("persisted remote config is stale, requesting fresh config before starting"),void new e6(this._instance).load());this.ks=fS,this.xs.start(t)}onRRwebEmit(t){var e;(e=this.xs)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.xs||(e=this.zr)==null||e.register({[xE]:!0}),(t=this.xs)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.xs||(e=this.zr)==null||e.register({[wE]:!0}),(t=this.xs)==null||t.overrideSampling()}overrideTrigger(t){var e,n;this.xs||(n=this.zr)==null||n.register({[t==="url"?PE:SE]:!0}),(e=this.xs)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.xs)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var n;return!((n=this.xs)==null||!n.tryAddCustomEvent(t,e))}}},aK={autocapture:class{constructor(t){this.Fs=!1,this.As=null,this.$s=!1,this.instance=t,this.rageclicks=new dS(t.config.rageclick),this.Ds=null}initialize(){this.startIfEnabled()}get Se(){var t,e,n=qt(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((a=>new RegExp(a))),n.url_ignorelist=(e=n.url_ignorelist)==null?void 0:e.map((a=>new RegExp(a))),n}Ns(){if(this.isBrowserSupported()){if(J&&we){var t=n=>{n=n||J?.event;try{this.qs(n)}catch(a){jv.error("Failed to capture event",a)}};if(Qt(we,"submit",t,{capture:!0}),Qt(we,"change",t,{capture:!0}),Qt(we,"click",t,{capture:!0}),this.Se.capture_copied_text){var e=n=>{n=n||J?.event;try{this.qs(n,Ov)}catch(a){jv.error("Failed to capture copy/cut event",a)}};Qt(we,"copy",e,{capture:!0}),Qt(we,"cut",e,{capture:!0})}}}else jv.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Fs&&(this.Ns(),this.Fs=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.$s=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[ay]:!!t.autocapture_opt_out}),this.As=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.Ds=t}getElementSelectors(t){var e,n=[];return(e=this.Ds)==null||e.forEach((a=>{var r=we?.querySelectorAll(a);r?.forEach((s=>{t===s&&n.push(a)}))})),n}get isEnabled(){var t,e,n=(t=this.instance.persistence)==null?void 0:t.props[ay];if(oa(this.As)&&!Hr(n)&&!this.instance.mr())return!1;var a=(e=this.As)!==null&&e!==void 0?e:!!n;return!!this.instance.config.autocapture&&!a}qs(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var n,a=Ev(t);IE(a)&&(a=a.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&BP(a,this.instance.config.rageclick)&&this.qs(t,"$rageclick");var r=e===Ov;if(a&&(function(m,v,y,b,x,P){var T,L,E,A,I,B;if(y===void 0&&(y=void 0),!J||Tb(m)||(T=y)!=null&&T.url_allowlist&&!zP(y.url_allowlist,P)||(L=y)!=null&&L.url_ignorelist&&zP(y.url_ignorelist,P))return!1;if((E=y)!=null&&E.dom_event_allowlist){var D=y.dom_event_allowlist;if(D&&!D.some((ee=>v.type===ee)))return!1}var{parentIsUsefulElement:S,targetElementList:j}=zE(m,b);if(!(function(ee,de){var ae=de?.element_allowlist;if(be(ae))return!0;var re,te=function(H){if(ae.some((Q=>H.tagName.toLowerCase()===Q)))return{v:!0}};for(var le of ee)if(re=te(le))return re.v;return!1})(j,y)||!wy(j,(A=y)==null?void 0:A.css_selector_allowlist)||wy(j,(I=(B=y)==null?void 0:B.css_selector_ignorelist)!==null&&I!==void 0?I:aq))return!1;try{var F=J.getComputedStyle(m);if(F&&F.getPropertyValue("cursor")==="pointer"&&v.type==="click")return!0}catch{}var Z=m.tagName.toLowerCase();switch(Z){case"html":return!1;case"form":return(x||["submit"]).indexOf(v.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(v.type)>=0;default:return S?(x||["click"]).indexOf(v.type)>=0:(x||["click"]).indexOf(v.type)>=0&&(Cb.indexOf(Z)>-1||m.getAttribute("contenteditable")==="true")}})(a,t,this.Se,r,r?["copy","cut"]:void 0,this.instance)){var{props:s,explicitNoCapture:l}=qq(a,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsChainAsString:this.$s,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(l)return!1;var c=this.getElementSelectors(a);if(c&&c.length>0&&(s.$element_selectors=c),e===Ov){var u,h=NE(J==null||(u=J.getSelection())==null?void 0:u.toString()),p=t.type||"clipboard";if(!h)return!1;s.$selected_content=h,s.$copy_type=p}return this.instance.capture(e,s),!0}}}isBrowserSupported(){return yr(we?.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.Bs=(J==null||(e=J.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(ye.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.js&&this.js(),this.js=void 0,ye.info("History API monitoring stopped")}monitorHistoryChanges(){J&&J.history&&(this.Hs("pushState"),this.Hs("replaceState"),this.Us())}Hs(t){var e;if(J&&((e=J.history[t])==null||!e.__posthog_wrapped__)){var n=this;(function(a,r,s){try{if(!(r in a))return uS;var l={next:a[r]},c=s((function(){for(var u=arguments.length,h=new Array(u),p=0;u>p;p++)h[p]=arguments[p];return l.next.apply(this,h)}));return yr(c)&&(c.prototype=c.prototype||{},Object.defineProperties(c,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:l}})),a[r]=c,()=>{if(a[r]!==c)for(var u=a[r];yr(u)&&u.__posthog_layer__;){var h=u.__posthog_layer__;if(h.next===c)return void(h.next=l.next);u=h.next}else a[r]=l.next}}catch{return uS}})(J.history,t,(a=>function(r,s,l){a.call(this,r,s,l),n.zs(t)}))}}zs(t){try{var e,n=J==null||(e=J.location)==null?void 0:e.pathname;if(!n)return;n!==this.Bs&&this.isEnabled&&this._instance.capture(ul,{navigation_type:t}),this.Bs=n}catch(a){ye.error("Error capturing "+t+" pageview",a)}}Us(){if(!this.js){var t=()=>{this.zs("popstate")};Qt(J,"popstate",t),this.js=()=>{J&&J.removeEventListener("popstate",t)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(t){var e;this.Vs=!1,this.Fs=!1,this.Ws=null,this.instance=t,this.Vs=!((e=this.instance.persistence)==null||!e.props[ry]),this.rageclicks=new dS(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return qt(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(t=this.Se.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return nt(this.Se.capture_heatmaps)?nt(this.Se.enable_heatmaps)?this.Vs:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Fs)return;Yq.info("starting..."),this.Gs(),this.ke()}else{var t;clearInterval((t=this.Ws)!==null&&t!==void 0?t:void 0),this.Zs(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ry]:e}),this.Vs=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.R;return this.R=void 0,t}Qs(t){this.fe(t.originalEvent,"deadclick")}ke(){this.Ws&&clearInterval(this.Ws),this.Ws=we?.visibilityState==="visible"?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Gs(){J&&we&&(this.Js=this.Lr.bind(this),Qt(J,uf,this.Js),this.Ys=t=>this.fe(t||J?.event),Qt(we,"click",this.Ys,{capture:!0}),this.Ks=t=>this.Xs(t||J?.event),Qt(we,"mousemove",this.Ks,{capture:!0}),this.eo=new HP(this.instance,uq,this.Qs.bind(this)),this.eo.startIfEnabledOrStop(),this.ro=this.ke.bind(this),Qt(we,df,this.ro),this.Fs=!0)}Zs(){var t;J&&we&&(this.Js&&J.removeEventListener(uf,this.Js),this.Ys&&we.removeEventListener("click",this.Ys,{capture:!0}),this.Ks&&we.removeEventListener("mousemove",this.Ks,{capture:!0}),this.ro&&we.removeEventListener(df,this.ro),clearTimeout(this.io),(t=this.eo)==null||t.stop(),this.Fs=!1)}no(t,e){var n=this.instance.scrollManager.scrollY(),a=this.instance.scrollManager.scrollX(),r=this.instance.scrollManager.scrollElement(),s=(function(l,c,u){for(var h=l;h&&gs(h)&&!Aa(h,"body");){if(h===u)return!1;var p=void 0;try{var m,v,y;p=(m=(v=(y=h.ownerDocument)==null?void 0:y.defaultView)!==null&&v!==void 0?v:J)==null?void 0:m.getComputedStyle(h).position}catch{return!1}if(Ke(c,p))return!0;h=OE(h)}return!1})(Ev(t),["fixed","sticky"],r);return{x:t.clientX+(s?0:a),y:t.clientY+(s?0:n),target_fixed:s,type:e}}fe(t,e){var n;if(e===void 0&&(e="click"),!jP(t.target)&&mS(t)){var a=this.no(t,e);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&BP(Ev(t),this.instance.config.rageclick)&&this.so(fe({},a,{type:"rageclick"})),this.so(a)}}Xs(t){!jP(t.target)&&mS(t)&&(clearTimeout(this.io),this.io=setTimeout((()=>{this.so(this.no(t,"mousemove"))}),500))}so(t){if(J){var e=this.Se.disable_capture_url_hashes?ms(J.location.href):J.location.href,n=this.Se.custom_personal_data_properties,a=this.Se.mask_personal_data_properties?[...zl,...n||[]]:[],r=Hd(e,a,Wd);this.R=this.R||{},this.R[r]||(this.R[r]=[]),this.R[r].push(t)}}Lr(){this.R&&!cs(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:HP,webVitalsAutocapture:class{constructor(t){var e;this.Vs=!1,this.Fs=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.oo=()=>{clearTimeout(this.ao),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce(((n,a)=>fe({},n,{["$web_vitals_"+a.name+"_event"]:fe({},a),["$web_vitals_"+a.name+"_value"]:a.value})),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.lo=n=>{var a;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.uo();if(!be(r))if(nt(n?.name)||nt(n?.value))Bs.error("Invalid metric received",n);else if(!this.ho||this.ho>n.value){this.R.url!==r&&(this.oo(),this.ao=setTimeout(this.oo,this.flushToCaptureTimeoutMs)),be(this.R.url)&&(this.R.url=r),this.R.firstMetricTimestamp=be(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var s=(a=this._instance.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0),l=fe({},n,{$current_url:r,timestamp:Date.now()});be(s)||(l.$session_id=s.sessionId,l.$window_id=s.windowId),this.R.metrics.push(l),this.R.metrics.length===this.allowedMetrics.length&&this.oo()}else Bs.error("Ignoring metric with value >= "+this.ho,n)},this.do=()=>{if(!this.Fs){var n,a,r,s,l=Be.__PosthogExtensions__;be(l)||be(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:a,onFCP:r,onINP:s}=l.postHogWebVitalsCallbacks),n&&a&&r&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.lo.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&a(this.lo.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&r(this.lo.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.lo.bind(this)),this.Fs=!0):Bs.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.Vs=!((e=this._instance.persistence)==null||!e.props[ly]),this.startIfEnabled()}get co(){return this._instance.config.capture_performance}get allowedMetrics(){var t,e,n=qt(this.co)?(t=this.co)==null?void 0:t.web_vitals_allowed_metrics:void 0;return nt(n)?((e=this._instance.persistence)==null?void 0:e.props[cy])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(qt(this.co)?this.co.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=qt(this.co)?this.co.web_vitals_attribution:void 0;return t!=null&&t}get ho(){var t=qt(this.co)&&Bn(this.co.__web_vitals_max_value)?this.co.__web_vitals_max_value:hS;return t>0&&6e4>=t?hS:t}get isEnabled(){var t=pn?.protocol;if(t!=="http:"&&t!=="https:")return Bs.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=qt(this.co)?this.co.web_vitals:Hr(this.co)?this.co:void 0;return Hr(e)?e:this.Vs}startIfEnabled(){this.isEnabled&&!this.Fs&&(Bs.info("enabled, starting..."),this.Mt(this.do))}onRemoteConfig(t){if("capturePerformance"in t){var e=qt(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=qt(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ly]:e}),this._instance.persistence.register({[cy]:n})),this.Vs=e,this.startIfEnabled()}}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(a=>{a?Bs.error("failed to load script",a):t()}))}uo(){var t=J?this._instance.config.disable_capture_url_hashes?ms(J.location.href):J.location.href:void 0;if(t){var e=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...zl,...e||[]]:[];return Hd(t,n,Wd)}Bs.error("Could not determine current URL")}}},rK={exceptionObserver:class{constructor(t){var e,n,a;this.do=()=>{var r;if(J&&this.isEnabled&&(r=Be.__PosthogExtensions__)!=null&&r.errorWrappingFunctions){var s=Be.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=Be.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=Be.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.vo&&this.Se.capture_unhandled_errors&&(this.vo=s(this.captureException.bind(this))),!this.fo&&this.Se.capture_unhandled_rejections&&(this.fo=l(this.captureException.bind(this))),!this.po&&this.Se.capture_console_errors&&(this.po=c(this.captureException.bind(this)))}catch(u){Jc.error("failed to start",u),this.mo()}}},this._instance=t,this.yo=!((e=this._instance.persistence)==null||!e.props[iy]),this.bo=new sG({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(a=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:10,refillInterval:1e4,Ae:Jc}),this.Se=this._o(),this.startIfEnabledOrStop()}_o(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qt(t)?e=fe({},e,t):(be(t)?this.yo:t)&&(e=fe({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Jc.info("enabled"),this.mo(),this.Mt(this.do)):this.mo()}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.errorWrappingFunctions?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(a=>{if(a)return Jc.error("failed to load script",a);t()}))}mo(){var t,e,n;(t=this.vo)==null||t.call(this),this.vo=void 0,(e=this.fo)==null||e.call(this),this.fo=void 0,(n=this.po)==null||n.call(this),this.po=void 0}onRemoteConfig(t){"autocaptureExceptions"in t&&(this.yo=!!t.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[iy]:this.yo}),this.Se=this._o(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this._o()}captureException(t){var e,n,a,r=(e=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&e!==void 0?e:"Exception";this.bo.consumeRateLimit(r)?Jc.info("Skipping exception capture because of client rate limiting.",{exception:r}):(a=this._instance.exceptions)==null||a.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,n;this.wo=[],this.xo=new wG([new RG,new FG,new DG,new LG,new jG,new OG,new MG,new zG],(function(a){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;r>l;l++)s[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var h=[],p=c.split(`
|
|
1245
1245
|
`),m=u;p.length>m;m++){var v=p[m];if(1024>=v.length){var y=IP.test(v)?v.replace(IP,"$1"):v;if(!y.match(/\S*Error: /)){for(var b of s){var x=b(y,a);if(x){h.push(x);break}}if(h.length>=50)break}}}return(function(P){if(!P.length)return[];var T=Array.from(P);return T.reverse(),T.slice(0,50).map((L=>{return fe({},L,{filename:L.filename||(E=T,E[E.length-1]||{}).filename,function:L.function||Ol});var E}))})(h)}})("web:javascript",CG,AG)),this._instance=t,this.wo=(e=(n=this._instance.persistence)==null?void 0:n.get_property(sy))!==null&&e!==void 0?e:[],this.ko=rf(this.So()),this.Co=new BG(this.ko)}onConfigChange(){this.ko=rf(this.So()),this.Co.setConfig(this.ko)}onRemoteConfig(t){var e,n,a;if("errorTracking"in t){var r=(e=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&e!==void 0?e:[],s=(a=t.errorTracking)==null?void 0:a.captureExtensionExceptions;this.wo=r,this._instance.persistence&&this._instance.persistence.register({[sy]:this.wo,[oy]:s})}}get Io(){var t,e=!!this._instance.get_property(oy),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.xo.buildFromUnknown(t,{syntheticException:e?.syntheticException,mechanism:{handled:e?.handled}})}addExceptionStep(t,e){if(this.ko.enabled)try{if(!Lt(t)||t.trim().length===0)return void gi.warn("Ignoring exception step because message must be a non-empty string");var n=this.To(e),{sanitizedProperties:a,droppedKeys:r}=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,u)=>UG.has(u)?(l.push(u),c):(c[u]=s[u],c)),{}),droppedKeys:l}})(n);r.length>0&&gi.warn("Ignoring reserved exception step fields",{droppedKeys:r}),this.Co.add(fe({[nf]:t,[af]:new Date().toISOString()},a))}catch(s){gi.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(t){try{var e=t.$exception_list;if(this.Eo(e)){if(this.Mo(e))return this.Po("Exception dropped: matched a suppression rule"),void gi.info("Skipping exception capture because a suppression rule matched");if(!this.Io&&this.Ro(e))return this.Po("Exception dropped: thrown by a browser extension"),void gi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Oo(e))return this.Po("Exception dropped: thrown by the PostHog SDK"),void gi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.ko.enabled&&nt(t.$exception_steps)?this.Lo(t):t;try{var a=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Zi:!0});return a&&this.Co.clear(),a}catch(r){return gi.error("Failed to capture exception event. Dropping this exception.",r),void this.Co.clear()}}catch(r){return void gi.error("Failed to process exception event. Ignoring this exception.",r)}}Lo(t){try{var e=this.Co.getAttachable();return e.length===0?t:fe({},t,{$exception_steps:e})}catch(n){return gi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),t}}Po(t){this.ko.enabled&&this.Co.add({[nf]:t,[af]:new Date().toISOString()})}To(t){return qt(t)?fe({},t):{}}So(){var t,e;return(t=(e=this._instance.config.error_tracking)==null?void 0:e.exception_steps)!==null&&t!==void 0?t:{}}Mo(t){if(t.length===0)return!1;var e=t.reduce(((n,a)=>{var{type:r,value:s}=a;return Lt(r)&&r.length>0&&n.$exception_types.push(r),Lt(s)&&s.length>0&&n.$exception_values.push(s),n}),{$exception_types:[],$exception_values:[]});return this.wo.some((n=>{var a=n.values.map((r=>{var s,l=u6[r.operator],c=ct(r.value)?r.value:[r.value],u=(s=e[r.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,u)}));return n.type==="OR"?a.some(Boolean):a.every(Boolean)}))}Ro(t){return t.flatMap((e=>{var n,a;return(n=(a=e.stacktrace)==null?void 0:a.frames)!==null&&n!==void 0?n:[]})).some((e=>e.filename&&e.filename.startsWith("chrome-extension://")))}Oo(t){if(t.length>0){var e,n,a,r,s=(e=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&e!==void 0?e:[],l=s[s.length-1];return(a=l==null||(r=l.filename)==null?void 0:r.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Eo(t){return!nt(t)&&ct(t)}}},iK=fe({productTours:class{get zr(){return this._instance.persistence}constructor(t){this.Fo=null,this.Ao=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if("productTours"in t){var e,n;if(this.zr&&this.zr.register({[wb]:!!t.productTours}),!Uv(this._instance))return!this.Fo&&nt((e=this.zr)==null?void 0:e.props[cd])||Fv.info("product tours disabled; stopping and clearing cached tours"),(n=this.Fo)==null||n.stop(),this.Fo=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Fo&&Uv(this._instance)&&this.Mt((()=>this.$o()))}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.generateProductTours?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(a=>{a?Fv.error("Could not load product tours script",a):t()}))}$o(){var t;!this.Fo&&(t=Be.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.Fo=Be.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!ct(this.Ao)||e){var n=this.zr;if(n){var a=n.props[cd];if(ct(a)&&!e)return this.Ao=a,void t(a,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:r=>{if(Uv(this._instance)){var s=r.statusCode;if(s!==200||!r.json){var l="Product Tours API could not be loaded, status: "+s;return Fv.error(l),void t([],{isLoaded:!1,error:l})}var c=ct(r.json.product_tours)?r.json.product_tours:[];this.Ao=c,n&&n.register({[cd]:c}),t(c,{isLoaded:!0})}else t([],{isLoaded:!0})}})}else t(this.Ao,{isLoaded:!0})}getActiveProductTours(t){nt(this.Fo)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.Fo.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Fo)==null||e.showTourById(t)}previewTour(t){this.Fo?this.Fo.previewTour(t):this.Mt((()=>{var e;this.$o(),(e=this.Fo)==null||e.previewTour(t)}))}dismissProductTour(){var t;(t=this.Fo)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.Fo)==null||t.nextStep()}previousStep(){var t;(t=this.Fo)==null||t.previousStep()}clearCache(){var t;this.Ao=null,(t=this.zr)==null||t.unregister(cd)}resetTour(t){var e;(e=this.Fo)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.Fo)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Fo)==null||e.cancelPendingTour(t)}}},Hf),sK={siteApps:class{constructor(t){this.Do=0,this._instance=t,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}qo(t,e){if(e){var n=this.globalsForEvent(e);this.No.push(n),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var t;return(t=Be._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.qo.bind(this));this.Bo=()=>{t(),this.No=[],this.Bo=void 0}}}globalsForEvent(t){var e,n,a,r,s,l,c;if(!t)throw new Error("Event payload is required");var u={},h=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[m,v]of Object.entries(p))u[m]={id:h[m],type:m,properties:v};var{$set_once:y,$set:b}=t;return{event:fe({},B4(t,Zq),{properties:fe({},t.properties,b?{$set:fe({},(e=(n=t.properties)==null?void 0:n.$set)!==null&&e!==void 0?e:{},b)}:{},y?{$set_once:fe({},(a=(r=t.properties)==null?void 0:r.$set_once)!==null&&a!==void 0?a:{},y)}:{}),elements_chain:(s=(l=t.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=t.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}jo(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)||(Mr.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)||(Mr.error("prepare_external_dependency_script returned null"),null):t}Ho(){var t,e,n,a,r,s,l,c;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var u=we?.defaultView,h=u==null||(t=u.Node)==null?void 0:t.prototype;if(!u||!h)return()=>{};if(this.Do++,this.Uo)return this.zo();var p=[],m=this,v=new WeakSet,y=(P,T,L)=>{if(P!=null&&P[T]){var E=P[T];P[T]=L(E),p.push((()=>{P[T]=E}))}},b=P=>{if(v.has(P))return P;var T=m.jo(P);return T&&v.add(T),T},x=P=>P.map((T=>typeof T=="string"?T:b(T))).filter((T=>!oa(T)));return y(h,"appendChild",(P=>function(T){var L=b(T);return L?P.call(this,L):T})),y(h,"insertBefore",(P=>function(T,L){var E=b(T);return E?P.call(this,E,L):T})),y(h,"replaceChild",(P=>function(T,L){var E=b(T);return E?P.call(this,E,L):L})),[(e=u.Element)==null?void 0:e.prototype,(n=u.Document)==null?void 0:n.prototype,(a=u.DocumentFragment)==null?void 0:a.prototype].forEach((P=>{y(P,"append",(T=>function(){for(var L=arguments.length,E=new Array(L),A=0;L>A;A++)E[A]=arguments[A];return T.apply(this,x(E))})),y(P,"prepend",(T=>function(){for(var L=arguments.length,E=new Array(L),A=0;L>A;A++)E[A]=arguments[A];return T.apply(this,x(E))}))})),[(r=u.Element)==null?void 0:r.prototype,(s=u.CharacterData)==null?void 0:s.prototype,(l=u.DocumentType)==null?void 0:l.prototype].forEach((P=>{y(P,"before",(T=>function(){for(var L=arguments.length,E=new Array(L),A=0;L>A;A++)E[A]=arguments[A];return T.apply(this,x(E))})),y(P,"after",(T=>function(){for(var L=arguments.length,E=new Array(L),A=0;L>A;A++)E[A]=arguments[A];return T.apply(this,x(E))})),y(P,"replaceWith",(T=>function(){for(var L=arguments.length,E=new Array(L),A=0;L>A;A++)E[A]=arguments[A];var I=x(E);return E.length&&!I.length?void 0:T.apply(this,I)}))})),y((c=u.Element)==null?void 0:c.prototype,"insertAdjacentElement",(P=>function(T,L){var E=b(L);return E?P.call(this,T,E):null})),this.Uo=()=>{p.forEach((P=>P())),this.Uo=void 0},this.zo()}zo(){var t=!1;return()=>{var e;t||(t=!0,this.Do--,this.Do===0&&((e=this.Uo)==null||e.call(this)))}}Vo(t,e){e===void 0&&(e=!0);var n=this.Ho();try{var a=t(n);return e&&n(),a}catch(r){throw n(),r}}setupSiteApp(t){var e=this.apps[t.id],n=()=>{var l;!e.errored&&this.No.length&&(Mr.info("Processing "+this.No.length+" events for site app with id "+t.id),this.No.forEach((c=>this.Vo((()=>e.processEvent==null?void 0:e.processEvent(c))))),e.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Bo)==null||l.call(this))},a=!1,r=l=>{e.errored=!l,e.loaded=!0,Mr.info("Site app with id "+t.id+" "+(l?"loaded":"errored")),a&&n()};try{var{processEvent:s}=this.Vo((l=>t.init({posthog:this._instance,callback(c){l(),r(c)}})),!1);s&&(e.processEvent=s),a=!0}catch(l){Mr.error(gS+t.id,l),r(!1)}if(a&&e.loaded)try{n()}catch(l){Mr.error("Error while processing buffered events PostHog app with config id "+t.id,l),e.errored=!0}}Wo(){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)}Go(t){var e=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(t),a=function(s){try{e.Vo((()=>s.processEvent==null?void 0:s.processEvent(n)))}catch(l){Mr.error("Error while processing event "+t.event+" for site app "+s.id,l)}};for(var r of Object.values(this.apps))a(r)}}onRemoteConfig(t){var e,n,a,r=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.Wo(),void this._instance.on("eventCaptured",(u=>this.Go(u)))):void Mr.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Bo)==null||n.call(this),(a=t.siteApps)!=null&&a.length)if(this.isEnabled){var s=function(u){var h;Be["__$$ph_site_app_"+u]=r._instance,(h=Be.__PosthogExtensions__)==null||h.loadSiteApp==null||h.loadSiteApp(r._instance,c,(p=>{if(p)return Mr.error(gS+u,p)}))};for(var{id:l,url:c}of t.siteApps)s(l)}else Mr.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},oK={tracingHeaders:class{constructor(t){this.Zo=void 0,this.Qo=void 0,this.Jo=void 0,this.do=()=>{var e,n,a=this.Yo();a?(be(this.Zo)&&(this.Zo=(e=Be.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null?void 0:e._patchXHR(a,(()=>this._instance.get_distinct_id()),this._instance.sessionManager)),be(this.Qo)&&(this.Qo=(n=Be.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(a,(()=>this._instance.get_distinct_id()),this._instance.sessionManager))):this.mo()},this._instance=t}initialize(){this.startIfEnabledOrStop()}Mt(t){var e,n;(e=Be.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns?t():(n=Be.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return Kq.error("failed to load script",a);t()}))}Ko(){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}Yo(){var t=this.Ko();return ct(t)?(ct(this.Jo)?this.Jo.splice(0,this.Jo.length,...t):this.Jo=[...t],t.length>0?this.Jo:void 0):(ct(this.Jo)&&this.Jo.splice(0),this.Jo=t||void 0,this.Jo)}mo(){var t,e;(t=this.Zo)==null||t.call(this),(e=this.Qo)==null||e.call(this),this.Zo=void 0,this.Qo=void 0}startIfEnabledOrStop(){this.Yo()?this.Mt(this.do):this.mo()}}},lK=fe({surveys:class{get Se(){return this._instance.config}constructor(t){this.Xo=void 0,this._surveyManager=null,this.ea=!1,this.ta=[],this.ra=null,this.ia=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this.Se.disable_surveys){var e=t.surveys;if(nt(e))return Rt.warn("Flags not loaded yet. Not loading surveys.");var n=ct(e);this.Xo=n?e.length>0:e,Rt.info("flags response received, isSurveysEnabled: "+this.Xo),this.loadIfEnabled()}}reset(){try{var t;(t=this._surveyEventReceiver)==null||t.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var e=[],n=0;n<localStorage.length;n++){var a=localStorage.key(n);(a!=null&&a.startsWith(Ly)||a!=null&&a.startsWith("inProgressSurvey_"))&&e.push(a)}e.forEach((r=>localStorage.removeItem(r)))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.ea)Rt.info("Already initializing surveys, skipping...");else if(this.Se.disable_surveys)Rt.info(vS);else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())Rt.info("Not loading surveys in cookieless mode without consent.");else{var t=Be?.__PosthogExtensions__;if(t){if(!be(this.Xo)||this.Se.advanced_enable_surveys){var e=this.Xo||this.Se.advanced_enable_surveys;this.ea=!0;try{var n=t.generateSurveys;if(n)return void this.na(n,e);var a=t.loadExternalDependency;if(!a)return void this.sa(by);a(this._instance,"surveys",(r=>{r||!t.generateSurveys?this.sa("Could not load surveys script",r):this.na(t.generateSurveys,e)}))}catch(r){throw this.sa("Error initializing surveys",r),r}finally{this.ea=!1}}}else Rt.error("PostHog Extensions not found.")}}na(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new Qq(this._instance),Rt.info("Surveys loaded successfully"),this.oa({isLoaded:!0})}sa(t,e){Rt.error(t,e),this.oa({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.ta.push(t),this._surveyManager&&this.oa({isLoaded:!0}),()=>{this.ta=this.ta.filter((e=>e!==t))}}getSurveys(t,e){if(e===void 0&&(e=!1),this.Se.disable_surveys)return Rt.info(vS),t([]);var n,a=this._instance.get_property(hy);if(a&&!e)return t(a,{isLoaded:!0}),void(this.aa()&&this.getSurveys((()=>{}),!0));typeof Promise<"u"&&this.ra?this.ra.then((r=>{var{surveys:s,context:l}=r;return t(s,l)})):(typeof Promise<"u"&&(this.ra=new Promise((r=>{n=r}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Se.token),method:"GET",timeout:this.Se.surveys_request_timeout_ms,callback:r=>{var s;this.ra=null;var l=r.statusCode;if(l!==200||!r.json){var c="Surveys API could not be loaded, status: "+l;Rt.error(c),this.ia=Date.now();var u={isLoaded:!1,error:c};return t([],u),void(n==null||n({surveys:[],context:u}))}this.ia=null;var h,p=r.json.surveys||[],m=p.filter((y=>(function(b){return!(!b.start_date||b.end_date)})(y)&&((function(b){var x;return!((x=b.conditions)==null||(x=x.events)==null||(x=x.values)==null||!x.length)})(y)||(function(b){var x;return!((x=b.conditions)==null||(x=x.actions)==null||(x=x.values)==null||!x.length)})(y))));m.length>0&&((h=this._surveyEventReceiver)==null||h.register(m)),(s=this._instance.persistence)==null||s.register({[hy]:p,[of]:Date.now()});var v={isLoaded:!0};t(p,v),n?.({surveys:p,context:v})}}))}aa(){return this.la()&&!this.ra&&!this.ua()}la(){var t=this._instance.get_property(of);return Bn(t)&&Date.now()-t>3e5}ua(){return Bn(this.ia)&&3e5>Date.now()-this.ia}markSurveyAsSeen(t,e){var n,a={id:t,current_iteration:(n=e?.iteration)!==null&&n!==void 0?n:null};p6(a);try{localStorage.setItem("lastSeenSurveyDate",new Date().toISOString())}catch{}}oa(t){for(var e of this.ta)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(n){Rt.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!nt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);Rt.warn("init was not called")}ha(t){var e=null;return this.getSurveys((n=>{var a;e=(a=n.find((r=>r.id===t)))!==null&&a!==void 0?a:null})),e}da(t){if(nt(this._surveyManager))return{eligible:!1,reason:Bv};var e=typeof t=="string"?this.ha(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(nt(this._surveyManager))return Rt.warn("init was not called"),{visible:!1,disabledReason:Bv};var e=this.da(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return nt(this._surveyManager)?(Rt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:Bv})):new Promise((n=>{this.getSurveys((a=>{var r,s=(r=a.find((c=>c.id===t)))!==null&&r!==void 0?r:null;if(s){var l=this.da(s);n({visible:l.eligible,disabledReason:l.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),e)}))}renderSurvey(t,e,n){var a;if(nt(this._surveyManager))Rt.warn("init was not called");else{var r=typeof t=="string"?this.ha(t):t;if(r!=null&&r.id)if(Fq.includes(r.type)){var s=we?.querySelector(e);if(s)return(a=r.appearance)!=null&&a.surveyPopupDelaySeconds?(Rt.info("Rendering survey "+r.id+" with delay of "+r.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Rt.info("Rendering survey "+r.id+" with delay of "+((l=r.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(r,s,n),Rt.info("Survey "+r.id+" rendered")}),1e3*r.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(r,s,n);Rt.warn("Survey element not found")}else Rt.warn("Surveys of type "+r.type+" cannot be rendered in the app");else Rt.warn("Survey not found")}}displaySurvey(t,e){var n;if(nt(this._surveyManager))Rt.warn("init was not called");else{var a=this.ha(t);if(a){var r=a;if((n=a.appearance)!=null&&n.surveyPopupDelaySeconds&&e.ignoreDelay&&(r=fe({},a,{appearance:fe({},a.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==Py.Popover&&e.initialResponses&&Rt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var s=this.canRenderSurvey(a);if(!s.visible)return void Rt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}e.displayType!==Py.Inline?this._surveyManager.handlePopoverSurvey(r,e):this.renderSurvey(r,e.selector,e.properties)}else Rt.warn("Survey not found")}}cancelPendingSurvey(t){nt(this._surveyManager)?Rt.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}},Hf),cK={toolbar:class{constructor(t){this.instance=t}ca(t){Be.ph_toolbar_state=t}va(){var t;return(t=Be.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),RE(this.instance.config)||!J||!we)return!1;t=t??J.location,n=n??J.history;try{if(!e){try{J.localStorage.setItem("test","test"),J.localStorage.removeItem("test")}catch{return!1}e=J?.localStorage}var a,r=eK||ff(t.hash,"__posthog")||ff(t.hash,"state"),s=r?NP((()=>JSON.parse(atob(decodeURIComponent(r)))))||NP((()=>JSON.parse(decodeURIComponent(r)))):null;return s&&s.action==="ph_authorize"?((a=s).source="url",a&&Object.keys(a).length>0&&(s.desiredHash?t.hash=s.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((a=JSON.parse(e.getItem(_S)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}fa(t){var e=Be.ph_load_toolbar||Be.ph_load_editor;!nt(e)&&yr(e)?e(t,this.instance):yS.warn("No toolbar load function found")}loadToolbar(t){var e=!(we==null||!we.getElementById(CE));if(!J||e)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=fe({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(J.localStorage.setItem(_S,JSON.stringify(fe({},a,{source:void 0}))),this.va()===2)this.fa(a);else if(this.va()===0){var r;this.ca(1),(r=Be.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return yS.error("[Toolbar] Failed to load",s),void this.ca(0);this.ca(2),this.fa(a)})),Qt(J,"turbolinks:load",(()=>{this.ca(0),this.loadToolbar(a)}))}return!0}pa(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)}}},dK=fe({experiments:Zn},Hf),uK=fe({},Hf,nK,aK,rK,iK,sK,lK,oK,cK,dK,{conversations:class{constructor(t){this.ga=void 0,this._conversationsManager=null,this.ma=!1,this.ya=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var e=t.conversations;nt(e)||(Hr(e)?this.ga=e:(this.ga=e.enabled,this.ya=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.ga=void 0,this.ya=null}loadIfEnabled(){if(!(this._conversationsManager||this.ma||this._instance.config.disable_conversations||RE(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=Be?.__PosthogExtensions__;if(t&&!be(this.ga)&&this.ga)if(this.ya&&this.ya.token){this.ma=!0;try{var e=t.initConversations;if(e)return this.ba(e),void(this.ma=!1);var n=t.loadExternalDependency;if(!n)return void this._a(by);n(this._instance,"conversations",(a=>{a||!t.initConversations?this._a("Could not load conversations script",a):this.ba(t.initConversations),this.ma=!1}))}catch(a){this._a("Error initializing conversations",a),this.ma=!1}}else Ua.error("Conversations enabled but missing token in remote config.")}}ba(t){if(this.ya)try{this._conversationsManager=t(this.ya,this._instance),Ua.info("Conversations loaded successfully")}catch(e){this._a("Error completing conversations initialization",e)}else Ua.error("Cannot complete initialization: remote config is null")}_a(t,e){Ua.error(t,e),this._conversationsManager=null,this.ma=!1}show(){this._conversationsManager?this._conversationsManager.show():Ua.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.ga===!0&&!oa(this._conversationsManager)}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,n){var a=this;return _n((function*(){return a._conversationsManager?a._conversationsManager.sendMessage(t,e,n):(Ua.warn(Vs),null)}))()}getMessages(t,e){var n=this;return _n((function*(){return n._conversationsManager?n._conversationsManager.getMessages(t,e):(Ua.warn(Vs),null)}))()}markAsRead(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(Ua.warn(Vs),null)}))()}getTickets(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(Ua.warn(Vs),null)}))()}requestRestoreLink(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(Ua.warn(Vs),null)}))()}restoreFromToken(t){var e=this;return _n((function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(Ua.warn(Vs),null)}))()}restoreFromUrlToken(){var t=this;return _n((function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(Ua.warn(Vs),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}en(){var t;(t=this._conversationsManager)==null||t.setIdentity()}tn(){var t;(t=this._conversationsManager)==null||t.clearIdentity()}}},{logs:class{constructor(t){var e;this.wa=!1,this.xa=!1,this.Ae=tn("[logs]"),this._r=[],this.ka=[],this.ss=0,this.Sa=()=>{var n,a;this.ss=0,(n=this.Ca)==null||n.onReconnect(),(a=this.Ia)==null||a.onReconnect()},this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.wa=!0),J&&Qt(J,"online",this.Sa)}Ta(t,e,n,a){var r,s=(function(l,c){var u,h,p,m,v,y,b,x=(u=l?.flushIntervalMs)!==null&&u!==void 0?u:3e3,P=(h=l?.maxBufferSize)!==null&&h!==void 0?h:100,T=c!=null&&c.consoleCapture?void 0:(p=l?.maxLogsPerInterval)!==null&&p!==void 0?p:1e3,L=be(T)?Math.max(P,2048):Math.max(P,T),E=l?.resourceAttributes;return{serviceName:(m=(v=E?.["service.name"])!==null&&v!==void 0?v:l?.serviceName)!==null&&m!==void 0?m:c?.serviceNameDefault,serviceVersion:(y=E?.["service.version"])!==null&&y!==void 0?y:l?.serviceVersion,environment:(b=E?.["deployment.environment"])!==null&&b!==void 0?b:l?.environment,resourceAttributes:E,beforeSend:l?.beforeSend,flushIntervalMs:x,maxBufferSize:P,maxQueueSize:L,maxBatchRecordsPerPost:100,rateCapWindowMs:x,maxLogsPerInterval:T,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}})((r=this._instance)==null||(r=r.config)==null?void 0:r.logs,n);return[new bG(this.Ea(t,e),s,this.Ae,(()=>this.Ma()),(l=>l()),void 0,a),s]}Pa(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;return this.Ca&&this.Ra===n||((e=this.Ca)==null||e.reset(),this.Ra=n,[this.Ca,this.Oa]=this.Ta((()=>this._r),(a=>{this._r=a}))),this.Ca}La(){var t,e,n=(t=this._instance)==null||(t=t.config)==null?void 0:t.logs;return this.Ia&&this.Fa===n||((e=this.Ia)==null||e.reset(),this.Fa=n,[this.Ia,this.Aa]=this.Ta((()=>this.ka),(a=>{this.ka=a}),{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},xS)),this.Ia}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e,n=(e=t.logs)==null?void 0:e.captureConsoleLogs;!nt(n)&&n&&(this.wa=!0,this.loadIfEnabled())}reset(){var t,e;this._r=[],(t=this.Ca)==null||t.reset(),this.ka=[],(e=this.Ia)==null||e.reset(),this.ss=0}captureLog(t){this.Pa().captureLog(t)}le(t){this.La().captureLog(t)}get logger(){return this.$a||(this.$a={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.$a}flushLogs(t){t?this.Da(t):(this.Ca&&this.Ca.flush().catch((e=>this.Ae.error("PostHog logs flush failed:",e))),this.Ia&&this.Ia.flush().catch((e=>this.Ae.error("PostHog logs flush failed:",e))))}loadIfEnabled(){if(this.wa&&!this.xa){var t=Be?.__PosthogExtensions__;if(t){var e=t.loadExternalDependency;e?e(this._instance,"logs",(n=>{var a;n||(a=t.logs)==null||!a.initializeLogs?this.Ae.error("Could not load logs script",n):(t.logs.initializeLogs(this._instance),this.xa=!0)})):this.Ae.error(by)}else this.Ae.error("PostHog Extensions not found.")}}Ea(t,e){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:a=>a===ki.LogsQueue?t():void 0,setPersistedProperty(a,r){var s;a===ki.LogsQueue&&e((s=r)!==null&&s!==void 0?s:[])},ht:a=>this.ht(a),getLibraryId:()=>on.LIB_NAME,getLibraryVersion:()=>on.LIB_VERSION}}ht(t){return new Promise((e=>{if(WE(this.ss,3))e({kind:"fatal",error:new Error("logs endpoint is unreachable, dropping batch")});else{var n=!1,a=s=>{n||(n=!0,clearTimeout(r),e(s))},r=setTimeout((()=>a({kind:"retry-later",error:new Error("logs request timed out")})),9e4);this._instance._send_request({method:"POST",url:this.Na(),data:t,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback:s=>{var l=s.statusCode;if(this.qa(l),l>=200&&300>l)a({kind:"ok"});else if(l===413)a({kind:"too-large"});else if(l!==0&&l!==429&&500>l)a({kind:"fatal",error:new Error("logs request failed with status "+l)});else{var c;a({kind:"retry-later",error:(c=s.error)!==null&&c!==void 0?c:new Error("logs request failed with status "+l)})}}})}}))}qa(t){(t!==0||this._instance.__loaded)&&(this.ss=GE(t,this.ss,3,(()=>this.Ae.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."))))}Da(t){this._r.length>0&&this.Ba(t,this._r,this.Oa,on.LIB_NAME,(e=>{this._r=e})),this.ka.length>0&&this.Ba(t,this.ka,this.Aa,xS,(e=>{this.ka=e}))}Ba(t,e,n,a,r){if(e.length!==0){var s=e.map((c=>c.record));r([]);var l=gE(s,mE(n,on.LIB_NAME,on.LIB_VERSION),a,on.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Na(),data:l,compression:"best-available",batchKey:"logs",transport:t})}}Na(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}Ma(){var t,e={};if(e.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n,windowId:a,sessionStartTimestamp:r,lastActivityTimestamp:s}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);e.sessionId=n,e.windowId=a,nt(r)||(e.sessionStartTimestamp=r),nt(s)||(e.lastActivityTimestamp=s)}if(Be!=null&&(t=Be.location)!=null&&t.href&&(e.currentUrl=this._instance.config.disable_capture_url_hashes?ms(Be.location.href):Be.location.href),this._instance.featureFlags){var l=this._instance.featureFlags.getFlags();l&&l.length>0&&(e.activeFeatureFlags=l)}return e}}});Wa.__defaultExtensionClasses=fe({},uK);var PS=(function(){on.SDK_DIST_CHANNEL="npm";var t=Cd[hl]=new Wa;return(function(){function e(){e.done||(e.done=!0,m6=!1,Mt(Cd,(function(n){n._dom_loaded()})))}we!=null&&we.addEventListener?we.readyState==="complete"?e():Qt(we,"DOMContentLoaded",e,{capture:!1}):J&&ye.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),t})();const hK="phc_nXhUfFbyrW9gNvp8iBL83eWPUhAuAYJgcgqUJxwUbBgj",pK="https://us.i.posthog.com";function fK(){if(typeof window>"u")return"web";if(Ga())return"mac-app";if(Df())return"win-app";const t=window.location.hostname;return t==="localhost"||t==="127.0.0.1"?"cli-localhost":"web"}function SS(t){PS.init(hK,{api_host:pK,capture_pageview:"history_change",autocapture:!1,disable_session_recording:!0,respect_dnt:!0,persistence:"localStorage"}),PS.register({shell:t})}function mK(){if(!(typeof window>"u"))try{const t=fK();if(t==="web"){SS(t);return}fetch("/functions/tokentracker-telemetry-pref").then(e=>e.ok?e.json():null).then(e=>{e&&e.disabled===!1&&SS(t)}).catch(()=>{})}catch{}}mK();const gK=gL([{path:"*",element:R.jsx(YW,{})}]);rR.createRoot(document.getElementById("root")).render(R.jsx(Sl.StrictMode,{children:R.jsx(U9,{children:R.jsx(q9,{children:R.jsx(s9,{children:R.jsx(o9,{children:R.jsx(EL,{router:gK})})})})})}));export{Df as $,FK as A,uY as B,XK as C,gC as D,xe as E,Xh as F,jK as G,OK as H,Ld as I,Up as J,BK as K,Pf as L,G0 as M,sO as N,xY as O,$t as P,NK as Q,Sl as R,hV as S,eY as T,TK as U,CK as V,_5 as W,v0 as X,P$ as Y,GC as Z,bo as _,bn as a,MC as a$,QK as a0,l$ as a1,hY as a2,$N as a3,In as a4,IK as a5,t9 as a6,eu as a7,f$ as a8,ss as a9,EY as aA,PK as aB,WK as aC,$l as aD,VK as aE,Lf as aF,rO as aG,S$ as aH,RZ as aI,QN as aJ,rY as aK,vK as aL,iM as aM,b0 as aN,_0 as aO,Tp as aP,gx as aQ,HK as aR,VC as aS,$C as aT,MK as aU,Ll as aV,Lp as aW,RC as aX,LC as aY,DC as aZ,IC as a_,wY as aa,ZK as ab,zK as ac,kM as ad,EK as ae,AK as af,AZ as ag,JK as ah,DK as ai,pY as aj,$K as ak,qK as al,u$ as am,CY as an,TY as ao,G5 as ap,Y2 as aq,SY as ar,_a as as,Bl as at,p$ as au,Ep as av,mb as aw,AW as ax,W_ as ay,cM as az,SK as b,cZ as b$,YN as b0,EZ as b1,Ga as b2,fd as b3,vY as b4,mY as b5,Q5 as b6,iu as b7,Ka as b8,Jl as b9,OY as bA,FY as bB,zY as bC,X0 as bD,jd as bE,WV as bF,mo as bG,rb as bH,br as bI,a4 as bJ,to as bK,no as bL,tZ as bM,XY as bN,Ai as bO,_Z as bP,NV as bQ,vZ as bR,wZ as bS,kZ as bT,uZ as bU,aW as bV,fr as bW,SZ as bX,mv as bY,lZ as bZ,cH as b_,Zl as ba,eW as bb,MV as bc,lP as bd,cb as be,eo as bf,Ei as bg,dZ as bh,_4 as bi,rW as bj,gZ as bk,jH as bl,MH as bm,pV as bn,LY as bo,AY as bp,UY as bq,BY as br,$Y as bs,JN as bt,RY as bu,DY as bv,IY as bw,jY as bx,MY as by,NY as bz,kn as c,Op as c$,pZ as c0,bd as c1,TZ as c2,mZ as c3,OH as c4,LH as c5,fs as c6,G9 as c7,d0 as c8,gY as c9,KY as cA,YY as cB,ZY as cC,JY as cD,tH as cE,l4 as cF,VY as cG,hZ as cH,i4 as cI,RV as cJ,yZ as cK,QV as cL,PZ as cM,fZ as cN,sb as cO,CZ as cP,bZ as cQ,_Y as cR,kY as cS,yY as cT,bY as cU,Xd as cV,_O as cW,Uz as cX,Cn as cY,BT as cZ,Nt as c_,fY as ca,HV as cb,eH as cc,OV as cd,aP as ce,Uf as cf,jV as cg,B_ as ch,t4 as ci,HY as cj,UV as ck,WY as cl,wr as cm,e4 as cn,GY as co,$V as cp,BV as cq,E4 as cr,aZ as cs,nZ as ct,rZ as cu,iZ as cv,sZ as cw,wl as cx,xZ as cy,o4 as cz,mM as d,lj as d0,JO as d1,oj as d2,eT as d3,CT as d4,Ra as d5,Id as d6,U0 as d7,Iz as d8,nF as d9,YK as dA,GK as dB,Yr as dC,Zz as da,Oz as db,PF as dc,OT as dd,Il as de,Fp as df,sj as dg,y0 as dh,ps as di,zx as dj,qY as dk,Kp as dl,sW as dm,ob as dn,iW as dp,NH as dq,dH as dr,oZ as ds,lH as dt,QY as du,eZ as dv,ib as dw,sP as dx,ub as dy,KK as dz,dY as e,Ot as f,vC as g,iY as h,Un as i,R as j,RM as k,LM as l,yd as m,oY as n,tY as o,LK as p,UK as q,k as r,lY as s,nY as t,cB as u,cY as v,aY as w,RK as x,Kt as y,sY as z};
|