vendor: 4,150 bytes, lines 1-2
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Index-DLf1dyl-.js","assets/audience-presets-BzG7fYsQ.js","assets/wand-sparkles-CqyNPuin.js","assets/lightbulb-CQfwAI4X.js","assets/message-square-C8rg7zWz.js","assets/diagnosis-findings-CqUy9fmo.js","assets/report-qa-BqLJeMRX.js","assets/share-2-BRcE5BzD.js","assets/copy-q8U8Nw7W.js","assets/send-BzrHhqdO.js","assets/textarea-qYbQ7l9N.js","assets/BrandProfileEditor-Cp8B2i6T.js","assets/trash-2-BcpRJ2AL.js","assets/plus-DfQ5ZUn4.js","assets/use-theme-GHz9ExbZ.js","assets/sun-_S95CTvg.js","assets/arrow-left-CZ27GFxq.js","assets/book-open-D_hGwOqK.js","assets/list-U4_fNM4J.js","assets/minus-b9Z8p4tW.js","assets/composer-asset-B2yJNrEH.js","assets/trending-down--hx7wGvs.js","assets/work-context-CpdKjtVO.js","assets/use-brand-profiles-BhGXxN34.js","assets/progress-rm4iflDQ.js","assets/link-CgJ0mgTx.js","assets/eye-oVG2_fbt.js","assets/brand-drift-Cl51nCoS.js","assets/calendar-BKNXgi0b.js","assets/megaphone-hR1J6cd0.js","assets/award-D3H9-_JY.js","assets/chevron-down-CxZl0YU8.js","assets/Dashboard-B4Rgh2Kc.js","assets/activity-qWRmnpaI.js","assets/format-QYTbuQ-l.js","assets/parseISO-B6WOAkU-.js","assets/clock-DzJjljJM.js","assets/Claim-DG26axCn.js","assets/archive-Ctzdfbdc.js","assets/Analytics-kBxuZhmy.js","assets/Strategy-ifI8w8Cq.js","assets/ConfidenceBadge-6vtgW72w.js","assets/link-2-dH9oFIxo.js","assets/chevron-up-CKR1K-Xb.js","assets/run-meter-ux-BMC9nY3O.js","assets/compass-CKhwCCK2.js","assets/arrow-up-right-Kz86cU9H.js","assets/arrow-down-right-BPBgiwao.js","assets/globe-zTOOlU6I.js","assets/tabs-DCPd9NRa.js","assets/index-B6EJG7xU.js","assets/file-down-XQsP816Y.js","assets/sheet-B08SY-Nd.js","assets/index-CfA_ZSKz.js","assets/index-D95Dm1ms.js","assets/shield-BRc8Z5pf.js","assets/download-JWLnTCSD.js","assets/briefcase-Dpr0X9FT.js","assets/grid-3x3-C9ZHYrzH.js","assets/building-2-DqhMrtAG.js","assets/AudiencePersonaCard-B3KeKelU.js","assets/circle-check-BQ6NcKx6.js","assets/calendar-clock-Co1liGkt.js","assets/shield-check-CLywzTCg.js","assets/dollar-sign-CmGrrqa9.js","assets/quote-WDxh1A5p.js","assets/SharedScorecard-BZan4Iv3.js","assets/watch-scores-BpcmzPm4.js","assets/trophy-DTeF2T87.js","assets/flame-CrDyI-bY.js","assets/SharedDiagnosis-D-XkIIVZ.js","assets/Twin-9MA3gWic.js","assets/pencil-C4uiWvsP.js","assets/NarrativeMap-c5eEiG7Z.js","assets/HookTester-Bihd7E3h.js","assets/badge-B1bsGkMV.js","assets/Calendar-B-y2pwiP.js","assets/select-Cy7zxFG7.js","assets/index-D8Atq7ZJ.js","assets/PaymentSuccess-6srxD59u.js","assets/Settings-CCTZl1aJ.js","assets/useQuery-Do0hPf_r.js","assets/Enterprise-DHonKa6r.js","assets/PublicFooter-3aFlpo9Q.js","assets/Investors-D_mMSEC5.js","assets/Agencies-DYMk_eQx.js","assets/SignalIndex-CpOSNy0C.js","assets/IndexFooter-t3UiiF6H.js","assets/ScoreBar-D7HAxxow.js","assets/RadarChart-C-unB-op.js","assets/use-index-data-gFOF5pHZ.js","assets/use-meta-tags-CgE-PDwg.js","assets/AnnualReport-Cjy5oYOk.js","assets/Rankings-Cl9eOTyS.js","assets/arrow-left-right-BeKTuVJQ.js","assets/About-D025FvSq.js","assets/CompanyProfile-Cp1r6gLw.js","assets/CompareCompanies-CW1cK6wp.js","assets/html2canvas.esm-CBrSDip1.js","assets/PrivateReport-0Cfmx60g.js","assets/AdminReports-D9maeY1w.js","assets/circle-x-LcgdhcY4.js","assets/RevenueCommandCenter-Y3KUoli5.js","assets/Launch-Bi0JzmQm.js","assets/Analyze-C6MDc741.js","assets/BatchAudit-Cj8Q7odv.js","assets/StartupSignalReport-C--XF-yU.js","assets/Pricing-YbLameyw.js","assets/ClinicalTrials-Bm6mX7z5.js","assets/IndustryLanding-hBQapSd5.js","assets/PreLaunch-BzzJ_fgU.js","assets/Privacy-DhNIrCeW.js","assets/Terms-Bv75a_Wb.js"])))=>i.map(i=>d[i]); 2var qE=Object.defineProperty;var eg=e=>{throw TypeError(e)};var YE=(e,t,n)=>t in e?qE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Wu=(e,t,n)=>YE(e,typeof t!="symbol"?t+"":t,n),Hu=(e,t,n)=>t.has(e)||eg("Cannot "+n);var j=(e,t,n)=>(Hu(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>t.has(e)?eg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(Hu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Je=(e,t,n
vendor: 5,460 bytes, lines 2-10
2)=>(Hu(e,t,"access private method"),n);var Ha=(e,t,n,r)=>({set _(s){ee(e,t,s,n)},get _(){return j(e,t,r)}});function QE(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var dF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yw={exports:{}},Xc={},vw={exports:{}},re={};/** 3 * @license React 4 * react.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var Pa=Symbol.for("react.element"),JE=Symbol.for("react.portal"),XE=Symbol.for("react.fragment"),ZE=Symbol.for("react.strict_mode"),ek=Symbol.for("react.profiler"),tk=Symbol.for("react.provider"),nk=Symbol.for("react.context"),rk=Symbol.for("react.forward_ref"),sk=Symbol.for("react.suspense"),ik=Symbol.for("react.memo"),ok=Symbol.for("react.lazy"),tg=Symbol.iterator;function ak(e){return e===null||typeof e!="object"?null:(e=tg&&e[tg]||e["@@iterator"],typeof e=="function"?e:null)}var ww={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xw=Object.assign,bw={};function $i(e,t,n){this.props=e,this.context=t,this.refs=bw,this.updater=n||ww}$i.prototype.isReactComponent={};$i.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _w(){}_w.prototype=$i.prototype;function Kf(e,t,n){this.props=e,this.context=t,this.refs=bw,this.updater=n||ww}var Gf=Kf.prototype=new _w;Gf.constructor=Kf;xw(Gf,$i.prototype);Gf.isPureReactComponent=!0;var ng=Array.isArray,Sw=Object.prototype.hasOwnProperty,qf={current:null},Ew={key:!0,ref:!0,__self:!0,__source:!0};function kw(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Sw.call(t,r)&&!Ew.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Pa,type:e,key:i,ref:o,props:s,_owner:qf.current}}function lk(e,t){return{$$typeof:Pa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Yf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pa}function ck(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var rg=/\/+/g;function Ku(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ck(""+e.key):t.toString(36)}function jl(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Pa:case JE:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Ku(o,0):r,ng(s)?(n="",e!=null&&(n=e.replace(rg,"$&/")+"/"),jl(s,t,n,"",function(c){return c})):s!=null&&(Yf(s)&&(s=lk(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(rg,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",ng(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Ku(i,a);o+=jl(i,t,n,l,s)}else if(l=ak(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ku(i,a++),o+=jl(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ka(e,t,n){if(e==null)return e;var r=[],s=0;return jl(e,r,"","",function(i){return t.call(n,i,s++)}),r}function uk(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},Nl={transition:null},dk={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:Nl,ReactCurrentOwner:qf};function Tw(){throw Error("act(...) is not supported in production builds of React.")}
vendor: 7,457 bytes, lines 10-26
10re.Children={map:Ka,forEach:function(e,t,n){Ka(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ka(e,function(){t++}),t},toArray:function(e){return Ka(e,function(t){return t})||[]},only:function(e){if(!Yf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=$i;re.Fragment=XE;re.Profiler=ek;re.PureComponent=Kf;re.StrictMode=ZE;re.Suspense=sk;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dk;re.act=Tw;re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=xw({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=qf.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Sw.call(t,l)&&!Ew.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Pa,type:e.type,key:s,ref:i,props:r,_owner:o}};re.createContext=function(e){return e={$$typeof:nk,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:tk,_context:e},e.Consumer=e};re.createElement=kw;re.createFactory=function(e){var t=kw.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:rk,render:e}};re.isValidElement=Yf;re.lazy=function(e){return{$$typeof:ok,_payload:{_status:-1,_result:e},_init:uk}};re.memo=function(e,t){return{$$typeof:ik,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Nl.transition;Nl.transition={};try{e()}finally{Nl.transition=t}};re.unstable_act=Tw;re.useCallback=function(e,t){return dt.current.useCallback(e,t)};re.useContext=function(e){return dt.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};re.useEffect=function(e,t){return dt.current.useEffect(e,t)};re.useId=function(){return dt.current.useId()};re.useImperativeHandle=function(e,t,n){return dt.current.useImperativeHandle(e,t,n)};re.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return dt.current.useMemo(e,t)};re.useReducer=function(e,t,n){return dt.current.useReducer(e,t,n)};re.useRef=function(e){return dt.current.useRef(e)};re.useState=function(e){return dt.current.useState(e)};re.useSyncExternalStore=function(e,t,n){return dt.current.useSyncExternalStore(e,t,n)};re.useTransition=function(){return dt.current.useTransition()};re.version="18.3.1";vw.exports=re;var x=vw.exports;const I=gw(x),Cw=QE({__proto__:null,default:I},[x]);/** 11 * @license React 12 * react-jsx-runtime.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var hk=x,fk=Symbol.for("react.element"),pk=Symbol.for("react.fragment"),mk=Object.prototype.hasOwnProperty,gk=hk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yk={key:!0,ref:!0,__self:!0,__source:!0};function Pw(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)mk.call(t,r)&&!yk.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:fk,type:e,key:i,ref:o,props:s,_owner:gk.current}}Xc.Fragment=pk;Xc.jsx=Pw;Xc.jsxs=Pw;yw.exports=Xc;var d=yw.exports,Aw={exports:{}},Nt={},Rw={exports:{}},jw={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(C,A){var M=C.length;C.push(A);e:for(;0<M;){var q=M-1>>>1,H=C[q];if(0<s(H,A))C[q]=A,C[M]=H,M=q;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var A=C[0],M=C.pop();if(M!==A){C[0]=M;e:for(var q=0,H=C.length,te=H>>>1;q<te;){var se=2*(q+1)-1,je=C[se],Qe=se+1,ae=C[Qe];if(0>s(je,M))Qe<H&&0>s(ae,je)?(C[q]=ae,C[Qe]=M,q=Qe):(C[q]=je,C[se]=M,q=se);else if(Qe<H&&0>s(ae,M))C[q]=ae,C[Qe]=M,q=Qe;else break e}}return A}function s(C,A){var M=C.sortIndex-A.sortIndex;return M!==0?M:C.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,f=3,p=!1,w=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(C){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=C)r(c),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(c)}}function _(C){if(y=!1,v(C),!w)if(n(l)!==null)w=!0,U(S);else{var A=n(c);A!==null&&Y(_,A.startTime-C)}}function S(C,A){w=!1,y&&(y=!1,m(T),T=-1),p=!0;var M=f;try{for(v(A),h=n(l);h!==null&&(!(h.expirationTime>A)||C&&!$());){var q=h.callback;if(typeof q=="function"){h.callback=null,f=h.priorityLevel;var H=q(h.expirationTime<=A);A=e.unstable_now(),typeof H=="function"?h.callback=H:h===n(l)&&r(l),v(A)}else r(l);h=n(l)}if(h!==null)var te=!0;else{var se=n(c);se!==null&&Y(_,se.startTime-A),te=!1}return te}finally{h=null,f=M,p=!1}}var E=!1,k=null,T=-1,R=5,P=-1;function $(){return!(e.unstable_now()-P<R)}function O(){if(k!==null){var C=e.unstable_now();P=C;var A=!0;try{A=k(!0,C)}finally{A?W():(E=!1,k=null)}}else E=!1}var W;if(typeof g=="function")W=function(){g(O)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,L=D.port2;D.port1.onmessage=O,W=function(){L.postMessage(null)}}else W=function(){b(O,0)};function U(C){k=C,E||(E=!0,W())}function Y(C,A){T=b(function(){C(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,U(S))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var M=f;f=A;try{return C()}finally{f=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,A){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=f;f=C;try{return A()}finally{f=M}},e.unstable_scheduleCallback=function(C,A,M){var q=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?q+M:q):M=q,C){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}
vendor: 4,614 bytes, lines 26-34
26return H=M+H,C={id:u++,callback:A,priorityLevel:C,startTime:M,expirationTime:H,sortIndex:-1},M>q?(C.sortIndex=M,t(c,C),n(l)===null&&C===n(c)&&(y?(m(T),T=-1):y=!0,Y(_,M-q))):(C.sortIndex=H,t(l,C),w||p||(w=!0,U(S))),C},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(C){var A=f;return function(){var M=f;f=A;try{return C.apply(this,arguments)}finally{f=M}}}})(jw);Rw.exports=jw;var vk=Rw.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var wk=x,jt=vk;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Nw=new Set,zo={};function Ts(e,t){ki(e,t),ki(e+"Capture",t)}function ki(e,t){for(zo[e]=t,e=0;e<t.length;e++)Nw.add(t[e])}var zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eh=Object.prototype.hasOwnProperty,xk=/^[: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]*$/,sg={},ig={};function bk(e){return eh.call(ig,e)?!0:eh.call(sg,e)?!1:xk.test(e)?ig[e]=!0:(sg[e]=!0,!1)}function _k(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Sk(e,t,n,r){if(t===null||typeof t>"u"||_k(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ht(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new ht(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ye[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qf=/[\-:]([a-z])/g;function Jf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
34-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Qf,Jf);Ye[t]=new ht(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Qf,Jf);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Qf,Jf);Ye[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xf(e,t,n,r){var s=Ye.hasOwnProperty(t)?Ye[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Sk(t,n,s,r)&&(n=null),r||s===null?bk(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yn=wk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ga=Symbol.for("react.element"),Hs=Symbol.for("react.portal"),Ks=Symbol.for("react.fragment"),Zf=Symbol.for("react.strict_mode"),th=Symbol.for("react.profiler"),Ow=Symbol.for("react.provider"),Iw=Symbol.for("react.context"),ep=Symbol.for("react.forward_ref"),nh=Symbol.for("react.suspense"),rh=Symbol.for("react.suspense_list"),tp=Symbol.for("react.memo"),dr=Symbol.for("react.lazy"),Dw=Symbol.for("react.offscreen"),og=Symbol.iterator;function eo(e){return e===null||typeof e!="object"?null:(e=og&&e[og]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,Gu;function vo(e){if(Gu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gu=t&&t[1]||""}return` 35`+Gu+e}var qu=!1;function Yu(e,t){if(!e||qu)return"";qu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 36`),i=r.stack.split(` 37`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 38`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{qu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vo(e):""}function Ek(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=Yu(e.type,!1),e;case 11:return e=Yu(e.type.render,!1),e;case 1:return e=Yu(e.type,!0),e;default:return""}}function sh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ks:return"Fragment";case Hs:return"Portal";case th:return"Profiler";case Zf:return"StrictMode";case nh:return"Suspense";case rh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Iw:return(e.displayName||"Context")+".Consumer";case Ow:return(e._context.displayName||"Context")+".Provider";case ep:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tp:return t=e.displayName||null,t!==null?t:sh(e.type)||"Memo";case dr:t=e._payload,e=e._init;try{return sh(e(t))}catch{}}return null}function kk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return sh(t);case 8:return t===Zf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tk(e){var t=Lw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qa(e){e._valueTracker||(e._valueTracker=Tk(e))}function Mw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ac(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ih(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ag(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}
vendor: 4,651 bytes, line 38
38function $w(e,t){t=t.checked,t!=null&&Xf(e,"checked",t,!1)}function oh(e,t){$w(e,t);var n=Dr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ah(e,t.type,n):t.hasOwnProperty("defaultValue")&&ah(e,t.type,Dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ah(e,t,n){(t!=="number"||ac(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wo=Array.isArray;function ai(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Dr(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function lh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function cg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(wo(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Dr(n)}}function Uw(e,t){var n=Dr(t.value),r=Dr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ug(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ch(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fw(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ya,Vw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ya=Ya||document.createElement("div"),Ya.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ya.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Co={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ck=["Webkit","ms","Moz","O"];Object.keys(Co).forEach(function(e){Ck.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Co[t]=Co[e]})});function Bw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Co.hasOwnProperty(e)&&Co[e]?(""+t).trim():t+"px"}function zw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Bw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Pk=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function uh(e,t){if(t){if(Pk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function dh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
38ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hh=null;function np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fh=null,li=null,ci=null;function dg(e){if(e=ja(e)){if(typeof fh!="function")throw Error(N(280));var t=e.stateNode;t&&(t=ru(t),fh(e.stateNode,e.type,t))}}function Ww(e){li?ci?ci.push(e):ci=[e]:li=e}function Hw(){if(li){var e=li,t=ci;if(ci=li=null,dg(e),t)for(e=0;e<t.length;e++)dg(t[e])}}function Kw(e,t){return e(t)}function Gw(){}var Qu=!1;function qw(e,t,n){if(Qu)return e(t,n);Qu=!0;try{return Kw(e,t,n)}finally{Qu=!1,(li!==null||ci!==null)&&(Gw(),Hw())}}function Ho(e,t){var n=e.stateNode;if(n===null)return null;var r=ru(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var ph=!1;if(zn)try{var to={};Object.defineProperty(to,"passive",{get:function(){ph=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{ph=!1}function Ak(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Po=!1,lc=null,cc=!1,mh=null,Rk={onError:function(e){Po=!0,lc=e}};function jk(e,t,n,r,s,i,o,a,l){Po=!1,lc=null,Ak.apply(Rk,arguments)}function Nk(e,t,n,r,s,i,o,a,l){if(jk.apply(this,arguments),Po){if(Po){var c=lc;Po=!1,lc=null}else throw Error(N(198));cc||(cc=!0,mh=c)}}function Cs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Yw(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function hg(e){if(Cs(e)!==e)throw Error(N(188))}function Ok(e){var t=e.alternate;if(!t){if(t=Cs(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return hg(s),e;if(i===r)return hg(s),t;i=i.sibling}throw Error(N(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function Qw(e){return e=Ok(e),e!==null?Jw(e):null}function Jw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Jw(e);if(t!==null)return t;e=e.sibling}return null}var Xw=jt.unstable_scheduleCallback,fg=jt.unstable_cancelCallback,Ik=jt.unstable_shouldYield,Dk=jt.unstable_requestPaint,Ae=jt.unstable_now,Lk=jt.unstable_getCurrentPriorityLevel,rp=jt.unstable_ImmediatePriority,Zw=jt.unstable_UserBlockingPriority,uc=jt.unstable_NormalPriority,Mk=jt.unstable_LowPriority,ex=jt.unstable_IdlePriority,Zc=null,Cn=null;function $k(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(Zc,e,void 0,(e.current.flags&128)===128)}catch{}}var an=Math.clz32?Math.clz32:Vk,Uk=Math.log,Fk=Math.LN2;function Vk(e){return e>>>=0,e===0?32:31-(Uk(e)/Fk|0)|0}var Qa=64,Ja=4194304;function xo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=xo(a):(i&=o,i!==0&&(r=xo(i)))}else o=n&~s,o!==0?r=xo(o):i!==0&&(r=xo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-an(t),s=1<<n,r|=e[n],t&=~s;return r}function Bk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-an(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=Bk(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function gh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tx(){var e=Qa;return Qa<<=1,!(Qa&4194240)&&(Qa=64),e}function Ju(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Aa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-an(t),e[t]=n}function Wk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-an(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function sp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-an(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ce=0;function nx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}
vendor: 4,796 bytes, line 38
38var rx,ip,sx,ix,ox,yh=!1,Xa=[],Tr=null,Cr=null,Pr=null,Ko=new Map,Go=new Map,pr=[],Hk="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pg(e,t){switch(e){case"focusin":case"focusout":Tr=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":Pr=null;break;case"pointerover":case"pointerout":Ko.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function no(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ja(t),t!==null&&ip(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Kk(e,t,n,r,s){switch(t){case"focusin":return Tr=no(Tr,e,t,n,r,s),!0;case"dragenter":return Cr=no(Cr,e,t,n,r,s),!0;case"mouseover":return Pr=no(Pr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ko.set(i,no(Ko.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Go.set(i,no(Go.get(i)||null,e,t,n,r,s)),!0}return!1}function ax(e){var t=os(e.target);if(t!==null){var n=Cs(t);if(n!==null){if(t=n.tag,t===13){if(t=Yw(n),t!==null){e.blockedOn=t,ox(e.priority,function(){sx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hh=r,n.target.dispatchEvent(r),hh=null}else return t=ja(n),t!==null&&ip(t),e.blockedOn=n,!1;t.shift()}return!0}function mg(e,t,n){Ol(e)&&n.delete(t)}function Gk(){yh=!1,Tr!==null&&Ol(Tr)&&(Tr=null),Cr!==null&&Ol(Cr)&&(Cr=null),Pr!==null&&Ol(Pr)&&(Pr=null),Ko.forEach(mg),Go.forEach(mg)}function ro(e,t){e.blockedOn===t&&(e.blockedOn=null,yh||(yh=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,Gk)))}function qo(e){function t(s){return ro(s,e)}if(0<Xa.length){ro(Xa[0],e);for(var n=1;n<Xa.length;n++){var r=Xa[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Tr!==null&&ro(Tr,e),Cr!==null&&ro(Cr,e),Pr!==null&&ro(Pr,e),Ko.forEach(t),Go.forEach(t),n=0;n<pr.length;n++)r=pr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pr.length&&(n=pr[0],n.blockedOn===null);)ax(n),n.blockedOn===null&&pr.shift()}var ui=Yn.ReactCurrentBatchConfig,hc=!0;function qk(e,t,n,r){var s=ce,i=ui.transition;ui.transition=null;try{ce=1,op(e,t,n,r)}finally{ce=s,ui.transition=i}}function Yk(e,t,n,r){var s=ce,i=ui.transition;ui.transition=null;try{ce=4,op(e,t,n,r)}finally{ce=s,ui.transition=i}}function op(e,t,n,r){if(hc){var s=vh(e,t,n,r);if(s===null)ad(e,t,r,fc,n),pg(e,r);else if(Kk(s,e,t,n,r))r.stopPropagation();else if(pg(e,r),t&4&&-1<Hk.indexOf(e)){for(;s!==null;){var i=ja(s);if(i!==null&&rx(i),i=vh(e,t,n,r),i===null&&ad(e,t,r,fc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ad(e,t,r,null,n)}}var fc=null;function vh(e,t,n,r){if(fc=null,e=np(r),e=os(e),e!==null)if(t=Cs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yw(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return fc=e,null}function lx(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Lk()){case rp:return 1;case Zw:return 4;case uc:case Mk:return 16;case ex:return 536870912;default:return 16}default:return 16}}var _r=null,ap=null,Il=null;
vendor: 5,445 bytes, line 38
38function cx(){if(Il)return Il;var e,t=ap,n=t.length,r,s="value"in _r?_r.value:_r.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Il=s.slice(e,1<r?1-r:void 0)}function Dl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Za(){return!0}function gg(){return!1}function Ot(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Za:gg,this.isPropagationStopped=gg,this}return ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Za)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Za)},persist:function(){},isPersistent:Za}),t}var Ui={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lp=Ot(Ui),Ra=ke({},Ui,{view:0,detail:0}),Qk=Ot(Ra),Xu,Zu,so,eu=ke({},Ra,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==so&&(so&&e.type==="mousemove"?(Xu=e.screenX-so.screenX,Zu=e.screenY-so.screenY):Zu=Xu=0,so=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),yg=Ot(eu),Jk=ke({},eu,{dataTransfer:0}),Xk=Ot(Jk),Zk=ke({},Ra,{relatedTarget:0}),ed=Ot(Zk),eT=ke({},Ui,{animationName:0,elapsedTime:0,pseudoElement:0}),tT=Ot(eT),nT=ke({},Ui,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rT=Ot(nT),sT=ke({},Ui,{data:0}),vg=Ot(sT),iT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oT={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},aT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=aT[e])?!!t[e]:!1}function cp(){return lT}var cT=ke({},Ra,{key:function(e){if(e.key){var t=iT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cp,charCode:function(e){return e.type==="keypress"?Dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uT=Ot(cT),dT=ke({},eu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wg=Ot(dT),hT=ke({},Ra,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cp}),fT=Ot(hT),pT=ke({},Ui,{propertyName:0,elapsedTime:0,pseudoElement:0}),mT=Ot(pT),gT=ke({},eu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yT=Ot(gT),vT=[9,13,27,32],up=zn&&"CompositionEvent"in window,Ao=null;zn&&"documentMode"in document&&(Ao=document.documentMode);var wT=zn&&"TextEvent"in window&&!Ao,ux=zn&&(!up||Ao&&8<Ao&&11>=Ao),xg=" ",bg=!1;function dx(e,t){switch(e){case"keyup":return vT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gs=!1;function xT(e,t){switch(e){case"compositionend":return hx(t);case"keypress":return t.which!==32?null:(bg=!0,xg);case"textInput":return e=t.data,e===xg&&bg?null:e;default:return null}}function bT(e,t){if(Gs)return e==="compositionend"||!up&&dx(e,t)?(e=cx(),Il=ap=_r=null,Gs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ux&&t.locale!=="ko"?null:t.data;default:return null}}var _T={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _g(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_T[e.type]:t==="textarea"}
vendor: 5,917 bytes, line 38
38function fx(e,t,n,r){Ww(r),t=pc(t,"onChange"),0<t.length&&(n=new lp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ro=null,Yo=null;function ST(e){Ex(e,0)}function tu(e){var t=Qs(e);if(Mw(t))return e}function ET(e,t){if(e==="change")return t}var px=!1;if(zn){var td;if(zn){var nd="oninput"in document;if(!nd){var Sg=document.createElement("div");Sg.setAttribute("oninput","return;"),nd=typeof Sg.oninput=="function"}td=nd}else td=!1;px=td&&(!document.documentMode||9<document.documentMode)}function Eg(){Ro&&(Ro.detachEvent("onpropertychange",mx),Yo=Ro=null)}function mx(e){if(e.propertyName==="value"&&tu(Yo)){var t=[];fx(t,Yo,e,np(e)),qw(ST,t)}}function kT(e,t,n){e==="focusin"?(Eg(),Ro=t,Yo=n,Ro.attachEvent("onpropertychange",mx)):e==="focusout"&&Eg()}function TT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu(Yo)}function CT(e,t){if(e==="click")return tu(t)}function PT(e,t){if(e==="input"||e==="change")return tu(t)}function AT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:AT;function Qo(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!eh.call(t,s)||!un(e[s],t[s]))return!1}return!0}function kg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tg(e,t){var n=kg(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kg(n)}}function gx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yx(){for(var e=window,t=ac();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ac(e.document)}return t}function dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RT(e){var t=yx(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gx(n.ownerDocument.documentElement,n)){if(r!==null&&dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Tg(n,i);var o=Tg(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jT=zn&&"documentMode"in document&&11>=document.documentMode,qs=null,wh=null,jo=null,xh=!1;function Cg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xh||qs==null||qs!==ac(r)||(r=qs,"selectionStart"in r&&dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jo&&Qo(jo,r)||(jo=r,r=pc(wh,"onSelect"),0<r.length&&(t=new lp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qs)))}function el(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ys={animationend:el("Animation","AnimationEnd"),animationiteration:el("Animation","AnimationIteration"),animationstart:el("Animation","AnimationStart"),transitionend:el("Transition","TransitionEnd")},rd={},vx={};zn&&(vx=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function nu(e){if(rd[e])return rd[e];if(!Ys[e])return e;var t=Ys[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vx)return rd[e]=t[n];return e}var wx=nu("animationend"),xx=nu("animationiteration"),bx=nu("animationstart"),_x=nu("transitionend"),Sx=new Map,Pg="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zr(e,t){Sx.set(e,t),Ts(t,[e])}for(var sd=0;sd<Pg.length;sd++){var id=Pg[sd],NT=id.toLowerCase(),OT=id[0].toUpperCase()+id.slice(1);zr(NT,"on"+OT)}zr(wx,"onAnimationEnd");zr(xx,"onAnimationIteration");zr(bx,"onAnimationStart");zr("dblclick","onDoubleClick");zr("focusin","onFocus");zr("focusout","onBlur");zr(_x,"onTransitionEnd");ki("onMouseEnter",["mouseout","mouseover"]);ki("onMouseLeave",["mouseout","mouseover"]);ki("onPointerEnter",["pointerout","pointerover"]);ki("onPointerLeave",["pointerout","pointerover"]);Ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,343 bytes, line 38
38Ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ts("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IT=new Set("cancel close invalid load scroll toggle".split(" ").concat(bo));function Ag(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Nk(r,t,void 0,e),e.currentTarget=null}function Ex(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Ag(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Ag(s,a,c),i=l}}}if(cc)throw e=mh,cc=!1,mh=null,e}function me(e,t){var n=t[kh];n===void 0&&(n=t[kh]=new Set);var r=e+"__bubble";n.has(r)||(kx(t,e,2,!1),n.add(r))}function od(e,t,n){var r=0;t&&(r|=4),kx(n,e,r,t)}var tl="_reactListening"+Math.random().toString(36).slice(2);function Jo(e){if(!e[tl]){e[tl]=!0,Nw.forEach(function(n){n!=="selectionchange"&&(IT.has(n)||od(n,!1,e),od(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tl]||(t[tl]=!0,od("selectionchange",!1,t))}}function kx(e,t,n,r){switch(lx(t)){case 1:var s=qk;break;case 4:s=Yk;break;default:s=op}n=s.bind(null,t,n,e),s=void 0,!ph||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function ad(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=os(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}qw(function(){var c=i,u=np(n),h=[];e:{var f=Sx.get(e);if(f!==void 0){var p=lp,w=e;switch(e){case"keypress":if(Dl(n)===0)break e;case"keydown":case"keyup":p=uT;break;case"focusin":w="focus",p=ed;break;case"focusout":w="blur",p=ed;break;case"beforeblur":case"afterblur":p=ed;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=yg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Xk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=fT;break;case wx:case xx:case bx:p=tT;break;case _x:p=mT;break;case"scroll":p=Qk;break;case"wheel":p=yT;break;case"copy":case"cut":case"paste":p=rT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=wg}var y=(t&4)!==0,b=!y&&e==="scroll",m=y?f!==null?f+"Capture":null:f;y=[];for(var g=c,v;g!==null;){v=g;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ho(g,m),_!=null&&y.push(Xo(g,_,v)))),b)break;g=g.return}0<y.length&&(f=new p(f,w,null,n,u),h.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==hh&&(w=n.relatedTarget||n.fromElement)&&(os(w)||w[Wn]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(w=n.relatedTarget||n.toElement,p=c,w=w?os(w):null,w!==null&&(b=Cs(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=c),p!==w)){if(y=yg,_="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=wg,_="onPointerLeave",m="onPointerEnter",g="pointer"),b=p==null?f:Qs(p
vendor: 6,232 bytes, lines 38-39
38),v=w==null?f:Qs(w),f=new y(_,g+"leave",p,n,u),f.target=b,f.relatedTarget=v,_=null,os(u)===c&&(y=new y(m,g+"enter",w,n,u),y.target=v,y.relatedTarget=b,_=y),b=_,p&&w)t:{for(y=p,m=w,g=0,v=y;v;v=Is(v))g++;for(v=0,_=m;_;_=Is(_))v++;for(;0<g-v;)y=Is(y),g--;for(;0<v-g;)m=Is(m),v--;for(;g--;){if(y===m||m!==null&&y===m.alternate)break t;y=Is(y),m=Is(m)}y=null}else y=null;p!==null&&Rg(h,f,p,y,!1),w!==null&&b!==null&&Rg(h,b,w,y,!0)}}e:{if(f=c?Qs(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=ET;else if(_g(f))if(px)S=PT;else{S=TT;var E=kT}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=CT);if(S&&(S=S(e,c))){fx(h,S,n,u);break e}E&&E(e,f,c),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&ah(f,"number",f.value)}switch(E=c?Qs(c):window,e){case"focusin":(_g(E)||E.contentEditable==="true")&&(qs=E,wh=c,jo=null);break;case"focusout":jo=wh=qs=null;break;case"mousedown":xh=!0;break;case"contextmenu":case"mouseup":case"dragend":xh=!1,Cg(h,n,u);break;case"selectionchange":if(jT)break;case"keydown":case"keyup":Cg(h,n,u)}var k;if(up)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Gs?dx(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(ux&&n.locale!=="ko"&&(Gs||T!=="onCompositionStart"?T==="onCompositionEnd"&&Gs&&(k=cx()):(_r=u,ap="value"in _r?_r.value:_r.textContent,Gs=!0)),E=pc(c,T),0<E.length&&(T=new vg(T,e,null,n,u),h.push({event:T,listeners:E}),k?T.data=k:(k=hx(n),k!==null&&(T.data=k)))),(k=wT?xT(e,n):bT(e,n))&&(c=pc(c,"onBeforeInput"),0<c.length&&(u=new vg("onBeforeInput","beforeinput",null,n,u),h.push({event:u,listeners:c}),u.data=k))}Ex(h,t)})}function Xo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ho(e,n),i!=null&&r.unshift(Xo(e,i,s)),i=Ho(e,t),i!=null&&r.push(Xo(e,i,s))),e=e.return}return r}function Is(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Rg(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ho(n,i),l!=null&&o.unshift(Xo(n,l,a))):s||(l=Ho(n,i),l!=null&&o.push(Xo(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var DT=/\r\n?/g,LT=/\u0000|\uFFFD/g;function jg(e){return(typeof e=="string"?e:""+e).replace(DT,` 39`).replace(LT,"")}function nl(e,t,n){if(t=jg(t),jg(e)!==t&&n)throw Error(N(425))}function mc(){}var bh=null,_h=null;function Sh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Eh=typeof setTimeout=="function"?setTimeout:void 0,MT=typeof clearTimeout=="function"?clearTimeout:void 0,Ng=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof Ng<"u"?function(e){return Ng.resolve(null).then(e).catch(UT)}:Eh;function UT(e){setTimeout(function(){throw e})}function ld(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),qo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);qo(t)}function Ar(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Og(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),kn="__reactFiber$"+Fi,Zo="__reactProps$"+Fi,Wn="__reactContainer$"+Fi,kh="__reactEvents$"+Fi,FT="__reactListeners$"+Fi,VT="__reactHandles$"+Fi;function os(e){var t=e[kn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wn]||n[kn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Og(e);e!==null;){if(n=e[kn])return n;e=Og(e)}return t}e=n,n=e.parentNode}return null}function ja(e){return e=e[kn]||e[Wn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function ru(e){return e[Zo]||null}var Th=[],Js=-1;function Wr(e){return{current:e}}function ye(e){0>Js||(e.current=Th[Js],Th[Js]=null,Js--)}function fe(e,t){Js++,Th[Js]=e.current,e.current=t}var Lr={},nt=Wr(Lr),yt=Wr(!1),xs=Lr;function Ti(e,t){var n=e.type.contextTypes;if(!n)return Lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function vt(e){return e=e.childContextTypes,e!=null}function gc(){ye(yt),ye(nt)}function Ig(e,t,n){if(nt.current!==Lr)throw Error(N(168));fe(nt,t),fe(yt,n)}function Tx(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(N(108,kk(e)||"Unknown",s));return ke({},n,r)}function yc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lr,xs=nt.current,fe(nt,e),fe(yt,yt.current),!0}function Dg(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Tx(e,t,xs),r.__reactInternalMemoizedMergedChildContext=e,ye(yt),ye(nt),fe(nt,e)):ye(yt),fe(yt,n)}var Un=null,su=!1,cd=!1;function Cx(e){Un===null?Un=[e]:Un.push(e)}function BT(e){su=!0,Cx(e)}function Hr(){if(!cd&&Un!==null){cd=!0;var e=0,t=ce;try{var n=Un;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Un=null,su=!1}catch(s){throw Un!==null&&(Un=Un.slice(e+1)),Xw(rp,Hr),s}finally{ce=t,cd=!1}}return null}var Xs=[],Zs=0,vc=null,wc=0,Lt=[],Mt=0,bs=null,Fn=1,Vn="";function es(e,t){Xs[Zs++]=wc,Xs[Zs++]=vc,vc=e,wc=t}function Px(e,t,n){Lt[Mt++]=Fn,Lt[Mt++]=Vn,Lt[Mt++]=bs,bs=e;var r=Fn;e=Vn;var s=32-an(r)-1;r&=~(1<<s),n+=1;var i=32-an(t)+s;
vendor: 16,024 bytes, line 39
39if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Fn=1<<32-an(t)+s|n<<s|r,Vn=i+e}else Fn=1<<i|n<<s|r,Vn=e}function hp(e){e.return!==null&&(es(e,1),Px(e,1,0))}function fp(e){for(;e===vc;)vc=Xs[--Zs],Xs[Zs]=null,wc=Xs[--Zs],Xs[Zs]=null;for(;e===bs;)bs=Lt[--Mt],Lt[Mt]=null,Vn=Lt[--Mt],Lt[Mt]=null,Fn=Lt[--Mt],Lt[Mt]=null}var At=null,Pt=null,we=!1,sn=null;function Ax(e,t){var n=$t(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Lg(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,At=e,Pt=Ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,At=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bs!==null?{id:Fn,overflow:Vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=$t(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,At=e,Pt=null,!0):!1;default:return!1}}function Ch(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ph(e){if(we){var t=Pt;if(t){var n=t;if(!Lg(e,t)){if(Ch(e))throw Error(N(418));t=Ar(n.nextSibling);var r=At;t&&Lg(e,t)?Ax(r,n):(e.flags=e.flags&-4097|2,we=!1,At=e)}}else{if(Ch(e))throw Error(N(418));e.flags=e.flags&-4097|2,we=!1,At=e}}}function Mg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function rl(e){if(e!==At)return!1;if(!we)return Mg(e),we=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Sh(e.type,e.memoizedProps)),t&&(t=Pt)){if(Ch(e))throw Rx(),Error(N(418));for(;t;)Ax(e,t),t=Ar(t.nextSibling)}if(Mg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=Ar(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=At?Ar(e.stateNode.nextSibling):null;return!0}function Rx(){for(var e=Pt;e;)e=Ar(e.nextSibling)}function Ci(){Pt=At=null,we=!1}function pp(e){sn===null?sn=[e]:sn.push(e)}var zT=Yn.ReactCurrentBatchConfig;function io(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function sl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $g(e){var t=e._init;return t(e._payload)}function jx(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=Or(m,g),m.index=0,m.sibling=null,m}function i(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=2,g):v):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,g,v,_){return g===null||g.tag!==6?(g=gd(v,m.mode,_),g.return=m,g):(g=s(g,v),g.return=m,g)}function l(m,g,v,_){var S=v.type;return S===Ks?u(m,g,v.props.children,_,v.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===dr&&$g(S)===g.type)?(_=s(g,v.props),_.ref=io(m,g,v),_.return=m,_):(_=Bl(v.type,v.key,v.props,null,m.mode,_),_.ref=io(m,g,v),_.return=m,_)}function c(m,g,v,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=yd(v,m.mode,_),g.return=m,g):(g=s(g,v.children||[]),g.return=m,g)}function u(m,g,v,_,S){return g===null||g.tag!==7?(g=ys(v,m.mode,_,S),g.return=m,g):(g=s(g,v),g.return=m,g)}function h(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number")return g=gd(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ga:return v=Bl(g.type,g.key,g.props,null,m.mode,v),v.ref=io(m,null,g),v.return=m,v;case Hs:return g=yd(g,m.mode,v),g.return=m,g;case dr:var _=g._init;return h(m,_(g._payload),v)}if(wo(g)||eo(g))return g=ys(g,m.mode,v,null),g.return=m,g;sl(m,g)}return null}function f(m,g,v,_){var S=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return S!==null?null:a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ga:return v.key===S?l(m,g,v,_):null;case Hs:return v.key===S?c(m,g,v,_):null;case dr:return S=v._init,f(m,g,S(v._payload),_)}if(wo(v)||eo(v))return S!==null?null:u(m,g,v,_,null);sl(m,v)}return null}function p(m,g,v,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return m=m.get(v)||null,a(g,m,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ga:return m=m.get(_.key===null?v:_.key)||null,l(g,m,_,S);case Hs:return m=m.get(_.key===null?v:_.key)||null,c(g,m,_,S);case dr:var E=_._init;return p(m,g,v,E(_._payload),S)}if(wo(_)||eo(_))return m=m.get(v)||null,u(g,m,_,S,null);sl(g,_)}return null}function w(m,g,v,_){for(var S=null,E=null,k=g,T=g=0,R=null;k!==null&&T<v.length;T++){k.index>T?(R=k,k=null):R=k.sibling;var P=f(m,k,v[T],_);if(P===null){k===null&&(k=R);break}e&&k&&P.alternate===null&&t(m,k),g=i(P,g,T),E===null?S=P:E.sibling=P,E=P,k=R}if(T===v.length)return n(m,k),we&&es(m,T),S;if(k===null){for(;T<v.length;T++)k=h(m,v[T],_),k!==null&&(g=i(k,g,T),E===null?S=k:E.sibling=k,E=k);return we&&es(m,T),S}for(k=r(m,k);T<v.length;T++)R=p(k,m,T,v[T],_),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?T:R.key),g=i(R,g,T),E===null?S=R:E.sibling=R,E=R);return e&&k.forEach(function($){return t(m,$)}),we&&es(m,T),S}function y(m,g,v,_){var S=eo(v);if(typeof S!="function")throw Error(N(150));if(v=S.call(v),v==null)throw Error(N(151));for(var E=S=null,k=g,T=g=0,R=null,P=v.next();k!==null&&!P.done;T++,P=v.next()){k.index>T?(R=k,k=null):R=k.sibling;var $=f(m,k,P.value,_);if($===null){k===null&&(k=R);break}e&&k&&$.alternate===null&&t(m,k),g=i($,g,T),E===null?S=$:E.sibling=$,E=$,k=R}if(P.done)return n(m,k),we&&es(m,T),S;if(k===null){for(;!P.done;T++,P=v.next())P=h(m,P.value,_),P!==null&&(g=i(P,g,T),E===null?S=P:E.sibling=P,E=P);return we&&es(m,T),S}for(k=r(m,k);!P.done;T++,P=v.next())P=p(k,m,T,P.value,_),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?T:P.key),g=i(P,g,T),E===null?S=P:E.sibling=P,E=P);return e&&k.forEach(function(O){return t(m,O)}),we&&es(m,T),S}function b(m,g,v,_){if(typeof v=="object"&&v!==null&&v.type===Ks&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ga:e:{for(var S=v.key,E=g;E!==null;){if(E.key===S){if(S=v.type,S===Ks){if(E.tag===7){n(m,E.sibling),g=s(E,v.props.children),g.return=m,m=g;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===dr&&$g(S)===E.type){n(m,E.sibling),g=s(E,v.props),g.ref=io(m,E,v),g.return=m,m=g;break e}n(m,E);break}else t(m,E);E=E.sibling}v.type===Ks?(g=ys(v.props.children,m.mode,_,v.key),g.return=m,m=g):(_=Bl(v.type,v.key,v.props,null,m.mode,_),_.ref=io(m,g,v),_.return=m,m=_)}return o(m);case Hs:e:{for(E=v.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(m,g.sibling),g=s(g,v.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=yd(v,m.mode,_),g.return=m,m=g}return o(m);case dr:return E=v._init,b(m,g,E(v._payload),_)}if(wo(v))return w(m,g,v,_);if(eo(v))return y(m,g,v,_);sl(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,g!==null&&g.tag===6?(n(m,g.sibling),g=s(g,v),g.return=m,m=g):(n(m,g),g=gd(v,m.mode,_),g.return=m,m=g),o(m)):n(m,g)}return b}var Pi=jx(!0),Nx=jx(!1),xc=Wr(null),bc=null,ei=null,mp=null;function gp(){mp=ei=bc=null}function yp(e){var t=xc.current;ye(xc),e._currentValue=t}function Ah(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function di(e,t){bc=e,mp=ei=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(gt=!0),e.firstContext=null)}function Bt(e){var t=e._currentValue;if(mp!==e)if(e={context:e,memoizedValue:t,next:null},ei===null){if(bc===null)throw Error(N(308));ei=e,bc.dependencies={lanes:0,firstContext:e}}else ei=ei.next=e;return t}var as=null;function vp(e){as===null?as=[e]:as.push(e)}function Ox(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,vp(t)):(n.next=s.next,s.next=n),t.interleaved=n,Hn(e,r)}function Hn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var hr=!1;function wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ix(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Hn(e,n)}return s=r.interleaved,s===null?(t.next=t,vp(r)):(t.next=s.next,s.next=t),r.interleaved=t,Hn(e,n)}function Ll(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}function Ug(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _c(e,t,n,r){var s=e.updateQueue;hr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(f=t,p=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(p,h,f);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,f=typeof w=="function"?w.call(p,h,f):w,f==null)break e;h=ke({},h,f);break e;case 2:hr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=h):u=u.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(l=h),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ss|=o,e.lanes=o,e.memoizedState=h}}function Fg(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(N(191,s));s.call(r)}}}var Na={},Pn=Wr(Na),ea=Wr(Na),ta=Wr(Na);function ls(e){if(e===Na)throw Error(N(174));return e}function xp(e,t){switch(fe(ta,t),fe(ea,e),fe(Pn,Na),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ch(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ch(t,e)}ye(Pn),fe(Pn,t)}function Ai(){ye(Pn),ye(ea),ye(ta)}function Dx(e){ls(ta.current);var t=ls(Pn.current),n=ch(t,e.type);t!==n&&(fe(ea,e),fe(Pn,n))}function bp(e){ea.current===e&&(ye(Pn),ye(ea))}var _e=Wr(0);function Sc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ud=[];function _p(){for(var e=0;e<ud.length;e++)ud[e]._workInProgressVersionPrimary=null;ud.length=0}var Ml=Yn.ReactCurrentDispatcher,dd=Yn.ReactCurrentBatchConfig,_s=0,Ee=null,Me=null,Fe=null,Ec=!1,No=!1,na=0,WT=0;function Xe(){throw Error(N(321))}function Sp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!un(e[n],t[n]))return!1;return!0}function Ep(e,t,n,r,s,i){if(_s=i,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ml.current=e===null||e.memoizedState===null?qT:YT,e=n(r,s),No){i=0;do{if(No=!1,na=0,25<=i)throw Error(N(301));i+=1,Fe=Me=null,t.updateQueue=null,Ml.current=QT,e=n(r,s)}while(No)}if(Ml.current=kc,t=Me!==null&&Me.next!==null,_s=0,Fe=Me=Ee=null,Ec=!1,t)throw Error(N(300));return e}function kp(){var e=na!==0;return na=0,e}function wn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?Ee.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function zt(){if(Me===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Fe===null?Ee.memoizedState:Fe.next;if(t!==null)Fe=t,Me=e;else{if(e===null)throw Error(N(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Fe===null?Ee.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function ra(e,t){return typeof t=="function"?t(e):t}function hd(e){var t=zt(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=Me,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((_s&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=h,o=r):l=l.next=h,Ee.lanes|=u,Ss|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,un(r,t.memoizedState)||(gt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Ee.lanes|=i,Ss|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function fd(e){var t=zt(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);un(i,t.memoizedState)||(gt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Lx(){}function Mx(e,t){var n=Ee,r=zt(),s=t(),i=!un(r.memoizedState,s);if(i&&(r.memoizedState=s,gt=!0),r=r.queue,Tp(Fx.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Fe!==null&&Fe.memoizedState.tag&1){if(n.flags|=2048,sa(9,Ux.bind(null,n,r,s,t),void 0,null),Ve===null)throw Error(N(349));_s&30||$x(n,t,s)}return s}function $x(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ux(e,t,n,r){t.value=n,t.getSnapshot=r,Vx(t)&&Bx(e)}
vendor: 4,969 bytes, line 39
39function Fx(e,t,n){return n(function(){Vx(t)&&Bx(e)})}function Vx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!un(e,n)}catch{return!0}}function Bx(e){var t=Hn(e,1);t!==null&&ln(t,e,1,-1)}function Vg(e){var t=wn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t.queue=e,e=e.dispatch=GT.bind(null,Ee,e),[t.memoizedState,e]}function sa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function zx(){return zt().memoizedState}function $l(e,t,n,r){var s=wn();Ee.flags|=e,s.memoizedState=sa(1|t,n,void 0,r===void 0?null:r)}function iu(e,t,n,r){var s=zt();r=r===void 0?null:r;var i=void 0;if(Me!==null){var o=Me.memoizedState;if(i=o.destroy,r!==null&&Sp(r,o.deps)){s.memoizedState=sa(t,n,i,r);return}}Ee.flags|=e,s.memoizedState=sa(1|t,n,i,r)}function Bg(e,t){return $l(8390656,8,e,t)}function Tp(e,t){return iu(2048,8,e,t)}function Wx(e,t){return iu(4,2,e,t)}function Hx(e,t){return iu(4,4,e,t)}function Kx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gx(e,t,n){return n=n!=null?n.concat([e]):null,iu(4,4,Kx.bind(null,t,e),n)}function Cp(){}function qx(e,t){var n=zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yx(e,t){var n=zt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qx(e,t,n){return _s&21?(un(n,t)||(n=tx(),Ee.lanes|=n,Ss|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,gt=!0),e.memoizedState=n)}function HT(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=dd.transition;dd.transition={};try{e(!1),t()}finally{ce=n,dd.transition=r}}function Jx(){return zt().memoizedState}function KT(e,t,n){var r=Nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xx(e))Zx(t,n);else if(n=Ox(e,t,n,r),n!==null){var s=ut();ln(n,e,r,s),eb(n,t,r)}}function GT(e,t,n){var r=Nr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xx(e))Zx(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,un(a,o)){var l=t.interleaved;l===null?(s.next=s,vp(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Ox(e,t,s,r),n!==null&&(s=ut(),ln(n,e,r,s),eb(n,t,r))}}function Xx(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Zx(e,t){No=Ec=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eb(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sp(e,n)}}var kc={readContext:Bt,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},qT={readContext:Bt,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:Bg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$l(4194308,4,Kx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){return $l(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=KT.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:Vg,useDebugValue:Cp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=Vg(!1),t=e[0];return e=HT.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,s=wn();if(we){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Ve===null)throw Error(N(349));_s&30||$x(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Bg(Fx.bind(null,r,i,e),[e]),r.flags|=2048,sa(9,Ux.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wn(),t=Ve.identifierPrefix;if(we){var n=Vn,r=Fn;n=(r&~(1<<32-an(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=na++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=WT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},YT={readContext:Bt,useCallback:qx,useContext:Bt,useEffect:Tp,useImperativeHandle:Gx,useInsertionEffect:Wx,useLayoutEffect:Hx,useMemo:Yx,useReducer:hd,useRef
vendor: 4,528 bytes, lines 39-41
39:zx,useState:function(){return hd(ra)},useDebugValue:Cp,useDeferredValue:function(e){var t=zt();return Qx(t,Me.memoizedState,e)},useTransition:function(){var e=hd(ra)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Lx,useSyncExternalStore:Mx,useId:Jx,unstable_isNewReconciler:!1},QT={readContext:Bt,useCallback:qx,useContext:Bt,useEffect:Tp,useImperativeHandle:Gx,useInsertionEffect:Wx,useLayoutEffect:Hx,useMemo:Yx,useReducer:fd,useRef:zx,useState:function(){return fd(ra)},useDebugValue:Cp,useDeferredValue:function(e){var t=zt();return Me===null?t.memoizedState=e:Qx(t,Me.memoizedState,e)},useTransition:function(){var e=fd(ra)[0],t=zt().memoizedState;return[e,t]},useMutableSource:Lx,useSyncExternalStore:Mx,useId:Jx,unstable_isNewReconciler:!1};function Xt(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Rh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ou={isMounted:function(e){return(e=e._reactInternals)?Cs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ut(),s=Nr(e),i=Bn(r,s);i.payload=t,n!=null&&(i.callback=n),t=Rr(e,i,s),t!==null&&(ln(t,e,s,r),Ll(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ut(),s=Nr(e),i=Bn(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Rr(e,i,s),t!==null&&(ln(t,e,s,r),Ll(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ut(),r=Nr(e),s=Bn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Rr(e,s,r),t!==null&&(ln(t,e,r,n),Ll(t,e,r))}};function zg(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Qo(n,r)||!Qo(s,i):!0}function tb(e,t,n){var r=!1,s=Lr,i=t.contextType;return typeof i=="object"&&i!==null?i=Bt(i):(s=vt(t)?xs:nt.current,r=t.contextTypes,i=(r=r!=null)?Ti(e,s):Lr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ou,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Wg(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ou.enqueueReplaceState(t,t.state,null)}function jh(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},wp(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Bt(i):(i=vt(t)?xs:nt.current,s.context=Ti(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Rh(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ou.enqueueReplaceState(s,s.state,null),_c(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ri(e,t){try{var n="",r=t;do n+=Ek(r),r=r.return;while(r);var s=n}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}function pd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Nh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JT=typeof WeakMap=="function"?WeakMap:Map;function nb(e,t,n){n=Bn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Cc||(Cc=!0,Bh=r),Nh(e,t)},n}function rb(e,t,n){n=Bn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Nh(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Nh(e,t),typeof r!="function"&&(jr===null?jr=new Set([this]):jr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Hg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JT;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=dC.bind(null,e,t,n),t.then(e,e))}function Kg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 2,072 bytes, line 41
41function Gg(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Bn(-1,1),t.tag=2,Rr(n,t,1))),n.lanes|=1),e)}var XT=Yn.ReactCurrentOwner,gt=!1;function st(e,t,n,r){t.child=e===null?Nx(t,null,n,r):Pi(t,e.child,n,r)}function qg(e,t,n,r,s){n=n.render;var i=t.ref;return di(t,s),r=Ep(e,t,n,r,i,s),n=kp(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kn(e,t,s)):(we&&n&&hp(t),t.flags|=1,st(e,t,r,s),t.child)}function Yg(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Dp(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,sb(e,t,i,r,s)):(e=Bl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Qo,n(o,r)&&e.ref===t.ref)return Kn(e,t,s)}return t.flags|=1,e=Or(i,r),e.ref=t.ref,e.return=t,t.child=e}function sb(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Qo(i,r)&&e.ref===t.ref)if(gt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(gt=!0);else return t.lanes=e.lanes,Kn(e,t,s)}return Oh(e,t,n,r,s)}function ib(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(ni,kt),kt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(ni,kt),kt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,fe(ni,kt),kt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,fe(ni,kt),kt|=r;return st(e,t,s,n),t.child}function ob(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Oh(e,t,n,r,s){var i=vt(n)?xs:nt.current;return i=Ti(t,i),di(t,s),n=Ep(e,t,n,r,i,s),r=kp(),e!==null&&!gt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kn(e,t,s)):(we&&r&&h
vendor: 3,234 bytes, line 41
41p(t),t.flags|=1,st(e,t,n,s),t.child)}function Qg(e,t,n,r,s){if(vt(n)){var i=!0;yc(t)}else i=!1;if(di(t,s),t.stateNode===null)Ul(e,t),tb(t,n,r),jh(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Bt(c):(c=vt(n)?xs:nt.current,c=Ti(t,c));var u=n.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Wg(t,o,r,c),hr=!1;var f=t.memoizedState;o.state=f,_c(t,r,o,s),l=t.memoizedState,a!==r||f!==l||yt.current||hr?(typeof u=="function"&&(Rh(t,n,u,r),l=t.memoizedState),(a=hr||zg(t,n,a,r,f,l,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ix(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Xt(t.type,a),o.props=c,h=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Bt(l):(l=vt(n)?xs:nt.current,l=Ti(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==l)&&Wg(t,o,r,l),hr=!1,f=t.memoizedState,o.state=f,_c(t,r,o,s);var w=t.memoizedState;a!==h||f!==w||yt.current||hr?(typeof p=="function"&&(Rh(t,n,p,r),w=t.memoizedState),(c=hr||zg(t,n,c,r,f,w,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ih(e,t,n,r,i,s)}function Ih(e,t,n,r,s,i){ob(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Dg(t,n,!1),Kn(e,t,i);r=t.stateNode,XT.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Pi(t,e.child,null,i),t.child=Pi(t,null,a,i)):st(e,t,a,i),t.memoizedState=r.state,s&&Dg(t,n,!0),t.child}function ab(e){var t=e.stateNode;t.pendingContext?Ig(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ig(e,t.context,!1),xp(e,t.containerInfo)}
vendor: 4,755 bytes, line 41
41function Jg(e,t,n,r,s){return Ci(),pp(s),t.flags|=256,st(e,t,n,r),t.child}var Dh={dehydrated:null,treeContext:null,retryLane:0};function Lh(e){return{baseLanes:e,cachePool:null,transitions:null}}function lb(e,t,n){var r=t.pendingProps,s=_e.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),fe(_e,s&1),e===null)return Ph(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=cu(o,r,0,null),e=ys(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Lh(n),t.memoizedState=Dh,e):Pp(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return ZT(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Or(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Or(a,i):(i=ys(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Lh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Dh,r}return i=e.child,e=i.sibling,r=Or(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Pp(e,t){return t=cu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function il(e,t,n,r){return r!==null&&pp(r),Pi(t,e.child,null,n),e=Pp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZT(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=pd(Error(N(422))),il(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=cu({mode:"visible",children:r.children},s,0,null),i=ys(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Pi(t,e.child,null,o),t.child.memoizedState=Lh(o),t.memoizedState=Dh,i);if(!(t.mode&1))return il(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(N(419)),r=pd(i,r,void 0),il(e,t,o,r)}if(a=(o&e.childLanes)!==0,gt||a){if(r=Ve,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Hn(e,s),ln(r,e,s,-1))}return Ip(),r=pd(Error(N(421))),il(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=hC.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Pt=Ar(s.nextSibling),At=t,we=!0,sn=null,e!==null&&(Lt[Mt++]=Fn,Lt[Mt++]=Vn,Lt[Mt++]=bs,Fn=e.id,Vn=e.overflow,bs=t),t=Pp(t,r.children),t.flags|=4096,t)}function Xg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ah(e.return,t,n)}function md(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function cb(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(st(e,t,r.children,n),r=_e.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xg(e,n,t);else if(e.tag===19)Xg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fe(_e,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Sc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),md(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Sc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}md(t,!0,n,null,i);break;case"together":md(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ul(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ss|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));
vendor: 4,746 bytes, line 41
41if(t.child!==null){for(e=t.child,n=Or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function eC(e,t,n){switch(t.tag){case 3:ab(t),Ci();break;case 5:Dx(t);break;case 1:vt(t.type)&&yc(t);break;case 4:xp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;fe(xc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(_e,_e.current&1),t.flags|=128,null):n&t.child.childLanes?lb(e,t,n):(fe(_e,_e.current&1),e=Kn(e,t,n),e!==null?e.sibling:null);fe(_e,_e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cb(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),fe(_e,_e.current),r)break;return null;case 22:case 23:return t.lanes=0,ib(e,t,n)}return Kn(e,t,n)}var ub,Mh,db,hb;ub=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mh=function(){};db=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ls(Pn.current);var i=null;switch(n){case"input":s=ih(e,s),r=ih(e,r),i=[];break;case"select":s=ke({},s,{value:void 0}),r=ke({},r,{value:void 0}),i=[];break;case"textarea":s=lh(e,s),r=lh(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=mc)}uh(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(zo.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(zo.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&me("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};hb=function(e,t,n,r){n!==r&&(t.flags|=4)};function oo(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function tC(e,t,n){var r=t.pendingProps;switch(fp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return vt(t.type)&&gc(),Ze(t),null;case 3:return r=t.stateNode,Ai(),ye(yt),ye(nt),_p(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(rl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,sn!==null&&(Hh(sn),sn=null))),Mh(e,t),Ze(t),null;case 5:bp(t);var s=ls(ta.current);if(n=t.type,e!==null&&t.stateNode!=null)db(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return Ze(t),null}if(e=ls(Pn.current),rl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kn]=t,r[Zo]=i,e=(t.mode&1)!==0,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(s=0;s<bo.length;s++)me(bo[s],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":ag(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":cg(r,i),me("invalid",r)}uh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 28,896 bytes, line 41
41o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&nl(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&nl(r.textContent,a,e),s=["children",""+a]):zo.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&me("scroll",r)}switch(n){case"input":qa(r),lg(r,i,!0);break;case"textarea":qa(r),ug(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=mc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fw(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[kn]=t,e[Zo]=r,ub(e,t,!1,!1),t.stateNode=e;e:{switch(o=dh(n,r),n){case"dialog":me("cancel",e),me("close",e),s=r;break;case"iframe":case"object":case"embed":me("load",e),s=r;break;case"video":case"audio":for(s=0;s<bo.length;s++)me(bo[s],e);s=r;break;case"source":me("error",e),s=r;break;case"img":case"image":case"link":me("error",e),me("load",e),s=r;break;case"details":me("toggle",e),s=r;break;case"input":ag(e,r),s=ih(e,r),me("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ke({},r,{value:void 0}),me("invalid",e);break;case"textarea":cg(e,r),s=lh(e,r),me("invalid",e);break;default:s=r}uh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?zw(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vw(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Wo(e,l):typeof l=="number"&&Wo(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(zo.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&Xf(e,i,l,o))}switch(n){case"input":qa(e),lg(e,r,!1);break;case"textarea":qa(e),ug(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Dr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ai(e,!!r.multiple,i,!1):r.defaultValue!=null&&ai(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=mc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)hb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=ls(ta.current),ls(Pn.current),rl(t)){if(r=t.stateNode,n=t.memoizedProps,r[kn]=t,(i=r.nodeValue!==n)&&(e=At,e!==null))switch(e.tag){case 3:nl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kn]=t,t.stateNode=r}return Ze(t),null;case 13:if(ye(_e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(we&&Pt!==null&&t.mode&1&&!(t.flags&128))Rx(),Ci(),t.flags|=98560,i=!1;else if(i=rl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(N(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(N(317));i[kn]=t}else Ci(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),i=!1}else sn!==null&&(Hh(sn),sn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||_e.current&1?Ue===0&&(Ue=3):Ip())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ai(),Mh(e,t),e===null&&Jo(t.stateNode.containerInfo),Ze(t),null;case 10:return yp(t.type._context),Ze(t),null;case 17:return vt(t.type)&&gc(),Ze(t),null;case 19:if(ye(_e),i=t.memoizedState,i===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)oo(i,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Sc(e),o!==null){for(t.flags|=128,oo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(_e,_e.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ae()>ji&&(t.flags|=128,r=!0,oo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Sc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!we)return Ze(t),null}else 2*Ae()-i.renderingStartTime>ji&&n!==1073741824&&(t.flags|=128,r=!0,oo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ae(),t.sibling=null,n=_e.current,fe(_e,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return Op(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?kt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function nC(e,t){switch(fp(t),t.tag){case 1:return vt(t.type)&&gc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ye(yt),ye(nt),_p(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bp(t),null;case 13:if(ye(_e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(_e),null;case 4:return Ai(),null;case 10:return yp(t.type._context),null;case 22:case 23:return Op(),null;case 24:return null;default:return null}}var ol=!1,tt=!1,rC=typeof WeakSet=="function"?WeakSet:Set,F=null;function ti(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function $h(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var Zg=!1;function sC(e,t){if(bh=hc,e=yx(),dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++c===s&&(a=o),f===i&&++u===r&&(l=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(_h={focusedElem:e,selectionRange:n},hc=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,b=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Xt(t.type,y),b);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(_){Pe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return w=Zg,Zg=!1,w}function Oo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&$h(t,n,i)}s=s.next}while(s!==r)}}function au(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Uh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function fb(e){var t=e.alternate;t!==null&&(e.alternate=null,fb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kn],delete t[Zo],delete t[kh],delete t[FT],delete t[VT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function pb(e){return e.tag===5||e.tag===3||e.tag===4}function ey(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mc));else if(r!==4&&(e=e.child,e!==null))for(Fh(e,t,n),e=e.sibling;e!==null;)Fh(e,t,n),e=e.sibling}function Vh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vh(e,t,n),e=e.sibling;e!==null;)Vh(e,t,n),e=e.sibling}var We=null,nn=!1;function sr(e,t,n){for(n=n.child;n!==null;)mb(e,t,n),n=n.sibling}function mb(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(Zc,n)}catch{}switch(n.tag){case 5:tt||ti(n,t);case 6:var r=We,s=nn;We=null,sr(e,t,n),We=r,nn=s,We!==null&&(nn?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(nn?(e=We,n=n.stateNode,e.nodeType===8?ld(e.parentNode,n):e.nodeType===1&&ld(e,n),qo(e)):ld(We,n.stateNode));break;case 4:r=We,s=nn,We=n.stateNode.containerInfo,nn=!0,sr(e,t,n),We=r,nn=s;break;case 0:case 11:case 14:case 15:if(!tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&$h(n,t,o),s=s.next}while(s!==r)}sr(e,t,n);break;case 1:if(!tt&&(ti(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pe(n,t,a)}sr(e,t,n);break;case 21:sr(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,sr(e,t,n),tt=r):sr(e,t,n);break;default:sr(e,t,n)}}function ty(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rC),t.forEach(function(r){var s=fC.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Gt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:We=a.stateNode,nn=!1;break e;case 3:We=a.stateNode.containerInfo,nn=!0;break e;case 4:We=a.stateNode.containerInfo,nn=!0;break e}a=a.return}if(We===null)throw Error(N(160));mb(i,o,s),We=null,nn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Pe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gb(t,e),t=t.sibling}function gb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Gt(t,e),yn(e),r&4){try{Oo(3,e,e.return),au(3,e)}catch(y){Pe(e,e.return,y)}try{Oo(5,e,e.return)}catch(y){Pe(e,e.return,y)}}break;case 1:Gt(t,e),yn(e),r&512&&n!==null&&ti(n,n.return);break;case 5:if(Gt(t,e),yn(e),r&512&&n!==null&&ti(n,n.return),e.flags&32){var s=e.stateNode;try{Wo(s,"")}catch(y){Pe(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&$w(s,i),dh(a,o);var c=dh(a,i);for(o=0;o<l.length;o+=2){var u=l[o],h=l[o+1];u==="style"?zw(s,h):u==="dangerouslySetInnerHTML"?Vw(s,h):u==="children"?Wo(s,h):Xf(s,u,h,c)}switch(a){case"input":oh(s,i);break;case"textarea":Uw(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?ai(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?ai(s,!!i.multiple,i.defaultValue,!0):ai(s,!!i.multiple,i.multiple?[]:"",!1))}s[Zo]=i}catch(y){Pe(e,e.return,y)}}break;case 6:if(Gt(t,e),yn(e),r&4){if(e.stateNode===null)throw Error(N(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){Pe(e,e.return,y)}}break;case 3:if(Gt(t,e),yn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{qo(t.containerInfo)}catch(y){Pe(e,e.return,y)}break;case 4:Gt(t,e),yn(e);break;case 13:Gt(t,e),yn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(jp=Ae())),r&4&&ty(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(c=tt)||u,Gt(t,e),tt=c):Gt(t,e),yn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(F=e,u=e.child;u!==null;){for(h=F=u;F!==null;){switch(f=F,p=f.child,f.tag){case 0:case 11:case 14:case 15:Oo(4,f,f.return);break;case 1:ti(f,f.return);var w=f.stateNode;if(typeof w.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){Pe(r,n,y)}}break;case 5:ti(f,f.return);break;case 22:if(f.memoizedState!==null){ry(h);continue}}p!==null?(p.return=f,F=p):ry(h)}u=u.sibling}e:for(u=null,h=e;;){if(h.tag===5){if(u===null){u=h;try{s=h.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Bw("display",o))}catch(y){Pe(e,e.return,y)}}}else if(h.tag===6){if(u===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(y){Pe(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Gt(t,e),yn(e),r&4&&ty(e);break;case 21:break;default:Gt(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(pb(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Wo(s,""),r.flags&=-33);var i=ey(e);Vh(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=ey(e);Fh(e,a,o);break;default:throw Error(N(161))}}catch(l){Pe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function iC(e,t,n){F=e,yb(e)}function yb(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ol;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||tt;a=ol;var c=tt;if(ol=o,(tt=l)&&!c)for(F=s;F!==null;)o=F,l=o.child,o.tag===22&&o.memoizedState!==null?sy(s):l!==null?(l.return=o,F=l):sy(s);for(;i!==null;)F=i,yb(i),i=i.sibling;F=s,ol=a,tt=c}ny(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):ny(e)}}function ny(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:tt||au(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Xt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Fg(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Fg(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var h=u.dehydrated;h!==null&&qo(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}tt||t.flags&512&&Uh(t)}catch(f){Pe(t,t.return,f)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function ry(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function sy(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{au(4,t)}catch(l){Pe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Pe(t,s,l)}}var i=t.return;try{Uh(t)}catch(l){Pe(t,i,l)}break;case 5:var o=t.return;try{Uh(t)}catch(l){Pe(t,o,l)}}}catch(l){Pe(t,t.return,l)}if(t===e){F=null;break}var a=t.sibling;if(a!==null){a.return=t.return,F=a;break}F=t.return}}var oC=Math.ceil,Tc=Yn.ReactCurrentDispatcher,Ap=Yn.ReactCurrentOwner,Ft=Yn.ReactCurrentBatchConfig,oe=0,Ve=null,Ie=null,qe=0,kt=0,ni=Wr(0),Ue=0,ia=null,Ss=0,lu=0,Rp=0,Io=null,mt=null,jp=0,ji=1/0,Mn=null,Cc=!1,Bh=null,jr=null,al=!1,Sr=null,Pc=0,Do=0,zh=null,Fl=-1,Vl=0;function ut(){return oe&6?Ae():Fl!==-1?Fl:Fl=Ae()}function Nr(e){return e.mode&1?oe&2&&qe!==0?qe&-qe:zT.transition!==null?(Vl===0&&(Vl=tx()),Vl):(e=ce,e!==0||(e=window.event,e=e===void 0?16:lx(e.type)),e):1}function ln(e,t,n,r){if(50<Do)throw Do=0,zh=null,Error(N(185));Aa(e,n,r),(!(oe&2)||e!==Ve)&&(e===Ve&&(!(oe&2)&&(lu|=n),Ue===4&&mr(e,qe)),wt(e,r),n===1&&oe===0&&!(t.mode&1)&&(ji=Ae()+500,su&&Hr()))}function wt(e,t){var n=e.callbackNode;zk(e,t);var r=dc(e,e===Ve?qe:0);if(r===0)n!==null&&fg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&fg(n),t===1)e.tag===0?BT(iy.bind(null,e)):Cx(iy.bind(null,e)),$T(function(){!(oe&6)&&Hr()}),n=null;else{switch(nx(r)){case 1:n=rp;break;case 4:n=Zw;break;case 16:n=uc;break;case 536870912:n=ex;break;default:n=uc}n=kb(n,vb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vb(e,t){if(Fl=-1,Vl=0,oe&6)throw Error(N(327));var n=e.callbackNode;if(hi()&&e.callbackNode!==n)return null;var r=dc(e,e===Ve?qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ac(e,r);else{t=r;var s=oe;oe|=2;var i=xb();(Ve!==e||qe!==t)&&(Mn=null,ji=Ae()+500,gs(e,t));do try{cC();break}catch(a){wb(e,a)}while(!0);gp(),Tc.current=i,oe=s,Ie!==null?t=0:(Ve=null,qe=0,t=Ue)}if(t!==0){if(t===2&&(s=gh(e),s!==0&&(r=s,t=Wh(e,s))),t===1)throw n=ia,gs(e,0),mr(e,r),wt(e,Ae()),n;if(t===6)mr(e,r);else{if(s=e.current.alternate,!(r&30)&&!aC(s)&&(t=Ac(e,r),t===2&&(i=gh(e),i!==0&&(r=i,t=Wh(e,i))),t===1))throw n=ia,gs(e,0),mr(e,r),wt(e,Ae()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:ts(e,mt,Mn);break;case 3:if(mr(e,r),(r&130023424)===r&&(t=jp+500-Ae(),10<t)){if(dc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){ut(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Eh(ts.bind(null,e,mt,Mn),t);break}ts(e,mt,Mn);break;case 4:if(mr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-an(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oC(r/1960))-r,10<r){e.timeoutHandle=Eh(ts.bind(null,e,mt,Mn),r);break}ts(e,mt,Mn);break;case 5:ts(e,mt,Mn);break;default:throw Error(N(329))}}}return wt(e,Ae()),e.callbackNode===n?vb.bind(null,e):null}function Wh(e,t){var n=Io;return e.current.memoizedState.isDehydrated&&(gs(e,t).flags|=256),e=Ac(e,t),e!==2&&(t=mt,mt=n,t!==null&&Hh(t)),e}function Hh(e){mt===null?mt=e:mt.push.apply(mt,e)}function aC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!un(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function mr(e,t){for(t&=~Rp,t&=~lu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-an(t),r=1<<n;e[n]=-1,t&=~r}}function iy(e){if(oe&6)throw Error(N(327));hi();var t=dc(e,0);if(!(t&1))return wt(e,Ae()),null;var n=Ac(e,t);if(e.tag!==0&&n===2){var r=gh(e);r!==0&&(t=r,n=Wh(e,r))}if(n===1)throw n=ia,gs(e,0),mr(e,t),wt(e,Ae()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ts(e,mt,Mn),wt(e,Ae()),null}function Np(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(ji=Ae()+500,su&&Hr())}}function Es(e){Sr!==null&&Sr.tag===0&&!(oe&6)&&hi();var t=oe;oe|=1;var n=Ft.transition,r=ce;try{if(Ft.transition=null,ce=1,e)return e()}finally{ce=r,Ft.transition=n,oe=t,!(oe&6)&&Hr()}}function Op(){kt=ni.current,ye(ni)}function gs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,MT(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(fp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&gc();break;case 3:Ai(),ye(yt),ye(nt),_p();break;case 5:bp(r);break;case 4:Ai();break;case 13:ye(_e);break;case 19:ye(_e);break;case 10:yp(r.type._context);break;case 22:case 23:Op()}n=n.return}if(Ve=e,Ie=e=Or(e.current,null),qe=kt=t,Ue=0,ia=null,Rp=lu=Ss=0,mt=Io=null,as!==null){for(t=0;t<as.length;t++)if(n=as[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}as=null}return e}function wb(e,t){do{var n=Ie;try{if(gp(),Ml.current=kc,Ec){for(var r=Ee.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Ec=!1}if(_s=0,Fe=Me=Ee=null,No=!1,na=0,Ap.current=null,n===null||n.return===null){Ue=1,ia=t,Ie=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=qe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,h=u.tag;if(!(u.mode&1)&&(h===0||h===11||h===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Kg(o);if(p!==null){p.flags&=-257,Gg(p,o,a,i,t),p.mode&1&&Hg(i,c,t),t=p,l=c;var w=t.updateQueue;if(w===null){var y=new Set;y.add(l),t.updateQueue=y}else w.add(l);break e}else{if(!(t&1)){Hg(i,c,t),Ip();break e}l=Error(N(426))}}else if(we&&a.mode&1){var b=Kg(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Gg(b,o,a,i,t),pp(Ri(l,a));break e}}i=l=Ri(l,a),Ue!==4&&(Ue=2),Io===null?Io=[i]:Io.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=nb(i,l,t);Ug(i,m);break e;case 1:a=l;var g=i.type,v=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(jr===null||!jr.has(v)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=rb(i,a,t);Ug(i,_);break e}}i=i.return}while(i!==null)}_b(n)}catch(S){t=S,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function xb(){var e=Tc.current;return Tc.current=kc,e===null?kc:e}function Ip(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Ve===null||!(Ss&268435455)&&!(lu&268435455)||mr(Ve,qe)}function Ac(e,t){var n=oe;oe|=2;var r=xb();(Ve!==e||qe!==t)&&(Mn=null,gs(e,t));do try{lC();break}catch(s){wb(e,s)}while(!0);if(gp(),oe=n,Tc.current=r,Ie!==null)throw Error(N(261));return Ve=null,qe=0,Ue}function lC(){for(;Ie!==null;)bb(Ie)}function cC(){for(;Ie!==null&&!Ik();)bb(Ie)}function bb(e){var t=Eb(e.alternate,e,kt);e.memoizedProps=e.pendingProps,t===null?_b(e):Ie=t,Ap.current=null}function _b(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=nC(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ue=6,Ie=null;return}}else if(n=tC(n,t,kt),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);Ue===0&&(Ue=5)}function ts(e,t,n){var r=ce,s=Ft.transition;try{Ft.transition=null,ce=1,uC(e,t,n,r)}finally{Ft.transition=s,ce=r}return null}function uC(e,t,n,r){do hi();while(Sr!==null);if(oe&6)throw Error(N(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Wk(e,i),e===Ve&&(Ie=Ve=null,qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||al||(al=!0,kb(uc,function(){return hi(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ft.transition,Ft.transition=null;var o=ce;ce=1;var a=oe;oe|=4,Ap.current=null,sC(e,n),gb(n,e),RT(_h),hc=!!bh,_h=bh=null,e.current=n,iC(n),Dk(),oe=a,ce=o,Ft.transition=i}else e.current=n;if(al&&(al=!1,Sr=e,Pc=s),i=e.pendingLanes,i===0&&(jr=null),$k(n.stateNode),wt(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Cc)throw Cc=!1,e=Bh,Bh=null,e;return Pc&1&&e.tag!==0&&hi(),i=e.pendingLanes,i&1?e===zh?Do++:(Do=0,zh=e):Do=0,Hr(),null}function hi(){if(Sr!==null){var e=nx(Pc),t=Ft.transition,n=ce;try{if(Ft.transition=null,ce=16>e?16:e,Sr===null)var r=!1;else{if(e=Sr,Sr=null,Pc=0,oe&6)throw Error(N(331));var s=oe;for(oe|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(F=c;F!==null;){var u=F;switch(u.tag){case 0:case 11:case 15:Oo(8,u,i)}var h=u.child;if(h!==null)h.return=u,F=h;else for(;F!==null;){u=F;var f=u.sibling,p=u.return;if(fb(u),u===c){F=null;break}if(f!==null){f.return=p,F=f;break}F=p}}}var w=i.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Oo(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,F=m;break e}F=i.return}}var g=e.current;for(F=g;F!==null;){o=F;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,F=v;else e:for(o=g;F!==null;){if(a=F,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:au(9,a)}}catch(S){Pe(a,a.return,S)}if(a===o){F=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,F=_;break e}F=a.return}}if(oe=s,Hr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(Zc,e)}catch{}r=!0}return r}finally{ce=n,Ft.transition=t}}return!1}function oy(e,t,n){t=Ri(n,t),t=nb(e,t,1),e=Rr(e,t,1),t=ut(),e!==null&&(Aa(e,1,t),wt(e,t))}function Pe(e,t,n){if(e.tag===3)oy(e,e,n);else for(;t!==null;){if(t.tag===3){oy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(jr===null||!jr.has(r))){e=Ri(n,e),e=rb(t,e,1),t=Rr(t,e,1),e=ut(),t!==null&&(Aa(t,1,e),wt(t,e));break}}t=t.return}}function dC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ut(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(qe&n)===n&&(Ue===4||Ue===3&&(qe&130023424)===qe&&500>Ae()-jp?gs(e,0):Rp|=n),wt(e,t)}function Sb(e,t){t===0&&(e.mode&1?(t=Ja,Ja<<=1,!(Ja&130023424)&&(Ja=4194304)):t=1);var n=ut();e=Hn(e,t),e!==null&&(Aa(e,t,n),wt(e,n))}function hC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Sb(e,n)}function fC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Sb(e,n)}var Eb;Eb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yt.current)gt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gt=!1,eC(e,t,n);gt=!!(e.flags&131072)}else gt=!1,we&&t.flags&1048576&&Px(t,wc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ul(e,t),e=t.pendingProps;var s=Ti(t,nt.current);di(t,n),s=Ep(null,t,r,e,s,n);var i=kp();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(r)?(i=!0,yc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,wp(t),s.updater=ou,t.stateNode=s,s._reactInternals=t,jh(t,r,e,n),t=Ih(null,t,r,!0,i,n)):(t.tag=0,we&&i&&hp(t),st(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ul(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=mC(r),e=Xt(r,e),s){case 0:t=Oh(null,t,r,e,n);break e;case 1:t=Qg(null,t,r,e,n);break e;case 11:t=qg(null,t,r,e,n);break e;case 14:t=Yg(null,t,r,Xt(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),Oh(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),Qg(e,t,r,s,n);case 3:e:{if(ab(t),e===null)throw Error(N(387));
vendor: 4,912 bytes, line 41
41r=t.pendingProps,i=t.memoizedState,s=i.element,Ix(e,t),_c(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ri(Error(N(423)),t),t=Jg(e,t,r,n,s);break e}else if(r!==s){s=Ri(Error(N(424)),t),t=Jg(e,t,r,n,s);break e}else for(Pt=Ar(t.stateNode.containerInfo.firstChild),At=t,we=!0,sn=null,n=Nx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ci(),r===s){t=Kn(e,t,n);break e}st(e,t,r,n)}t=t.child}return t;case 5:return Dx(t),e===null&&Ph(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Sh(r,s)?o=null:i!==null&&Sh(r,i)&&(t.flags|=32),ob(e,t),st(e,t,o,n),t.child;case 6:return e===null&&Ph(t),null;case 13:return lb(e,t,n);case 4:return xp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pi(t,null,r,n):st(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),qg(e,t,r,s,n);case 7:return st(e,t,t.pendingProps,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,fe(xc,r._currentValue),r._currentValue=o,i!==null)if(un(i.value,o)){if(i.children===s.children&&!yt.current){t=Kn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Bn(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ah(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(N(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ah(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}st(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,di(t,n),s=Bt(s),r=r(s),t.flags|=1,st(e,t,r,n),t.child;case 14:return r=t.type,s=Xt(r,t.pendingProps),s=Xt(r.type,s),Yg(e,t,r,s,n);case 15:return sb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xt(r,s),Ul(e,t),t.tag=1,vt(r)?(e=!0,yc(t)):e=!1,di(t,n),tb(t,r,s),jh(t,r,s,n),Ih(null,t,r,!0,e,n);case 19:return cb(e,t,n);case 22:return ib(e,t,n)}throw Error(N(156,t.tag))};function kb(e,t){return Xw(e,t)}function pC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,t,n,r){return new pC(e,t,n,r)}function Dp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mC(e){if(typeof e=="function")return Dp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ep)return 11;if(e===tp)return 14}return 2}function Or(e,t){var n=e.alternate;return n===null?(n=$t(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Bl(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Dp(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ks:return ys(n.children,s,i,t);case Zf:o=8,s|=8;break;case th:return e=$t(12,n,t,s|2),e.elementType=th,e.lanes=i,e;case nh:return e=$t(13,n,t,s),e.elementType=nh,e.lanes=i,e;case rh:return e=$t(19,n,t,s),e.elementType=rh,e.lanes=i,e;case Dw:return cu(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ow:o=10;break e;case Iw:o=9;break e;case ep:o=11;break e;case tp:o=14;break e;case dr:o=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=$t(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ys(e,t,n,r){return e=$t(7,e,r,t),e.lanes=n,e}function cu(e,t,n,r){return e=$t(22,e,r,t),e.elementType=Dw,e.lanes=n,e.stateNode={isHidden:!1},e}function gd(e,t,n){return e=$t(6,e,null,t),e.lanes=n,e}function yd(e,t,n){return t=$t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}
vendor: 8,368 bytes, line 41
41function gC(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ju(0),this.expirationTimes=Ju(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ju(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Lp(e,t,n,r,s,i,o,a,l){return e=new gC(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$t(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wp(i),e}function yC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hs,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Tb(e){if(!e)return Lr;e=e._reactInternals;e:{if(Cs(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(vt(n))return Tx(e,n,t)}return t}function Cb(e,t,n,r,s,i,o,a,l){return e=Lp(n,r,!0,e,s,i,o,a,l),e.context=Tb(null),n=e.current,r=ut(),s=Nr(n),i=Bn(r,s),i.callback=t??null,Rr(n,i,s),e.current.lanes=s,Aa(e,s,r),wt(e,r),e}function uu(e,t,n,r){var s=t.current,i=ut(),o=Nr(s);return n=Tb(n),t.context===null?t.context=n:t.pendingContext=n,t=Bn(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rr(s,t,o),e!==null&&(ln(e,s,o,i),Ll(e,s,o)),o}function Rc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ay(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Mp(e,t){ay(e,t),(e=e.alternate)&&ay(e,t)}function vC(){return null}var Pb=typeof reportError=="function"?reportError:function(e){console.error(e)};function $p(e){this._internalRoot=e}du.prototype.render=$p.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));uu(e,t,null,null)};du.prototype.unmount=$p.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Es(function(){uu(null,e,null,null)}),t[Wn]=null}};function du(e){this._internalRoot=e}du.prototype.unstable_scheduleHydration=function(e){if(e){var t=ix();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pr.length&&t!==0&&t<pr[n].priority;n++);pr.splice(n,0,e),n===0&&ax(e)}};function Up(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ly(){}function wC(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Rc(o);i.call(c)}}var o=Cb(t,r,e,0,null,!1,!1,"",ly);return e._reactRootContainer=o,e[Wn]=o.current,Jo(e.nodeType===8?e.parentNode:e),Es(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=Rc(l);a.call(c)}}var l=Lp(e,0,!1,null,null,!1,!1,"",ly);return e._reactRootContainer=l,e[Wn]=l.current,Jo(e.nodeType===8?e.parentNode:e),Es(function(){uu(t,l,n,r)}),l}function fu(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=Rc(o);a.call(l)}}uu(t,o,e,s)}else o=wC(n,t,e,s,r);return Rc(o)}rx=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=xo(t.pendingLanes);n!==0&&(sp(t,n|1),wt(t,Ae()),!(oe&6)&&(ji=Ae()+500,Hr()))}break;case 13:Es(function(){var r=Hn(e,1);if(r!==null){var s=ut();ln(r,e,1,s)}}),Mp(e,1)}};ip=function(e){if(e.tag===13){var t=Hn(e,134217728);if(t!==null){var n=ut();ln(t,e,134217728,n)}Mp(e,134217728)}};sx=function(e){if(e.tag===13){var t=Nr(e),n=Hn(e,t);if(n!==null){var r=ut();ln(n,e,t,r)}Mp(e,t)}};ix=function(){return ce};ox=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};fh=function(e,t,n){switch(t){case"input":if(oh(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=ru(r);if(!s)throw Error(N(90));Mw(r),oh(r,s)}}}break;case"textarea":Uw(e,n);break;case"select":t=n.value,t!=null&&ai(e,!!n.multiple,t,!1)}};Kw=Np;Gw=Es;var xC={usingClientEntryPoint:!1,Events:[ja,Qs,ru,Ww,Hw,Np]},ao={findFiberByHostInstance:os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bC={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Qw(e),e===null?null:e.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||vC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ll.isDisabled&&ll.supportsFiber)try{Zc=ll.inject(bC),Cn=ll}catch{}}Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xC;Nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Up(t))throw Error(N(200));return yC(e,t,null,n)};Nt.createRoot=function(e,t){if(!Up(e))throw Error(N(299));var n=!1,r="",s=Pb;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Lp(e,1,!1,null,null,n,!1,r,s),e[Wn]=t.current,Jo(e.nodeType===8?e.parentNode:e),new $p(t)};Nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=Qw(t),e=e===null?null:e.stateNode,e};Nt.flushSync=function(e){return Es(e)};Nt.hydrate=function(e,t,n){if(!hu(t))throw Error(N(200));return fu(null,e,t,!0,n)};Nt.hydrateRoot=function(e,t,n){if(!Up(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Pb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Cb(t,null,e,1,n??null,s,!1,i,o),e[Wn]=t.current,Jo(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new du(t)};Nt.render=function(e,t,n){if(!hu(t))throw Error(N(200));return fu(null,e,t,!1,n)};Nt.unmountComponentAtNode=function(e){if(!hu(e))throw Error(N(40));return e._reactRootContainer?(Es(function(){fu(null,null,e,!1,function(){e._reactRootContainer=null,e[Wn]=null})}),!0):!1};Nt.unstable_batchedUpdates=Np;Nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!hu(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return fu(e,t,n,!1,r)};Nt.version="18.3.1-next-f1338f8080-20240426";function Ab(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ab)}catch(e){console.error(e)}}Ab(),Aw.exports=Nt;var Oa=Aw.exports;const Rb=gw(Oa);var jb,cy=Oa;jb=cy.createRoot,cy.hydrateRoot;const _C="modulepreload",SC=function(e){return"/"+e},uy={},ie=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=SC(l),l in uy)return;uy[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");
41if(h.rel=c?"stylesheet":_C,c||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((f,p)=>{h.addEventListener("load",f),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},EC=1,kC=1e6;let vd=0;function TC(){return vd=(vd+1)%Number.MAX_SAFE_INTEGER,vd.toString()}const wd=new Map,dy=e=>{if(wd.has(e))return;const t=setTimeout(()=>{wd.delete(e),Lo({type:"REMOVE_TOAST",toastId:e})},kC);wd.set(e,t)},CC=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,EC)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?dy(n):e.toasts.forEach(r=>{dy(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},zl=[];let Wl={toasts:[]};function Lo(e){Wl=CC(Wl,e),zl.forEach(t=>{t(Wl)})}function PC({...e}){const t=TC(),n=s=>Lo({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Lo({type:"DISMISS_TOAST",toastId:t});return Lo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Ia(){const[e,t]=x.useState(Wl);return x.useEffect(()=>(zl.push(t),()=>{const n=zl.indexOf(t);n>-1&&zl.splice(n,1)}),[e]),{...e,toast:PC,dismiss:n=>Lo({type:"DISMISS_TOAST",toastId:n})}}function $e(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function hy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nb(...e){return t=>{let n=!1;const r=e.map(s=>{const i=hy(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():hy(e[s],null)}}}}function dn(...e){return x.useCallback(Nb(...e),e)}function hF(e,t){const n=x.createContext(t),r=i=>{const{children:o,...a}=i,l=x.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=x.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function pu(e,t=[]){let n=[];function r(i,o){const a=x.createContext(o),l=n.length;n=[...n,o];const c=h=>{var m;const{scope:f,children:p,...w}=h,y=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=x.useMemo(()=>w,Object.values(w));return d.jsx(y.Provider,{value:b,children:p})};c.displayName=i+"Provider";function u(h,f){var y;const p=((y=f==null?void 0:f[e])==null?void 0:y[l])||a,w=x.useContext(p);if(w)return w;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,AC(s,...t)]}function AC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const h=l(i)[`__scope${c}`];return{...a,...h}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var oa=x.forwardRef((e,t)=>{const{children:n,...r}=e,s=x.Children.toArray(n),i=s.find(RC);if(i){const o=i.props.children,a=s.map(l=>l===i?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return d.jsx(Kh,{...r,ref:t,children:x.isValidElement(o)?x.cloneElement(o,void 0,a):null})}return d.jsx(Kh,{...r,ref:t,children:n})});oa.displayName="Slot";var Kh=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const s=NC(n);return x.cloneElement(n,{...jC(r,n.props),ref:t?Nb(t,s):s})}return x.Children.count(n)>1?x.Children.only(null):null});Kh.displayName="SlotClone";var Ob=({children:e})=>d.jsx(d.Fragment,{children:e});function RC(e){return x.isValidElement(e)&&e.type===Ob}function jC(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}
vendor: 4,233 bytes, line 41
41:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function NC(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function OC(e){const t=e+"CollectionProvider",[n,r]=pu(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:w,children:y}=p,b=I.useRef(null),m=I.useRef(new Map).current;return d.jsx(s,{scope:w,itemMap:m,collectionRef:b,children:y})};o.displayName=t;const a=e+"CollectionSlot",l=I.forwardRef((p,w)=>{const{scope:y,children:b}=p,m=i(a,y),g=dn(w,m.collectionRef);return d.jsx(oa,{ref:g,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",h=I.forwardRef((p,w)=>{const{scope:y,children:b,...m}=p,g=I.useRef(null),v=dn(w,g),_=i(c,y);return I.useEffect(()=>(_.itemMap.set(g,{ref:g,...m}),()=>void _.itemMap.delete(g))),d.jsx(oa,{[u]:"",ref:v,children:b})});h.displayName=c;function f(p){const w=i(e+"CollectionConsumer",p);return I.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const m=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((_,S)=>m.indexOf(_.ref.current)-m.indexOf(S.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},f,r]}var IC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ft=IC.reduce((e,t)=>{const n=x.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?oa:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ib(e,t){e&&Oa.flushSync(()=>e.dispatchEvent(t))}function jn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DC(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e);x.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var LC="DismissableLayer",Gh="dismissableLayer.update",MC="dismissableLayer.pointerDownOutside",$C="dismissableLayer.focusOutside",fy,Db=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fp=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=x.useContext(Db),[u,h]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),w=dn(t,k=>h(k)),y=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(b),g=u?y.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,_=g>=m,S=FC(k=>{const T=k.target,R=[...c.branches].some(P=>P.contains(T));!_||R||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),E=VC(k=>{const T=k.target;[...c.branches].some(P=>P.contains(T))||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return DC(k=>{g===c.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(fy=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),py(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=fy)}},[u,f,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),py())},[u,c]),x.useEffect(()=>{const k=()=>p({});return document.addEventListener(Gh,k),()=>document.removeEventListener(Gh,k)},[]),d.jsx(ft.div,{...l,ref:w,style:{pointerEvents:v?_?"auto":"none":void 0,...e.style},onFocusCapture:$e(e.onFocusCapture,E.onFocusCapture),onBlurCapture:$e(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:$e(e.onPointerDownCapture,S.onPointerDownCapture)})});Fp.displayName=LC;var UC="DismissableLayerBranch",Lb=x.forwardRef((e,t)=>
41{const n=x.useContext(Db),r=x.useRef(null),s=dn(t,r);return x.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(ft.div,{...e,ref:s})});Lb.displayName=UC;function FC(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Mb(MC,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function VC(e,t=globalThis==null?void 0:globalThis.document){const n=jn(e),r=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!r.current&&Mb($C,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function py(){const e=new CustomEvent(Gh);document.dispatchEvent(e)}function Mb(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ib(s,i):s.dispatchEvent(i)}var BC=Fp,zC=Lb,Mr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},WC="Portal",$b=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=x.useState(!1);Mr(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Rb.createPortal(d.jsx(ft.div,{...r,ref:t}),o):null});$b.displayName=WC;function HC(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Vp=e=>{const{present:t,children:n}=e,r=KC(t),s=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),i=dn(r.ref,GC(s));return typeof n=="function"||r.isPresent?x.cloneElement(s,{ref:i}):null};Vp.displayName="Presence";function KC(e){const[t,n]=x.useState(),r=x.useRef({}),s=x.useRef(e),i=x.useRef("none"),o=e?"mounted":"unmounted",[a,l]=HC(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=cl(r.current);i.current=a==="mounted"?c:"none"},[a]),Mr(()=>{const c=r.current,u=s.current;if(u!==e){const f=i.current,p=cl(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Mr(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,h=p=>{const y=cl(r.current).includes(p.animationName);if(p.target===t&&y&&(l("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=p=>{p.target===t&&(i.current=cl(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function cl(e){return(e==null?void 0:e.animationName)||"none"}function GC(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ub({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=qC({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=jn(n),l=x.useCallback(c=>{if(i){const h=typeof c=="function"?c(e):c;h!==e&&a(h)}else s(c)},[i,e,s,a]);return[o,l]}function qC({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,s=x.useRef(r),i=jn(t);return x.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var YC="VisuallyHidden",mu=x.forwardRef((e,t)=>
41d.jsx(ft.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));mu.displayName=YC;var QC=mu,Bp="ToastProvider",[zp,JC,XC]=OC("Toast"),[Fb,fF]=pu("Toast",[XC]),[ZC,gu]=Fb(Bp),Vb=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=x.useState(null),[c,u]=x.useState(0),h=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bp}\`. Expected non-empty \`string\`.`),d.jsx(zp.Provider,{scope:t,children:d.jsx(ZC,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>u(p=>p+1),[]),onToastRemove:x.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};Vb.displayName=Bp;var Bb="ToastViewport",eP=["F8"],qh="toast.viewportPause",Yh="toast.viewportResume",zb=x.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=eP,label:s="Notifications ({hotkey})",...i}=e,o=gu(Bb,n),a=JC(n),l=x.useRef(null),c=x.useRef(null),u=x.useRef(null),h=x.useRef(null),f=dn(t,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=o.toastCount>0;x.useEffect(()=>{const b=m=>{var v;r.length!==0&&r.every(_=>m[_]||m.code===_)&&((v=h.current)==null||v.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),x.useEffect(()=>{const b=l.current,m=h.current;if(w&&b&&m){const g=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(qh);m.dispatchEvent(E),o.isClosePausedRef.current=!0}},v=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(Yh);m.dispatchEvent(E),o.isClosePausedRef.current=!1}},_=E=>{!b.contains(E.relatedTarget)&&v()},S=()=>{b.contains(document.activeElement)||v()};return b.addEventListener("focusin",g),b.addEventListener("focusout",_),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",v),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",_),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",v)}}},[w,o.isClosePausedRef]);const y=x.useCallback(({tabbingDirection:b})=>{const g=a().map(v=>{const _=v.ref.current,S=[_,...fP(_)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?g.reverse():g).flat()},[a]);return x.useEffect(()=>{const b=h.current;if(b){const m=g=>
41{var S,E,k;const v=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!v){const T=document.activeElement,R=g.shiftKey;if(g.target===b&&R){(S=c.current)==null||S.focus();return}const O=y({tabbingDirection:R?"backwards":"forwards"}),W=O.findIndex(D=>D===T);xd(O.slice(W+1))?g.preventDefault():R?(E=c.current)==null||E.focus():(k=u.current)==null||k.focus()}};return b.addEventListener("keydown",m),()=>b.removeEventListener("keydown",m)}},[a,y]),d.jsxs(zC,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&d.jsx(Qh,{ref:c,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});xd(b)}}),d.jsx(zp.Slot,{scope:n,children:d.jsx(ft.ol,{tabIndex:-1,...i,ref:f})}),w&&d.jsx(Qh,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});xd(b)}})]})});zb.displayName=Bb;var Wb="ToastFocusProxy",Qh=x.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=gu(Wb,n);return d.jsx(mu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Qh.displayName=Wb;var yu="Toast",tP="toast.swipeStart",nP="toast.swipeMove",rP="toast.swipeCancel",sP="toast.swipeEnd",Hb=x.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=Ub({prop:r,defaultProp:s,onChange:i});return d.jsx(Vp,{present:n||a,children:d.jsx(aP,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:jn(e.onPause),onResume:jn(e.onResume),onSwipeStart:$e(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:$e(e.onSwipeMove,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:$e(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:$e(e.onSwipeEnd,c=>{const{x:u,y:h}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});Hb.displayName=yu;var[iP,oP]=Fb(yu,{onClose(){}}),aP=x.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...w}=e,y=gu(yu,n),[b,m]=x.useState(null),g=dn(t,D=>m(D)),v=x.useRef(null),_=x.useRef(null),S=s||y.duration,E=x.useRef(0),k=x.useRef(S),T=x.useRef(0),{onToastAdd:R,onToastRemove:P}=y,$=jn(()=>{var L;(b==null?void 0:b.contains(document.activeElement))&&((L=y.viewport)==null||L.focus()),o()}),O=x.useCallback(D=>{!D||D===1/0||(window.clearTimeout(T.current),E.current=new Date().getTime(),T.current=window.setTimeout($,D))},[$]);x.useEffect(()=>{const D=y.viewport;if(D){const L=()=>{O(k.current),c==null||c()},U=()=>{const Y=new Date().getTime()-E.current;k.current=k.current-Y,window.clearTimeout(T.current),l==null||l()};return D.addEventListener(qh,U),D.addEventListener(Yh,L),()=>{D.removeEventListener(qh,U),D.removeEventListener(Yh,L)}}},[y.viewport,S,l,c,O]),x.useEffect(()=>{i&&!y.isClosePausedRef.current&&O(S)},[i,S,y.isClosePausedRef,O]),x.useEffect(()=>(R(),()=>P()),[R,P]);const W=x.useMemo(()=>b?Xb(b):null,[b]);return y.viewport?d.jsxs(d.Fragment,{children:[W&&d.jsx(lP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),d.jsx(iP,{scope:n,onClose:$,children:Oa.createPortal(d.jsx(zp.ItemSlot,{scope:n,children:d.jsx(BC,{asChild:!0,onEscapeKeyDown:$e(a,(
41)=>{y.isFocusedToastEscapeKeyDownRef.current||$(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(ft.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:$e(e.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:$e(e.onPointerDown,D=>{D.button===0&&(v.current={x:D.clientX,y:D.clientY})}),onPointerMove:$e(e.onPointerMove,D=>{if(!v.current)return;const L=D.clientX-v.current.x,U=D.clientY-v.current.y,Y=!!_.current,C=["left","right"].includes(y.swipeDirection),A=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,M=C?A(0,L):0,q=C?0:A(0,U),H=D.pointerType==="touch"?10:2,te={x:M,y:q},se={originalEvent:D,delta:te};Y?(_.current=te,ul(nP,h,se,{discrete:!1})):my(te,y.swipeDirection,H)?(_.current=te,ul(tP,u,se,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(L)>H||Math.abs(U)>H)&&(v.current=null)}),onPointerUp:$e(e.onPointerUp,D=>{const L=_.current,U=D.target;if(U.hasPointerCapture(D.pointerId)&&U.releasePointerCapture(D.pointerId),_.current=null,v.current=null,L){const Y=D.currentTarget,C={originalEvent:D,delta:L};my(L,y.swipeDirection,y.swipeThreshold)?ul(sP,p,C,{discrete:!0}):ul(rP,f,C,{discrete:!0}),Y.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),lP=e=>{const{__scopeToast:t,children:n,...r}=e,s=gu(yu,t),[i,o]=x.useState(!1),[a,l]=x.useState(!1);return dP(()=>o(!0)),x.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx($b,{asChild:!0,children:d.jsx(mu,{...r,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",n]})})})},cP="ToastTitle",Kb=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(ft.div,{...r,ref:t})});Kb.displayName=cP;var uP="ToastDescription",Gb=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(ft.div,{...r,ref:t})});Gb.displayName=uP;var qb="ToastAction",Yb=x.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?d.jsx(Jb,{altText:n,asChild:!0,children:d.jsx(Wp,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qb}\`. Expected non-empty \`string\`.`),null)});Yb.displayName=qb;var Qb="ToastClose",Wp=x.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=oP(Qb,n);return d.jsx(Jb,{asChild:!0,children:d.jsx(ft.button,{type:"button",...r,ref:t,onClick:$e(e.onClick,s.onClose)})})});Wp.displayName=Qb;var Jb=x.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return d.jsx(ft.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Xb(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),hP(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Xb(r))}}),t}function ul(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ib(s,i):s.dispatchEvent(i)}var my=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function dP(e=()=>{}){const t=jn(e);Mr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function hP(e){return e.nodeType===e.ELEMENT_NODE}function fP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var pP=Vb,Zb=zb,e_=Hb,t_=Kb,n_=Gb,r_=Yb,s_=Wp;function i_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=i_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function o_(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=i_(e))&&(r&&(r+=" "),r+=t);return r}const gy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yy=o_,Hp=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return yy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],h=i==null?void 0:i[c];if(u===null)return null;const f=gy(u)||gy(h);return s[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[h,f]=u;return f===void 0||(c[h]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:h,className:f,...p}=u;return Object.entries(p).every(w=>{let[y,b]=w;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...c,h,f]:c},[]);return yy(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 42 * @license lucide-react v0.462.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const mP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a_=(...e)=>
vendor: 4,897 bytes, lines 46-110
46e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 47 * @license lucide-react v0.462.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */var gP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 52 * @license lucide-react v0.462.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const yP=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...gP,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:a_("lucide",s),...a},[...o.map(([c,u])=>x.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 57 * @license lucide-react v0.462.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const J=(e,t)=>{const n=x.forwardRef(({className:r,...s},i)=>x.createElement(yP,{ref:i,iconNode:t,className:a_(`lucide-${mP(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 62 * @license lucide-react v0.462.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const on=J("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 67 * @license lucide-react v0.462.0 - ISC 68 * 69 * This source code is licensed under the ISC license. 70 * See the LICENSE file in the root directory of this source tree. 71 */const vP=J("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 72 * @license lucide-react v0.462.0 - ISC 73 * 74 * This source code is licensed under the ISC license. 75 * See the LICENSE file in the root directory of this source tree. 76 */const Vi=J("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** 77 * @license lucide-react v0.462.0 - ISC 78 * 79 * This source code is licensed under the ISC license. 80 * See the LICENSE file in the root directory of this source tree. 81 */const wP=J("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 82 * @license lucide-react v0.462.0 - ISC 83 * 84 * This source code is licensed under the ISC license. 85 * See the LICENSE file in the root directory of this source tree. 86 */const Kp=J("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 87 * @license lucide-react v0.462.0 - ISC 88 * 89 * This source code is licensed under the ISC license. 90 * See the LICENSE file in the root directory of this source tree. 91 */const l_=J("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 92 * @license lucide-react v0.462.0 - ISC 93 * 94 * This source code is licensed under the ISC license. 95 * See the LICENSE file in the root directory of this source tree. 96 */const vy=J("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 97 * @license lucide-react v0.462.0 - ISC 98 * 99 * This source code is licensed under the ISC license. 100 * See the LICENSE file in the root directory of this source tree. 101 */const c_=J("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 102 * @license lucide-react v0.462.0 - ISC 103 * 104 * This source code is licensed under the ISC license. 105 * See the LICENSE file in the root directory of this source tree. 106 */const xP=J("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 107 * @license lucide-react v0.462.0 - ISC 108 * 109 * This source code is licensed under the ISC license. 110 * See the LICENSE file in the root directory of this source tree.
111 */const u_=J("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 112 * @license lucide-react v0.462.0 - ISC 113 * 114 * This source code is licensed under the ISC license. 115 * See the LICENSE file in the root directory of this source tree. 116 */const vu=J("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/** 117 * @license lucide-react v0.462.0 - ISC 118 * 119 * This source code is licensed under the ISC license. 120 * See the LICENSE file in the root directory of this source tree. 121 */const bP=J("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 122 * @license lucide-react v0.462.0 - ISC 123 * 124 * This source code is licensed under the ISC license. 125 * See the LICENSE file in the root directory of this source tree. 126 */const _P=J("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 127 * @license lucide-react v0.462.0 - ISC 128 * 129 * This source code is licensed under the ISC license. 130 * See the LICENSE file in the root directory of this source tree. 131 */const wy=J("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 132 * @license lucide-react v0.462.0 - ISC 133 * 134 * This source code is licensed under the ISC license. 135 * See the LICENSE file in the root directory of this source tree. 136 */const d_=J("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 137 * @license lucide-react v0.462.0 - ISC 138 * 139 * This source code is licensed under the ISC license. 140 * See the LICENSE file in the root directory of this source tree. 141 */const h_=J("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 142 * @license lucide-react v0.462.0 - ISC 143 * 144 * This source code is licensed under the ISC license. 145 * See the LICENSE file in the root directory of this source tree. 146 */const SP=J("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** 147 * @license lucide-react v0.462.0 - ISC 148 * 149 * This source code is licensed under the ISC license. 150 * See the LICENSE file in the root directory of this source tree. 151 */const EP=J("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 152 * @license lucide-react v0.462.0 - ISC 153 * 154 * This source code is licensed under the ISC license. 155 * See the LICENSE file in the root directory of this source tree. 156 */const kP=J("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 157 * @license lucide-react v0.462.0 - ISC 158 * 159 * This source code is licensed under the ISC license. 160 * See the LICENSE file in the root directory of this source tree. 161 */const TP=J("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 162 * @license lucide-react v0.462.0 - ISC 163 * 164 * This source code is licensed under the ISC license. 165 * See the LICENSE file in the root directory of this source tree. 166 */const CP=J("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 167 * @license lucide-react v0.462.0 - ISC 168 * 169 * This source code is licensed under the ISC license. 170 * See the LICENSE file in the root directory of this source tree. 171 */const PP=J("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 172 * @license lucide-react v0.462.0 - ISC 173 * 174 * This source code is licensed under the ISC license. 175 * See the LICENSE file in the root directory of this source tree.
176 */const Gp=J("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 177 * @license lucide-react v0.462.0 - ISC 178 * 179 * This source code is licensed under the ISC license. 180 * See the LICENSE file in the root directory of this source tree. 181 */const jc=J("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 182 * @license lucide-react v0.462.0 - ISC 183 * 184 * This source code is licensed under the ISC license. 185 * See the LICENSE file in the root directory of this source tree. 186 */const wu=J("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 187 * @license lucide-react v0.462.0 - ISC 188 * 189 * This source code is licensed under the ISC license. 190 * See the LICENSE file in the root directory of this source tree. 191 */const AP=J("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 192 * @license lucide-react v0.462.0 - ISC 193 * 194 * This source code is licensed under the ISC license. 195 * See the LICENSE file in the root directory of this source tree. 196 */const xy=J("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 197 * @license lucide-react v0.462.0 - ISC 198 * 199 * This source code is licensed under the ISC license. 200 * See the LICENSE file in the root directory of this source tree. 201 */const dl=J("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 202 * @license lucide-react v0.462.0 - ISC 203 * 204 * This source code is licensed under the ISC license. 205 * See the LICENSE file in the root directory of this source tree. 206 */const RP=J("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 207 * @license lucide-react v0.462.0 - ISC 208 * 209 * This source code is licensed under the ISC license. 210 * See the LICENSE file in the root directory of this source tree. 211 */const jP=J("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 212 * @license lucide-react v0.462.0 - ISC 213 * 214 * This source code is licensed under the ISC license. 215 * See the LICENSE file in the root directory of this source tree. 216 */const $r=J("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** 217 * @license lucide-react v0.462.0 - ISC 218 * 219 * This source code is licensed under the ISC license. 220 * See the LICENSE file in the root directory of this source tree. 221 */const by=J("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 222 * @license lucide-react v0.462.0 - ISC 223 * 224 * This source code is licensed under the ISC license. 225 * See the LICENSE file in the root directory of this source tree. 226 */const NP=J("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** 227 * @license lucide-react v0.462.0 - ISC 228 * 229 * This source code is licensed under the ISC license. 230 * See the LICENSE file in the root directory of this source tree. 231 */const OP=J("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 232 * @license lucide-react v0.462.0 - ISC 233 * 234 * This source code is licensed under the ISC license. 235 * See the LICENSE file in the root directory of this source tree. 236 */const IP=J("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 237 * @license lucide-react v0.462.0 - ISC 238 * 239 * This source code is licensed under the ISC license. 240 * See the LICENSE file in the root directory of this source tree. 241 */const DP=J("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 4,456 bytes, lines 241-286
241y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 242 * @license lucide-react v0.462.0 - ISC 243 * 244 * This source code is licensed under the ISC license. 245 * See the LICENSE file in the root directory of this source tree. 246 */const hn=J("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 247 * @license lucide-react v0.462.0 - ISC 248 * 249 * This source code is licensed under the ISC license. 250 * See the LICENSE file in the root directory of this source tree. 251 */const LP=J("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 252 * @license lucide-react v0.462.0 - ISC 253 * 254 * This source code is licensed under the ISC license. 255 * See the LICENSE file in the root directory of this source tree. 256 */const f_=J("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 257 * @license lucide-react v0.462.0 - ISC 258 * 259 * This source code is licensed under the ISC license. 260 * See the LICENSE file in the root directory of this source tree. 261 */const p_=J("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 262 * @license lucide-react v0.462.0 - ISC 263 * 264 * This source code is licensed under the ISC license. 265 * See the LICENSE file in the root directory of this source tree. 266 */const _y=J("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 267 * @license lucide-react v0.462.0 - ISC 268 * 269 * This source code is licensed under the ISC license. 270 * See the LICENSE file in the root directory of this source tree. 271 */const MP=J("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 272 * @license lucide-react v0.462.0 - ISC 273 * 274 * This source code is licensed under the ISC license. 275 * See the LICENSE file in the root directory of this source tree. 276 */const $P=J("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 277 * @license lucide-react v0.462.0 - ISC 278 * 279 * This source code is licensed under the ISC license. 280 * See the LICENSE file in the root directory of this source tree. 281 */const Ni=J("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 282 * @license lucide-react v0.462.0 - ISC 283 * 284 * This source code is licensed under the ISC license. 285 * See the LICENSE file in the root directory of this source tree. 286 */const qp=J("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Yp="-",UP=e=>{const t=VP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Yp);return a[0]===""&&a.length!==1&&a.shift(),m_(a,t)||FP(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},m_=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?m_(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Yp);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Sy=/^\[(.+)\]$/,FP=e=>{if(Sy.test(e)){const t=Sy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},VP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,113 bytes, line 286
286return zP(Object.entries(e.classGroups),n).forEach(([i,o])=>{Jh(o,r,i,t)}),r},Jh=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Ey(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(BP(s)){Jh(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Jh(o,Ey(t,i),n,r)})})},Ey=(e,t)=>{let n=e;return t.split(Yp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},BP=e=>e.isThemeGetter,zP=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[t+o,a])):i);return[n,s]}):e,WP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},g_="!",HP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,h;for(let b=0;b<a.length;b++){let m=a[b];if(c===0){if(m===s&&(r||a.slice(b,b+i)===t)){l.push(a.slice(u,b)),u=b+i;continue}if(m==="/"){h=b;continue}}m==="["?c++:m==="]"&&c--}const f=l.length===0?a:a.substring(u),p=f.startsWith(g_),w=p?f.substring(1):f,y=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:o}):o},KP=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},GP=e=>({cache:WP(e.cacheSize),parseClassName:HP(e),...UP(e)}),qP=/\s+/,YP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(qP);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(c);let w=!!p,y=r(w?f.substring(0,p):f);if(!y){if(!w){a=c+(a.length>0?" "+a:a);continue}if(y=r(f),!y){a=c+(a.length>0?" "+a:a);continue}w=!1}const b=KP(u).join(":"),m=h?b+g_:b,g=m+y;if(i.includes(g))continue;i.push(g);const v=s(y,w);for(let _=0;_<v.length;++_){const S=v[_];i.push(m+S)}a=c+(a.length>0?" "+a:a)}return a};function QP(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=y_(t))&&(r&&(r+=" "),r+=n);return r}const y_=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=y_(e[r]))&&(n&&(n+=" "),n+=t);return n};function JP(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,h)=>h(u),e());return n=GP(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=YP(l,n);return s(l,u),u}return function(){return i(QP.apply(null,arguments))}}const pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},v_=/^\[(?:([a-z-]+):)?(.+)\]$/i,XP=/^\d+\/\d+$/,ZP=new Set(["px","full","screen"]),eA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tA=/\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$/,nA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dn=e=>fi(e)||ZP.has(e)||XP.test(e),ir=e=>Bi(e,"length",hA),fi=e=>!!e&&!Number.isNaN(Number(e)),bd=e=>Bi(e,"number",fi),lo=e=>!!e&&Number.isInteger(Number(e)),iA=e=>e.endsWith("%")&&fi(e.slice(0,-1)),Z=e=>v_.test(e),or=e=>eA.test(e),oA=new Set(["length","size","percentage"]),aA=e=>Bi(e,oA,w_),lA=e=>Bi(e,"position",w_),cA=new Set(["image","url"]),uA=e=>Bi(e,cA,pA),dA=e=>Bi(e,"",fA),co=()=>!0,Bi=(e,t,n)=>{const r=v_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hA=e=>tA.test(e)&&!nA.test(e),w_=()=>!1,fA=e=>rA.test(e),pA=e=>sA.test(e),mA=()=>{const e=pe("colors"),t=pe("spacing"),n=pe("blur"),r=pe("brightness"),s=pe("borderColor"),i=pe("borderRadius"),o=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),c=pe("grayscale"),u=pe("hueRotate"),h=pe("invert"),f=pe("gap"),p=pe("gradientColorStops"),w=pe("gradientColorStopPositions"),y=pe("inset"),b=pe("margin"),m=pe("opacity"),g=pe("padding"),v=pe("saturate"),_=pe("scale"),S=pe("sepia"),E=pe("skew"),k=pe("space"),T=pe("translate"),R=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",Z,t],O=()=>[Z,t],W=()=>["",Dn,ir],D=()=>["auto",fi,Z],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Z],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[fi,Z];return{cacheSize:500,separator:":",theme:{colors:[co],spacing:[Dn,ir],blur:["none","",or,Z],brightness:q(),borderColor:[e],borderRadius:["n
286one","","full",or,Z],borderSpacing:O(),borderWidth:W(),contrast:q(),grayscale:A(),hueRotate:q(),invert:A(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[iA,ir],inset:$(),margin:$(),opacity:q(),padding:O(),saturate:q(),scale:q(),sepia:A(),skew:q(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[or]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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"],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:[...L(),Z]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lo,Z]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",lo,Z]}],"grid-cols":[{"grid-cols":[co]}],"col-start-end":[{col:["auto",{span:["full",lo,Z]},Z]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[co]}],"row-start-end":[{row:["auto",{span:[lo,Z]},Z]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[or]},or]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",or,ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bd]}],"font-family":[{font:[co]}],"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:["tighter","tight","normal","wide","wider","widest",Z]}],"line-clamp":[{"line-clamp":["none",fi,bd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Dn,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Dn,ir]}],"underline-offset":[{"underline-offset":["auto",Dn,Z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),lA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uA]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 4,877 bytes, line 286
286],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:U()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Dn,Z]}],"outline-w":[{outline:[Dn,ir]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Dn,ir]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",or,dA]}],"shadow-color":[{shadow:[co]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",or,Z]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[v]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[lo,Z]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
286],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Dn,ir,bd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},gA=JP(mA);function xe(...e){return gA(o_(e))}const yA=pP,x_=x.forwardRef(({className:e,...t},n)=>d.jsx(Zb,{ref:n,className:xe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));x_.displayName=Zb.displayName;const vA=Hp("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),b_=x.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(e_,{ref:r,className:xe(vA({variant:t}),e),...n}));b_.displayName=e_.displayName;const wA=x.forwardRef(({className:e,...t},n)=>d.jsx(r_,{ref:n,className:xe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));wA.displayName=r_.displayName;const __=x.forwardRef(({className:e,...t},n)=>d.jsx(s_,{ref:n,className:xe("absolute right-2 top-2 rounded-md p-1 text-foreground
286/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:d.jsx(Ni,{className:"h-4 w-4"})}));__.displayName=s_.displayName;const S_=x.forwardRef(({className:e,...t},n)=>d.jsx(t_,{ref:n,className:xe("text-sm font-semibold",e),...t}));S_.displayName=t_.displayName;const E_=x.forwardRef(({className:e,...t},n)=>d.jsx(n_,{ref:n,className:xe("text-sm opacity-90",e),...t}));E_.displayName=n_.displayName;const xA=I.forwardRef(function(t,n){const{toasts:r}=Ia();return d.jsxs(yA,{children:[r.map(function({id:s,title:i,description:o,action:a,...l}){return d.jsxs(b_,{...l,children:[d.jsxs("div",{className:"grid gap-1",children:[i&&d.jsx(S_,{children:i}),o&&d.jsx(E_,{children:o})]}),a,d.jsx(__,{})]},s)}),d.jsx(x_,{ref:n})]})});var ky=["light","dark"],bA="(prefers-color-scheme: dark)",_A=x.createContext(void 0),SA={setTheme:e=>{},themes:[]},EA=()=>{var e;return(e=x.useContext(_A))!=null?e:SA};x.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?ky.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(w,y=!1,b=!0)=>{let m=o?o[w]:w,g=y?w+"|| ''":`'${m}'`,v="";return s&&b&&!y&&ky.includes(w)&&(v+=`d.style.colorScheme = '${w}';`),n==="class"?y||m?v+=`c.add(${g})`:v+="null":m&&(v+=`d[s](n,${g})`),v},p=e?`!function(){${u}${f(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${bA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var kA=e=>{switch(e){case"success":return PA;case"info":return RA;case"warning":return AA;case"error":return jA;default:return null}},TA=Array(12).fill(0),CA=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},TA.map((n,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),PA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),AA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),RA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),NA=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OA=()=>
286{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Xh=1,IA=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Xh++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
286this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],I.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(LA(l)&&!l.ok){s=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){s=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],t.error!==void 0){s=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Xh++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},pt=new IA,DA=(e,t)=>{let n=(t==null?void 0:t.id)||Xh++;return pt.addToast({title:e,...t,id:n}),n},LA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",MA=DA,$A=()=>pt.toasts,UA=()=>pt.getActiveToasts(),pF=Object.assign(MA,{success:pt.success,info:pt.info,warning:pt.warning,error:pt.error,custom:pt.custom,message:pt.message,promise:pt.promise,dismiss:pt.dismiss,loading:pt.loading},{getHistory:$A,getToasts:UA});function FA(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}FA(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
286left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
286:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
286--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 287`);function hl(e){return e.label!==void 0}var VA=3,BA="32px",zA="16px",Ty=4e3,WA=356,HA=14,KA=20,GA=200;function qt(...e){return e.filter(Boolean).join(" ")}function qA(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var YA=e=>{var t,n,r,s,i,o,a,l,c,u,h;let{invert:f,toast:p,unstyled:w,interacting:y,setHeights:b,visibleToasts:m,heights:g,index:v,toasts:_,expanded:S,removeToast:E,defaultRichColors:k,closeButton:T,style:R,cancelButtonStyle:P,actionButtonStyle:$,className:O="",descriptionClassName:W="",duration:D,position:L,gap:U,loadingIcon:Y,expandByDefault:C,classNames:A,icons:M,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:H}
287=e,[te,se]=I.useState(null),[je,Qe]=I.useState(null),[ae,Ps]=I.useState(!1),[Xn,qr]=I.useState(!1),[Zn,As]=I.useState(!1),[er,Ba]=I.useState(!1),[Fu,za]=I.useState(!1),[Vu,Xi]=I.useState(0),[Rs,qm]=I.useState(0),Zi=I.useRef(p.duration||D||Ty),Ym=I.useRef(null),Yr=I.useRef(null),UE=v===0,FE=v+1<=m,It=p.type,js=p.dismissible!==!1,VE=p.className||"",BE=p.descriptionClassName||"",Wa=I.useMemo(()=>g.findIndex(X=>X.toastId===p.id)||0,[g,p.id]),zE=I.useMemo(()=>{var X;return(X=p.closeButton)!=null?X:T},[p.closeButton,T]),Qm=I.useMemo(()=>p.duration||D||Ty,[p.duration,D]),Bu=I.useRef(0),Ns=I.useRef(0),Jm=I.useRef(0),Os=I.useRef(null),[WE,HE]=L.split("-"),Xm=I.useMemo(()=>g.reduce((X,ue,ve)=>ve>=Wa?X:X+ue.height,0),[g,Wa]),Zm=OA(),KE=p.invert||f,zu=It==="loading";Ns.current=I.useMemo(()=>Wa*U+Xm,[Wa,Xm]),I.useEffect(()=>{Zi.current=Qm},[Qm]),I.useEffect(()=>{Ps(!0)},[]),I.useEffect(()=>{let X=Yr.current;if(X){let ue=X.getBoundingClientRect().height;return qm(ue),b(ve=>[{toastId:p.id,height:ue,position:p.position},...ve]),()=>b(ve=>ve.filter(Wt=>Wt.toastId!==p.id))}},[b,p.id]),I.useLayoutEffect(()=>{if(!ae)return;let X=Yr.current,ue=X.style.height;X.style.height="auto";let ve=X.getBoundingClientRect().height;X.style.height=ue,qm(ve),b(Wt=>Wt.find(Ht=>Ht.toastId===p.id)?Wt.map(Ht=>Ht.toastId===p.id?{...Ht,height:ve}:Ht):[{toastId:p.id,height:ve,position:p.position},...Wt])},[ae,p.title,p.description,b,p.id]);let tr=I.useCallback(()=>{qr(!0),Xi(Ns.current),b(X=>X.filter(ue=>ue.toastId!==p.id)),setTimeout(()=>{E(p)},GA)},[p,E,b,Ns]);I.useEffect(()=>{if(p.promise&&It==="loading"||p.duration===1/0||p.type==="loading")return;let X;return S||y||H&&Zm?(()=>{if(Jm.current<Bu.current){let ue=new Date().getTime()-Bu.current;Zi.current=Zi.current-ue}Jm.current=new Date().getTime()})():Zi.current!==1/0&&(Bu.current=new Date().getTime(),X=setTimeout(()=>{var ue;(ue=p.onAutoClose)==null||ue.call(p,p),tr()},Zi.current)),()=>clearTimeout(X)},[S,y,p,It,H,Zm,tr]),I.useEffect(()=>{p.delete&&tr()},[tr,p.delete]);function GE(){var X,ue,ve;return M!=null&&M.loading?I.createElement("div",{className:qt(A==null?void 0:A.loader,(X=p==null?void 0:p.classNames)==null?void 0:X.loader,"sonner-loader"),"data-visible":It==="loading"},M.loading):Y?I.createElement("div",{className:qt(A==null?void 0:A.loader,(ue=p==null?void 0:p.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":It==="loading"},Y):I.createElement(CA,{className:qt(A==null?void 0:A.loader,(ve=p==null?void 0:p.classNames)==null?void 0:ve.loader),visible:It==="loading"})}return I.createElement("li",{tabIndex:0,ref:Yr,className:qt(O,VE,A==null?void 0:A.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[It],(n=p==null?void 0:p.classNames)==null?void 0:n[It]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":ae,"data-promise":!!p.promise,"data-swiped":Fu,"data-removed":Xn,"data-visible":FE,"data-y-position":WE,"data-x-position":HE,"data-index":v,"data-front":UE,"data-swiping":Zn,"data-dismissible":js,"data-type":It,"data-invert":KE,"data-swipe-out":er,"data-swipe-direction":je,"data-expanded":!!(S||C&&ae),style:{"--index":v,"--toasts-before":v,"--z-index":_.length-v,"--offset":`${Xn?Vu:Ns.current}px`,"--initial-height":C?"auto":`${Rs}px`,...R,...p.style},onDragEnd:()=>{As(!1),se(null),Os.current=null},onPointerDown:X=>{zu||!js||(Ym.current=new Date,Xi(Ns.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(As(!0),Os.current={x:X.clientX,y:X.clientY}))},onPointerUp:()=>{var X,ue,ve,Wt;if(er||!js)return;Os.current=null;let Ht=Number(((X=Yr.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),nr=Number(((ue=Yr.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qr=new Date().getTime()-((ve=Ym.current)==null?void 0:ve.getTime()),Kt=te==="x"?Ht:nr,rr=Math.abs(Kt)/Qr;if(Math.abs(Kt)>=KA||rr>.11){Xi(Ns.current),(Wt=p.onDismiss)==null||Wt.call(p,p),Qe(te==="x"?Ht>0?"right":"left":nr>0?"down":"up"),tr(),Ba(!0),za(!1);return}As(!1),se(null)},onPointerMove:X=>{var ue,ve,Wt,Ht;if(!Os.current||!js||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let nr=X.clientY-Os.current.y,Qr=X.clientX-Os.current.x,Kt=(ve=e.swipeDirections)!=null?ve:qA(L);!te&&(Math.abs(Qr)>1||Math.abs(nr)>1)&&se(Math.abs(Qr)>Math.abs(nr)?"x":"y");let rr={x:0,y:0};te==="y"?(Kt.includes("top")||Kt.includes("bottom"))&&(Kt.includes("top")&&nr<0||Kt.includes("bottom")&&nr>0)&&(rr.y=nr):te==="x"&&(Kt.includes("left")||Kt.includes("right"))&&(Kt.includes("left")&&Qr<0||Kt.includes("right")&&Qr>0)&&(rr.x=Qr),(Math.abs(rr.x)>0||Math.abs(rr.y)>0)&&za(!0),(Wt=Yr.current)==null||Wt.style.setProperty("--swipe-amount-x",`${rr.x}px`),(Ht=Yr.current)==null||Ht.style.setProperty("--swipe-amount-y",`${rr.y}px`)}},zE&&!p.jsx?I.createElement("button",{"aria-label":q,"data-disabled":zu,"data-close-button":!0,onClick:zu||!js?()=>{}:()=>{var X;
287tr(),(X=p.onDismiss)==null||X.call(p,p)},className:qt(A==null?void 0:A.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:NA):null,p.jsx||x.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:I.createElement(I.Fragment,null,It||p.icon||p.promise?I.createElement("div",{"data-icon":"",className:qt(A==null?void 0:A.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||GE():null,p.type!=="loading"?p.icon||(M==null?void 0:M[It])||kA(It):null):null,I.createElement("div",{"data-content":"",className:qt(A==null?void 0:A.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:qt(A==null?void 0:A.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?I.createElement("div",{"data-description":"",className:qt(W,BE,A==null?void 0:A.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),x.isValidElement(p.cancel)?p.cancel:p.cancel&&hl(p.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:X=>{var ue,ve;hl(p.cancel)&&js&&((ve=(ue=p.cancel).onClick)==null||ve.call(ue,X),tr())},className:qt(A==null?void 0:A.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,x.isValidElement(p.action)?p.action:p.action&&hl(p.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:X=>{var ue,ve;hl(p.action)&&((ve=(ue=p.action).onClick)==null||ve.call(ue,X),!X.defaultPrevented&&tr())},className:qt(A==null?void 0:A.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function Cy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function QA(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?zA:BA;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var JA=x.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:h,duration:f,style:p,visibleToasts:w=VA,toastOptions:y,dir:b=Cy(),gap:m=HA,loadingIcon:g,icons:v,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[E,k]=I.useState([]),T=I.useMemo(()=>Array.from(new Set([r].concat(E.filter(H=>H.position).map(H=>H.position)))),[E,r]),[R,P]=I.useState([]),[$,O]=I.useState(!1),[W,D]=I.useState(!1),[L,U]=I.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=I.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=I.useRef(null),M=I.useRef(!1),q=I.useCallback(H=>{k(te=>{var se;return(se=te.find(je=>je.id===H.id))!=null&&se.delete||pt.dismiss(H.id),te.filter(({id:je})=>je!==H.id)})},[]);return I.useEffect(()=>pt.subscribe(H=>{if(H.dismiss){k(te=>te.map(se=>se.id===H.id?{...se,delete:!0}:se));return}setTimeout(()=>{Rb.flushSync(()=>{k(te=>{let se=te.findIndex(je=>je.id===H.id);return se!==-1?[...te.slice(0,se),{...te[se],...H},...te.slice(se+1)]:[H,...te]})})})}),[]),I.useEffect(()=>{if(u!=="system"){U(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:te})=>{U(te?"dark":"light")})}catch{H.addListener(({matches:se})=>{try{U(se?"dark":"light")}catch(je){console.error(je)}})}},[u]),I.useEffect(()=>{E.length<=1&&O(!1)},[E]),I.useEffect(()=>{let H=te=>{var se,je;s.every(Qe=>
287te[Qe]||te.code===Qe)&&(O(!0),(se=Y.current)==null||se.focus()),te.code==="Escape"&&(document.activeElement===Y.current||(je=Y.current)!=null&&je.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),I.useEffect(()=>{if(Y.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,M.current=!1)}},[Y.current]),I.createElement("section",{ref:t,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((H,te)=>{var se;let[je,Qe]=H.split("-");return E.length?I.createElement("ol",{key:H,dir:b==="auto"?Cy():b,tabIndex:-1,ref:Y,className:a,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":je,"data-lifted":$&&E.length>1&&!i,"data-x-position":Qe,style:{"--front-toast-height":`${((se=R[0])==null?void 0:se.height)||0}px`,"--width":`${WA}px`,"--gap":`${m}px`,...p,...QA(l,c)},onBlur:ae=>{M.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(M.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||M.current||(M.current=!0,A.current=ae.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{W||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},E.filter(ae=>!ae.position&&te===0||ae.position===H).map((ae,Ps)=>{var Xn,qr;return I.createElement(YA,{key:ae.id,icons:v,index:Ps,toast:ae,defaultRichColors:h,duration:(Xn=y==null?void 0:y.duration)!=null?Xn:f,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:w,closeButton:(qr=y==null?void 0:y.closeButton)!=null?qr:o,interacting:W,position:H,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:q,toasts:E.filter(Zn=>Zn.position==ae.position),heights:R.filter(Zn=>Zn.position==ae.position),setHeights:P,expandByDefault:i,gap:m,loadingIcon:g,expanded:$,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const XA=I.forwardRef(function(t,n){const{theme:r="system"}=EA();return d.jsx(JA,{theme:r,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})});var ZA=Cw.useId||(()=>{}),eR=0;function tR(e){const[t,n]=x.useState(ZA());return Mr(()=>{e||n(r=>r??String(eR++))},[e]),e||(t?`radix-${t}`:"")}const nR=["top","right","bottom","left"],Ur=Math.min,Tt=Math.max,Nc=Math.round,fl=Math.floor,An=e=>({x:e,y:e}),rR={left:"right",right:"left",bottom:"top",top:"bottom"},sR={start:"end",end:"start"};function Zh(e,t,n){return Tt(e,Ur(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function zi(e){return e.split("-")[1]}function Qp(e){return e==="x"?"y":"x"}function Jp(e){return e==="y"?"height":"width"}const iR=new Set(["top","bottom"]);function Tn(e){return iR.has(qn(e))?"y":"x"}function Xp(e){return Qp(Tn(e))}function oR(e,t,n){n===void 0&&(n=!1);const r=zi(e),s=Xp(e),i=Jp(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Oc(o)),[o,Oc(o)]}function aR(e){const t=Oc(e);return[ef(e),t,ef(t)]}function ef(e){return e.replace(/start|end/g,t=>sR[t])}const Py=["left","right"],Ay=["right","left"],lR=["top","bottom"],cR=["bottom","top"];function uR(e,t,n){switch(e){case"top":case"bottom":return n?t?Ay:Py:t?Py:Ay;case"left":case"right":return t?lR:cR;default:return[]}}function dR(e,t,n,r){const s=zi(e);let i=uR(qn(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(ef)))),i}function Oc(e){return e.replace(/left|right|bottom|top/g,t=>rR[t])}function hR(e){return{top:0,right:0,bottom:0,left:0,...e}}function k_(e){return typeof e!="number"?hR(e):{top:e,right:e,bottom:e,left:e}}function Ic(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Ry(e,t,n){let{reference:r,floating:s}=e;const i=Tn(t),o=Xp(t),a=Jp(o),l=qn(t),c=i==="y",u=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-s.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(zi(t)){case"start":p[o]-=f*(n&&c?-1:1);break;case"end":p[o]+=f*(n&&c?-1:1);break}return p}const fR=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,186 bytes, line 287
287=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:h}=Ry(c,r,l),f=r,p={},w=0;for(let y=0;y<a.length;y++){const{name:b,fn:m}=a[y],{x:g,y:v,data:_,reset:S}=await m({x:u,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});u=g??u,h=v??h,p={...p,[b]:{...p[b],..._}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:u,y:h}=Ry(c,f,l)),y=-1)}return{x:u,y:h,placement:f,strategy:s,middlewareData:p}};async function aa(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Gn(t,e),w=k_(p),b=a[f?h==="floating"?"reference":"floating":h],m=Ic(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=Ic(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:v,strategy:l}):g);return{top:(m.top-S.top+w.top)/_.y,bottom:(S.bottom-m.bottom+w.bottom)/_.y,left:(m.left-S.left+w.left)/_.x,right:(S.right-m.right+w.right)/_.x}}const pR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Gn(e,t)||{};if(c==null)return{};const h=k_(u),f={x:n,y:r},p=Xp(s),w=Jp(p),y=await o.getDimensions(c),b=p==="y",m=b?"top":"left",g=b?"bottom":"right",v=b?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[p]-f[p]-i.floating[w],S=f[p]-i.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let k=E?E[v]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=a.floating[v]||i.floating[w]);const T=_/2-S/2,R=k/2-y[w]/2-1,P=Ur(h[m],R),$=Ur(h[g],R),O=P,W=k-y[w]-$,D=k/2-y[w]/2+T,L=Zh(O,D,W),U=!l.arrow&&zi(s)!=null&&D!==L&&i.reference[w]/2-(D<O?P:$)-y[w]/2<0,Y=U?D<O?D-O:D-W:0;return{[p]:f[p]+Y,data:{[p]:L,centerOffset:D-L-Y,...U&&{alignmentOffset:Y}},reset:U}}}),mR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...b}=Gn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=qn(s),g=Tn(a),v=qn(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(v||!y?[Oc(a)]:aR(a)),E=w!=="none";!f&&E&&S.push(...dR(a,y,w,_));const k=[a,...S],T=await aa(t,b),R=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&R.push(T[m]),h){const D=oR(s,o,_);R.push(T[D[0]],T[D[1]])}if(P=[...P,{placement:s,overflows:R}],!R.every(D=>D<=0)){var $,O;const D=((($=i.flip)==null?void 0:$.index)||0)+1,L=k[D];if(L&&(!(h==="alignment"?g!==Tn(L):!1)||P.every(C=>C.overflows[0]>0&&Tn(C.placement)===g)))return{data:{index:D,overflows:P},reset:{placement:L}};let U=(O=P.filter(Y=>Y.overflows[0]<=0).sort((Y,C)=>Y.overflows[1]-C.overflows[1])[0])==null?void 0:O.placement;if(!U)switch(p){case"bestFit":{var W;const Y=(W=P.filter(C=>{if(E){const A=Tn(C.placement);return A===g||A==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(A=>A>0).reduce((A,M)=>A+M,0)]).sort((C,A)=>C[1]-A[1])[0])==null?void 0:W[0];Y&&(U=Y);break}case"initialPlacement":U=a;break}if(s!==U)return{reset:{placement:U}}}return{}}}};function jy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ny(e){return nR.some(t=>e[t]>=0)}const gR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Gn(e,t);switch(r){case"referenceHidden":{const i=await aa(t,{...s,elementContext:"reference"}),o=jy(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ny(o)}}}case"escaped":{const i=await aa(t,{...s,altBoundary:!0}),o=jy(i,n.floating);return{data:{escapedOffsets:o,escaped:Ny(o)}}}default:return{}}}}},T_=new Set(["left","top"]);async function yR(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=qn(n),a=zi(n),l=Tn(n)==="y",c=T_.has(o)?-1:1,u=i&&l?-1:1,h=Gn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const vR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await yR(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},wR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:m,y:g}=b;return{x:m,y:g}}},...l}=Gn(e,t),c={x:n,y:r},u=await aa(t,l),h=Tn(qn(s)),f=Qp(h);let p=c[f],w=c[h];if(i){const b=f==="y"?"top":"left",m=f==="y"?"bottom":"right",g=p+u[b],v=p-u[m];p=Zh(g,p,v)}if(o){const b=h==="y"?"top":"left",m=h==="y"?"bottom":"right",g=w+u[b],v=w-u[m];w=Zh(g,w,v)}const y=a.fn({...t,[f]:p,[h]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:i,[h]:o}}}}}},xR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Gn(e,t),u={x:n,y:r},h=Tn(s),f=Qp(h);let p=u[f],w=u[h];const y=Gn(a,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const v=f==="y"?"height":"width",_=i.reference[f]-i.floating[v]+b.mainAxis,S=i.reference[f]+i.reference[v]-b.mainAxis;p<_?p=_:p>S&&(p=S)}if(c){var m,g;const v=f==="y"?"width":"height",_=T_.has(qn(s)),S=i.reference[h]-i.floating[v]+(_&&((m=o.offset)==null?void 0:m[h])||0)+(_?0:b.crossAxis),E=i.reference[h]+i.reference[v]+(_?0:((g=o.offset)==null?void 0:g[h])||0)-(_?b.crossAxis:0);w<S?w=S:w>E&&(w=E)}return{[f]:p,[h]:w}}}},bR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Gn(e,t),u=await aa(t,c),h=qn(s),f=zi(s),p=Tn(s)==="y",{width:w,height:y}=i.floating;let b,m;h==="top"||h==="bottom"?(b=h,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=h,b=f==="end"?"top":"bottom");const g=y-u.top-u.bottom,v=w-u.left-u.right,_=Ur(y-u[b],g),S=Ur(w-u[m],v),E=!t.middlewareData.shift;let k=_,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=g),E&&!f){const P=Tt(u.left,0),$=Tt(u.right,0),O=Tt(u.top,0),W=Tt(u.bottom,0);p?T=w-2*(P!==0||$!==0?P+$:Tt(u.left,u.right)):k=y-2*(O!==0||W!==0?O+W:Tt(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:k});const R=await o.getDimensions(a.floating);return w!==R.width||y!==R.height?{reset:{rects:!0}}:{}}}};function xu(){return typeof window<"u"}function Wi(e){return C_(e)?(e.nodeName||"").toLowerCase():"#document"}function Rt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function In(e){var t;return(t=(C_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function C_(e){return xu()?e instanceof Node||e instanceof Rt(e).Node:!1}function fn(e){return xu()?e instanceof Element||e instanceof Rt(e).Element:!1}function Nn(e){return xu()?e instanceof HTMLElement||e instanceof Rt(e).HTMLElement:!1}function Oy(e){return!xu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rt(e).ShadowRoot}const _R=new Set(["inline","contents"]);function Da(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!_R.has(s)}const SR=new Set(["table","td","th"]);function ER(e){return SR.has(Wi(e))}const kR=[":popover-open",":modal"];function bu(e){return kR.some(t=>{try{return e.matches(t)}catch{return!1}})}const TR=["transform","translate","scale","rotate","perspective"],CR=["transform","translate","scale","rotate","perspective","filter"],PR=["paint","layout","strict","content"];function Zp(e){const t=em(),n=fn(e)?pn(e):e;return TR.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||CR.some(r=>(n.willChange||"").includes(r))||PR.some(r=>(n.contain||"").includes(r))}function AR(e){let t=Fr(e);for(;Nn(t)&&!Oi(t);){if(Zp(t))return t;if(bu(t))return null;t=Fr(t)}
vendor: 4,872 bytes, line 287
287return null}function em(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const RR=new Set(["html","body","#document"]);function Oi(e){return RR.has(Wi(e))}function pn(e){return Rt(e).getComputedStyle(e)}function _u(e){return fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fr(e){if(Wi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oy(e)&&e.host||In(e);return Oy(t)?t.host:t}function P_(e){const t=Fr(e);return Oi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nn(t)&&Da(t)?t:P_(t)}function la(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=P_(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Rt(s);if(i){const a=tf(o);return t.concat(o,o.visualViewport||[],Da(s)?s:[],a&&n?la(a):[])}return t.concat(s,la(s,[],n))}function tf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A_(e){const t=pn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Nc(n)!==i||Nc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function tm(e){return fn(e)?e:e.contextElement}function pi(e){const t=tm(e);if(!Nn(t))return An(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=A_(t);let o=(i?Nc(n.width):n.width)/r,a=(i?Nc(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const jR=An(0);function R_(e){const t=Rt(e);return!em()||!t.visualViewport?jR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rt(e)?!1:t}function ks(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=tm(e);let o=An(1);t&&(r?fn(r)&&(o=pi(r)):o=pi(e));const a=NR(i,n,r)?R_(i):An(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,h=s.height/o.y;if(i){const f=Rt(i),p=r&&fn(r)?Rt(r):r;let w=f,y=tf(w);for(;y&&r&&p!==w;){const b=pi(y),m=y.getBoundingClientRect(),g=pn(y),v=m.left+(y.clientLeft+parseFloat(g.paddingLeft))*b.x,_=m.top+(y.clientTop+parseFloat(g.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,h*=b.y,l+=v,c+=_,w=Rt(y),y=tf(w)}}return Ic({width:u,height:h,x:l,y:c})}function nm(e,t){const n=_u(e).scrollLeft;return t?t.left+n:ks(In(e)).left+n}function j_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:nm(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function OR(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=In(r),a=t?bu(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=An(1);const u=An(0),h=Nn(r);if((h||!h&&!i)&&((Wi(r)!=="body"||Da(o))&&(l=_u(r)),Nn(r))){const p=ks(r);c=pi(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=o&&!h&&!i?j_(o,l,!0):An(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function IR(e){return Array.from(e.getClientRects())}function DR(e){const t=In(e),n=_u(e),r=e.ownerDocument.body,s=Tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+nm(e);const a=-n.scrollTop;return pn(r).direction==="rtl"&&(o+=Tt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function LR(e,t){const n=Rt(e),r=In(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=em();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const MR=new Set(["absolute","fixed"]);function $R(e,t){const n=ks(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Nn(e)?pi(e):An(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Iy(e,t,n){let r;if(t==="viewport")r=LR(e,n);else if(t==="document")r=DR(In(e));else if(fn(t))r=$R(t,n);else{const s=R_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Ic(r)}function N_(e,t){const n=Fr(e);return n===t||!fn(n)||Oi(n)?!1:pn(n).position==="fixed"||N_(n,t)}function UR(e,t){const n=t.get(e);if(n)return n;let r=la(e,[],!1).filter(a=>fn(a)&&Wi(a)!=="body"),s=null;const i=pn(e).position==="fixed";let o=i?Fr(e):e;for(;fn(o)&&!Oi(o);){const a=pn(o),l=Zp(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&MR.has(s.position)||Da(o)&&!l&&N_(e,o))?r=r.filter(u=>u!==o):s=a,o=Fr(o)}return t.set(e,r),r}function FR(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?bu(t)?[]:UR(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const h=Iy(t,u,s);return c.top=Tt(h.top,c.top),c.right=Ur(h.right,c.right),c.bottom=Ur(h.bottom,c.bottom),c.left=Tt(h.left,c.left),c},Iy(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function VR(e){const{width:t,height:n}=A_(e);return{width:t,height:n}}
vendor: 8,997 bytes, line 287
287function BR(e,t,n){const r=Nn(t),s=In(t),i=n==="fixed",o=ks(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=An(0);function c(){l.x=nm(s)}if(r||!r&&!i)if((Wi(t)!=="body"||Da(s))&&(a=_u(t)),r){const p=ks(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?j_(s,a):An(0),h=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:h,y:f,width:o.width,height:o.height}}function _d(e){return pn(e).position==="static"}function Dy(e,t){if(!Nn(e)||pn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return In(e)===n&&(n=n.ownerDocument.body),n}function O_(e,t){const n=Rt(e);if(bu(e))return n;if(!Nn(e)){let s=Fr(e);for(;s&&!Oi(s);){if(fn(s)&&!_d(s))return s;s=Fr(s)}return n}let r=Dy(e,t);for(;r&&ER(r)&&_d(r);)r=Dy(r,t);return r&&Oi(r)&&_d(r)&&!Zp(r)?n:r||AR(e)||n}const zR=async function(e){const t=this.getOffsetParent||O_,n=this.getDimensions,r=await n(e.floating);return{reference:BR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WR(e){return pn(e).direction==="rtl"}const HR={convertOffsetParentRelativeRectToViewportRelativeRect:OR,getDocumentElement:In,getClippingRect:FR,getOffsetParent:O_,getElementRects:zR,getClientRects:IR,getDimensions:VR,getScale:pi,isElement:fn,isRTL:WR};function I_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KR(e,t){let n=null,r;const s=In(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:h,width:f,height:p}=c;if(a||t(),!f||!p)return;const w=fl(h),y=fl(s.clientWidth-(u+f)),b=fl(s.clientHeight-(h+p)),m=fl(u),v={rootMargin:-w+"px "+-y+"px "+-b+"px "+-m+"px",threshold:Tt(0,Ur(1,l))||1};let _=!0;function S(E){const k=E[0].intersectionRatio;if(k!==l){if(!_)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!I_(c,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return o(!0),i}function GR(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=tm(e),u=s||i?[...c?la(c):[],...la(t)]:[];u.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const h=c&&a?KR(c,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(m=>{let[g]=m;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let w,y=l?ks(e):null;l&&b();function b(){const m=ks(e);y&&!I_(y,m)&&n(),y=m,w=requestAnimationFrame(b)}return n(),()=>{var m;u.forEach(g=>{s&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),h==null||h(),(m=p)==null||m.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const qR=vR,YR=wR,QR=mR,JR=bR,XR=gR,Ly=pR,ZR=xR,ej=(e,t,n)=>{const r=new Map,s={platform:HR,...n},i={...s.platform,_c:r};return fR(e,t,{...s,platform:i})};var tj=typeof document<"u",nj=function(){},Hl=tj?x.useLayoutEffect:nj;function Dc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dc(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Dc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function D_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function My(e,t){const n=D_(e);return Math.round(t*n)/n}function Sd(e){const t=x.useRef(e);return Hl(()=>{t.current=e}),t}function rj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,h]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=x.useState(r);Dc(f,r)||p(r);const[w,y]=x.useState(null),[b,m]=x.useState(null),g=x.useCallback(C=>{C!==E.current&&(E.current=C,y(C))},[]),v=x.useCallback(C=>{C!==k.current&&(k.current=C,m(C))},[]),_=i||w,S=o||b,E=x.useRef(null),k=x.useRef(null),T=x.useRef(u),R=l!=null,P=Sd(l),$=Sd(s),O=Sd(c),W=x.useCallback(()=>{if(!E.current||!k.current)return;const C={placement:t,strategy:n,middleware:f};$.current&&(C.platform=$.current),ej(E.current,k.current,C).then(A=>{const M={...A,isPositioned:O.current!==!1};D.current&&!Dc(T.current,M)&&(T.current=M,Oa.flushSync(()=>{h(M)}))})},[f,t,n,$,O]);Hl(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[c]);const D=x.useRef(!1);Hl(()=>(D.current=!0,()=>{D.current=!1}),[]),Hl(()=>{if(_&&(E.current=_),S&&(k.current=S),_&&S){if(P.current)return P.current(_,S,W);W()}},[_,S,W,P,R]);const L=x.useMemo(()=>({reference:E,floating:k,setReference:g,setFloating:v}),[g,v]),U=x.useMemo(()=>({reference:_,floating:S}),[_,S]),Y=x.useMemo(()=>{const C={position:n,left:0,top:0};if(!U.floating)return C;const A=My(U.floating,u.x),M=My(U.floating,u.y);return a?{...C,transform:"translate("+A+"px, "+M+"px)",...D_(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:M}},[n,a,U.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:W,refs:L,elements:U,floatingStyles:Y}),[u,W,L,U,Y])}const sj=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ly({element:r.current,padding:s}).fn(n):{}:r?Ly({element:r,padding:s}).fn(n):{}}}},ij=(e,t)=>({...qR(e),options:[e,t]}),oj=(e,t)=>({...YR(e),options:[e,t]}),aj=(e,t)=>({...ZR(e),options:[e,t]}),lj=(e,t)=>({...QR(e),options:[e,t]}),cj=(e,t)=>({...JR(e),options:[e,t]}),uj=(e,t)=>({...XR(e),options:[e,t]}),dj=(e,t)=>({...sj(e),options:[e,t]});var hj="Arrow",L_=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return d.jsx(ft.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});L_.displayName=hj;var fj=L_;function pj(e){const[t,n]=x.useState(void 0);return Mr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var rm="Popper",[M_,$_]=pu(rm),[mj,U_]=M_(rm),F_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=x.useState(null);return d.jsx(mj,{scope:t,anchor:r,onAnchorChange:s,children:n})};F_.displayName=rm;var V_="PopperAnchor",B_=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=U_(V_,n),o=x.useRef(null),a=dn(t,o);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:d.jsx(ft.div,{...s,ref:a})});B_.displayName=V_;var sm="PopperContent",[gj,yj]=M_(sm),z_=x.forwardRef((e,t)=>{var ae,Ps,Xn,qr,Zn,As;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:w,...y}=e,b=U_(sm,n),[m,g]=x.useState(null),v=dn(t,er=>g(er)),[_,S]=x.useState(null),E=pj(_),k=(E==null?void 0:E.width)??0,T=(E==null?void 0:E.height)??0,R=r+(i!=="center"?"-"+i:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},$=Array.isArray(c)?c:[c],O=$.length>0,W={padding:P,boundary:$.filter(wj),altBoundary:O},{refs:D,floatingStyles:L,placement:U,isPositioned:Y,middlewareData:C}=rj({strategy:"fixed",placement:R,whileElementsMounted:(...er)=>GR(...er,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[ij({mainAxis:s+T,alignmentAxis:o}),l&&oj({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?aj():void 0,...W}),l&&lj({...W}),cj({...W,apply:({elements:er,rects:Ba,availableWidth:Fu,availableHeight:za})=>{const{width:Vu,height:Xi}=Ba.reference,Rs=er.floating.style;Rs.setProperty("--radix-popper-available-width",`${Fu}px`),Rs.setProperty("--radix-popper-available-height",`${za}px`),Rs.setProperty("--radix-popper-anchor-width",`${Vu}px`),Rs.setProperty("--radix-popper-anchor-height",`${Xi}px`)}}),_&&dj({element:_,padding:a}),xj({arrowWidth:k,arrowHeight:T}),f&&uj({strategy:"referenceHidden",...W})]}),[A,M]=K_(U),q=jn(w);Mr(()=>{Y&&(q==null||q())},[Y,q]);const H=(ae=C.arrow)==null?void 0:ae.x,te=(Ps=C.arrow)==null?void 0:Ps.y,se=((Xn=C.arrow)==null?void 0:Xn.
287centerOffset)!==0,[je,Qe]=x.useState();return Mr(()=>{m&&Qe(window.getComputedStyle(m).zIndex)},[m]),d.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:Y?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(qr=C.transformOrigin)==null?void 0:qr.x,(Zn=C.transformOrigin)==null?void 0:Zn.y].join(" "),...((As=C.hide)==null?void 0:As.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(gj,{scope:n,placedSide:A,onArrowChange:S,arrowX:H,arrowY:te,shouldHideArrow:se,children:d.jsx(ft.div,{"data-side":A,"data-align":M,...y,ref:v,style:{...y.style,animation:Y?void 0:"none"}})})})});z_.displayName=sm;var W_="PopperArrow",vj={top:"bottom",right:"left",bottom:"top",left:"right"},H_=x.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=yj(W_,r),o=vj[i.placedSide];return d.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:d.jsx(fj,{...s,ref:n,style:{...s.style,display:"block"}})})});H_.displayName=W_;function wj(e){return e!==null}var xj=e=>({name:"transformOrigin",options:e,fn(t){var b,m,g;const{placement:n,rects:r,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=K_(n),h={start:"0%",center:"50%",end:"100%"}[u],f=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,p=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let w="",y="";return c==="bottom"?(w=o?h:`${f}px`,y=`${-l}px`):c==="top"?(w=o?h:`${f}px`,y=`${r.floating.height+l}px`):c==="right"?(w=`${-l}px`,y=o?h:`${p}px`):c==="left"&&(w=`${r.floating.width+l}px`,y=o?h:`${p}px`),{data:{x:w,y}}}});function K_(e){const[t,n="center"]=e.split("-");return[t,n]}var bj=F_,_j=B_,Sj=z_,Ej=H_,[Su,mF]=pu("Tooltip",[$_]),Eu=$_(),G_="TooltipProvider",kj=700,nf="tooltip.open",[Tj,im]=Su(G_),q_=e=>{const{__scopeTooltip:t,delayDuration:n=kj,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=x.useState(!0),l=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(Tj,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:x.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};q_.displayName=G_;var ku="Tooltip",[Cj,Tu]=Su(ku),Y_=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=im(ku,e.__scopeTooltip),c=Eu(t),[u,h]=x.useState(null),f=tR(),p=x.useRef(0),w=o??l.disableHoverableContent,y=a??l.delayDuration,b=x.useRef(!1),[m=!1,g]=Ub({prop:r,defaultProp:s,onChange:k=>{k?(l.onOpen(),document.dispatchEvent(new CustomEvent(nf))):l.onClose(),i==null||i(k)}}),v=x.useMemo(()=>m?b.current?"delayed-open":"instant-open":"closed",[m]),_=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,g(!0)},[g]),S=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),E=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,g(!0),p.current=0},y)},[y,g]);return x.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),d.jsx(bj,{...c,children:d.jsx(Cj,{scope:t,contentId:f,open:m,stateAttribute:v,trigger:u,onTriggerChange:h,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayed?E():_()},[l.isOpenDelayed,E,_]),onTriggerLeave:x.useCallback(()=>{w?S():(window.clearTimeout(p.current),p.current=0)},[S,w]),onOpen:_,onClose:S,disableHoverableContent:w,children:n})})};Y_.displayName=ku;var rf="TooltipTrigger",Q_=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Tu(rf,n),i=im(rf,n),o=Eu(n),a=x.useRef(null),l=dn(t,a,s.onTriggerChange),c=x.useRef(!1),u=x.useRef(!1),h=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(_j,{asChild:!0,...o,children:d.jsx(ft.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:$e(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:$e(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:$e(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:$e(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:$e(e.onBlur,s.onClose),onClick:$e(e.onClick,s.onClose)})})});Q_.displayName=rf;var Pj="TooltipPortal",[gF,Aj]=Su(Pj,{forceMount:void 0}),Ii="TooltipContent",J_=x.forwardRef((e,t)=>
vendor: 4,630 bytes, line 287
287{const n=Aj(Ii,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Tu(Ii,e.__scopeTooltip);return d.jsx(Vp,{present:r||o.open,children:o.disableHoverableContent?d.jsx(X_,{side:s,...i,ref:t}):d.jsx(Rj,{side:s,...i,ref:t})})}),Rj=x.forwardRef((e,t)=>{const n=Tu(Ii,e.__scopeTooltip),r=im(Ii,e.__scopeTooltip),s=x.useRef(null),i=dn(t,s),[o,a]=x.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:h}=r,f=x.useCallback(()=>{a(null),h(!1)},[h]),p=x.useCallback((w,y)=>{const b=w.currentTarget,m={x:w.clientX,y:w.clientY},g=Ij(m,b.getBoundingClientRect()),v=Dj(m,g),_=Lj(y.getBoundingClientRect()),S=$j([...v,..._]);a(S),h(!0)},[h]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&u){const w=b=>p(b,u),y=b=>p(b,l);return l.addEventListener("pointerleave",w),u.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",y)}}},[l,u,p,f]),x.useEffect(()=>{if(o){const w=y=>{const b=y.target,m={x:y.clientX,y:y.clientY},g=(l==null?void 0:l.contains(b))||(u==null?void 0:u.contains(b)),v=!Mj(m,o);g?f():v&&(f(),c())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,u,o,c,f]),d.jsx(X_,{...e,ref:i})}),[jj,Nj]=Su(ku,{isInside:!1}),X_=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Tu(Ii,n),c=Eu(n),{onClose:u}=l;return x.useEffect(()=>(document.addEventListener(nf,u),()=>document.removeEventListener(nf,u)),[u]),x.useEffect(()=>{if(l.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),d.jsx(Fp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:d.jsxs(Sj,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Ob,{children:r}),d.jsx(jj,{scope:n,isInside:!0,children:d.jsx(QC,{id:l.contentId,role:"tooltip",children:s||r})})]})})});J_.displayName=Ii;var Z_="TooltipArrow",Oj=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Eu(n);return Nj(Z_,n).isInside?null:d.jsx(Ej,{...s,...r,ref:t})});Oj.displayName=Z_;function Ij(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Dj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Lj(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function Mj(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(s=!s)}return s}function $j(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Uj(t)}function Uj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Fj=q_,Vj=Y_,Bj=Q_,e1=J_;const zj=Fj,yF=Vj,vF=Bj,Wj=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(e1,{ref:r,sideOffset:t,className:xe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
287de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Wj.displayName=e1.displayName;var Cu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Pu=typeof window>"u"||"Deno"in globalThis;function Zt(){}function Hj(e,t){return typeof e=="function"?e(t):e}function Kj(e){return typeof e=="number"&&e>=0&&e!==1/0}function Gj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $y(e,t){return typeof e=="function"?e(t):e}function qj(e,t){return typeof e=="function"?e(t):e}function Uy(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==om(o,t.options))return!1}else if(!ua(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Fy(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ca(t.options.mutationKey)!==ca(i))return!1}else if(!ua(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function om(e,t){return((t==null?void 0:t.queryKeyHashFn)||ca)(e)}function ca(e){return JSON.stringify(e,(t,n)=>sf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ua(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ua(e[n],t[n])):!1}function t1(e,t){if(e===t)return e;const n=Vy(e)&&Vy(t);if(n||sf(e)&&sf(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=t1(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function wF(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Vy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sf(e){if(!By(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!By(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function By(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yj(e){return new Promise(t=>{setTimeout(t,e)})}function Qj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?t1(e,t):t}function Jj(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xj(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var am=Symbol();function n1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===am?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var hs,yr,gi,lw,Zj=(lw=class extends Cu{constructor(){super();le(this,hs);le(this,yr);le(this,gi);ee(this,gi,t=>{if(!Pu&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,yr)||this.setEventListener(j(this,gi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,yr))==null||t.call(this),ee(this,yr,void 0))}setEventListener(t){var n;ee(this,gi,t),(n=j(this,yr))==null||n.call(this),ee(this,yr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,hs)!==t&&(ee(this,hs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,hs)=="boolean"?j(this,hs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hs=new WeakMap,yr=new WeakMap,gi=new WeakMap,lw),r1=new Zj,yi,vr,vi,cw,e2=(cw=class extends Cu{constructor(){super();le(this,yi,!0);le(this,vr);le(this,vi);ee(this,vi,t=>{if(!Pu&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,vr)||this.setEventListener(j(this,vi))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,vr))==null||t.call(this),ee(this,vr,void 0))}setEventListener(t){var n;ee(this,vi,t),(n=j(this,vr))==null||n.call(this),ee(this,vr,t(this.setOnline.bind(this)))}setOnline(t){j(this,yi)!==t&&(ee(this,yi,t),this.listeners.forEac
vendor: 18,125 bytes, line 287
287h(r=>{r(t)}))}isOnline(){return j(this,yi)}},yi=new WeakMap,vr=new WeakMap,vi=new WeakMap,cw),Lc=new e2;function t2(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function n2(e){return Math.min(1e3*2**e,3e4)}function s1(e){return(e??"online")==="online"?Lc.isOnline():!0}var i1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ed(e){return e instanceof i1}function o1(e){let t=!1,n=0,r=!1,s;const i=t2(),o=y=>{var b;r||(f(new i1(y)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>r1.isFocused()&&(e.networkMode==="always"||Lc.isOnline())&&e.canRun(),u=()=>s1(e.networkMode)&&e.canRun(),h=y=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),i.resolve(y))},f=y=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),i.reject(y))},p=()=>new Promise(y=>{var b;s=m=>{(r||c())&&y(m)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(r)return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(m){y=Promise.reject(m)}Promise.resolve(y).then(h).catch(m=>{var E;if(r)return;const g=e.retry??(Pu?0:3),v=e.retryDelay??n2,_=typeof v=="function"?v(n,m):v,S=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,m);if(t||!S){f(m);return}n++,(E=e.onFail)==null||E.call(e,n,m),Yj(_).then(()=>c()?void 0:p()).then(()=>{t?f(m):w()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?w():p().then(w),i)}}function r2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var at=r2(),fs,uw,a1=(uw=class{constructor(){le(this,fs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kj(this.gcTime)&&ee(this,fs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pu?1/0:5*60*1e3))}clearGcTimeout(){j(this,fs)&&(clearTimeout(j(this,fs)),ee(this,fs,void 0))}},fs=new WeakMap,uw),wi,xi,Dt,et,Ta,ps,tn,Ln,dw,s2=(dw=class extends a1{constructor(t){super();le(this,tn);le(this,wi);le(this,xi);le(this,Dt);le(this,et);le(this,Ta);le(this,ps);ee(this,ps,!1),ee(this,Ta,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Dt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,wi,o2(this.options)),this.state=t.state??j(this,wi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,et))==null?void 0:t.promise}setOptions(t){this.options={...j(this,Ta),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Dt).remove(this)}setData(t,n){const r=Qj(this.state.data,t,this.options);return Je(this,tn,Ln).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Je(this,tn,Ln).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,et))==null?void 0:r.promise;return(s=j(this,et))==null||s.cancel(t),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,wi))}isActive(){return this.observers.some(t=>qj(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===am||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Gj(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,et))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,et))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,Dt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,et)&&(j(this,ps)?j(this,et).cancel({revert:!0}):j(this,et).cancelRetry()),this.scheduleGc()),j(this,Dt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Je(this,tn,Ln).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,et))return j(this,et).continueRetry(),j(this,et).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ee(this,ps,!0),r.signal)})},i=()=>{const h=n1(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),ee(this,ps,!1),this.options.persister?this.options.persister(h,f,this):h(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,xi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&Je(this,tn,Ln).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=h=>{var f,p,w,y;Ed(h)&&h.silent||Je(this,tn,Ln).call(this,{type:"error",error:h}),Ed(h)||((p=(f=j(this,Dt).config).onError)==null||p.call(f,h,this),(y=(w=j(this,Dt).config).onSettled)==null||y.call(w,this.state.data,h,this)),this.scheduleGc()};return ee(this,et,o1({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,p,w,y;if(h===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(b){a(b);return}(p=(f=j(this,Dt).config).onSuccess)==null||p.call(f,h,this),(y=(w=j(this,Dt).config).onSettled)==null||y.call(w,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,f)=>{Je(this,tn,Ln).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{Je(this,tn,Ln).call(this,{type:"pause"})},onContinue:()=>{Je(this,tn,Ln).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,et).start()}},wi=new WeakMap,xi=new WeakMap,Dt=new WeakMap,et=new WeakMap,Ta=new WeakMap,ps=new WeakMap,tn=new WeakSet,Ln=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...i2(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ed(s)&&s.revert&&j(this,xi)?{...j(this,xi),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),at.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,Dt).notify({query:this,type:"updated",action:t})})},dw);function i2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:s1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function o2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var bn,hw,a2=(hw=class extends Cu{constructor(t={}){super();le(this,bn);this.config=t,ee(this,bn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??om(s,n);let o=this.get(i);return o||(o=new s2({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){j(this,bn).has(t.queryHash)||(j(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=j(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&j(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){at.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,bn).get(t)}getAll(){return[...j(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Uy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Uy(t,r)):n}notify(t){at.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){at.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,hw),_n,rt,ms,Sn,lr,fw,l2=(fw=class extends a1{constructor(t){super();le(this,Sn);le(this,_n);le(this,rt);le(this,ms);this.mutationId=t.mutationId,ee(this,rt,t.mutationCache),ee(this,_n,[]),this.state=t.state||c2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,_n).includes(t)||(j(this,_n).push(t),this.clearGcTimeout(),j(this,rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,_n,j(this,_n).filter(n=>n!==t)),this.scheduleGc(),j(this,rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,_n).length||(this.state.status==="pending"?this.scheduleGc():j(this,rt).remove(this))}continue(){var t;return((t=j(this,ms))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,c,u,h,f,p,w,y,b,m,g,v,_,S,E,k;ee(this,ms,o1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,R)=>{Je(this,Sn,lr).call(this,{type:"failed",failureCount:T,error:R})},onPause:()=>{Je(this,Sn,lr).call(this,{type:"pause"})},onContinue:()=>{Je(this,Sn,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,rt).canRun(this)}));const n=this.state.status==="pending",r=!j(this,ms).canStart();try{if(!n){Je(this,Sn,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=j(this,rt).config).onMutate)==null?void 0:i.call(s,t,this));const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));R!==this.state.context&&Je(this,Sn,lr).call(this,{type:"pending",context:R,variables:t,isPaused:r})}const T=await j(this,ms).start();return await((c=(l=j(this,rt).config).onSuccess)==null?void 0:c.call(l,T,t,this.state.context,this)),await((h=(u=this.options).onSuccess)==null?void 0:h.call(u,T,t,this.state.context)),await((p=(f=j(this,rt).config).onSettled)==null?void 0:p.call(f,T,null,this.state.variables,this.state.context,this)),await((y=(w=this.options).onSettled)==null?void 0:y.call(w,T,null,t,this.state.context)),Je(this,Sn,lr).call(this,{type:"success",data:T}),T}catch(T){try{throw await((m=(b=j(this,rt).config).onError)==null?void 0:m.call(b,T,t,this.state.context,this)),await((v=(g=this.options).onError)==null?void 0:v.call(g,T,t,this.state.context)),await((S=(_=j(this,rt).config).onSettled)==null?void 0:S.call(_,void 0,T,this.state.variables,this.state.context,this)),await((k=(E=this.options).onSettled)==null?void 0:k.call(E,void 0,T,t,this.state.context)),T}finally{Je(this,Sn,lr).call(this,{type:"error",error:T})}}finally{j(this,rt).runNext(this)}}},_n=new WeakMap,rt=new WeakMap,ms=new WeakMap,Sn=new WeakSet,lr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),at.batch(()=>{j(this,_n).forEach(r=>{r.onMutationUpdate(t)}),j(this,rt).notify({mutation:this,type:"updated",action:t})})},fw);function c2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Et,Ca,pw,u2=(pw=class extends Cu{constructor(t={}){super();le(this,Et);le(this,Ca);this.config=t,ee(this,Et,new Map),ee(this,Ca,Date.now())}build(t,n,r){const s=new l2({mutationCache:this,mutationId:++Ha(this,Ca)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=pl(t),r=j(this,Et).get(n)??[];r.push(t),j(this,Et).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=pl(t);if(j(this,Et).has(n)){const s=(r=j(this,Et).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?j(this,Et).delete(n):j(this,Et).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=j(this,Et).get(pl(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=j(this,Et).get(pl(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){at.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...j(this,Et).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fy(n,r))}findAll(t={}){return this.getAll().filter(n=>Fy(t,n))}notify(t){at.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return at.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zt))))}},Et=new WeakMap,Ca=new WeakMap,pw);function pl(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function zy(e){return{onFetch:(t,n)=>{var u,h,f,p,w;const r=t.options,s=(f=(h=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((w=t.state.data)==null?void 0:w.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const b=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},m=n1(t.options,t.fetchOptions),g=async(v,_,S)=>{if(y)return Promise.reject();if(_==null&&v.pages.length)return Promise.resolve(v);const E={queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};b(E);const k=await m(E),{maxPages:T}=t.options,R=S?Xj:Jj;return{pages:R(v.pages,k,T),pageParams:R(v.pageParams,_,T)}};if(s&&i.length){const v=s==="backward",_=v?d2:Wy,S={pages:i,pageParams:o},E=_(r,S);a=await g(S,E,v)}else{const v=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:Wy(r,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Wy(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function d2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Te,wr,xr,bi,_i,br,Si,Ei,mw,h2=(mw=class{constructor(e={}){le(this,Te);le(this,wr);le(this,xr);le(this,bi);le(this,_i);le(this,br);le(this,Si);le(this,Ei);ee(this,Te,e.queryCache||new a2),ee(this,wr,e.mutationCache||new u2),ee(this,xr,e.defaultOptions||{}),ee(this,bi,new Map),ee(this,_i,new Map),ee(this,br,0)}mount(){Ha(this,br)._++,j(this,br)===1&&(ee(this,Si,r1.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Te).onFocus())})),ee(this,Ei,Lc.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,Te).onOnline())})))}unmount(){var e,t;Ha(this,br)._--,j(this,br)===0&&((e=j(this,Si))==null||e.call(this),ee(this,Si,void 0),(t=j(this,Ei))==null||t.call(this),ee(this,Ei,void 0))}isFetching(e){return j(this,Te).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,wr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Te).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=j(this,Te).build(this,n);return e.revalidateIfStale&&r.isStaleByTime($y(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return j(this,Te).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=j(this,Te).get(r.queryHash),i=s==null?void 0:s.state.data,o=Hj(t,i);if(o!==void 0)return j(this,Te).build(this,r).setData(o,{...n,manual:!0})}
287setQueriesData(e,t,n){return at.batch(()=>j(this,Te).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=j(this,Te).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=j(this,Te);at.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=j(this,Te),r={type:"active",...e};return at.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=at.batch(()=>j(this,Te).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Zt).catch(Zt)}invalidateQueries(e={},t={}){return at.batch(()=>{if(j(this,Te).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=at.batch(()=>j(this,Te).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Zt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=j(this,Te).build(this,t);return n.isStaleByTime($y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e.behavior=zy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e.behavior=zy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lc.isOnline()?j(this,wr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Te)}getMutationCache(){return j(this,wr)}getDefaultOptions(){return j(this,xr)}setDefaultOptions(e){ee(this,xr,e)}setQueryDefaults(e,t){j(this,bi).set(ca(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,bi).values()];let n={};return t.forEach(r=>{ua(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){j(this,_i).set(ca(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,_i).values()];let n={};return t.forEach(r=>{ua(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,xr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=om(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===am&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,Te).clear(),j(this,wr).clear()}},Te=new WeakMap,wr=new WeakMap,xr=new WeakMap,bi=new WeakMap,_i=new WeakMap,br=new WeakMap,Si=new WeakMap,Ei=new WeakMap,mw),l1=x.createContext(void 0),xF=e=>{const t=x.useContext(l1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},f2=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(l1.Provider,{value:e,children:t}));/** 288 * @remix-run/router v1.23.0 289 * 290 * Copyright (c) Remix Software Inc. 291 * 292 * This source code is licensed under the MIT license found in the 293 * LICENSE.md file in the root directory of this source tree. 294 * 295 * @license MIT 296 */function da(){return da=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},da.apply(this,arguments)}var Er;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Er||(Er={}));const Hy="popstate";function p2(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return of("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Mc(s)}return g2(t,n,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function c1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function m2(){return Math.random().toString(36).substr(2,8)}function Ky(e,t){return{usr:e.state,key:e.key,idx:t}}function of(e,t,n,r){return n===void 0&&(n=null),da({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hi(t):t,{state:n,key:t&&t.key||r||m2()})}function Mc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g2(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Er.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(da({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}
vendor: 3,539 bytes, line 296
296function h(){a=Er.Pop;let b=u(),m=b==null?null:b-c;c=b,l&&l({action:a,location:y.location,delta:m})}function f(b,m){a=Er.Push;let g=of(y.location,b,m);c=u()+1;let v=Ky(g,c),_=y.createHref(g);try{o.pushState(v,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:y.location,delta:1})}function p(b,m){a=Er.Replace;let g=of(y.location,b,m);c=u();let v=Ky(g,c),_=y.createHref(g);o.replaceState(v,"",_),i&&l&&l({action:a,location:y.location,delta:0})}function w(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:Mc(b);return g=g.replace(/ $/,"%20"),Re(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let y={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Hy,h),l=b,()=>{s.removeEventListener(Hy,h),l=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let m=w(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:p,go(b){return o.go(b)}};return y}var Gy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gy||(Gy={}));function y2(e,t,n){return n===void 0&&(n="/"),v2(e,t,n,!1)}function v2(e,t,n,r){let s=typeof t=="string"?Hi(t):t,i=lm(s.pathname||"/",n);if(i==null)return null;let o=u1(e);w2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=R2(i);a=P2(o[l],c,r)}return a}function u1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Re(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Ir([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Re(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),u1(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:T2(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of d1(i.path))s(i,o,l)}),t}function d1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=d1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function w2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:C2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const x2=/^:[\w-]+$/,b2=3,_2=2,S2=1,E2=10,k2=-2,qy=e=>e==="*";function T2(e,t){let n=e.split("/"),r=n.length;return n.some(qy)&&(r+=k2),t&&(r+=_2),n.filter(s=>!qy(s)).reduce((s,i)=>s+(x2.test(i)?b2:i===""?S2:E2),r)}function C2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function P2(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",h=Yy({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=Yy({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!h)return null;
vendor: 6,917 bytes, lines 296-305
296Object.assign(s,h.params),o.push({params:s,pathname:Ir([i,h.pathname]),pathnameBase:I2(Ir([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Ir([i,h.pathnameBase]))}return o}function Yy(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=A2(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,h)=>{let{paramName:f,isOptional:p}=u;if(f==="*"){let y=a[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[h];return p&&!w?c[f]=void 0:c[f]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function A2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),c1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function R2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return c1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lm(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function j2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Hi(e):e;return{pathname:n?n.startsWith("/")?n:N2(n,t):t,search:D2(r),hash:L2(s)}}function N2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function kd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function O2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cm(e,t){let n=O2(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function um(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Hi(e):(s=da({},e),Re(!s.pathname||!s.pathname.includes("?"),kd("?","pathname","search",s)),Re(!s.pathname||!s.pathname.includes("#"),kd("#","pathname","hash",s)),Re(!s.search||!s.search.includes("#"),kd("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let l=j2(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Ir=e=>e.join("/").replace(/\/\/+/g,"/"),I2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,L2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function M2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const h1=["post","put","patch","delete"];new Set(h1);const $2=["get",...h1];new Set($2);/** 297 * React Router v6.30.1 298 * 299 * Copyright (c) Remix Software Inc. 300 * 301 * This source code is licensed under the MIT license found in the 302 * LICENSE.md file in the root directory of this source tree. 303 * 304 * @license MIT 305 */function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ha.apply(this,arguments)}const dm=x.createContext(null),U2=x.createContext(null),Kr=x.createContext(null),Au=x.createContext(null),Qn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),f1=x.createContext(null);function F2(e,t){let{relative:n}=t===void 0?{}:t;Ki()||Re(!1);let{basename:r,navigator:s}=x.useContext(Kr),{hash:i,pathname:o,search:a}=m1(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Ir([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Ki(){return x.useContext(Au)!=null}function bt(){return Ki()||Re(!1),x.useContext(Au).location}function p1(e){x.useContext(Kr).static||x.useLayoutEffect(e)}function mn(){let{isDataRoute:e}=x.useContext(Qn);return e?Z2():V2()}function V2(){Ki()||Re(!1);let e=x.useContext(dm),{basename:t,future:n,navigator:r}=x.useContext(Kr),{matches:s}=x.useContext(Qn),{pathname:i}=bt(),o=JSON.stringify(cm(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return p1(()=>{a.current=!0}),x.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let h=um(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Ir([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,i,e])}function bF(){let{matches:e}=x.useContext(Qn),t=e[e.length-1];return t?t.params:{}}function m1(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Kr),{matches:s}=x.useContext(Qn),{pathname:i}=bt(),o=JSON.stringify(cm(s,r.v7_relativeSplatPath));return x.useMemo(()=>um(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function B2(e,t){return z2(e,t)}function z2(e,t,n,r){Ki()||Re(!1);let{navigator:s}=x.useContext(Kr),{matches:i}=x.useContext(Qn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=bt(),u;if(t){var h;let b=typeof t=="string"?Hi(t):t;l==="/"||(h=b.pathname)!=null&&h.startsWith(l)||Re(!1),u=b}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=y2(e,{pathname:p}),y=q2(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Ir([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Ir([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&y?x.createElement(Au.Provider,{value:{location:ha({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Er.Pop}},y):y}function W2(){let e=X2(),t=M2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application
305Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const H2=x.createElement(W2,null);class K2 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(Qn.Provider,{value:this.props.routeContext},x.createElement(f1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function G2(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(dm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Qn.Provider,{value:t},r)}function q2(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||Re(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let h=o[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=u),h.route.id){let{loaderData:f,errors:p}=n,w=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||w){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,f)=>{let p,w=!1,y=null,b=null;n&&(p=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||H2,l&&(c<0&&f===0?(w=!0,b=null):c===f&&(w=!0,b=h.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,f+1)),g=()=>{let v;return p?v=y:w?v=b:h.route.Component?v=x.createElement(h.route.Component,null):h.route.element?v=h.route.element:v=u,x.createElement(G2,{match:h,routeContext:{outlet:u,matches:m,isDataRoute:n!=null},children:v})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?x.createElement(K2,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var g1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(g1||{}),$c=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}($c||{});function Y2(e){let t=x.useContext(dm);return t||Re(!1),t}function Q2(e){let t=x.useContext(U2);return t||Re(!1),t}function J2(e){let t=x.useContext(Qn);return t||Re(!1),t}function y1(e){let t=J2(),n=t.matches[t.matches.length-1];return n.route.id||Re(!1),n.route.id}function X2(){var e;let t=x.useContext(f1),n=Q2($c.UseRouteError),r=y1($c.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Z2(){let{router:e}=Y2(g1.UseNavigateStable),t=y1($c.UseNavigateStable),n=x.useRef(!1);return p1(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ha({fromRouteId:t},i)))},[e,t])}function eN(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function St(e){let{to:t,replace:n,state:r,relative:s}=e;Ki()||Re(!1);let{future:i,static:o}=x.useContext(Kr),{matches:a}=x.useContext(Qn),{pathname:l}=bt(),c=mn(),u=um(t,cm(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(u);return x.useEffect(()=>c(JSON.parse(h),{replace:n,state:r,relative:s}),[c,h,s,n,r]),null}function z(e){Re(!1)}function tN(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Er.Pop,navigator:i,static:o=!1,future:a}=e;Ki()&&Re(!1);let l=t.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:i,static:o,future:ha({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Hi(r));
305let{pathname:u="/",search:h="",hash:f="",state:p=null,key:w="default"}=r,y=x.useMemo(()=>{let b=lm(u,l);return b==null?null:{location:{pathname:b,search:h,hash:f,state:p,key:w},navigationType:s}},[l,u,h,f,p,w,s]);return y==null?null:x.createElement(Kr.Provider,{value:c},x.createElement(Au.Provider,{children:n,value:y}))}function nN(e){let{children:t,location:n}=e;return B2(af(t),n)}new Promise(()=>{});function af(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,af(r.props.children,i));return}r.type!==z&&Re(!1),!r.props.index||!r.props.children||Re(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=af(r.props.children,i)),n.push(o)}),n}/** 306 * React Router DOM v6.30.1 307 * 308 * Copyright (c) Remix Software Inc. 309 * 310 * This source code is licensed under the MIT license found in the 311 * LICENSE.md file in the root directory of this source tree. 312 * 313 * @license MIT 314 */function lf(){return lf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lf.apply(this,arguments)}function rN(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function sN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iN(e,t){return e.button===0&&(!t||t==="_self")&&!sN(e)}function cf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function oN(e,t){let n=cf(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const aN=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lN="6";try{window.__reactRouterVersion=lN}catch{}const cN="startTransition",Qy=Cw[cN];function uN(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=p2({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=x.useCallback(h=>{c&&Qy?Qy(()=>l(h)):l(h)},[l,c]);return x.useLayoutEffect(()=>o.listen(u),[o,u]),x.useEffect(()=>eN(r),[r]),x.createElement(tN,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const dN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_F=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=t,f=rN(t,aN),{basename:p}=x.useContext(Kr),w,y=!1;if(typeof c=="string"&&hN.test(c)&&(w=c,dN))try{let v=new URL(window.location.href),_=c.startsWith("//")?new URL(v.protocol+c):new URL(c),S=lm(_.pathname,p);_.origin===v.origin&&S!=null?c=S+_.search+_.hash:y=!0}catch{}let b=F2(c,{relative:s}),m=fN(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function g(v){r&&r(v),v.defaultPrevented||m(v)}return x.createElement("a",lf({},f,{href:w||b,onClick:y||i?r:g,ref:n,target:l}))});var Jy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Jy||(Jy={}));var Xy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xy||(Xy={}));function fN(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=mn(),c=bt(),u=m1(e,{relative:o});return x.useCallback(h=>{if(iN(h,n)){h.preventDefault();let f=r!==void 0?r:Mc(c)===Mc(u);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}function SF(e){let t=x.useRef(cf(e)),n=x.useRef(!1),r=bt(),s=x.useMemo(()=>oN(r.search,n.current?null:t.current),[r.search]),i=mn(),o=x.useCallback((a,l)=>{const c=cf(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}const hm=x.createContext({});function fm(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const pN=typeof window<"u",v1=pN?x.useLayoutEffect:x.useEffect,Ru=x.createContext(null);function pm(e,t){e.indexOf(t)===-1&&e.push(t)}function Uc(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}
vendor: 9,309 bytes, line 314
314const On=(e,t,n)=>n>t?t:n<e?e:n;let ju=()=>{},Di=()=>{};const Vr={},w1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function x1(e){return typeof e=="object"&&e!==null}const b1=e=>/^0[^.\s]+$/u.test(e);function _1(e){let t;return()=>(t===void 0&&(t=e()),t)}const Vt=e=>e,mN=(e,t)=>n=>t(e(n)),La=(...e)=>e.reduce(mN),fa=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class mm{constructor(){this.subscriptions=[]}add(t){return pm(this.subscriptions,t),()=>Uc(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xt=e=>e*1e3,Ut=e=>e/1e3;function S1(e,t){return t?e*(1e3/t):0}const E1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gN=1e-7,yN=12;function vN(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=E1(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>gN&&++a<yN);return o}function Ma(e,t,n,r){if(e===t&&n===r)return Vt;const s=i=>vN(i,0,1,e,n);return i=>i===0||i===1?i:E1(s(i),t,r)}const k1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,T1=e=>t=>1-e(1-t),C1=Ma(.33,1.53,.69,.99),gm=T1(C1),P1=k1(gm),A1=e=>e>=1?1:(e*=2)<1?.5*gm(e):.5*(2-Math.pow(2,-10*(e-1))),ym=e=>1-Math.sin(Math.acos(e)),R1=T1(ym),j1=k1(ym),wN=Ma(.42,0,1,1),xN=Ma(0,0,.58,1),N1=Ma(.42,0,.58,1),bN=e=>Array.isArray(e)&&typeof e[0]!="number",O1=e=>Array.isArray(e)&&typeof e[0]=="number",Zy={linear:Vt,easeIn:wN,easeInOut:N1,easeOut:xN,circIn:ym,circInOut:j1,circOut:R1,backIn:gm,backInOut:P1,backOut:C1,anticipate:A1},_N=e=>typeof e=="string",ev=e=>{if(O1(e)){Di(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Ma(t,n,r,s)}else if(_N(e))return Di(Zy[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Zy[e];return e},ml=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tv={value:null,addProjectionMetrics:null};function SN(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(h){o.has(h)&&(u.schedule(h),e()),l++,h(a)}const u={schedule:(h,f=!1,p=!1)=>{const y=p&&s?n:r;return f&&o.add(h),y.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(a=h,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(c),t&&tv.value&&tv.value.frameloop[t].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(h))}};return u}const EN=40;function I1(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=ml.reduce((v,_)=>(v[_]=SN(i,t?_:void 0),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:p,postRender:w}=o,y=()=>{const v=Vr.useManualTiming,_=v?s.timestamp:performance.now();n=!1,v||(s.delta=r?1e3/60:Math.max(Math.min(_-s.timestamp,EN),1)),s.timestamp=_,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),f.process(s),p.process(s),w.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(y))},b=()=>{n=!0,r=!0,s.isProcessing||e(y)};return{schedule:ml.reduce((v,_)=>{const S=o[_];return v[_]=(E,k=!1,T=!1)=>(n||b(),S.schedule(E,k,T)),v},{}),cancel:v=>{for(let _=0;_<ml.length;_++)o[ml[_]].cancel(v)},state:s,steps:o}}const{schedule:de,cancel:Br,state:He,steps:Td}=I1(typeof requestAnimationFrame<"u"?requestAnimationFrame:Vt,!0);let Kl;function kN(){Kl=void 0}const lt={now:()=>(Kl===void 0&<.set(He.isProcessing||Vr.useManualTiming?He.timestamp:performance.now()),Kl),set:e=>{Kl=e,queueMicrotask(kN)}},D1=e=>t=>typeof t=="string"&&t.startsWith(e),L1=D1("--"),TN=D1("var(--"),vm=e=>TN(e)?CN.test(e.split("/*")[0].trim()):!1,CN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Gi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pa={...Gi,transform:e=>On(0,1,e)},gl={...Gi,default:1},Mo=e=>Math.round(e*1e5)/1e5,wm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PN(e){return e==null}const AN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xm=(e,t)=>n=>!!(typeof n=="string"&&AN.test(n)&&n.startsWith(e)||t&&!PN(n)&&Object.prototype.hasOwnProperty.call(n,t)),M1=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(wm);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},RN=e=>On(0,255,e),Cd={...Gi,transform:e=>Math.round(RN(e))},cs={test:xm("rgb","red"),parse:M1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cd.transform(e)+", "+Cd.transform(t)+", "+Cd.transform(n)+", "+Mo(pa.transform(r))+")"};function jN(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const uf={test:xm("#"),parse:jN,transform:cs.transform},$a=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cr=$a("deg"),Rn=$a("%"),V=$a("px"),NN=$a("vh"),ON=$a("vw"),rv={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},ri={test:xm("hsl","hue"),parse:M1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Mo(t))+", "+Rn.transform(Mo(n))+", "+Mo(pa.transform(r))+")"},Oe={test:e=>cs.test(e)||uf.test(e)||ri.test(e),parse:e=>cs.test(e)?cs.parse(e):ri.test(e)?ri.parse(e):uf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cs.transform(e):ri.transform(e),getAnimatableNone:e=>{const t=Oe.parse(e);return t.alpha=0,Oe.transform(t)}},IN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function DN(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wm))==null?void 0:t.length)||0)+(((n=e.match(IN))==null?void 0:n.length)||0)>0}const $1="number",U1="color",LN="var",MN="var(",sv="${}",$N=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Li(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace($N,l=>(Oe.test(l)?(r.color.push(i),s.push(U1),n.push(Oe.parse(l))):l.startsWith(MN)?(r.var.push(i),s.push(LN),n.push(l)):(r.number.push(i),s.push($1),n.push(parseFloat(l))),++i,sv)).split(sv);return{values:n,split:a,indexes:r,types:s}}function UN(e){return Li(e).values}function F1({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===$1?s+=Mo(r[i]):o===U1?s+=Oe.transform(r[i]):s+=r[i]}return s}}function FN(e){return F1(Li(e))}const VN=e=>typeof e=="number"?0:Oe.test(e)?Oe.getAnimatableNone(e):e,BN=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:VN(e);function zN(e){const t=Li(e);return F1(t)(t.values.map((r,s)=>BN(r,t.split[s])))}const cn={test:DN,parse:UN,createTransformer:FN,getAnimatableNone:zN};function Pd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function WN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Pd(l,a,e+1/3),i=Pd(l,a,e),o=Pd(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Fc(e,t){return n=>n>0?t:e}const ge=(e,t,n)=>e+(t-e)*n,Ad=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},HN=[uf,cs,ri],KN=e=>HN.find(t=>t.test(e));function iv(e){const t=KN(e);if(ju(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ri&&(n=WN(n)),n}const ov=(e,t)=>{const n=iv(e),r=iv(t);if(!n||!r)return Fc(e,t);const s={...n};return i=>(s.red=Ad(n.red,r.red,i),s.green=Ad(n.green,r.green,i),s.blue=Ad(n.blue,r.blue,i),s.alpha=ge(n.alpha,r.alpha,i),cs.transform(s))},df=new Set(["none","hidden"]);function GN(e,t){return df.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qN(e,t){return n=>ge(e,t,n)}function bm(e){return typeof e=="number"?qN:typeof e=="string"?vm(e)?Fc:Oe.test(e)?ov:JN:Array.isArray(e)?V1:typeof e=="object"?Oe.test(e)?ov:YN:Fc}function V1(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>bm(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function YN(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=bm(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function QN(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],a=e.values[o]??0;n[s]=a,r[i]++}return n}const JN=(e,t)=>{const n=cn.createTransformer(t),r=Li(e),s=Li(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?df.has(e)&&!s.values.length||df.has(t)&&!r.values.length?GN(e,t):La(V1(QN(r,s),s.values),n):(ju(!0,`Complex values '${e}' and '${t}
314' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Fc(e,t))};function B1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ge(e,t,n):bm(e)(e,t)}const XN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>de.update(t,n),stop:()=>Br(t),now:()=>He.isProcessing?He.timestamp:lt.now()}},z1=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Vc=2e4;function _m(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vc;)t+=n,r=e.next(t);return t>=Vc?1/0:t}function ZN(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(_m(r),Vc);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:Ut(s)}}const be={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function hf(e,t){return e*Math.sqrt(1-t*t)}const eO=12;function tO(e,t,n){let r=n;for(let s=1;s<eO;s++)r=r-e(r)/t(r);return r}const Rd=.001;function nO({duration:e=be.duration,bounce:t=be.bounce,velocity:n=be.velocity,mass:r=be.mass}){let s,i;ju(e<=xt(be.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=On(be.minDamping,be.maxDamping,o),e=On(be.minDuration,be.maxDuration,Ut(e)),o<1?(s=c=>{const u=c*o,h=u*e,f=u-n,p=hf(c,o),w=Math.exp(-h);return Rd-f/p*w},i=c=>{const h=c*o*e,f=h*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,w=Math.exp(-h),y=hf(Math.pow(c,2),o);return(-s(c)+Rd>0?-1:1)*((f-p)*w)/y}):(s=c=>{const u=Math.exp(-c*e),h=(c-n)*e+1;return-Rd+u*h},i=c=>{const u=Math.exp(-c*e),h=(n-c)*(e*e);return u*h});const a=5/e,l=tO(s,i,a);if(e=xt(e),isNaN(l))return{stiffness:be.stiffness,damping:be.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const rO=["duration","bounce"],sO=["stiffness","damping","mass"];function av(e,t){return t.some(n=>e[n]!==void 0)}function iO(e){let t={velocity:be.velocity,stiffness:be.stiffness,damping:be.damping,mass:be.mass,isResolvedFromDuration:!1,...e};if(!av(e,sO)&&av(e,rO))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*On(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:be.mass,stiffness:s,damping:i}}else{const n=nO({...e,velocity:0});t={...t,...n,mass:be.mass},t.isResolvedFromDuration=!0}return t}function Bc(e=be.visualDuration,t=be.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:p}=iO({...n,velocity:-Ut(n.velocity||0)}),w=f||0,y=c/(2*Math.sqrt(l*u)),b=o-i,m=Ut(Math.sqrt(l/u)),g=Math.abs(b)<5;r||(r=g?be.restSpeed.granular:be.restSpeed.default),s||(s=g?be.restDelta.granular:be.restDelta.default);let v,_,S,E,k,T;if(y<1)S=hf(m,y),E=(w+y*m*b)/S,v=P=>{const $=Math.exp(-y*m*P);return o-$*(E*Math.sin(S*P)+b*Math.cos(S*P))},k=y*m*E+b*S,T=y*m*b-E*S,_=P=>Math.exp(-y*m*P)*(k*Math.sin(S*P)+T*Math.cos(S*P));else if(y===1){v=$=>o-Math.exp(-m*$)*(b+(w+m*b)*$);const P=w+m*b;_=$=>Math.exp(-m*$)*(m*P*$-w)}else{const P=m*Math.sqrt(y*y-1);v=D=>{const L=Math.exp(-y*m*D),U=Math.min(P*D,300);return o-L*((w+y*m*b)*Math.sinh(U)+P*b*Math.cosh(U))/P};const $=(w+y*m*b)/P,O=y*m*$-b*P,W=y*m*b-$*P;_=D=>{const L=Math.exp(-y*m*D),U=Math.min(P*D,300);return L*(O*Math.sinh(U)+W*Math.cosh(U))}}const R={calculatedDuration:p&&h||null,velocity:P=>xt(_(P)),next:P=>{if(!p&&y<1){const O=Math.exp(-y*m*P),W=Math.sin(S*P),D=Math.cos(S*P),L=o-O*(E*W+b*D),U=xt(O*(k*W+T*D));return a.done=Math.abs(U)<=r&&Math.abs(o-L)<=s,a.value=a.done?o:L,a}const $=v(P);if(p)a.done=P>=h;else{const O=xt(_(P));a.done=Math.abs(O)<=r&&Math.abs(o-$)<=s}return a.value=a.done?o:$,a},toString:()=>{const P=Math.min(_m(R),Vc),$=z1(O=>R.next(P*O).value,P,30);return P+"ms "+$},toTransition:()=>{}};return R}Bc.applyToOptions=e=>{const t=ZN(e,100,Bc);return e.ease=t.ease,e.duration=xt(t.duration),e.type="keyframes",e};const oO=5;
vendor: 5,469 bytes, line 314
314function W1(e,t,n){const r=Math.max(t-oO,0);return S1(n-e(r),t-r)}function ff({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=e[0],f={done:!1,value:h},p=T=>a!==void 0&&T<a||l!==void 0&&T>l,w=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let y=n*t;const b=h+y,m=o===void 0?b:o(b);m!==b&&(y=m-h);const g=T=>-y*Math.exp(-T/r),v=T=>m+g(T),_=T=>{const R=g(T),P=v(T);f.done=Math.abs(R)<=c,f.value=f.done?m:P};let S,E;const k=T=>{p(f.value)&&(S=T,E=Bc({keyframes:[f.value,w(f.value)],velocity:W1(v,T,f.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:T=>{let R=!1;return!E&&S===void 0&&(R=!0,_(T),k(T)),S!==void 0&&T>=S?E.next(T-S):(!R&&_(T),f)}}}function aO(e,t,n){const r=[],s=n||Vr.mix||B1,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Vt:t;a=La(l,a)}r.push(a)}return r}function lO(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Di(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=aO(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const f=fa(e[h],e[h+1],u);return a[h](f)};return n?u=>c(On(e[0],e[i-1],u)):c}function cO(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=fa(0,t,r);e.push(ge(n,1,s))}}function uO(e){const t=[0];return cO(t,e.length-1),t}function dO(e,t){return e.map(n=>n*t)}function hO(e,t){return e.map(()=>t||N1).splice(0,e.length-1)}function $o({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=bN(r)?r.map(ev):ev(r),i={done:!1,value:t[0]},o=dO(n&&n.length===t.length?n:uO(t),e),a=lO(o,t,{ease:Array.isArray(s)?s:hO(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const fO=e=>e!==null;function Nu(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(fO),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const pO={decay:ff,inertia:ff,tween:$o,keyframes:$o,spring:Bc};function H1(e){typeof e.type=="string"&&(e.type=pO[e.type])}class Sm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const mO=e=>e/100;class zc extends Sm{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;H1(t);const{type:n=$o,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const l=n||$o;l!==$o&&typeof a[0]!="number"&&(this.mixKeyframes=La(mO,B1(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=_m(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:p,type:w,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const m=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?m<0:m>s;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,_=r;if(h){const T=Math.min(this.currentTime,s)/a;let R=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(f==="reverse"?(P=1-P,p&&(P-=p/a)):f==="mirror"&&(_=o)),v=On(0,1,P)*a}let S;g?(this.delayState.value=u[0],S=this.delayState):S=_.next(v),i&&!g&&(S.value=i(S.value));let{done:E}=S;!g&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&w!==ff&&(S.value=Nu(u,this.options,b,this.speed)),y&&y(S.value),k&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(this.currentTime)}set time(t){t=xt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;
314if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return W1(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Ut(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=XN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function gO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const us=e=>e*180/Math.PI,pf=e=>{const t=us(Math.atan2(e[1],e[0]));return mf(t)},yO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pf,rotateZ:pf,skewX:e=>us(Math.atan(e[1])),skewY:e=>us(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mf=e=>(e=e%360,e<0&&(e+=360),e),lv=pf,cv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),uv=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cv,scaleY:uv,scale:e=>(cv(e)+uv(e))/2,rotateX:e=>mf(us(Math.atan2(e[6],e[5]))),rotateY:e=>mf(us(Math.atan2(-e[2],e[0]))),rotateZ:lv,rotate:lv,skewX:e=>us(Math.atan(e[4])),skewY:e=>us(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gf(e){return e.includes("scale")?1:0}function yf(e,t){if(!e||e==="none")return gf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=vO,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=yO,s=a}if(!s)return gf(t);const i=r[t],o=s[1].split(",").map(xO);return typeof i=="function"?i(o):o[i]}const wO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yf(n,t)};function xO(e){return parseFloat(e.trim())}const qi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yi=new Set(qi),dv=e=>e===Gi||e===V,bO=new Set(["x","y","z"]),_O=qi.filter(e=>!bO.has(e));function SO(e){const t=[];return _O.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const kr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>yf(t,"x"),y:(e,{transform:t})=>yf(t,"y")};kr.translateX=kr.x;kr.translateY=kr.y;const vs=new Set;let vf=!1,wf=!1,xf=!1;function K1(){if(wf){const e=Array.from(vs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=SO(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);
314s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wf=!1,vf=!1,vs.forEach(e=>e.complete(xf)),vs.clear()}function G1(){vs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wf=!0)})}function EO(){xf=!0,G1(),K1(),xf=!1}class Em{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(vs.add(this),vf||(vf=!0,de.read(G1),de.resolveKeyframes(K1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}gO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vs.delete(this)}cancel(){this.state==="scheduled"&&(vs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const kO=e=>e.startsWith("--");function q1(e,t,n){kO(t)?e.style.setProperty(t,n):e.style[t]=n}const TO={};function Y1(e,t){const n=_1(e);return()=>TO[t]??n()}const CO=Y1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Q1=Y1(()=>{try{document.createElement("div").animate({opacity:0}
314,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_o=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_o([0,.65,.55,1]),circOut:_o([.55,0,1,.45]),backIn:_o([.31,.01,.66,-.59]),backOut:_o([.33,1.53,.69,.99])};function J1(e,t){if(e)return typeof e=="function"?Q1()?z1(e,t):"ease-out":O1(e)?_o(e):Array.isArray(e)?e.map(n=>J1(n,t)||hv.easeOut):hv[e]}function PO(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const h=J1(a,s);Array.isArray(h)&&(u.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function X1(e){return typeof e=="function"&&"applyToOptions"in e}function AO({type:e,...t}){return X1(e)&&Q1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Z1 extends Sm{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Di(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=AO(t);this.animation=PO(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Nu(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),q1(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ut(t)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&CO()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Vt):s(this)}}const eS={anticipate:A1,backInOut:P1,circInOut:j1};function RO(e){return e in eS}function jO(e){typeof e.ease=="string"&&RO(e.ease)&&(e.ease=eS[e.ease])}const jd=10;class NO extends Z1{constructor(t){jO(t),H1(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new zc({...o,autoplay:!1}),l=Math.max(jd,lt.now()-this.startTime),c=On(0,jd,l-jd),u=a.sample(l).value,{name:h}=this.options;i&&h&&q1(i,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const fv=(e,t)=>
314t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(cn.test(e)||e==="0")&&!e.startsWith("url("));function OO(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function IO(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=fv(s,t),a=fv(i,t);return ju(o===a,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:OO(e)||(n==="spring"||X1(n))&&r}function bf(e){e.duration=0,e.type="keyframes"}const tS=new Set(["opacity","clipPath","filter","transform"]),DO=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function LO(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&DO.test(e[t]))return!0;return!1}const MO=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),$O=_1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function UO(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:a}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return $O()&&n&&(tS.has(n)||MO.has(n)&&LO(a))&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const FO=40;class VO extends Sm{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var w;super(),this.stop=()=>{var y,b;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=lt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...h},p=(u==null?void 0:u.KeyframeResolver)||Em;this.keyframeResolver=new p(a,(y,b,m)=>this.onKeyframesResolved(y,b,f,!m),l,c,u),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(t,n,r,s){var m,g;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=lt.now();let h=!0;IO(t,i,o,a)||(h=!1,(Vr.instantAnimations||!l)&&(u==null||u(Nu(t,r,n))),t[0]=t[t.length-1],bf(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>FO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=h&&!c&&UO(p),y=(g=(m=p.motionValue)==null?void 0:m.owner)==null?void 0:g.current;let b;if(w)try{b=new NO({...p,element:y})}catch{b=new zc(p)}else b=new zc(p);
314b.finished.then(()=>{this.notifyFinished()}).catch(Vt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),EO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function nS(e,t,n,r=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const BO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zO(e){const t=BO.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const WO=4;function rS(e,t,n=1){Di(n<=WO,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=zO(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return w1(o)?parseFloat(o):o}return vm(s)?rS(s,t,n+1):s}const HO={type:"spring",stiffness:500,damping:25,restSpeed:10},KO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),GO={type:"keyframes",duration:.8},qO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},YO=(e,{keyframes:t})=>t.length>2?GO:Yi.has(e)?e.startsWith("scale")?KO(t[1]):HO:qO;function sS(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function km(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?sS(n,e):n}const QO=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function JO(e){for(const t in e)if(!QO.has(t))return!0;return!1}const Tm=(e,t,n,r={},s,i)=>o=>{const a=km(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};JO(a)||Object.assign(u,YO(e,u)),u.duration&&(u.duration=xt(u.duration)),u.repeatDelay&&(u.repeatDelay=xt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(bf(u),u.delay===0&&(h=!0)),(Vr.instantAnimations||Vr.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,bf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const f=Nu(u.keyframes,a);if(f!==void 0){de.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new zc(u):new VO(u)};function pv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Cm(e,t,n,r){if(typeof t=="function"){const[s,i]=pv(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=pv(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function ws(e,t,n){const r=e.getProps();return Cm(r,t,n!==void 0?n:r.custom,e)}const iS=new Set(["width","height","top","left","right","bottom",...qi]),mv=30,XO=e=>!isNaN(parseFloat(e));class ZO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=lt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=XO(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new mm);const r=this.events[t].add(n);return t==="change"?()=>{r(),de.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}
vendor: 5,897 bytes, line 314
314getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>mv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,mv);return S1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mi(e,t){return new ZO(e,t)}const _f=e=>Array.isArray(e);function eI(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mi(n))}function tI(e){return _f(e)?e[e.length-1]||0:e}function nI(e,t){const n=ws(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=tI(i[o]);eI(e,o,a)}}const Ke=e=>!!(e&&e.getVelocity);function rI(e){return!!(Ke(e)&&e.add)}function Sf(e,t){const n=e.getValue("willChange");if(rI(n))return n.add(t);if(!n&&Vr.WillChange){const r=new Vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Pm(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const sI="framerAppearId",oS="data-"+Pm(sI);function aS(e){return e.props[oS]}function iI({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function lS(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=t;const l=e.getDefaultTransition();i=i?sS(i,l):l;const c=i==null?void 0:i.reduceMotion;r&&(i=r);const u=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const p=e.getValue(f,e.latestValues[f]??null),w=a[f];if(w===void 0||h&&iI(h,f))continue;const y={delay:n,...km(i||{},f)},b=p.get();if(b!==void 0&&!p.isAnimating()&&!Array.isArray(w)&&w===b&&!y.velocity){de.update(()=>p.set(w));continue}let m=!1;if(window.MotionHandoffAnimation){const _=aS(e);if(_){const S=window.MotionHandoffAnimation(_,f,de);S!==null&&(y.startTime=S,m=!0)}}Sf(e,f);const g=c??e.shouldReduceMotion;p.start(Tm(f,p,w,g&&iS.has(f)?{type:!1}:y,e,m));const v=p.animation;v&&u.push(v)}if(o){const f=()=>de.update(()=>{o&&nI(e,o)});u.length?Promise.all(u).then(f):f()}return u}function Ef(e,t,n={}){var l;const r=ws(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(lS(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=s;return oI(e,t,c,u,h,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function oI(e,t,n=0,r=0,s=0,i=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Ef(l,t,{...o,delay:n+(typeof r=="function"?0:r)+nS(e.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function aI(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Ef(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Ef(e,t,n);else{const s=typeof t=="function"?ws(e,t,n.custom):t;r=Promise.all(lS(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const lI={test:e=>e==="auto",parse:e=>e},cS=e=>t=>t.test(e),uS=[Gi,V,Rn,cr,ON,NN,lI],gv=e=>uS.find(cS(e));function cI(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||b1(e):!0}const uI=new Set(["brightness","contrast","saturate","opacity"]);function dI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wm)||[];if(!r)return e;const s=n.replace(r,"");let i=uI.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const hI=/\b([a-z-]*)\(.*?\)/gu,kf={...cn,getAnimatableNone:e=>{const t=e.match(hI);return t?t.map(dI).join(" "):e}},Tf={...cn,getAnimatableNone:e=>{const t=cn.parse(e);return cn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},yv={...Gi,transform:Math.round},fI={rotate:cr,rotateX:cr,rotateY:cr,rotateZ:cr,scale:gl,scaleX:gl,scaleY:gl,scaleZ:gl,skew:cr,skewX:cr,skewY:cr,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:pa,originX:rv,originY:rv,originZ:V},Am={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...fI,zIndex:yv,fillOpacity:pa,strokeOpacity:pa,numOctaves:yv},pI={...Am,color:Oe,backgroundColor:Oe,outlineColor:Oe,fill:Oe,stroke:Oe,borderColor:Oe,borderTopColor:Oe,borderRightColor:Oe,borderBottomColor:Oe,borderLeftColor:Oe,filter:kf,WebkitFilter:kf,mask:Tf,WebkitMask:Tf},dS=e=>pI[e],mI=new Set([kf,Tf]);function hS(e,t){let n=dS(e);return mI.has(n)||(n=cn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
vendor: 1,717 bytes, line 314
314const gI=new Set(["auto","none","0"]);function yI(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!gI.has(i)&&Li(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=hS(n,s)}class vI extends Em{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),vm(h))){const f=rS(h,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!iS.has(r)||t.length!==2)return;const[s,i]=t,o=gv(s),a=gv(i),l=nv(s),c=nv(i);if(l!==c&&kr[r]){this.needsMeasurement=!0;return}if(o!==a)if(dv(o)&&dv(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else kr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||cI(t[s]))&&r.push(s);r.length&&yI(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=kr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 26,258 bytes, line 314
314h(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function fS(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const pS=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Gl(e){return x1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Rm,cancel:EF}=I1(queueMicrotask,!1),Jt={x:!1,y:!1};function mS(){return Jt.x||Jt.y}function wI(e){return e==="x"||e==="y"?Jt[e]?null:(Jt[e]=!0,()=>{Jt[e]=!1}):Jt.x||Jt.y?null:(Jt.x=Jt.y=!0,()=>{Jt.x=Jt.y=!1})}function gS(e,t){const n=fS(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xI(e){return!(e.pointerType==="touch"||mS())}function bI(e,t,n={}){const[r,s,i]=gS(e,n);return r.forEach(o=>{let a=!1,l=!1,c;const u=()=>{o.removeEventListener("pointerleave",w)},h=b=>{c&&(c(b),c=void 0),u()},f=b=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(b))},p=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},w=b=>{if(b.pointerType!=="touch"){if(a){l=!0;return}h(b)}},y=b=>{if(!xI(b))return;l=!1;const m=t(o,b);typeof m=="function"&&(c=m,o.addEventListener("pointerleave",w,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",p,s)}),i}const yS=(e,t)=>t?e===t?!0:yS(e,t.parentElement):!1,jm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_I=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function SI(e){return _I.has(e.tagName)||e.isContentEditable===!0}const EI=new Set(["INPUT","SELECT","TEXTAREA"]);function kI(e){return EI.has(e.tagName)||e.isContentEditable===!0}const ql=new WeakSet;function vv(e){return t=>{t.key==="Enter"&&e(t)}}function Nd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const TI=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=vv(()=>{if(ql.has(n))return;Nd(n,"down");const s=vv(()=>{Nd(n,"up")}),i=()=>Nd(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function wv(e){return jm(e)&&!mS()}const xv=new WeakSet;function CI(e,t,n={}){const[r,s,i]=gS(e,n),o=a=>{const l=a.currentTarget;if(!wv(a)||xv.has(a))return;ql.add(l),n.stopPropagation&&xv.add(a);const c=t(l,a),u=(p,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),ql.has(l)&&ql.delete(l),wv(p)&&typeof c=="function"&&c(p,{success:w})},h=p=>{u(p,l===window||l===document||n.useGlobalTarget||yS(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Gl(a)&&(a.addEventListener("focus",c=>TI(c,s)),!SI(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Nm(e){return x1(e)&&"ownerSVGElement"in e}const Yl=new WeakMap;let ur;const vS=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Nm(r)&&"getBBox"in r?r.getBBox()[t]:r[n],PI=vS("inline","width","offsetWidth"),AI=vS("block","height","offsetHeight");function RI({target:e,borderBoxSize:t}){var n;(n=Yl.get(e))==null||n.forEach(r=>{r(e,{get width(){return PI(e,t)},get height(){return AI(e,t)}})})}function jI(e){e.forEach(RI)}function NI(){typeof ResizeObserver>"u"||(ur=new ResizeObserver(jI))}function OI(e,t){ur||NI();const n=fS(e);return n.forEach(r=>{let s=Yl.get(r);s||(s=new Set,Yl.set(r,s)),s.add(t),ur==null||ur.observe(r)}),()=>{n.forEach(r=>{const s=Yl.get(r);s==null||s.delete(t),s!=null&&s.size||ur==null||ur.unobserve(r)})}}const Ql=new Set;let si;function II(){si=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ql.forEach(t=>t(e))},window.addEventListener("resize",si)}function DI(e){return Ql.add(e),si||II(),()=>{Ql.delete(e),!Ql.size&&typeof si=="function"&&(window.removeEventListener("resize",si),si=void 0)}}function bv(e,t){return typeof e=="function"?DI(e):OI(e,t)}function LI(e){return Nm(e)&&e.tagName==="svg"}const MI=[...uS,Oe,cn],$I=e=>MI.find(cS(e)),_v=()=>({translate:0,scale:1,origin:0,originPoint:0}),ii=()=>({x:_v(),y:_v()}),Sv=()=>({min:0,max:0}),Le=()=>({x:Sv(),y:Sv()}),UI=new WeakMap;function Ou(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ma(e){return typeof e=="string"||Array.isArray(e)}const Om=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Im=["initial",...Om];function Iu(e){return Ou(e.animate)||Im.some(t=>ma(e[t]))}function wS(e){return!!(Iu(e)||e.variants)}function FI(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ke(s))e.addValue(r,s);else if(Ke(i))e.addValue(r,Mi(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,Mi(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cf={current:null},xS={current:!1},VI=typeof window<"u";function BI(){if(xS.current=!0,!!VI)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cf.current=e.matches;e.addEventListener("change",t),t()}else Cf.current=!1}const Ev=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Wc={};function bS(e){Wc=e}function zI(){return Wc}class WI{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Em,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=lt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,de.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Iu(n),this.isVariantNode=wS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const w=f[p];c[p]!==void 0&&Ke(w)&&w.set(c[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,UI.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(xS.current||BI(),this.shouldReduceMotion=Cf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&tS.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new Z1({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:xt(u)}),f=o(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=Yi.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&de.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wc){const n=Wc[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Le()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ev.length;r++){const s=Ev[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=FI(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Mi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(w1(r)||b1(r))?r=parseFloat(r):!$I(r)&&cn.test(n)&&(r=hS(t,n)),this.setBaseTarget(t,Ke(r)?r.get():r)),Ke(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=Cm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ke(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Rm.render(this.render)}}class _S extends WI{constructor(){super(...arguments),this.KeyframeResolver=vI}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function SS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function HI({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function KI(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Od(e){return e===void 0||e===1}function Pf({scale:e,scaleX:t,scaleY:n}){return!Od(e)||!Od(t)||!Od(n)}function ns(e){return Pf(e)||ES(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ES(e){return kv(e.x)||kv(e.y)}function kv(e){return e&&e!=="0%"}function Hc(e,t,n){const r=e-n,s=t*r;return n+s}function Tv(e,t,n,r,s){return s!==void 0&&(e=Hc(e,s,r)),Hc(e,n,r)+t}function Af(e,t=0,n=1,r,s){e.min=Tv(e.min,t,n,r,s),e.max=Tv(e.max,t,n,r,s)}function kS(e,{x:t,y:n}){Af(e.x,t.translate,t.scale,t.originPoint),Af(e.y,n.translate,n.scale,n.originPoint)}const Cv=.999999999999,Pv=1.0000000000001;function GI(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(En(e.x,-i.scroll.offset.x),En(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,kS(e,o)),r&&ns(i.latestValues)&&Jl(e,i.latestValues,(a=i.layout)==null?void 0:a.layoutBox))}t.x<Pv&&t.x>Cv&&(t.x=1),t.y<Pv&&t.y>Cv&&(t.y=1)}function En(e,t){e.min+=t,e.max+=t}function Av(e,t,n,r,s=.5){const i=ge(e.min,e.max,s);Af(e,t,n,i,r)}function Rv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Jl(e,t,n){const r=n??e;Av(e.x,Rv(t.x,r.x),t.scaleX,t.scale,t.originX),Av(e.y,Rv(t.y,r.y),t.scaleY,t.scale,t.originY)}function TS(e,t){return SS(KI(e.getBoundingClientRect(),t))}function qI(e,t,n){const r=TS(e,n),{scroll:s}=t;return s&&(En(r.x,s.offset.x),En(r.y,s.offset.y)),r}const YI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},QI=qi.length;function JI(e,t,n){let r="",s=!0;for(let i=0;i<QI;i++){const o=qi[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=pS(a,Am[o]);if(!l){s=!1;const u=YI[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Dm(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Yi.has(l)){o=!0;continue}else if(L1(l)){s[l]=c;continue}else{const u=pS(c,Am[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=JI(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function CS(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function jv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=jv(e,t.target.x),r=jv(e,t.target.y);return`${n}% ${r}%`}},XI={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=cn.parse(e);if(s.length>5)return r;const i=cn.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=ge(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},Rf={borderRadius:{...uo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uo,borderTopRightRadius:uo,borderBottomLeftRadius:uo,borderBottomRightRadius:uo,boxShadow:XI};function PS(e,{layout:t,layoutId:n}){return Yi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Rf[e]||e==="opacity")}function Lm(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const a in r)(Ke(r[a])||s&&Ke(s[a])||PS(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function ZI(e){return window.getComputedStyle(e)}class eD extends _S{constructor(){super(...arguments),this.type="html",this.renderInstance=CS}readValueFromInstance(t,n){var r;if(Yi.has(n))return(r=this.projection)!=null&&r.isProjecting?gf(n):wO(t,n);{const s=ZI(t),i=(L1(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return TS(t,n)}build(t,n,r){Dm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Lm(t,n,r)}}const tD={offset:"stroke-dashoffset",array:"stroke-dasharray"},nD={offset:"strokeDashoffset",array:"strokeDasharray"};function rD(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?tD:nD;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const sD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function AS(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(Dm(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const p of sD)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&rD(h,s,i,o,!1)}const RS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),jS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iD(e,t,n,r){CS(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(RS.has(s)?s:Pm(s),t.attrs[s])}function NS(e,t,n){const r=Lm(e,t,n);for(const s in e)if(Ke(e[s])||Ke(t[s])){const i=qi.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class oD extends _S{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Le}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yi.has(n)){const r=dS(n);return r&&r.default||0}return n=RS.has(n)?n:Pm(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return NS(t,n,r)}build(t,n,r){AS(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){iD(t,n,r,s)}mount(t){this.isSVGTag=jS(t.tagName),super.mount(t)}}const aD=Im.length;function OS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?OS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<aD;n++){const r=Im[n],s=e.props[r];(ma(s)||s===!1)&&(t[r]=s)}return t}function IS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const lD=[...Om].reverse(),cD=Om.length;function uD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>aI(e,n,r)))}function dD(e){let t=uD(e),n=Nv(),r=!0,s=!1;const i=c=>(u,h)=>{var p;const f=ws(e,h,c==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:w,transitionEnd:y,...b}=f;u={...u,...b,...y}}return u};function o(c){t=c(e)}function a(c){const{props:u}=e,h=OS(e.parent)||{},f=[],p=new Set;let w={},y=1/0;for(let m=0;m<cD;m++){const g=lD[m],v=n[g],_=u[g]!==void 0?u[g]:h[g],S=ma(_),E=g===c?v.isActive:null;E===!1&&(y=m);let k=_===h[g]&&_!==u[g]&&S;if(k&&(r||s)&&e.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...w},!v.isActive&&E===null||!_&&!v.prevProp||Ou(_)||typeof _=="boolean")continue;if(g==="exit"&&v.isActive&&E!==!0){v.prevResolvedValues&&(w={...w,...v.prevResolvedValues});continue}const T=hD(v.prevProp,_);let R=T||g===c&&v.isActive&&!k&&S||m>y&&S,P=!1;const $=Array.isArray(_)?_:[_];let O=$.reduce(i(g),{});E===!1&&(O={});const{prevResolvedValues:W={}}=v,D={...W,...O},L=C=>{R=!0,p.has(C)&&(P=!0,p.delete(C)),v.needsAnimating[C]=!0;const A=e.getValue(C);A&&(A.liveStyle=!1)};for(const C in D){const A=O[C],M=W[C];if(w.hasOwnProperty(C))continue;let q=!1;_f(A)&&_f(M)?q=!IS(A,M):q=A!==M,q?A!=null?L(C):p.add(C):A!==void 0&&p.has(C)?L(C):v.protectedKeys[C]=!0}v.prevProp=_,v.prevResolvedValues=O,v.isActive&&(w={...w,...O}),(r||s)&&e.blockInitialAnimation&&(R=!1);const U=k&&T;R&&(!U||P)&&f.push(...$.map(C=>{const A={type:g};if(typeof C=="string"&&(r||s)&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:M}=e,q=ws(M,C);if(M.enteringChildren&&q){const{delayChildren:H}=q.transition||{};A.delay=nS(M.enteringChildren,e,H)}}return{animation:C,options:A}}))}if(p.size){const m={};if(typeof u.initial!="boolean"){const g=ws(e,Array.isArray(u.initial)?u.initial[0]:u.initial);g&&g.transition&&(m.transition=g.transition)}p.forEach(g=>{const v=e.getBaseTarget(g),_=e.getValue(g);_&&(_.liveStyle=!0),m[g]=v??null}),f.push({animation:m})}let b=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var w;return(w=p.animationState)==null?void 0:w.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Nv(),s=!0}}}function hD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!IS(t,e):!1}function Jr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nv(){return{animate:Jr(!0),whileInView:Jr(),whileHover:Jr(),whileTap:Jr(),whileDrag:Jr(),whileFocus:Jr(),exit:Jr()}}function jf(e,t){e.min=t.min,e.max=t.max}function Yt(e,t){jf(e.x,t.x),jf(e.y,t.y)}function Ov(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const DS=1e-4,fD=1-DS,pD=1+DS,LS=.01,mD=0-LS,gD=0+LS;function ct(e){return e.max-e.min}function yD(e,t,n){return Math.abs(e-t)<=n}function Iv(e,t,n,r=.5){e.origin=r,e.originPoint=ge(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=ge(n.min,n.max,e.origin)-e.originPoint,(e.scale>=fD&&e.scale<=pD||isNaN(e.scale))&&(e.scale=1),(e.translate>=mD&&e.translate<=gD||isNaN(e.translate))&&(e.translate=0)}function Uo(e,t,n,r){Iv(e.x,t.x,n.x,r?r.originX:void 0),Iv(e.y,t.y,n.y,r?r.originY:void 0)}function Dv(e,t,n,r=0){const s=r?ge(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+ct(t)}function vD(e,t,n,r){Dv(e.x,t.x,n.x,r==null?void 0:r.x),Dv(e.y,t.y,n.y,r==null?void 0:r.y)}function Lv(e,t,n,r=0){const s=r?ge(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+ct(t)}function Kc(e,t,n,r){Lv(e.x,t.x,n.x,r==null?void 0:r.x),Lv(e.y,t.y,n.y,r==null?void 0:r.y)}function Mv(e,t,n,r,s){return e-=t,e=Hc(e,1/n,r),s!==void 0&&(e=Hc(e,1/s,r)),e}function wD(e,t=0,n=1,r=.5,s,i=e,o=e){if(Rn.test(t)&&(t=parseFloat(t),t=ge(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ge(i.min,i.max,r);e===i&&(a-=t),e.min=Mv(e.min,t,n,a,s),e.max=Mv(e.max,t,n,a,s)}function $v(e,t,[n,r,s],i,o){wD(e,t[n],t[r],t[s],t.scale,i,o)}const xD=["x","scaleX","originX"],bD=["y","scaleY","originY"];function Uv(e,t,n,r){$v(e.x,t,xD,n?n.x:void 0,r?r.x:void 0),$v(e.y,t,bD,n?n.y:void 0,r?r.y:void 0)}function Fv(e){return e.translate===0&&e.scale===1}function MS(e){return Fv(e.x)&&Fv(e.y)}function Vv(e,t){return e.min===t.min&&e.max===t.max}function _D(e,t){return Vv(e.x,t.x)&&Vv(e.y,t.y)}function Bv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $S(e,t){return Bv(e.x,t.x)&&Bv(e.y,t.y)}function zv(e){return ct(e.x)/ct(e.y)}function Wv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function xn(e){return[e("x"),e("y")]}function SD(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:p,skewY:w}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const US=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ED=US.length,Hv=e=>typeof e=="string"?parseFloat(e):e,Kv=e=>typeof e=="number"||V.test(e);function kD(e,t,n,r,s,i){s?(e.opacity=ge(0,n.opacity??1,TD(r)),e.opacityExit=ge(t.opacity??1,0,CD(r))):i&&(e.opacity=ge(t.opacity??1,n.opacity??1,r));for(let o=0;o<ED;o++){const a=US[o];let l=Gv(t,a),c=Gv(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Kv(l)===Kv(c)?(e[a]=Math.max(ge(Hv(l),Hv(c),r),0),(Rn.test(c)||Rn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ge(t.rotate||0,n.rotate||0,r))}function Gv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}
314const TD=FS(0,.5,R1),CD=FS(.5,.95,Vt);function FS(e,t,n){return r=>r<e?0:r>t?1:n(fa(e,t,r))}function PD(e,t,n){const r=Ke(e)?e:Mi(e);return r.start(Tm("",r,t,n)),r.animation}function ga(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const AD=(e,t)=>e.depth-t.depth;class RD{constructor(){this.children=[],this.isDirty=!1}add(t){pm(this.children,t),this.isDirty=!0}remove(t){Uc(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AD),this.isDirty=!1,this.children.forEach(t)}}function jD(e,t){const n=lt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Br(r),e(i-t))};return de.setup(r,!0),()=>Br(r)}function Xl(e){return Ke(e)?e.get():e}class ND{constructor(){this.members=[]}add(t){pm(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Uc(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Uc(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Zl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Id=["","X","Y","Z"],OD=1e3;let ID=0;function Dd(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function VS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=aS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",de,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&VS(r)}function BS({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ID++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(MD),this.nodes.forEach(zD),this.nodes.forEach(WD),this.nodes.forEach($D)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new RD)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new mm),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Nm(o)&&!LI(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;de.read(()=>{h=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=jD(f,250),Zl.hasAnimatedSinceResize&&(Zl.hasAnimatedSinceResize=!1,this.nodes.forEac
vendor: 4,537 bytes, line 314
314h(Qv)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||YD,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=c.getProps(),m=!this.targetLayout||!$S(this.targetLayout,p),g=!h&&f;if(this.options.layoutRoot||this.resumeFrom||g||h&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...km(w,"layout"),onPlay:y,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,g)}else h||Qv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(HD),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&VS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(FD),this.nodes.forEach(qv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(VD),this.nodes.forEach(BD),this.nodes.forEach(DD),this.nodes.forEach(LD)):this.nodes.forEach(Yv),this.clearAllSnapshots();const a=lt.now();He.delta=On(0,1e3/60,a-He.timestamp),He.timestamp=a,He.isProcessing=!0,Td.update.process(He),Td.preRender.process(He),Td.render.process(He),He.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(UD),this.sharedNodes.forEach(KD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,de.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){de.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Le()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);
314this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!MS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||ns(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),QD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Le();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(JD))){const{scroll:u}=this.root;u&&(En(a.x,u.offset.x),En(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Le();if(Yt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Yt(a,o),En(a.x,h.offset.x),En(a.y,h.offset.y))}return a}applyTransform(o,a=!1,l){var u,h;const c=l||Le();Yt(c,o);for(let f=0;f<this.path.length;f++){const p=this.path[f];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(En(c.x,-p.scroll.offset.x),En(c.y,-p.scroll.offset.y)),ns(p.latestValues)&&Jl(c,p.latestValues,(u=p.layout)==null?void 0:u.layoutBox)}return ns(this.latestValues)&&Jl(c,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),c}removeTransform(o){var l;const a=Le();Yt(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!ns(u.latestValues))continue;let h;u.instance&&(Pf(u.latestValues)&&u.updateSnapshot(),h=Le(),Yt(h,u.measurePageBox())),Uv(a,u.latestValues,(l=u.snapshot)==null?void 0:l.layoutBox,h)}return ns(this.latestValues)&&Uv(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==He.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=He.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Le(),this.targetWithTransforms=Le()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vD(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Yt(this.target,this.layout.layoutBox),kS(this.target,this.targetDelta)):Yt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Pf(this.parent.latestValues)||ES(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Le(),this.relativeTargetOrigin=Le(),Kc(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Yt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&
vendor: 5,333 bytes, line 314
314(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===He.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Yt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;GI(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Le());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ov(this.prevProjectionDelta.x,this.projectionDelta.x),Ov(this.prevProjectionDelta.y,this.projectionDelta.y)),Uo(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Wv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ii(),this.projectionDelta=ii(),this.projectionDeltaWithTransform=ii()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ii();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Le(),p=l?l.source:void 0,w=this.layout?this.layout.source:void 0,y=p!==w,b=this.getStack(),m=!b||b.members.length<=1,g=!!(y&&!m&&this.options.crossfade===!0&&!this.path.some(qD));this.animationProgress=0;let v;this.mixTargetDelta=_=>{const S=_/1e3;Jv(h.x,o.x,S),Jv(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),GD(this.relativeTarget,this.relativeTargetOrigin,f,S),v&&_D(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Le()),Yt(v,this.relativeTarget)),y&&(this.animationValues=u,kD(u,c,this.latestValues,S,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=de.update(()=>{Zl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mi(0)),this.motionValue.jump(0,!1),this.currentAnimation=PD(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(OD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&zS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Le();const h=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Yt(a,l),Jl(a,u),Uo(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ND),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 4,506 bytes, line 314
314resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Dd("z",o,c,this.animationValues);for(let u=0;u<Id.length;u++)Dd(`rotate${Id[u]}`,o,c,this.animationValues),Dd(`skew${Id[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xl(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ns(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=SD(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const w in Rf){if(u[w]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:m}=Rf[w],g=h==="none"?u[w]:y(u[w],c);if(b){const v=b.length;for(let _=0;_<v;_++)o[b[_]]=g}else m?this.options.visualElement.renderState.vars[w]=g:o[w]=g}this.options.layoutId&&(o.pointerEvents=c===this?Xl(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(qv),this.root.sharedNodes.clear()}}}function DD(e){e.updateLayout()}function LD(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")xn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=ct(f);f.min=r[h].min,f.max=f.min+p});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";jf(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else zS(i,t.layoutBox,r)&&xn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=ct(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const a=ii();Uo(a,r,t.layoutBox);const l=ii();o?Uo(l,e.applyTransform(s,!0),t.measuredBox):Uo(l,r,t.layoutBox);const c=!MS(a);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const w=e.options.layoutAnchor||void 0,y=Le();Kc(y,t.layoutBox,f.layoutBox,w);const b=Le();Kc(b,r,p.layoutBox,w),$S(y,b)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=y,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function MD(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function $D(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UD(e){e.clearSnapshot()}function qv(e){e.clearMeasurements()}function FD(e){e.isLayoutDirty=!0,e.updateLayout()}function Yv(e){e.isLayoutDirty=!1}function VD(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function BD(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Qv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zD(e){e.resolveTargetDelta()}function WD(e){e.calcProjection()}
314function HD(e){e.resetSkewAndRotation()}function KD(e){e.removeLeadSnapshot()}function Jv(e,t,n){e.translate=ge(t.translate,0,n),e.scale=ge(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xv(e,t,n,r){e.min=ge(t.min,n.min,r),e.max=ge(t.max,n.max,r)}function GD(e,t,n,r){Xv(e.x,t.x,n.x,r),Xv(e.y,t.y,n.y,r)}function qD(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const YD={duration:.45,ease:[.4,0,.1,1]},Zv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),e0=Zv("applewebkit/")&&!Zv("chrome/")?Math.round:Vt;function t0(e){e.min=e0(e.min),e.max=e0(e.max)}function QD(e){t0(e.x),t0(e.y)}function zS(e,t,n){return e==="position"||e==="preserve-aspect"&&!yD(zv(t),zv(n),.2)}function JD(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const XD=BS({attachResizeListener:(e,t)=>ga(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ld={current:void 0},WS=BS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ld.current){const e=new XD({});e.mount(window),e.setOptions({layoutScroll:!0}),Ld.current=e}return Ld.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Mm=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function n0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ZD(...e){return t=>{let n=!1;const r=e.map(s=>{const i=n0(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():n0(e[s],null)}}}}function eL(...e){return x.useCallback(ZD(...e),e)}class tL extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Gl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Gl(r)&&r.offsetWidth||0,i=Gl(r)&&r.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function nL({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const o=x.useId(),a=x.useRef(null),l=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=x.useContext(Mm),u=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=eL(a,u);return x.useInsertionEffect(()=>{const{width:p,height:w,top:y,left:b,right:m,bottom:g}=l.current;if(t||i===!1||!a.current||!p||!w)return;const v=n==="left"?`left: ${b}`:`right: ${m}`,_=r==="bottom"?`bottom: ${g}`:`top: ${y}`;a.current.dataset.motionPopId=o;const S=document.createElement("style");c&&(S.nonce=c);const E=s??document.head;return E.appendChild(S),S.sheet&&S.sheet.insertRule(` 315 [data-motion-pop-id="${o}"] { 316 position: absolute !important; 317 width: ${p}px !important; 318 height: ${w}px !important; 319 ${v}px !important; 320 ${_}px !important; 321 } 322 `),()=>{var k;(k=a.current)==null||k.removeAttribute("data-motion-pop-id"),E.contains(S)&&E.removeChild(S)}},[t]),d.jsx(tL,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:x.cloneElement(e,{ref:h})})}const rL=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=fm(sL),h=x.useId();let f=!0,p=x.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:w=>{u.set(w,!0);for(const y of u.values())if(!y)return;r&&r()},register:w=>(u.set(w,!1),()=>u.delete(w))}),[n,u,r]);return i&&f&&(p={...p}),x.useMemo(()=>{u.forEach((w,y)=>u.set(y,!1))},[n]),x.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=d.jsx(nL,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),d.jsx(Ru.Provider,{value:p,children:e})};function sL(){return new Map}function HS(e=!0){const t=x.useContext(Ru);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{if(e)return s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const yl=e=>e.key||"";function r0(e){const t=[];
vendor: 8,843 bytes, line 322
322return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const iL=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,h]=HS(o),f=x.useMemo(()=>r0(e),[e]),p=o&&!u?[]:f.map(yl),w=x.useRef(!0),y=x.useRef(f),b=fm(()=>new Map),m=x.useRef(new Set),[g,v]=x.useState(f),[_,S]=x.useState(f);v1(()=>{w.current=!1,y.current=f;for(let T=0;T<_.length;T++){const R=yl(_[T]);p.includes(R)?(b.delete(R),m.current.delete(R)):b.get(R)!==!0&&b.set(R,!1)}},[_,p.length,p.join("-")]);const E=[];if(f!==g){let T=[...f];for(let R=0;R<_.length;R++){const P=_[R],$=yl(P);p.includes($)||(T.splice(R,0,P),E.push(P))}return i==="wait"&&E.length&&(T=E),S(r0(T)),v(f),null}const{forceRender:k}=x.useContext(hm);return d.jsx(d.Fragment,{children:_.map(T=>{const R=yl(T),P=o&&!u?!1:f===_||p.includes(R),$=()=>{if(m.current.has(R))return;if(b.has(R))m.current.add(R),b.set(R,!0);else return;let O=!0;b.forEach(W=>{W||(O=!1)}),O&&(k==null||k(),S(y.current),o&&(h==null||h()),r&&r())};return d.jsx(rL,{isPresent:P,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:P?void 0:$,anchorX:a,anchorY:l,children:T},R)})})},KS=x.createContext({strict:!1}),s0={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 i0=!1;function oL(){if(i0)return;const e={};for(const t in s0)e[t]={isEnabled:n=>s0[t].some(r=>!!n[r])};bS(e),i0=!0}function GS(){return oL(),zI()}function aL(e){const t=GS();for(const n in e)t[n]={...t[n],...e[n]};bS(t)}const lL=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 Gc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lL.has(e)}let qS=e=>!Gc(e);function cL(e){typeof e=="function"&&(qS=t=>t.startsWith("on")?!Gc(t):e(t))}try{cL(require("@emotion/is-prop-valid").default)}catch{}function uL(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Ke(e[s])||(qS(s)||n===!0&&Gc(s)||!t&&!Gc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Du=x.createContext({});function dL(e,t){if(Iu(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ma(n)?n:void 0,animate:ma(r)?r:void 0}}return e.inherit!==!1?t:{}}function hL(e){const{initial:t,animate:n}=dL(e,x.useContext(Du));return x.useMemo(()=>({initial:t,animate:n}),[o0(t),o0(n)])}function o0(e){return Array.isArray(e)?e.join(" "):e}const $m=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YS(e,t,n){for(const r in t)!Ke(t[r])&&!PS(r,n)&&(e[r]=t[r])}function fL({transformTemplate:e},t){return x.useMemo(()=>{const n=$m();return Dm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function pL(e,t){const n=e.style||{},r={};return YS(r,n,e),Object.assign(r,fL(e,t)),r}function mL(e,t){const n={},r=pL(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const QS=()=>({...$m(),attrs:{}});function gL(e,t,n,r){const s=x.useMemo(()=>{const i=QS();return AS(i,t,jS(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};YS(i,e.style,e),s.style={...i,...s.style}}return s}const yL=["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 Um(e){return typeof e!="string"||e.includes("-")?!1:!!(yL.indexOf(e)>-1||/[A-Z]/u.test(e))}function vL(e,t,n,{latestValues:r},s,i=!1,o){const l=(o??Um(e)?gL:mL)(t,r,s,e),c=uL(t,typeof e=="string",i),u=e!==x.Fragment?{...c,...l,ref:n}:{},{children:h}=t,f=x.useMemo(()=>Ke(h)?h.get():h,[h]);return x.createElement(e,{...u,children:f})}function wL({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:xL(n,r,s,e),renderState:t()}}function xL(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=Xl(i[f]);let{initial:o,animate:a}=e;const l=Iu(e),c=wS(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Ou(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const w=Cm(e,f[p]);if(w){const{transitionEnd:y,transition:b,...m}=w;for(const g in m){let v=m[g];if(Array.isArray(v)){const _=u?v.length-1:0;v=v[_]}v!==null&&(s[g]=v)}for(const g in y)s[g]=y[g]}}}return s}const JS=e=>(t,n)=>{const r=x.useContext(Du),s=x.useContext(Ru),i=()=>wL(e,t,r,s);return n?i():fm(i)},bL=JS({scrapeMotionValuesFromProps:Lm,createRenderState:$m}),_L=JS({scrapeMotionValuesFromProps:NS,createRenderState:QS}),SL=Symbol.for("motionComponentSymbol");function EL(e,t,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const s=x.useRef(null);return x.useCallback(i=>{var a;i&&((a=e.onMount)==null||a.call(e,i));const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const XS=x.createContext({});function Vs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kL(e,t,n,r,s,i){var v,_;const{visualElement:o}=x.useContext(Du),a=x.useContext(KS),l=x.useContext(Ru),c=x.useContext(Mm),u=c.reducedMotion,h=c.skipAnimations,f=x.useRef(null),p=x.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const w=f.current,y=x.useContext(XS);w&&!w.projection&&s&&(w.type==="html"||w.type==="svg")&&TL(f.current,n,s,y);const b=x.useRef(!1);x.useInsertionEffect(()=>{w&&b.current&&w.update(n,l)});const m=n[oS],g=x.useRef(!!m&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,m))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,m)));return v1(()=>{p.current=!0,w&&(b.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),g.current&&w.animationState&&w.animationState.animateChanges())}),x.useEffect(()=>{w&&(!g.current&&w.animationState&&w.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,m)}),g.current=!1),w.enteringChildren=void 0)}),w}function TL(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ZS(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Vs(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function ZS(e){if(e)return e.options.allowProjection!==!1?e.projection:ZS(e.parent)}function Md(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&aL(r);const i=n?n==="svg":Um(e),o=i?_L:bL;function a(c,u){let h;const f={...x.useContext(Mm),...c,layoutId:CL(c)},{isStatic:p}=f,w=hL(c),y=o(c,p);if(!p&&typeof window<"u"){PL();const b=AL(f);h=b.MeasureLayout,w.visualElement=kL(e,y,f,s,b.ProjectionNode,i)}return d.jsxs(Du.Provider,{value:w,children:[h&&w.visualElement?d.jsx(h,{visualElement:w.visualElement,...f}):null,vL(e,c,EL(y,w.visualElement,u),y,p,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=x.forwardRef(a);return l[SL]=e,l}function CL({layoutId:e}){const t=x.useContext(hm).id;return t&&e!==void 0?t+"-"+e:e}function PL(e,t){x.useContext(KS).strict}function AL(e){const t=GS(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
vendor: 6,739 bytes, line 322
322function RL(e,t){if(typeof Proxy>"u")return Md;const n=new Map,r=(i,o)=>Md(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Md(o,void 0,e,t)),n.get(o))})}const jL=(e,t)=>t.isSVG??Um(e)?new oD(t):new eD(t,{allowProjection:e!==x.Fragment});class NL extends Gr{constructor(t){super(t),t.animationState||(t.animationState=dD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ou(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let OL=0;class IL extends Gr{constructor(){super(...arguments),this.id=OL++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=ws(this.node,o,a);if(l){const{transition:c,transitionEnd:u,...h}=l;for(const f in h)(i=this.node.getValue(f))==null||i.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DL={animation:{Feature:NL},exit:{Feature:IL}};function Ua(e){return{point:{x:e.pageX,y:e.pageY}}}const LL=e=>t=>jm(t)&&e(t,Ua(t));function Fo(e,t,n,r){return ga(e,t,LL(n),r)}const eE=({current:e})=>e?e.ownerDocument.defaultView:null,a0=(e,t)=>Math.abs(e-t);function ML(e,t){const n=a0(e.x,t.x),r=a0(e.y,t.y);return Math.sqrt(n**2+r**2)}const l0=new Set(["auto","scroll"]);class tE{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){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=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vl(this.lastRawMoveEventInfo,this.transformPagePoint));const p=$d(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,y=ML(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!y)return;const{point:b}=p,{timestamp:m}=He;this.history.push({...b,timestamp:m});const{onStart:g,onMove:v}=this.handlers;w||(g&&g(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,w)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=vl(w,this.transformPagePoint),de.update(this.updatePoint,!0)},this.handlePointerUp=(p,w)=>{this.end();const{onEnd:y,onSessionEnd:b,resumeAnimation:m}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=$d(p.type==="pointercancel"?this.lastMoveEventInfo:vl(w,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,g),b&&b(p,g)},!jm(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Ua(t),c=vl(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=He;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,$d(c,this.history)),this.removeListeners=La(Fo(this.contextWindow,"pointermove",this.handlePointerMove),Fo(this.contextWindow,"pointerup",this.handlePointerUp),Fo(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(l0.has(r.overflowX)||l0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),de.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Br(this.updatePoint)}}function vl(e,t){return t?{point:t(e.point)}:e}function c0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $d({point:e},t){return{point:e,delta:c0(e,nE(t)),offset:c0(e,$L(t)),velocity:UL(t,.1)}}function $L(e){return e[0]}function nE(e){return e[e.length-1]}function UL(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=nE(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>xt(t)*2&&(r=e[1]);const i=Ut(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function FL(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ge(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ge(n,e,r.max):Math.min(e,n)),e}function u0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function VL(e,{top:t,left:n,bottom:r,right:s}){return{x:u0(e.x,n,s),y:u0(e.y,t,r)}}function d0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function BL(e,t){return{x:d0(e.x,t.x),y:d0(e.y,t.y)}}function zL(e,t){let n=.5;const r=ct(e),s=ct(t);return s>r?n=fa(t.min,t.max-r,e.min):r>s&&(n=fa(e.min,e.max-s,t.min)),On(0,1,n)}function WL(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nf=.35;function HL(e=Nf){return e===!1?e=0:e===!0&&(e=Nf),{x:h0(e,"left","right"),y:h0(e,"to
322p","bottom")}}function h0(e,t,n){return{min:f0(e,t),max:f0(e,n)}}function f0(e,t){return typeof e=="number"?e:e[t]||0}const KL=new WeakMap;class GL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Le(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(Ua(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:w,onDragStart:y}=this.getProps();if(p&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wI(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xn(m=>{let g=this.getAxisMotionValue(m).get()||0;if(Rn.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const _=v.layout.layoutBox[m];_&&(g=ct(_)*(parseFloat(g)/100))}}this.originPoint[m]=g}),y&&de.update(()=>y(h,f),!1,!0),Sf(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:w,onDirectionLock:y,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:m}=f;if(w&&this.currentDirection===null){this.currentDirection=YL(m),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,m),this.updateAxis("y",f.point,m),this.visualElement.render(),b&&de.update(()=>b(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new tE(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:eE(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&de.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!wl(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=FL(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Vs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=VL(r.layoutBox,t):this.constraints=!1,this.elastic=HL(n),s!==this.constraints&&!Vs(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&xn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=WL(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vs(t))return!1;const r=t.current;Di(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=qI(r,s.root,this.visualElement.getTransformPagePoint());let o=BL(s.layout.layoutBox,i);if(n){const a=n(HI(o));this.hasMutatedConstraints=!!a,a&&(o=SS(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=xn(u=>{if(!wl(u,n,this.currentDirection))return;let h=l&&l[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,w={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,w)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Sf(this.visualElement,t),r.start(Tm(t,r,0,n,this.visualElement,!1))}stopAnimation(){xn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){xn(n=>{const{drag:r}=this.getProps();if(!wl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-ge(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;
vendor: 6,678 bytes, line 322
322if(!Vs(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};xn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=zL({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),xn(o=>{if(!wl(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ge(l,c,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;KL.set(this.visualElement,this);const t=this.visualElement.current,n=Fo(t,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=c.target,p=f!==t&&kI(f);u&&h&&!p&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Vs(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=qL(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),de.read(s);const a=ga(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(xn(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Nf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function p0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function qL(e,t,n){const r=bv(e,p0(n)),s=bv(t,p0(n));return()=>{r(),s()}}function wl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class QL extends Gr{constructor(t){super(t),this.removeGroupControls=Vt,this.removeListeners=Vt,this.controls=new GL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Vt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ud=e=>(t,n)=>{e&&de.update(()=>e(t,n),!1,!0)};class JL extends Gr{constructor(){super(...arguments),this.removePointerDownListener=Vt}onPointerDown(t){this.session=new tE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ud(t),onStart:Ud(n),onMove:Ud(r),onEnd:(i,o)=>{delete this.session,s&&de.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Fo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Fd=!1;class XL extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Fd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Fd=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||de.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Rm.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Fd=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rE(e){const[t,n]=HS(),r=x.useContext(hm);return d.jsx(XL,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(XS),isPresent:t,safeToRemove:n})}const ZL={pan:{Feature:JL},drag:{Feature:QL,ProjectionNode:WS,MeasureLayout:rE}};function m0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&de.postRender(()=>i(t,Ua(t)))}class eM extends Gr{mount(){const{current:t}=this.node;t&&(this.unmount=bI(t,(n,r)=>(m0(this.node,r,"Start"),s=>m0(this.node,s,"End"))))}unmount(){}}class tM extends Gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=La(ga(this.node.current,"focus",()=>this.onFocus()),ga(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function g0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&de.postRender(()=>i(t,Ua(t)))}class nM extends Gr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=CI(t,(s,i)=>(g0(this.node,i,"Start"),(o,{success:a})=>g0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Of=new WeakMap,Vd=new WeakMap,rM=e=>{const t=Of.get(e.target);t&&t(e)},sM=e=>{e.forEach(rM)};function iM({root:e,...t}){const n=e||document;Vd.has(n)||Vd.set(n,{});const r=Vd.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(sM,{root:e,...t})),r[s]}
322function oM(e,t,n){const r=iM(t);return Of.set(e,n),r.observe(e),()=>{Of.delete(e),r.unobserve(e)}}const aM={some:0,all:1};class lM extends Gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:aM[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=u?h:f;p&&p(c)};this.stopObserver=oM(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(cM(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function cM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const uM={inView:{Feature:lM},tap:{Feature:nM},focus:{Feature:tM},hover:{Feature:eM}},dM={layout:{ProjectionNode:WS,MeasureLayout:rE}},hM={...DL,...uM,...ZL,...dM},Qi=RL(hM,jL);var y0=function(){return y0=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},y0.apply(this,arguments)};function Lu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function fM(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(h){o(h)}}function l(u){try{c(r.throw(u))}catch(h){o(h)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}function TF(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}const pM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Fm extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class mM extends Fm{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class v0 extends Fm{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class w0 extends Fm{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var If;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(If||(If={}));class gM{constructor(t,{headers:n={},customFetch:r,region:s=If.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=pM(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return fM(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:h}=r;let f={},{region:p}=r;p||(p=this.region);const w=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,w.searchParams.set("forceFunctionRegion",p));let y;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",y=c):typeof c=="string"?(f["Content-Type"]="text/plain",y=c):typeof FormData<"u"&&c instanceof FormData?y=c:(f["Content-Type"]="application/json",y=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?y=JSON.stringify(c):y=c;let b=u;h&&(o=new AbortController,i=setTimeout(()=>
322o.abort(),h),u?(b=o.signal,u.addEventListener("abort",()=>o.abort())):b=o.signal);const m=yield this.fetch(w.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:y,signal:b}).catch(S=>{throw new mM(S)}),g=m.headers.get("x-relay-error");if(g&&g==="true")throw new v0(m);if(!m.ok)throw new w0(m);let v=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return v==="application/json"?_=yield m.json():v==="application/octet-stream"||v==="application/pdf"?_=yield m.blob():v==="text/event-stream"?_=m:v==="multipart/form-data"?_=yield m.formData():_=yield m.text(),{data:_,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof w0||a instanceof v0?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var yM=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},vM=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,a=null,l=null,c=i.status,u=i.statusText;if(i.ok){var h,f;if(n.method!=="HEAD"){var p;const m=await i.text();m===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?a=m:a=JSON.parse(m))}const y=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),b=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");y&&b&&b.length>1&&(l=parseInt(b[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var w;const y=await i.text();try{o=JSON.parse(y),Array.isArray(o)&&i.status===404&&(a=[],o=null,c=200,u="OK")}catch{i.status===404&&y===""?(c=204,u="No Content"):o={message:y}}if(o&&n.isMaybeSingle&&(!(o==null||(w=o.details)===null||w===void 0)&&w.includes("0 rows"))&&(o=null,c=200,u="OK"),o&&n.shouldThrowOnError)throw new yM(o)}return{error:o,data:a,count:l,status:c,statusText:u}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",c="";const u=i==null?void 0:i.cause;if(u){var h,f,p,w;const m=(h=u==null?void 0:u.message)!==null&&h!==void 0?h:"",g=(f=u==null?void 0:u.code)!==null&&f!==void 0?f:"";a=`${(p=i==null?void 0:i.name)!==null&&p!==void 0?p:"FetchError"}: ${i==null?void 0:i.message}`,a+=` 323 324Caused by: ${(w=u==null?void 0:u.name)!==null&&w!==void 0?w:"Error"}: ${m}`,g&&(a+=` (${g})`),u!=null&&u.stack&&(a+=` 325${u.stack}`)}else{var y;a=(y=i==null?void 0:i.stack)!==null&&y!==void 0?y:""}const b=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",b>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${b} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",b>this.urlLengthLimit&&(l+=`. Your request URL is ${b} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}}
325)),s.then(e,t)}returns(){return this}overrideTypes(){return this}},wM=class extends vM{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const x0=new RegExp("[,()]");var Bs=class extends wM{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&x0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&x0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},xM=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}
325cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new Bs({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const a=e.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new Bs({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&a.searchParams.set("on_conflict",t),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(e)){const c=e.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(c.length>0){const u=[...new Set(c)].map(h=>`"${h}"`);a.searchParams.set("columns",u.join(","))}}return new Bs({method:o,url:a,headers:l,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Bs({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Bs({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}function bM(e,t){if(ya(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ya(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _M(e){var t=bM(e,"string");return ya(t)=="symbol"?t:t+""}function SM(e,t,n){return(t=_M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(n),!0).forEach(function(r){SM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var EM=class sE{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,c)=>{const u=new AbortController,h=setTimeout(()=>u.abort(),i),f=c==null?void 0:c.signal;if(f){if(f.aborted)return clearTimeout(h),a(l,c);const p=()=>{clearTimeout(h),u.abort()};return f.addEventListener("abort",p,{once:!0}),a(l,xl(xl({},c),{},{signal:u.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",p)})}return a(l,xl(xl({},c),{},{signal:u.signal})).finally(()=>clearTimeout(h))}:this.fetch=a}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new xM(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new sE(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let c;const u=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(u)),h=r&&Object.values(n).some(u);h?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,w])=>w!==void 0).map(([p,w])=>[p,Array.isArray(w)?`{${w.join(",")}}`:`${w}
325`]).forEach(([p,w])=>{l.searchParams.append(p,w)})):(a="POST",c=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Bs({method:a,url:l,headers:f,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class kM{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 326import ws from "ws" 327new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 328 329Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const TM="2.97.0",CM=`realtime-js/${TM}`,PM="1.0.0",iE="2.0.0",_0=iE,Df=1e4,AM=1e3,RM=100;var fr;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(fr||(fr={}));var De;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(De||(De={}));var rn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(rn||(rn={}));var Lf;(function(e){e.websocket="websocket"})(Lf||(Lf={}));var ss;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ss||(ss={}));class jM{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(i=t.join_ref)!==null&&i!==void 0?i:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let w=new DataView(p),y=0;w.setUint8(y++,this.KINDS.userBroadcastPush),w.setUint8(y++,l.length),w.setUint8(y++,a.length),w.setUint8(y++,o.length),w.setUint8(y++,c.length),w.setUint8(y++,h.length),w.setUint8(y++,n),Array.from(l,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(a,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(o,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(c,m=>w.setUint8(y++,m.charCodeAt(0))),Array.from(h,m=>w.setUint8(y++,m.charCodeAt(0)));var b=new Uint8Array(p.byteLength+r.byteLength);return b.set(new Uint8Array(p),0),b.set(new Uint8Array(r),p.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,a,l]=r;
329return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(t.slice(l,l+s));l=l+s;const u=r.decode(t.slice(l,l+i));l=l+i;const h=r.decode(t.slice(l,l+o));l=l+o;const f=t.slice(l,t.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,w={type:this.BROADCAST_EVENT,event:u,payload:p};return o>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class oE{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var he;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(he||(he={}));const S0=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=NM(o,e,t,s),i),{}):{}},NM=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?aE(i,o):Mf(o)},aE=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return LM(t,n)}switch(e){case he.bool:return OM(t);case he.float4:case he.float8:case he.int2:case he.int4:case he.int8:case he.numeric:case he.oid:return IM(t);case he.json:case he.jsonb:return DM(t);case he.timestamp:return MM(t);case he.abstime:case he.date:case he.daterange:case he.int4range:case he.int8range:case he.money:case he.reltime:case he.text:case he.time:case he.timestamptz:case he.timetz:case he.tsrange:case he.tstzrange:return Mf(t);default:return Mf(t)}},Mf=e=>e,OM=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},IM=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},DM=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},LM=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>aE(t,a))}return e},MM=e=>typeof e=="string"?e.replace(" ","T"):e,lE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Bd{constructor(t,n,r={},s=Df){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHo
329oks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var E0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(E0||(E0={}));class Vo{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Vo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Vo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Vo.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const h=i[c];if(h){const f=u.map(b=>b.presence_ref),p=h.map(b=>b.presence_ref),w=u.filter(b=>p.indexOf(b.presence_ref)<0),y=h.filter(b=>f.indexOf(b.presence_ref)<0);w.length>0&&(a[c]=w),y.length>0&&(l[c]=y)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),u.length>0){const h=t[a].map(p=>p.presence_ref),f=u.filter(p=>h.indexOf(p.presence_ref)<0);t[a].unshift(...f)}r(a,u,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;const u=l.map(h=>h.presence_ref);c=c.filter(h=>u.indexOf(h.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var k0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(k0||(k0={}));var Bo;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Bo||(Bo={}));var $n;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})($n||($n={}));class oi{constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=De.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Bd(this,rn.join,this.params,this.timeout),this.rejoinTimer=new oE(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=De.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=De.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=De.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=De.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=De.errored,this.rejoinTimer.scheduleTimeout())}),this._on(rn.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new Vo(this),this.broadcastEndpointURL=lE(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==De.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Bo.PRESENCE]&&this.bindings[Bo.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t($n.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t($n.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t($n.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,b=(w=y==null?void 0:y.length)!==null&&w!==void 0?w:0,m=[];for(let g=0;g<b;g++){const v=y[g],{filter:{event:_,schema:S,table:E,filter:k}}=v,T=p&&p[g];if(T&&T.event===_&&oi.isFilterValueEqual(T.schema,S)&&oi.isFilterValueEqual(T.table,E)&&oi.isFilterValueEqual(T.filter,k))m.push(Object.assign(Object.assign({},v),{id:T.id}));else{this.unsubscribe(),this.state=De.errored,t==null||t($n.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,t&&t($n.SUBSCRIBED);return}}).receive("error",p=>{this.state=De.errored,t==null||t($n.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t($n.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===De.joined&&t===Bo.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
329try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=De.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(rn.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new Bd(this,rn.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=De.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Bd(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>RM){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=rn;if(r&&[a,l,c,u].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var w,y,b;return((w=p.filter)===null||w===void 0?void 0:w.event)==="*"||((b=(y=p.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(p=>p.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var w,y,b,m,g,v;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const _=p.id,S=(w=p.filter)===null||w===void 0?void 0:w.event;return _&&((y=n.ids)===null||y===void 0?void 0:y.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const _=(g=(m=p==null?void 0:p.filter)===null||m===void 0?void 0:m.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((v=n==null?void 0:n.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof f=="object"&&"ids"in f){const w=f.data,{schema:y,table:b,commit_timestamp:m,type:g,errors:v}=w;f=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:m,eventType:g,new:{},old:{},errors:v}),this._getPayloadRecords(w))}p.callback(f,r)}
329)}_isClosed(){return this.state===De.closed}_isJoined(){return this.state===De.joined}_isJoining(){return this.state===De.joining}_isLeaving(){return this.state===De.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&oi.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(rn.close,{},t)}_onError(t){this._on(rn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=De.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=S0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=S0(t.columns,t.old_record)),n}}const zd=()=>{},bl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},$M=[1e3,2e3,5e3,1e4],UM=1e4,FM=` 330 addEventListener("message", (e) => { 331 if (e.data.event === "start") { 332 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 333 } 334 });`;class VM{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Df,this.transport=null,this.heartbeatIntervalMs=bl.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=zd,this.ref=0,this.reconnectTimer=null,this.vsn=_0,this.logger=zd,this.conn=null,this.sendBuffer=[],this.serializer=new jM,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...i)=>s(...i):(...i)=>fetch(...i),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Lf.websocket}`,this.httpEndpoint=lE(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=kM.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n} 335 336To use Realtime in Node.js, you need to provide a WebSocket implementation: 337 338Option 1: Use Node.js 22+ which has native WebSocket support 339Option 2: Install and provide the "ws" package: 340 341 npm install ws 342 343 import ws from "ws" 344 const client = new RealtimeClient(url, { 345 ...options, 346 transport: ws 347 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case fr.connecting:return ss.Connecting;case fr.open:return ss.Open;case fr.closing:return ss.Closing;default:return ss.Closed}}isConnected(){return this.connectionState()===ss.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}
347channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new oi(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(AM,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},bl.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",c)}catch(u){this.log("error","error in heartbeat callback",u)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),i),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===fr.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===fr.open||this.conn.readyState===fr.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}
347_triggerChanError(){this.channels.forEach(t=>t._trigger(rn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([FM],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:CM};n&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(rn.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new oE(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},bl.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,i,o,a,l,c,u,h,f,p;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Df,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:bl.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:zd,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:_0,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:w=>$M[w-1]||UM,this.vsn){case PM:this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(w,y)=>y(JSON.stringify(w)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(w,y)=>y(JSON.parse(w));break;case iE:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var va=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function BM(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function zM(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function WM(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=BM(e.baseUrl,r,s),l=await zM(e.auth),c=await t(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),h=(c.headers.get("content-type")||"").includes("application/json"),f=h&&u?JSON.parse(u):u;if(!c.ok){const p=h?f:void 0,w=p==null?void 0:p.error;throw new va((w==null?void 0:w.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:p})}return{status:c.status,headers:c.headers,data:f}}}}function _l(e){return e.join("�")}var HM=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:_l(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${_l(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${_l(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${_l(e.namespace)}`}),!0}catch(t){if(t instanceof va&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof va&&n.status===409)return;throw n}}};function Ds(e){return e.join("�")}var KM=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ds(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof va&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof va&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},GM=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=WM({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new HM(this.client,t),this.tableOps=new KM(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
347async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Mu=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function $u(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Sl=class extends Mu{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},cE=class extends Mu{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const qM=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),YM=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$f=e=>{if(Array.isArray(e))return e.map(n=>$f(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=$f(r)}),t},QM=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}function JM(e,t){if(wa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(wa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XM(e){var t=JM(e,"string");return wa(t)=="symbol"?t:t+""}function ZM(e,t,n){return(t=XM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T0(Object(n),!0).forEach(function(r){ZM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const C0=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},e5=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const s=e,i=s.status||500;if(typeof s.json=="function")s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Sl(C0(o),i,a,r))}).catch(()=>{if(r==="vectors"){const o=i+"";t(new Sl(s.statusText||`HTTP ${i} error`,i,o,r))}else{const o=i+"";t(new Sl(s.statusText||`HTTP ${i} error`,i,o,r))}});else{const o=i+"";t(new Sl(s.statusText||`HTTP ${i} error`,i,o,r))}}else t(new cE(C0(e),e,r))},t5=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?K(K({},s),n):(YM(r)?(s.headers=K({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),K(K({},s),n))};async function ho(e,t,n,r,s,i,o){return new Promise((a,l)=>{e(n,t5(t,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>e5(c,l,r,o))})}function uE(e="storage"){return{get:async(t,n,r,s)=>ho(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>ho(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>ho(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>ho(t,"HEAD",n,K(K({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>ho(t,"DELETE",n,s,i,r,e)}}const n5=uE("storage"),{get:xa,post:en,put:Uf,head:r5,remove:Vm}=n5,Ct=uE("vectors");var Ji=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=qM(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=K(K({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if($u(n))return{data:null,error:n};throw n}}},s5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};let dE;dE=Symbol.toStringTag;var i5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[dE]="BlobDownloadBuilder",this.promise=null}asStream(){return new s5(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if($u(t))return{data:null,error:t};throw t}}};const o5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},P0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var a5=class extends Ji{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=K(K({},P0),r);let a=K(K({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(a=K(K({},a),r.headers));const c=s._removeEmptyFolders(t),u=s._getFinalPath(c),h=await(e=="PUT"?Uf:en)(s.fetch,`${s.url}/object/${u}`,i,K({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",t),s.handleOperation(async()=>{let l;
347const c=K({upsert:P0.upsert},r),u=K(K({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await Uf(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=K({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await en(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Mu("No token returned by API");return{signedUrl:o.toString(),path:e,token:a}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await en(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
347stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await en(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e),i=await en(r.fetch,`${r.url}/object/sign/${s}`,K({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${i.signedURL}${o}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await en(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>K(K({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),a=()=>xa(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0},n);return new i5(a,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>$f(await xa(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await r5(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if($u(r)&&r instanceof cE){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let a=r.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${a}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Vm(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=K(K(K({},o5),t),{},{prefix:e||""});return await en(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=K({},e);return await en(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const l5="2.97.0",Fa={"X-Client-Info":`storage-js/${l5}`};var c5=class extends Ji{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=K(K({},Fa),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await xa(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await xa(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await en(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Uf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await en(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Vm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},u5=class extends Ji{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=K(K({},Fa),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await en(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await xa(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Vm(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!QM(e))throw new Mu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new GM({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
347),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},d5=class extends Ji{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=K(K({},Fa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Ct.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Ct.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},h5=class extends Ji{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=K(K({},Fa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},f5=class extends Ji{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=K(K({},Fa),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Ct.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},p5=class extends f5{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new m5(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},m5=class extends d5{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new g5(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
347,g5=class extends h5{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,K(K({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},y5=class extends c5{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new a5(this.url,this.headers,e,this.fetch)}get vectors(){return new p5(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new u5(this.url+"/iceberg",this.headers,this.fetch)}};const hE="2.97.0",zs=30*1e3,Ff=3,Wd=Ff*zs,v5="http://localhost:9999",w5="supabase.auth.token",x5={"X-Client-Info":`gotrue-js/${hE}`},Vf="X-Supabase-Api-Version",fE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},b5=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,_5=10*60*1e3;class ba extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function B(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class S5 extends ba{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function E5(e){return B(e)&&e.name==="AuthApiError"}class is extends ba{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Jn extends ba{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class _t extends Jn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Hd(e){return B(e)&&e.name==="AuthSessionMissingError"}class Ls extends Jn{constructor(){super("Auth session or user missing","AuthInvalidToken
347ResponseError",500,void 0)}}class El extends Jn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class kl extends Jn{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function k5(e){return B(e)&&e.name==="AuthImplicitGrantRedirectError"}class A0 extends Jn{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class T5 extends Jn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Bf extends Jn{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Kd(e){return B(e)&&e.name==="AuthRetryableFetchError"}class R0 extends Jn{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class zf extends Jn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const qc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),j0=` 348\r=`.split(""),C5=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<j0.length;t+=1)e[j0[t].charCodeAt(0)]=-2;for(let t=0;t<qc.length;t+=1)e[qc[t].charCodeAt(0)]=t;return e})();function N0(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(qc[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(qc[r]),t.queuedBits-=6}}function pE(e,t,n){const r=C5[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function O0(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{R5(o,r,n)};for(let o=0;o<e.length;o+=1)pE(e.charCodeAt(o),s,i);return t.join("")}function P5(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function A5(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}P5(r,t)}}function R5(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function mi(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)pE(e.charCodeAt(s),n,r);return new Uint8Array(t)}function j5(e){const t=[];return A5(e,n=>t.push(n)),new Uint8Array(t)}function ds(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>N0(s,n,r)),N0(null,n,r),t.join("")}function N5(e){return Math.round(Date.now()/1e3)+e}function O5(){return Symbol("auth-callback")}const ze=()=>typeof window<"u"&&typeof document<"u",Xr={tested:!1,writable:!1},mE=()=>
348{if(!ze())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Xr.tested)return Xr.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Xr.tested=!0,Xr.writable=!0}catch{Xr.tested=!0,Xr.writable=!1}return Xr.writable};function I5(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const gE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),D5=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Ws=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Zr=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Be=async(e,t)=>{await e.removeItem(t)};class Uu{constructor(){this.promise=new Uu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Uu.promiseConstructor=Promise;function Tl(e){const t=e.split(".");if(t.length!==3)throw new zf("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!b5.test(t[r]))throw new zf("JWT not in base64url format");return{header:JSON.parse(O0(t[0])),payload:JSON.parse(O0(t[1])),signature:mi(t[2]),raw:{header:t[0],payload:t[1]}}}async function L5(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function M5(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function $5(e){return("0"+e.toString(16)).substr(-2)}function U5(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,$5).join("")}async function F5(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function V5(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await F5(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ms(e,t,n=!1){const r=U5();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Ws(e,`${t}-code-verifier`,s);const i=await V5(r);return[i,r===i?"plain":"s256"]}const B5=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function z5(e){const t=e.headers.get(Vf);if(!t||!t.match(B5))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function W5(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function H5(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const K5=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function $s(e){if(!K5.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Gd(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function G5(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
348if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function I0(e){return JSON.parse(JSON.stringify(e))}const rs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),q5=[502,503,504];async function D0(e){var t;if(!D5(e))throw new Bf(rs(e),0);if(q5.includes(e.status))throw new Bf(rs(e),e.status);let n;try{n=await e.json()}catch(i){throw new is(rs(i),i)}let r;const s=z5(e);if(s&&s.getTime()>=fE["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new R0(rs(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new _t}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new R0(rs(n),e.status,n.weak_password.reasons);throw new S5(rs(n),e.status||500,r)}const Y5=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function G(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Vf]||(i[Vf]=fE["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await Q5(e,t,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function Q5(e,t,n,r,s,i){const o=Y5(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Bf(rs(l),0)}if(a.ok||await D0(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await D0(l)}}function Qt(e){var t;let n=null;Z5(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=N5(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function L0(e){const t=Qt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function gr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function J5(e){return{data:e,error:null}}function X5(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Lu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function M0(e){return e}function Z5(e){return e.access_token&&e.refresh_token&&e.expires_in}const qd=["global","local","others"];class e3{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=gE(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=qd[0]){if(qd.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${qd.join(", ")}`);try{return await G(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(B(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await G(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:gr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Lu(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await G(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:X5,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(B(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await G(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:gr})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await G(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:M0});if(u.error)throw u.error;const h=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
3480&&(p.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);c[`${b}Page`]=y}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(B(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){$s(t);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:gr})}catch(n){if(B(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){$s(t);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:gr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){$s(t);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:gr})}catch(r){if(B(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){$s(t.userId);try{const{data:n,error:r}=await G(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _deleteFactor(t){$s(t.userId),$s(t.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await G(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:M0});if(u.error)throw u.error;const h=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);c[`${b}Page`]=y}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(c){if(B(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await G(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await G(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(B(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await G(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(B(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await G(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(B(n))return{data:null,error:n};throw n}}}function $0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Us={debug:!!(globalThis&&mE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
348class yE extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class U0 extends yE{}async function t3(e,t,n){Us.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;t>0&&setTimeout(()=>{r.abort(),Us.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Us.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Us.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Us.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new U0(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Us.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}catch(s){throw(s==null?void 0:s.name)==="AbortError"?new U0(`Acquiring an exclusive Navigator LockManager lock "${e}" timed out waiting ${t}ms`):s}}function n3(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function vE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function r3(e){return parseInt(e,16)}function s3(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function i3(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 349`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=vE(e.address),w=u?`${u}://${r}`:r,y=e.statement?`${e.statement} 350`:"",b=`${w} wants you to sign in with your Ethereum account: 351${p} 352 353${y}`;let m=`URI: ${h} 354Version: ${f} 355Chain ID: ${n}${o?` 356Nonce: ${o}`:""} 357Issued At: ${i.toISOString()}`;if(s&&(m+=` 358Expiration Time: ${s.toISOString()}`),a&&(m+=` 359Not Before: ${a.toISOString()}`),l&&(m+=` 360Request ID: ${l}`),c){let g=` 361Resources:`;for(const v of c){if(!v||typeof v!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${v}`);g+=` 362- ${v}`}m+=g}return`${b} 363${m}`}class Ne extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class Yc extends Ne{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function o3({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ne({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ne({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ne({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ne({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(wE(o)){if(i.rp.id!==o)return new Ne({message:`The RP ID "${i.rp.id}
363" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ne({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function a3({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ne({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(wE(r)){if(n.rpId!==r)return new Ne({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ne({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class l3{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const c3=new l3;function u3(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Lu(e,["challenge","user","excludeCredentials"]),i=mi(t).buffer,o=Object.assign(Object.assign({},n),{id:mi(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:mi(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function d3(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Lu(e,["challenge","allowCredentials"]),s=mi(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:mi(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function h3(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:ds(new Uint8Array(e.response.attestationObject)),clientDataJSON:ds(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function f3(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:ds(new Uint8Array(s.authenticatorData)),clientDataJSON:ds(new Uint8Array(s.clientDataJSON)),signature:ds(new Uint8Array(s.signature)),userHandle:s.userHandle?ds(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function wE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function F0(){var e,t;return!!(ze()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function p3(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Yc("Browser returned unexpected credential type",t)}:{data:null,error:new Yc("Empty credential response",t)}}
363catch(t){return{data:null,error:o3({error:t,options:e})}}}async function m3(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Yc("Browser returned unexpected credential type",t)}:{data:null,error:new Yc("Empty credential response",t)}}catch(t){return{data:null,error:a3({error:t,options:e})}}}const g3={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},y3={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Qc(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const a=r[i];t(a)?r[i]=Qc(a,o):r[i]=Qc(o)}else r[i]=o}return r}function v3(e,t){return Qc(g3,e,t||{})}function w3(e,t){return Qc(y3,e,t||{})}class x3{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!a)return{data:null,error:l};const c=s??c3.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const h=r;if(h)u.name=`${u.id}:${h}`;else{const p=(await this.client.getUser()).data.user,w=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";u.name=`${u.id}:${w}`}}u.displayName||(u.displayName=u.name)}switch(a.webauthn.type){case"create":{const u=v3(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await p3({publicKey:u,signal:c});return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const u=w3(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await m3(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return h?{data:{factorId:t,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(a){return B(a)?{data:null,error:a}:{data:null,error:new is("Unexpected error in challenge",a)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new ba("rpId is required for WebAuthn authentication")};try{if(!F0())return{data:null,error:new is("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new is("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new ba("rpId is required for WebAuthn registration")};try{if(!F0())return{data:null,error:new is("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(u=>{var h;
363return(h=u.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return B(o)?{data:null,error:o}:{data:null,error:new is("Unexpected error in register",o)}}}}n3();const b3={url:v5,storageKey:w5,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:x5,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4,skipAutoInitialize:!1};async function V0(e,t,n){return await n()}const Fs={};class _a{get jwks(){var t,n;return(n=(t=Fs[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Fs[this.storageKey]=Object.assign(Object.assign({},Fs[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Fs[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Fs[this.storageKey]=Object.assign(Object.assign({},Fs[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},b3),t);if(this.storageKey=i.storageKey,this.instanceID=(n=_a.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,_a.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&ze()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new e3({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=gE(i.fetch),this.lock=i.lock||V0,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&ze()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=t3:this.lock=V0,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new x3(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:mE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=$0(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=$0(this.memoryStorage)),ze()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${hE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(ze()&&(n=I5(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),ze()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),k5(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return B(n)?this._returnResult({error:n}):this._returnResult({error:new is("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Qt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(B(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:u,password:h,options:f}=t;let p=null,w=null;this.flowType==="pkce"&&([p,w]=await Ms(this.storage,this.storageKey)),i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:w},xform:Qt})}else if("phone"in t){const{phone:u,password:h,options:f}=t;i=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Qt})}else throw new El("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Be(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:L0})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:L0})}else throw new El("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Ls;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,a,l,c,u,h,f;let p,w;if("message"in t)p=t.message,w=t.signature;else{const{chain:y,wallet:b,statement:m,options:g}=t;let v;if(ze())if(typeof b=="object")v=b;else{const R=window;if("ethereum"in R&&typeof R.ethereum=="object"&&"request"in R.ethereum&&typeof R.ethereum.request=="function")v=R.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");v=b}const _=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href),S=await v.request({method:"eth_requestAccounts"}).then(R=>R).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=vE(S[0]);let k=(r=g==null?void 0:g.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!k){const R=await v.request({method:"eth_chainId"});k=r3(R)}const T={domain:_.host,address:E,statement:m,uri:_.href,version:"1",chainId:k,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=g==null?void 0:g.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.resources};p=i3(T),w=await v.request({method:"personal_sign",params:[s3(p),E]})}try{const{data:y,error:b}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:w}
363,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Qt});if(b)throw b;if(!y||!y.session||!y.user){const m=new Ls;return this._returnResult({data:{user:null,session:null},error:m})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(B(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var n,r,s,i,o,a,l,c,u,h,f,p;let w,y;if("message"in t)w=t.message,y=t.signature;else{const{chain:b,wallet:m,statement:g,options:v}=t;let _;if(ze())if(typeof m=="object")_=m;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof m!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=m}const S=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},v==null?void 0:v.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),g?{statement:g}:null));let k;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")k=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)k=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in k&&"signature"in k&&(typeof k.signedMessage=="string"||k.signedMessage instanceof Uint8Array)&&k.signature instanceof Uint8Array)w=typeof k.signedMessage=="string"?k.signedMessage:new TextDecoder().decode(k.signedMessage),y=k.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=v==null?void 0:v.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=v==null?void 0:v.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${v.signInWithSolana.notBefore}`]:[],...!((o=v==null?void 0:v.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${v.signInWithSolana.expirationTime}`]:[],...!((a=v==null?void 0:v.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${v.signInWithSolana.chainId}`]:[],...!((l=v==null?void 0:v.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${v.signInWithSolana.nonce}`]:[],...!((c=v==null?void 0:v.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${v.signInWithSolana.requestId}`]:[],...!((h=(u=v==null?void 0:v.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||h===void 0)&&h.length?["Resources",...v.signInWithSolana.resources.map(k=>`- ${k}`)]:[]].join(` 364`);const E=await _.signMessage(new TextEncoder().encode(w),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=E}}try{const{data:b,error:m}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:ds(y)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Qt});if(m)throw m;if(!b||!b.session||!b.user){const g=new Ls;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:m})}catch(b){if(B(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await Zr(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new T5;const{data:i,error:o}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Qt});if(await Be(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new Ls;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Qt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Ls;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:a,options:l}=t;
364let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Ms(this.storage,this.storageKey));const{error:h}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new El("You must provide either an email or phone number.")}catch(a){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Qt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(B(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Ms(this.storage,this.storageKey));const c=await G(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:J5});return!((i=c.data)===null||i===void 0)&&i.url&&ze()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new _t;const{error:s}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(B(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await G(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=await G(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new El("You must provide either an email or phone number and a type")}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Zr(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
364id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Wd:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Zr(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Gd()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=G5(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:gr}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new _t}:await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:gr})})}catch(n){if(B(n))return Hd(n)&&(await this._removeSession(),await Be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new _t;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Ms(this.storage,this.storageKey));const{data:c,error:u}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:gr});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new _t;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Tl(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(B(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new _t;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(B(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!ze())throw new kl("No browser detected.");
364if(t.error||t.error_description||t.error_code)throw new kl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new A0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new kl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new A0("No code detected.");const{data:g,error:v}=await this._exchangeCodeForSession(t.code);if(v)throw v;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new kl("No session defined in URL");const u=Math.round(Date.now()/1e3),h=parseInt(a);let f=u+h;l&&(f=parseInt(l));const p=f-u;p*1e3<=zs&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${h}s`);const w=f-h;u-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,f,u):u-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,f,u);const{data:y,error:b}=await this._getUser(i);if(b)throw b;const m={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:c,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:t.type},error:null})}catch(r){if(B(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Zr(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!Hd(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(E5(a)&&(a.status===404||a.status===401||a.status===403)||Hd(a)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Be(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=O5(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ms(this.storage,this.storageKey,!0));try{return await G(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:h,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(c=h.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return ze()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(B(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
364if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=t,h=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Qt}),{data:f,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Ls}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await Be(this.storage,`${this.storageKey}-code-verifier`),B(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await G(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await M5(async s=>(s>
3640&&await L5(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Qt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Kd(i)&&Date.now()+o-r<zs})}catch(r){if(this._debug(n,"error",r),B(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),ze()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Zr(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Zr(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ws(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Gd()}else if(s&&!s.user&&!s.user){const o=await Zr(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Be(this.storage,this.storageKey+"-user"),await Ws(this.storage,this.storageKey,s)):s.user=Gd()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Wd;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Wd}
364s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Kd(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new _t;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Uu;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new _t;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),B(i)){const o={data:null,error:i};return Kd(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Be(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ws(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=I0(s);await Ws(this.storage,this.storageKey,i)}else{const s=I0(n);await Ws(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Be(this.storage,this.storageKey),await Be(this.storage,this.storageKey+"-code-verifier"),await Be(this.storage,this.storageKey+"-user"),this.userStorage&&await Be(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&ze()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),zs);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/zs);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${zs}ms, refresh threshold is ${Ff} ticks`),s<=Ff&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof yE)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ze()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>
364{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Ms(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await G(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?h3(t.webauthn.credential_response):f3(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u3(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:d3(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:p}=Tl(t);let w=null;p.aal&&(w=p.aal);let y=w;const{data:{user:b},error:m}=await this.getUser(t);if(m)return this._returnResult({data:null,error:m});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(y="aal2");const v=p.amr||[];return{data:{currentLevel:w,nextLevel:y,currentAuthenticationMethods:v},error:null}}catch(p){if(B(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:a}
364=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Tl(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await G(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new _t})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new _t});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&ze()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new _t});const o=await G(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&ze()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await G(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new _t})})}catch(t){if(B(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await G(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new _t})})}catch(n){if(B(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+_5>s)return r;const{data:i,error:o}=await G(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:w}
364=await this.getSession();if(w||!p.session)return this._returnResult({data:null,error:w});r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Tl(r);n!=null&&n.allowExpired||W5(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const u=H5(s.alg),h=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,h,o,j5(`${a}.${l}`)))throw new zf("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(B(r))return this._returnResult({data:null,error:r});throw r}}}_a.nextInstanceID={};const _3=_a,S3="2.97.0";let So="";typeof Deno<"u"?So="deno":typeof document<"u"?So="web":typeof navigator<"u"&&navigator.product==="ReactNative"?So="react-native":So="node";const E3={"X-Client-Info":`supabase-js-${So}/${S3}`},k3={headers:E3},T3={schema:"public"},C3={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},P3={};function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sa(e)}function A3(e,t){if(Sa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Sa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R3(e){var t=A3(e,"string");return Sa(t)=="symbol"?t:t+""}function j3(e,t,n){return(t=R3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B0(Object(n),!0).forEach(function(r){j3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const N3=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),O3=()=>Headers,I3=(e,t,n)=>{const r=N3(n),s=O3();return async(i,o)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Ce(Ce({},o),{},{headers:c}))}};function D3(e){return e.endsWith("/")?e:e+"/"}function L3(e,t){var n,r;const{db:s,auth:i,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:h}=t,f={db:Ce(Ce({},l),s),auth:Ce(Ce({},c),i),realtime:Ce(Ce({},u),o),storage:{},global:Ce(Ce(Ce({},h),a),{},{headers:Ce(Ce({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function M3(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(D3(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var $3=class extends _3{constructor(e){super(e)}},U3=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=M3(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:T3,realtime:P3,auth:Ce(Ce({},C3),{},{storageKey:o}),global:k3},l=L3(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=I3(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ce({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new EM(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new y5(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new gM(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
364channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new $3({url:this.authUrl.href,headers:Ce(Ce({},f),u),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new VM(this.realtimeUrl.href,Ce(Ce({},e),{},{params:Ce(Ce({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const F3=(e,t,n)=>new U3(e,t,n);function V3(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}V3()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function B3(){var b,m;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((m=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:m[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",h=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),p=(g,v,_)=>new Promise(S=>{const E=f();let k=!1,T;const R=O=>{k||(k=!0,clearTimeout(T),window.removeEventListener("message",P),S(O))},P=O=>{if(c.indexOf(O.origin)<0)return;const W=O.data;W&&W.type===u&&W.requestId===E&&R(W)};window.addEventListener("message",P);const $={type:g,requestId:E,projectId:s,key:v};_!==void 0&&($.value=_);for(const O of c)window.parent.postMessage($,O);T=setTimeout(()=>R(null),h)});let w=!0;const y=250;return{getItem:async g=>{let v=await p("lovable-preview-auth:get",g);return!v&&w&&(await new Promise(_=>setTimeout(_,y)),v=await p("lovable-preview-auth:get",g)),w=!1,v&&v.ok&&typeof v.value=="string"?v.value===""?(localStorage.removeItem(g),null):v.value:localStorage.getItem(g)},setItem:(g,v)=>(localStorage.setItem(g,v),p("lovable-preview-auth:set",g,v).then(_=>{_&&_.ok&&typeof _.value=="string"&&localStorage.getItem(g)===v&&(_.value===""?localStorage.removeItem(g):localStorage.setItem(g,_.value))})),removeItem:g=>(localStorage.removeItem(g),p("lovable-preview-auth:remove",g).then(()=>{}))}}const z3="https://rifgfsrcpiwsyyisovec.supabase.co",W3="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJpZmdmc3JjcGl3c3l5aXNvdmVjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE4NTc2MzQsImV4cCI6MjA4NzQzMzYzNH0.uiwSQreYfNUdaDWVNYCLAWpxJEOQiSyqAnHDe29DkeQ",Se=F3(z3,W3,{auth:{storage:B3(),persistSession:!0,autoRefreshToken:!0}}),CF=Object.freeze(Object.defineProperty({__proto__:null,supabase:Se},Symbol.toStringTag,{value:"Module"})),xE=x.createContext({user:null,session:null,loading:!0,signOut:async()=>{}}),gn=()=>x.useContext(xE),H3=I.forwardRef(function({children:t},n){const[r,s]=x.useState(null),[i,o]=x.useState(null),[a,l]=x.useState(!0);x.useEffect(()=>{const{data:{subscription:u}}=Se.auth.onAuthStateChange((h,f)=>{var p,w,y;if(o(f),s((f==null?void 0:f.user)??null),l(!1),h==="SIGNED_IN"&&(f!=null&&f.user)&&f.user.created_at&&Date.now()-new Date(f.user.created_at).getTime()<6e4){const m=((p=f.user.user_metadata)==null?void 0:p.full_name)||((w=f.user.user_metadata)==null?void 0:w.display_name)||((y=f.user.email)==null?void 0:y.split("@")[0])||"there";Se.functions.invoke("send-transactional-email",{body:{type:"welcome",to:f.user.email,data:{displayName:m}}}).catch(g=>console.error("Welcome email failed:",g))}});return Se.auth.getSession().then(({data:{session:h}})=>{o(h),s((h==null?void 0:h.user)??null),l(!1)}),()=>u.unsubscribe()},[]);const c=async()=>{await Se.auth.signOut()};return d.jsx(xE.Provider,{value:{user:r,session:i,loading:a,signOut:c},children:t})});function K3(){const{pathname:e}=bt();x.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[e])}const G3=Hp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-100 disabled:!bg-muted disabled:!bg-none disabled:!text-muted-foreground disabled:!border-transparent disabled:!shadow-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ne=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?oa:"button";return d.jsx(o,{className:xe(G3({variant:t,size:n,className:e})),ref:i,...s})});
364ne.displayName="Button";const q3={initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6}},bE=x.forwardRef((e,t)=>d.jsx("div",{ref:t,className:"min-h-screen bg-background flex items-center justify-center",children:d.jsx("div",{className:"w-8 h-8 border-4 border-primary/30 border-t-primary rounded-full animate-spin"})}));bE.displayName="LazyFallback";class Y3 extends x.Component{constructor(){super(...arguments);Wu(this,"state",{hasError:!1});Wu(this,"handleRetry",()=>{this.setState({hasError:!1}),window.location.reload()})}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){var i,o,a,l;if(!(((i=n.message)==null?void 0:i.includes("Importing a module script failed"))||((o=n.message)==null?void 0:o.includes("Failed to fetch dynamically imported module"))||((a=n.message)==null?void 0:a.includes("Loading chunk"))||((l=n.message)==null?void 0:l.includes("Loading CSS chunk"))))throw n;console.warn("[ChunkErrorBoundary] Caught chunk load error, offering retry",n.message)}render(){return this.state.hasError?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-6",children:d.jsxs("div",{className:"text-center space-y-4 max-w-sm",children:[d.jsx("div",{className:"w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto",children:d.jsx(by,{className:"w-7 h-7 text-primary"})}),d.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Connection interrupted"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"The page didn't fully load. This usually fixes itself with a quick refresh."}),d.jsxs(ne,{onClick:this.handleRetry,className:"gap-2",children:[d.jsx(by,{className:"w-4 h-4"}),"Reload Page"]})]})}):this.props.children}}function Q({children:e}){const{pathname:t}=bt();return d.jsx(Qi.div,{variants:q3,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:"easeOut"},children:d.jsx(Y3,{children:d.jsx(x.Suspense,{fallback:d.jsx(bE,{}),children:e})})},t)}const Q3=x.forwardRef(function({children:t},n){return d.jsx("div",{ref:n,style:{display:"contents"},children:t})}),PF="https://cal.com/socialbrilliance/f1000-briefing",Va={pro:{monthly:"price_1TExZbLC35LOD5Lu6I8eNUCO",annual:"price_1TExZdLC35LOD5Lu2nAiiTYh"},team:{monthly:"price_1TExZeLC35LOD5Lu1hXIraAe",annual:"price_1TExZeLC35LOD5LuQxMf8aY5"},growth:{monthly:"price_1TExZfLC35LOD5Lux1r5FVxg",annual:"price_1TExZfLC35LOD5LuGXvDmQIm"}},Bm=[{id:"free",name:"Free",price:0,annual:0,label:"Start here",shortLine:"Your first complete Signal Audit is free. No signup. No credit card.",features:["1 complete Signal Audit (deep analysis) â full result, nothing withheld","Limited content creation","AI formatting and platform previews","Basic voice input","1 seat"],cta:"Run my free Signal Audit",ctaVariant:"outline",highlight:!1},{id:"pro",name:"Pro",price:19,annual:15,label:"For individuals who want real leverage",shortLine:"Know how the market reads you â then publish in your voice, every week.",badge:"Most popular",features:["Diagnose â Fix â Recheck up to 5 assets or brands each month","Unlimited authoring in your brand voice","5 Deep Analyses / month","Signal & positioning intelligence on any site or company","Competitive intelligence â head-to-head white space","Hook testing + cross-channel adaptation","Brand memory that personalizes every draft","Strategic Brief + persona role-play","8 languages · exports"],cta:"Continue with Pro",ctaVariant:"default",highlight:!0,note:"Cancel anytime. Best for solo professionals who want sharper signal and smarter messaging."},{id:"team",name:"Team",price:79,annual:63,label:"For small teams working together",shortLine:"Built for startups, agency teams, internal marketing teams, and innovation groups.",features:["Everything in Pro, plus:","3 seats","Shared workspace","Shared brand settings","Shared prompts and templates","Comparative persona analysis","Collaboration and approvals","25 Deep Analyses / month","Priority processing","Better exports and summaries"],cta:"Start Team",ctaVariant:"outline",highlight:!1},{id:"growth",name:"Growth",price:249,annual:199,label:"For organizations using AI as a strategic edge",shortLine:"Ideal for healthcare programs, recruiting teams, GTM teams, and agencies running frequent analysis.",features:["Everything in Team, plus:","10 seats","100 Deep Analyses / month","Saved audience presets","Advanced role-play flows","Strategic Brief templates","Cross-channel adaptation","Usage analytics","Admin controls","Priority support"],cta:"Choose Growth",ctaVariant:"outline",highlight:!1},{id:"enterprise",name:"Enterprise",price:-1,annual:-1,label:"Annual platform license · F1000-ready",shortLine:"For Fortune 1000 marketing, strategy, and comms orgs. No seat math. No run meter. One annual license, unlimited internal use, a named CSM.",badge:"Contact",features:["Annual platform license â unlimited internal users","Unlimited Deep Analyses â no monthly meter","N
364amed Customer Success Manager + quarterly business review","Dedicated onboarding & enablement for your teams","SSO / SAML, audit log export, role-based access","Security review, DPA, MSA, custom redlines welcome","Procurement-friendly: NET-30/60, PO, vendor onboarding","Private data handling & retention controls","Custom workflows, integrations, and reporting","Executive briefings & priority roadmap input"],cta:"Book F1000 briefing",ctaVariant:"default",highlight:!1}],J3=["owner","enterprise"],_E={free:1,pro:5,team:25,growth:100},Yd=1;function SE(e){return J3.includes(e)?null:_E[e]}function AF(e,t){const n=SE(e);return[t||n===null?"Deep Analyses included (no monthly meter)":`${n} Deep Analyses / month`,"Brand intelligence","Competitive Intel","Hook Tester","Content Calendar","Quarterly rescores"]}Va.pro.monthly;const X3=["pro","team","growth"].map(e=>{const t=Bm.find(r=>r.id===e),n=_E[e];return{id:e,name:t.name,price:`$${t.price}`,period:"/mo",priceId:Va[e].monthly,popular:!!t.highlight,features:[`${n} Deep Analyses/mo`,...t.features.filter(r=>!r.startsWith("Everything in")&&!/Deep Analys/.test(r)).slice(0,3)]}}),z0=e=>{let t;const n=new Set,r=(c,u)=>{const h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){const f=t;t=u??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},Z3=e=>e?z0(e):z0,e4=e=>e;function t4(e,t=e4){const n=I.useSyncExternalStore(e.subscribe,I.useCallback(()=>t(e.getState()),[e,t]),I.useCallback(()=>t(e.getInitialState()),[e,t]));return I.useDebugValue(n),n}const W0=e=>{const t=Z3(e),n=r=>t4(t,r);return Object.assign(n,t),n},n4=e=>e?W0(e):W0;function Ea(){let e=localStorage.getItem("li_device_id");return e||(e=crypto.randomUUID(),localStorage.setItem("li_device_id",e)),e}function r4(){try{const e=JSON.parse(localStorage.getItem("li_settings")||"{}");return{audiencePreset:e.audiencePreset||"general",language:e.language||"English"}}catch{return{audiencePreset:"general",language:"English"}}}const s4=n4((e,t)=>({postsCreated:parseInt(localStorage.getItem("li_posts_created")||"0"),maxFree:parseInt(localStorage.getItem("li_max_free")||"3"),promoApplied:localStorage.getItem("li_promo")||null,isFoundingMember:localStorage.getItem("li_founding")==="true",foundingExpiresAt:localStorage.getItem("li_founding_expires")||null,settings:r4(),incrementPosts:()=>{if(t().isFoundingMember)return;const n=t().postsCreated+1;localStorage.setItem("li_posts_created",String(n)),e({postsCreated:n})},canCreatePost:()=>{const n=t();if(n.isFoundingMember){if(n.foundingExpiresAt&&new Date(n.foundingExpiresAt)>new Date)return!0;localStorage.removeItem("li_founding"),localStorage.removeItem("li_founding_expires"),e({isFoundingMember:!1,foundingExpiresAt:null})}return n.postsCreated<n.maxFree},updateSettings:n=>{const r={...t().settings,...n};localStorage.setItem("li_settings",JSON.stringify(r)),e({settings:r})},checkFoundingStatus:async()=>{const n=Ea(),{data:r}=await Se.rpc("check_founding_status",{p_device_id:n}),s=r;s&&s.expires_at&&new Date(s.expires_at)>new Date&&(localStorage.setItem("li_founding","true"),localStorage.setItem("li_founding_expires",s.expires_at),e({isFoundingMember:!0,foundingExpiresAt:s.expires_at}))},grantFoundingAccess:n=>{localStorage.setItem("li_founding","true"),localStorage.setItem("li_founding_expires",n),e({isFoundingMember:!0,foundingExpiresAt:n})},applyPromo:async n=>{if(t().promoApplied)return{success:!1,error:"A promo code has already been applied."};const{data:r,error:s}=await Se.functions.invoke("redeem-promo",{body:{code:n.trim().toUpperCase(),deviceId:Ea()}});if(s)return{success:!1,error:"Failed to validate code. Try again."};if(r!=null&&r.error)return{success:!1,error:r.error};if(r!=null&&r.success){const i=t().maxFree+r.bonus_posts;return localStorage.setItem("li_max_free",String(i)),localStorage.setItem("li_promo",n.trim().toUpperCase()),e({maxFree:i,promoApplied:n.trim().toUpperCase()}),{success:!0}}return{success:!1,error:"Unknown error"}}})),fo={strategyDiagnosis:{scope:"strategy",feature:"strategy-diagnosis"},brandDeepAnalysis:{scope:"brand",feature:"brand-twin"},watchFullScan:{scope:"watch",feature:"narrative-map"},watchCompare:{scope:"watch",feature:"competitor-compare"},hookTest:{scope:"hook",feature:"hook-test"},preLaunchTest:{scope:"pre_launch",feature:"pre-launch-test"}},i4={strategy:fo.strategyDiagnosis,twin:fo.brandDeepAnalysis,narrative:fo.watchFullScan,hooks:fo.hookTest,prelaunch:fo.preLaunchTest,calendar:null},o4=45e3,a4=15e3,l4=new Set(["meter_unavailable","meter_service","meter_network","begin_timeout"]),c4=3,u4=[600,1800];async function EE(e){const t={runsUsed:null,runsRemaining:null,runLimit:null,tier:null},n=(e==null?void 0:e.context)instanceof Response?e.context:void 0,r=Number((e==null?void 0:e.status)??(n==null?void 0:n.status)??0);if(n)try{const s=await n.clone().json();
364if(s&&typeof s.reason=="string")return{reason:s.reason,detail:typeof s.detail=="string"?s.detail:null,runsUsed:typeof s.runsUsed=="number"?s.runsUsed:null,runsRemaining:typeof s.runsRemaining=="number"?s.runsRemaining:null,runLimit:typeof s.runLimit=="number"?s.runLimit:null,tier:typeof s.tier=="string"?s.tier:null}}catch{}return r===0?{reason:"meter_network",detail:"network_error",...t}:r>=500?{reason:"meter_service",detail:`http_${r}`,...t}:{reason:"meter_rejected",detail:`http_${r}`,...t}}async function d4(e,t=crypto.randomUUID()){let n=await H0(e,t);for(let r=1;r<c4;r++){if(n.ok||!l4.has(n.reason))return n;await new Promise(s=>setTimeout(s,u4[r-1]??1800)),n=await H0(e,t)}return n}async function H0(e,t){const n={ok:!1,reason:"meter_unavailable",detail:null,runToken:null,clientRequestId:t,runsUsed:null,runsRemaining:null,runLimit:null,tier:null};try{let r;const s=Se.functions.invoke("begin-intelligence-run",{body:{scope:e.scope,feature:e.feature,clientRequestId:t,deviceId:Ea()}}),i=new Promise((l,c)=>{r=setTimeout(()=>c(new Error("begin_run_timeout")),o4)}),{data:o,error:a}=await Promise.race([s,i]);if(r&&clearTimeout(r),a){const l=await EE(a);return{...n,...l}}return o?{ok:!!o.ok,reason:String(o.reason??"meter_unavailable"),detail:typeof o.detail=="string"?o.detail:null,runToken:o.runToken??null,clientRequestId:o.clientRequestId??t,runsUsed:typeof o.runsUsed=="number"?o.runsUsed:null,runsRemaining:typeof o.runsRemaining=="number"?o.runsRemaining:null,runLimit:typeof o.runLimit=="number"?o.runLimit:null,tier:o.tier??null}:n}catch(r){return(r instanceof Error?r.message:"")==="begin_run_timeout"?{...n,reason:"begin_timeout"}:{...n,reason:"meter_network",detail:"invoke_threw"}}}async function RF(e,t,n){const r={ok:!1,reason:"meter_unavailable",runToken:null,clientRequestId:n,runsUsed:null,runsRemaining:null,runLimit:null,tier:null};if(!n)return{...r,reason:"invalid_outcome"};try{let s;const i=Se.functions.invoke("begin-intelligence-run",{body:{action:"cancel",scope:e.scope,feature:e.feature,clientRequestId:n,runToken:t,deviceId:Ea()}}),o=new Promise((c,u)=>{s=setTimeout(()=>u(new Error("cancel_run_timeout")),a4)}),{data:a,error:l}=await Promise.race([i,o]);if(s&&clearTimeout(s),l){const c=await EE(l);return{...r,reason:c.reason,detail:c.detail}}return{...r,ok:!!(a!=null&&a.ok),reason:String((a==null?void 0:a.reason)??"meter_unavailable"),clientRequestId:(a==null?void 0:a.clientRequestId)??n}}catch{return r}}function jF(e,t,n,r){if(n)try{const s="https://rifgfsrcpiwsyyisovec.supabase.co/functions/v1/begin-intelligence-run",i="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJpZmdmc3JjcGl3c3l5aXNvdmVjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzE4NTc2MzQsImV4cCI6MjA4NzQzMzYzNH0.uiwSQreYfNUdaDWVNYCLAWpxJEOQiSyqAnHDe29DkeQ";fetch(s,{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json",apikey:i,Authorization:`Bearer ${r||i}`},body:JSON.stringify({action:"cancel",scope:e.scope,feature:e.feature,clientRequestId:n,runToken:t??null,deviceId:Ea()})}).catch(()=>{})}catch{}}const kE="sb_anon_runs";function TE(){try{return Number(localStorage.getItem(kE)||"0")||0}catch{return 0}}function h4(){const e=TE()+1;try{localStorage.setItem(kE,String(e))}catch{}return e}let Eo=null,Wf=0;const f4=6e4,p4=["[email protected]","[email protected]","[email protected]"];function m4(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1,0,0,0,0)).toISOString()}function g4(e){return e.tier==="enterprise"?"enterprise":e.founding||e.tier==="owner"?"owner":e.tier==="pro"||e.tier==="team"||e.tier==="growth"?e.tier:e.subscribed?"pro":"free"}function NF(){Eo=null,Wf=0}function CE(){const{user:e,session:t}=gn(),n=(e==null?void 0:e.email)&&p4.includes(e.email.toLowerCase()),r={subscribed:!1,founding:!1,loading:!0,subscriptionEnd:null,foundingExpires:null,productId:null,tier:null},s={subscribed:!0,founding:!0,loading:!1,subscriptionEnd:null,foundingExpires:null,productId:"owner",tier:"owner"},i={subscribed:!1,founding:!1,loading:!1,subscriptionEnd:null,foundingExpires:null,productId:null,tier:null},o=!Eo||Date.now()-Wf>f4,[a,l]=x.useState(n?s:Eo&&!o?Eo:r);return x.useEffect(()=>{if(n){l(s);return}if(!e||!t){l(i);return}(async()=>{try{const{data:u,error:h}=await Se.functions.invoke("check-subscription");if(h)throw h;const f={subscribed:(u==null?void 0:u.subscribed)||!1,founding:(u==null?void 0:u.founding)||!1,loading:!1,subscriptionEnd:(u==null?void 0:u.subscription_end)||null,foundingExpires:(u==null?void 0:u.founding_expires)||null,productId:(u==null?void 0:u.product_id)||null,tier:(u==null?void 0:u.tier)||null};Eo=f,Wf=Date.now(),l(f)}catch{l(i)}})()},[e,t,n]),{...a,isPremium:a.subscribed||a.founding}}function y4(){const{user:e}
364=gn(),t=CE(),[n,r]=x.useState(0),[s,i]=x.useState(!0),o=x.useMemo(()=>g4(t),[t]),a=SE(o),l=x.useCallback(async()=>{if(!e){r(0),i(!1);return}i(!0);const{count:u,error:h}=await Se.from("intelligence_run_usage").select("id",{count:"exact",head:!0}).eq("user_id",e.id).eq("counts_against_quota",!0).in("run_state",["reserved","running","completed"]).gte("created_at",m4());h||r(u??0),i(!1)},[e]);x.useEffect(()=>{t.loading||l()},[t.loading,l]);const c=x.useCallback(async(u,h)=>{const f=await d4(u,h);return f.ok&&(typeof f.runsUsed=="number"?r(f.runsUsed):a!==null&&r(p=>p+1)),f},[a]);return{tier:o,runLimit:a,runsUsed:n,runsRemaining:a===null?null:Math.max(a-n,0),loading:t.loading||s,consumeRun:c,refreshUsage:l}}function v4(e){const{user:t}=gn(),n=y4(),[r,s]=x.useState(()=>typeof window>"u"?0:TE()),i=!t&&r>=Yd,o=t?n.runLimit===null||n.runsUsed<n.runLimit:!i,a=!o,l=x.useCallback(async(c,u)=>{const h=c??i4[e];if(!h)return{ok:!0,reason:"unmetered",runToken:null,clientRequestId:u??"",runsUsed:null,runsRemaining:null,runLimit:null,tier:null};const f=await n.consumeRun(h,u);return!t&&f.ok&&typeof f.runsUsed!="number"&&s(h4()),f},[t,n,e]);return{canAccess:o,needsUpgrade:a,isPremium:n.tier!=="free",loading:n.loading,recordUsage:l,tier:n.tier,runsUsed:t?n.runsUsed:r,runsRemaining:t?n.runsRemaining:Math.max(Yd-r,0),runLimit:t?n.runLimit:Yd}}const K0=768;function w4(){const e=()=>typeof window<"u"?window.innerWidth<K0:!1,[t,n]=x.useState(e);return x.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(`(max-width: ${K0-1}px)`),s=()=>{n(r.matches)};return s(),typeof r.addEventListener=="function"?r.addEventListener("change",s):r.addListener(s),window.addEventListener("resize",s),()=>{typeof r.removeEventListener=="function"?r.removeEventListener("change",s):r.removeListener(s),window.removeEventListener("resize",s)}},[]),t}function Ge(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function x4(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const OF=6048e5,IF=864e5,DF=6e4,LF=36e5,Cl=43200,G0=1440;let b4={};function _4(){return b4}function q0(e){const t=Ge(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ec(e,t){const n=Ge(e),r=Ge(t),s=n.getTime()-r.getTime();return s<0?-1:s>0?1:s}function S4(e){return x4(e,Date.now())}function E4(e,t){const n=Ge(e),r=Ge(t),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function k4(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function T4(e,t){return+Ge(e)-+Ge(t)}function C4(e){const t=Ge(e);return t.setHours(23,59,59,999),t}function P4(e){const t=Ge(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function A4(e){const t=Ge(e);return+C4(t)==+P4(t)}function R4(e,t){const n=Ge(e),r=Ge(t),s=ec(n,r),i=Math.abs(E4(n,r));let o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-s*i);let a=ec(n,r)===-s;A4(Ge(e))&&i===1&&ec(e,r)===1&&(a=!1),o=s*(i-Number(a))}return o===0?0:o}function j4(e,t,n){const r=T4(e,t)/1e3;return k4(n==null?void 0:n.roundingMethod)(r)}const N4={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},O4=(e,t,n)=>{let r;const s=N4[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const I4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},D4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M4={date:Qd({formats:I4,defaultWidth:"full"}),time:Qd({formats:D4,defaultWidth:"full"}),dateTime:Qd({formats:L4,defaultWidth:"full"})},$4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},U4=(e,t,n,r)=>$4[e];function po(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[a]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const F4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},B4={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},z4={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
364ay","Saturday"]},W4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},H4={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K4=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},G4={ordinalNumber:K4,era:po({values:F4,defaultWidth:"wide"}),quarter:po({values:V4,defaultWidth:"wide",argumentCallback:e=>e-1}),month:po({values:B4,defaultWidth:"wide"}),day:po({values:z4,defaultWidth:"wide"}),dayPeriod:po({values:W4,defaultWidth:"wide",formattingValues:H4,defaultFormattingWidth:"wide"})};function mo(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Y4(a,h=>h.test(o)):q4(a,h=>h.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function q4(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Y4(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Q4(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(s.length);return{value:o,rest:a}}}const J4=/^(\d+)(th|st|nd|rd)?/i,X4=/\d+/i,Z4={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},e$={any:[/^b/i,/^(a|c)/i]},t$={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},n$={any:[/1/i,/2/i,/3/i,/4/i]},r$={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},s$={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},i$={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},o$={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},a$={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},l$={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},c$={ordinalNumber:Q4({matchPattern:J4,parsePattern:X4,valueCallback:e=>parseInt(e,10)}),era:mo({matchPatterns:Z4,defaultMatchWidth:"wide",parsePatterns:e$,defaultParseWidth:"any"}),quarter:mo({matchPatterns:t$,defaultMatchWidth:"wide",parsePatterns:n$,defaultParseWidth:"any",valueCallback:e=>e+1}),month:mo({matchPatterns:r$,defaultMatchWidth:"wide",parsePatterns:s$,defaultParseWidth:"any"}),day:mo({matchPatterns:i$,defaultMatchWidth:"wide",parsePatterns:o$,defaultParseWidth:"any"}),dayPeriod:mo({matchPatterns:a$,defaultMatchWidth:"any",parsePatterns:l$,defaultParseWidth:"any"})},u$={code:"en-US",formatDistance:O4,formatLong:M4,formatRelative:U4,localize:G4,match:c$,options:{weekStartsOn:0,firstWeekContainsDate:1}};function d$(e,t,n){const r=_4(),s=(n==null?void 0:n.locale)??r.locale??u$,i=2520,o=ec(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let l,c;o>0?(l=Ge(t),c=Ge(e)):(l=Ge(e),c=Ge(t));const u=j4(c,l),h=(q0(c)-q0(l))/1e3,f=Math.round((u-h)/60);let p;if(f<2)return n!=null&&n.includeSeconds?u<5?s.formatDistance("lessThanXSeconds",5,a):u<10?s.formatDistance("lessThanXSeconds",10,a):u<20?s.formatDistance("lessThanXSeconds",20,a):u<40?s.formatDistance("halfAMinute",0,a):u<60?s.formatDistance("lessThanXMinutes",1,a):s.formatDistance("xMinutes",1,a):f===0?s.formatDistance("lessThanXMinutes",1,a):s.formatDistance("xMinutes",f,a);if(f<45)return s.formatDistance("xMinutes",f,a);if(f<90)return s.formatDistance("aboutXHours",1,a);if(f<G0){const w=Math.round(f/60);return s.formatDistance("aboutXHours",w,a)}else{if(f<i)return s.formatDistance("xDays",1,a);if(f<Cl){const w=Math.round(f/G0);return s.formatDistance("xDays",w,a)}else if(f<Cl*2)return p=Math.round(f/Cl),s.formatDistance("aboutXMonths",p,a)}if(p=R4(c,l),p<12){const w=Math.round(f/Cl);return s.formatDistance("xMonths",w,a)}else{const w=p%12,y=Math.trunc(p/12);return w<3?s.formatDistance("aboutXYears",y,a):w<9?s.formatDistance("overXYears",y,a):s.formatDistance("almostXYears",y+1,a)}}function h$(e,t){return d$(e,S4(e),t)}
364function f$(){const[e,t]=x.useState(!1),[n,r]=x.useState([]),[s,i]=x.useState(!1),o=typeof window<"u"&&localStorage.getItem("li_device_id")||"",a=async()=>{if(!o)return;i(!0);const{data:f}=await Se.rpc("get_brand_alerts_by_device",{p_device_id:o,p_profile_id:null,p_limit:20});r(f||[]),i(!1)};x.useEffect(()=>{a()},[o]);const l=async f=>{r(p=>p.filter(w=>w.id!==f)),await Se.rpc("dismiss_brand_alert",{p_alert_id:f,p_device_id:o})},c=async()=>{const f=n.map(p=>p.id);r([]);for(const p of f)await Se.rpc("dismiss_brand_alert",{p_alert_id:p,p_device_id:o})},u=f=>f==="critical"?d.jsx(_y,{className:"w-3.5 h-3.5 text-destructive"}):f==="warning"?d.jsx(_y,{className:"w-3.5 h-3.5 text-warning"}):d.jsx(TP,{className:"w-3.5 h-3.5 text-muted-foreground"}),h=n.length;return d.jsxs("div",{className:"relative",children:[d.jsxs("button",{onClick:()=>{t(!e),e||a()},className:"relative p-2 rounded-lg hover:bg-sidebar-accent transition-colors","aria-label":"Notifications",children:[d.jsx(vP,{className:"w-4 h-4 text-sidebar-foreground/70"}),h>0&&d.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-4 h-4 rounded-full bg-destructive text-destructive-foreground text-[9px] font-bold flex items-center justify-center",children:h>9?"9+":h})]}),e&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-[90]",onClick:()=>t(!1)}),d.jsxs("div",{className:"absolute top-full right-0 mt-1 w-80 max-h-[70vh] bg-card border border-border rounded-xl shadow-xl z-[100] overflow-hidden flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/50",children:[d.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Notifications"}),d.jsxs("div",{className:"flex items-center gap-1",children:[h>0&&d.jsx(ne,{variant:"ghost",size:"sm",className:"text-[10px] h-6 px-2",onClick:c,children:"Clear all"}),d.jsx("button",{onClick:()=>t(!1),className:"p-1 rounded hover:bg-secondary",children:d.jsx(Ni,{className:"w-3.5 h-3.5 text-muted-foreground"})})]})]}),d.jsx("div",{className:"flex-1 overflow-y-auto",children:s?d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx(jc,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):n.length===0?d.jsxs("div",{className:"py-8 text-center",children:[d.jsx(xP,{className:"w-8 h-8 text-primary/30 mx-auto mb-2"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"All clear â no alerts"})]}):d.jsx("div",{className:"divide-y divide-border/30",children:n.map(f=>d.jsx("div",{className:"px-4 py-3 hover:bg-secondary/30 transition-colors group",children:d.jsxs("div",{className:"flex items-start gap-2.5",children:[d.jsx("div",{className:"mt-0.5 shrink-0",children:u(f.severity)}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-xs font-semibold text-foreground",children:f.title}),d.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 line-clamp-2",children:f.detail}),d.jsxs("p",{className:"text-[10px] text-muted-foreground/60 mt-1",children:[h$(new Date(f.created_at))," ago"]})]}),d.jsx("button",{onClick:()=>l(f.id),className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-secondary shrink-0",children:d.jsx(Ni,{className:"w-3 h-3 text-muted-foreground"})})]})},f.id))})})]})]})]})}const p$=["[email protected]","[email protected]","[email protected]"];function m$(e){return e?p$.includes(e.trim().toLowerCase()):!1}function Y0({item:e,active:t,collapsed:n,isPremium:r,primary:s,onSelect:i}){const o=e.icon;return d.jsxs("button",{onClick:()=>i(e.path),title:n?e.label:void 0,"aria-current":t?"page":void 0,className:xe("flex items-center gap-2.5 w-full rounded-lg px-2.5 py-2 transition-colors",s?"text-[15px] font-semibold":"text-[13px] font-medium",t?"bg-sidebar-primary/10 text-sidebar-primary":s?"text-sidebar-foreground hover:bg-sidebar-accent":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[d.jsx(o,{className:xe(s?"w-[18px] h-[18px]":"w-4 h-4","shrink-0",t&&"text-sidebar-primary")}),!n&&d.jsx("span",{className:"truncate flex-1 text-left",children:e.label}),!n&&e.isGated&&!r&&d.jsx(wu,{className:"w-3 h-3 text-sidebar-foreground
364/30 shrink-0"})]})}const Q0=[{label:"Today",icon:Gp,path:"/dashboard",section:"Primary"},{label:"Create",icon:$r,path:"/composer",section:"Primary"},{label:"Diagnose",icon:f_,path:"/strategy",section:"Primary",isGated:!0},{label:"Watch",icon:vu,path:"/narrative",section:"Primary"},{label:"Brand",icon:Vi,path:"/twin",section:"More tools"},{label:"Pre-Launch Test",icon:DP,path:"/pre-launch",section:"More tools"},{label:"Hook Intelligence",icon:SP,path:"/hooks",section:"More tools",isGated:!0},{label:"Calendar",icon:wP,path:"/calendar",section:"More tools",isGated:!0},{label:"Batch Audit",icon:PP,path:"/batch-audit",section:"More tools",isGated:!0},{label:"Signal Index",icon:p_,path:"/signal-to-noise-index",section:"Research"},{label:"Flagship Report",icon:h_,path:"/research/annual-signal-to-noise-report-2026",section:"Research"},{label:"Rankings",icon:Kp,path:"/signal-to-noise-index/rankings",section:"Research"},{label:"Pricing",icon:u_,path:"/pricing",section:"Account"},{label:"Settings",icon:IP,path:"/settings",section:"Account"}],J0={label:"Revenue Command",icon:CP,path:"/admin/revenue",section:"Account"},g$=["Primary","More tools","Research","Account"];function y$(){const e=mn(),t=bt(),{user:n,signOut:r}=gn(),s=m$(n==null?void 0:n.email),{isPremium:i}=CE(),o=w4(),[a,l]=x.useState(!1),[c,u]=x.useState(!1),[h,f]=x.useState(null),p=t.pathname,w=p.startsWith("/strategy"),y=v=>{e(v),o&&u(!1)},b=Q0.filter(v=>v.section==="Primary"),m=g$.filter(v=>v!=="Primary").map(v=>({label:v,items:[...Q0.filter(_=>_.section===v),...s&&J0.section===v?[J0]:[]]}));if(o)return w?null:d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:()=>u(!0),"aria-label":"More tools",className:"fixed bottom-[calc(env(safe-area-inset-bottom)+4.25rem)] right-2 z-[112] h-11 w-11 rounded-full bg-card/90 backdrop-blur border border-border text-muted-foreground shadow-sm flex items-center justify-center active:scale-95 transition-transform",children:d.jsx(wy,{className:"w-5 h-5"})}),d.jsx("nav",{className:"fixed bottom-0 left-0 right-0 z-[110] bg-card/95 backdrop-blur border-t border-border pb-[env(safe-area-inset-bottom)]","aria-label":"Primary",children:d.jsx("div",{className:"grid grid-cols-4",children:b.map(v=>{const _=v.icon,S=p===v.path;return d.jsxs("button",{onClick:()=>y(v.path),"aria-current":S?"page":void 0,className:xe("min-h-[48px] flex flex-col items-center justify-center gap-1 py-2 transition-colors",S?"text-primary":"text-muted-foreground"),children:[d.jsx(_,{className:xe("w-5 h-5",S&&"text-primary")}),d.jsx("span",{className:xe("text-[10px]",S?"font-semibold":"font-medium"),children:v.label})]},v.path)})})}),c&&d.jsxs("div",{className:"fixed inset-0 z-[120]",onClick:()=>u(!1),children:[d.jsx("div",{className:"absolute inset-0 bg-background/70 backdrop-blur-sm"}),d.jsxs("nav",{className:"absolute bottom-0 left-0 right-0 bg-card border-t border-border rounded-t-2xl p-4 pb-[calc(env(safe-area-inset-bottom)+1.5rem)] animate-in slide-in-from-bottom duration-200",onClick:v=>v.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(hn,{className:"w-5 h-5 text-primary"}),d.jsx("span",{className:"font-bold text-foreground",children:"More tools"})]}),d.jsx(ne,{variant:"ghost",size:"icon",onClick:()=>u(!1),children:d.jsx(Ni,{className:"w-4 h-4"})})]}),m.map(v=>d.jsxs("div",{className:"mb-2",children:[d.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1.5 text-muted-foreground/60",children:v.label}),d.jsx("div",{className:"grid grid-cols-4 gap-2",children:v.items.map(_=>{const S=_.icon,E=p===_.path;return d.jsxs("button",{onClick:()=>y(_.path),className:xe("min-h-[48px] flex flex-col items-center gap-1.5 rounded-xl p-3 text-xs font-medium transition-colors",E?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-secondary/80 hover:text-foreground"),children:[d.jsxs("div",{className:"relative",children:[d.jsx(S,{className:"w-5 h-5"}),_.isGated&&!i&&d.jsx("div",{className:"absolute -top-1 -right-2 bg-card rounded-full p-px",children:d.jsx(wu,{className:"w-2.5 h-2.5 text-muted-foreground
364/60"})})]}),d.jsx("span",{className:"truncate text-[10px]",children:_.label})]},_.path)})})]},v.label)),d.jsx("div",{className:"mt-3 pt-3 border-t border-border/50",children:d.jsxs("button",{onClick:()=>{r(),u(!1)},className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-destructive w-full px-3 py-2 min-h-[48px]",children:[d.jsx(xy,{className:"w-4 h-4"}),"Sign Out"]})})]})]})]});const g=m.some(v=>v.items.some(_=>_.path===p));return d.jsxs("aside",{className:xe("sticky top-0 h-screen bg-sidebar border-r border-sidebar-border flex flex-col transition-all duration-200 shrink-0 z-40",a?"w-[60px]":"w-[220px]"),children:[d.jsxs("div",{className:"px-3 py-4 flex items-center gap-2.5 border-b border-sidebar-border",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:d.jsx(hn,{className:"w-4 h-4 text-primary"})}),!a&&d.jsx("span",{className:"font-bold text-sm text-sidebar-foreground truncate",children:"SocialBrilliance"}),d.jsx("div",{className:"ml-auto",children:d.jsx(f$,{})})]}),d.jsxs("nav",{className:"flex-1 py-3 px-2 space-y-3 overflow-y-auto",children:[d.jsxs("div",{children:[!a&&d.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest px-2.5 mb-1 text-sidebar-primary/70",children:"Go to"}),d.jsx("div",{className:"space-y-0.5",children:b.map(v=>d.jsx(Y0,{item:v,active:p===v.path,collapsed:a,isPremium:i,primary:!0,onSelect:y},v.path))})]}),d.jsxs("details",{className:"group pt-1 border-t border-sidebar-border/50",open:h??g,onToggle:v=>f(v.currentTarget.open),children:[d.jsxs("summary",{className:"cursor-pointer list-none flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13px] font-medium text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[d.jsx(wy,{className:"w-4 h-4 shrink-0"}),!a&&d.jsx("span",{className:"flex-1 text-left",children:"More"}),!a&&d.jsx(vy,{className:"w-3 h-3 shrink-0 -rotate-90 group-open:rotate-90 transition-transform"})]}),d.jsx("div",{className:"mt-1 space-y-3",children:m.map(v=>d.jsxs("div",{children:[!a&&d.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest px-2.5 mb-1 text-sidebar-foreground/40",children:v.label}),d.jsx("div",{className:"space-y-0.5",children:v.items.map(_=>d.jsx(Y0,{item:_,active:p===_.path,collapsed:a,isPremium:i,onSelect:y},_.path))})]},v.label))})]})]}),d.jsxs("div",{className:"p-2 border-t border-sidebar-border space-y-0.5",children:[d.jsxs("button",{onClick:r,title:a?"Sign Out":void 0,className:"flex items-center gap-2.5 w-full rounded-lg px-2.5 py-2 text-sm text-sidebar-foreground/60 hover:text-destructive hover:bg-destructive/5 transition-colors",children:[d.jsx(xy,{className:"w-4 h-4 shrink-0"}),!a&&d.jsx("span",{children:"Sign Out"})]}),d.jsxs("button",{onClick:()=>l(!a),title:a?"Expand":"Collapse",className:"flex items-center gap-2.5 w-full rounded-lg px-2.5 py-2 text-sm text-sidebar-foreground/40 hover:text-sidebar-foreground transition-colors",children:[d.jsx(vy,{className:xe("w-4 h-4 shrink-0 transition-transform",a&&"rotate-180")}),!a&&d.jsx("span",{className:"text-xs",children:"Collapse"})]})]})]})}const PE="sb_onboarding_done",go=[{emoji:"ð",title:"Your AI marketing brain",desc:"One place to create better work, know what to improve, and stay on top of what matters.",icon:hn},{emoji:"âï¸",title:"Compose",desc:"Write or paste a draft, then choose Analyze, Polish, or Format Only. Format Only keeps your words unchanged.",icon:$r},{emoji:"ð§ ",title:"Brand",desc:"Brand remembers your context and identifies positioning and perception gaps from your public signal. This is inferred judgment, not measured audience research.",icon:Vi},{emoji:"ð",title:"Watch",desc:"Watch brings together your saved brand alerts, past reads, and competitive scans, so changes worth attention are easier to act on. It doesn't monitor continuously.",icon:vu}];function v$({onDismiss:e}){const[t,n]=x.useState(0),r=mn(),s=a=>{localStorage.setItem(PE,"true"),e(),a&&r(a)},i=t===go.length-1,o=go[t].icon;return d.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-background/85 backdrop-blur-md",onClick:()=>s(),children:d.jsxs("div",{className:"w-full max-w-sm mx-4 rounded-2xl border border-border bg-card p-6 shadow-2xl animate-slide-up",onClick:a=>a.stopPropagation(),children:[d.jsxs("div",{className:"flex items-center justify-between mb-5",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(hn,{className:"w-4 h-4 text-primary"}),d.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wide",children:"Getting Started"})]}),d.jsx("button",{onClick:()=>s(),className:"text-muted-foreground hover:text-foreground",children:d.jsx(Ni,{className:"w-4 h-4"})})]}),d.jsxs("div",{className:"text-center mb-6",children:[d.jsx("div",{className:"w-16 h-16 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto mb-4",children:d.jsx(o,{className:"w-8 h-8 text-primary"})}),d.jsx("h3",{className:"text-lg font-bold text-foreground mb-1.5",children:go[t].title}),d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:go[t].desc})]}),d.jsx("div",{className:"flex items-center justify-center gap-1.5 mb-5",children:go.map((a,l)=>d.jsx("div",{className:`h-1.5 rounded-full transition-all ${l===t?"w-6 bg-primary":l<t?"w-1.5 bg-primary/40":"w-1.5 bg-border"}`},l))}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>s(),className:"flex-1 text-muted-foreground",children:"Skip"}),i?d.jsxs(ne,{size:"sm",onClick:()=>s("/composer"),className:"flex-1 gradient-primary text-primary-foreground gap-1.5 font-semibold",children:["Open Composer",d.jsx($r,{className:"w-3.5 h-3.5"})]}):d.jsxs(ne,{size:"sm",onClick:()=>n(t+1),className:"flex-1 gap-1.5 font-semibold",children:["Next",d.jsx(c_,{className:"w-3.5 h-3.5"})]})]})]})})}const w$=["/strategy","/composer","/payment-success","/auth"];function x$(e){const t=(e||"/").toLowerCase().replace(/\/+$/,"")||"/";return w$.some(n=>t===n||t.startsWith(`${n}/`))}function b$(){const{user:e}=gn(),{pathname:t}
364=bt(),[n,r]=x.useState(!1),s=x$(t);return x.useEffect(()=>{if(!e||s){r(!1);return}if(!localStorage.getItem(PE)){const o=setTimeout(()=>r(!0),800);return()=>clearTimeout(o)}},[e,s]),{showOnboarding:n,dismissOnboarding:()=>r(!1)}}function AE({children:e}){const{showOnboarding:t,dismissOnboarding:n}=b$();return d.jsxs("div",{className:"flex min-h-screen bg-background",children:[d.jsx(y$,{}),d.jsx("main",{className:"flex-1 min-w-0 overflow-y-auto pb-28 md:pb-0",children:e}),t&&d.jsx(v$,{onDismiss:n})]})}const _$=()=>{let e=localStorage.getItem("sb_device_id");return e||(e=crypto.randomUUID(),localStorage.setItem("sb_device_id",e)),e},it=(e,t={})=>{S$(e,t)},S$=async(e,t={})=>{try{await Se.from("analytics_events").insert([{event_name:e,device_id:_$(),metadata:t}])}catch{}},ot={AI_MAGIC:"ai_magic",CREATE_FROM_SCRATCH:"create_from_scratch",PASTE_TEXT:"paste_text",FORMAT_ONLY:"format_only",ANALYZE:"analyze",REFINE_CHAT:"refine_chat",PREVIEWS_OPENED:"previews_opened",GENERATE_COMMENTS:"generate_comments",PAYWALL_HIT:"paywall_hit",PROMO_REDEEMED:"promo_redeemed",UPGRADE_CLICKED:"upgrade_clicked",TRANSLATE:"translate",COPY_POST:"copy_post",GENERATE_FROM_FILE:"generate_from_file",VOICE_DICTATE:"voice_dictate",COMPOSER_ANALYZE_STARTED:"composer_analyze_started",COMPOSER_ANALYZE_COMPLETED:"composer_analyze_completed",COMPOSER_POLISH_STARTED:"composer_polish_started",COMPOSER_POLISH_COMPLETED:"composer_polish_completed",COMPOSER_FORMAT_ONLY_STARTED:"composer_format_only_started",COMPOSER_FORMAT_ONLY_COMPLETED:"composer_format_only_completed",COMPOSER_COPY:"composer_copy",COMPOSER_STARTER_CLICKED:"composer_starter_clicked",COMPOSER_USE_ELSEWHERE_OPENED:"composer_use_elsewhere_opened",COMPOSER_FIX_STARTED:"composer_fix_started",COMPOSER_FIX_COMPLETED:"composer_fix_completed",COMPOSER_FIX_FAILED:"composer_fix_failed",COMPOSER_REVISION_SELECTED:"composer_revision_selected",COMPOSER_RECHECK_STARTED:"composer_recheck_started",COMPOSER_RECHECK_COMPLETED:"composer_recheck_completed",COMPOSER_RECOMMENDATION_KEPT:"composer_recommendation_kept",COMPOSER_HOOK_APPLIED:"composer_hook_applied",TODAY_OPENED:"today_opened",TODAY_INSIGHT_OPENED:"today_insight_opened",TODAY_ACTION_CLICKED:"today_action_clicked",BRAND_OPENED:"brand_opened",BRAND_ANALYSIS_STARTED:"brand_analysis_started",BRAND_ANALYSIS_COMPLETED:"brand_analysis_completed",BRAND_ACTION_CLICKED:"brand_action_clicked",WATCH_OPENED:"watch_opened",WATCH_ITEM_OPENED:"watch_item_opened",WATCH_ACTION_CLICKED:"watch_action_clicked",WATCH_SCAN_STARTED:"watch_scan_started",WATCH_SCAN_COMPLETED:"watch_scan_completed",COMPOSER_PLATFORM_ADAPT_STARTED:"composer_platform_adapt_started",COMPOSER_PLATFORM_ADAPT_COMPLETED:"composer_platform_adapt_completed",COMPOSER_PLATFORM_ADAPT_FAILED:"composer_platform_adapt_failed",COMPOSER_PLATFORM_COPY:"composer_platform_copy",MARKETING_WIN_COMPLETED:"marketing_win_completed",PRICING_PLAN_CLICK:"pricing_plan_click",AUTH_VIEW:"auth_view",SIGNUP_STARTED:"signup_started",SIGNUP_COMPLETED:"signup_completed",OAUTH_STARTED:"oauth_started",OAUTH_COMPLETED:"oauth_completed",CHECKOUT_STARTED:"checkout_started",CHECKOUT_REDIRECTED:"checkout_redirected",CHECKOUT_ERROR:"checkout_error",PAYMENT_SUCCESS:"payment_success",POST_PAYMENT_STRATEGY_CTA_CLICK:"post_payment_strategy_cta_click",DIAGNOSIS_RESULT_CTA_VIEW:"diagnosis_result_cta_view",DIAGNOSIS_RESULT_CTA_CLICK:"diagnosis_result_cta_click",DIAGNOSIS_NEXT_ACTION_VIEW:"diagnosis_next_action_view",DIAGNOSIS_NEXT_ACTION_CLICK:"diagnosis_next_action_click",DIAGNOSIS_CONNECTED_TO_COMPOSER:"diagnosis_connected_to_composer",DIAGNOSIS_TO_AUTHORING_START:"diagnosis_to_authoring_start",DIAGNOSIS_FINDINGS_APPLY_STARTED:"diagnosis_findings_apply_started",DIAGNOSIS_FINDINGS_APPLY_COMPLETED:"diagnosis_findings_apply_completed",DIAGNOSIS_FINDINGS_APPLY_FAILED:"diagnosis_findings_apply_failed",WORK_CONTEXT_RESTORED:"work_context_restored",LANDING_TASK_ENTRY_CLICK:"landing_task_entry_click",STRATEGY_ENTRY_VIEW:"strategy_entry_view",STRATEGY_URL_INPUT_FOCUS:"strategy_url_input_focus",STRATEGY_URL_INPUT_CHANGED:"strategy_url_input_changed",STRATEGY_AUDIT_SUBMIT_CLICK:"strategy_audit_submit_click",STRATEGY_AUDIT_VALIDATION_ERROR:"strategy_audit_validation_error",STRATEGY_AUDIT_REQUEST_STARTED:"strategy_audit_request_started",STRATEGY_AUDIT_START_SUCCESS:"strategy_audit_start_success",STRATEGY_AUDIT_START_FAILURE:"strategy_audit_start_failure",STRATEGY_AUDIT_RESULT_RENDERED:"strategy_audit_result_rendered",STRATEGY_SMART_QUESTIONS_PRESENTED:"strategy_smart_questions_presented",STRATEGY_SMART_QUESTION_ANSWERED:"strategy_smart_question_answered",STRATEGY_DIAGNOSIS_COMPUTE_STARTED:"strategy_diagnosis_compute_started",STRATEGY_DIAGNOSIS_COMPUTE_SUCCESS:"strategy_diagnosis_compute_success",STRATEGY_DIAGNOSIS_COMPUTE_FAILURE:"strategy_diagnosis_compute_failure",STRATEGY_QUOTA_WALL_VIEWED:"strategy_quota_
364wall_viewed",COMPOSER_ASSET_CHOOSER_SHOWN:"composer_asset_chooser_shown",COMPOSER_ASSET_SELECTED:"composer_asset_selected",DIAGNOSIS_DRAFT_STARTED:"diagnosis_draft_started",DIAGNOSIS_DRAFT_COMPLETED:"diagnosis_draft_completed",DIAGNOSIS_DRAFT_FAILED:"diagnosis_draft_failed",STRATEGY_RECOMMENDED_ASSET_SHOWN:"strategy_recommended_asset_shown",DIAGNOSIS_ONE_CLICK_GENERATION_REQUESTED:"diagnosis_one_click_generation_requested",DIAGNOSIS_ASSET_PREVIEW_SHOWN:"diagnosis_asset_preview_shown",DIAGNOSIS_UPGRADE_INITIATED:"diagnosis_upgrade_initiated",PROOF_VIEWED:"proof_viewed",PROOF_UNAVAILABLE:"proof_unavailable",UPGRADE_OFFER_VIEWED:"upgrade_offer_viewed",UPGRADE_OFFER_DISMISSED:"upgrade_offer_dismissed",UPGRADE_CTA_CLICK:"upgrade_cta_click",EXEC_UI_VARIANT_EXPOSED:"exec_ui_variant_exposed",COMPOSER_PUBLISH_PROMPT_SHOWN:"composer_publish_prompt_shown",COMPOSER_PUBLISH_ACTION_CLICKED:"composer_publish_action_clicked",COMPOSER_PUBLISH_DESTINATION_OPENED:"composer_publish_destination_opened",COMPOSER_PUBLISH_CONFIRMED:"composer_publish_confirmed",COMPOSER_PUBLISH_NOT_YET:"composer_publish_not_yet",COMPOSER_COMPLETION_SURFACE_SHOWN:"composer_completion_surface_shown",COMPOSER_COMPLETION_VALUE_ACTION_CLICKED:"composer_completion_value_action_clicked"},RE="sb_attribution_trail",E$=7*24*60*60*1e3;function zm(){try{const e=localStorage.getItem(RE);if(!e)return{};const t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return{}}}function jE(e){try{localStorage.setItem(RE,JSON.stringify(e))}catch{}}function k$(e){!e.variantKey&&!e.experimentId||jE({...zm(),experiment_id:e.experimentId??null,variant_key:e.variantKey??null,surface:e.surface??null,exposed_at:new Date().toISOString()})}function T$(e){jE({...zm(),checkout_plan:e.plan??null,checkout_billing:e.billing??null,checkout_source:e.source??null,checkout_started_at:new Date().toISOString()})}function X0(e,t){const n=Date.parse(String(e??""));return Number.isFinite(n)&&t-n<=E$}function C$(e,t=Date.now()){const n=!!(e.variant_key||e.experiment_id)&&X0(e.exposed_at,t),r=!!e.checkout_started_at&&X0(e.checkout_started_at,t);return n&&r?"full_path":r?"checkout_only":n?"exposure_only":"historically_unresolved"}function MF(e=Date.now()){const t=zm(),n=C$(t,e),r=n!=="historically_unresolved";return{attribution_completeness:n,attribution_traceable:n==="full_path",exposure_experiment_id:r?t.experiment_id??null:null,exposure_variant_key:r?t.variant_key??null:null,exposure_surface:r?t.surface??null:null,exposed_at:r?t.exposed_at??null:null,checkout_source:r?t.checkout_source??null:null,checkout_plan:r?t.checkout_plan??null:null,checkout_billing:r?t.checkout_billing??null:null,checkout_started_at:r?t.checkout_started_at??null:null,attribution_instrumentation_version:1}}const ka="sb_purchase_intent",P$=1e3*60*60*24;function Wm(e){return!!(e&&Va[e])}function Hm(e){return e==="annual"?"annual":"monthly"}function A$(e,t){const n=Va[e];return n?t==="annual"?n.annual:n.monthly:null}function R$(e,t){const n=Bm.find(s=>s.id===e);if(!n)return null;const r=t==="annual"?n.annual:n.price;return{name:n.name,price:`$${r}`,cadence:t==="annual"?"/mo, billed annually":"/mo"}}function Hf(e){const t=new URLSearchParams({plan:e.plan,billing:e.billing,intent:"checkout"});return e.returnTo&&t.set("returnTo",e.returnTo),`/auth?${t.toString()}`}function NE(e){if(!Wm(e.plan))return null;const t={plan:e.plan,billing:Hm(e.billing),returnTo:e.returnTo,createdAt:Date.now()},n=JSON.stringify(t);try{sessionStorage.setItem(ka,n)}catch{}try{localStorage.setItem(ka,n)}catch{}return t}function j$(){for(const e of[()=>sessionStorage,()=>localStorage])try{const t=e().getItem(ka);if(!t)continue;const n=JSON.parse(t);if(!Wm(n==null?void 0:n.plan)||n.createdAt&&Date.now()-n.createdAt>P$)continue;return{...n,billing:Hm(n.billing)}}catch{}return null}function N$(e){if(e){const t=new URLSearchParams(e),n=t.get("plan");if(Wm(n))return NE({plan:n,billing:Hm(t.get("billing")),returnTo:t.get("returnTo")||void 0})}return j$()}function OE(){try{sessionStorage.removeItem(ka)}catch{}try{localStorage.removeItem(ka)}catch{}}const Km="sb_post_payment_return";function O$(e){if(e)try{localStorage.setItem(Km,e)}catch{}}function $F(){try{const e=localStorage.getItem(Km);return e&&e.startsWith("/")?e:null}catch{return null}}function UF(){try{localStorage.removeItem(Km)}catch{}}async function IE(e){const{plan:t,billing:n,returnTo:r,source:s}=e,i=A$(t,n);if(!i)return{ok:!1,error:"Unknown plan"};T$({plan:t,billing:n,source:s}),it(ot.CHECKOUT_STARTED,{plan:t,billing:n,source:s});try{const{data:o,error:a}=await Se.functions.invoke("create-checkout",{body:{priceId:i,mode:"subscription"}});if(a)throw a;if(o!=null&&o.error)throw new Error(o.error);if(!(o!=null&&o.url))throw new Error("No checkout URL returned");return O$(r),OE(),it(ot.CHECKOUT_REDIRECTED,{plan:t,billing:n,source:s}),window.location.href=o.url,{ok:!0,url:o.url}}catch(o){const a=(o==null?void 0:o.message)||"Could not start checkout";return it(ot.CHECKOUT_ERROR,{plan:t,billing:n,source:s,message:String(a).slice(0,200)}),{ok:!1,error:a}}}async function Gm(e){const{plan:t,billing:n,returnTo:r,source:s,isAuthenticated:i,navigate:o}=e;return i?IE({plan:t,billing:n,returnTo:r,source:s}):(NE({plan:t,billing:n,returnTo:r}),it(ot.PRICING_PLAN_CLICK,{plan:t,billing:n,source:s,auth_required:!0}),o(Hf({plan:t,billing:n,returnTo:r})),{ok:!0,authRequired:!0})}const I$={pro:qp,team:hn,growth:bP},D$=X3.map(e=>({name:e.name,price:e.price,period:e.period,posts:e.features[0],features:e.features.slice(1),icon:I$[e.id]??hn,popular:e.popular,priceId:e.priceId,id:e.id}));function L$({onClose:e}){const{toast:t}=Ia(),{user:n}=gn(),r=mn(),{applyPromo:s}=s4(),[i,o]=x.useState(""),[a,l]=x.useState(!1),[c,u]=x.useState(!1),[h,f]=x.use
364State(null),p=async(y,b)=>{f(y);try{const m=await Gm({plan:b,billing:"monthly",returnTo:window.location.pathname,source:"upgrade_modal",isAuthenticated:!!n,navigate:r});!m.ok&&m.error&&t({variant:"destructive",title:"Checkout failed",description:m.error})}finally{f(null)}},w=async()=>{if(!i.trim()||c)return;u(!0);const y=await s(i);u(!1),y.success?(t({title:"ð Promo code applied!",description:"You've unlocked extra free creation uses."}),e()):t({variant:"destructive",title:"Code not valid",description:y.error})};return d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm p-4 overflow-y-auto",onClick:e,children:d.jsxs("div",{className:"w-full max-w-3xl rounded-xl border border-border bg-card p-6 shadow-2xl animate-slide-up my-auto max-h-[95vh] overflow-y-auto",onClick:y=>y.stopPropagation(),children:[d.jsxs("div",{className:"text-center mb-6",children:[d.jsx("h2",{className:"text-2xl font-bold gradient-text",children:"Upgrade SocialBrilliance"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"You've reached a free-use limit. Choose a plan to continue with premium creation and intelligence features."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:D$.map(y=>d.jsxs("div",{className:`rounded-xl border p-5 space-y-4 transition-all ${y.popular?"border-primary glow-border bg-primary/5":"border-border hover:border-primary/30"}`,children:[y.popular&&d.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-primary",children:"Most Popular"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(y.icon,{className:"w-5 h-5 text-primary"}),d.jsx("h3",{className:"font-bold text-foreground",children:y.name})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-3xl font-bold text-foreground",children:y.price}),d.jsx("span",{className:"text-sm text-muted-foreground",children:y.period})]}),d.jsx("p",{className:"text-xs font-semibold text-accent",children:y.posts}),d.jsx("ul",{className:"space-y-1.5",children:y.features.map(b=>d.jsxs("li",{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[d.jsx("span",{className:"text-success",children:"â"})," ",b]},b))}),d.jsx(ne,{className:`w-full gap-1.5 ${y.popular?"gradient-primary text-primary-foreground":""}`,variant:y.popular?"default":"secondary",size:"sm",onClick:()=>p(y.name,y.priceId),disabled:h===y.name,children:h===y.name?d.jsx(jc,{className:"w-3.5 h-3.5 animate-spin"}):d.jsxs(d.Fragment,{children:["Get ",y.name,d.jsx(d_,{className:"w-3 h-3"})]})})]},y.name))}),d.jsxs("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-4 mt-5",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(EP,{className:"w-4 h-4 text-primary"}),d.jsx("span",{className:"text-sm font-semibold text-foreground",children:"Have a promo code?"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"If you received a promo code, enter it here."}),a?d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",value:i,onChange:y=>o(y.target.value),placeholder:"Enter your unique code",className:"flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring font-mono uppercase",onKeyDown:y=>y.key==="Enter"&&w(),disabled:c}),d.jsxs(ne,{size:"sm",onClick:w,disabled:c,className:"gradient-primary text-primary-foreground gap-1",children:[c?d.jsx(jc,{className:"w-3.5 h-3.5 animate-spin"}):d.jsx(l_,{className:"w-3.5 h-3.5"}),"Apply"]})]}):d.jsx(ne,{variant:"secondary",size:"sm",onClick:()=>l(!0),className:"w-full gap-1.5",children:"Enter promo code"})]}),d.jsxs("div",{className:"text-center mt-5 space-y-2",children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Cancel anytime · No hidden fees · Secure payment"}),d.jsx("button",{onClick:e,className:"text-xs text-primary hover:underline",children:"Maybe later"})]}),d.jsx("p",{className:"text-center text-[10px] text-muted-foreground
364/60 mt-4",children:"© Social Brilliance 2026"})]})})}const DE={strategy:"Deep analysis",twin:"Brand",narrative:"Watch",hooks:"Hook review",calendar:"Calendar",prelaunch:"Pre-Launch Test"};function yo({feature:e,children:t}){const{needsUpgrade:n,isPremium:r,loading:s,runsUsed:i,runLimit:o,tier:a}=v4(e),[l,c]=x.useState(!1);return s?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:d.jsx("div",{className:"w-8 h-8 border-4 border-primary/30 border-t-primary rounded-full animate-spin"})}):n?d.jsx(M$,{feature:e,runsUsed:i,runLimit:o,tier:a}):d.jsxs(d.Fragment,{children:[!r&&!l&&d.jsx(LE,{feature:e,onDismiss:()=>c(!0)}),t]})}function M$({feature:e,runsUsed:t,runLimit:n,tier:r}){const{user:s}=gn(),i=mn(),{toast:o}=Ia(),[a,l]=x.useState(!1),[c,u]=x.useState(!1),h=async()=>{u(!0);try{const p=await Gm({plan:"pro",billing:"monthly",returnTo:window.location.pathname,source:"feature_gate",isAuthenticated:!!s,navigate:i});!p.ok&&p.error&&o({variant:"destructive",title:"Checkout failed",description:p.error})}finally{u(!1)}},f=r==="free"?"Free":r.charAt(0).toUpperCase()+r.slice(1);return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:d.jsxs("div",{className:"max-w-md w-full text-center space-y-6 animate-slide-up",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-primary/10 flex items-center justify-center mx-auto",children:d.jsx(wu,{className:"w-10 h-10 text-primary"})}),d.jsxs("div",{children:[d.jsxs("h1",{className:"text-2xl font-bold text-foreground mb-2",children:[DE[e]," Limit Reached"]}),d.jsxs("p",{className:"text-muted-foreground text-sm",children:["You've used ",t," / ",n??"â"," Deep Analyses on the ",f," tier this month."]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs(ne,{variant:"ghost",onClick:()=>i(s?"/dashboard":"/"),className:"w-full gap-2 text-muted-foreground",children:[s?d.jsx(Gp,{className:"w-4 h-4"}):d.jsx(kP,{className:"w-4 h-4"}),s?"Go to Today":"Back to Home"]}),d.jsx(ne,{onClick:h,disabled:c,className:"w-full gradient-primary text-primary-foreground gap-2",size:"lg",children:c?d.jsx(jc,{className:"w-4 h-4 animate-spin"}):s?d.jsxs(d.Fragment,{children:[d.jsx(qp,{className:"w-4 h-4"}),"Upgrade to Pro â $19/mo",d.jsx(d_,{className:"w-3 h-3"})]}):d.jsxs(d.Fragment,{children:[d.jsx(AP,{className:"w-4 h-4"}),"Sign In to Upgrade"]})}),d.jsxs(ne,{variant:"outline",onClick:()=>l(!0),className:"w-full gap-2",children:[d.jsx(hn,{className:"w-4 h-4"}),"View All Plans"]})]})]})}),a&&d.jsx(L$,{onClose:()=>l(!1)})]})}const LE=x.forwardRef(({feature:e,onDismiss:t},n)=>d.jsxs("div",{ref:n,className:"bg-card border border-border/50 rounded-lg pl-3 pr-3 sm:pr-4 py-1.5 sm:py-2 flex items-center justify-between gap-2 mb-2 sm:mb-4 animate-slide-up",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm min-w-0",children:[d.jsx(LP,{className:"w-4 h-4 text-accent shrink-0"}),d.jsxs("span",{className:"text-muted-foreground min-w-0",children:[d.jsx("span",{className:"font-medium text-foreground",children:"Free Signal Audit"}),d.jsxs("span",{className:"hidden sm:inline",children:[" â ",DE[e],", complete and unrestricted"]}),d.jsx("span",{className:"sm:hidden",children:" â complete, unrestricted"})]})]}),d.jsx(ne,{variant:"ghost",size:"sm",onClick:t,className:"text-xs text-muted-foreground shrink-0 h-7 px-2",children:"Dismiss"})]}));LE.displayName="FeatureTrialBanner";const vn=x.forwardRef(({children:e,className:t,delay:n=0,direction:r="up"},s)=>{const i={hidden:{opacity:0,y:r==="up"?40:0,x:r==="left"?-40:r==="right"?40:0},visible:{opacity:1,y:0,x:0,transition:{duration:.6,ease:"easeOut",delay:n}}};return d.jsx(Qi.div,{ref:s,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:i,className:t,children:e})});vn.displayName="AnimatedSection";const $$=x.forwardRef(({children:e,className:t},n)=>d.jsx(Qi.div,{ref:n,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:{visible:{transition:{staggerChildren:.1}}},className:t,children:e}));$$.displayName="StaggerContainer";const U$=[{icon:NP,badge:"Founder / owner-marketer",title:"Publish without a marketing team",lines:["Turn rough notes into work you're willing to ship","Keep the same voice across every channel","Keep brand context in one place instead of your head"],cta:"Open Composer",path:"/composer"},{icon:$P,badge:"SMB marketing lead",title:"Review and adapt faster",lines:["Get a qualitative read on what's strong, weak, or generic","Adapt one piece for several channels","Notice brand and market changes worth acting on"],cta:"Explore Watch",path:"/narrative"},{icon:p_,badge:"Fractional CMO / consultant",title:"Switch contexts without losing the thread",lines:["Keep separate brand context per client","Use deeper diagnosis when the stakes are higher","Run several sites through Batch Audit in one pass"],cta:"Run a deeper diagnosis",path:"/strategy"}],F$={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.45,ease:"easeOut"}}};function V$(){const e=mn();return d.jsx("section",{id:"who-it-helps",className:"py-20 sm:py-28 border-t border-border/50",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsxs("div",{className:"mb-12 max-w-2xl",children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-3",children:"Who it helps"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground leading-tight",children:"Built for small teams doing marketing anyway."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 sm:gap-5",children:U$.map((t,n)=>{const r=t.icon;
364return d.jsxs(Qi.div,{variants:F$,initial:"hidden",whileInView:"visible",viewport:{once:!0},transition:{delay:n*.08},className:"rounded-2xl border border-border bg-card p-6 flex flex-col",children:[d.jsx(r,{className:"w-4 h-4 text-primary mb-3"}),d.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:t.badge}),d.jsx("h3",{className:"text-base font-semibold text-foreground mb-3",children:t.title}),d.jsx("ul",{className:"space-y-2 mb-6 flex-1",children:t.lines.map(s=>d.jsx("li",{className:"text-sm text-muted-foreground leading-relaxed",children:s},s))}),d.jsxs(ne,{variant:"outline",size:"sm",onClick:()=>e(t.path),className:"gap-1.5 text-xs",children:[t.cta," ",d.jsx(on,{className:"w-3 h-3"})]})]},t.badge)})})]})})}const B$=[{icon:Gp,label:"Today",title:"Start where it matters",desc:"Saved brand alerts, work you left unfinished, and anything you scheduled â ordered so the next useful step is obvious.",caveat:"Built from what you've saved, not a real-time feed.",path:"/dashboard"},{icon:$r,label:"Compose",title:"The daily workbench",desc:"Analyze a draft, Polish it without losing your voice, or use Format Only to improve structure while your words stay exactly as written. Then adapt it for other channels.",caveat:"Format Only is verified word-for-word before it's called unchanged.",path:"/composer"},{icon:Vi,label:"Brand",title:"Context that sticks",desc:"Your saved brand profile plus a strategic read of positioning, audience, proof, and perception gaps drawn from your public signal.",caveat:"Inferred judgment from observable content â not measured audience research.",path:"/twin"},{icon:vu,label:"Watch",title:"Changes worth attention",desc:"Saved alerts, past reads, and competitive scans in one place, with the differences between one read and the next surfaced.",caveat:"Based on saved alerts, snapshots, and scans â not continuous real-time monitoring.",path:"/narrative"}],z$=[{label:"Deep diagnosis",path:"/strategy"},{label:"Pre-Launch Test",path:"/pre-launch"},{label:"Hook review",path:"/hooks"},{label:"Calendar",path:"/calendar"},{label:"Batch Audit",path:"/batch-audit"}];function W$(){const e=mn();return d.jsx("section",{className:"py-20 sm:py-28 border-t border-border/50",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsxs("div",{className:"mb-12 max-w-2xl",children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-3",children:"One product, four connected surfaces"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground leading-tight",children:"Everything you make feeds everything you know."})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-5",children:B$.map((t,n)=>{const r=t.icon;return d.jsxs(Qi.button,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:n*.06},onClick:()=>e(t.path),className:"text-left rounded-2xl border border-border bg-card p-6 hover:border-primary/40 transition-colors",children:[d.jsxs("div",{className:"flex items-center gap-2.5 mb-3",children:[d.jsx(r,{className:"w-4 h-4 text-primary"}),d.jsx("span",{className:"text-sm font-semibold text-foreground",children:t.label})]}),d.jsx("h3",{className:"text-base font-semibold text-foreground mb-2",children:t.title}),d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.desc}),d.jsx("p",{className:"mt-3 text-xs text-muted-foreground/80 italic",children:t.caveat})]},t.label)})}),d.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-sm text-muted-foreground mr-1",children:"More when you need it:"}),z$.map(t=>d.jsxs(ne,{variant:"outline",size:"sm",onClick:()=>e(t.path),className:"text-xs gap-1",children:[t.label," ",d.jsx(on,{className:"w-3 h-3"})]},t.path))]})]})})}const H$="Your first complete Signal Audit is free.",K$="No signup. No credit card.",G$=`${H$} ${K$}`;function FF(e){return`Diagnose â Fix â Recheck up to ${e} assets or brands each month`}const VF="Cancel anytime",q$=140,Y$=["/pricing"],Jc={text:null,destination:null,variantKey:null,experimentId:null},tc=new Map,Jd=new Map;
364function Q$(e,t){return`sb_exp_exposed:${e}:${t}`}const Z0=new Set;function J$(e,t){const n=Q$(e,t);if(Z0.has(n))return!1;Z0.add(n);try{if(typeof sessionStorage<"u"){if(sessionStorage.getItem(n))return!1;sessionStorage.setItem(n,"1")}}catch{}return!0}function X$(e,t){!t.text||!t.variantKey||J$(e,t.variantKey)&&(k$({experimentId:t.experimentId,variantKey:t.variantKey,surface:e}),it(ot.EXEC_UI_VARIANT_EXPOSED,{surface:e,variant_key:t.variantKey,experiment_id:t.experimentId}))}function Z$(e){if(typeof e!="string")return null;const t=e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();return t.length<2||t.length>q$?null:t}function eU(e){if(typeof e!="string")return null;const t=e.trim();return Y$.includes(t)?t:null}async function tU(e){const t=tc.get(e);if(t)return t;const n=Jd.get(e);if(n)return n;const r=(async()=>{try{const{data:s,error:i}=await Se.from("exec_ui_variants").select("copy, variant_key, experiment_id").eq("surface",e).eq("active",!0).maybeSingle();if(i)throw i;const o=(s==null?void 0:s.copy)??null,a=Z$((o==null?void 0:o.text)??(o==null?void 0:o.headline)??(o==null?void 0:o.label)??(o==null?void 0:o.cta)??(o==null?void 0:o.line)),l={text:a,destination:a?eU(o==null?void 0:o.destination):null,variantKey:a&&(s!=null&&s.variant_key)?String(s.variant_key):null,experimentId:a&&(s!=null&&s.experiment_id)?String(s.experiment_id):null};return tc.set(e,l),l}catch{return tc.set(e,Jc),Jc}finally{Jd.delete(e)}})();return Jd.set(e,r),r}function nU(e,t){const[n,r]=x.useState(()=>{const s=tc.get(e);return s!=null&&s.text?s:{...Jc,text:t}});return x.useEffect(()=>{let s=!1;return tU(e).then(i=>{s||(r(i.text?i:{...Jc,text:t}),i.text&&X$(e,i))}),()=>{s=!0}},[e,t]),n}function rU(e,t){return nU(e,t).text||t}function sU(e){const t=(e||"").trim();if(!t||/\s/.test(t))return"content";const n=/^https?:\/\//i.test(t)?t:`https://${t}`;let r;try{r=new URL(n)}catch{return"content"}if(!/^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(r.hostname))return"content";const s=r.pathname.replace(/\/+$/,"");if(!s||s==="")return"company";const i=s.split("/").filter(Boolean);return i.length>1||/[-_]/.test(i[0]??"")||/\.(html?|php|aspx?)$/i.test(i[0]??"")?"article":"company"}function iU({onContent:e,onSignal:t,onContentFromSource:n}){const[r,s]=x.useState(""),i=rU("landing_hero_cta","Run my free Signal Audit"),o=sU(r),a=r.trim().length>0;return d.jsxs("div",{"data-testid":"landing-task-entry",className:"space-y-4",children:[d.jsx("h2",{className:"text-lg sm:text-xl font-semibold text-foreground",children:"What are you working on?"}),d.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[d.jsxs("div",{className:"rounded-2xl border border-border bg-card p-4 flex flex-col",children:[d.jsx($r,{className:"w-4 h-4 text-primary mb-2"}),d.jsx("h3",{className:"text-sm font-bold text-foreground",children:"A draft, post or idea"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1 flex-1",children:"Paste something you wrote, create from scratch, or improve what you have."}),d.jsxs(ne,{onClick:e,className:"mt-4 w-full min-h-[44px] gap-2 gradient-primary text-primary-foreground font-semibold",children:["Improve my content ",d.jsx(on,{className:"w-4 h-4"})]})]}),d.jsxs("div",{className:"rounded-2xl border border-border bg-card p-4 flex flex-col",children:[d.jsx(OP,{className:"w-4 h-4 text-primary mb-2"}),d.jsx("h3",{className:"text-sm font-bold text-foreground",children:"My company's market signal"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1 flex-1",children:"See how clearly, distinctly and credibly your positioning reads to the market."}),d.jsxs("form",{onSubmit:l=>{l.preventDefault(),t(r.trim())},className:"mt-4 space-y-2",children:[d.jsx("label",{htmlFor:"task-entry-url",className:"sr-only",children:"Your website"}),d.jsx("input",{id:"task-entry-url",value:r,onChange:l=>s(l.target.value),placeholder:"yourcompany.com",autoComplete:"url",className:"w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"}),d.jsxs(ne,{type:"submit",className:"w-full min-h-[44px] gap-2 gradient-primary text-primary-foreground font-semibold",children:[i," ",d.jsx(on,{className:"w-4 h-4"})]})]})]})]}),a&&o==="article"&&d.jsxs("p",{"data-testid":"entry-intent-proposal",className:"text-xs text-muted-foreground",children:["That looks like an article link, which is often source material."," ",d.jsx("button",{onClick:()=>n(r.trim()),className:"font-semibold text-primary hover:underline underline-offset-2",children:"Use it as content source instead"})," ","â or run the Signal Audit on it anyway."]}),a&&o==="content"&&d.jsxs("p",{"data-testid":"entry-intent-proposal",className:"text-xs text-muted-foreground",children:["That reads like text rather than a website."," ",d.jsx("button",{onClick:()=>n(r.trim()),className:"font-semibold text-primary hover:underline underline-offset-2",children:"Improve it in Composer instead"}),"."]}),d.jsx("p",{className:"text-sm text-muted-foreground",children:G$})]})}const ew=[{label:"Product",target:"product"},{label:"Composer",path:"/composer"},{label:"Brand",path:"/twin"},{label:"Watch",path:"/narrative"},{label:"Pricing",path:"/pricing"}],Xd=[{label:"Signal-to-Noise Index",path:"/signal-to-noise-index"},{label:"Annual Report",path:"/research/annual-signal-to-noise-report-2026"},{label:"Rankings",path:"/research/rankings"},{label:"For Investors",path:"/investors"},{label:"For Agencies",path:"/agencies"}],oU=[{icon:$r,kicker:"Create",title:"Turn rough thinking into publish-ready marketing.",desc:"Analyze a draft, Polish it, keep your words with Format Only, then adapt it across channels.",cta:"Open Composer",path:"/composer"},{icon:Vi,kicker:"Judge",title:"Know what is strong, weak, generic, or off-brand.",desc:"A qualitative review read against your saved brand context. Inferred judgment from what we can observe â not measured audience research.",cta:"Explore Brand",path:"/twin"},{icon:vu,kicker:"Watch",title:"Bring important changes into one place.",desc:"Saved brand alerts, past reads, and competitive scans, with what changed between them. Event and scan based, not continuous.",cta:"Open Watch",path:"/narrative"}],aU=[{step:"Create",desc:"You draft, paste, or dictate. Composer reviews and improves it."},{step:"Review",desc:"You see what's working and the one thing worth changing first."},{step:"Remember",desc:"Finished work and past reads become brand context and history."},{step:"Notice",desc:"Brand and Watch surface what changed â and hand it back to Composer."}],lU=x.forwardRef(function(t,n){const r=mn(),{toast:s}=Ia(),{user:i}=gn(),[o,a]=x.useState(!1);x.useState("");const[l,c]=x.useState(""),[u,h]=x.useState(!1),[f,p]=x.useState(!1);x.useEffect(()=>{document.title="SocialBrilliance â AI marketing intelligence for small teams"},[]);const w=m=>{var g;(g=document.getElementById(m))==null||g.scrollIntoView({behavior:"smooth"}),a(!1)},y=x.useCallback(async(m,g)=>{const v=await Gm({plan:m,billing:g,returnTo:"/pricing",source:"landing_plans",isAuthenticated:!!i,navigate:r});!v.ok&&v.error&&s({variant:"destructive",title:"Checkout failed",description:v.error})},[s,r,i]),b=x.useCallback((m,g,v="monthly")=>m==="enterprise"?r("/enterprise"):g?y(m,v):r("/composer"),[r,y]);return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsxs("header",{className:"sticky top-0 z-50 border-b border-border/50 bg-card/80 backdrop-blur-sm",children:[d.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 py-3 flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:d.jsx(hn,{className:"w-4 h-4 text-primary"})}),d.jsx("span",{className:"font-bold text-foreground",children:"SocialBrilliance"})]}),d.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[ew.map(m=>d.jsx("button",{onClick:()=>m.path?r(m.path):m.target&&w(m.target),className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:m.label},m.label)),d.jsxs("div",{className:"relative group",children:[d.jsxs("button",{className:"text-sm text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1",children:["Research ",d.jsx(c_,{className:"w-3 h-3 rotate-90"})]}),d.jsx("div",{className:"absolute top-full left-0 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50",children:d.jsx("div",{className:"bg-card border border-border rounded-xl shadow-xl p-2 min-w-[210px]",children:Xd.map(m=>d.jsx("button",{onClick:()=>r(m.path),className:"block w-full text-left text-sm text-muted-foreground hover:text-foreground hover:bg-secondary/50 rounded-lg px-3 py-2 transition-colors",children:m.label},m.path))})})]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>r("/auth"),className:"text-sm hidden sm:inline-flex",children:"Sign In"}),d.jsxs(ne,{size:"sm",onClick:()=>r("/composer"),className:"gradient-primary text-primary-foreground text-sm gap-1.5",children:[d.jsx($r,{className:"w-3.5 h-3.5"}),d.jsx("span",{className:"hidden sm:inline",children:"Open Composer"}),d.jsx("span",{className:"sm:hidden",children:"Composer"})]}),d.jsx("button",{className:"md:hidden p-2 text-muted-foreground",onClick:()=>a(!o),"aria-label":"Menu",children:o?d.jsx(Ni,{className:"w-5 h-5"}):d.jsx(RP,{className:"w-5 h-5"})})]})]}),o&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-[45] bg-background/80 backdrop-blur-sm md:hidden",onClick:()=>a(!1)}),d.jsxs(Qi.div,{initial:{opacity:0,y:-8}
364,animate:{opacity:1,y:0},transition:{duration:.2},className:"absolute top-full left-0 right-0 z-[60] md:hidden border-t border-border bg-card shadow-2xl px-4 py-4 space-y-1",children:[ew.map(m=>d.jsx("button",{onClick:()=>{m.path?r(m.path):m.target&&w(m.target),a(!1)},className:"block w-full text-left text-sm text-foreground hover:bg-secondary/50 rounded-lg py-2.5 px-3 transition-colors",children:m.label},m.label)),d.jsxs("div",{className:"pt-2 border-t border-border/30 mt-2 space-y-1",children:[d.jsx("p",{className:"text-xs uppercase tracking-wider text-muted-foreground font-semibold px-3 pt-1",children:"Research"}),Xd.map(m=>d.jsx("button",{onClick:()=>{r(m.path),a(!1)},className:"block w-full text-left text-sm text-foreground hover:bg-secondary/50 rounded-lg py-2.5 px-3 transition-colors",children:m.label},m.path))]}),d.jsxs("div",{className:"pt-2 border-t border-border/30 mt-2 space-y-1",children:[d.jsx("button",{onClick:()=>{r("/about"),a(!1)},className:"block w-full text-left text-sm text-foreground hover:bg-secondary/50 rounded-lg py-2.5 px-3 transition-colors",children:"About"}),d.jsx("button",{onClick:()=>{r("/enterprise"),a(!1)},className:"block w-full text-left text-sm text-foreground hover:bg-secondary/50 rounded-lg py-2.5 px-3 transition-colors",children:"Enterprise"}),d.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>{r("/auth"),a(!1)},className:"w-full justify-start text-foreground",children:"Sign In"})]})]})]})]}),d.jsxs("section",{className:"relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-40 -left-40 w-[500px] h-[500px] rounded-full bg-primary/5 blur-3xl pointer-events-none"}),d.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 pt-20 sm:pt-32 pb-16 sm:pb-24 relative",children:d.jsxs(vn,{children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-5",children:"AI marketing intelligence for small teams"}),d.jsx("h1",{className:"text-3xl sm:text-5xl font-bold text-foreground leading-[1.1] mb-6",children:"Make every piece of marketing better."}),d.jsx("p",{className:"text-foreground/80 text-base sm:text-lg leading-relaxed mb-8 max-w-2xl",children:"Paste your site and see how your brand reads to the market in minutes. Then use Composer to write and improve content that sounds like you â reviewed against your saved brand context."}),d.jsx(iU,{onContent:()=>{it(ot.LANDING_TASK_ENTRY_CLICK,{entry:"content"}),r("/composer?source=landing")},onSignal:m=>{it(ot.LANDING_TASK_ENTRY_CLICK,{entry:"signal"}),r(m?`/strategy?url=${encodeURIComponent(m)}&source=landing`:"/strategy?source=landing")},onContentFromSource:m=>{it(ot.LANDING_TASK_ENTRY_CLICK,{entry:"content",from:"source_url"}),r(`/composer?source=landing&repurpose=${encodeURIComponent(m)}`)}}),d.jsx("p",{className:"mt-6 text-xs text-muted-foreground max-w-xl leading-relaxed",children:"Signal reads are qualitative judgments inferred from the content we can observe publicly â not measured audience research, and not an audit."})]})})]}),d.jsx("section",{id:"product",className:"py-20 sm:py-28 border-t border-border/50 scroll-mt-20",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:oU.map(m=>{const g=m.icon;return d.jsx(vn,{children:d.jsxs("div",{className:"h-full rounded-2xl border border-border bg-card p-6 flex flex-col",children:[d.jsx(g,{className:"w-4 h-4 text-primary mb-3"}),d.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-primary font-semibold mb-3",children:m.kicker}),d.jsx("h3",{className:"text-base font-semibold text-foreground mb-3 leading-snug",children:m.title}),d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed flex-1",children:m.desc}),d.jsxs(ne,{variant:"outline",size:"sm",onClick:()=>r(m.path),className:"mt-6 gap-1.5 text-xs self-start",children:[m.cta," ",d.jsx(on,{className:"w-3 h-3"})]})]})},m.kicker)})}),d.jsxs("p",{className:"mt-8 text-sm text-muted-foreground",children:["Deep diagnosis and pre-launch pressure testing are there when the stakes are higher â"," ",d.jsx("button",{onClick:()=>r("/strategy"),className:"text-primary hover:underline font-medium",children:"deep diagnosis"})," · ",d.jsx("button",{onClick:()=>r("/pre-launch"),className:"text-primary hover:underline font-medium",children:"pre-launch test"})]})]})}),d.jsx("section",{className:"py-20 sm:py-28 bg-secondary/20 border-y border-border/50",children:d.jsxs(vn,{className:"max-w-3xl mx-auto px-4 sm:px-6",children:[d.jsx(h_,{className:"w-5 h-5 text-primary mb-5"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-4",children:"Your words. Better presented."}),d.jsx("p",{className:"text-muted-foreground leading-relaxed mb-8 max-w-2xl",children:"Format Only improves structure and presentation without rewriting your words. SocialBrilliance verifies the lexical content before calling the result unchanged."}),d.jsxs(ne,{onClick:()=>r("/composer"),className:"gradient-primary text-primary-foreground font-semibold gap-2",children:["Try Format Only ",d.jsx(on,{className:"w-4 h-4"})]})]})}),d.jsx("section",{className:"py-20 sm:py-28",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsxs(vn,{className:"max-w-2xl mb-12",children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-3",children:"The loop"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground leading-tight mb-4",children:"Create â Review â Remember â Notice"}),d.jsx("p",{className:"text-sm sm:text-base text-muted-foreground leading-relaxed",children:"Finished work informs your brand context and history. Insights from Brand and Watch lead back into Composer. The more context accumulates, the more useful the product gets."})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:aU.map((m,g)=>d.jsx(vn,{children:d.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 h-full",children:[d.jsx("span",{className:"text-xs font-semibold text-primary",children:String(g+1).padStart(2,"0")}),d.jsx("h3",{className:"text-sm font-semibold text-foreground mt-2 mb-2",children:m.step}),d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:m.desc})]})},m.step))})]})}),d.jsx(W$,{}),d.jsx("section",{className:"py-20 sm:py-28 border-t border-border/50",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsxs(vn,{className:"max-w-2xl mb-10",children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-3",children:"Research"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground leading-tight mb-4",children:"The Signal-to-Noise Index"}),d.jsx("p",{className:"text-sm sm:text-base text-muted-foreground leading-relaxed",children:"Our published research franchise: how companies read to the market on clarity, trust, and differentiation. Read the methodology and the cohort results in full."})]}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[Xd.slice(0,3).map(m=>d.jsxs(ne,{variant:"outline",size:"sm",onClick:()=>r(m.path),className:"text-xs gap-1.5",children:[m.label," ",d.jsx(on,{className:"w-3 h-3"})]},m.path)),d.jsxs(ne,{size:"sm",onClick:()=>r("/strategy"),className:"text-xs gap-1.5 gradient-primary text-primary-foreground",children:["Run a deeper diagnosis ",d.jsx(on,{className:"w-3 h-3"})]})]}),d.jsx(vn,{className:"mt-10",children:d.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 sm:p-8 grid grid-cols-1 md:grid-cols-[1fr,auto] gap-6 items-center",children:[d.jsxs("div",{children:[d.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1 mb-3",children:[d.jsx(Kp,{className:"w-3 h-3 text-primary"}),d.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wider",children:"Free report · 2026 edition"})]}),d.jsx("h3",{className:"text-lg sm:text-xl font-bold text-foreground mb-2",children:"The 2026 Signal-to-Noise Report"}),d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"How the 2026 cohort scores on trust, clarity, and authority â with the methodology behind it."})]}),d.jsx("div",{className:"md:min-w-[280px]",children:u?d.jsxs("div",{className:"rounded-lg bg-primary/10 border border-primary/30 p-4 text-center",children:[d.jsx(l_,{className:"w-6 h-6 text-primary mx-auto mb-2"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Request received"}),d.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"The 2026 edition is published on this site â read it now."}),d.jsxs(ne,{variant:"outline",size:"sm",className:"mt-3 text-xs gap-1.5",onClick:()=>r("/research/annual-signal-to-noise-report-2026"),children:["Open the 2026 report ",d.jsx(on,{className:"w-3 h-3"})]})]}):d.jsxs("form",{onSubmit:async m=>{m.preventDefault();const g=l.trim();if(g)try{await Se.from("inbound_leads").insert({source:"landing_report_download",email:g,url_submitted:"snr-report-2026"}),h(!0)}catch(v){s({variant:"destructive",title:"Could not submit",description:v.message})}},className:"space-y-2",children:[d.jsx("input",{type:"email",required:!0,value:l,onCh
364ange:m=>c(m.target.value),placeholder:"[email protected]",className:"w-full rounded-lg border border-border bg-background px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/40"}),d.jsxs(ne,{type:"submit",className:"w-full gradient-primary text-primary-foreground font-semibold gap-2",children:["Request report updates ",d.jsx(on,{className:"w-4 h-4"})]}),d.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"We'll use this to notify you about new editions. No automated mailing list."})]})})]})})]})}),d.jsx(V$,{}),d.jsx("section",{className:"py-20 sm:py-28 border-t border-border/50",children:d.jsxs("div",{className:"max-w-5xl mx-auto px-4 sm:px-6",children:[d.jsxs(vn,{className:"mb-10 flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4",children:[d.jsxs("div",{className:"max-w-xl",children:[d.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-semibold mb-3",children:"Pricing"}),d.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground leading-tight",children:"Start free. Upgrade when it earns it."})]}),d.jsx("button",{onClick:()=>p(m=>!m),className:"self-start text-sm text-muted-foreground hover:text-foreground transition-colors border border-border rounded-lg px-3 py-2",children:f?"Showing annual · switch to monthly":"Showing monthly · switch to annual"})]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-4",children:Bm.map(m=>{var _;const g=(_=Va[m.id])==null?void 0:_[f?"annual":"monthly"],v=f?m.annual:m.price;return d.jsxs("div",{className:`rounded-2xl border bg-card p-5 flex flex-col ${m.highlight?"border-primary/50":"border-border"}`,children:[d.jsx("p",{className:"text-sm font-semibold text-foreground",children:m.name}),d.jsxs("p",{className:"mt-2 text-2xl font-bold text-foreground",children:[v<0?"Custom":v===0?"Free":`$${v}`,v>0&&d.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"/mo"})]}),d.jsx("p",{className:"mt-3 text-sm text-muted-foreground leading-relaxed flex-1",children:m.shortLine}),d.jsx(ne,{variant:m.highlight?"default":"outline",size:"sm",className:`mt-5 text-xs ${m.highlight?"gradient-primary text-primary-foreground":""}`,onClick:()=>b(m.id,g,f?"annual":"monthly"),children:m.cta})]},m.id)})}),d.jsxs("p",{className:"mt-6 text-sm text-muted-foreground",children:["Full limits and comparisons on the"," ",d.jsx("button",{onClick:()=>r("/pricing"),className:"text-primary hover:underline font-medium",children:"pricing page"}),"."]})]})}),d.jsx("section",{className:"py-20 sm:py-28 bg-secondary/20 border-t border-border/50",children:d.jsxs(vn,{className:"max-w-2xl mx-auto px-4 sm:px-6 text-center",children:[d.jsx("h2",{className:"text-2xl sm:text-4xl font-bold text-foreground mb-5",children:"Bring your next draft."}),d.jsx("p",{className:"text-muted-foreground mb-9 leading-relaxed",children:"Paste what you have. See what it needs. Keep your voice."}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[d.jsxs(ne,{size:"lg",onClick:()=>r("/composer"),className:"gradient-primary text-primary-foreground font-semibold gap-2 px-8",children:[d.jsx($r,{className:"w-4 h-4"})," Open Composer"]}),d.jsxs(ne,{size:"lg",variant:"outline",onClick:()=>r("/twin"),className:"gap-2",children:[d.jsx(Vi,{className:"w-4 h-4"})," Explore Brand"]})]}),d.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"No credit card required."})]})}),d.jsx("footer",{className:"border-t border-border/50 py-8",children:d.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 flex flex-col sm:flex-row items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(hn,{className:"w-3.5 h-3.5 text-primary"}),d.jsx("span",{className:"text-sm font-semibold text-foreground",children:"SocialBrilliance"}),d.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"AI marketing intelligence for small teams"})]}),d.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2 text-xs text-muted-foreground",children:[d.jsx("button",{onClick:()=>r("/composer"),className:"hover:text-foreground transition-colors",children:"Composer"}),d.jsx("button",{onClick:()=>r("/pricing"),className:"hover:text-foreground transition-colors",children:"Pricing"}),d.jsx("button",{onClick:()=>r("/about"),className:"hover:text-foreground transition-colors",children:"About"}),d.jsx("button",{onClick:()=>r("/signal-to-noise-index"),className:"hover:text-foreground transition-colors",children:"Signal Index"}),d.jsx("button",{onClick:()=>r("/research/rankings"),className:"hover:text-foreground transition-colors",children:"Rankings"}),d.jsx("button",{onClick:()=>r("/enterprise"),className:"hover:text-foreground transition-colors",children:"Enterprise"}),d.jsx("button",{onClick:()=>r("/privacy"),className:"hover:text-foreground transition-colors",children:"Privacy"}),d.jsx("button",{onClick:()=>r("/terms"),className:"hover:text-foreground transition-colors",children:"Terms"}),d.jsx("button",{onClick:()=>r("/about#contact"),className:"hover:text-foreground transition-colors",children:"Contact"}
364),d.jsx("span",{className:"text-muted-foreground/70",children:"© SocialBrilliance 2026"})]})]})})]})});var cU="authorization_response",uU="/~oauth/initiate",dU=["https://oauth.lovable.app","https://lovable.dev"],hU="lovable://oauth-callback",fU="http://127.0.0.1/iframe-oauth/callback",pU=500,mU=12e4;function gU(e){let t;const n=new Promise(i=>{t=i}),r=i=>{if(!e.some(l=>i.origin===l))return;const a=i.data;!a||typeof a!="object"||a.type===cU&&t(a.response)},s=()=>{window.removeEventListener("message",r)};return window.addEventListener("message",r),{cleanup:s,messagePromise:n}}function yU(e){const t=window.screenX!==0||window.screenY!==0||!e,n=t?window.outerWidth*.5:window.screen.width*.5,r=t?window.outerHeight*.5:window.screen.height*.5,s=t?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,i=t?window.screenY+(window.outerHeight-r)/2:(window.screen.height-r)/2;return{width:n,height:r,left:s,top:i}}function tw(e,t){return e.state!==t?{error:new Error("State is invalid")}:e.error?e.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(e.error_description??"Sign in failed")}:!e.access_token||!e.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:e.access_token,refresh_token:e.refresh_token},error:null}}function vU(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function wU(e={}){const t=e.oauthBrokerUrl??uU,n=e.supportedOAuthOrigins??dU;async function r(s,i={}){let o=!1;try{o=window.self!==window.top}catch{o=!0}const a=navigator.userAgent,l=/iPhone|iPad|iPod|Android/i.test(a),c=/LovableApp\//.test(a),u=/lovable-?desktop\//i.test(a),h=vU();let f=i.redirect_uri??window.location.origin;c&&o?f=hU:u&&o&&(f=fU);const p=new URLSearchParams({...i.extraParams,provider:s,redirect_uri:f,state:h});if(!o)return window.location.href=`${t}?${p.toString()}`,{error:null,redirected:!0};!c&&!u&&p.set("response_mode","web_message");const w=`${t}?${p.toString()}`,y=u?[...n,window.location.origin]:n,{messagePromise:b,cleanup:m}=gU(y);let g;if(l)g=window.open(w,"_blank");else{const{width:S,height:E,left:k,top:T}=yU(o);g=window.open(w,"oauth",`width=${S},height=${E},left=${k},top=${T}`)}if(!g&&(c||u)){let S;const E=new Promise((k,T)=>{S=setTimeout(()=>{T(new Error("OAuth timed out waiting for response"))},mU)});try{const k=await Promise.race([b,E]);return tw(k,h)}catch(k){return{error:k instanceof Error?k:new Error(String(k))}}finally{S&&clearTimeout(S),m()}}if(!g)return m(),{error:new Error("Popup was blocked")};let v;const _=new Promise((S,E)=>{v=setInterval(()=>{g.closed&&(clearInterval(v),E(new Error("Sign in was cancelled")))},pU)});try{const S=await Promise.race([b,_]);return tw(S,h)}catch(S){return{error:S instanceof Error?S:new Error(String(S))}}finally{clearInterval(v),m(),g==null||g.close()}}return{signInWithOAuth:r}}function xU(e={}){return wU(e)}const bU=xU(),nw={auth:{signInWithOAuth:async(e,t)=>{const n=await bU.signInWithOAuth(e,{redirect_uri:t==null?void 0:t.redirect_uri,extraParams:{...t==null?void 0:t.extraParams}});if(n.redirected||n.error)return n;try{await Se.auth.setSession(n.tokens)}catch(r){return{error:r instanceof Error?r:new Error(String(r))}}return n}}},ko=x.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:xe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));ko.displayName="Input";var _U="Label",ME=x.forwardRef((e,t)=>d.jsx(ft.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ME.displayName=_U;var $E=ME;const SU=Hp("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),To=x.forwardRef(({className:e,...t},n)=>d.jsx($E,{ref:n,className:xe(SU(),e),...t}));To.displayName=$E.displayName;const nc=x.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:xe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
364nc.displayName="Card";const rc=x.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:xe("flex flex-col space-y-1.5 p-6",e),...t}));rc.displayName="CardHeader";const sc=x.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:xe("text-2xl font-semibold leading-none tracking-tight",e),...t}));sc.displayName="CardTitle";const EU=x.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:xe("text-sm text-muted-foreground",e),...t}));EU.displayName="CardDescription";const ic=x.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:xe("p-6 pt-0",e),...t}));ic.displayName="CardContent";const oc=x.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:xe("flex items-center p-6 pt-0",e),...t}));oc.displayName="CardFooter";const kU=[{icon:f_,text:"Composer turns rough thinking into publish-ready marketing"},{icon:Vi,text:"Reviews read your draft against your saved brand context"},{icon:qp,text:"Format Only keeps your exact words when you want them kept"},{icon:_P,text:"Adapt one piece across channels without a rewrite"},{icon:Kp,text:"Signal reads how your public content reads to the market"},{icon:jP,text:"Watch keeps past reads, alerts, and competitive scans in one place"}],Pl="sb_oauth_pending";function TU(){const{user:e,loading:t}=gn();bt();const[n]=x.useState(()=>new URLSearchParams(window.location.search).get("intent")!=="checkout"?null:N$(window.location.search)),r=x.useMemo(()=>n?R$(n.plan,n.billing):null,[n]),[s,i]=x.useState(!n),[o,a]=x.useState(""),[l,c]=x.useState(""),[u,h]=x.useState(""),[f,p]=x.useState(!1),[w,y]=x.useState(!1),b=mn(),{toast:m}=Ia(),[g,v]=x.useState(!1),[_,S]=x.useState(""),[E,k]=x.useState(!1),T=x.useRef(!1),R=x.useRef(!1);x.useEffect(()=>{T.current||(T.current=!0,it(ot.AUTH_VIEW,{intent:n?"checkout":"none",plan:(n==null?void 0:n.plan)??null,billing:(n==null?void 0:n.billing)??null}))},[n]),x.useEffect(()=>{if(!(t||!e)){try{const L=sessionStorage.getItem(Pl);L&&(sessionStorage.removeItem(Pl),it(ot.OAUTH_COMPLETED,{provider:L,plan:(n==null?void 0:n.plan)??null}))}catch{}if(!n){b("/dashboard",{replace:!0});return}R.current||(R.current=!0,(async()=>(p(!0),(await IE({plan:n.plan,billing:n.billing,returnTo:n.returnTo,source:"auth_resume"})).ok||(p(!1),m({title:"Could not open checkout",description:"Your plan is saved â try again from this page.",variant:"destructive"}),R.current=!1)))())}},[e,t,n,b,m]);const P=()=>n?`${window.location.origin}${Hf(n)}`:window.location.origin,$=async L=>{L.preventDefault(),p(!0);const{error:U}=await Se.auth.signInWithPassword({email:o,password:l});p(!1),U?m({title:"Login failed",description:U.message,variant:"destructive"}):n||b("/dashboard")},O=async L=>{L.preventDefault(),p(!0),it(ot.SIGNUP_STARTED,{intent:n?"checkout":"none",plan:(n==null?void 0:n.plan)??null});const{data:U,error:Y}=await Se.auth.signUp({email:o,password:l,options:{data:{display_name:u},emailRedirectTo:n?`${window.location.origin}${Hf(n)}`:window.location.origin}});p(!1),Y?m({title:"Signup failed",description:Y.message,variant:"destructive"}):U.session?(it(ot.SIGNUP_COMPLETED,{intent:n?"checkout":"none",plan:(n==null?void 0:n.plan)??null}),n||b("/dashboard")):(it(ot.SIGNUP_COMPLETED,{pending_verification:!0,plan:(n==null?void 0:n.plan)??null}),S(o),v(!0))},W=async()=>{if(!_)return;k(!0);const{error:L}=await Se.auth.resend({type:"signup",email:_});k(!1),m(L?{title:"Failed to resend",description:L.message,variant:"destructive"}:{title:"Verification email resent",description:`Check ${_} for the verification link.`})},D=async L=>{if(L.preventDefault(),!o){m({title:"Enter your email",variant:"destructive"});return}p(!0);const{error:U}=await Se.auth.resetPasswordForEmail(o,{redirectTo:`${window.location.origin}/reset-password`});p(!1),U?m({title:"Error",description:U.message,variant:"destructive"}):(m({title:"Reset link sent",description:"Check your email for a password reset link."}),y(!1))};return g?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:d.jsxs(nc,{className:"w-full max-w-md",children:[d.jsxs(rc,{className:"text-center",children:[d.jsx("div",{className:"mx-auto w-14 h-14 roun
364ded-2xl bg-primary/10 flex items-center justify-center mb-3",children:d.jsx(dl,{className:"w-7 h-7 text-primary"})}),d.jsx(sc,{className:"text-xl",children:"Check your email"})]}),d.jsxs(ic,{className:"text-center space-y-4",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["We sent a verification link to ",d.jsx("span",{className:"font-semibold text-foreground",children:_}),". Click the link to activate your account."]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Didn't receive it? Check your spam folder, or resend below."})]}),d.jsxs(oc,{className:"flex-col gap-3",children:[d.jsxs(ne,{onClick:W,variant:"outline",className:"w-full gap-2",disabled:E,children:[E?d.jsx("div",{className:"w-4 h-4 border-2 border-primary/30 border-t-primary rounded-full animate-spin"}):d.jsx(dl,{className:"w-4 h-4"}),E?"Sendingâ¦":"Resend Verification Email"]}),d.jsx(ne,{variant:"ghost",className:"text-sm",onClick:()=>{v(!1),i(!0)},children:"Back to login"})]})]})}):w?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:d.jsxs(nc,{className:"w-full max-w-md",children:[d.jsx(rc,{className:"text-center",children:d.jsx(sc,{className:"text-xl",children:"Reset Password"})}),d.jsxs("form",{onSubmit:D,children:[d.jsx(ic,{className:"space-y-4",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx(To,{htmlFor:"reset-email",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx(dl,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),d.jsx(ko,{id:"reset-email",type:"email",value:o,onChange:L=>a(L.target.value),placeholder:"[email protected]",className:"pl-9",required:!0})]})]})}),d.jsxs(oc,{className:"flex-col gap-3",children:[d.jsx(ne,{type:"submit",className:"w-full",disabled:f,children:f?"Sending...":"Send Reset Link"}),d.jsx(ne,{variant:"ghost",type:"button",className:"text-sm",onClick:()=>y(!1),children:"Back to login"})]})]})]})}):d.jsxs("div",{className:"min-h-screen bg-background flex",children:[d.jsxs("div",{className:"hidden lg:flex flex-1 bg-secondary/30 p-12 flex-col justify-center relative overflow-hidden",children:[d.jsx("div",{className:"absolute -top-32 -left-32 w-96 h-96 rounded-full bg-primary/5 blur-3xl pointer-events-none"}),d.jsx("div",{className:"absolute -bottom-32 -right-32 w-96 h-96 rounded-full bg-accent/5 blur-3xl pointer-events-none"}),d.jsxs("div",{className:"relative max-w-md mx-auto",children:[d.jsxs("button",{onClick:()=>b("/"),className:"flex items-center gap-2.5 mb-8 text-left",children:[d.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center",children:d.jsx(hn,{className:"w-5 h-5 text-primary"})}),d.jsx("span",{className:"text-xl font-bold text-foreground",children:"SocialBrilliance"})]}),d.jsxs("h2",{className:"text-3xl font-bold text-foreground leading-tight mb-3",children:["Make every piece of marketing ",d.jsx("span",{className:"gradient-text",children:"better"}),"."]}),d.jsx("p",{className:"text-muted-foreground mb-8",children:"AI marketing intelligence for small teams â create, review, and keep your brand context in one place."}),d.jsx("div",{className:"space-y-4",children:kU.map(L=>{const U=L.icon;return d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0 mt-0.5",children:d.jsx(U,{className:"w-4 h-4 text-primary"})}),d.jsx("span",{className:"text-sm text-foreground",children:L.text})]},L.text)})}),d.jsx("div",{className:"mt-10 pt-6 border-t border-border/50",children:d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Already tried the free version?"," ",d.jsx("button",{onClick:()=>b("/strategy?source=auth"),className:"text-primary hover:underline font-medium",children:"Continue without account â"})]})})]})]}),d.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-8",children:d.jsxs("div",{className:"w-full max-w-md",children:[d.jsxs("div",{className:"lg:hidden text-center mb-6",children:[d.jsx("button",{onClick:()=>b("/"),className:"mx-auto w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center mb-3",children:d.jsx(hn,{className:"w-6 h-6 text-primary"})}),d.jsx("h1",{className:"text-xl font-bold text-foreground",children:"SocialBrilliance"}),d.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"AI marketing intelligence for small teams"}),d.jsx("button",{onClick:()=>b("/"),className:"mt-2 text-xs text-primary hover:underline",children:"â Back to home"})]}),r&&d.jsxs("div",{className:"mb-4 rounded-xl border border-primary/30 bg-primary/5 p-4 flex items-center gap-3",children:[d.jsx("div",{className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:d.jsx(u_,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"text-sm font-semibold text-foreground",children:["Continue with ",r.name]}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.price,r.cadence," · you'll go straight to checkout"]})]}),d.jsx("button",{type:"button",onClick:()=>{OE(),b("/auth",{replace:!0}),window.location.reload()},className:"ml-auto text-[11px] text-muted-foreground hover:text-foreground underline-offset-2 hover:underline shrink-0",children:"Change"})]}),d.jsxs(nc,{children:[d.jsxs(rc,{className:"text-center space-y-1",children:[d.jsx(sc,{className:"text-2xl font-bold",children:r&&!s?`Create your account to continue with ${r.name}`:s?"Welcome back":"Create your account"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:r?"Takes a few seconds â your plan selection is saved":s?"Sign in to pick up where you left off":"Free to start â no credit card required"})]}),d.jsxs("form",{onSubmit:s?$:O,children:[d.jsxs(ic,{className:"space-y-4",children:[!s&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(To,{htmlFor:"name",children:"Display Name"}),d.jsxs("div",{className:"relative",children:[d.jsx(MP,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),d.jsx(ko,{id:"name",value:u,onChange:L=>h(L.target.value),placeholder:"Your name",className:"pl-9",required:!0})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(To,{htmlFor:"email",children:"Email"}),d.jsxs("div",{className:"relative",children:[d.jsx(dl,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),d.jsx(ko,{id:"email",type:"email",value:o,onChange:L=>a(L.target.value),placeholder:"[email protected]",className:"pl-9",required:!0})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(To,{htmlFor:"password",children:"Password"}),s&&d.jsx("button",{type:"button",className:"text-xs text-primary hover:underline",onClick:()=>y(!0),children:"Forgot password?"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(wu,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}
364),d.jsx(ko,{id:"password",type:"password",value:l,onChange:L=>c(L.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",className:"pl-9",minLength:6,required:!0})]})]})]}),d.jsxs(oc,{className:"flex-col gap-3",children:[d.jsxs(ne,{type:"submit",className:"w-full gap-2",disabled:f,children:[f?d.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin"}):d.jsx(on,{className:"w-4 h-4"}),r?s?`Sign in & continue to ${r.name}`:`Create account & continue to ${r.name}`:s?"Sign In":"Create Account"]}),d.jsxs("div",{className:"relative w-full",children:[d.jsx("div",{className:"absolute inset-0 flex items-center",children:d.jsx("span",{className:"w-full border-t border-border"})}),d.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:d.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"or continue with"})})]}),d.jsxs(ne,{type:"button",variant:"outline",className:"w-full gap-2",disabled:f,onClick:async()=>{p(!0);try{sessionStorage.setItem(Pl,"google")}catch{}it(ot.OAUTH_STARTED,{provider:"google",plan:(n==null?void 0:n.plan)??null});const{error:L}=await nw.auth.signInWithOAuth("google",{redirect_uri:P()});L&&(m({title:"Google sign-in failed",description:String(L),variant:"destructive"}),p(!1))},children:[d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",children:[d.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"}),d.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"}),d.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),d.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"})]}),"Continue with Google"]}),d.jsxs(ne,{type:"button",variant:"outline",className:"w-full gap-2",disabled:f,onClick:async()=>{p(!0);try{sessionStorage.setItem(Pl,"apple")}catch{}it(ot.OAUTH_STARTED,{provider:"apple",plan:(n==null?void 0:n.plan)??null});const{error:L}=await nw.auth.signInWithOAuth("apple",{redirect_uri:P()});L&&(m({title:"Apple sign-in failed",description:String(L),variant:"destructive"}),p(!1))},children:[d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:d.jsx("path",{d:"M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"})}),"Continue with Apple"]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[s?"Don't have an account?":"Already have an account?"," ",d.jsx("button",{type:"button",className:"text-primary hover:underline font-medium",onClick:()=>i(!s),children:s?"Sign up":"Sign in"})]}),d.jsx("div",{className:"lg:hidden pt-2 border-t border-border/50 w-full text-center",children:d.jsx("button",{onClick:()=>b("/strategy?source=auth"),className:"text-xs text-primary hover:underline",children:"Or run a free brand diagnosis without an account â"})})]})]})]})]})})]})}const CU=()=>{const e=bt();return x.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),d.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},rw=x.lazy(()=>ie(()=>import("./Index-DLf1dyl-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))),PU=x.lazy(()=>ie(()=>import("./Dashboard-B4Rgh2Kc.js"),__vite__mapDeps([32,23,33,22,15,34,35,36]))),AU=x.lazy(()=>ie(()=>import("./Claim-DG26axCn.js"),__vite__mapDeps([37,38]))),RU=x.lazy(()=>ie(()=>import("./Analytics-kBxuZhmy.js"),__vite__mapDeps([39,16]))),jU=x.lazy(()=>ie(()=>import("./Strategy-ifI8w8Cq.js"),__vite__mapDeps([40,41,6,26,3,42,10,43,31,44,45,36,46,47,19,48,5,21,34,49,50,51,1,52,53,54,13,9,55,56,16,7,57,58,59,60,23,61,62,63,64,30,2,8,17,29,65,22,20]))),NU=x.lazy(()=>ie(()=>import("./SharedScorecard-BZan4Iv3.js"),__vite__mapDeps([66,67,6,49,50,24,41,26,3,56,8,25,48,16,7,68,69]))),OU=x.lazy(()=>ie(()=>import("./SharedDiagnosis-D-XkIIVZ.js"),__vite__mapDeps([70,60,23,1,6,48,36,61,26,62,55,3,31,41,63,64,30,2,8,17,29,65,16]))),IU=x.lazy(()=>ie(()=>import("./Twin-9MA3gWic.js"),__vite__mapDeps([71,10,23,44,27,33,21,19,46,47,28,3,69,34,31,11,1,12,13,16,72,4,9]))),DU=x.lazy(()=>ie(()=>import("./NarrativeMap-c5eEiG7Z.js"),__vite__mapDeps([73,67,6,49,50,24,23,44,27,31,34,16,68,7,51,3,69,48,13,26]))),LU=x.lazy(()=>ie(()=>import("./HookTester-Bihd7E3h.js"),__vite__mapDeps([74,10,24,75,49,50,23,44,16,68,8,3]))),MU=x.lazy(()=>ie(()=>import("./Calendar-B-y2pwiP.js"),__vite__mapDeps([76,53,54,10,77,50,78,31,43,34,13,36,12,35]))),$U=x.lazy(()=>ie(()=>import("./ResetPassword-D8jQZobW.js"),[])),UU=x.lazy(()=>ie(()=>import("./PaymentSuccess-6srxD59u.js"),__vite__mapDeps([79,22,20,61,56]))),FU=x.lazy(()=>ie(()=>import("./Settings-CCTZl1aJ.js"),__vite__mapDeps([80,14,75,81,15,55,34]))),VU=x.lazy(()=>ie(()=>
364import("./Enterprise-DHonKa6r.js"),__vite__mapDeps([82,83,10,16,55,61]))),BU=x.lazy(()=>ie(()=>import("./Investors-D_mMSEC5.js"),__vite__mapDeps([84,16,59,64,26,55]))),zU=x.lazy(()=>ie(()=>import("./Agencies-DYMk_eQx.js"),__vite__mapDeps([85,16,29,61,21]))),sw=x.lazy(()=>ie(()=>import("./SignalIndex-CpOSNy0C.js"),__vite__mapDeps([86,75,49,50,87,16,88,89,90,81,91,56,31,61,26,55,48,59]))),Al=x.lazy(()=>ie(()=>import("./AnnualReport-Cjy5oYOk.js"),__vite__mapDeps([92,75,87,16,90,81,56,61,59,55,26]))),iw=x.lazy(()=>ie(()=>import("./Rankings-Cl9eOTyS.js"),__vite__mapDeps([93,75,77,50,54,78,31,43,87,16,90,81,91,28,94,30,26,55]))),WU=x.lazy(()=>ie(()=>import("./About-D025FvSq.js"),__vite__mapDeps([95,87,16,65,59,26,55]))),HU=x.lazy(()=>ie(()=>import("./CompanyProfile-Cp1r6gLw.js"),__vite__mapDeps([96,75,87,16,89,88,90,81,91,94,21,19]))),KU=x.lazy(()=>ie(()=>import("./CompareCompanies-CW1cK6wp.js"),__vite__mapDeps([97,98,75,87,16,89,91,90,81,94,42,56]))),GU=x.lazy(()=>ie(()=>import("./PrivateReport-0Cfmx60g.js"),__vite__mapDeps([99,75,63,56]))),qU=x.lazy(()=>ie(()=>import("./AdminReports-D9maeY1w.js"),__vite__mapDeps([100,75,49,50,16,64,36,101,34]))),YU=x.lazy(()=>ie(()=>import("./RevenueCommandCenter-Y3KUoli5.js"),__vite__mapDeps([102,78,52,53,54,75,16,72,64,62,33,61,101]))),QU=x.lazy(()=>ie(()=>import("./Launch-Bi0JzmQm.js"),__vite__mapDeps([103,91,38]))),JU=x.lazy(()=>ie(()=>import("./Analyze-C6MDc741.js"),__vite__mapDeps([104,91,48,8,19,21]))),XU=x.lazy(()=>ie(()=>import("./BatchAudit-Cj8Q7odv.js"),__vite__mapDeps([105,49,50,16,12,13,56,61,57]))),ZU=x.lazy(()=>ie(()=>import("./StartupSignalReport-C--XF-yU.js"),__vite__mapDeps([106,75,49,50,91,58,18,46,17,63]))),eF=x.lazy(()=>ie(()=>import("./Pricing-YbLameyw.js"),__vite__mapDeps([107,83,10,55,19,31,46,4]))),tF=x.lazy(()=>ie(()=>import("./ClinicalTrials-Bm6mX7z5.js"),__vite__mapDeps([108,55,61,26,45]))),nF=x.lazy(()=>ie(()=>import("./IndustryLanding-hBQapSd5.js"),__vite__mapDeps([109,91,55,61]))),rF=x.lazy(()=>ie(()=>import("./PreLaunch-BzzJ_fgU.js"),__vite__mapDeps([110,44,91,10,77,50,54,78,31,43,75,16,101,65,61,26,69]))),sF=x.lazy(()=>ie(()=>import("./Privacy-DhNIrCeW.js"),__vite__mapDeps([111,83,91,16]))),iF=x.lazy(()=>ie(()=>import("./Terms-Bv75a_Wb.js"),__vite__mapDeps([112,83,91,16]))),oF=new h2;function ar({children:e,withLayout:t=!0}){const{user:n,loading:r}=gn();return r?d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:d.jsx("div",{className:"w-8 h-8 border-4 border-primary/30 border-t-primary rounded-full animate-spin"})}):n?t?d.jsx(AE,{children:e}):d.jsx(d.Fragment,{children:e}):d.jsx(St,{to:"/auth",replace:!0})}function Rl({children:e}){const{user:t}=gn();return t?d.jsx(AE,{children:e}):d.jsx(d.Fragment,{children:e})}function ow(e){try{return decodeURIComponent(e)}catch{return e}}function aF(){const{pathname:e,search:t}=bt(),n=`${e}${t}`.toLowerCase(),r=ow(n),s=ow(r),i=`${n} ${r} ${s}`,o=/annual[^a-z0-9]*report|signal[^a-z0-9]*to[^a-z0-9]*noise[^a-z0-9]*(report|index)/.test(i),a=/https?%3a|https?:\/\//.test(i)&&/socialbrilliance|annual|signal|noise/.test(i),l=/purchase|checkout|buy/.test(i);return o||a||l&&/signal|noise|founding/.test(i)?d.jsx(St,{to:"/research/annual-signal-to-noise-report-2026",replace:!0}):d.jsx(Q,{children:d.jsx(CU,{})})}const lF=()=>{K3();const e=bt();return d.jsx(iL,{mode:"wait",children:d.jsx(Q3,{children:d.jsxs(nN,{location:e,children:[d.jsx(z,{path:"/",element:d.jsx(Q,{children:d.jsx(lU,{})})}),d.jsx(z,{path:"/about",element:d.jsx(Q,{children:d.jsx(WU,{})})}),d.jsx(z,{path:"/privacy",element:d.jsx(Q,{children:d.jsx(sF,{})})}),d.jsx(z,{path:"/terms",element:d.jsx(Q,{children:d.jsx(iF,{})})}),d.jsx(z,{path:"/auth",element:d.jsx(Q,{children:d.jsx(TU,{})})}),d.jsx(z,{path:"/reset-password",element:d.jsx(Q,{children:d.jsx($U,{})})}),d.jsx(z,{path:"/enterprise",element:d.jsx(Q,{children:d.jsx(VU,{})})}),d.jsx(z,{path:"/investors",element:d.jsx(Q,{children:d.jsx(BU,{})})}),d.jsx(z,{path:"/agencies",element:d.jsx(Q,{children:d.jsx(zU,{})})}),d.jsx(z,{path:"/signal-index",element:d.jsx(Q,{children:d.jsx(sw,{})})}),d.jsx(z,{path:"/signal-to-noise-index",element:d.jsx(Q,{children:d.jsx(sw,{})})}),d.jsx(z,{path:"/signal-to-noise-index/rankings",element:d.jsx(Q,{children:d.jsx(iw,{})})}),d.jsx(z,{path:"/signal-to-noise-index/company/:slug",element:d.jsx(Q,{children:d.jsx(HU,{})})}),d.jsx(z,{path:"/signal-to-noise-index/compare",element:d.jsx(Q,{children:d.jsx(KU,{})})}),d.jsx(z,{path:"/research/annual-signal-to-noise-report-2026",element:d.jsx(Q,{children:d.jsx(Al,{})})}),d.jsx(z,{path:"/annual-report-2026",element:d.jsx(Q,{children:d.jsx(Al,{})})}),d.jsx(z,{path:"/annual-signal-to-noise-report-2026",element:d.jsx(Q,{children:d.jsx(Al,{})})}),d.jsx(z,{path:"/research/annual-report-2026",element:d.jsx(Q,{children:d.jsx(Al,{})})}),d.jsx(z,{path:"/annual-report",element:d.jsx(St,{to:"/annual-report-2026",replace:!0})}),d.jsx(z,{path:"/research/annual-report",element:d.jsx(St,{to:"/annual-report-2026",replace:!0})}),d.jsx(z,{path:"/research/annual-signal-to-noise-report",element:d.jsx(St,{to:"/annual-report-2026",replace:!0})}),d.jsx(z,{path:"/annual-report-2026%23purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/annual-report-2026%2523purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/annual-report%23purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/annual-report%2523purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/research/annual-report-2026%23purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/research/annual-report-2026%2523purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/research/annual-report%23purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/research/annual-report%2523purchase",element:d.jsx(St,{to:"/annual-report-2026#purchase",replace:!0})}),d.jsx(z,{path:"/research/rankings",element:d.jsx(Q,{children:d.jsx(iw,{})})}),d.jsx(z,{path:"/report/:token",element:d.jsx(Q,{children:d.jsx(GU,{})})}),d.jsx(z,{path:"/admin/reports",element:d.jsx(Q,{children:d.jsx(qU,{})})}),d.jsx(z,{path:"/admin/revenue",element:d.jsx(Q,{children:d.jsx(YU,{})})}),d.jsx(z,{path:"/shared/:shareId",element:d.jsx(Q,{children:d.jsx(NU,{})})}),d.jsx(z,{path:"/shared/diagnosis/:shareId",element:d.jsx(Q,{children:d.jsx(OU,{})})}),d.jsx(z,{path:"/launch",element:d.jsx(Q,{children:d.jsx(QU,{})})}),d.jsx(z,{path:"/analyze",element:d.jsx(Q,{children:d.jsx(JU,{})})}),d.jsx(z,{path:"/batch-audit",element:d.jsx(Q,{children:d.jsx(XU,{})})}),d.jsx(z,{path:"/research/startup-signal-report",element:d.jsx(Q,{children:d.jsx(ZU,{})})}),d.jsx(z,{path:"/pricing",element:d.jsx(Q,{children:d.jsx(eF,{})})}),d.jsx(z,{path:"/clinical-trials",element:d.jsx(Q,{children:d.jsx(tF,{})})}),d.jsx(z,{path:"/for/:slug",element:d.jsx(Q,{children:d.jsx(nF,{})})}),d.jsx(z,{path:"/index",element:d.jsx(Q,{children:d.jsx(Rl,{children:d.jsx(rw,{})})})}),d.jsx(z,{path:"/composer",element:d.jsx(Q,{children:d.jsx(Rl,{children:d.jsx(rw,{})})})}),d.jsx(z,{path:"/payment-success",element:d.jsx(Q,{children:d.jsx(UU,{})})}),d.jsx(z,{path:"/dashboard",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(PU,{})})})}),d.jsx(z,{path:"/claim",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(AU,{})})})}),d.jsx(z,{path:"/analytics",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(RU,{})})})}),d.jsx(z,{path:"/settings",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(FU,{})})})}),d.jsx(z,{path:"/strategy",element:d.jsx(Q,{children:d.jsx(Rl,{children:d.jsx(yo,{feature:"strategy",children:d.jsx(jU,{})})})})}),d.jsx(z,{path:"/twin",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(yo,{feature:"twin",children:d.jsx(IU,{})})})})}),d.jsx(z,{path:"/narrative",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(yo,{feature:"narrative",children:d.jsx(DU,{})})})})}),d.jsx(z,{path:"/hooks",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(yo,{feature:"hooks",children:d.jsx(LU,{})})})})}),d.jsx(z,{path:"/calendar",element:d.jsx(Q,{children:d.jsx(ar,{children:d.jsx(yo,{feature:"calendar",children:d.jsx(MU,{})})})})}),d.jsx(z,{path:"/pre-launch",element:d.jsx(Q,{children:d.jsx(Rl,{children:d.jsx(rF,{})})})}),d.jsx(z,{path:"*",element:d.jsx(aF,{})})]})},e.pathname)})};function cF(){return d.jsx(f2,{client:oF,children:d.jsxs(zj,{children:[d.jsx(xA,{}),d.jsx(XA,{}),d.jsx(uN,{children:d.jsx(H3,{children:d.jsx(lF,{})})})]})})}const Zd=localStorage.getItem("sb_theme"),aw=window.matchMedia("(prefers-color-scheme: dark)").matches;(Zd==="dark"||Zd==="system"&&aw||!Zd&&aw)&&document.documentElement.classList.add("dark");
364"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(t=>t.unregister())});jb(document.getElementById("root")).render(d.jsx(cF,{}));export{jP as $,on as A,ne as B,l_ as C,NF as D,ot as E,h_ as F,EP as G,wP as H,ko as I,h$ as J,dF as K,jc as L,dl as M,gw as N,o_ as O,$r as P,I as Q,by as R,hn as S,f_ as T,MP as U,wu as V,_F as W,Ni as X,Qi as Y,qp as Z,G$ as _,OP as a,PP as a$,RP as a0,Gp as a1,vu as a2,SP as a3,AP as a4,nU as a5,S$ as a6,Gm as a7,y4 as a8,v4 as a9,Ge as aA,x4 as aB,_4 as aC,S4 as aD,P4 as aE,LF as aF,DF as aG,EU as aH,To as aI,oc as aJ,$F as aK,MF as aL,LP as aM,UF as aN,Cu as aO,wF as aP,ca as aQ,c2 as aR,at as aS,xF as aT,u_ as aU,AF as aV,SE as aW,CP as aX,X3 as aY,PF as aZ,NP as a_,SF as aa,b$ as ab,fo as ac,RF as ad,iL as ae,jF as af,NE as ag,Hf as ah,Bm as ai,FF as aj,_E as ak,VF as al,ie as am,bF as an,d_ as ao,vP as ap,DP as aq,_P as ar,xP as as,bP as at,nc as au,ic as av,rc as aw,sc as ax,pu as ay,ft as az,p_ as b,PC as b0,t2 as b1,qj as b2,$y as b3,Zt as b4,Pu as b5,Kj as b6,Gj as b7,r1 as b8,i2 as b9,IE as bA,y0 as bB,Lu as bC,TF as bD,$_ as bE,_j as bF,Mr as bG,Oa as bH,Sj as bI,Ej as bJ,mu as bK,bj as bL,CU as bM,CF as bN,Qj as ba,St as bb,q0 as bc,IF as bd,OF as be,u$ as bf,dn as bg,Ub as bh,$e as bi,Vp as bj,pj as bk,m$ as bl,Hp as bm,oa as bn,Fp as bo,hF as bp,tR as bq,$b as br,TP as bs,zj as bt,yF as bu,vF as bv,Wj as bw,OC as bx,jn as by,Va as bz,J as c,w4 as d,_y as e,pF as f,Ea as g,Vi as h,Ia as i,d as j,$P as k,xe as l,Kp as m,vy as n,c_ as o,mn as p,rU as q,x as r,Se as s,it as t,s4 as u,gn as v,CE as w,IP as x,wy as y,L$ as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.